diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2021-12-02 22:11:56 -0800 |
---|---|---|
committer | Seth Barberee <seth.barberee@gmail.com> | 2021-12-19 14:59:10 -0800 |
commit | 3021ae9077992f3682512c50c18d3a14e332813a (patch) | |
tree | 18b0d5f392ebb324a90b6723e0c2603a91cf862b | |
parent | 8e1c66d8bd01807285b05d8333f36cd2d70e062c (diff) |
all data moved except questions
-rw-r--r-- | data/personality_test.s | 86 | ||||
-rw-r--r-- | include/constants/personality_test.h | 3 | ||||
-rw-r--r-- | include/personality_test.h | 2 | ||||
-rw-r--r-- | src/personality_test.c | 124 |
4 files changed, 122 insertions, 93 deletions
diff --git a/data/personality_test.s b/data/personality_test.s index c7dc79e..713751a 100644 --- a/data/personality_test.s +++ b/data/personality_test.s @@ -2005,89 +2005,3 @@ gPersonalityQuestionPointerTable: @ 80F2624 (pointers to each question text) .4byte MiscQuest2 .4byte MiscQuest3 .4byte BraveQuest2B - - .global gNatureQuestionTable -gNatureQuestionTable: @ 80F2704 (Categories) - .byte 0x00, 0x00, 0x00, 0x00 @ (Hardy) - .byte 0x01, 0x01, 0x01, 0x01 @ (Docile) - .byte 0x02, 0x02, 0x02, 0x02 @ (Brave) - .byte 0x03, 0x03, 0x03, 0x03 @ (Jolly) - .byte 0x04, 0x04, 0x04, 0x04 @ (Impish) - .byte 0x05, 0x05, 0x05, 0x05 @ (Naive) - .byte 0x06, 0x06, 0x06, 0x06 @ (Timid) - .byte 0x07, 0x07, 0x07, 0x07 @ (Hasty) - .byte 0x08, 0x08, 0x08, 0x08 @ (Sassy) - .byte 0x09, 0x09, 0x09, 0x09 @ (Calm) - .byte 0x0A, 0x0A, 0x0A, 0x0A @ (Relaxed) - .byte 0x0B, 0x0B, 0x0B, 0x0B @ (Lonely) - .byte 0x0C, 0x0C, 0x0C, 0x0C @ (Quirky) - .byte 0x0D, 0x0D, 0x0D @ (Miscellaneous) - .byte 0x02 @ (Question 2b for Brave Category) - - .global gGenderText -gGenderText: @ 80F273C - .string "Are you a boy or a girl?\0" - .align 2,0 - .4byte gGenderText - - .global gGenderMenu -gGenderMenu: @ 80F275C - .4byte BoyText @ Pointer to boy text - .byte 0x00, 0x00, 0x00, 0x00 - .4byte GirlText @ Pointer to girl text - .byte 0x01, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 @ end of table - .4byte -1 - - .global GirlText - GirlText: - .string "Girl.\0" - .align 2,0 - - .global BoyText - BoyText: - .string "Boy.\0" - - .byte 0x01 - .byte 0x02 - .byte 0x03 - .byte 0x04 - .byte 0x05 - .byte 0x06 - .byte 0x07 - .byte 0x08 - .byte 0x09 - .byte 0x0A - .byte 0x0B - .byte 0x0C - .byte 0x0D - - .global gStarters -gStarters: @ 80F278E (2D Array / [Male][Female]) - .byte 0x04, 0x00 @ Charmander (Hardy M) - .byte 0x19, 0x00 @ Pikachu (Hardy F) - .byte 0x01, 0x00 @ Bulbasaur (Docile M) - .byte 0x98, 0x00 @ Chikorita (Docile F) - .byte 0x42, 0x00 @ Machop (Brave M) - .byte 0x04, 0x00 @ Charmander (Brave F) - .byte 0x07, 0x00 @ Squirtle (Jolly M) - .byte 0x9E, 0x00 @ Totodile (Jolly F) - .byte 0x19, 0x00 @ Pikachu (Impish M) - .byte 0x68, 0x00 @ Cubone (Impish F) - .byte 0x9E, 0x00 @ Totodile (Naive M) - .byte 0x85, 0x00 @ Eevee (Naive F) - .byte 0x9B, 0x00 @ Cyndaquil (Timid M) - .byte 0x1B, 0x01 @ Mudkip (Timid F) - .byte 0x18, 0x01 @ Torchic (Hasty M) - .byte 0x45, 0x01 @ Skitty (Hasty F) - .byte 0x15, 0x01 @ Treecko (Sassy M) - .byte 0x18, 0x01 @ Torchic (Sassy F) - .byte 0x1B, 0x01 @ Mudkip (Calm M) - .byte 0x01, 0x00 @ Bulbasaur (Calm F) - .byte 0x36, 0x00 @ Psyduck (Relaxed M) - .byte 0x07, 0x00 @ Squirtle (Relaxed F) - .byte 0x68, 0x00 @ Cubone (Lonely M) - .byte 0x36, 0x00 @ Psyduck (Lonely F) - .byte 0x34, 0x00 @ Meowth (Quirky M) - .byte 0x15, 0x01 @ Treecko (Quirky F) - .byte 0x00, 0x00 @ End of table diff --git a/include/constants/personality_test.h b/include/constants/personality_test.h index cfb9c3d..5582fe4 100644 --- a/include/constants/personality_test.h +++ b/include/constants/personality_test.h @@ -15,11 +15,12 @@ enum NaturePersonalities { RELAXED, LONELY, QUIRKY, - NUM_PERSONALITIES + MISC, }; #define NUM_PARTNERS 10 #define NUM_QUIZ_QUESTIONS 55 #define MAX_ASKED_QUESTIONS 8 +#define NUM_PERSONALITIES MISC #endif diff --git a/include/personality_test.h b/include/personality_test.h index 71d7bf9..0351bd1 100644 --- a/include/personality_test.h +++ b/include/personality_test.h @@ -42,7 +42,6 @@ struct PersonalityStruct_203B400 u32 unkb8; u32 unkbc; }; -EWRAM_DATA struct PersonalityStruct_203B400 *gUnknown_203B400; struct PersonalityStruct_203B404 { @@ -62,7 +61,6 @@ struct PersonalityStruct_203B404 /* 0x54 */ struct UnkTextStruct2 unk54[4]; /* 0xB4 */ u8 unkb4[4]; }; -EWRAM_DATA struct PersonalityStruct_203B404 *gUnknown_203B404; void InitializeTestStats(void); void GenerateNewQuestionOrGender(void); diff --git a/src/personality_test.c b/src/personality_test.c index 2a623b6..f1bbdcd 100644 --- a/src/personality_test.c +++ b/src/personality_test.c @@ -11,6 +11,10 @@ #include "text.h" #include "menu.h" +EWRAM_DATA struct PersonalityStruct_203B400 *gUnknown_203B400; +EWRAM_DATA struct PersonalityStruct_203B404 *gUnknown_203B404; + + extern void sub_801317C(u32 *); extern void sub_8001024(u32 *); extern s32 sub_8094E4C(void); @@ -18,7 +22,7 @@ extern void sub_8094D28(s32); extern void sub_8001044(u32 *); extern void sub_80141B4(const char *text, u32 r1, u32 r2, u16 r3); -extern void sub_8014248(const char *text, u32, u32, struct MenuItem *r0, u32, u32, u32, u32, u32); +extern void sub_8014248(const char *text, u32, u32, const struct MenuItem *r0, u32, u32, u32, u32, u32); extern u32 sub_80144A4(s32 *); @@ -54,10 +58,7 @@ extern struct PersonalityQuestion *gPersonalityQuestionPointerTable[NUM_QUIZ_QUE extern struct UnkSaveStruct1 *gUnknown_203B46C; extern const char gStarterReveal[]; -extern const char gGenderText[]; -extern struct MenuItem gGenderMenu[]; -extern u8 gNatureQuestionTable[NUM_QUIZ_QUESTIONS]; extern u8 gAvailablePokemonNames[0x50]; extern const char gHardyDescription[]; @@ -73,6 +74,121 @@ extern const char gCalmDescription[]; extern const char gRelaxedDescription[]; extern const char gLonelyDescription[]; extern const char gQuirkyDescription[]; +extern const u8 GirlText[]; +extern const u8 BoyText[]; + + +// NOTE: 2nd Part of Brave is included at the end so it isn't actually chosen +const u8 gNatureQuestionTable[NUM_QUIZ_QUESTIONS + 1] = +{ + HARDY, + HARDY, + HARDY, + HARDY, + DOCILE, + DOCILE, + DOCILE, + DOCILE, + BRAVE, + BRAVE, + BRAVE, + BRAVE, + JOLLY, + JOLLY, + JOLLY, + JOLLY, + IMPISH, + IMPISH, + IMPISH, + IMPISH, + NAIVE, + NAIVE, + NAIVE, + NAIVE, + TIMID, + TIMID, + TIMID, + TIMID, + HASTY, + HASTY, + HASTY, + HASTY, + SASSY, + SASSY, + SASSY, + SASSY, + CALM, + CALM, + CALM, + CALM, + RELAXED, + RELAXED, + RELAXED, + RELAXED, + LONELY, + LONELY, + LONELY, + LONELY, + QUIRKY, + QUIRKY, + QUIRKY, + QUIRKY, + MISC, + MISC, + MISC, + BRAVE +}; + +ALIGNED(4) const u8 gGenderText[] = "Are you a boy or a girl?"; +const char * const gGenderTextPtr = gGenderText; + + +const struct MenuItem gGenderMenu[] = +{ + {BoyText, 0}, + {GirlText, 1}, + {NULL, -1}, +}; + +ALIGNED(4) const u8 GirlText[] = "Girl."; +ALIGNED(4) const u8 BoyText[] = "Boy."; + +const u8 unknownPersonality[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA, 0xB, 0xC, 0xD +}; + +const s16 gStarters[] = +{ + SPECIES_CHARMANDER, + SPECIES_PIKACHU, + SPECIES_BULBASAUR, + SPECIES_CHIKORITA, + SPECIES_MACHOP, + SPECIES_CHARMANDER, + SPECIES_SQUIRTLE, + SPECIES_TOTODILE, + SPECIES_PIKACHU, + SPECIES_CUBONE, + SPECIES_TOTODILE, + SPECIES_EEVEE, + SPECIES_CYNDAQUIL, + SPECIES_MUDKIP, + SPECIES_TORCHIC, + SPECIES_SKITTY, + SPECIES_TREECKO, + SPECIES_TORCHIC, + SPECIES_MUDKIP, + SPECIES_BULBASAUR, + SPECIES_PSYDUCK, + SPECIES_SQUIRTLE, + SPECIES_CUBONE, + SPECIES_PSYDUCK, + SPECIES_MEOWTH, + SPECIES_TREECKO, + SPECIES_NONE, +}; + ALIGNED(4) const char gStarterReveal[] = _("\n{CENTER_ALIGN}The Pokémon {ARG_POKEMON_0}!"); const char * const gStarterRevealPtr = gStarterReveal; |