Entity struct
#include <include/entity.h>
Container for instantiable behavior.
Public types
- union Palette
- struct SpriteOrientation
- struct SpriteRendering
- struct SpriteSettings
Public variables
- struct Entity_* prev
- previous Entity
- struct Entity_* next
- next Entity
- u8 kind
- u8 id
- Entity id.
- u8 type
- For use internally to allow different variations.
- u8 type2
- For use internally.
- u8 action
- Current action.
- u8 subAction
- Optional sub-action.
- u8 timer
- General purpose timer.
- u8 subtimer
- General purpose timer.
- u8 flags
- u8 : 4 updatePriority
- Current priority.
- u8 : 4 updatePriorityPrev
- Priority to restore after request is over.
- s16 spriteIndex
- u8 animationState
- Animation state.
- u8 direction
- Facing direction.
- u8 carryFlags
- Flags for carrying this Entity.
- u8 followerFlag
- Controls collisions between followers, unused.
-
struct Entity::
SpriteSettings spriteSettings -
struct Entity::
SpriteRendering spriteRendering -
union Entity::
Palette palette -
struct Entity::
SpriteOrientation spriteOrientation - u8 gustJarFlags
- Controls sfx and other things.
- u8 gustJarTolerance
- Frames needed to pull off ground.
- u8 frameIndex
- u8 lastFrameIndex
- s32 zVelocity
- Z axis speed, measured in px/frame.
- s16 speed
- Magnitude of speed.
- u8 spriteAnimation
- SpritePriority spritePriority
- u16 collisions
- Collision flags for each direction.
- union SplitWord x
- X position, fixed point Q16.16.
- union SplitWord y
- Y position, fixed point Q16.16.
- union SplitWord z
- Z position, fixed point Q16.16.
- u8 collisionLayer
- s8 interactType
- u8 gustJarState
- 4: grabbed by GustJar
- u8 collisionMask
- Bitfield.
- u8 collisionFlags
- s8 iframes
- Invulnerability frames.
- u8 knockbackDirection
- Direction of knockback.
- u8 hitType
- Behavior as a collision sender.
- u8 hurtType
- Behavior as a collision receiver.
- u8 contactFlags
- Information about collision contact.
- u8 knockbackDuration
- Duration of knockback.
- u8 confusedTime
- Frames that this Entity is confused.
- u8 damage
- Damage this Entity inflicts.
- u8 health
- Health of this Entity.
- u16 knockbackSpeed
- How fast this Entity is knocked back.
- Hitbox* hitbox
- Hitbox associated with this Entity.
- struct Entity_* contactedEntity
- struct Entity_* parent
- Parent Entity.
- struct Entity_* child
- Child Entity.
- u8 animIndex
- u8 frameDuration
- u8 frame
- u8 frameSpriteSettings
- void* animPtr
- u16 spriteVramOffset
- u8 spriteOffsetX
- s8 spriteOffsetY
- void* myHeap
- Heap data allocated with zMalloc.
Variable documentation
u8 : 4 Entity:: updatePriority
Current priority.
u8 : 4 Entity:: updatePriorityPrev
Priority to restore after request is over.
u8 Entity:: animationState
Animation state.
u16 Entity:: collisions
Collision flags for each direction.
u8 Entity:: collisionLayer
u8 Entity:: collisionMask
Bitfield.