Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
inn.c File Reference
#include "engine/game.h"
Include dependency graph for inn.c:

Go to the source code of this file.

Data Structures

struct  InnInfo
 One inn per game mode. More...
 

Enumerations

enum  InnSubstate {
  INN_OPEN_NAME , INN_OPEN_QUESTION , INN_SHOW_QUESTION , INN_CHOOSE ,
  INN_CLOSE_QUESTION = 10 , INN_WAIT_QUESTION_CLOSED , INN_WAIT_NAME_CLOSED , INN_PAY = 20 ,
  INN_SLEEP , INN_WAKE , INN_WAIT_AWAKE , INN_NO_MONEY = 30 ,
  INN_NO_MONEY_WAIT , INN_NO_MONEY_CLOSE
}
 updateInnMenu's substates: each group runs in order, by substate++ 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)
 
static void chooseInnAnswer (Inn *task, InnChildren *data)
 INN_CHOOSE: moves the cursor between yes and no; on yes pays if the party can, else shows the "not enough money" message; no or a cancel closes the question.
 
static void sleepAtInn (Inn *task, InnChildren *data)
 Under the fade: hides the panels and windows, pays the night and heals the party.
 
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 (Inn *task, 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.
 

Variables

InnInfo INNS []
 

Enumeration Type Documentation

◆ InnSubstate

updateInnMenu's substates: each group runs in order, by substate++

Enumerator
INN_OPEN_NAME 

the inn's name and the money

INN_OPEN_QUESTION 
INN_SHOW_QUESTION 

the price and yes/no

INN_CHOOSE 
INN_CLOSE_QUESTION 
INN_WAIT_QUESTION_CLOSED 
INN_WAIT_NAME_CLOSED 
INN_PAY 

the jingle and the fade to black

INN_SLEEP 

pay and heal behind the black screen

INN_WAKE 
INN_WAIT_AWAKE 
INN_NO_MONEY 

the "not enough money" message

INN_NO_MONEY_WAIT 
INN_NO_MONEY_CLOSE 

Definition at line 4 of file inn.c.

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:

◆ chooseInnAnswer()

static void chooseInnAnswer ( Inn *  task,
InnChildren *  data 
)
inlinestatic

INN_CHOOSE: moves the cursor between yes and no; on yes pays if the party can, else shows the "not enough money" message; no or a cancel closes the question.

< SYSTEM02: a cursor moves

< SYSTEM00: a choice is taken

< SYSTEM01

Definition at line 109 of file inn.c.

Referenced by updateInnMenu().

Here is the caller graph for this function:

◆ sleepAtInn()

static void sleepAtInn ( Inn *  task,
InnChildren *  data 
)
inlinestatic

Under the fade: hides the panels and windows, pays the night and heals the party.

Definition at line 140 of file inn.c.

Referenced by updateInnMenu().

Here is the call graph for this function:
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 ( Inn *  task,
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:

Variable Documentation

◆ INNS

InnInfo INNS[]
Initial value:
= {
{ 0x20A, 1, 8 },
{ 0x223, 2, 12 },
{ 0x22F, 3, 16 },
{ 0x238, 4, 32 },
{ 0x23F, 5, 36 },
{ 0x25B, 6, 48 },
{ 0x25D, 7, 44 },
{ 0x263, 8, 80 },
{ 0x26F, 9, 84 },
{ 0x26D, 10, 88 },
{ 0x279, 11, 52 },
{ 0x292, 2, 56 },
{ 0x29D, 12, 60 },
{ 0x2A5, 4, 68 },
{ 0x2AC, 13, 72 },
{ 0x2C4, 6, 80 },
{ 0x2C6, 14, 76 },
{ 0x2CB, 8, 84 },
{ 0x2D6, 15, 88 },
{ 0x249, 21, 44 },
{ 0x2B3, 21, 76 },
{ 0, 1, 1 },
}

Definition at line 82 of file inn.c.

Referenced by chooseInnAnswer(), sleepAtInn(), updateInn(), and updateInnMenu().