Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
stage_select.c File Reference
Include dependency graph for stage_select.c:

Go to the source code of this file.

Macros

#define CURSOR   STAGSLCT_STR_CURSOR
 ">": the European and Japanese overlays have junk in the byte that pads it, where GCC would put 0, so it is an array with its padding (at the end of the file)
 
#define PAD2_PRESSED(button)   ((PAD.getPressed(1) >> PAD.getButtonBit(1, button)) & 1)
 One button of pad 2 pressed, auto-repeated or held.
 
#define PAD2_REPEATED(button)   ((PAD.getRepeated(1) >> PAD.getButtonBit(1, button)) & 1)
 
#define PAD2_HELD(button)   ((PAD.getHeld(1) >> PAD.getButtonBit(1, button)) & 1)
 
#define SEPARATOR   "\x81\x5C\x81\x5C\x81\x5C\x81\x5C\x81\x5C\x81\x5C\x81\x5C\x81\x5C"
 The texts that repeat.
 
#define BLANK   "\x81\x40"
 " "
 
#define AMATERASU   "\x81\x7C\x81\x7C\x81\x7C\x81\x7C\x81\x7C\x81\x7C\x83\x41\x83\x7D\x83\x65\x83\x89\x83\x58"
 "------アマテラス"
 
#define STAGE_SELECT   "\x83\x58\x83\x65\x81\x5B\x83\x57\x83\x5A\x83\x8C\x83\x4E\x83\x67"
 "ステージセレクト"
 
#define NO_DISC   "\x82\xA2\x82\xBD\x82\xAA\x82\xC8\x82\xA2\x82\xC6\x82\xA4\x82\xB2\x82\xAB\x82\xDC\x82\xB9\x82\xF1"
 "いたがないとうごきません"
 

Functions

void STAGSLCT_updateScene (Task *task, Task **items)
 The stage select's root task: starts the stage select.
 
Task * STAGSLCT_start (void)
 Creates the stage select's root task.
 
void STAGSLCT_moveCursor (StageSelect *sel, s32 delta)
 Moves the cursor by delta to the next line with a scene, scrolling the list at its ends; it stays where it was when there is none.
 
void STAGSLCT_scrollPage (StageSelect *sel, s32 delta)
 Scrolls the list by delta lines, within its ends.
 
void STAGSLCT_showBiosVersion (StageSelect *sel, StageSelectWindows *win)
 Shows the console's BIOS version, read from its ROM once and turned into full-width characters.
 
void STAGSLCT_zoomTitle (StageSelect *sel, StageSelectWindows *win)
 Select zooms the title in or out; it then scales in 15 frames.
 
static void editProgress (StageSelectWindows *win)
 Pad 1's R2 and L2 step GAME.progress down and up (0x8000 counts as 0)
 
static void editParty (StageSelectWindows *win)
 Pad 2's L1/R1 and L2/R2 change the party's levels and charisma (by 10 when repeating); shows party member 0's.
 
static void editBattleDebug (StageSelectWindows *win)
 Pad 2's up/down and right/left change BATTLE_SETUP.debugUpDown and debugLeftRight, shown while not -1.
 
static void STAGSLCT_startStageSelect (StageSelect *sel, StageSelectWindows *win)
 Sets up the screen and the list's windows, at the entry the stage select was left on.
 
void STAGSLCT_updateStageSelect (Task *task, StageSelectWindows *win)
 The stage select.
 
Task * STAGSLCT_createStageSelect (void)
 Creates the stage select.
 

Variables

char * STAGSLCT_regionNames [7]
 "JPN", "USA", "ENG", "FRA", "ITA", "GER", "SPN": the USA version shows the second, the European one the language's, the Japanese one the first
 
StageSelectEntry STAGSLCT_entries []
 Each line's name and title, scene and argument.
 
RECT STAGSLCT_screenRect = {0, 0, 320 , 240 }
 
u16 STAGSLCT_biosVersion [10] = {0}
 
u16 STAGSLCT_biosVersionEnd = 0
 
const char STAGSLCT_STR_CURSOR [4] = "\x81\x84\0\x39"
 ">" and its padding
 

Macro Definition Documentation

◆ CURSOR

