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

The inn and the field menu (menu/) More...

#include "common.h"
#include <sys/types.h>
#include <libgte.h>
#include <libgpu.h>
#include "engine/task.h"
#include "engine/gfx.h"
#include "engine/text.h"
Include dependency graph for menu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PanelAnim
 Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed), and the panel is drawn scaled by it. More...
 
struct  MenuLerp
 Moves a value towards a target in fixed point, as the menu overlays' startLerp and updateLerp do. More...
 
struct  ScrollBar
 A vertical scroll bar, as the menu overlays (STSTATUS, STGDGLAB) draw one. More...
 
struct  Inn
 The inn: pay INNS[inn].price per party member to restore HP, MP and status, with a fade to black and a jingle. More...
 
struct  InnChildren
 
struct  PartnerPage
 One party member in the field menu: name and five stats. More...
 
struct  FieldMenuWindows
 The children of the field menu. More...
 
struct  WindowPos
 Where a window goes, and the string it shows. More...
 
struct  FieldMenu
 The menu opened on the field: the three party members' pages, a list of options (FIELD_MENU_OPTIONS, one more when the player has item 0x192) and the money. More...
 
struct  FieldMenuChoice
 What the field menu picked, for STSTATUS (MODE_STATUS) More...
 

Functions

void innStartPanel (PanelAnim *panel, s32 open)
 Starts opening or closing a menu panel, with its sound.
 
s32 innUpdatePanel (PanelAnim *panel)
 Moves a panel's level one frame on; 1 once it is fully open or closed.
 
void healParty (void)
 Restores HP, MP and status of the party (the inn)
 
void updateInnMenu (Inn *task, InnChildren *data)
 The inn's menu (INN_*): open the panels and ask (price x party size), then close, pay and sleep, or show the "not enough money" message.
 
void updateInn (struct Inn *task, struct InnChildren *data)
 The inn task: creates its windows, then runs the menu and draws the panels at their levels.
 
Inn * createInn (s32 layerId)
 Starts the inn of the current game mode on a layer.
 
void startPanel (PanelAnim *panel, s32 open)
 Starts opening (open != 0) or closing a panel.
 
s32 updatePanel (PanelAnim *panel)
 Advances a panel animation; 1 once it has finished.
 
void createFieldMenuWindows (FieldMenu *task, FieldMenuWindows *win)
 Creates the field menu's windows: the title, the options, the cursor, the money and the pages.
 
void showPartnerPage (void *menu, FieldMenuWindows *win, s32 page, s32 show)
 Fills a party member's page of the field menu (name and five stats), or hides it.
 
s32 getFieldZone (void)
 The field's stages by mode: -1 from MODE_NEW_GAME (where the field menu greys out option 2), 1 from 0x270, else 0.
 
void updateFieldMenu (FieldMenu *task, FieldMenuWindows *win)
 Runs the field menu: opens its panels, moves the cursor and switches mode on a choice.
 
FieldMenu * createFieldMenu (s32 layerId, s32 cursor)
 Opens the field menu on a layer with the cursor on an option.
 

Variables

FieldMenuChoice FIELD_MENU_CHOICE
 menu/field_menu.c's
 

Detailed Description

The inn and the field menu (menu/)

Definition in file menu.h.

Function Documentation

◆ innStartPanel()

void innStartPanel ( PanelAnim *  panel,
s32  open 
)

Starts opening or closing a menu panel, with its sound.

< SYSTEM03

< GTE regards 4096 as 1.0

< SYSTEM04

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

Definition at line 22 of file inn.c.

Referenced by updateInnMenu().

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

◆ innUpdatePanel()

s32 innUpdatePanel ( PanelAnim *  panel)

Moves a panel's level one frame on; 1 once it is fully open or closed.

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

Definition at line 36 of file inn.c.

Referenced by updateInnMenu().

Here is the caller graph for this function:

◆ healParty()

void healParty ( void  )

Restores HP, MP and status of the party (the inn)

Definition at line 56 of file inn.c.

Referenced by sleepAtInn().

Here is the caller graph for this function:

◆ updateInnMenu()

void updateInnMenu ( Inn *  task,
InnChildren *  data 
)

The inn's menu (INN_*): open the panels and ask (price x party size), then close, pay and sleep, or show the "not enough money" message.

< HTLNAM

< HTLNAM

< HTLNAM

< HTLNAM

< HTLNAM

< JINGLE04: a night at the inn

< HTLNAM

< SYSTEM07

Definition at line 158 of file inn.c.

Referenced by updateInn().

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

◆ updateInn()

void updateInn ( struct Inn *  task,
struct InnChildren *  data 
)

The inn task: creates its windows, then runs the menu and draws the panels at their levels.

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

Definition at line 266 of file inn.c.

Referenced by createInn().

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

◆ createInn()

Inn * createInn ( s32  layerId)

Starts the inn of the current game mode on a layer.

Definition at line 343 of file inn.c.

Referenced by FIELDSTG_openInn().

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

◆ startPanel()

void startPanel ( PanelAnim *  panel,
s32  open 
)

Starts opening (open != 0) or closing a panel.

< SYSTEM03

< GTE regards 4096 as 1.0

< SYSTEM04

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

Definition at line 7 of file field_menu.c.

Referenced by chooseFieldMenuOption(), and openFieldMenu().

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

◆ updatePanel()

s32 updatePanel ( PanelAnim *  panel)

Advances a panel animation; 1 once it has finished.

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

Definition at line 21 of file field_menu.c.

Referenced by updateFieldMenu().

Here is the caller graph for this function:

◆ createFieldMenuWindows()

void createFieldMenuWindows ( FieldMenu *  task,
FieldMenuWindows *  win 
)

Creates the field menu's windows: the title, the options, the cursor, the money and the pages.

Definition at line 59 of file field_menu.c.

Referenced by openFieldMenu().

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

◆ showPartnerPage()

void showPartnerPage ( void *  menu,
FieldMenuWindows *  win,
s32  page,
s32  show 
)

Fills a party member's page of the field menu (name and five stats), or hides it.

< STATUS: the field menu's and STSTATUS's

< STATUS: the field menu's and STSTATUS's

< STATUS: the field menu's and STSTATUS's

Definition at line 87 of file field_menu.c.

Referenced by chooseFieldMenuOption(), showFieldMenuMoney(), showFieldMenuOptions(), and updateFieldMenu().

Here is the caller graph for this function:

◆ getFieldZone()

s32 getFieldZone ( void  )

The field's stages by mode: -1 from MODE_NEW_GAME (where the field menu greys out option 2), 1 from 0x270, else 0.

< STSTATUS: the field menu's screens (FIELD_MENU_CHOICE)

< FIELDSTG, where a new game starts

Definition at line 124 of file field_menu.c.

Referenced by openFieldMenu().

Here is the caller graph for this function:

◆ updateFieldMenu()

void updateFieldMenu ( FieldMenu *  task,
FieldMenuWindows *  win 
)

Runs the field menu: opens its panels, moves the cursor and switches mode on a choice.

< STATUS: the field menu's and STSTATUS's

< SYSTEM03

< SYSTEM04

< SYSTEM04

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

Definition at line 324 of file field_menu.c.

Referenced by createFieldMenu().

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

◆ createFieldMenu()

FieldMenu * createFieldMenu ( s32  layerId,
s32  cursor 
)

Opens the field menu on a layer with the cursor on an option.

Definition at line 426 of file field_menu.c.

Referenced by openFieldMenu(), and STSTATUS_runScreens().

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

Variable Documentation

◆ FIELD_MENU_CHOICE

FieldMenuChoice FIELD_MENU_CHOICE
extern