src/menu/menu_djinn_figures.c
The Djinn figures the Status and Djinn menus show, the five status icons, and the statuses the Status screens list. More…
Included by menu.c.
Macros
| Name | Description | |
|---|---|---|
#define | FIGURE_START_X 16 | The x a new row's figures stand at, parked below the screen (MENU_FIGURE_HIDDEN_Y), until their screen places them. |
Functions
| Name | Description | |
|---|---|---|
void | mnDjinnFiguresSetShown (Sint32 shown) | Shows the Djinn figures of the top row (nonzero) or hides them (0). |
void | mnDjinnFiguresUpdateTopRow (void) | An event while the Djinn figures show: places each at its position, depth and scale; a positive scale eases a quarter of the way to full size each tick, a negative one holds at its size. |
void | mnDjinnFiguresInitTopRow (void) | Replaces the four Djinn figures with one Djinni of each element (DjinnFiguresSpriteIds) walking (ANIM_WALK), at FIGURE_START_X and MENU_FIGURE_HIDDEN_Y until the screen moves them, and starts placing them each tick (mnDjinnFiguresUpdateTopRow). |
void | mnDjinnFiguresReleaseTopRow (void) | Destroys the four Djinn figures and stops placing them. |
void | mnDjinnFiguresReplaceSlot (Sint32 index, Sint32 kind, Sint32 animation) | Replaces Djinn figure index with a Djinni of element kind (DjinnFiguresSpriteIds) playing animation. |
void | mnDjinnFiguresSetSlotPos (Sint32 index, Sint32 x, Sint32 y) | Moves Djinn figure index to screen pixel (x, y), if it exists. |
void | mnDjinnFiguresSetSlotFacing (Sint32 index, Sint32 facing) | Turns Djinn figure index to face facing (FACING), if it exists. |
void | mnDjinnFiguresSetSlotPhase (Sint32 index, Sint32 scale) | Sets Djinn figure index's scale, if it exists: a positive scale grows towards full size, a negative one holds at its size. |
void | mnIconPushSlots (void) | An event: queues the five status icons for drawing while they show. |
void | mnIconLoadSlots (void) | Loads the five status icons (StatusScreenStatusIcons), one for each status mnPanelDrawEntryList lists (UNIT_STAT), into free VRAM cache slots, and starts drawing them (mnIconPushSlots). |
void | mnIconReleaseSlots (void) | Stops drawing the five status icons and frees their VRAM cache slots. |
void | mnIconSetSlot (Sint32 index, Uint32 x, Sint32 y) | Moves status icon index to screen position (x, y). |
void | mnIconSetActive (Sint32 active) | Shows the five status icons (1) or hides them (0). |
void | mnPanelDrawEntryList (WINDOW *panel, Sint32 x, Sint32 y, const Uint8 *enabled) | Lists the statuses enabled marks into panel from (x, y), one a 16-pixel row with its icon, or "Your status is normal." when there are none; the icons of the others go off screen. |
Sint32 | mnStatusScreenListStatuses (Uint8 *ailments, Sint32 requested, Sint32 memberId) | Fills ailments (UNIT_STAT) with party member memberId's statuses, Down only when requested is 1, and returns how many they have. |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | DjinnFiguresSpriteIds [] | The four Djinn figures' sprites, one an element (menu_tables.c). |
extern Uint16 | StatusScreenStatusIcons [CHARACTER_AILMENT_COUNT] | The status icons (mnIconLoadSlots). |
Description
The Djinn figures the Status and Djinn menus show, the five status icons, and
the statuses the Status screens list. Part of menu.c.
Macros in detail
FIGURE_START_X
#define FIGURE_START_X 16
The x a new row's figures stand at, parked below the screen
(MENU_FIGURE_HIDDEN_Y), until their screen places them.
Referenced by mnDjinnFiguresInitTopRow().
Definition at line 66 of file menu_djinn_figures.c.
Functions in detail
mnDjinnFiguresSetShown
void mnDjinnFiguresSetShown(Sint32 shown)
Shows the Djinn figures of the top row (nonzero) or hides them (0).
References Sint32.
Definition at line 5 of file menu_djinn_figures.c.
mnDjinnFiguresUpdateTopRow
void mnDjinnFiguresUpdateTopRow(void)
An event while the Djinn figures show: places each at its position, depth and scale; a positive scale eases a quarter of the way to full size each tick, a negative one holds at its size.
References fdRenderApplyProjectedPlacementAtDepthStub() and Sint32.
Referenced by mnDjinnFiguresInitTopRow() and mnDjinnFiguresReleaseTopRow().
Definition at line 15 of file menu_djinn_figures.c.
mnDjinnFiguresInitTopRow
void mnDjinnFiguresInitTopRow(void)
Replaces the four Djinn figures with one Djinni of each element
(DjinnFiguresSpriteIds) walking (ANIM_WALK), at FIGURE_START_X and
MENU_FIGURE_HIDDEN_Y until the screen moves them, and starts placing them
each tick (mnDjinnFiguresUpdateTopRow).
References DjinnFiguresSpriteIds, fdSpriteCreateStub(), fdSpriteDestroyStub(), fdSpriteStartAnimationStub(), mnDjinnFiguresUpdateTopRow(), Sint32 and sySetEvent().
Referenced by mnDjinnMenuRun() and mnStatusScreenRun().
Definition at line 72 of file menu_djinn_figures.c.
mnDjinnFiguresReleaseTopRow
void mnDjinnFiguresReleaseTopRow(void)
Destroys the four Djinn figures and stops placing them.
References fdSpriteDestroyStub(), mnDjinnFiguresUpdateTopRow(), Sint32 and syCloseEvent().
Referenced by mnDjinnMenuRun() and mnStatusScreenRun().
Definition at line 105 of file menu_djinn_figures.c.
mnDjinnFiguresReplaceSlot
void mnDjinnFiguresReplaceSlot(Sint32 index, Sint32 kind, Sint32 animation)
Replaces Djinn figure index with a Djinni of element kind
(DjinnFiguresSpriteIds) playing animation.
References DjinnFiguresSpriteIds, fdSpriteCreateStub(), fdSpriteDestroyStub(), fdSpriteStartAnimationStub() and Sint32.
Referenced by mnDjinnMenuSelectDjinn().
Definition at line 123 of file menu_djinn_figures.c.
mnDjinnFiguresSetSlotPos
void mnDjinnFiguresSetSlotPos(Sint32 index, Sint32 x, Sint32 y)
Moves Djinn figure index to screen pixel (x, y), if it exists.
References Sint32.
Referenced by mnDjinnMenuRunPreview(), mnDjinnMenuRunScreen(), mnDjinnMenuSelectDjinn() and mnDjinnMenuShowMemberStatus().
Definition at line 143 of file menu_djinn_figures.c.
mnDjinnFiguresSetSlotFacing
void mnDjinnFiguresSetSlotFacing(Sint32 index, Sint32 facing)
Turns Djinn figure index to face facing (FACING), if it exists.
References Sint32.
Referenced by mnDjinnMenuSelectDjinn().
Definition at line 155 of file menu_djinn_figures.c.
mnDjinnFiguresSetSlotPhase
void mnDjinnFiguresSetSlotPhase(Sint32 index, Sint32 scale)
Sets Djinn figure index's scale, if it exists: a positive scale grows
towards full size, a negative one holds at its size.
References Sint32.
Referenced by mnDjinnMenuRunPreview() and mnDjinnMenuSelectDjinn().
Definition at line 165 of file menu_djinn_figures.c.
mnIconPushSlots
void mnIconPushSlots(void)
An event: queues the five status icons for drawing while they show.
References Sint32 and syOAMAddSpriteAtDepth().
Referenced by mnIconLoadSlots() and mnIconReleaseSlots().
Definition at line 174 of file menu_djinn_figures.c.
mnIconLoadSlots
void mnIconLoadSlots(void)
Loads the five status icons (StatusScreenStatusIcons), one for each status
mnPanelDrawEntryList lists (UNIT_STAT), into free VRAM cache slots, and
starts drawing them (mnIconPushSlots). They are the battle Status screen's
pictures for Down, Poison, Venom, Curse and Haunt.
References mnIconPushSlots(), mnSelectionIconLoadIntoSlotStub(), Sint32, StatusScreenStatusIcons, sySetEvent(), syVRAMCacheFindFreeEntry() and VramCacheEntries.
Referenced by mnStatusScreenRun().
Definition at line 197 of file menu_djinn_figures.c.
mnIconReleaseSlots
void mnIconReleaseSlots(void)
Stops drawing the five status icons and frees their VRAM cache slots.
References mnIconPushSlots(), Sint32, syCloseEvent() and syVRAMCacheFreeEntry().
Referenced by mnStatusScreenRun().
Definition at line 226 of file menu_djinn_figures.c.
mnIconSetSlot
void mnIconSetSlot(Sint32 index, Uint32 x, Sint32 y)
Moves status icon index to screen position (x, y).
References Sint32.
Referenced by mnPanelDrawEntryList().
Definition at line 239 of file menu_djinn_figures.c.
mnIconSetActive
void mnIconSetActive(Sint32 active)
Shows the five status icons (1) or hides them (0).
References Sint32.
Referenced by mnStatusScreenRunPages() and mnStatusScreenShowDjinnList().
Definition at line 248 of file menu_djinn_figures.c.
mnPanelDrawEntryList
void mnPanelDrawEntryList(WINDOW *panel, Sint32 x, Sint32 y, const Uint8 *enabled)
Lists the statuses enabled marks into panel from (x, y), one a 16-pixel
row with its icon, or "Your status is normal." when there are none; the icons
of the others go off screen.
References mnIconSetSlot(), mnTextDrawMessageAsTilesStub() and Sint32.
Referenced by mnStatusScreenDrawStatusPage().
Definition at line 258 of file menu_djinn_figures.c.
mnStatusScreenListStatuses
Sint32 mnStatusScreenListStatuses(Uint8 *ailments, Sint32 requested, Sint32 memberId)
Fills ailments (UNIT_STAT) with party member memberId's statuses, Down
only when requested is 1, and returns how many they have.
References gmUnitGet() and Sint32.
Referenced by mnStatusPanelDraw(), mnStatusScreenDrawStatusPage() and mnStatusScreenRunStatusPage().
Definition at line 290 of file menu_djinn_figures.c.