From fbd9e668a5e426b30f8e15fb4b6fbc948be3ac0a Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Fri, 18 Oct 2024 22:33:30 -0400 Subject: [PATCH] Fix JP not matching --- include/dungeon.h | 2523 +++++++++++++++++++------------------ include/dungeon_mode.h | 639 +++++----- include/util.h | 3 - src/overlay_15_0238AD78.c | 10 +- src/overlay_31_02382820.c | 2 - 5 files changed, 1583 insertions(+), 1594 deletions(-) diff --git a/include/dungeon.h b/include/dungeon.h index 8179d9ca..422509b4 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -5,7 +5,7 @@ // Dungeon state struct dungeon { - undefined field_0x0; // 0x0: Initialized to 0x0. + u8 field_0x0; // 0x0: Initialized to 0x0. // 0x1: Set to true with mission_destination_info::target_enemy_is_defeated. Used to ensure // the mission complete message only shows once (ie: "Yes! Knocked out challenger // [string:1]!". Set to false after the message is shown. @@ -17,7 +17,7 @@ struct dungeon { // 0x3: If true and there's an active mission on the floor, the message // "You've reached a destination floor! But where is the target pokémon..." will be displayed. bool target_monster_not_found_flag; - undefined field_0x4; + u8 field_0x4; bool stepped_on_stairs; // 0x5: True if the leader just stepped on the stairs. // 0x6: If equal to 1 or 2, the floor will be advanced at the end of the turn, // unless the leader fainted. 2 is used for the leader falling through a pitfall @@ -30,11 +30,11 @@ struct dungeon { bool end_floor_no_death_check_flag; // 0x9: If this is 0x0 (maybe false), appears to not initialize certain parts of the dungeon. // Possibly a boolean for when loading from a quicksave or resuming after being rescued? - undefined field_0x9; - undefined field_0xa; - undefined field_0xb; - undefined field_0xc; // 0xC: Initialized to 0x0 - undefined field_0xd; // 0xD: Initialized to 0x0 + u8 field_0x9; + u8 field_0xa; + u8 field_0xb; + u8 field_0xc; // 0xC: Initialized to 0x0 + u8 field_0xd; // 0xD: Initialized to 0x0 // 0xE: If true, artificial weather abilities will be activated on this turn. // Set to false by TryActivateArtificialWeatherAbilities bool activate_artificial_weather_flag; @@ -42,7 +42,7 @@ struct dungeon { // May also have a niche usage if an enemy gets enough experience to level up through // something like the Joy Ribbon? bool should_enemy_evolve; - undefined field_0x10; // 0x10: Initialized to 0x0. + u8 field_0x10; // 0x10: Initialized to 0x0. // 0x11: True if the leader isn't doing anything right now. False if it's currently performing // an action (such as walking or attacking) bool no_action_in_progress; @@ -55,8 +55,8 @@ struct dungeon { // a mission. dungeon::end_floor_no_death_check_flag gets set whenever this is changed. u32 successful_exit_tracker; // 0x1C: Increased once per frame until 0x64. Resets to 0 when the leader acts. - undefined field_0x1c; - undefined field_0x1d; + u8 field_0x1c; + u8 field_0x1d; // 0x1E: Number of floors completed? (Guess). Initialized to 0. // If this is a floor tracker, odd it is not a u16 like the others. u8 number_completed_floors; @@ -67,166 +67,166 @@ struct dungeon { // 0x22: Total amount of floors passed including those in its group? (Guess) // Set to dungeon::number_preceding_floors + dungeon::number_completed_floors u16 total_floors_completed; - undefined field_0x24; - undefined field_0x25; - undefined field_0x26; - undefined field_0x27; - undefined field_0x28; - undefined field_0x29; - undefined field_0x2a; - undefined field_0x2b; - undefined field_0x2c; - undefined field_0x2d; - undefined field_0x2e; - undefined field_0x2f; - undefined field_0x30; - undefined field_0x31; - undefined field_0x32; - undefined field_0x33; - undefined field_0x34; - undefined field_0x35; - undefined field_0x36; - undefined field_0x37; - undefined field_0x38; - undefined field_0x39; - undefined field_0x3a; - undefined field_0x3b; - undefined field_0x3c; - undefined field_0x3d; - undefined field_0x3e; - undefined field_0x3f; - undefined field_0x40; - undefined field_0x41; - undefined field_0x42; - undefined field_0x43; - undefined field_0x44; - undefined field_0x45; - undefined field_0x46; - undefined field_0x47; - undefined field_0x48; - undefined field_0x49; - undefined field_0x4a; - undefined field_0x4b; - undefined field_0x4c; - undefined field_0x4d; - undefined field_0x4e; - undefined field_0x4f; - undefined field_0x50; - undefined field_0x51; - undefined field_0x52; - undefined field_0x53; - undefined field_0x54; - undefined field_0x55; - undefined field_0x56; - undefined field_0x57; - undefined field_0x58; - undefined field_0x59; - undefined field_0x5a; - undefined field_0x5b; - undefined field_0x5c; - undefined field_0x5d; - undefined field_0x5e; - undefined field_0x5f; - undefined field_0x60; - undefined field_0x61; - undefined field_0x62; - undefined field_0x63; - undefined field_0x64; - undefined field_0x65; - undefined field_0x66; - undefined field_0x67; - undefined field_0x68; - undefined field_0x69; - undefined field_0x6a; - undefined field_0x6b; - undefined field_0x6c; - undefined field_0x6d; - undefined field_0x6e; - undefined field_0x6f; - undefined field_0x70; - undefined field_0x71; - undefined field_0x72; - undefined field_0x73; - undefined field_0x74; - undefined field_0x75; - undefined field_0x76; - undefined field_0x77; - undefined field_0x78; - undefined field_0x79; - undefined field_0x7a; - undefined field_0x7b; - undefined field_0x7c; - undefined field_0x7d; - undefined field_0x7e; - undefined field_0x7f; - undefined field_0x80; - undefined field_0x81; - undefined field_0x82; - undefined field_0x83; - undefined field_0x84; - undefined field_0x85; - undefined field_0x86; - undefined field_0x87; - undefined field_0x88; - undefined field_0x89; - undefined field_0x8a; - undefined field_0x8b; - undefined field_0x8c; - undefined field_0x8d; - undefined field_0x8e; - undefined field_0x8f; - undefined field_0x90; - undefined field_0x91; - undefined field_0x92; - undefined field_0x93; - undefined field_0x94; - undefined field_0x95; - undefined field_0x96; - undefined field_0x97; - undefined field_0x98; - undefined field_0x99; - undefined field_0x9a; - undefined field_0x9b; - undefined field_0x9c; - undefined field_0x9d; - undefined field_0x9e; - undefined field_0x9f; - undefined field_0xa0; - undefined field_0xa1; - undefined field_0xa2; - undefined field_0xa3; - undefined field_0xa4; - undefined field_0xa5; - undefined field_0xa6; - undefined field_0xa7; - undefined field_0xa8; - undefined field_0xa9; - undefined field_0xaa; - undefined field_0xab; - undefined field_0xac; - undefined field_0xad; - undefined field_0xae; - undefined field_0xaf; - undefined field_0xb0; - undefined field_0xb1; - undefined field_0xb2; - undefined field_0xb3; - undefined field_0xb4; - undefined field_0xb5; - undefined field_0xb6; - undefined field_0xb7; - undefined field_0xb8; - undefined field_0xb9; - undefined field_0xba; - undefined field_0xbb; - undefined field_0xbc; - undefined field_0xbd; - undefined field_0xbe; - undefined field_0xbf; - undefined field_0xc0; - undefined field_0xc1; - undefined field_0xc2; - undefined field_0xc3; + u8 field_0x24; + u8 field_0x25; + u8 field_0x26; + u8 field_0x27; + u8 field_0x28; + u8 field_0x29; + u8 field_0x2a; + u8 field_0x2b; + u8 field_0x2c; + u8 field_0x2d; + u8 field_0x2e; + u8 field_0x2f; + u8 field_0x30; + u8 field_0x31; + u8 field_0x32; + u8 field_0x33; + u8 field_0x34; + u8 field_0x35; + u8 field_0x36; + u8 field_0x37; + u8 field_0x38; + u8 field_0x39; + u8 field_0x3a; + u8 field_0x3b; + u8 field_0x3c; + u8 field_0x3d; + u8 field_0x3e; + u8 field_0x3f; + u8 field_0x40; + u8 field_0x41; + u8 field_0x42; + u8 field_0x43; + u8 field_0x44; + u8 field_0x45; + u8 field_0x46; + u8 field_0x47; + u8 field_0x48; + u8 field_0x49; + u8 field_0x4a; + u8 field_0x4b; + u8 field_0x4c; + u8 field_0x4d; + u8 field_0x4e; + u8 field_0x4f; + u8 field_0x50; + u8 field_0x51; + u8 field_0x52; + u8 field_0x53; + u8 field_0x54; + u8 field_0x55; + u8 field_0x56; + u8 field_0x57; + u8 field_0x58; + u8 field_0x59; + u8 field_0x5a; + u8 field_0x5b; + u8 field_0x5c; + u8 field_0x5d; + u8 field_0x5e; + u8 field_0x5f; + u8 field_0x60; + u8 field_0x61; + u8 field_0x62; + u8 field_0x63; + u8 field_0x64; + u8 field_0x65; + u8 field_0x66; + u8 field_0x67; + u8 field_0x68; + u8 field_0x69; + u8 field_0x6a; + u8 field_0x6b; + u8 field_0x6c; + u8 field_0x6d; + u8 field_0x6e; + u8 field_0x6f; + u8 field_0x70; + u8 field_0x71; + u8 field_0x72; + u8 field_0x73; + u8 field_0x74; + u8 field_0x75; + u8 field_0x76; + u8 field_0x77; + u8 field_0x78; + u8 field_0x79; + u8 field_0x7a; + u8 field_0x7b; + u8 field_0x7c; + u8 field_0x7d; + u8 field_0x7e; + u8 field_0x7f; + u8 field_0x80; + u8 field_0x81; + u8 field_0x82; + u8 field_0x83; + u8 field_0x84; + u8 field_0x85; + u8 field_0x86; + u8 field_0x87; + u8 field_0x88; + u8 field_0x89; + u8 field_0x8a; + u8 field_0x8b; + u8 field_0x8c; + u8 field_0x8d; + u8 field_0x8e; + u8 field_0x8f; + u8 field_0x90; + u8 field_0x91; + u8 field_0x92; + u8 field_0x93; + u8 field_0x94; + u8 field_0x95; + u8 field_0x96; + u8 field_0x97; + u8 field_0x98; + u8 field_0x99; + u8 field_0x9a; + u8 field_0x9b; + u8 field_0x9c; + u8 field_0x9d; + u8 field_0x9e; + u8 field_0x9f; + u8 field_0xa0; + u8 field_0xa1; + u8 field_0xa2; + u8 field_0xa3; + u8 field_0xa4; + u8 field_0xa5; + u8 field_0xa6; + u8 field_0xa7; + u8 field_0xa8; + u8 field_0xa9; + u8 field_0xaa; + u8 field_0xab; + u8 field_0xac; + u8 field_0xad; + u8 field_0xae; + u8 field_0xaf; + u8 field_0xb0; + u8 field_0xb1; + u8 field_0xb2; + u8 field_0xb3; + u8 field_0xb4; + u8 field_0xb5; + u8 field_0xb6; + u8 field_0xb7; + u8 field_0xb8; + u8 field_0xb9; + u8 field_0xba; + u8 field_0xbb; + u8 field_0xbc; + u8 field_0xbd; + u8 field_0xbe; + u8 field_0xbf; + u8 field_0xc0; + u8 field_0xc1; + u8 field_0xc2; + u8 field_0xc3; // 0xC4: Pointer to the entity that is taking its turn right now struct entity* current_active_entity; // 0xC8: Pointer to the monster that will become the leader of the team after changing leaders @@ -237,12 +237,12 @@ struct dungeon { struct damage_calc_diag last_damage_calc; // 0x1D8: Somehow related to executing a monster's actions (including leader). // Initialized to 0xFFFF - undefined2 field_0x1d8; + u16 field_0x1d8; // 0x1DA: Somehow related to executing the leader's actions. Also maybe when leader opens // some menus? Initialized to 0xFFFF - undefined2 field_0x1da; - undefined2 field_0x1dc; // 0x1DC: Initialized to 0xFFFF - undefined2 field_0x1de; // 0x1DE: Initialized to 0xFFFF + u16 field_0x1da; + u16 field_0x1dc; // 0x1DC: Initialized to 0xFFFF + u16 field_0x1de; // 0x1DE: Initialized to 0xFFFF // 0x1E0: Color table. Used to apply a tint to the colors shown on screen. // Changes depending on the current weather. struct rgba color_table[256]; @@ -251,289 +251,289 @@ struct dungeon { struct spawned_shopkeeper_data shopkeeper_spawns[8]; // 0x610: Number of valid shopkeeper spawns int shopkeeper_spawn_count; - undefined4 field_0x614; + u32 field_0x614; // 0x618: Something related to animiations? Could be ID? - undefined4 unk1_animation1_value; - undefined4 unk2_animation1_value; - undefined4 unk3_animation1_value; + u32 unk1_animation1_value; + u32 unk2_animation1_value; + u32 unk3_animation1_value; struct entity* animation1_entity; // 0x624: Monster pointer for the animation? // 0x628: Something related to animiations? Could be ID? - undefined4 unk1_animation2_value; - undefined4 unk2_animation2_value; - undefined4 unk3_animation2_value; + u32 unk1_animation2_value; + u32 unk2_animation2_value; + u32 unk3_animation2_value; struct entity* animation2_entity; // 0x634: Monster pointer for the animation? // 0x638: Something related to animiations? Could be ID? - undefined4 unk1_animation3_value; - undefined4 unk2_animation3_value; - undefined4 unk3_animation3_value; + u32 unk1_animation3_value; + u32 unk2_animation3_value; + u32 unk3_animation3_value; struct entity* animation3_entity; // 0x644: Monster pointer for the animation? // 0x648: Some type of monster name related to fainting. Used for the partner, escort or // accompanying monster, but may be be changed when any monster faints (but might not be // used for them). char unk_fainted_monster_name[10]; - undefined field_0x652; - undefined field_0x653; - undefined field_0x654; - undefined field_0x655; - undefined field_0x656; - undefined field_0x657; - undefined field_0x658; - undefined field_0x659; - undefined field_0x65a; - undefined field_0x65b; - undefined field_0x65c; - undefined field_0x65d; - undefined field_0x65e; - undefined field_0x65f; - undefined field_0x660; - undefined field_0x661; - undefined field_0x662; - undefined field_0x663; - undefined field_0x664; - undefined field_0x665; - undefined field_0x666; - undefined field_0x667; - undefined field_0x668; - undefined field_0x669; - undefined field_0x66a; - undefined field_0x66b; - undefined field_0x66c; - undefined field_0x66d; - undefined field_0x66e; - undefined field_0x66f; - undefined field_0x670; - undefined field_0x671; - undefined field_0x672; - undefined field_0x673; - undefined field_0x674; - undefined field_0x675; - undefined field_0x676; - undefined field_0x677; - undefined field_0x678; - undefined field_0x679; - undefined field_0x67a; - undefined field_0x67b; - undefined field_0x67c; - undefined field_0x67d; - undefined field_0x67e; - undefined field_0x67f; - undefined field_0x680; - undefined field_0x681; - undefined field_0x682; - undefined field_0x683; - undefined field_0x684; - undefined field_0x685; - undefined field_0x686; - undefined field_0x687; - undefined field_0x688; - undefined field_0x689; - undefined field_0x68a; - undefined field_0x68b; - undefined field_0x68c; - undefined field_0x68d; - undefined field_0x68e; - undefined field_0x68f; - undefined field_0x690; - undefined field_0x691; - undefined field_0x692; - undefined field_0x693; - undefined field_0x694; - undefined field_0x695; - undefined field_0x696; - undefined field_0x697; - undefined field_0x698; - undefined field_0x699; - undefined field_0x69a; - undefined field_0x69b; - undefined field_0x69c; - undefined field_0x69d; - undefined field_0x69e; - undefined field_0x69f; - undefined field_0x6a0; - undefined field_0x6a1; - undefined field_0x6a2; - undefined field_0x6a3; - undefined field_0x6a4; - undefined field_0x6a5; - undefined field_0x6a6; - undefined field_0x6a7; - undefined field_0x6a8; - undefined field_0x6a9; - undefined field_0x6aa; - undefined field_0x6ab; - undefined field_0x6ac; - undefined field_0x6ad; - undefined field_0x6ae; - undefined field_0x6af; - undefined field_0x6b0; - undefined field_0x6b1; - undefined field_0x6b2; - undefined field_0x6b3; - undefined field_0x6b4; - undefined field_0x6b5; - undefined field_0x6b6; - undefined field_0x6b7; - undefined field_0x6b8; - undefined field_0x6b9; - undefined field_0x6ba; - undefined field_0x6bb; - undefined field_0x6bc; - undefined field_0x6bd; - undefined field_0x6be; - undefined field_0x6bf; - undefined field_0x6c0; - undefined field_0x6c1; - undefined field_0x6c2; - undefined field_0x6c3; - undefined field_0x6c4; - undefined field_0x6c5; - undefined field_0x6c6; - undefined field_0x6c7; - undefined field_0x6c8; - undefined field_0x6c9; - undefined field_0x6ca; - undefined field_0x6cb; - undefined field_0x6cc; - undefined field_0x6cd; - undefined field_0x6ce; - undefined field_0x6cf; - undefined field_0x6d0; - undefined field_0x6d1; - undefined field_0x6d2; - undefined field_0x6d3; - undefined field_0x6d4; - undefined field_0x6d5; - undefined field_0x6d6; - undefined field_0x6d7; - undefined field_0x6d8; - undefined field_0x6d9; - undefined field_0x6da; - undefined field_0x6db; - undefined field_0x6dc; - undefined field_0x6dd; - undefined field_0x6de; - undefined field_0x6df; - undefined field_0x6e0; - undefined field_0x6e1; - undefined field_0x6e2; - undefined field_0x6e3; - undefined field_0x6e4; - undefined field_0x6e5; - undefined field_0x6e6; - undefined field_0x6e7; - undefined field_0x6e8; - undefined field_0x6e9; - undefined field_0x6ea; - undefined field_0x6eb; - undefined field_0x6ec; - undefined field_0x6ed; - undefined field_0x6ee; - undefined field_0x6ef; - undefined field_0x6f0; - undefined field_0x6f1; - undefined field_0x6f2; - undefined field_0x6f3; - undefined field_0x6f4; - undefined field_0x6f5; - undefined field_0x6f6; - undefined field_0x6f7; - undefined field_0x6f8; - undefined field_0x6f9; - undefined field_0x6fa; - undefined field_0x6fb; - undefined field_0x6fc; - undefined field_0x6fd; - undefined field_0x6fe; - undefined field_0x6ff; - undefined field_0x700; - undefined field_0x701; - undefined field_0x702; - undefined field_0x703; - undefined field_0x704; - undefined field_0x705; - undefined field_0x706; - undefined field_0x707; - undefined field_0x708; - undefined field_0x709; - undefined field_0x70a; - undefined field_0x70b; - undefined field_0x70c; - undefined field_0x70d; - undefined field_0x70e; - undefined field_0x70f; - undefined field_0x710; - undefined field_0x711; - undefined field_0x712; - undefined field_0x713; - undefined field_0x714; - undefined field_0x715; - undefined field_0x716; - undefined field_0x717; - undefined field_0x718; - undefined field_0x719; - undefined field_0x71a; - undefined field_0x71b; - undefined field_0x71c; - undefined field_0x71d; - undefined field_0x71e; - undefined field_0x71f; - undefined field_0x720; - undefined field_0x721; - undefined field_0x722; - undefined field_0x723; - undefined field_0x724; - undefined field_0x725; - undefined field_0x726; - undefined field_0x727; - undefined field_0x728; - undefined field_0x729; - undefined field_0x72a; - undefined field_0x72b; - undefined field_0x72c; - undefined field_0x72d; - undefined field_0x72e; - undefined field_0x72f; - undefined field_0x730; - undefined field_0x731; - undefined field_0x732; - undefined field_0x733; - undefined field_0x734; - undefined field_0x735; - undefined field_0x736; - undefined field_0x737; - undefined field_0x738; - undefined field_0x739; - undefined field_0x73a; - undefined field_0x73b; - undefined field_0x73c; - undefined field_0x73d; - undefined field_0x73e; - undefined field_0x73f; - undefined field_0x740; - undefined field_0x741; - undefined field_0x742; - undefined field_0x743; - undefined field_0x744; - undefined field_0x745; - undefined field_0x746; - undefined field_0x747; + u8 field_0x652; + u8 field_0x653; + u8 field_0x654; + u8 field_0x655; + u8 field_0x656; + u8 field_0x657; + u8 field_0x658; + u8 field_0x659; + u8 field_0x65a; + u8 field_0x65b; + u8 field_0x65c; + u8 field_0x65d; + u8 field_0x65e; + u8 field_0x65f; + u8 field_0x660; + u8 field_0x661; + u8 field_0x662; + u8 field_0x663; + u8 field_0x664; + u8 field_0x665; + u8 field_0x666; + u8 field_0x667; + u8 field_0x668; + u8 field_0x669; + u8 field_0x66a; + u8 field_0x66b; + u8 field_0x66c; + u8 field_0x66d; + u8 field_0x66e; + u8 field_0x66f; + u8 field_0x670; + u8 field_0x671; + u8 field_0x672; + u8 field_0x673; + u8 field_0x674; + u8 field_0x675; + u8 field_0x676; + u8 field_0x677; + u8 field_0x678; + u8 field_0x679; + u8 field_0x67a; + u8 field_0x67b; + u8 field_0x67c; + u8 field_0x67d; + u8 field_0x67e; + u8 field_0x67f; + u8 field_0x680; + u8 field_0x681; + u8 field_0x682; + u8 field_0x683; + u8 field_0x684; + u8 field_0x685; + u8 field_0x686; + u8 field_0x687; + u8 field_0x688; + u8 field_0x689; + u8 field_0x68a; + u8 field_0x68b; + u8 field_0x68c; + u8 field_0x68d; + u8 field_0x68e; + u8 field_0x68f; + u8 field_0x690; + u8 field_0x691; + u8 field_0x692; + u8 field_0x693; + u8 field_0x694; + u8 field_0x695; + u8 field_0x696; + u8 field_0x697; + u8 field_0x698; + u8 field_0x699; + u8 field_0x69a; + u8 field_0x69b; + u8 field_0x69c; + u8 field_0x69d; + u8 field_0x69e; + u8 field_0x69f; + u8 field_0x6a0; + u8 field_0x6a1; + u8 field_0x6a2; + u8 field_0x6a3; + u8 field_0x6a4; + u8 field_0x6a5; + u8 field_0x6a6; + u8 field_0x6a7; + u8 field_0x6a8; + u8 field_0x6a9; + u8 field_0x6aa; + u8 field_0x6ab; + u8 field_0x6ac; + u8 field_0x6ad; + u8 field_0x6ae; + u8 field_0x6af; + u8 field_0x6b0; + u8 field_0x6b1; + u8 field_0x6b2; + u8 field_0x6b3; + u8 field_0x6b4; + u8 field_0x6b5; + u8 field_0x6b6; + u8 field_0x6b7; + u8 field_0x6b8; + u8 field_0x6b9; + u8 field_0x6ba; + u8 field_0x6bb; + u8 field_0x6bc; + u8 field_0x6bd; + u8 field_0x6be; + u8 field_0x6bf; + u8 field_0x6c0; + u8 field_0x6c1; + u8 field_0x6c2; + u8 field_0x6c3; + u8 field_0x6c4; + u8 field_0x6c5; + u8 field_0x6c6; + u8 field_0x6c7; + u8 field_0x6c8; + u8 field_0x6c9; + u8 field_0x6ca; + u8 field_0x6cb; + u8 field_0x6cc; + u8 field_0x6cd; + u8 field_0x6ce; + u8 field_0x6cf; + u8 field_0x6d0; + u8 field_0x6d1; + u8 field_0x6d2; + u8 field_0x6d3; + u8 field_0x6d4; + u8 field_0x6d5; + u8 field_0x6d6; + u8 field_0x6d7; + u8 field_0x6d8; + u8 field_0x6d9; + u8 field_0x6da; + u8 field_0x6db; + u8 field_0x6dc; + u8 field_0x6dd; + u8 field_0x6de; + u8 field_0x6df; + u8 field_0x6e0; + u8 field_0x6e1; + u8 field_0x6e2; + u8 field_0x6e3; + u8 field_0x6e4; + u8 field_0x6e5; + u8 field_0x6e6; + u8 field_0x6e7; + u8 field_0x6e8; + u8 field_0x6e9; + u8 field_0x6ea; + u8 field_0x6eb; + u8 field_0x6ec; + u8 field_0x6ed; + u8 field_0x6ee; + u8 field_0x6ef; + u8 field_0x6f0; + u8 field_0x6f1; + u8 field_0x6f2; + u8 field_0x6f3; + u8 field_0x6f4; + u8 field_0x6f5; + u8 field_0x6f6; + u8 field_0x6f7; + u8 field_0x6f8; + u8 field_0x6f9; + u8 field_0x6fa; + u8 field_0x6fb; + u8 field_0x6fc; + u8 field_0x6fd; + u8 field_0x6fe; + u8 field_0x6ff; + u8 field_0x700; + u8 field_0x701; + u8 field_0x702; + u8 field_0x703; + u8 field_0x704; + u8 field_0x705; + u8 field_0x706; + u8 field_0x707; + u8 field_0x708; + u8 field_0x709; + u8 field_0x70a; + u8 field_0x70b; + u8 field_0x70c; + u8 field_0x70d; + u8 field_0x70e; + u8 field_0x70f; + u8 field_0x710; + u8 field_0x711; + u8 field_0x712; + u8 field_0x713; + u8 field_0x714; + u8 field_0x715; + u8 field_0x716; + u8 field_0x717; + u8 field_0x718; + u8 field_0x719; + u8 field_0x71a; + u8 field_0x71b; + u8 field_0x71c; + u8 field_0x71d; + u8 field_0x71e; + u8 field_0x71f; + u8 field_0x720; + u8 field_0x721; + u8 field_0x722; + u8 field_0x723; + u8 field_0x724; + u8 field_0x725; + u8 field_0x726; + u8 field_0x727; + u8 field_0x728; + u8 field_0x729; + u8 field_0x72a; + u8 field_0x72b; + u8 field_0x72c; + u8 field_0x72d; + u8 field_0x72e; + u8 field_0x72f; + u8 field_0x730; + u8 field_0x731; + u8 field_0x732; + u8 field_0x733; + u8 field_0x734; + u8 field_0x735; + u8 field_0x736; + u8 field_0x737; + u8 field_0x738; + u8 field_0x739; + u8 field_0x73a; + u8 field_0x73b; + u8 field_0x73c; + u8 field_0x73d; + u8 field_0x73e; + u8 field_0x73f; + u8 field_0x740; + u8 field_0x741; + u8 field_0x742; + u8 field_0x743; + u8 field_0x744; + u8 field_0x745; + u8 field_0x746; + u8 field_0x747; // 0x748: Current dungeon ID. Is actually a dungeon_floor_pair struct that also contains // the floor number. enum dungeon_id id; u8 floor; // 0x749: Current floor number enum dungeon_group_id group_id; // 0x74A: Same for different segments of a dungeon - undefined field_0x74b; + u8 field_0x74b; // 0x74C: Used as an input to GetDungeonMode, and uses output to determine if the // override fixed room should be loaded? - undefined2 field_0x74c; - undefined field_0x74e; - undefined field_0x74f; + u16 field_0x74c; + u8 field_0x74e; + u8 field_0x74f; // 0x750: A ldr instruction is used at this address? Maybe used for something else before // the rescue floor number is set? - undefined field_0x750; + u8 field_0x750; u8 rescue_floor; // 0x751: Floor number where the rescue point is, if applicable - undefined field_0x752; - undefined field_0x753; + u8 field_0x752; + u8 field_0x753; // 0x754: Should also be prng_pressed_23_bit? dungeon_init::prng_preseed_23_bit gets copied // here, but might not be used? u32 prng_preseed_23_bit; @@ -542,7 +542,7 @@ struct dungeon { bool recruiting_enabled; // 0x759: Recruitment is allowed in this dungeon // 0x75A: If this is 0, the game wont use GetMonsterEvoStatus when gathering information for // the monster's summary (in stuff like the team menu). - undefined field_0x75a; + u8 field_0x75a; // 0x75B: When the dungeon is initialized this value gets forced to true. Likely because this // effect seems incomplete. When false the game will stop items from being added to the bag // but monsters are still alloweed to hold onto items normally. However, it does not seem to @@ -560,12 +560,12 @@ struct dungeon { bool skip_faint_animation_flag; // 0x760: Info about the next mission destination floor, if applicable struct mission_destination_info mission_destination; - undefined field_0x77c; - undefined field_0x77d; + u8 field_0x77c; + u8 field_0x77d; // 0x77E: Appears to track if the player has already been healed by Mime Jr. to change // the dialogue. Initialized to 0 using MemZero? bool bazaar_mime_jr_heal; - undefined field_0x77f; + u8 field_0x77f; // 0x780: Controls when a monster at a certain speed stage is able to act. // Increased by 1-4 each turn, depending on the team leader's speed level: // At normal speed, this will tick up by 4 each turn (can act when x % 4 == 3) @@ -579,13 +579,13 @@ struct dungeon { u16 enemy_density; // 0x786: If 0, prevents the enemy_spawn_counter for increasing // 0x788: The genid of the next monster to be spawned. Ticks up with each spawn. u16 next_spawn_genid; - undefined field_0x78a; // 0x78A: Initialized to 0x0. + u8 field_0x78a; // 0x78A: Initialized to 0x0. // 0x78B: True if the leader is running. Causes the leader's action for the next turn // to be set to action::ACTION_WALK until it hits an obstacle. bool leader_running; // 0x78C: Likely related to the actions of the leader because it is set to 0 in // SetLeaderAction and this value gets bitwise or'd with 0x78B and then saved back to here. - undefined field_0x78c; + u8 field_0x78c; // 0x78D: This flag is set by the move 0x189 ("HP Gauge") which is the // effect of the Identify Orb. If true, monsters not in the team that are // holding an item will be marked by a blue exclamation mark icon. @@ -602,10 +602,10 @@ struct dungeon { bool monster_house_triggered; // 0x793: You Entered a Monster House (actual dungeon state) // 0x794: You entered a Monster House (triggers music and other events?) bool monster_house_triggered_event; - undefined field_0x795; + u8 field_0x795; // 0x796: Seems to often be 0x3E7 (999)? Somehow related to controlling or managing the // playing music? - undefined2 field_0x796; + u16 field_0x796; enum dungeon_objective dungeon_objective; // 0x798: Objective of the current dungeon // 0x799: Determines which message to display when the leader's belly reaches 0. Goes up // to 0x9 (9), but only displays a unique message for 0x1, 0x2, and 0x3. @@ -618,29 +618,29 @@ struct dungeon { s8 rescue_attempts_left; u32 prng_seed; // 0x79C: The dungeon PRNG seed, if set u32 rescue_prng_preseed_23_bit; // 0x7A0: The 23 bit dungeon PRNG preseed for rescues? - undefined2 field_0x7a4; // 0x7A4: Initialized to 0x63. - undefined2 field_0x7a6; // 0x7A6: Initialized to 0x63. + u16 field_0x7a4; // 0x7A4: Initialized to 0x63. + u16 field_0x7a6; // 0x7A6: Initialized to 0x63. // 0x7A8: Holds some data for a monster id to loads its sprite. If this value is non-zero, // it gets loaded after loading the dungeon floor monster spawn entries. Maybe for monsters // that need a specific item to spawn? enum monster_id some_monster_sprite_to_load; u8 some_monster_level; // 0x7AA: The level for dungeon::some_monster_sprite_to_load? - undefined field_0x7ab; + u8 field_0x7ab; // 0x7AC: Second number in the default LCG sequence, used for computing the actual dungeon PRNG // seed u32 prng_preseed; - undefined field_0x7b0; - undefined field_0x7b1; - undefined field_0x7b2; - undefined field_0x7b3; - undefined field_0x7b4; - undefined field_0x7b5; - undefined field_0x7b6; - undefined field_0x7b7; - undefined field_0x7b8; - undefined field_0x7b9; - undefined field_0x7ba; - undefined field_0x7bb; + u8 field_0x7b0; + u8 field_0x7b1; + u8 field_0x7b2; + u8 field_0x7b3; + u8 field_0x7b4; + u8 field_0x7b5; + u8 field_0x7b6; + u8 field_0x7b7; + u8 field_0x7b8; + u8 field_0x7b9; + u8 field_0x7ba; + u8 field_0x7bb; // 0x7BC: The amount of poke the items being bought are worth (By the player)? u32 poke_buy_kecleon_shop; // 0x7C0: The amount of poke the items being sold are worth (By the player)? @@ -654,8 +654,8 @@ struct dungeon { bool leader_standing_in_kecleon_shop; // 0x7C9: You entered a Kecleon Shop (triggers music and maybe more?) bool standing_in_kecleon_shop; - undefined field_0x7ca; - undefined field_0x7cb; + u8 field_0x7ca; + u8 field_0x7cb; // 0x7CC: Controls which mappa file (Time/Darkness/Sky) to load for a dungeon. When time and // darkness are selected their respective mappa files are loaded, the hidden stairs type // will always return 0, treasure boxes will generate with only exclusive items that exist @@ -668,40 +668,40 @@ struct dungeon { // 0x7D0: Maybe a pointer to a spawn list or related to a spawn list? // Possibly a 0x8 long array of a struct-like object? Each entry is 4 bytes, but maybe the // last byte is unused?? - undefined field_0x7d0; - undefined field_0x7d1; - undefined field_0x7d2; - undefined field_0x7d3; - undefined field_0x7d4; - undefined field_0x7d5; - undefined field_0x7d6; - undefined field_0x7d7; - undefined field_0x7d8; - undefined field_0x7d9; - undefined field_0x7da; - undefined field_0x7db; - undefined field_0x7dc; - undefined field_0x7dd; - undefined field_0x7de; - undefined field_0x7df; - undefined field_0x7e0; - undefined field_0x7e1; - undefined field_0x7e2; - undefined field_0x7e3; - undefined field_0x7e4; - undefined field_0x7e5; - undefined field_0x7e6; - undefined field_0x7e7; - undefined field_0x7e8; - undefined field_0x7e9; - undefined field_0x7ea; - undefined field_0x7eb; - undefined field_0x7ec; - undefined field_0x7ed; - undefined field_0x7ee; - undefined field_0x7ef; + u8 field_0x7d0; + u8 field_0x7d1; + u8 field_0x7d2; + u8 field_0x7d3; + u8 field_0x7d4; + u8 field_0x7d5; + u8 field_0x7d6; + u8 field_0x7d7; + u8 field_0x7d8; + u8 field_0x7d9; + u8 field_0x7da; + u8 field_0x7db; + u8 field_0x7dc; + u8 field_0x7dd; + u8 field_0x7de; + u8 field_0x7df; + u8 field_0x7e0; + u8 field_0x7e1; + u8 field_0x7e2; + u8 field_0x7e3; + u8 field_0x7e4; + u8 field_0x7e5; + u8 field_0x7e6; + u8 field_0x7e7; + u8 field_0x7e8; + u8 field_0x7e9; + u8 field_0x7ea; + u8 field_0x7eb; + u8 field_0x7ec; + u8 field_0x7ed; + u8 field_0x7ee; + u8 field_0x7ef; // 0x7F0: Somehow related to dungeon::0x7D0? - undefined2 field_0x7f0; + u16 field_0x7f0; // 0x7F2: May always just be a copy of dungeon::some_monster_sprite_to_load, but may also // have another purpose. enum monster_id some_monster_sprite; @@ -716,390 +716,390 @@ struct dungeon { // The number of valid entries is stored in monster_spawn_table_length. // The last 2 entries of the table are always Kecleon (0x17F) and the dummy (0x229). struct monster_spawn_entry spawn_entries[16]; - undefined field_0x39f4; - undefined field_0x39f5; - undefined field_0x39f6; - undefined field_0x39f7; - undefined field_0x39f8; - undefined field_0x39f9; - undefined field_0x39fa; - undefined field_0x39fb; - undefined field_0x39fc; - undefined field_0x39fd; - undefined field_0x39fe; - undefined field_0x39ff; - undefined field_0x3a00; - undefined field_0x3a01; - undefined field_0x3a02; - undefined field_0x3a03; - undefined field_0x3a04; - undefined field_0x3a05; - undefined field_0x3a06; - undefined field_0x3a07; - undefined field_0x3a08; - undefined field_0x3a09; - undefined field_0x3a0a; - undefined field_0x3a0b; - undefined field_0x3a0c; - undefined field_0x3a0d; - undefined field_0x3a0e; - undefined field_0x3a0f; - undefined field_0x3a10; - undefined field_0x3a11; - undefined field_0x3a12; - undefined field_0x3a13; - undefined field_0x3a14; - undefined field_0x3a15; - undefined field_0x3a16; - undefined field_0x3a17; - undefined field_0x3a18; - undefined field_0x3a19; - undefined field_0x3a1a; - undefined field_0x3a1b; - undefined field_0x3a1c; - undefined field_0x3a1d; - undefined field_0x3a1e; - undefined field_0x3a1f; - undefined field_0x3a20; - undefined field_0x3a21; - undefined field_0x3a22; - undefined field_0x3a23; - undefined field_0x3a24; - undefined field_0x3a25; - undefined field_0x3a26; - undefined field_0x3a27; - undefined field_0x3a28; - undefined field_0x3a29; - undefined field_0x3a2a; - undefined field_0x3a2b; - undefined field_0x3a2c; - undefined field_0x3a2d; - undefined field_0x3a2e; - undefined field_0x3a2f; - undefined field_0x3a30; - undefined field_0x3a31; - undefined field_0x3a32; - undefined field_0x3a33; - undefined field_0x3a34; - undefined field_0x3a35; - undefined field_0x3a36; - undefined field_0x3a37; - undefined field_0x3a38; - undefined field_0x3a39; - undefined field_0x3a3a; - undefined field_0x3a3b; - undefined field_0x3a3c; - undefined field_0x3a3d; - undefined field_0x3a3e; - undefined field_0x3a3f; - undefined field_0x3a40; - undefined field_0x3a41; - undefined field_0x3a42; - undefined field_0x3a43; - undefined field_0x3a44; - undefined field_0x3a45; - undefined field_0x3a46; - undefined field_0x3a47; - undefined field_0x3a48; - undefined field_0x3a49; - undefined field_0x3a4a; - undefined field_0x3a4b; - undefined field_0x3a4c; - undefined field_0x3a4d; - undefined field_0x3a4e; - undefined field_0x3a4f; - undefined field_0x3a50; - undefined field_0x3a51; - undefined field_0x3a52; - undefined field_0x3a53; - undefined field_0x3a54; - undefined field_0x3a55; - undefined field_0x3a56; - undefined field_0x3a57; - undefined field_0x3a58; - undefined field_0x3a59; - undefined field_0x3a5a; - undefined field_0x3a5b; - undefined field_0x3a5c; - undefined field_0x3a5d; - undefined field_0x3a5e; - undefined field_0x3a5f; - undefined field_0x3a60; - undefined field_0x3a61; - undefined field_0x3a62; - undefined field_0x3a63; - undefined field_0x3a64; - undefined field_0x3a65; - undefined field_0x3a66; - undefined field_0x3a67; - undefined field_0x3a68; - undefined field_0x3a69; - undefined field_0x3a6a; - undefined field_0x3a6b; - undefined field_0x3a6c; - undefined field_0x3a6d; - undefined field_0x3a6e; - undefined field_0x3a6f; - undefined field_0x3a70; - undefined field_0x3a71; - undefined field_0x3a72; - undefined field_0x3a73; - undefined field_0x3a74; - undefined field_0x3a75; - undefined field_0x3a76; - undefined field_0x3a77; - undefined field_0x3a78; - undefined field_0x3a79; - undefined field_0x3a7a; - undefined field_0x3a7b; - undefined field_0x3a7c; - undefined field_0x3a7d; - undefined field_0x3a7e; - undefined field_0x3a7f; - undefined field_0x3a80; - undefined field_0x3a81; - undefined field_0x3a82; - undefined field_0x3a83; - undefined field_0x3a84; - undefined field_0x3a85; - undefined field_0x3a86; - undefined field_0x3a87; - undefined field_0x3a88; - undefined field_0x3a89; - undefined field_0x3a8a; - undefined field_0x3a8b; - undefined field_0x3a8c; - undefined field_0x3a8d; - undefined field_0x3a8e; - undefined field_0x3a8f; - undefined field_0x3a90; - undefined field_0x3a91; - undefined field_0x3a92; - undefined field_0x3a93; - undefined field_0x3a94; - undefined field_0x3a95; - undefined field_0x3a96; - undefined field_0x3a97; - undefined field_0x3a98; - undefined field_0x3a99; - undefined field_0x3a9a; - undefined field_0x3a9b; - undefined field_0x3a9c; - undefined field_0x3a9d; - undefined field_0x3a9e; - undefined field_0x3a9f; - undefined field_0x3aa0; - undefined field_0x3aa1; - undefined field_0x3aa2; - undefined field_0x3aa3; - undefined field_0x3aa4; - undefined field_0x3aa5; - undefined field_0x3aa6; - undefined field_0x3aa7; - undefined field_0x3aa8; - undefined field_0x3aa9; - undefined field_0x3aaa; - undefined field_0x3aab; - undefined field_0x3aac; - undefined field_0x3aad; - undefined field_0x3aae; - undefined field_0x3aaf; - undefined field_0x3ab0; - undefined field_0x3ab1; - undefined field_0x3ab2; - undefined field_0x3ab3; - undefined field_0x3ab4; - undefined field_0x3ab5; - undefined field_0x3ab6; - undefined field_0x3ab7; - undefined field_0x3ab8; - undefined field_0x3ab9; - undefined field_0x3aba; - undefined field_0x3abb; - undefined field_0x3abc; - undefined field_0x3abd; - undefined field_0x3abe; - undefined field_0x3abf; - undefined field_0x3ac0; - undefined field_0x3ac1; - undefined field_0x3ac2; - undefined field_0x3ac3; - undefined field_0x3ac4; - undefined field_0x3ac5; - undefined field_0x3ac6; - undefined field_0x3ac7; - undefined field_0x3ac8; - undefined field_0x3ac9; - undefined field_0x3aca; - undefined field_0x3acb; - undefined field_0x3acc; - undefined field_0x3acd; - undefined field_0x3ace; - undefined field_0x3acf; - undefined field_0x3ad0; - undefined field_0x3ad1; - undefined field_0x3ad2; - undefined field_0x3ad3; - undefined field_0x3ad4; - undefined field_0x3ad5; - undefined field_0x3ad6; - undefined field_0x3ad7; - undefined field_0x3ad8; - undefined field_0x3ad9; - undefined field_0x3ada; - undefined field_0x3adb; - undefined field_0x3adc; - undefined field_0x3add; - undefined field_0x3ade; - undefined field_0x3adf; - undefined field_0x3ae0; - undefined field_0x3ae1; - undefined field_0x3ae2; - undefined field_0x3ae3; - undefined field_0x3ae4; - undefined field_0x3ae5; - undefined field_0x3ae6; - undefined field_0x3ae7; - undefined field_0x3ae8; - undefined field_0x3ae9; - undefined field_0x3aea; - undefined field_0x3aeb; - undefined field_0x3aec; - undefined field_0x3aed; - undefined field_0x3aee; - undefined field_0x3aef; - undefined field_0x3af0; - undefined field_0x3af1; - undefined field_0x3af2; - undefined field_0x3af3; - undefined field_0x3af4; - undefined field_0x3af5; - undefined field_0x3af6; - undefined field_0x3af7; - undefined field_0x3af8; - undefined field_0x3af9; - undefined field_0x3afa; - undefined field_0x3afb; - undefined field_0x3afc; - undefined field_0x3afd; - undefined field_0x3afe; - undefined field_0x3aff; - undefined field_0x3b00; - undefined field_0x3b01; - undefined field_0x3b02; - undefined field_0x3b03; - undefined field_0x3b04; - undefined field_0x3b05; - undefined field_0x3b06; - undefined field_0x3b07; - undefined field_0x3b08; - undefined field_0x3b09; - undefined field_0x3b0a; - undefined field_0x3b0b; - undefined field_0x3b0c; - undefined field_0x3b0d; - undefined field_0x3b0e; - undefined field_0x3b0f; - undefined field_0x3b10; - undefined field_0x3b11; - undefined field_0x3b12; - undefined field_0x3b13; - undefined field_0x3b14; - undefined field_0x3b15; - undefined field_0x3b16; - undefined field_0x3b17; - undefined field_0x3b18; - undefined field_0x3b19; - undefined field_0x3b1a; - undefined field_0x3b1b; - undefined field_0x3b1c; - undefined field_0x3b1d; - undefined field_0x3b1e; - undefined field_0x3b1f; - undefined field_0x3b20; - undefined field_0x3b21; - undefined field_0x3b22; - undefined field_0x3b23; - undefined field_0x3b24; - undefined field_0x3b25; - undefined field_0x3b26; - undefined field_0x3b27; - undefined field_0x3b28; - undefined field_0x3b29; - undefined field_0x3b2a; - undefined field_0x3b2b; - undefined field_0x3b2c; - undefined field_0x3b2d; - undefined field_0x3b2e; - undefined field_0x3b2f; - undefined field_0x3b30; - undefined field_0x3b31; - undefined field_0x3b32; - undefined field_0x3b33; - undefined field_0x3b34; - undefined field_0x3b35; - undefined field_0x3b36; - undefined field_0x3b37; - undefined field_0x3b38; - undefined field_0x3b39; - undefined field_0x3b3a; - undefined field_0x3b3b; - undefined field_0x3b3c; - undefined field_0x3b3d; - undefined field_0x3b3e; - undefined field_0x3b3f; - undefined field_0x3b40; - undefined field_0x3b41; - undefined field_0x3b42; - undefined field_0x3b43; - undefined field_0x3b44; - undefined field_0x3b45; - undefined field_0x3b46; - undefined field_0x3b47; - undefined field_0x3b48; - undefined field_0x3b49; - undefined field_0x3b4a; - undefined field_0x3b4b; - undefined field_0x3b4c; - undefined field_0x3b4d; - undefined field_0x3b4e; - undefined field_0x3b4f; - undefined field_0x3b50; - undefined field_0x3b51; - undefined field_0x3b52; - undefined field_0x3b53; - undefined field_0x3b54; - undefined field_0x3b55; - undefined field_0x3b56; - undefined field_0x3b57; - undefined field_0x3b58; - undefined field_0x3b59; - undefined field_0x3b5a; - undefined field_0x3b5b; - undefined field_0x3b5c; - undefined field_0x3b5d; - undefined field_0x3b5e; - undefined field_0x3b5f; - undefined field_0x3b60; - undefined field_0x3b61; - undefined field_0x3b62; - undefined field_0x3b63; - undefined field_0x3b64; - undefined field_0x3b65; - undefined field_0x3b66; - undefined field_0x3b67; - undefined field_0x3b68; - undefined field_0x3b69; - undefined field_0x3b6a; - undefined field_0x3b6b; - undefined field_0x3b6c; - undefined field_0x3b6d; - undefined field_0x3b6e; - undefined field_0x3b6f; - undefined field_0x3b70; - undefined field_0x3b71; - undefined field_0x3b72; - undefined field_0x3b73; + u8 field_0x39f4; + u8 field_0x39f5; + u8 field_0x39f6; + u8 field_0x39f7; + u8 field_0x39f8; + u8 field_0x39f9; + u8 field_0x39fa; + u8 field_0x39fb; + u8 field_0x39fc; + u8 field_0x39fd; + u8 field_0x39fe; + u8 field_0x39ff; + u8 field_0x3a00; + u8 field_0x3a01; + u8 field_0x3a02; + u8 field_0x3a03; + u8 field_0x3a04; + u8 field_0x3a05; + u8 field_0x3a06; + u8 field_0x3a07; + u8 field_0x3a08; + u8 field_0x3a09; + u8 field_0x3a0a; + u8 field_0x3a0b; + u8 field_0x3a0c; + u8 field_0x3a0d; + u8 field_0x3a0e; + u8 field_0x3a0f; + u8 field_0x3a10; + u8 field_0x3a11; + u8 field_0x3a12; + u8 field_0x3a13; + u8 field_0x3a14; + u8 field_0x3a15; + u8 field_0x3a16; + u8 field_0x3a17; + u8 field_0x3a18; + u8 field_0x3a19; + u8 field_0x3a1a; + u8 field_0x3a1b; + u8 field_0x3a1c; + u8 field_0x3a1d; + u8 field_0x3a1e; + u8 field_0x3a1f; + u8 field_0x3a20; + u8 field_0x3a21; + u8 field_0x3a22; + u8 field_0x3a23; + u8 field_0x3a24; + u8 field_0x3a25; + u8 field_0x3a26; + u8 field_0x3a27; + u8 field_0x3a28; + u8 field_0x3a29; + u8 field_0x3a2a; + u8 field_0x3a2b; + u8 field_0x3a2c; + u8 field_0x3a2d; + u8 field_0x3a2e; + u8 field_0x3a2f; + u8 field_0x3a30; + u8 field_0x3a31; + u8 field_0x3a32; + u8 field_0x3a33; + u8 field_0x3a34; + u8 field_0x3a35; + u8 field_0x3a36; + u8 field_0x3a37; + u8 field_0x3a38; + u8 field_0x3a39; + u8 field_0x3a3a; + u8 field_0x3a3b; + u8 field_0x3a3c; + u8 field_0x3a3d; + u8 field_0x3a3e; + u8 field_0x3a3f; + u8 field_0x3a40; + u8 field_0x3a41; + u8 field_0x3a42; + u8 field_0x3a43; + u8 field_0x3a44; + u8 field_0x3a45; + u8 field_0x3a46; + u8 field_0x3a47; + u8 field_0x3a48; + u8 field_0x3a49; + u8 field_0x3a4a; + u8 field_0x3a4b; + u8 field_0x3a4c; + u8 field_0x3a4d; + u8 field_0x3a4e; + u8 field_0x3a4f; + u8 field_0x3a50; + u8 field_0x3a51; + u8 field_0x3a52; + u8 field_0x3a53; + u8 field_0x3a54; + u8 field_0x3a55; + u8 field_0x3a56; + u8 field_0x3a57; + u8 field_0x3a58; + u8 field_0x3a59; + u8 field_0x3a5a; + u8 field_0x3a5b; + u8 field_0x3a5c; + u8 field_0x3a5d; + u8 field_0x3a5e; + u8 field_0x3a5f; + u8 field_0x3a60; + u8 field_0x3a61; + u8 field_0x3a62; + u8 field_0x3a63; + u8 field_0x3a64; + u8 field_0x3a65; + u8 field_0x3a66; + u8 field_0x3a67; + u8 field_0x3a68; + u8 field_0x3a69; + u8 field_0x3a6a; + u8 field_0x3a6b; + u8 field_0x3a6c; + u8 field_0x3a6d; + u8 field_0x3a6e; + u8 field_0x3a6f; + u8 field_0x3a70; + u8 field_0x3a71; + u8 field_0x3a72; + u8 field_0x3a73; + u8 field_0x3a74; + u8 field_0x3a75; + u8 field_0x3a76; + u8 field_0x3a77; + u8 field_0x3a78; + u8 field_0x3a79; + u8 field_0x3a7a; + u8 field_0x3a7b; + u8 field_0x3a7c; + u8 field_0x3a7d; + u8 field_0x3a7e; + u8 field_0x3a7f; + u8 field_0x3a80; + u8 field_0x3a81; + u8 field_0x3a82; + u8 field_0x3a83; + u8 field_0x3a84; + u8 field_0x3a85; + u8 field_0x3a86; + u8 field_0x3a87; + u8 field_0x3a88; + u8 field_0x3a89; + u8 field_0x3a8a; + u8 field_0x3a8b; + u8 field_0x3a8c; + u8 field_0x3a8d; + u8 field_0x3a8e; + u8 field_0x3a8f; + u8 field_0x3a90; + u8 field_0x3a91; + u8 field_0x3a92; + u8 field_0x3a93; + u8 field_0x3a94; + u8 field_0x3a95; + u8 field_0x3a96; + u8 field_0x3a97; + u8 field_0x3a98; + u8 field_0x3a99; + u8 field_0x3a9a; + u8 field_0x3a9b; + u8 field_0x3a9c; + u8 field_0x3a9d; + u8 field_0x3a9e; + u8 field_0x3a9f; + u8 field_0x3aa0; + u8 field_0x3aa1; + u8 field_0x3aa2; + u8 field_0x3aa3; + u8 field_0x3aa4; + u8 field_0x3aa5; + u8 field_0x3aa6; + u8 field_0x3aa7; + u8 field_0x3aa8; + u8 field_0x3aa9; + u8 field_0x3aaa; + u8 field_0x3aab; + u8 field_0x3aac; + u8 field_0x3aad; + u8 field_0x3aae; + u8 field_0x3aaf; + u8 field_0x3ab0; + u8 field_0x3ab1; + u8 field_0x3ab2; + u8 field_0x3ab3; + u8 field_0x3ab4; + u8 field_0x3ab5; + u8 field_0x3ab6; + u8 field_0x3ab7; + u8 field_0x3ab8; + u8 field_0x3ab9; + u8 field_0x3aba; + u8 field_0x3abb; + u8 field_0x3abc; + u8 field_0x3abd; + u8 field_0x3abe; + u8 field_0x3abf; + u8 field_0x3ac0; + u8 field_0x3ac1; + u8 field_0x3ac2; + u8 field_0x3ac3; + u8 field_0x3ac4; + u8 field_0x3ac5; + u8 field_0x3ac6; + u8 field_0x3ac7; + u8 field_0x3ac8; + u8 field_0x3ac9; + u8 field_0x3aca; + u8 field_0x3acb; + u8 field_0x3acc; + u8 field_0x3acd; + u8 field_0x3ace; + u8 field_0x3acf; + u8 field_0x3ad0; + u8 field_0x3ad1; + u8 field_0x3ad2; + u8 field_0x3ad3; + u8 field_0x3ad4; + u8 field_0x3ad5; + u8 field_0x3ad6; + u8 field_0x3ad7; + u8 field_0x3ad8; + u8 field_0x3ad9; + u8 field_0x3ada; + u8 field_0x3adb; + u8 field_0x3adc; + u8 field_0x3add; + u8 field_0x3ade; + u8 field_0x3adf; + u8 field_0x3ae0; + u8 field_0x3ae1; + u8 field_0x3ae2; + u8 field_0x3ae3; + u8 field_0x3ae4; + u8 field_0x3ae5; + u8 field_0x3ae6; + u8 field_0x3ae7; + u8 field_0x3ae8; + u8 field_0x3ae9; + u8 field_0x3aea; + u8 field_0x3aeb; + u8 field_0x3aec; + u8 field_0x3aed; + u8 field_0x3aee; + u8 field_0x3aef; + u8 field_0x3af0; + u8 field_0x3af1; + u8 field_0x3af2; + u8 field_0x3af3; + u8 field_0x3af4; + u8 field_0x3af5; + u8 field_0x3af6; + u8 field_0x3af7; + u8 field_0x3af8; + u8 field_0x3af9; + u8 field_0x3afa; + u8 field_0x3afb; + u8 field_0x3afc; + u8 field_0x3afd; + u8 field_0x3afe; + u8 field_0x3aff; + u8 field_0x3b00; + u8 field_0x3b01; + u8 field_0x3b02; + u8 field_0x3b03; + u8 field_0x3b04; + u8 field_0x3b05; + u8 field_0x3b06; + u8 field_0x3b07; + u8 field_0x3b08; + u8 field_0x3b09; + u8 field_0x3b0a; + u8 field_0x3b0b; + u8 field_0x3b0c; + u8 field_0x3b0d; + u8 field_0x3b0e; + u8 field_0x3b0f; + u8 field_0x3b10; + u8 field_0x3b11; + u8 field_0x3b12; + u8 field_0x3b13; + u8 field_0x3b14; + u8 field_0x3b15; + u8 field_0x3b16; + u8 field_0x3b17; + u8 field_0x3b18; + u8 field_0x3b19; + u8 field_0x3b1a; + u8 field_0x3b1b; + u8 field_0x3b1c; + u8 field_0x3b1d; + u8 field_0x3b1e; + u8 field_0x3b1f; + u8 field_0x3b20; + u8 field_0x3b21; + u8 field_0x3b22; + u8 field_0x3b23; + u8 field_0x3b24; + u8 field_0x3b25; + u8 field_0x3b26; + u8 field_0x3b27; + u8 field_0x3b28; + u8 field_0x3b29; + u8 field_0x3b2a; + u8 field_0x3b2b; + u8 field_0x3b2c; + u8 field_0x3b2d; + u8 field_0x3b2e; + u8 field_0x3b2f; + u8 field_0x3b30; + u8 field_0x3b31; + u8 field_0x3b32; + u8 field_0x3b33; + u8 field_0x3b34; + u8 field_0x3b35; + u8 field_0x3b36; + u8 field_0x3b37; + u8 field_0x3b38; + u8 field_0x3b39; + u8 field_0x3b3a; + u8 field_0x3b3b; + u8 field_0x3b3c; + u8 field_0x3b3d; + u8 field_0x3b3e; + u8 field_0x3b3f; + u8 field_0x3b40; + u8 field_0x3b41; + u8 field_0x3b42; + u8 field_0x3b43; + u8 field_0x3b44; + u8 field_0x3b45; + u8 field_0x3b46; + u8 field_0x3b47; + u8 field_0x3b48; + u8 field_0x3b49; + u8 field_0x3b4a; + u8 field_0x3b4b; + u8 field_0x3b4c; + u8 field_0x3b4d; + u8 field_0x3b4e; + u8 field_0x3b4f; + u8 field_0x3b50; + u8 field_0x3b51; + u8 field_0x3b52; + u8 field_0x3b53; + u8 field_0x3b54; + u8 field_0x3b55; + u8 field_0x3b56; + u8 field_0x3b57; + u8 field_0x3b58; + u8 field_0x3b59; + u8 field_0x3b5a; + u8 field_0x3b5b; + u8 field_0x3b5c; + u8 field_0x3b5d; + u8 field_0x3b5e; + u8 field_0x3b5f; + u8 field_0x3b60; + u8 field_0x3b61; + u8 field_0x3b62; + u8 field_0x3b63; + u8 field_0x3b64; + u8 field_0x3b65; + u8 field_0x3b66; + u8 field_0x3b67; + u8 field_0x3b68; + u8 field_0x3b69; + u8 field_0x3b6a; + u8 field_0x3b6b; + u8 field_0x3b6c; + u8 field_0x3b6d; + u8 field_0x3b6e; + u8 field_0x3b6f; + u8 field_0x3b70; + u8 field_0x3b71; + u8 field_0x3b72; + u8 field_0x3b73; // 0x3B74: Unknown array, likely one entry per monster species. This might be related to // the IQ skill Exp. Go-Getter so the AI knows which monsters to prioritize. u8 unknown_array_0x3B74[600]; @@ -1111,16 +1111,16 @@ struct dungeon { u32 unique_id_index; // 0x3E20: Number of valid monster spawn entries (see spawn_entries). int monster_spawn_entries_length; - undefined field_0x3e24; - undefined field_0x3e25; - undefined field_0x3e26; - undefined field_0x3e27; + u8 field_0x3e24; + u8 field_0x3e25; + u8 field_0x3e26; + u8 field_0x3e27; // 0x3E28: Related in some way to the spawn entries on the floor. Does something about them // if false, then set to true. bool unk_spawn_entry_id_check; - undefined field_0x3e29; - undefined field_0x3e2a; - undefined field_0x3e2b; + u8 field_0x3e29; + u8 field_0x3e2a; + u8 field_0x3e2b; // 0x3E2C: Appears to be a counter that is saved into statuses::unique_id so that every // monster has a different id for tracking statuses such as Leech Seed and Destiny Bond, and the // abilities Storm Drain and Lightning Rod. Initialized to 0x400 (1024) @@ -1140,31 +1140,31 @@ struct dungeon { // 0x3E3C: Gets set to true in ChangeShayminForme. Seems to also control which sprite to // load for a Shaymin on the team? bool shaymin_sky_form_loaded; - undefined field_0x3e3d; - undefined field_0x3e3e; - undefined field_0x3e3f; + u8 field_0x3e3d; + u8 field_0x3e3e; + u8 field_0x3e3f; struct item items[64]; // 0x3E40: Info for all the items on the ground u16 n_items; // 0x3FC0: Number of active items in the above items array - undefined field_0x3fc2; - undefined field_0x3fc3; + u8 field_0x3fc2; + u8 field_0x3fc3; struct trap traps[64]; // 0x3FC4: Info for all the traps on the floor struct dungeon_generation_info gen_info; // 0x40C4: Stuff involved with dungeon generation - undefined field_0xccfc; - undefined field_0xccfd; - undefined field_0xccfe; - undefined field_0xccff; - undefined field_0xcd00; - undefined field_0xcd01; - undefined field_0xcd02; - undefined field_0xcd03; - undefined field_0xcd04; - undefined field_0xcd05; - undefined field_0xcd06; - undefined field_0xcd07; - undefined field_0xcd08; - undefined field_0xcd09; - undefined field_0xcd0a; - undefined field_0xcd0b; + u8 field_0xccfc; + u8 field_0xccfd; + u8 field_0xccfe; + u8 field_0xccff; + u8 field_0xcd00; + u8 field_0xcd01; + u8 field_0xcd02; + u8 field_0xcd03; + u8 field_0xcd04; + u8 field_0xcd05; + u8 field_0xcd06; + u8 field_0xcd07; + u8 field_0xcd08; + u8 field_0xcd09; + u8 field_0xcd0a; + u8 field_0xcd0b; // 0xCD0C: Appears to be an array for the team. Likely only the first 4 entries are used. // Possibly related to dungeon_generation_info::individual_team_spawn_positions? Possibly the // direction to spawn each team member in? @@ -1204,151 +1204,151 @@ struct dungeon { u8 mud_sport_turns; // 0xCD5B: Number of turns left for the Mud Sport condition u8 water_sport_turns; // 0xCD5C: Number of turns left for the Water Sport condition bool nullify_weather; // 0xCD5D: Cloud Nine/Air Lock is in effect - undefined field_0xcd5e; - undefined field_0xcd5f; + u8 field_0xcd5e; + u8 field_0xcd5f; // 0xCD60: Seems to be tile data for tiles within fixed rooms struct tile fixed_room_tiles[8][8]; - undefined field_0xd260; - undefined field_0xd261; - undefined field_0xd262; - undefined field_0xd263; - undefined field_0xd264; - undefined field_0xd265; - undefined field_0xd266; - undefined field_0xd267; - undefined field_0xd268; - undefined field_0xd269; - undefined field_0xd26a; - undefined field_0xd26b; - undefined field_0xd26c; - undefined field_0xd26d; - undefined field_0xd26e; - undefined field_0xd26f; - undefined field_0xd270; - undefined field_0xd271; - undefined field_0xd272; - undefined field_0xd273; - undefined field_0xd274; - undefined field_0xd275; - undefined field_0xd276; - undefined field_0xd277; - undefined field_0xd278; - undefined field_0xd279; - undefined field_0xd27a; - undefined field_0xd27b; - undefined field_0xd27c; - undefined field_0xd27d; - undefined field_0xd27e; - undefined field_0xd27f; - undefined field_0xd280; - undefined field_0xd281; - undefined field_0xd282; - undefined field_0xd283; - undefined field_0xd284; - undefined field_0xd285; - undefined field_0xd286; - undefined field_0xd287; - undefined field_0xd288; - undefined field_0xd289; - undefined field_0xd28a; - undefined field_0xd28b; - undefined field_0xd28c; - undefined field_0xd28d; - undefined field_0xd28e; - undefined field_0xd28f; - undefined field_0xd290; - undefined field_0xd291; - undefined field_0xd292; - undefined field_0xd293; - undefined field_0xd294; - undefined field_0xd295; - undefined field_0xd296; - undefined field_0xd297; - undefined field_0xd298; - undefined field_0xd299; - undefined field_0xd29a; - undefined field_0xd29b; - undefined field_0xd29c; - undefined field_0xd29d; - undefined field_0xd29e; - undefined field_0xd29f; - undefined field_0xd2a0; - undefined field_0xd2a1; - undefined field_0xd2a2; - undefined field_0xd2a3; - undefined field_0xd2a4; - undefined field_0xd2a5; - undefined field_0xd2a6; - undefined field_0xd2a7; - undefined field_0xd2a8; - undefined field_0xd2a9; - undefined field_0xd2aa; - undefined field_0xd2ab; - undefined field_0xd2ac; - undefined field_0xd2ad; - undefined field_0xd2ae; - undefined field_0xd2af; - undefined field_0xd2b0; - undefined field_0xd2b1; - undefined field_0xd2b2; - undefined field_0xd2b3; - undefined field_0xd2b4; - undefined field_0xd2b5; - undefined field_0xd2b6; - undefined field_0xd2b7; - undefined field_0xd2b8; - undefined field_0xd2b9; - undefined field_0xd2ba; - undefined field_0xd2bb; - undefined field_0xd2bc; - undefined field_0xd2bd; - undefined field_0xd2be; - undefined field_0xd2bf; - undefined field_0xd2c0; - undefined field_0xd2c1; - undefined field_0xd2c2; - undefined field_0xd2c3; - undefined field_0xd2c4; - undefined field_0xd2c5; - undefined field_0xd2c6; - undefined field_0xd2c7; - undefined field_0xd2c8; - undefined field_0xd2c9; - undefined field_0xd2ca; - undefined field_0xd2cb; - undefined field_0xd2cc; - undefined field_0xd2cd; - undefined field_0xd2ce; - undefined field_0xd2cf; - undefined field_0xd2d0; - undefined field_0xd2d1; - undefined field_0xd2d2; - undefined field_0xd2d3; - undefined field_0xd2d4; - undefined field_0xd2d5; - undefined field_0xd2d6; - undefined field_0xd2d7; - undefined field_0xd2d8; - undefined field_0xd2d9; - undefined field_0xd2da; - undefined field_0xd2db; - undefined field_0xd2dc; - undefined field_0xd2dd; - undefined field_0xd2de; - undefined field_0xd2df; + u8 field_0xd260; + u8 field_0xd261; + u8 field_0xd262; + u8 field_0xd263; + u8 field_0xd264; + u8 field_0xd265; + u8 field_0xd266; + u8 field_0xd267; + u8 field_0xd268; + u8 field_0xd269; + u8 field_0xd26a; + u8 field_0xd26b; + u8 field_0xd26c; + u8 field_0xd26d; + u8 field_0xd26e; + u8 field_0xd26f; + u8 field_0xd270; + u8 field_0xd271; + u8 field_0xd272; + u8 field_0xd273; + u8 field_0xd274; + u8 field_0xd275; + u8 field_0xd276; + u8 field_0xd277; + u8 field_0xd278; + u8 field_0xd279; + u8 field_0xd27a; + u8 field_0xd27b; + u8 field_0xd27c; + u8 field_0xd27d; + u8 field_0xd27e; + u8 field_0xd27f; + u8 field_0xd280; + u8 field_0xd281; + u8 field_0xd282; + u8 field_0xd283; + u8 field_0xd284; + u8 field_0xd285; + u8 field_0xd286; + u8 field_0xd287; + u8 field_0xd288; + u8 field_0xd289; + u8 field_0xd28a; + u8 field_0xd28b; + u8 field_0xd28c; + u8 field_0xd28d; + u8 field_0xd28e; + u8 field_0xd28f; + u8 field_0xd290; + u8 field_0xd291; + u8 field_0xd292; + u8 field_0xd293; + u8 field_0xd294; + u8 field_0xd295; + u8 field_0xd296; + u8 field_0xd297; + u8 field_0xd298; + u8 field_0xd299; + u8 field_0xd29a; + u8 field_0xd29b; + u8 field_0xd29c; + u8 field_0xd29d; + u8 field_0xd29e; + u8 field_0xd29f; + u8 field_0xd2a0; + u8 field_0xd2a1; + u8 field_0xd2a2; + u8 field_0xd2a3; + u8 field_0xd2a4; + u8 field_0xd2a5; + u8 field_0xd2a6; + u8 field_0xd2a7; + u8 field_0xd2a8; + u8 field_0xd2a9; + u8 field_0xd2aa; + u8 field_0xd2ab; + u8 field_0xd2ac; + u8 field_0xd2ad; + u8 field_0xd2ae; + u8 field_0xd2af; + u8 field_0xd2b0; + u8 field_0xd2b1; + u8 field_0xd2b2; + u8 field_0xd2b3; + u8 field_0xd2b4; + u8 field_0xd2b5; + u8 field_0xd2b6; + u8 field_0xd2b7; + u8 field_0xd2b8; + u8 field_0xd2b9; + u8 field_0xd2ba; + u8 field_0xd2bb; + u8 field_0xd2bc; + u8 field_0xd2bd; + u8 field_0xd2be; + u8 field_0xd2bf; + u8 field_0xd2c0; + u8 field_0xd2c1; + u8 field_0xd2c2; + u8 field_0xd2c3; + u8 field_0xd2c4; + u8 field_0xd2c5; + u8 field_0xd2c6; + u8 field_0xd2c7; + u8 field_0xd2c8; + u8 field_0xd2c9; + u8 field_0xd2ca; + u8 field_0xd2cb; + u8 field_0xd2cc; + u8 field_0xd2cd; + u8 field_0xd2ce; + u8 field_0xd2cf; + u8 field_0xd2d0; + u8 field_0xd2d1; + u8 field_0xd2d2; + u8 field_0xd2d3; + u8 field_0xd2d4; + u8 field_0xd2d5; + u8 field_0xd2d6; + u8 field_0xd2d7; + u8 field_0xd2d8; + u8 field_0xd2d9; + u8 field_0xd2da; + u8 field_0xd2db; + u8 field_0xd2dc; + u8 field_0xd2dd; + u8 field_0xd2de; + u8 field_0xd2df; // 0xD2E0: Appears to keep track of what tiles are the fixed room tiles when generating // a fixed room that isn't the whole floor. u8 fixed_room_room_index; - undefined field_0xd2e1; - undefined field_0xd2e2; - undefined field_0xd2e3; + u8 field_0xd2e1; + u8 field_0xd2e2; + u8 field_0xd2e3; // 0xD2E4: This is an array of pointers that point to the actual tile structs within the // dungeon struct struct tile* tile_ptrs[32][56]; u8 n_rooms; // 0xEEE4: Number of rooms on the current floor - undefined field_0xeee5; // Uninitialized, likely padding - undefined field_0xeee6; // Uninitialized, likely padding - undefined field_0xeee7; // Uninitialized, likely padding + u8 field_0xeee5; // Uninitialized, likely padding + u8 field_0xeee6; // Uninitialized, likely padding + u8 field_0xeee7; // Uninitialized, likely padding // 0xEEE8: Array of structs that contain data about the rooms on the current floor struct room_data room_data[32]; // 0xF268: Array that counts the amount of elements on each row of natural_junction_list @@ -1368,18 +1368,25 @@ struct dungeon { u16 unknown_matrix_0x1212C[9][3]; // 0x12162: Buffer to store some AT4PX file after being decompressed // This is somehow related to tile::texture_id and tile variations? + + // TODO Something is omitted from the dungeon struct in JP, but it is not known what is missing. + // For the time being, take some bytes out of this array to allow JP usage of this struct to match. +#ifdef JAPAN + u8 unknown_file_buffer_0x12162[2268]; +#else u8 unknown_file_buffer_0x12162[2352]; +#endif // 0x12A92: Unknown array, probably related to unknown_tile_matrix // since they get initialized together. u16 unknown_array_0x12A92[9]; // 0x12AA4: Pointer to data about the fixed room such as width and height. Gets set after // loading the data for a fixed room when generating a floor. Gets set back to null when // done generating a floor. - undefined* unk_fixed_room_pointer; + u8* unk_fixed_room_pointer; // 0x12AA8: This flag is set by the move 0x191 ("Trapper") which is the effect // of the Trapper Orb. If true, the game will try to spawn a trap. bool trapper_orb_flag; - undefined field_0x12aa9; // Likely padding + u8 field_0x12aa9; // Likely padding // 0x12AAA: Location to spawn the trap by trapper_orb_flag. struct position trapper_orb_trap_pos; // 0x12AAE: Trap ID to spawn the trap by trapper_orb_flag. Notably, the game @@ -1387,119 +1394,119 @@ struct dungeon { enum trap_id traper_orb_trap_id; // 0x12AAF: Alignment to spawn the trap by trapper_orb_flag. u8 trapper_orb_trap_team; - undefined field_0x12ab0; - undefined field_0x12ab1; - undefined field_0x12ab2; - undefined field_0x12ab3; - undefined field_0x12ab4; - undefined field_0x12ab5; - undefined field_0x12ab6; - undefined field_0x12ab7; - undefined field_0x12ab8; - undefined field_0x12ab9; - undefined field_0x12aba; - undefined field_0x12abb; - undefined field_0x12abc; - undefined field_0x12abd; - undefined field_0x12abe; - undefined field_0x12abf; - undefined field_0x12ac0; - undefined field_0x12ac1; - undefined field_0x12ac2; - undefined field_0x12ac3; - undefined field_0x12ac4; - undefined field_0x12ac5; - undefined field_0x12ac6; - undefined field_0x12ac7; - undefined field_0x12ac8; - undefined field_0x12ac9; - undefined field_0x12aca; - undefined field_0x12acb; - undefined field_0x12acc; - undefined field_0x12acd; - undefined field_0x12ace; - undefined field_0x12acf; - undefined field_0x12ad0; - undefined field_0x12ad1; - undefined field_0x12ad2; - undefined field_0x12ad3; - undefined field_0x12ad4; - undefined field_0x12ad5; - undefined field_0x12ad6; - undefined field_0x12ad7; - undefined field_0x12ad8; - undefined field_0x12ad9; - undefined field_0x12ada; - undefined field_0x12adb; - undefined field_0x12adc; - undefined field_0x12add; - undefined field_0x12ade; - undefined field_0x12adf; - undefined field_0x12ae0; - undefined field_0x12ae1; - undefined field_0x12ae2; - undefined field_0x12ae3; - undefined field_0x12ae4; - undefined field_0x12ae5; - undefined field_0x12ae6; - undefined field_0x12ae7; - undefined field_0x12ae8; - undefined field_0x12ae9; - undefined field_0x12aea; - undefined field_0x12aeb; - undefined field_0x12aec; - undefined field_0x12aed; - undefined field_0x12aee; - undefined field_0x12aef; - undefined field_0x12af0; - undefined field_0x12af1; - undefined field_0x12af2; - undefined field_0x12af3; - undefined field_0x12af4; - undefined field_0x12af5; - undefined field_0x12af6; - undefined field_0x12af7; + u8 field_0x12ab0; + u8 field_0x12ab1; + u8 field_0x12ab2; + u8 field_0x12ab3; + u8 field_0x12ab4; + u8 field_0x12ab5; + u8 field_0x12ab6; + u8 field_0x12ab7; + u8 field_0x12ab8; + u8 field_0x12ab9; + u8 field_0x12aba; + u8 field_0x12abb; + u8 field_0x12abc; + u8 field_0x12abd; + u8 field_0x12abe; + u8 field_0x12abf; + u8 field_0x12ac0; + u8 field_0x12ac1; + u8 field_0x12ac2; + u8 field_0x12ac3; + u8 field_0x12ac4; + u8 field_0x12ac5; + u8 field_0x12ac6; + u8 field_0x12ac7; + u8 field_0x12ac8; + u8 field_0x12ac9; + u8 field_0x12aca; + u8 field_0x12acb; + u8 field_0x12acc; + u8 field_0x12acd; + u8 field_0x12ace; + u8 field_0x12acf; + u8 field_0x12ad0; + u8 field_0x12ad1; + u8 field_0x12ad2; + u8 field_0x12ad3; + u8 field_0x12ad4; + u8 field_0x12ad5; + u8 field_0x12ad6; + u8 field_0x12ad7; + u8 field_0x12ad8; + u8 field_0x12ad9; + u8 field_0x12ada; + u8 field_0x12adb; + u8 field_0x12adc; + u8 field_0x12add; + u8 field_0x12ade; + u8 field_0x12adf; + u8 field_0x12ae0; + u8 field_0x12ae1; + u8 field_0x12ae2; + u8 field_0x12ae3; + u8 field_0x12ae4; + u8 field_0x12ae5; + u8 field_0x12ae6; + u8 field_0x12ae7; + u8 field_0x12ae8; + u8 field_0x12ae9; + u8 field_0x12aea; + u8 field_0x12aeb; + u8 field_0x12aec; + u8 field_0x12aed; + u8 field_0x12aee; + u8 field_0x12aef; + u8 field_0x12af0; + u8 field_0x12af1; + u8 field_0x12af2; + u8 field_0x12af3; + u8 field_0x12af4; + u8 field_0x12af5; + u8 field_0x12af6; + u8 field_0x12af7; // 0x12AF8: The amount of items "sniffed" by the Acute Sniffer iq skill when a floor starts. u16 acute_sniffer_item_count; // 0x12AFA: Number of normal item spawns. Does not include monster held items and additional // items in walls or Monster Houses u16 n_normal_item_spawns; bool gravity; // 0x12AFC: Gravity is in effect - undefined field_0x12afd; + u8 field_0x12afd; // 0x12AFE: Victories on one floor counter. s16 victory_counter; - undefined field_0x12b00; - undefined field_0x12b01; - undefined field_0x12b02; - undefined field_0x12b03; - undefined field_0x12b04; - undefined field_0x12b05; - undefined field_0x12b06; - undefined field_0x12b07; - undefined field_0x12b08; - undefined field_0x12b09; - undefined field_0x12b0a; - undefined field_0x12b0b; - undefined field_0x12b0c; - undefined field_0x12b0d; - undefined field_0x12b0e; - undefined field_0x12b0f; - undefined field_0x12b10; - undefined field_0x12b11; - undefined field_0x12b12; - undefined field_0x12b13; - undefined field_0x12b14; - undefined field_0x12b15; - undefined field_0x12b16; - undefined field_0x12b17; - undefined field_0x12b18; - undefined field_0x12b19; - undefined field_0x12b1a; - undefined field_0x12b1b; - undefined field_0x12b1c; - undefined field_0x12b1d; - undefined field_0x12b1e; - undefined field_0x12b1f; + u8 field_0x12b00; + u8 field_0x12b01; + u8 field_0x12b02; + u8 field_0x12b03; + u8 field_0x12b04; + u8 field_0x12b05; + u8 field_0x12b06; + u8 field_0x12b07; + u8 field_0x12b08; + u8 field_0x12b09; + u8 field_0x12b0a; + u8 field_0x12b0b; + u8 field_0x12b0c; + u8 field_0x12b0d; + u8 field_0x12b0e; + u8 field_0x12b0f; + u8 field_0x12b10; + u8 field_0x12b11; + u8 field_0x12b12; + u8 field_0x12b13; + u8 field_0x12b14; + u8 field_0x12b15; + u8 field_0x12b16; + u8 field_0x12b17; + u8 field_0x12b18; + u8 field_0x12b19; + u8 field_0x12b1a; + u8 field_0x12b1b; + u8 field_0x12b1c; + u8 field_0x12b1d; + u8 field_0x12b1e; + u8 field_0x12b1f; // 0x12B20: Probably counts how many sprites or monster entries the fixed room wants // loaded. u32 fixed_room_monster_sprite_counter; @@ -1508,8 +1515,8 @@ struct dungeon { // 0x12B25: Whether or not the hidden stairs spawn chance be boosted for the floor // (by 20%; see HIDDEN_STAIRS_SPAWN_CHANCE_MULTIPLIER) bool boost_hidden_stairs_spawn_chance; - undefined field_0x12b26; - undefined field_0x12b27; + u8 field_0x12b26; + u8 field_0x12b27; //struct entity_table entity_table; // 0x12B28: Table of all entities in the dungeon // The pointers point into the entities array @@ -1545,37 +1552,37 @@ struct dungeon { u32 snatch_status_unique_id; // 0x19910: Spawn genid of the monster to be spawned by the effect of Illuminate u16 illuminate_spawn_genid; - undefined field_0x19912; - undefined field_0x19913; + u8 field_0x19912; + u8 field_0x19913; // 0x19914: List that matches monster IDs with their sprite index on this floor enum monster_id sprite_indexes[1155]; - undefined field_0x1a21a; - undefined field_0x1a21b; + u8 field_0x1a21a; + u8 field_0x1a21b; // 0x1A21C: Data about the map, the camera and the touchscreen numbers struct display_data display_data; struct minimap_display_data minimap_display_data; // 0x1A264: Data used to display the minimap // 0x286B0: Initialized to 0xFF, then set to a copy of dungeon::group_id enum dungeon_group_id group_id_copy; // 0x286B1: Initialized to 0xFF, then set to a copy of dungeon::0x74B - undefined field_0x286b1; + u8 field_0x286b1; struct floor_properties floor_properties; // 0x286B2: Properties about the current floor // 0x286D2: Maybe a 0x10 long array? - undefined2 field_0x286d2; - undefined2 field_0x286d4; - undefined2 field_0x286d6; - undefined2 field_0x286d8; - undefined2 field_0x286da; - undefined2 field_0x286dc; - undefined2 field_0x286de; - undefined2 field_0x286e0; - undefined2 field_0x286e2; - undefined2 field_0x286e4; - undefined2 field_0x286e6; - undefined2 field_0x286e8; - undefined2 field_0x286ea; - undefined2 field_0x286ec; - undefined2 field_0x286ee; - undefined2 field_0x286f0; + u16 field_0x286d2; + u16 field_0x286d4; + u16 field_0x286d6; + u16 field_0x286d8; + u16 field_0x286da; + u16 field_0x286dc; + u16 field_0x286de; + u16 field_0x286e0; + u16 field_0x286e2; + u16 field_0x286e4; + u16 field_0x286e6; + u16 field_0x286e8; + u16 field_0x286ea; + u16 field_0x286ec; + u16 field_0x286ee; + u16 field_0x286f0; // 0x286F2: Spawn weights for regular items. It's the unrolled form of this floor's regular // item spawn list. // It has enough space to hold 1416 entries (1400 items + 16 categories), but only the @@ -1609,78 +1616,78 @@ struct dungeon { // 0x2C9EA: List of the indices in the complete monster spawn table for this floor that were // chosen to spawn on it. It gets rerandomized at the start of each new floor. u16 spawn_table_entries_chosen[16]; - undefined field_0x2ca0a; - undefined field_0x2ca0b; + u8 field_0x2ca0a; + u8 field_0x2ca0b; // 0x2CA0C: Holds the name for the entity that caused the faint. The exact size is a guess. // Likely larger because of entities like the Explosion Trap. char fainted_monster_cause_entity_name[10]; - undefined field_0x2ca16; - undefined field_0x2ca17; - undefined field_0x2ca18; - undefined field_0x2ca19; - undefined field_0x2ca1a; - undefined field_0x2ca1b; - undefined field_0x2ca1c; - undefined field_0x2ca1d; - undefined field_0x2ca1e; - undefined field_0x2ca1f; - undefined field_0x2ca20; - undefined field_0x2ca21; - undefined field_0x2ca22; - undefined field_0x2ca23; - undefined field_0x2ca24; - undefined field_0x2ca25; - undefined field_0x2ca26; - undefined field_0x2ca27; - undefined field_0x2ca28; - undefined field_0x2ca29; + u8 field_0x2ca16; + u8 field_0x2ca17; + u8 field_0x2ca18; + u8 field_0x2ca19; + u8 field_0x2ca1a; + u8 field_0x2ca1b; + u8 field_0x2ca1c; + u8 field_0x2ca1d; + u8 field_0x2ca1e; + u8 field_0x2ca1f; + u8 field_0x2ca20; + u8 field_0x2ca21; + u8 field_0x2ca22; + u8 field_0x2ca23; + u8 field_0x2ca24; + u8 field_0x2ca25; + u8 field_0x2ca26; + u8 field_0x2ca27; + u8 field_0x2ca28; + u8 field_0x2ca29; // 0x2CA2A: Holds the name for the monster that fainted. The exact size is a guess. char fainted_monster_name[10]; - undefined field_0x2ca34; - undefined field_0x2ca35; - undefined field_0x2ca36; - undefined field_0x2ca37; - undefined field_0x2ca38; - undefined field_0x2ca39; - undefined field_0x2ca3a; - undefined field_0x2ca3b; - undefined field_0x2ca3c; - undefined field_0x2ca3d; - undefined field_0x2ca3e; - undefined field_0x2ca3f; - undefined field_0x2ca40; - undefined field_0x2ca41; - undefined field_0x2ca42; - undefined field_0x2ca43; - undefined field_0x2ca44; - undefined field_0x2ca45; - undefined field_0x2ca46; - undefined field_0x2ca47; + u8 field_0x2ca34; + u8 field_0x2ca35; + u8 field_0x2ca36; + u8 field_0x2ca37; + u8 field_0x2ca38; + u8 field_0x2ca39; + u8 field_0x2ca3a; + u8 field_0x2ca3b; + u8 field_0x2ca3c; + u8 field_0x2ca3d; + u8 field_0x2ca3e; + u8 field_0x2ca3f; + u8 field_0x2ca40; + u8 field_0x2ca41; + u8 field_0x2ca42; + u8 field_0x2ca43; + u8 field_0x2ca44; + u8 field_0x2ca45; + u8 field_0x2ca46; + u8 field_0x2ca47; // 0x2CA48: A monster name that is copied from dungeon::unk_fainted_monster_name. Maybe for // situations where the player loses because the partner, escort, or accompanying monster // fainted? Another poossible use is when leaving a dungeon after a mission? Exact size is // a guess. char loss_related_monster_name[10]; - undefined field_0x2ca52; - undefined field_0x2ca53; - undefined field_0x2ca54; - undefined field_0x2ca55; - undefined field_0x2ca56; - undefined field_0x2ca57; - undefined field_0x2ca58; - undefined field_0x2ca59; - undefined field_0x2ca5a; - undefined field_0x2ca5b; - undefined field_0x2ca5c; - undefined field_0x2ca5d; - undefined field_0x2ca5e; - undefined field_0x2ca5f; - undefined field_0x2ca60; - undefined field_0x2ca61; - undefined field_0x2ca62; - undefined field_0x2ca63; - undefined field_0x2ca64; - undefined field_0x2ca65; + u8 field_0x2ca52; + u8 field_0x2ca53; + u8 field_0x2ca54; + u8 field_0x2ca55; + u8 field_0x2ca56; + u8 field_0x2ca57; + u8 field_0x2ca58; + u8 field_0x2ca59; + u8 field_0x2ca5a; + u8 field_0x2ca5b; + u8 field_0x2ca5c; + u8 field_0x2ca5d; + u8 field_0x2ca5e; + u8 field_0x2ca5f; + u8 field_0x2ca60; + u8 field_0x2ca61; + u8 field_0x2ca62; + u8 field_0x2ca63; + u8 field_0x2ca64; + u8 field_0x2ca65; // 0x02CA66: The cause of the mission over. Identical to the damage source in HandleFaint, // but can be set to some non-damage related reasons manually by the game. IE: "cleared the // dungeon." and "succeeded in the rescue mission." @@ -1698,45 +1705,45 @@ struct dungeon { // 0x2CA78: Copy of the fainted monster's defenive stats. u8 fainted_monster_defensive_stats[2]; u8 fainted_monster_level; // 0x2CA7A: Copy of fainted monster's level. - undefined field_0x2ca7b; + u8 field_0x2ca7b; // 0x2CA7C: This is a monster summary related to the menu when leaving a dungeon. When // succesfully exiting a dungeon it is the leader. May be other allies when they faint? struct monster_summary getout_monster_summary; // 0x2CAF4: One more than the maximum number of floors in the current dungeon u8 n_floors_plus_one; - undefined field_0x2caf5; - undefined field_0x2caf6; - undefined field_0x2caf7; + u8 field_0x2caf5; + u8 field_0x2caf6; + u8 field_0x2caf7; // 0x2CAF8: Related to playing dungeon music? Initialized to 0x4. - undefined4 field_0x2caf8; + u32 field_0x2caf8; // Related to playing dungeon music? - undefined field_0x2cafc; - undefined field_0x2cafd; - undefined field_0x2cafe; - undefined field_0x2caff; + u8 field_0x2cafc; + u8 field_0x2cafd; + u8 field_0x2cafe; + u8 field_0x2caff; // Related to playing dungeon music? - undefined2 field_0x2cb00; + u16 field_0x2cb00; // Related to playing dungeon music? - undefined2 field_0x2cb02; + u16 field_0x2cb02; // 0x2CB04: Related to playing dungeon music? - undefined2 field_0x2cb04; + u16 field_0x2cb04; // 0x2CB06: Current Dunegon Music ID enum music_id dungeon_music_playing_id; - undefined field_0x2cb08; - undefined field_0x2cb09; - undefined field_0x2cb0a; - undefined field_0x2cb0b; - undefined field_0x2cb0c; - undefined field_0x2cb0d; - undefined field_0x2cb0e; - undefined field_0x2cb0f; + u8 field_0x2cb08; + u8 field_0x2cb09; + u8 field_0x2cb0a; + u8 field_0x2cb0b; + u8 field_0x2cb0c; + u8 field_0x2cb0d; + u8 field_0x2cb0e; + u8 field_0x2cb0f; // 0x2CB10: Somehow related to display_data::hallucinating and seems to maybe control // the sleeping animations when the camera is pointed away from a hallucinating monster? // Initialized to 0x1. bool unk_camera_tracker; - undefined field_0x2cb11; - undefined field_0x2cb12; - undefined field_0x2cb13; + u8 field_0x2cb11; + u8 field_0x2cb12; + u8 field_0x2cb13; }; diff --git a/include/dungeon_mode.h b/include/dungeon_mode.h index f1d112a4..ba45b928 100644 --- a/include/dungeon_mode.h +++ b/include/dungeon_mode.h @@ -19,19 +19,6 @@ struct pixel_position { u32 y; }; -// Dungeon data -/* struct dungeon { */ -/* u8 PAD1[1864]; */ -/* u8 dungeon; // 0x748 */ -/* u8 floor; // 0x749 */ -/* u8 PAD2[74554]; */ -/* #ifndef JAPAN */ -/* u8 PAD3[164]; */ -/* #endif */ -/* struct entity* party_members[4]; // 0x12B28 */ -/* // Possibly more stuff */ -/* }; */ - // Item info struct item { // 0x0: flags: 1-byte bitfield @@ -64,8 +51,8 @@ struct monster_stat_modifiers { s16 defensive_stages[2]; // 0x4: {def, sp_def} s16 hit_chance_stages[2]; // 0x8: {accuracy, evasion} s16 flash_fire_boost; // 0xC: can be 0, 1, or 2 - undefined field_0xe; - undefined field_0xf; + u8 field_0xe; + u8 field_0xf; // Some moves like Screech affect the damage calculation differently than, e.g., Leer // 0x10: binary fixed-point (8 fraction bits), {atk, sp_atk}; from Charm, Memento, etc. fx32_8 offensive_multipliers[2]; @@ -84,9 +71,9 @@ struct statuses { enum type_id original_types[2]; // 0x3: The move id to be used if statuses::bide is 1. u8 bide_move_id; - undefined field_0x4; - undefined field_0x5; - undefined field_0x6; + u8 field_0x4; + u8 field_0x5; + u8 field_0x6; // 0x7: Unique number given to the monster when spawning to differentiate it from other // monsters and to properly keep track of a monster. Likely used because a monster could be // spawned into the same slot as an old monster and using a pointer alone could cause some @@ -108,11 +95,11 @@ struct statuses { // will deal. There is no noticable difference because the table this value is looked up // on is filled with 0x6 u8 badly_poisoned_damage_count; - undefined field_0x1a; + u8 field_0x1a; u8 freeze; // 0x1B: STATUS_FROZEN if 1 - undefined field_0x1c; - undefined field_0x1d; - undefined field_0x1e; + u8 field_0x1c; + u8 field_0x1d; + u8 field_0x1e; // 0x1F: Controls the animation that plays when taking damage from the constriction status. // For some reason this is initalized to 0x22 (34)? Which is the animation used by // the exclusive item Nether Veil. @@ -120,8 +107,8 @@ struct statuses { u8 freeze_turns; // 0x23: Turns left for the status in statuses::freeze // 0x24: Turns left until residual damage for the status in statuses::freeze, if applicable u8 freeze_damage_countdown; - undefined field_0x25; - undefined field_0x26; + u8 field_0x25; + u8 field_0x26; u8 cringe; // 0x27: STATUS_CRINGE if 1 u8 cringe_turns; // 0x28: Turns left for the status in statuses::cringe u8 bide; // 0x29: STATUS_BIDE if 1 @@ -135,17 +122,17 @@ struct statuses { // 0x30: Set to monster::is_not_team_member of the attacker (the one causing the decoy status). u8 curse_applier_non_team_member_flag; // 0x31: Set to 1 on a Pokemon when inflicted with the Decoy status. - undefined unk_decoy_tracker; + u8 unk_decoy_tracker; u8 curse_turns; // 0x32: Turns left for the status in statuses::curse // 0x33: Turns left until residual damage for the status in statuses::curse, if applicable u8 curse_damage_countdown; - undefined field_0x34; - undefined field_0x35; - undefined field_0x36; + u8 field_0x34; + u8 field_0x35; + u8 field_0x36; u8 leech_seed; // 0x37: STATUS_LEECH_SEED if 1 - undefined field_0x38; - undefined field_0x39; - undefined field_0x3a; + u8 field_0x38; + u8 field_0x39; + u8 field_0x3a; // 0x3B: Used to track the statuses::statuses_unique_id of the relevant monster for // statuses like Leech Seed and Destiny Bond. u32 statuses_applier_id; @@ -156,7 +143,7 @@ struct statuses { // 0x41: Turns left until residual damage for the status in statuses::leech_seed, if applicable. // Behaves weirdly without an afflictor u8 leech_seed_damage_countdown; - undefined field_0x42; + u8 field_0x42; u8 sure_shot; // 0x43: STATUS_SURE_SHOT if 1 u8 sure_shot_turns; // 0x44: Turns left for the status in statuses::sure_shot u8 long_toss; // 0x45: STATUS_LONG_TOSS if 1 @@ -182,12 +169,12 @@ struct statuses { // 0x58: Appears to be a flag for when a monster increasces their speed. Maybe only used // by the RunLeaderTurn function to know if the leader has changed their speed stage partway // through the function? - undefined unk_sped_up_tracker; + u8 unk_sped_up_tracker; // 0x59: Maybe related to being a team member and new recruit? Set to 1 in TryRecruit // and 0 in SpawnTeam. Also checked in EnemyEvolution to be 0 before evolving. Maybe to // prevent a recently recruited ally from evolving after and or to add a monster to the // assembly after the completion of a dungeon? - undefined field_0x59; + u8 field_0x59; #ifndef JAPAN // 0x5A: Possibly a flag while in action. Could also be a flag to cause the burn from // lava, heal a burn from water, and decrease hunger in the walls. @@ -210,7 +197,7 @@ struct statuses { // 0x61: Is initalized to 0x63 (99). Changing it from this value causes the monster to // begin rendering differently? For example, it causes entity::0xB3 to be 1 and forces // entity::0x28 to be 0. - undefined field_0x61; + u8 field_0x61; // 0x62: Flag for two-turn moves that haven't concluded yet. This is also a graphical flag. // A value of 1 mean "high up" (Fly/Bounce). A value of 2 means some other condition like // Dig, Shadow Force, etc. Other values are treated as invalid. Also used for the move @@ -218,14 +205,14 @@ struct statuses { u8 two_turn_move_invincible; // 0x63: Related to handling AI when a decoy is present on the floor? // Seems to only be 0, 1, 2 - undefined decoy_ai_tracker; + u8 decoy_ai_tracker; #ifndef JAPAN - undefined field_0x64; - undefined field_0x65; - undefined field_0x66; + u8 field_0x64; + u8 field_0x65; + u8 field_0x66; #endif // 0x67: 1 means normal. 0 means half speed. 2, 3, and 4 mean 2x, 3x, and 4x speed. - int speed_stage; + s32 speed_stage; // Each counter ticks down to 0 turn by turn. The current speed_stage is calculated as: // min(max({# nonzero speed_up_counters} - {# nonzero speed_down_counters}, 0), 4) u8 speed_up_counters[5]; // 0x6B @@ -278,9 +265,9 @@ struct status_icon_flags { // flags (see UpdateStatusIconBitfield). bool f_freeze : 1; // Ice block u8 flags_unk2 : 7; - undefined field_0x5; - undefined field_0x6; - undefined field_0x7; + u8 field_0x5; + u8 field_0x6; + u8 field_0x7; }; // Stores a parameter for an action taken by a monster @@ -289,7 +276,7 @@ struct action_parameter { // E.g., this is the monster index when taking an action on a monster, the move index when // using a move or a union item_index value when using an item. u8 action_use_idx; - undefined field_0x1; + u8 field_0x1; struct position item_pos; // 0x2: Position of the item to use when using an item on the floor }; @@ -297,7 +284,7 @@ struct action_parameter { struct action_data { enum action action_id; // 0x0: Action ID enum direction_id direction : 8; // 0x2: Direction in which the action will be performed - undefined field_0x3; + u8 field_0x3; struct action_parameter action_parameters[2]; // 0x4: Parameters for the action s16 field_0x10; s16 field_0x12; @@ -327,16 +314,16 @@ struct monster { bool is_ally; enum shopkeeper_mode shopkeeper : 8; // 0x9 u8 level; // 0xA - undefined field_0xb; + u8 field_0xb; s16 team_index; // 0xC: In order by team lineup s16 iq; // 0xE s16 hp; // 0x10: Current HP s16 max_hp_stat; // 0x12: Add to max_hp_boost for the actual max HP - undefined field_0x14; - undefined field_0x15; + u8 field_0x14; + u8 field_0x15; s16 max_hp_boost; // 0x16: From Life Seeds, Sitrus Berries, etc. - undefined field_0x18; - undefined field_0x19; + u8 field_0x18; + u8 field_0x19; u8 offensive_stats[2]; // 0x1A: {atk, sp_atk} u8 defensive_stats[2]; // 0x1C: {def, sp_def} u8 field_0x1e; @@ -345,7 +332,7 @@ struct monster { struct monster_stat_modifiers stat_modifiers; // 0x24 s16 hidden_power_base_power; // 0x44 enum type_id hidden_power_type : 8; // 0x46 - undefined field_0x47; + u8 field_0x47; enum dungeon_id joined_at : 8; // 0x48: Also used as a unique identifier for special monsters u8 joined_at_floor; // 0x49: Floor number of recruitment. 0 for special recruits struct action_data action; // 0x4A: Determines the action the monster will take on this turn @@ -360,21 +347,21 @@ struct monster { struct position prev_pos2; // 0x6E: Position 2 turns ago struct position prev_pos3; // 0x72: Position 3 turns ago struct position prev_pos4; // 0x76: Position 4 turns ago - undefined field_0x7a; - undefined field_0x7b; + u8 field_0x7a; + u8 field_0x7b; enum ai_objective ai_objective : 8; // 0x7C bool ai_not_next_to_target; // 0x7D: This NPC monster is not next to its current target bool ai_targeting_enemy; // 0x7E: This NPC monster is targeting an enemy monster bool ai_turning_around; // 0x7F: This NPC monster has decided to turn around // 0x80: entity::spawn_genid of the entity currently being targeted u16 ai_target_spawn_genid; - undefined field_0x82; - undefined field_0x83; + u8 field_0x82; + u8 field_0x83; struct entity* ai_target; // 0x84: Current or most recent AI target - undefined field_0x88; - undefined field_0x89; - undefined field_0x8a; - undefined field_0x8b; + u8 field_0x88; + u8 field_0x89; + u8 field_0x8a; + u8 field_0x8b; struct position ai_target_pos; // 0x8C: Position of the entity currently being targeted // 0x90: Work array while updating skills in the menu. Same meaning as iq_skill_flags. u32 iq_skill_menu_flags[3]; @@ -390,9 +377,9 @@ struct monster { enum type_id original_types[2]; // 0xAC / 0x3: The move id to be used if statuses::bide is 1. u8 bide_move_id; - undefined field_0xad; - undefined field_0xae; - undefined field_0xaf; + u8 field_0xad; + u8 field_0xae; + u8 field_0xaf; // 0xB0 / 0x7: Unique number given to the monster when spawning to differentiate it from other // monsters and to properly keep track of a monster. Likely used because a monster could be // spawned into the same slot as an old monster and using a pointer alone could cause some @@ -414,11 +401,11 @@ struct monster { // will deal. There is no noticable difference because the table this value is looked up // on is filled with 0x6 u8 badly_poisoned_damage_count; - undefined field_0xc3; + u8 field_0xc3; u8 freeze; // 0xc4 / 0x1B: STATUS_FROZEN if 1 - undefined field_0xc5; - undefined field_0xc6; - undefined field_0xc7; + u8 field_0xc5; + u8 field_0xc6; + u8 field_0xc7; // 0xC8 / 0x1F: Controls the animation that plays when taking damage from the constriction status. // For some reason this is initalized to 0x22 (34)? Which is the animation used by // the exclusive item Nether Veil. @@ -426,8 +413,8 @@ struct monster { u8 freeze_turns; // 0xCC / 0x23: Turns left for the status in statuses::freeze // 0xCD / 0x24: Turns left until residual damage for the status in statuses::freeze, if applicable u8 freeze_damage_countdown; - undefined field_0xCE; - undefined field_0xCF; + u8 field_0xCE; + u8 field_0xCF; u8 cringe; // 0xD0 / 0x27: STATUS_CRINGE if 1 u8 cringe_turns; // 0xD1 / 0x28: Turns left for the status in statuses::cringe u8 bide; // 0xD2 / 0x29: STATUS_BIDE if 1 @@ -441,17 +428,17 @@ struct monster { // 0xD9 / 0x30: Set to monster::is_not_team_member of the attacker (the one causing the decoy status). u8 curse_applier_non_team_member_flag; // 0xDA / 0x31: Set to 1 on a Pokemon when inflicted with the Decoy status. - undefined unk_decoy_tracker; + u8 unk_decoy_tracker; u8 curse_turns; // 0xDB / 0x32: Turns left for the status in statuses::curse // 0xDC / 0x33: Turns left until residual damage for the status in statuses::curse, if applicable u8 curse_damage_countdown; - undefined field_0xdd; - undefined field_0xde; - undefined field_0xdf; + u8 field_0xdd; + u8 field_0xde; + u8 field_0xdf; u8 leech_seed; // 0xE0 / 0x37: STATUS_LEECH_SEED if 1 - undefined field_0xe1; - undefined field_0xe2; - undefined field_0xe3; + u8 field_0xe1; + u8 field_0xe2; + u8 field_0xe3; // 0xE4 / 0x3B: Used to track the statuses::statuses_unique_id of the relevant monster for // statuses like Leech Seed and Destiny Bond. u32 statuses_applier_id; @@ -462,7 +449,7 @@ struct monster { // 0xEA / 0x41: Turns left until residual damage for the status in statuses::leech_seed, if applicable. // Behaves weirdly without an afflictor u8 leech_seed_damage_countdown; - undefined field_0xEB; + u8 field_0xEB; u8 sure_shot; // 0xEC / 0x43: STATUS_SURE_SHOT if 1 u8 sure_shot_turns; // 0xED / 0x44: Turns left for the status in statuses::sure_shot u8 long_toss; // 0xEE / 0x45: STATUS_LONG_TOSS if 1 @@ -488,12 +475,12 @@ struct monster { // 0x101 / 0x58: Appears to be a flag for when a monster increasces their speed. Maybe only used // by the RunLeaderTurn function to know if the leader has changed their speed stage partway // through the function? - undefined unk_sped_up_tracker; + u8 unk_sped_up_tracker; // 0x102 / 0x59: Maybe related to being a team member and new recruit? Set to 1 in TryRecruit // and 0 in SpawnTeam. Also checked in EnemyEvolution to be 0 before evolving. Maybe to // prevent a recently recruited ally from evolving after and or to add a monster to the // assembly after the completion of a dungeon? - undefined field_0x102; + u8 field_0x102; #ifndef JAPAN // 0x103 / 0x5A: Possibly a flag while in action. Could also be a flag to cause the burn from // lava, heal a burn from water, and decrease hunger in the walls. @@ -516,7 +503,7 @@ struct monster { // 0x10A / 0x61: Is initalized to 0x63 (99). Changing it from this value causes the monster to // begin rendering differently? For example, it causes entity::0xB3 to be 1 and forces // entity::0x28 to be 0. - undefined field_0x10a; + u8 field_0x10a; // 0x10B / 0x62: Flag for two-turn moves that haven't concluded yet. This is also a graphical flag. // A value of 1 mean "high up" (Fly/Bounce). A value of 2 means some other condition like // Dig, Shadow Force, etc. Other values are treated as invalid. Also used for the move @@ -524,14 +511,14 @@ struct monster { u8 two_turn_move_invincible; // 0x10C / 0x63: Related to handling AI when a decoy is present on the floor? // Seems to only be 0, 1, 2 - undefined decoy_ai_tracker; + u8 decoy_ai_tracker; #ifndef JAPAN - undefined field_0x10d; - undefined field_0x10e; - undefined field_0x10f; + u8 field_0x10d; + u8 field_0x10e; + u8 field_0x10f; #endif // 0x110 / 0x67: 1 means normal. 0 means half speed. 2, 3, and 4 mean 2x, 3x, and 4x speed. - int speed_stage; + s32 speed_stage; // Each counter ticks down to 0 turn by turn. The current speed_stage is calculated as: // min(max({# nonzero speed_up_counters} - {# nonzero speed_down_counters}, 0), 4) u8 speed_up_counters[5]; // 0x114 / 0x6B @@ -539,13 +526,13 @@ struct monster { u8 stockpile_stage; // 0x11E / 0x75: Goes from 0-3. STATUS_STOCKPILING if nonzero - undefined field_0x11f; + u8 field_0x11f; // 0x120: If zero, when the monster is standing in a room, the AI will make it head towards a // random exit. If nonzero, the monster will instead move in a random direction every turn. - int random_movement; + s32 random_movement; struct move moves[4]; // 0x124 u8 move_flags; // 0x144: 1-byte bitfield - undefined field_0x145; + u8 field_0x145; struct fixed_point belly; // 0x146 struct fixed_point max_belly; // 0x14A: // 0x14E: If true and the monster is an ally, the AI will skip it. False for enemies. @@ -553,7 +540,7 @@ struct monster { bool ai_next_to_target; // 0x14F: This NPC monster is next to its current target // 0x150: Set if monster::is_team_leader is true and belly is empty. bool famished; - undefined field_0x151; + u8 field_0x151; // 0x152: Seems to be true if the monster has already acted this turn: attacked, used an item, // or seemingly anything other than moving/resting. Also true when the monster faints. bool already_acted; @@ -564,8 +551,8 @@ struct monster { bool using_charged_move; // 0x155: True if the target attacked a Pokemon that has STATUS_GRUDGE. bool hit_grudge_monster; - undefined field_0x156; // 0 when the monster faints - undefined field_0x157; + u8 field_0x156; // 0 when the monster faints + u8 field_0x157; // 0x158: General-purpose bitflags tracking different bits of volatile state. // Together with prev_state_bitflags, this is typically used to determine whether // to log a message on a state change. @@ -605,18 +592,18 @@ struct monster { // 0x167: Set to true when the monster receives a critical hit. If true when the monster // attacks, Anger Point will activate. Set to false after the monster attacks. bool anger_point_flag; - undefined field_0x168; - undefined field_0x169; + u8 field_0x168; + u8 field_0x169; // 0x16A: When not DIR_NONE, monster will turn in the specified direction and // its AI will be forced to target the tile next to it in that direction. // Used to prevent bosses from turning towards team members the moment the boss fight // starts (which would override their intended starting facing direction). enum direction_id force_turn : 8; - undefined field_0x16b; - undefined field_0x16c; - undefined field_0x16d; - undefined field_0x16e; - undefined field_0x16f; + u8 field_0x16b; + u8 field_0x16c; + u8 field_0x16d; + u8 field_0x16e; + u8 field_0x16f; // 0x170: Set to make the monster disappear when using the move U-turn. bool uturn_hide_monster_flag; // 0x171: Some kind of visual flag? Gets set to 0 temporarily when changing Shaymin form @@ -629,8 +616,8 @@ struct monster { bool field_0x173; // 0x174: Set when the leader and falling through a pitfall trap. bool pitfall_trap_flag_0x174; - undefined field_0x175; - undefined field_0x176; + u8 field_0x175; + u8 field_0x176; // 0x177: Appears to be the direction for using sleep talk? Set to DIR_NONE when awake. enum direction_id sleep_talk_direction : 8; // 0x178: Appears to be the direction for using snore? Set to DIR_NONE when awake. @@ -639,19 +626,19 @@ struct monster { // related to direction somehow. Checked in a loop for every monster. u8 field_0x179; // 0x17A: Somehow related to sprite size? - undefined field_0x17a; + u8 field_0x17a; // 0x17B: Somehow related to sprite size? - undefined field_0x17b; - undefined field_0x17c; - undefined field_0x17d; + u8 field_0x17b; + u8 field_0x17c; + u8 field_0x17d; struct position target_pos; // 0x17E: The AI's target's position on screen struct position pixel_pos; // 0x182: The monster's graphical position on screen? - undefined field_0x186; - undefined field_0x187; - undefined field_0x188; - undefined field_0x189; - undefined field_0x18a; - undefined field_0x18b; + u8 field_0x186; + u8 field_0x187; + u8 field_0x188; + u8 field_0x189; + u8 field_0x18a; + u8 field_0x18b; // 0x18C: Bitflags that cause non-damaging exclusive items to trigger on the // attacker after they have completed their move. For example, the Eclipse Robe // (Darkrai exclusive item) may afflict attacking enemies with the nightmare @@ -665,130 +652,130 @@ struct monster { // static, and flame body. (Only uses first 11 bits). One exception is the move // Rapid Spin which sets one of the flags for the user. u16 contact_ability_trigger_bitflags; - undefined field_0x194; - undefined field_0x195; - undefined field_0x196; - undefined field_0x197; - undefined field_0x198; - undefined field_0x199; - undefined field_0x19a; - undefined field_0x19b; + u8 field_0x194; + u8 field_0x195; + u8 field_0x196; + u8 field_0x197; + u8 field_0x198; + u8 field_0x199; + u8 field_0x19a; + u8 field_0x19b; struct position pos; // 0x19C: Mirror of the position on the entity struct - undefined field_0x1a0; - undefined field_0x1a1; - undefined field_0x1a2; - undefined field_0x1a3; - undefined field_0x1a4; - undefined field_0x1a5; - undefined field_0x1a6; - undefined field_0x1a7; - undefined field_0x1a8; - undefined field_0x1a9; - undefined field_0x1aa; - undefined field_0x1ab; - undefined field_0x1ac; - undefined field_0x1ad; - undefined field_0x1ae; - undefined field_0x1af; - undefined field_0x1b0; - undefined field_0x1b1; - undefined field_0x1b2; - undefined field_0x1b3; + u8 field_0x1a0; + u8 field_0x1a1; + u8 field_0x1a2; + u8 field_0x1a3; + u8 field_0x1a4; + u8 field_0x1a5; + u8 field_0x1a6; + u8 field_0x1a7; + u8 field_0x1a8; + u8 field_0x1a9; + u8 field_0x1aa; + u8 field_0x1ab; + u8 field_0x1ac; + u8 field_0x1ad; + u8 field_0x1ae; + u8 field_0x1af; + u8 field_0x1b0; + u8 field_0x1b1; + u8 field_0x1b2; + u8 field_0x1b3; u16 walk_anim_frames_left; // 0x1B4: Number of frames left in walking animation? - undefined field_0x1b6; - undefined field_0x1b7; - undefined field_0x1b8; - undefined field_0x1b9; - undefined field_0x1ba; - undefined field_0x1bb; - undefined field_0x1bc; - undefined field_0x1bd; - undefined field_0x1be; - undefined field_0x1bf; - undefined field_0x1c0; - undefined field_0x1c1; - undefined field_0x1c2; - undefined field_0x1c3; - undefined field_0x1c4; - undefined field_0x1c5; - undefined field_0x1c6; - undefined field_0x1c7; - undefined field_0x1c8; - undefined field_0x1c9; - undefined field_0x1ca; - undefined field_0x1cb; - undefined field_0x1cc; - undefined field_0x1cd; - undefined field_0x1ce; - undefined field_0x1cf; - undefined field_0x1d0; - undefined field_0x1d1; - undefined field_0x1d2; - undefined field_0x1d3; - undefined field_0x1d4; - undefined field_0x1d5; - undefined field_0x1d6; - undefined field_0x1d7; - undefined field_0x1d8; - undefined field_0x1d9; - undefined field_0x1da; - undefined field_0x1db; - undefined field_0x1dc; - undefined field_0x1dd; - undefined field_0x1de; - undefined field_0x1df; - undefined field_0x1e0; - undefined field_0x1e1; - undefined field_0x1e2; - undefined field_0x1e3; - undefined field_0x1e4; - undefined field_0x1e5; - undefined field_0x1e6; - undefined field_0x1e7; - undefined field_0x1e8; - undefined field_0x1e9; - undefined field_0x1ea; - undefined field_0x1eb; - undefined field_0x1ec; - undefined field_0x1ed; - undefined field_0x1ee; - undefined field_0x1ef; - undefined field_0x1f0; - undefined field_0x1f1; - undefined field_0x1f2; - undefined field_0x1f3; - undefined field_0x1f4; - undefined field_0x1f5; - undefined field_0x1f6; - undefined field_0x1f7; - undefined field_0x1f8; - undefined field_0x1f9; - undefined field_0x1fa; - undefined field_0x1fb; - undefined field_0x1fc; - undefined field_0x1fd; - undefined field_0x1fe; - undefined field_0x1ff; - undefined field_0x200; - undefined field_0x201; - undefined field_0x202; - undefined field_0x203; - undefined field_0x204; - undefined field_0x205; - undefined field_0x206; - undefined field_0x207; - undefined field_0x208; - undefined field_0x209; - undefined field_0x20a; - undefined field_0x20b; - undefined field_0x20c; - undefined field_0x20d; - undefined field_0x20e; - undefined field_0x20f; + u8 field_0x1b6; + u8 field_0x1b7; + u8 field_0x1b8; + u8 field_0x1b9; + u8 field_0x1ba; + u8 field_0x1bb; + u8 field_0x1bc; + u8 field_0x1bd; + u8 field_0x1be; + u8 field_0x1bf; + u8 field_0x1c0; + u8 field_0x1c1; + u8 field_0x1c2; + u8 field_0x1c3; + u8 field_0x1c4; + u8 field_0x1c5; + u8 field_0x1c6; + u8 field_0x1c7; + u8 field_0x1c8; + u8 field_0x1c9; + u8 field_0x1ca; + u8 field_0x1cb; + u8 field_0x1cc; + u8 field_0x1cd; + u8 field_0x1ce; + u8 field_0x1cf; + u8 field_0x1d0; + u8 field_0x1d1; + u8 field_0x1d2; + u8 field_0x1d3; + u8 field_0x1d4; + u8 field_0x1d5; + u8 field_0x1d6; + u8 field_0x1d7; + u8 field_0x1d8; + u8 field_0x1d9; + u8 field_0x1da; + u8 field_0x1db; + u8 field_0x1dc; + u8 field_0x1dd; + u8 field_0x1de; + u8 field_0x1df; + u8 field_0x1e0; + u8 field_0x1e1; + u8 field_0x1e2; + u8 field_0x1e3; + u8 field_0x1e4; + u8 field_0x1e5; + u8 field_0x1e6; + u8 field_0x1e7; + u8 field_0x1e8; + u8 field_0x1e9; + u8 field_0x1ea; + u8 field_0x1eb; + u8 field_0x1ec; + u8 field_0x1ed; + u8 field_0x1ee; + u8 field_0x1ef; + u8 field_0x1f0; + u8 field_0x1f1; + u8 field_0x1f2; + u8 field_0x1f3; + u8 field_0x1f4; + u8 field_0x1f5; + u8 field_0x1f6; + u8 field_0x1f7; + u8 field_0x1f8; + u8 field_0x1f9; + u8 field_0x1fa; + u8 field_0x1fb; + u8 field_0x1fc; + u8 field_0x1fd; + u8 field_0x1fe; + u8 field_0x1ff; + u8 field_0x200; + u8 field_0x201; + u8 field_0x202; + u8 field_0x203; + u8 field_0x204; + u8 field_0x205; + u8 field_0x206; + u8 field_0x207; + u8 field_0x208; + u8 field_0x209; + u8 field_0x20a; + u8 field_0x20b; + u8 field_0x20c; + u8 field_0x20d; + u8 field_0x20e; + u8 field_0x20f; u8 hp_fractional; // 0x210: 200 * fractional_part(HP) - undefined field_0x211; - undefined field_0x212; - undefined field_0x213; + u8 field_0x211; + u8 field_0x212; + u8 field_0x213; // 0x214: Somehow related to gaining exp through a joy ribbon. Set to 0 after // gaining or losing a level. Also checked and set to 0 when an enemy evolves. // Maybe for a specific scenario of leveling up with exp from a joy ribbon? @@ -800,8 +787,8 @@ struct monster { u8 water_shadow_ripple_tracker; // 0x221: Set if the current move being used was copied by Me First bool me_first_flag; - undefined field_0x222; - undefined field_0x223; + u8 field_0x222; + u8 field_0x223; // Stat boosts from exclusive items with EXCLUSIVE_EFF_STAT_BOOST u8 exclusive_item_offense_boosts[2]; // 0x224: {atk, sp_atk} u8 exclusive_item_defense_boosts[2]; // 0x226: {def, sp_def} @@ -816,7 +803,7 @@ struct monster { // 0x23E: Gets set to 0 before using an attack and gets set to 1 in LevelUp. Seems to stop // the rest of the attacks (ie from Swift Swim) from continuing. Possibly to avoid the // the monster leveling up and trying to use a move that was just overwritten by a new move? - undefined field_0x23e; + u8 field_0x23e; // 0x23F: Gets set to 1 when the move used won't use up any PP. Used to check if the // monster should lose extra PP from the ability Pressure. bool should_not_lose_pp; @@ -880,23 +867,23 @@ struct entity { struct monster_summary { enum monster_id id; // 0x0 u8 monster_name[10]; // 0x2 - undefined field_0xC; - undefined field_0xD; - undefined field_0xE; - undefined field_0xF; - undefined field_0x10; - undefined field_0x11; - undefined field_0x12; - undefined field_0x13; - undefined field_0x14; - undefined field_0x15; + u8 field_0xC; + u8 field_0xD; + u8 field_0xE; + u8 field_0xF; + u8 field_0x10; + u8 field_0x11; + u8 field_0x12; + u8 field_0x13; + u8 field_0x14; + u8 field_0x15; enum type_id types[2]; // 0x16 enum ability_id abilities[2]; // 0x18 enum dungeon_id joined_at; // 0x1A u8 joined_at_floor; // 0x1B struct item held_item; // 0x1C - undefined field_0x22; - undefined field_0x23; + u8 field_0x22; + u8 field_0x23; s32 hp; // 0x24: Current HP s32 max_hp; // 0x28: Actual max HP (hp + hp boost) u32 level; // 0x2C @@ -908,10 +895,10 @@ struct monster_summary { u8 special_attack_boost; // 0x3A u8 defense_boost; // 0x3B u8 special_defense_boost; // 0x3C - undefined field_0x3D; + u8 field_0x3D; s16 iq; // 0x3E - undefined field_0x40; - undefined field_0x41; + u8 field_0x40; + u8 field_0x41; // 0x42: Level upon first evolution. Set to 0 in dungeon mode. u8 level_at_first_evo; // 0x43: Level upon first evolution. Set to 0 in dungeon mode. @@ -919,18 +906,18 @@ struct monster_summary { // 0x44: Evolution status. In ground_mode, accounts for luminous spring being unlocked. u8 evo_status; bool inflicted_with_gastro_acid; // 0x45 - undefined field_0x46; - undefined field_0x47; + u8 field_0x46; + u8 field_0x47; u32 iq_skill_flags[3]; // 0x48 enum tactic_id tactic; // 0x54 - undefined field_0x55; - undefined field_0x56; - undefined field_0x57; + u8 field_0x55; + u8 field_0x56; + u8 field_0x57; // 0x58: Appears to be a list of all the currently inflicted statues in their enum form. The // last entry (30th) appears to always be STATUS_NONE to serve as a terminator for the list. // While in ground mode, it's always filled with STATUS_NONE. enum status_id active_statuses[30]; - undefined2 _padding_0x76; + u16 _padding_0x76; }; // Info about a mission destination floor @@ -952,15 +939,15 @@ struct mission_destination_info { // which is not reflected here. enum monster_id enemy_species[3]; u8 n_enemy_species; // 0x14: Length of the preceding array - undefined field_0x15; + u8 field_0x15; // 0x16: Fixed room ID of the destination floor, if relevant // (e.g., Chambers, Challenge Letters, etc.) enum fixed_room_id fixed_room_id; // 0x17: Related to missions where you have to obtain an item? Possibly related to the item // being picked up and/or destroyed? bool unk_mission_item_tracker1; - undefined field_0x18; - undefined field_0x19; + u8 field_0x18; + u8 field_0x19; // 0x1A: Related to missions where you have to obtain an item? Possibly related to the item // being picked up and/or destroyed? bool unk_mission_item_tracker2; @@ -1019,7 +1006,7 @@ struct floor_properties { bool f_room_imperfections : 1; // Whether room imperfections are allowed u8 room_flags_unk3 : 5; - undefined field_0xe; + u8 field_0xe; u8 item_density; // 0xF: Controls how many items will be spawned u8 trap_density; // 0x10: Controls how many traps will be spawned u8 floor_number; // 0x11: The current floor number within the overall dungeon @@ -1048,22 +1035,22 @@ struct floor_properties { // Contains the data required to display a tile on the minimap struct minimap_display_tile { - undefined4 field_0x0; - undefined4 field_0x4; - undefined4 field_0x8; - undefined4 field_0x0C; - undefined4 field_0x10; - undefined4 field_0x14; - undefined4 field_0x18; - undefined4 field_0x1C; - undefined4 field_0x20; - undefined4 field_0x24; - undefined4 field_0x28; - undefined4 field_0x2C; - undefined4 field_0x30; - undefined4 field_0x34; - undefined4 field_0x38; - undefined4 field_0x3C; + u32 field_0x0; + u32 field_0x4; + u32 field_0x8; + u32 field_0x0C; + u32 field_0x10; + u32 field_0x14; + u32 field_0x18; + u32 field_0x1C; + u32 field_0x20; + u32 field_0x24; + u32 field_0x28; + u32 field_0x2C; + u32 field_0x30; + u32 field_0x34; + u32 field_0x38; + u32 field_0x3C; }; // Contains the graphical representation of minimap tiles @@ -1081,19 +1068,19 @@ struct minimap_display_data { // this matrix is rebuilt, only to be restored later. There's probably // an union involved somewhere, but right now there's not enough information // to know where exactly. - undefined field_0xE000[32][28]; - undefined overwritten_extra_bytes[28]; // 0xE380 - undefined4 field_0xE39C[41]; // 0xE39C: Array of pointers - undefined4 field_0xE440; - undefined field_0xE444; - undefined field_0xE445; - undefined field_0xE446; - undefined field_0xE447; - undefined field_0xE448; + u8 field_0xE000[32][28]; + u8 overwritten_extra_bytes[28]; // 0xE380 + u32 field_0xE39C[41]; // 0xE39C: Array of pointers + u32 field_0xE440; + u8 field_0xE444; + u8 field_0xE445; + u8 field_0xE446; + u8 field_0xE447; + u8 field_0xE448; // Padding? - undefined field_0xE449; - undefined field_0xE44A; - undefined field_0xE44B; + u8 field_0xE449; + u8 field_0xE44A; + u8 field_0xE44B; }; // Struct that seems to hold data related to the map, the camera and the touchscreen numbers @@ -1116,7 +1103,7 @@ struct display_data { // 0x1C: Appears to be the value to set to display_data::screen_shake_intensity when it // reaches 0x0. (This number is usually 0x0 so the screen stops shaking after.) u32 screen_shake_intensity_reset; - undefined field_0x20; // 0x20: Initialized to 0x3. + u8 field_0x20; // 0x20: Initialized to 0x3. // 0x21: Same as floor_properties::visibility_range // Affects the number of map tiles around the player's position that get marked as // "visited" while exploring, as well as how far away you can see enemies under non-illuminated @@ -1147,34 +1134,34 @@ struct display_data { // Causes all entities to be displayed as green circles on the map. bool hallucinating; bool can_see_stairs; // 0x2A: True if stairs are being shown on the map - undefined field_0x2B; // 0x2B: Initialized to 0 - undefined field_0x2C; + u8 field_0x2B; // 0x2B: Initialized to 0 + u8 field_0x2C; bool darkness; // 0x2D: True if there's darkness on the floor - undefined field_0x2E; // 0x2E: Initialized to 1 + u8 field_0x2E; // 0x2E: Initialized to 1 // 0x2F: True if the leader is being pointed by the camera right now. If false, UI digits will // be displayed in green. bool leader_pointed; - undefined field_0x30; // 0x30: Initialized to 1 + u8 field_0x30; // 0x30: Initialized to 1 // 0x31: Set to 1 when losing in a dungeon. Seems to cause display_data::0x38 to // display_data::leader_max_hp_touch_screen to become 0xFFFF (-1). bool unk_fade_to_black_tracker; - undefined field_0x32; // 0x32: Initialized to 0 - undefined field_0x33; // 0x33: Initialized to 0 - undefined field_0x34; // 0x34: Is used, related to lighting? + u8 field_0x32; // 0x32: Initialized to 0 + u8 field_0x33; // 0x33: Initialized to 0 + u8 field_0x34; // 0x34: Is used, related to lighting? bool team_menu_or_grid; // 0x35: True when the team menu is opened or while Y is being held // Derived from internal direction in leader info block enum direction_id leader_target_direction; // 0x36 enum direction_id leader_target_direction_mirror; // 0x37 - undefined2 field_0x38; // 0x38: Initialized to 0xFFFF (-1). - undefined2 field_0x3A; // 0x3A: Initialized to 0xFFFF (-1). + u16 field_0x38; // 0x38: Initialized to 0xFFFF (-1). + u16 field_0x3A; // 0x3A: Initialized to 0xFFFF (-1). s16 floor_touch_screen; // 0x3C: Floor number displayed on the touch screen s16 leader_level_touch_screen; // 0x3E: Leader's level displayed on the touch screen s16 leader_hp_touch_screen; // 0x40: Leader's current HP displayed on the touch screen s16 leader_max_hp_touch_screen; // 0x42: Leader's max HP displayed on the touch screen - undefined2 field_0x44; + u16 field_0x44; // Padding? - undefined field_0x46; - undefined field_0x47; + u8 field_0x46; + u8 field_0x47; }; // Used during floor generation to keep track of what entities should be spawned where @@ -1206,15 +1193,15 @@ union spawn_or_visibility_flags { // Information about the rooms on the current floor struct room_data { u8 room_id; - undefined field_0x1; // Initialized to 0 + u8 field_0x1; // Initialized to 0 struct position bottom_right_corner; // 0x2 struct position top_left_corner; // 0x6 - undefined field_0xa; // Doesn't get initialized, likely padding - undefined field_0xb; // Doesn't get initialized, likely padding - undefined4 field_0xc; // Initialized to (bottom_right_corner.x - 1) * 0x1C - undefined4 field_0x10; // Initialized to (bottom_right_corner.y - 1) * 0x1C - undefined4 field_0x14; // Initialized to (top_left_corner.x + 1) * 0x1C - undefined4 field_0x18; // Initialized to (top_left_corner.y + 1) * 0x1C + u8 field_0xa; // Doesn't get initialized, likely padding + u8 field_0xb; // Doesn't get initialized, likely padding + u32 field_0xc; // Initialized to (bottom_right_corner.x - 1) * 0x1C + u32 field_0x10; // Initialized to (bottom_right_corner.y - 1) * 0x1C + u32 field_0x14; // Initialized to (top_left_corner.x + 1) * 0x1C + u32 field_0x18; // Initialized to (top_left_corner.y + 1) * 0x1C }; // Tile data @@ -1252,7 +1239,7 @@ struct tile { // during dungeon play union spawn_or_visibility_flags spawn_or_visibility_flags; u16 texture_id; // 0x4: Maybe? Changing this causes the tile texture to change - undefined field_0x6; + u8 field_0x6; // 0x7: Room index. 0xFF if not in a room, 0xFE on junctions during map generation (it gets set // to 0xFF later). u8 room; @@ -1276,14 +1263,14 @@ struct dungeon_generation_info { // 0x2: Set if a kecleon shop was properly spawned. bool kecleon_shop_spawned; // 0x3: When a non-zero value, the one-room orb will fail. - undefined unk_one_room_flag; + u8 unk_one_room_flag; bool dough_seed_extra_poke_flag; // 0x5: Room index of Monster House on the floor. 0xFF if there's no Monster House u8 monster_house_room; // 0x6: Related to when a monster from a fixed room faints. Maybe to check if the floor // should be over after knocking them out? - undefined unk_fixed_room_static_monster_tracker; - undefined field_0x7; + u8 unk_fixed_room_static_monster_tracker; + u8 field_0x7; // 0x8: The type of the hidden stairs on the current floor. enum hidden_stairs_type hidden_stairs_type; // 0xC: Used to check to load the corresponding hidden fixed room and information for @@ -1296,9 +1283,9 @@ struct dungeon_generation_info { // 0x2C (28) for down and up respectively. u16 staircase_visual_idx; enum fixed_room_id fixed_room_id; // 0x16 - undefined field_0x17; - undefined field_0x18; - undefined field_0x19; + u8 field_0x17; + u8 field_0x18; + u8 field_0x19; u16 floor_generation_attempts; // 0x1A: Number of attempts at floor layout generation struct tile tiles[32][56]; // 0x1C struct position team_spawn_pos; // 0x8C1C: Position of the team spawn @@ -1323,7 +1310,7 @@ struct trap { bool f_unbreakable : 1; // If true, the trap can't be broken (for example, using a Trapbust Orb) u8 flags_unk1 : 7; - undefined field_0x3; + u8 field_0x3; }; // Struct that contains some data used when spawning new enemies @@ -1351,9 +1338,9 @@ struct spawned_shopkeeper_data { // Appears to contain diagnostic information related to the damage calculation routines. struct damage_calc_diag { enum type_id move_type; // 0x0: The type of the last move used - undefined field_0x1; - undefined field_0x2; - undefined field_0x3; + u8 field_0x1; + u8 field_0x2; + u8 field_0x3; enum move_category move_category; // 0x4: The category of the last move used // 0x8: The type matchup of the last move used against the individual types of the defender enum type_matchup move_indiv_type_matchups[2]; @@ -1386,26 +1373,26 @@ struct damage_calc_diag { // 0x1C: The intermediate quantity in the damage calculation called "FLV" in debug logging // (effective level?), which corresponds to: round[ (offense_calc - defense_calc)/8 + level ] u16 damage_calc_flv; - undefined field_0x1e; - undefined field_0x1f; + u8 field_0x1e; + u8 field_0x1f; // 0x20: The result of the damage calculation after multiplying the base value by multipliers, // but before applying random variation. There are also a couple stray multipliers applied // after this result, including multipliers specific to the projectile move (the static 50%, // and the Power Pitcher multiplier) and the Air Blade multiplier. - int damage_calc; + s32 damage_calc; // 0x24: The intermediate quantity in the damage calculation resulting from the "base" damage // calculation: the sum of the power, attack, defense, and level terms, modified by the // non-team-member multiplier if relevant, and clamped between 1 and 999. - int damage_calc_base; + s32 damage_calc_base; // 0x28: The random multiplier applied to the result of the damage calculation, as a // percentage (so the actual factor, multiplied by 100), rounded to an integer. - int damage_calc_random_mult_pct; + s32 damage_calc_random_mult_pct; // 0x2C: The calculated "static" damage multiplier applied to the output of the base damage // calculation. "Static" in the sense that this part of the multiplier doesn't depend on // variables like type-based effects, critical hits, and Reflect/Light Screen. Factors in // the static damage multiplier include the argument to CalcDamage, the multiplier due to // monster::me_first_flag, Reckless, and Iron Fist. - int static_damage_mult; + s32 static_damage_mult; // 0x30: The net number of attack boosts to an attacker due to a Power Band or Munch Belt. // It seems like there's a bug in the code; aura bows do not contribute to this field. s8 item_atk_modifier; @@ -1473,13 +1460,13 @@ struct damage_calc_diag { // 0x4D: Whether or not Water Sport was activated by a Fire move bool water_sport_drop_activated; bool charge_boost_activated; // 0x4E: Whether or not Charge was activated by an Electric move - undefined field_0x4f; + u8 field_0x4f; // 0x50: Whether or not a Ghost type's immunity to Normal/Fighting was activated at some point bool ghost_immunity_activated; // 0x51: Whether or not a defender took less damage due to the Charging Skull Bash status bool skull_bash_defense_boost_activated; - undefined field_0x52; - undefined field_0x53; + u8 field_0x52; + u8 field_0x53; }; diff --git a/include/util.h b/include/util.h index 404e77e5..83b16503 100644 --- a/include/util.h +++ b/include/util.h @@ -3,9 +3,6 @@ typedef s32 fx32_8; // 32-bit signed fixed-point number with 8 fraction bits typedef u32 ufx32_8; // 32-bit unsigned fixed-point number with 8 fraction bits -typedef u8 undefined; -typedef u16 undefined2; -typedef u32 undefined4; typedef u8 bool; // RGBA8 structure. Sometimes alpha is ignored and only used for padding diff --git a/src/overlay_15_0238AD78.c b/src/overlay_15_0238AD78.c index f5f49e7d..2d71bb15 100644 --- a/src/overlay_15_0238AD78.c +++ b/src/overlay_15_0238AD78.c @@ -6,11 +6,11 @@ extern void sub_02026268(u32, u32, u32, u16); extern void sub_02039B0C(u32*); void ov15_0238AD78(u32 r0) { - u32 uVar1; - if (r0 != 0) - uVar1 = 900; - else - uVar1 = 901; + #ifdef JAPAN + u32 uVar1 = r0 != 0 ? 12873 : 12874; + #else + u32 uVar1 = r0 != 0 ? 900 : 901; + #endif sub_02026268(OVERLAY15_UNKNOWN_POINTER__NA_238B180->unk68, 2, 0, uVar1); sub_02039B0C(&OVERLAY15_UNKNOWN_POINTER__NA_238B180->unk54); diff --git a/src/overlay_31_02382820.c b/src/overlay_31_02382820.c index c0a2e5bd..9cbf6afc 100644 --- a/src/overlay_31_02382820.c +++ b/src/overlay_31_02382820.c @@ -19,7 +19,6 @@ extern u16 ov31_02389E22[]; extern void* MemAlloc(u32 size, u32 nmemb); -//extern u32 sub_020348E4(struct struct_1*); extern struct entity* GetLeader(void); extern s32 CeilFixedPoint(struct fixed_point); @@ -89,7 +88,6 @@ void DrawDungeonMenuStatusWindow(struct Window* window) leader = GetLeader(); leader_info = (struct monster*)leader->info; - //str_values.dungeon_0 = leader_info->roost; str_values.digits_0 = CeilFixedPoint(leader_info->belly); str_values.digits_1 = CeilFixedPoint(leader_info->max_belly);