up to playtime

This commit is contained in:
DizzyEggg
2024-12-15 20:58:06 +01:00
parent d8bb3a7338
commit 6a3dbaabde
29 changed files with 73 additions and 141 deletions

View File

@@ -11,44 +11,6 @@ gUnknown_8270000: @ 8270000
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x64, 0x00, 0x64, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x15, 0x00, 0x16, 0x00
.byte 0x15, 0x00, 0x16, 0x00
.byte 0x02, 0x03, 0x01, 0x01
.byte 0x00, 0x00, 0x00, 0x02
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x02, 0x00, 0x0d, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x28, 0x00, 0x00, 0x00
.byte 0x28, 0x00, 0x00, 0x00
.byte 0x50, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x71, 0x02, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0xdf, 0xb0, 0x08, 0x99
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte gUnknown_8116390
.4byte gUnknown_811636C
.4byte gUnknown_811633C

3
src/code_803B050.c Normal file
View File

@@ -0,0 +1,3 @@
#include "global.h"
EWRAM_INIT void *gUnknown_203B3FC = NULL;

View File

@@ -7,7 +7,7 @@
#include "code_80958E8.h"
#include "memory.h"
static EWRAM_DATA_2 u8 sUnknown_203B408 = {0};
static EWRAM_INIT u8 sUnknown_203B408 = {1};
#include "data/code_803D0D8.h"

View File

@@ -16,8 +16,9 @@
#include "play_time.h"
#include "sprite.h"
extern u8 gUnknown_203B40C;
extern u8 gUnknown_203B40D;
EWRAM_INIT u8 gUnknown_203B40C = 0;
EWRAM_INIT u8 gUnknown_203B40D = 0;
extern s32 gDungeonBrightness;
extern s32 gUnknown_202EDCC;
extern u32 gUnknown_202EDD0;

View File

@@ -59,7 +59,12 @@ struct UnkStruct_203B414
struct Sub_UnkStruct_203B414 unk8C[16];
};
static EWRAM_DATA_2 struct UnkStruct_203B414 *sUnknown_203B414 = NULL;
EWRAM_INIT DungeonPos gUnknown_203B410 = {100, 100};
static EWRAM_INIT struct UnkStruct_203B414 *sUnknown_203B414 = NULL;
EWRAM_INIT Dungeon *gDungeon = NULL;
EWRAM_INIT u8 *gSerializedData_203B41C = NULL;
EWRAM_INIT u8 gUnknown_203B420[8] = {0x15, 0x00, 0x16, 0x00, 0x15, 0x00, 0x16, 0x00}; // Could be a different file?
EWRAM_INIT u8 gUnknown_203B428[8] = {0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x02}; // Could be a different file?
struct UnkStruct_80F6624
{
@@ -247,8 +252,6 @@ void sub_8042EC8(Entity *a0, s32 a1)
}
extern u8 gUnknown_203B40C;
extern DungeonPos gUnknown_203B410;
extern u8 *gSerializedData_203B41C;
struct Substruct_xxx_dungeon_8042F6C
{

View File

@@ -3716,3 +3716,5 @@ void PrintMonTactics(s32 firstId, u8 *tacticIds, EntityInfo *mon, s32 windowId)
sub_80073E0(windowId);
}
EWRAM_INIT u8 gUnknown_203B43C[4] = {2, 0, 0xD, 0}; // TODO: Move to a better file and figure out the array count. Apparently it's only written to.

View File

@@ -26,7 +26,6 @@
#include "dungeon_config.h"
extern u32 gUnknown_202EDCC;
extern u32 gUnknown_203B444[];
extern u8 *gUnknown_80FCA10[];
extern u8 *gUnknown_80F8A0C[];
@@ -57,6 +56,8 @@ extern void sub_804216C(Entity *pokemon, Entity *target, u32 r2);
extern void sub_80461C8(DungeonPos *, u32);
extern void sub_804218C(Entity *pokemon, Entity *target);
EWRAM_INIT u32 gUnknown_203B444[3] = {0x28, 0x28, 0x50};
void sub_804EB30();
bool8 ExposeTrap(s32 x, s32 y);
void sub_8040A84();

View File