#define CURSOR   STAGSLCT_STR_CURSOR

">": the European and Japanese overlays have junk in the byte that pads it, where GCC would put 0, so it is an array with its padding (at the end of the file)

Definition at line 7 of file stage_select.c.

◆ PAD2_PRESSED

#define PAD2_PRESSED (   button)    ((PAD.getPressed(1) >> PAD.getButtonBit(1, button)) & 1)

One button of pad 2 pressed, auto-repeated or held.

Definition at line 13 of file stage_select.c.

◆ PAD2_REPEATED

#define PAD2_REPEATED (   button)    ((PAD.getRepeated(1) >> PAD.getButtonBit(1, button)) & 1)

Definition at line 14 of file stage_select.c.

◆ PAD2_HELD

#define PAD2_HELD (   button)    ((PAD.getHeld(1) >> PAD.getButtonBit(1, button)) & 1)

Definition at line 15 of file stage_select.c.

◆ SEPARATOR

#define SEPARATOR   "\x81\x5C\x81\x5C\x81\x5C\x81\x5C\x81\x5C\x81\x5C\x81\x5C\x81\x5C"

The texts that repeat.

Shift-JIS, as the game's texts; each table's texts are in the rodata in reverse order, as GCC outputs them. "――――――――"

Definition at line 19 of file stage_select.c.

◆ BLANK

#define BLANK   "\x81\x40"

" "

Definition at line 20 of file stage_select.c.

◆ AMATERASU

#define AMATERASU   "\x81\x7C\x81\x7C\x81\x7C\x81\x7C\x81\x7C\x81\x7C\x83\x41\x83\x7D\x83\x65\x83\x89\x83\x58"

"------アマテラス"

Definition at line 21 of file stage_select.c.

◆ STAGE_SELECT

#define STAGE_SELECT   "\x83\x58\x83\x65\x81\x5B\x83\x57\x83\x5A\x83\x8C\x83\x4E\x83\x67"

"ステージセレクト"

Definition at line 22 of file stage_select.c.

◆ NO_DISC

#define NO_DISC   "\x82\xA2\x82\xBD\x82\xAA\x82\xC8\x82\xA2\x82\xC6\x82\xA4\x82\xB2\x82\xAB\x82\xDC\x82\xB9\x82\xF1"

"いたがないとうごきません"

Definition at line 23 of file stage_select.c.

Function Documentation

◆ STAGSLCT_updateScene()

void STAGSLCT_updateScene ( Task *  task,
Task **  items 
)

The stage select's root task: starts the stage select.

Definition at line 741 of file stage_select.c.

Referenced by STAGSLCT_start().

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

◆ STAGSLCT_start()

Task * STAGSLCT_start ( void  )

Creates the stage select's root task.

Definition at line 756 of file stage_select.c.

Here is the call graph for this function:

◆ STAGSLCT_moveCursor()

void STAGSLCT_moveCursor ( StageSelect *  sel,
s32  delta 
)

Moves the cursor by delta to the next line with a scene, scrolling the list at its ends; it stays where it was when there is none.

Definition at line 762 of file stage_select.c.

Referenced by STAGSLCT_updateStageSelect().

Here is the caller graph for this function:

◆ STAGSLCT_scrollPage()

void STAGSLCT_scrollPage ( StageSelect *  sel,
s32  delta 
)

Scrolls the list by delta lines, within its ends.

Definition at line 792 of file stage_select.c.

Referenced by STAGSLCT_updateStageSelect().

Here is the caller graph for this function:

◆ STAGSLCT_showBiosVersion()

void STAGSLCT_showBiosVersion ( StageSelect *  sel,
StageSelectWindows *  win 
)

Shows the console's BIOS version, read from its ROM once and turned into full-width characters.

Definition at line 805 of file stage_select.c.

Referenced by STAGSLCT_updateStageSelect().

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

◆ STAGSLCT_zoomTitle()

void STAGSLCT_zoomTitle ( StageSelect *  sel,
StageSelectWindows *  win 
)

Select zooms the title in or out; it then scales in 15 frames.

Definition at line 850 of file stage_select.c.

◆ editProgress()

static void editProgress ( StageSelectWindows *  win)
inlinestatic

