Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
partner_name.h
Go to the documentation of this file.
1#ifndef STDGNAME_H
2#define STDGNAME_H
3
4/* STDGNAME.PRO: the screen where the partners are renamed. Its modules are
5 in src/menus/partner_name/, and the functions below are by module, in the order they
6 link. */
7
8/* The name of this overlay's copy of a function or type of src/shared/ */
9#define OVL_NAME(name) STDGNAME_##name
10
11/* The overlay's NameEntry and the name entry's files (name_entry.h) */
12#define NAME_ENTRY_HAS_UNUSED98 1
13#define NAME_ENTRY_HAS_HIDE 0
14#define NAME_ENTRY_SPRITES STDGNAME_KEY_SPRITES
15#define NAME_ENTRY_FILE_KEYBOARD STDGNAME_FILE_KEYBOARD
16#include "shared/name_entry.h"
17
18/* The screen's files: the discs number them differently */
19#if VERSION_US || VERSION_JP
20#define STDGNAME_FILE_SPRITES 0x279
21#define STDGNAME_FILE_IMAGES 0x27A
22#define STDGNAME_FILE_KEYBOARD 0x762
23#define STDGNAME_FILE_KEY_SPRITES 0x761
24#elif VERSION_EU
25#define STDGNAME_FILE_SPRITES 0x288
26#define STDGNAME_FILE_IMAGES 0x289
27#define STDGNAME_FILE_KEYBOARD 0x771
28#define STDGNAME_FILE_KEY_SPRITES 0x770
29#endif
30#define STDGNAME_SPRITES (STDGNAME_FILE_SPRITES << 16) /* sprite bank */
31#define STDGNAME_KEY_SPRITES (STDGNAME_FILE_KEY_SPRITES << 16) /* the keyboard's and partners' sprites */
32
33/* Where a window of the partner menu goes, and its text */
34typedef struct MenuWindow {
35 /* 0x0 */ s32 text;
36 /* 0x4 */ s32 x;
37 /* 0x8 */ s32 y;
39
40struct ScreenTask;
41
42/* A sprite of the partner menu, that opens by scaling */
43typedef struct MenuSprite {
44 /* 0x00 */ s32 sprite; /* -1 ends the list */
45 /* 0x04 */ s32 pad; /* 10, or 5 for the last: never read */
46 /* 0x08 */ s32 x;
47 /* 0x0C */ s32 y;
48 /* 0x10 */ s32 pivotX;
49 /* 0x14 */ s32 pivotY;
50 /* 0x18 */ s32 vertical;
52
53typedef struct MenuSlot {
54 /* 0x0 */ s32 x;
55 /* 0x4 */ s32 y;
56 /* 0x8 */ s32 pivotX;
57 /* 0xC */ s32 pivotY;
58} MenuSlot;
59
60/* A partner's animation in the partner menu */
61typedef struct MenuAnim {
62 /* 0x0 */ s32 frame;
63 /* 0x4 */ s32 time;
64} MenuAnim;
65
66/* The partner menu */
67typedef struct PartnerMenuTask {
69 /* 0x50 */ struct ScreenTask *screen;
70 /* 0x54 */ s32 layer;
71 /* 0x58 */ s32 cursorClut;
72 /* 0x5C */ MenuAnim anims[3];
73 /* 0x74 */ s32 pad; /* never read or written */
74 /* 0x78 */ s32 partyCount;
75 /* 0x7C */ s32 titleClut;
76 /* 0x80 */ PanelAnim tweens[6];
78
79typedef struct ScreenChildren {
81 /* 0x4 */ NameEntry *name;
82 /* 0x8 */ ScreenFade *fade;
83 /* 0xC */ Task *awaited; /* never set: the screen would wait in TASK_DONE until it ends */
85
86/* The screen's controller */
87typedef struct ScreenTask {
89 /* 0x50 */ s32 layer;
90 /* 0x54 */ s32 pad54; /* never read or written */
91 /* 0x58 */ s32 bgScroll;
92 /* 0x5C */ s32 bgTick;
93 /* 0x60 */ s32 choice;
94 /* 0x64 */ s32 pad64; /* never read or written */
95 /* 0x68 */ void (*fadeOut)(struct ScreenTask *task);
97
98typedef struct ScreenFuncs {
99 /* 0x00 */ TextStyle *style;
100 /* 0x04 */ s32 partner;
101 /* 0x08 */ void (*loadFiles)(void);
102 /* 0x0C */ s32 (*isLoading)(void);
103 /* 0x10 */ void (*startFade)(PanelAnim *fade, s32 fadeIn);
104 /* 0x14 */ s32 (*updateFade)(PanelAnim *fade);
106
107/* STDGNAME's data (data/stdgname.c) */
110extern s32 STDGNAME_nameAnims[][7];
111extern BigKey STDGNAME_bigKeys[];
115/* the keyboard of language 0, three pages (only the European version uses it) */
121extern s32 STDGNAME_menuAnims[][7];
124
125/* scene.c */
126void STDGNAME_updateScene(Task *task, ScreenTask **screen);
127void STDGNAME_startFader(ScreenFade *task, s32 fadeIn, s32 duration);
131
132/* name_entry.c */
141void STDGNAME_setName(NameEntry *task, char *name);
142void STDGNAME_getName(NameEntry *task, char *out);
144NameEntry *STDGNAME_createNameEntry(char *name, s32 partner);
145
146/* menu.c */
147void STDGNAME_showMenuWindow(PartnerMenuTask *task, TextWindow **window, s32 index, s32 show);
148void STDGNAME_drawMenu(PartnerMenuTask *task, TextWindow **windows);
150void STDGNAME_updateMenu(PartnerMenuTask *task, TextWindow **windows);
152
153/* screen.c */
154void STDGNAME_stepScreen(ScreenTask *task, ScreenChildren *children);
156void STDGNAME_updateScreen(ScreenTask *task, ScreenChildren *children);
159void STDGNAME_loadFiles(void);
161void STDGNAME_startFade(PanelAnim *fade, s32 fadeIn);
163
164#endif /* STDGNAME_H */
signed int s32
Definition common.h:11
#define TASK_HEADER(Type)
Definition task.h:39
The on-screen keyboard that the overlays use to type a name (STCRDDEK's deck names,...
ScreenTask * STDGNAME_createScreen(void)
Creates the renaming screen (task)
Definition screen.c:121
void STDGNAME_stepScreen(ScreenTask *task, ScreenChildren *children)
screen.c
Definition screen.c:9
s32 STDGNAME_nameAnims[][7]
Definition stdgname.c:598
void STDGNAME_drawBackground(ScreenTask *task)
Draws the screen's background and its scrolling pattern.
Definition screen.c:59
s32 STDGNAME_updateFade(PanelAnim *fade)
void STDGNAME_getName(NameEntry *task, char *out)
void STDGNAME_setName(NameEntry *task, char *name)
KeyTabs STDGNAME_keyPagesJp[]
the keyboard of language 0, three pages (only the European version uses it)
Definition stdgname.c:541
TextStyle STDGNAME_nameStyle
Definition stdgname.c:592
void STDGNAME_updateNameEntry(NameEntry *task, NameEntryWindows *windows)
MenuWindow STDGNAME_menuWindows[]
Definition stdgname.c:631
void STDGNAME_showNameWindows(NameEntry *task, NameEntryWindows *windows, s32 show)
void STDGNAME_createNameWindows(NameEntry *task, NameEntryWindows *windows)
MenuSprite STDGNAME_menuSprites[]
The partner menu: its sprites, the partners' slots (one under the other, 43 pixels apart),...
Definition stdgname.c:616
void STDGNAME_updateMenu(PartnerMenuTask *task, TextWindow **windows)
The partner menu's task: opens its panels, then each partner's slot and name one after the other,...
Definition menu.c:141
void STDGNAME_fadeOutScreen(ScreenTask *task)
Fades the screen out over 30 frames (task->fadeOut), to leave it.
Definition screen.c:112
void STDGNAME_setNameVram(NameEntry *task, s32 x, s32 y)
BigKey STDGNAME_bigKeys[]
Definition stdgname.c:605
ScreenFuncs STDGNAME_funcs
style: the text style of the partners' names in the menu (STDGNAME_showMenuWindow)
Definition stdgname.c:646
void STDGNAME_drawFader(ScreenFade *task)
s32 STDGNAME_menuAnims[][7]
Definition stdgname.c:638
void STDGNAME_startFade(PanelAnim *fade, s32 fadeIn)
PartnerMenuTask * STDGNAME_createMenu(ScreenTask *screen)
Creates the partner menu (task) to pick the partner to rename.
Definition menu.c:223
ScreenFade * STDGNAME_createFader(void)
TextStyle STDGNAME_menuStyle
Definition stdgname.c:1184
s32 STDGNAME_filesLoading(void)
Whether the keyboard or the strings are still loading.
Definition screen.c:144
void STDGNAME_showMenuWindow(PartnerMenuTask *task, TextWindow **window, s32 index, s32 show)
menu.c
Definition menu.c:7
void STDGNAME_drawKeyboard(NameEntry *task)
void STDGNAME_updateKeyboard(NameEntry *task, NameEntryWindows *windows)
void STDGNAME_startFader(ScreenFade *task, s32 fadeIn, s32 duration)
void STDGNAME_drawMenu(PartnerMenuTask *task, TextWindow **windows)
Draws the partner menu, its parts opening by scaling: its three sprites (the one at the chosen partne...
Definition menu.c:35
s32 STDGNAME_keyArrowCluts[]
Definition stdgname.c:609
void STDGNAME_updateScreen(ScreenTask *task, ScreenChildren *children)
The renaming screen's task: loads its files, then runs the screen and draws the background; goes back...
Definition screen.c:78
void STDGNAME_updateFader(ScreenFade *task)
KeyPage STDGNAME_keyCharsJp[]
Definition stdgname.c:546
NameKeyboard STDGNAME_keyboard
STDGNAME's data (data/stdgname.c)
Definition stdgname.c:1190
void STDGNAME_closeNameEntry(NameEntry *task)
s32 STDGNAME_updateTween(PanelAnim *fade)
void STDGNAME_loadFiles(void)
Loads the screen's textures and requests the keyboard and the strings; the chosen partner goes back t...
Definition screen.c:131
void STDGNAME_startTween(PanelAnim *fade, s32 fadeIn)
name_entry.c
NameEntry * STDGNAME_createNameEntry(char *name, s32 partner)
Creates the name entry (task) for a partner, starting from the name given; up to 8 characters (5 in l...
Definition name_entry.c:22
s32 STDGNAME_runMenu(PartnerMenuTask *task, TextWindow **windows)
Up/down choose a partner; cross picks it to rename, triangle leaves the screen (choice -1,...
Definition menu.c:112
KeyPage STDGNAME_keyChars[]
Definition stdgname.c:580
MenuSlot STDGNAME_menuSlots[]
Definition stdgname.c:627
KeyTabs STDGNAME_keyPages[]
Definition stdgname.c:576
void STDGNAME_updateScene(Task *task, ScreenTask **screen)
scene.c
Definition scene.c:7
A key of the keyboard bigger than one cell: its sprite and where it goes.
Definition name_entry.h:45
A page of the keyboard: 7 rows of 15 cells.
Definition name_entry.h:58
The texts of a keyboard page's three tabs.
Definition name_entry.h:63
A partner's animation in the partner menu.
A sprite of the partner menu, that opens by scaling.
s32 sprite
-1 ends the list
s32 pad
10, or 5 for the last: never read
Where a window of the partner menu goes, and its text.
A name entry: the keyboard, the name typed so far and the panels that open and close.
Definition name_entry.h:95
The character pages of the keyboard (as STDGNAME's and STPLNMET's)
Definition name_entry.h:68
Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed),...
Definition menu.h:18
The partner menu.
struct ScreenTask * screen
s32 pad
never read or written
PanelAnim tweens[6]
MenuAnim anims[3]
NameEntry * name
Task * awaited
never set: the screen would wait in TASK_DONE until it ends
PartnerMenuTask * menu
ScreenFade * fade
Fades the whole screen to black and back with a subtractive rectangle.
Definition gfx.h:361
s32(* isLoading)(void)
void(* startFade)(PanelAnim *fade, s32 fadeIn)
s32(* updateFade)(PanelAnim *fade)
void(* loadFiles)(void)
TextStyle * style
The screen's controller.
s32 pad64
never read or written
void(* fadeOut)(struct ScreenTask *task)
s32 pad54
never read or written
Any task, seen through its header.
Definition task.h:62
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
Definition text.h:131