@@ -1,8 +1,9 @@
#include "global.h"
IWRAM_DATA u32 gUnknown_3001198[0x270] = {0};
EWRAM_DATA_2 s32 gUnknown_203B470 = {0};
EWRAM_DATA_2 s32 gUnknown_203B474 = {0};
EWRAM_INIT s32 gUnknown_203B470 = 0x271;
EWRAM_INIT s32 gUnknown_203B474 = 0;
UNUSED static EWRAM_INIT s32 sUnusedEwramVar = 0x9908b0df; // Hm...
void sub_8094D28(s32 r0) {

View File

@@ -28,7 +28,7 @@ enum DebugMenuOptions
MENU_DEBUG_MENU_H_OPEN = 9,
};
static EWRAM_DATA_2 struct DebugMenu *sDebugMenu = {0};
static EWRAM_INIT struct DebugMenu *sDebugMenu = {NULL};
#include "data/debug_menu1.h"

View File

@@ -10,7 +10,7 @@
#include "menu_input.h"
#include "text.h"
static EWRAM_DATA_2 unkStruct_203B3F0 *sUnknown_203B3F0 = {0};
static EWRAM_INIT unkStruct_203B3F0 *sUnknown_203B3F0 = {NULL};
#include "data/debug_menu2.h"

View File

@@ -12,7 +12,7 @@
#include "wigglytuff_shop1.h"
#include "wigglytuff_shop2.h"
static EWRAM_DATA_2 unkStruct_203B3F4 *sUnknown_203B3F4 = {0};
static EWRAM_INIT unkStruct_203B3F4 *sUnknown_203B3F4 = {NULL};
#include "data/debug_menu3.h"

View File

@@ -9,7 +9,7 @@
#include "menu_input.h"
#include "text.h"
static EWRAM_DATA_2 unkStruct_203B3F8 *sUnknown_203B3F8 = {0};
static EWRAM_INIT unkStruct_203B3F8 *sUnknown_203B3F8 = {NULL};
#include "data/debug_menu4.h"

View File

@@ -34,7 +34,7 @@ enum ItemTargetFlag
ITEM_TARGET_ALLY = 1 << 1
};
EWRAM_DATA_2 s32 gAIThrowItemActionChoiceCount = {0};
EWRAM_INIT s32 gAIThrowItemActionChoiceCount = {0};
EWRAM_DATA u32 gAIThrownItemDirections[NUM_DIRECTIONS] = {0};
EWRAM_DATA bool8 gAIThrownItemDirectionIsUsed[NUM_DIRECTIONS] = {0};

View File