Pad 1's R2 and L2 step GAME.progress down and up (0x8000 counts as 0)

Definition at line 875 of file stage_select.c.

Referenced by STAGSLCT_updateStageSelect().

Here is the caller graph for this function:

◆ editParty()

static void editParty ( StageSelectWindows *  win)
inlinestatic

Pad 2's L1/R1 and L2/R2 change the party's levels and charisma (by 10 when repeating); shows party member 0's.

Definition at line 895 of file stage_select.c.

Referenced by STAGSLCT_updateStageSelect().

Here is the caller graph for this function:

◆ editBattleDebug()

static void editBattleDebug ( StageSelectWindows *  win)
inlinestatic

Pad 2's up/down and right/left change BATTLE_SETUP.debugUpDown and debugLeftRight, shown while not -1.

Definition at line 956 of file stage_select.c.

Referenced by STAGSLCT_updateStageSelect().

Here is the caller graph for this function:

◆ STAGSLCT_startStageSelect()

static void STAGSLCT_startStageSelect ( StageSelect *  sel,
StageSelectWindows *  win 
)
inlinestatic

Sets up the screen and the list's windows, at the entry the stage select was left on.

Definition at line 990 of file stage_select.c.

Referenced by STAGSLCT_updateStageSelect().

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

◆ STAGSLCT_updateStageSelect()

void STAGSLCT_updateStageSelect ( Task *  task,
StageSelectWindows *  win 
)

The stage select.

Pad 1 moves the cursor (up/down), turns pages (L1/R1), toggles BATTLE_SETUP.randomBattles (Select), starts the entry (Cross: scene 0x300 only sets GAME.progress) and, in the European version, cycles the language (Start); L2/R2 change GAME.progress. Pad 2 changes the party's levels (L1/R1) and charisma (L2/R2), and BATTLE_SETUP.debugUpDown (up/down) and debugLeftRight (right/left). TASK_KILL goes to the scene.

< "ステージセレクト"

Definition at line 1038 of file stage_select.c.

Referenced by STAGSLCT_createStageSelect().

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

◆ STAGSLCT_createStageSelect()

Task * STAGSLCT_createStageSelect ( void  )

Creates the stage select.

Definition at line 1127 of file stage_select.c.

Referenced by STAGSLCT_updateScene().

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

Variable Documentation

◆ STAGSLCT_regionNames

char* STAGSLCT_regionNames[7]
Initial value:
= {
"\x82\x69\x82\x6F\x82\x6D",
"\x82\x74\x82\x72\x82\x60",
"\x82\x64\x82\x6D\x82\x66",
"\x82\x65\x82\x71\x82\x60",
"\x82\x68\x82\x73\x82\x60",
"\x82\x66\x82\x64\x82\x71",
"\x82\x72\x82\x6F\x82\x6D",
}

"JPN", "USA", "ENG", "FRA", "ITA", "GER", "SPN": the USA version shows the second, the European one the language's, the Japanese one the first

Definition at line 28 of file stage_select.c.

Referenced by STAGSLCT_updateStageSelect().

◆ STAGSLCT_entries

StageSelectEntry STAGSLCT_entries[]

Each line's name and title, scene and argument.

Definition at line 39 of file stage_select.c.

Referenced by STAGSLCT_moveCursor(), STAGSLCT_startStageSelect(), and STAGSLCT_updateStageSelect().

◆ STAGSLCT_screenRect

RECT STAGSLCT_screenRect = {0, 0, 320 , 240 }

Definition at line 736 of file stage_select.c.

Referenced by STAGSLCT_startStageSelect().

◆ STAGSLCT_biosVersion

u16 STAGSLCT_biosVersion[10] = {0}

Definition at line 737 of file stage_select.c.

Referenced by STAGSLCT_showBiosVersion().

◆ STAGSLCT_biosVersionEnd

u16 STAGSLCT_biosVersionEnd = 0

Definition at line 738 of file stage_select.c.

Referenced by STAGSLCT_showBiosVersion().

◆ STAGSLCT_STR_CURSOR

const char STAGSLCT_STR_CURSOR[4] = "\x81\x84\0\x39"

">" and its padding

">" with its padding

Definition at line 1132 of file stage_select.c.