Merge pull request #1125 from GriffinRichards/doc-namingscr
Document naming screen
This commit is contained in:
@@ -102,6 +102,7 @@
|
||||
#define TEST_BUTTON(field, button) ({(field) & (button);})
|
||||
#define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button)
|
||||
#define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button)
|
||||
#define JOY_REPEAT(button) TEST_BUTTON(gMain.newAndRepeatedKeys, button)
|
||||
|
||||
#define S16TOPOSFLOAT(val) \
|
||||
({ \
|
||||
|
||||
@@ -4069,16 +4069,16 @@ extern const u8 gHealthboxElementsGfxTable[][32];
|
||||
|
||||
extern const u16 gNamingScreenMenu_Pal[];
|
||||
extern const u32 gNamingScreenMenu_Gfx[];
|
||||
extern const u32 gUnknown_08DD4544[];
|
||||
extern const u8 gUnknown_08DD4620[];
|
||||
extern const u8 gUnknown_08DD46E0[];
|
||||
extern const u8 gUnknown_08DD47A0[];
|
||||
extern const u32 gNamingScreenBackground_Tilemap[];
|
||||
extern const u8 gNamingScreenKeyboardUpper_Tilemap[];
|
||||
extern const u8 gNamingScreenKeyboardLower_Tilemap[];
|
||||
extern const u8 gNamingScreenKeyboardSymbols_Tilemap[];
|
||||
extern const u8 gNamingScreenRWindow_Gfx[];
|
||||
extern const u8 gNamingScreenKeyboardButton_Gfx[];
|
||||
extern const u8 gNamingScreenPageButton_Gfx[];
|
||||
extern const u8 gNamingScreenROptions_Gfx[];
|
||||
extern const u8 gNamingScreenCursor_Gfx[];
|
||||
extern const u8 gNamingScreenRightPointingTriangleTiles[];
|
||||
extern const u8 gNamingScreenUnderscoreTiles[];
|
||||
extern const u8 gNamingScreenInputArrow_Gfx[];
|
||||
extern const u8 gNamingScreenUnderscore_Gfx[];
|
||||
|
||||
extern const u32 gUnknown_08D9BA44[];
|
||||
|
||||
|
||||
@@ -3,91 +3,14 @@
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define KBEVENT_NONE 0
|
||||
#define KBEVENT_PRESSED_A 5
|
||||
#define KBEVENT_PRESSED_B 6
|
||||
#define KBEVENT_PRESSED_SELECT 8
|
||||
#define KBEVENT_PRESSED_START 9
|
||||
|
||||
#define KBROW_COUNT 4
|
||||
|
||||
enum
|
||||
{
|
||||
KBPAGE_LETTERS_LOWER,
|
||||
KBPAGE_LETTERS_UPPER,
|
||||
KBPAGE_SYMBOLS,
|
||||
KBPAGE_COUNT,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
NAMING_SCREEN_PLAYER,
|
||||
NAMING_SCREEN_BOX,
|
||||
NAMING_SCREEN_CAUGHT_MON,
|
||||
NAMING_SCREEN_3,
|
||||
NAMING_SCREEN_NICKNAME,
|
||||
NAMING_SCREEN_WALDA,
|
||||
};
|
||||
|
||||
struct NamingScreenTemplate
|
||||
{
|
||||
u8 copyExistingString;
|
||||
u8 maxChars;
|
||||
u8 iconFunction;
|
||||
u8 addGenderIcon;
|
||||
u8 initialPage;
|
||||
u8 unused;
|
||||
const u8 *title;
|
||||
};
|
||||
|
||||
struct NamingScreenData {
|
||||
/*0x0*/ u8 tilemapBuffer1[0x800];
|
||||
/*0x800*/ u8 tilemapBuffer2[0x800];
|
||||
/*0x800*/ u8 tilemapBuffer3[0x800];
|
||||
/*0x1800*/ u8 textBuffer[0x10];
|
||||
/*0x1810*/ u8 tileBuffer[0x600];
|
||||
/*0x1E10*/ u8 state;
|
||||
/*0x1E11*/ u8 windows[5];
|
||||
/*0x1E16*/ u16 inputCharBaseXPos;
|
||||
/*0x1E18*/ u16 bg1vOffset;
|
||||
/*0x1E1A*/ u16 bg2vOffset;
|
||||
/*0x1E1C*/ u16 bg1Priority;
|
||||
/*0x1E1E*/ u16 bg2Priority;
|
||||
/*0x1E20*/ u8 bgToReveal;
|
||||
/*0x1E21*/ u8 bgToHide;
|
||||
/*0x1E22*/ u8 currentPage;
|
||||
/*0x1E23*/ u8 cursorSpriteId;
|
||||
/*0x1E24*/ u8 selectBtnFrameSpriteId;
|
||||
/*0x1E25*/ u8 keyRepeatStartDelayCopy;
|
||||
/*0x1E28*/ const struct NamingScreenTemplate *template;
|
||||
/*0x1E2C*/ u8 templateNum;
|
||||
/*0x1E30*/ u8 *destBuffer;
|
||||
/*0x1E34*/ u16 monSpecies;
|
||||
/*0x1E36*/ u16 monGender;
|
||||
/*0x1E38*/ u32 monPersonality;
|
||||
/*0x1E3C*/ MainCallback returnCallback;
|
||||
};
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
MAIN_STATE_BEGIN_FADE_IN,
|
||||
MAIN_STATE_WAIT_FADE_IN,
|
||||
MAIN_STATE_HANDLE_INPUT,
|
||||
MAIN_STATE_MOVE_TO_OK_BUTTON,
|
||||
MAIN_STATE_START_PAGE_SWAP,
|
||||
MAIN_STATE_WAIT_PAGE_SWAP,
|
||||
MAIN_STATE_6,
|
||||
MAIN_STATE_UPDATE_SENT_TO_PC_MESSAGE,
|
||||
MAIN_STATE_BEGIN_FADE_OUT,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
INPUT_STATE_DISABLED,
|
||||
INPUT_STATE_ENABLED,
|
||||
INPUT_STATE_2,
|
||||
};
|
||||
|
||||
void DoNamingScreen(u8 templateNum, u8 *destBuffer, u16 monSpecies, u16 monGender, u32 monPersonality, MainCallback returnCallback);
|
||||
|
||||
#endif // GUARD_NAMING_SCREEN_H
|
||||
|
||||
@@ -20,7 +20,7 @@ void LoadUserWindowBorderGfx_(u8 windowId, u16 destOffset, u8 palOffset);
|
||||
void DrawTextBorderOuter(u8 windowId, u16 tileNum, u8 palNum);
|
||||
void DrawTextBorderInner(u8 windowId, u16 tileNum, u8 palNum);
|
||||
void rbox_fill_rectangle(u8 windowId);
|
||||
const u16 *stdpal_get(u8 id);
|
||||
const u16 *GetTextWindowPalette(u8 id);
|
||||
const u16 *GetOverworldTextboxPalettePtr(void);
|
||||
void sub_8098C6C(u8 bg, u16 destOffset, u8 palOffset);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user