@@ -3,7 +3,7 @@
#include "dungeon_leader.h"
#include "dungeon_util.h"
extern Entity *gLeaderPointer;
EWRAM_INIT Entity *gLeaderPointer = NULL;
Entity* GetLeader(void)
{

View File

@@ -34,7 +34,7 @@ EWRAM_DATA unkStruct_202EE8C gUnknown_202EE8C[32] = {0};
EWRAM_DATA OpenedFile *gUnknown_202F18C = {0};
EWRAM_DATA Tile gOutOfBoundsTileData = {0};
EWRAM_DATA_2 const Tile *gCurTilesetOobTile = {0};
EWRAM_INIT const Tile *gCurTilesetOobTile = {NULL};
extern u8 sub_8043CE4(u32);
extern void sub_80402AC(s32, s32);

View File

@@ -44,7 +44,6 @@ extern void sub_8083CE0(u8 param_1);
extern u32 gUnknown_202EDD0;
extern u8 gUnknown_203B40C;
extern u8 gUnknown_202EE01;
extern u8 gUnknown_203B434;
extern void (*gUnknown_203B08C)(s32);
extern void (*gUnknown_203B084)(s32 a0);
extern void (*gUnknown_203B080)(s32 a0);
@@ -65,6 +64,7 @@ static EWRAM_DATA SpriteOAM sUnknown_202F1F0 = {0};
static EWRAM_DATA s32 sMessageLogCursor = 0;
static EWRAM_DATA u8 sMessageLogFlags = 0;
static EWRAM_DATA SpriteOAM sMessageLogArrowSpriteOAM = {0};
EWRAM_INIT u8 gUnknown_203B434 = 1;
// Used for sMessageLogFlags
#define FLAG_CAN_SCROLL_UP 0x1

View File

@@ -361,8 +361,6 @@ extern const u8 *const gUnknown_80F93A4;
extern const u8 *const gUnknown_80F9384;
extern const u8 *const gUnknown_80F9380;
extern Entity *gUnknown_203B438;
EWRAM_DATA s32 gUnknown_202F208 = 0;
EWRAM_DATA s32 gUnknown_202F20C = 0;
EWRAM_DATA s32 gUnknown_202F210 = 0;
@@ -376,6 +374,7 @@ EWRAM_DATA u8 gUnknown_202F221 = 0;
EWRAM_DATA u8 gUnknown_202F222 = 0;
EWRAM_DATA s32 gUnknown_202F224 = 0;
EWRAM_DATA s32 gMetronomeCalledArrayId = 0;
static EWRAM_INIT Entity *gUnknown_203B438 = NULL;
#define MAX_MOVE_TARGETS 64

View File

@@ -1,8 +1,8 @@
#include "global.h"
#include "dungeon_random.h"
EWRAM_DATA_2 u32 gDungeonRngState = {0};
EWRAM_DATA_2 u32 gUnknown_203B458 = {0};
EWRAM_INIT u32 gDungeonRngState = {1};
EWRAM_INIT u32 gUnknown_203B458 = {1};
void sub_808408C(u32 param_1)
{

View File

@@ -9,7 +9,7 @@
EWRAM_DATA static bool8 sBoughtFriendAreas[NUM_FRIEND_AREAS] = {0};
EWRAM_DATA_2 bool8 *gFriendAreas = {0};
EWRAM_INIT bool8 *gFriendAreas = {NULL};
// data_8107010.s
extern const u8 sUnknown_81098A4[];

View File

@@ -10,7 +10,7 @@ struct unkStruct_8094CB0
s16 unk2;
};
EWRAM_DATA_2 GameOptions *gGameOptionsRef = {0};
EWRAM_INIT GameOptions *gGameOptionsRef = {NULL};
EWRAM_DATA GameOptions gGameOptions = {0};
void LoadGameOptions(void)

View File

@@ -31,7 +31,7 @@ extern u8 gInvalidItemIDs[0x10];
EWRAM_DATA OpenedFile *gItemParametersFile = {0};
EWRAM_DATA ItemDataEntry *gItemParametersData = {0};
EWRAM_DATA TeamInventory gTeamInventory = {0};
EWRAM_DATA_2 TeamInventory *gTeamInventoryRef = {0};
EWRAM_INIT TeamInventory *gTeamInventoryRef = {NULL};
extern s32 sub_8091E94(s32 a1, s32 a2, s32 a3);
extern void SortKecleonShopInventory();

View File

@@ -39,7 +39,7 @@ enum
PERSONALITY_TEST_END,
};
static EWRAM_DATA_2 struct PersonalityTestTracker *sPersonalityTestTracker = {0};
static EWRAM_INIT struct PersonalityTestTracker *sPersonalityTestTracker = {NULL};
#include "data/personality_test1.h"

View File

@@ -13,7 +13,7 @@
#include "text.h"
#include "string_format.h"
EWRAM_DATA_2 struct PersonalityStruct_203B404 *gUnknown_203B404 = {0};
EWRAM_INIT struct PersonalityStruct_203B404 *gUnknown_203B404 = {NULL};
#include "data/personality_test2.h"

View File

@@ -2,7 +2,7 @@
#include "play_time.h"
#include "code_8092334.h"
EWRAM_DATA_2 struct PlayTimeStruct *gPlayTimeRef = {0};
EWRAM_INIT struct PlayTimeStruct *gPlayTimeRef = {NULL};
EWRAM_DATA struct PlayTimeStruct gPlayTime = {0};

View File

@@ -14,7 +14,7 @@ EWRAM_DATA OpenedFile *gMonsterParametersFile;
EWRAM_DATA unkStruct_203B45C gRecruitedPokemon;
EWRAM_DATA u16 gLevelCurrentPokeId;
EWRAM_DATA_2 unkStruct_203B45C *gRecruitedPokemonRef = {0};
EWRAM_INIT unkStruct_203B45C *gRecruitedPokemonRef = {NULL};
extern void sub_808E490(Move* a1, s32 species);

View File

@@ -4,7 +4,7 @@
#include "text_util.h"
#include "event_flag.h"
EWRAM_DATA_2 struct RescueTeamData *gRescueTeamInfoRef = {0};
EWRAM_INIT struct RescueTeamData *gRescueTeamInfoRef = {NULL};
EWRAM_DATA struct RescueTeamData gRescueTeamInfo = {0};
extern void BoundedCopyStringtoBuffer(u8 *buffer, u8 *string, s32 size);

