67 if (secondHeight > height)
68 height = secondHeight;
69 if (height > 0 && height > terrainFloor) {
73 ((
u32 *)mark)[1] = 0x40000800;
74 ((
u32 *)mark)[2] = 0x400;
80 mark->
x = ((
u32)(
x >> 16) & 0xfff0) - cameraX;
81 screenRow = (
z >> 16) & 0xf0;
82 mark->
y = screenRow - cameraZ - height + 16;
88 mark = &
work->marks[1];
91 if (secondHeight > height)
92 height = secondHeight;
93 if (height > 0 && height > terrainFloor) {
94 ((
u32 *)mark)[1] = 0x40000800;
99 mark->
x = ((
u32)(
x >> 16) & 0xfff0) - cameraX;
100 screenRow = (
z >> 16) & 0xf0;
101 mark->
y = screenRow - cameraZ - height + 16;
134 work->
actor = object;
void * ObjectTable_Get(u32 actorIndex)
Returns the actor in slot index (0 to 65), or NULL.
#define Dma_Fill32Cell(cell, value, destination, size)
Dma_Fill32 through the caller's own volatile word cell, so a function that fills several blocks keeps...
void FadeOverlay_Suspend(void)
Stops drawing the fade overlay, keeping its work.
void FadeOverlay_DrawMarks(void)
Each frame of the fade overlay: on each of the two cells beside the actor (left and right of it),...
void BattleFx_StartFadeOverlay(void *object)
Starts the fade overlay on object (the party leader when NULL): loads its solid tiles,...
void FadeOverlay_Resume(void)
Draws the fade overlay again after FadeOverlay_Suspend.
s32 Map_GetTerrainHeightFar(s32 layer, s32 x, s32 y)
struct GameState gGameState
void * Runtime_AllocateBlock(s32 kind, s32 size)
As Runtime_AllocateHeapBlock, but tries EWRAM first, for blocks that need room more than speed: the b...
void * Runtime_AllocateHeapBlock(s32 kind, s32 size)
Returns heap slot kind's block, first allocating size bytes for it (rounded up to words),...
#define WORK_SLOT(n)
Reads slots through their own addresses; adjacent slots are reached by offsets.
#define BLDCNT_EFFECT_LIGHTEN
towards white by REG_BLDY
#define BLEND_ALPHA(top, bottom)
A REG_BLDALPHA value: top and bottom are the two targets' weights, out of 16.
#define Io_Write16(v, reg)
Writes a value to a 16-bit register or memory location.
void Runtime_ReleaseHeapBlock(s32 slot)
What every part of object.c shares: its includes and the macros and types more than one part uses.
void Runtime_PushSlotEntry(void *slotEntry, s32 slot)
Links a sprite entry into depth slot slot (clamped to 0..255) for this frame.
s32 Scheduler_ResumeTasks(SchedulerCallback callback)
Resumes the task running callback, or every task when callback is null, by clearing bit 0 of its orde...
s32 Scheduler_AddOrUpdateCallback(SchedulerCallback callback, s32 order)
Schedules callback with order, or gives a task already running it the new order, and re-sorts the tab...
s32 Scheduler_SuspendTasks(SchedulerCallback callback)
Suspends the task running callback, or every task when callback is null, by setting bit 0 of its orde...
The hardware sprite attributes one part of an animated sprite (its image or its shadow) is drawn with...
u16 y
The OAM entry's attributes 0 to 2.
u16 tile
first sprite tile in VRAM
u16 priority
2 when created
The fade overlay draws one mark on each side of its tracked actor.
struct FieldActor * actor
the actor tracked; null draws nothing
struct AnimationSpritePart marks[2]
The left and right marks: 16-pixel-wide semi-transparent sprites drawn where the ground beside the ac...
The map work in heap slot 8, seen as the halfwords of its view position: the high halves are the view...
A field actor: a person or thing on the field with a position, motion toward a target,...
union FieldCoordinate x
16.16 fixed-point pixels
s32 terrainHeight
16.16 fixed-point pixels
union FieldCoordinate z
16.16 fixed-point pixels
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
u8 terrainId
The map layer (0 to 3) its ground height is read from, which the scrolling camera updates from the ce...
s32 selectedActor
the leader: its unit and its actor
u16 offset
bytes from the start of OBJ VRAM
s32 fixed
16.16 fixed-point pixels
s32 VramCache_Load(u32 no, u32 size, const void *src)
Gives cache entry no size bytes of sprite VRAM and copies src there.
struct VramBlockCacheEntry gVramBlockCache[]