Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
hud.c File Reference

FIGHTSTG's HUD: the fighters' names, HP and MP bars and the technique gauge. More...

Include dependency graph for hud.c:

Go to the source code of this file.

Functions

void FIGHTSTG_updateHpTweens (HpDisplay *task, TextWindow **windows)
 Every frame: the hp tween of a side whose active fighter changed jumps to that fighter's hp; every interval, a side's tween starts easing (30 frames) to its fighter's hp, clamped to 0 and the max hp, when that changed.
 
void FIGHTSTG_stepHpTween (HpTween *tween)
 Eases an HP number towards its target over its duration, along a sine.
 
void FIGHTSTG_showFighterNames (HpDisplay *task, TextWindow **windows)
 Shows the names of both sides' active fighters, when they changed.
 
void FIGHTSTG_drawHud (HpDisplay *task, TextWindow **windows)
 Draws the battle HUD: both HP bars, the technique gauge (full at 1000) and the fighters' icons.
 
void FIGHTSTG_updateHud (HpDisplay *task, TextWindow **windows)
 The battle HUD's task: makes its windows and starts the HP numbers at the fighters' HP, then each frame eases them and draws the HUD (FIGHTSTG_drawHud)
 
HpDisplay * FIGHTSTG_createHud (void)
 Creates the battle HUD (FIGHTSTG_updateHud)
 

Variables

DVECTOR FIGHTSTG_hpBars [2][4]
 FIGHTSTG_drawHud's HP bars, one row per side; the European version swaps side 1's ends, so that its bar shrinks toward its right end.
 
CVECTOR FIGHTSTG_hpBarColors [4]
 the bars' colours: above and at a quarter of the HP
 
DVECTOR FIGHTSTG_techGauge [4]
 the technique gauge, and its colours
 
CVECTOR FIGHTSTG_techGaugeColors [4]
 
s16 FIGHTSTG_iconX [2][3]
 the fighter icons' x, for each side and slot
 

Detailed Description

FIGHTSTG's HUD: the fighters' names, HP and MP bars and the technique gauge.

Definition in file hud.c.

Function Documentation

◆ FIGHTSTG_updateHpTweens()

void FIGHTSTG_updateHpTweens ( HpDisplay *  task,
TextWindow **  windows 
)

Every frame: the hp tween of a side whose active fighter changed jumps to that fighter's hp; every interval, a side's tween starts easing (30 frames) to its fighter's hp, clamped to 0 and the max hp, when that changed.

The match depends on a counter for each loop and the side's row of fighters.

Definition at line 9 of file hud.c.

Referenced by FIGHTSTG_updateHud().

Here is the caller graph for this function:

◆ FIGHTSTG_stepHpTween()

void FIGHTSTG_stepHpTween ( HpTween *  tween)

Eases an HP number towards its target over its duration, along a sine.

Definition at line 49 of file hud.c.

Referenced by FIGHTSTG_updateHud().

Here is the caller graph for this function:

◆ FIGHTSTG_showFighterNames()

void FIGHTSTG_showFighterNames ( HpDisplay *  task,
TextWindow **  windows 
)

Shows the names of both sides' active fighters, when they changed.

< the HUD, the menus and the messages

< the HUD, the menus and the messages

< DIGNAM

Definition at line 65 of file hud.c.

Referenced by FIGHTSTG_drawHud(), and FIGHTSTG_updateHud().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIGHTSTG_drawHud()

void FIGHTSTG_drawHud ( HpDisplay *  task,
TextWindow **  windows 
)

Draws the battle HUD: both HP bars, the technique gauge (full at 1000) and the fighters' icons.

< the HUD, the menus and the messages

< the HUD, the menus and the messages

< the HUD, the menus and the messages

< the HUD, the menus and the messages

< the HUD, the menus and the messages

< battle 0x144, the last one: its first enemy

Definition at line 124 of file hud.c.

Referenced by FIGHTSTG_updateHud().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIGHTSTG_updateHud()

void FIGHTSTG_updateHud ( HpDisplay *  task,
TextWindow **  windows 
)

The battle HUD's task: makes its windows and starts the HP numbers at the fighters' HP, then each frame eases them and draws the HUD (FIGHTSTG_drawHud)

< the HUD, the menus and the messages

< MFIGHT: WFIGHTMN's

< the HUD, the menus and the messages

< the HUD, the menus and the messages

Definition at line 226 of file hud.c.

Referenced by FIGHTSTG_createHud().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIGHTSTG_createHud()

HpDisplay * FIGHTSTG_createHud ( void  )

Creates the battle HUD (FIGHTSTG_updateHud)

Definition at line 273 of file hud.c.

Referenced by FIGHTSTG_updatePlayerTurn(), and runCommandMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ FIGHTSTG_hpBars

DVECTOR FIGHTSTG_hpBars[2][4]
Initial value:
= {
{ { 0xAF, 0x25 }, { 0x12F, 0x25 }, { 0xAF, 0x2B }, { 0x12F, 0x2B } },
{ { 0x8F, 0x25 }, { 0x0F, 0x25 }, { 0x8F, 0x2B }, { 0x0F, 0x2B } },
}

FIGHTSTG_drawHud's HP bars, one row per side; the European version swaps side 1's ends, so that its bar shrinks toward its right end.

FIGHTSTG_drawHud's HP bars.

Definition at line 97 of file hud.c.

Referenced by FIGHTSTG_drawHud().

◆ FIGHTSTG_hpBarColors

CVECTOR FIGHTSTG_hpBarColors[4]
Initial value:
= {
{ 0x00, 0x71, 0x28, 0x00 },
{ 0x00, 0xC8, 0x3E, 0x00 },
{ 0xB3, 0x37, 0x16, 0x00 },
{ 0xFF, 0x37, 0x0D, 0x00 },
}

the bars' colours: above and at a quarter of the HP

Definition at line 103 of file hud.c.

Referenced by FIGHTSTG_drawHud().

◆ FIGHTSTG_techGauge

DVECTOR FIGHTSTG_techGauge[4]
Initial value:
= {
{ 0x109, 0x3E }, { 0x131, 0x3E }, { 0x109, 0x46 }, { 0x131, 0x46 },
}

the technique gauge, and its colours

and its technique gauge

Definition at line 110 of file hud.c.

Referenced by FIGHTSTG_drawHud().

◆ FIGHTSTG_techGaugeColors

CVECTOR FIGHTSTG_techGaugeColors[4]
Initial value:
= {
{ 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
}

Definition at line 113 of file hud.c.

Referenced by FIGHTSTG_drawHud().

◆ FIGHTSTG_iconX

s16 FIGHTSTG_iconX[2][3]
Initial value:
= {
{ 0x010F, 0x011A, 0x0125 },
{ 0x0025, 0x001A, 0x000F },
}

the fighter icons' x, for each side and slot

Definition at line 117 of file hud.c.

Referenced by FIGHTSTG_drawHud().