View File

@@ -65,7 +65,7 @@ struct unkStruct_203B3E8
/* 0x498 */ bool8 wonderMailAccepted;
};
EWRAM_DATA_2 struct unkStruct_203B3E8 *gUnknown_203B3E8 = {0};
EWRAM_INIT struct unkStruct_203B3E8 *gUnknown_203B3E8 = {NULL};
#include "data/wonder_mail_main_menu.h"

View File

@@ -1,80 +1,13 @@
.align 2
.include "src/wonder_mail_main_menu.o"
.include "src/debug_menu1.o"
.include "src/debug_menu2.o"
.include "src/debug_menu3.o"
.include "src/debug_menu4.o"
gUnknown_203B3FC: /* 203B3FC (sub_803B050 - sub_803B284) */
.space 0x4
.include "src/personality_test1.o"
.include "src/personality_test2.o"
.include "src/code_803D0D8.o"
.space 0x3
gUnknown_203B40C: /* 203B40C (sub_803E46C - PrintFieldMessage) */
.space 0x1
gUnknown_203B40D: /* 203B40D (sub_803E250 - sub_807E698) */
.space 0x3
gUnknown_203B410: /* 203B410 (sub_8040150 - ReadMonster) */
.space 0x4
.include "src/code_8042B34.o"
gDungeon: /* 203B418 */
.space 0x4
gSerializedData_203B41C: /* 203B41C (xxx_dungeon_8042F6C) */
.space 0x4
gUnknown_203B420: /* 203B420 (sub_80462AC) */
.space 0x8
gUnknown_203B428: /* 203B428 (sub_80462AC) */
.space 0x8
.include "src/dungeon_map_access.o"
gUnknown_203B434: /* 203B434 (sub_80521D0 - sub_8072CF4) */
.space 0x4
gUnknown_203B438: /* 203B438 (sub_8055FA0 - sub_8056F80) */
.space 0x4
gUnknown_203B43C: /* 203B43C (sub_8065FB4) */
.space 0x4
.include "src/dungeon_ai_items.o"
gUnknown_203B444: /* 203B444 (HandleExplosion) */
.space 0xC
gLeaderPointer: /* 203B450 (xxx_dungeon_8042F6C - ReadMonster) */
.space 0x4
.include "src/dungeon_random.o"
.include "src/dungeon_music.o"
.include "src/pokemon.o"
.include "src/items.o"
.include "src/rescue_team_info.o"
.include "src/friend_area.o"
.include "src/game_options.o"
.include "src/code_8094D28.o"
.space 0x4
.include "src/play_time.o"
.include "src/code_8094F88.o"
.include "src/code_80958E8.o"
.include "src/code_8097670.o"
.include "src/exclusive_pokemon.o"
.include "src/ground_main.o"
.space 0x2
.include "src/code_8094F88.o"
.include "src/code_80958E8.o"
.include "src/code_8097670.o"
.include "src/exclusive_pokemon.o"
.include "src/ground_main.o"
.space 0x2
gUnknown_203B4A0: /* 203B4A0 (sub_809CCDC) */
.space 0xC

View File

@@ -98,3 +98,30 @@
.include "src/save_menu.o"
.include "src/rescue_password_menu.o"
.include "src/load_screen.o"
.include "src/wonder_mail_main_menu.o"
.include "src/debug_menu1.o"
.include "src/debug_menu2.o"
.include "src/debug_menu3.o"
.include "src/debug_menu4.o"
.include "src/code_803B050.o"
.include "src/personality_test1.o"
.include "src/personality_test2.o"
.include "src/code_803D0D8.o"
.include "src/code_803E46C.o"
.include "src/code_8042B34.o"
.include "src/dungeon_map_access.o"
.include "src/dungeon_message.o"
.include "src/dungeon_move.o"
.include "src/code_805D8C8_1.o"
.include "src/dungeon_ai_items.o"
.include "src/code_807CD9C.o"
.include "src/dungeon_leader.o"
.include "src/dungeon_random.o"
.include "src/dungeon_music.o"
.include "src/pokemon.o"
.include "src/items.o"
.include "src/rescue_team_info.o"
.include "src/friend_area.o"
.include "src/game_options.o"
.include "src/code_8094D28.o"
.include "src/play_time.o"