Alchemy
Loading...
Searching...
No Matches

djinn_figures.c File Reference

FourObjectMotion: the row of four figures the Status and Djinn menus show, placed by a scheduler callback and eased in and out. More...

Go to the source code of this file.

Macros

#define FOUR_OBJECT_MOTION_DEFINE_RELEASE(name, update)
 Releases the four objects and removes their scheduler callback.
#define FOUR_OBJECT_MOTION_FULL_SCALE   0x10000u
 Full size, 1.0 in 16.16, and the height the figures are placed from: 482 pixels, in 16.16.
#define FOUR_OBJECT_MOTION_ORIGIN_Y   0x01e20000u

Functions

void FourObjectMotion_InitializeTopRow (void *unused0, s32 unused1)
 Replaces the four displayed objects and starts their projected-position task.
void FourObjectMotion_ClearSlotsAndSchedule (void)
void FourObjectMotion_UpdateAllPositions (void)
 Projects the four objects at full scale from their saved row positions.
void FourObjectMotion_UpdateBottomRow (void)
 Projects the bottom row using its saved scale or easing toward full size.
void FourObjectMotion_InitializeBottomRow (s32 unused0, s32 unused1)
 Replaces the bottom row's four objects and starts its easing task.
s32 FourObjectMotion_SetSlotPosition (s32 index, s32 x, s32 y, s32 negative)
 Updates one object's saved position and its signed y marker.
s32 FourObjectMotion_SetSlotPhase (s32 index, s32 phase)
s32 FourObjectMotion_ReplaceSlot (s32 index, s32 resourceKind, s32 value)
 Replaces one displayed object and selects its animation.
void FourObjectMotion_ClearSlotsAndScheduleAlt (void)
UNUSED void Menu_StartPartyFiguresWalking (void)
 Starts the walking animation (1) of each party figure. Nothing calls it.

Detailed Description

FourObjectMotion: the row of four figures the Status and Djinn menus show, placed by a scheduler callback and eased in and out.

Part of menu.c, the menu object, compiled only through it.

Definition in file djinn_figures.c.

Macro Definition Documentation

◆ FOUR_OBJECT_MOTION_DEFINE_RELEASE

#define FOUR_OBJECT_MOTION_DEFINE_RELEASE ( name,
update )
Value:
void name(void) { \
struct FourObjectMotionState *state = gMenuWork; \
s32 index = 0; \
\
do { \
struct AnimationObject *object = state->objects[index]; \
\
if (object != NULL) { \
ResourceObject_ReleaseFar(object); \
state->objects[index] = NULL; \
} \
index++; \
} while (index < 4); \
Scheduler_RemoveCallback(update); \
}
void * gMenuWork
#define NULL
Definition bilibin.h:6
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
Definition animspr.h:108
The menu work as the row of four figures reads it: each figure's object, screen position and motion p...
struct AnimationObject * objects[4]
signed int s32
Definition types.h:14

Releases the four objects and removes their scheduler callback.

Definition at line 38 of file djinn_figures.c.

◆ FOUR_OBJECT_MOTION_FULL_SCALE

#define FOUR_OBJECT_MOTION_FULL_SCALE   0x10000u

Full size, 1.0 in 16.16, and the height the figures are placed from: 482 pixels, in 16.16.

Definition at line 60 of file djinn_figures.c.

Referenced by FourObjectMotion_UpdateAllPositions().

◆ FOUR_OBJECT_MOTION_ORIGIN_Y

#define FOUR_OBJECT_MOTION_ORIGIN_Y   0x01e20000u

Definition at line 61 of file djinn_figures.c.

Referenced by FourObjectMotion_UpdateAllPositions().

Function Documentation

◆ FourObjectMotion_InitializeTopRow()

void FourObjectMotion_InitializeTopRow ( void * unused0,
s32 unused1 )

Replaces the four displayed objects and starts their projected-position task.

Definition at line 10 of file djinn_figures.c.

Referenced by FourObjectMotion_InitializeTopRow(), and StatusMenu_Run().

◆ FourObjectMotion_ClearSlotsAndSchedule()

void FourObjectMotion_ClearSlotsAndSchedule ( void )

Definition at line 56 of file djinn_figures.c.

Referenced by StatusMenu_Run().

◆ FourObjectMotion_UpdateAllPositions()

void FourObjectMotion_UpdateAllPositions ( void )

Projects the four objects at full scale from their saved row positions.

Definition at line 64 of file djinn_figures.c.

Referenced by FourObjectMotion_ClearSlotsAndSchedule(), FourObjectMotion_InitializeTopRow(), and FourObjectMotion_UpdateAllPositions().

◆ FourObjectMotion_UpdateBottomRow()

void FourObjectMotion_UpdateBottomRow ( void )

Projects the bottom row using its saved scale or easing toward full size.

Definition at line 93 of file djinn_figures.c.

Referenced by FourObjectMotion_ClearSlotsAndScheduleAlt(), FourObjectMotion_InitializeBottomRow(), and FourObjectMotion_UpdateBottomRow().

◆ FourObjectMotion_InitializeBottomRow()

void FourObjectMotion_InitializeBottomRow ( s32 unused0,
s32 unused1 )

Replaces the bottom row's four objects and starts its easing task.

Definition at line 140 of file djinn_figures.c.

Referenced by DjinnMenu_Run(), and FourObjectMotion_InitializeBottomRow().

◆ FourObjectMotion_SetSlotPosition()

s32 FourObjectMotion_SetSlotPosition ( s32 index,
s32 x,
s32 y,
s32 negative )

Updates one object's saved position and its signed y marker.

Definition at line 167 of file djinn_figures.c.

Referenced by DjinnMenu_RunScreen(), DjinnMenu_SelectDjinn(), DjinnMenu_ShowOwnerStatus(), FourObjectMotion_SetSlotPosition(), and OwnerAction_RunCompareLoop().

◆ FourObjectMotion_SetSlotPhase()

s32 FourObjectMotion_SetSlotPhase ( s32 index,
s32 phase )

◆ FourObjectMotion_ReplaceSlot()

s32 FourObjectMotion_ReplaceSlot ( s32 index,
s32 resourceKind,
s32 value )

Replaces one displayed object and selects its animation.

Definition at line 186 of file djinn_figures.c.

Referenced by DjinnMenu_SelectDjinn(), and FourObjectMotion_ReplaceSlot().

◆ FourObjectMotion_ClearSlotsAndScheduleAlt()

void FourObjectMotion_ClearSlotsAndScheduleAlt ( void )

Definition at line 205 of file djinn_figures.c.

Referenced by DjinnMenu_Run().

◆ Menu_StartPartyFiguresWalking()

UNUSED void Menu_StartPartyFiguresWalking ( void )

Starts the walking animation (1) of each party figure. Nothing calls it.

Definition at line 208 of file djinn_figures.c.

Referenced by Menu_StartPartyFiguresWalking().