From 377bd14ea67d6177250fb401e12d7dfcf44e2cf6 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Wed, 9 Jun 2021 22:54:21 -0500 Subject: Dungeon pokemon/Floor ID JSON Part 1 (#39) * move Thunderwave and Tiny Woods pokemon to json * rule tweaking to actually build tool before parsing JSON * delete .inc pokemon for tiny Woods and Thunderwave * silence git complaining about br_ips and ips_patch * use defines for species and pass the header file for species * convert sinister woods * convert MtThunderPeak * convert silent chasm * add trial floor_id w/ tiny woods * change make rule name to fix compile * MtSteel converted and bugfix * convert few floor headers and great canyon pokemon * code cleanup * unify unkData into UnkTextStruct2 * more code cleanup and some text decomp * doc more funcs and decomp/split some stuff * document more save stuff * more save work and move some data * pika sniped UpdateNatureTotal * decomp a litle and convert a few more dungeons * better scanning for json files * mt freeze and peak --- src/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index ee657d6..d18d0de 100644 --- a/src/main.c +++ b/src/main.c @@ -8,14 +8,14 @@ extern char ewram_start[]; typedef void (*IntrCallback)(void); -extern u8 IntrMain_Buffer[0x120]; -extern IntrCallback gIntrCallbacks[6]; +EWRAM_DATA u8 IntrMain_Buffer[0x120]; +EWRAM_DATA u32 gIntrTable[6]; +EWRAM_DATA IntrCallback gIntrCallbacks[6]; extern u16 gBldCnt; extern u8 gUnknown_202D7FE; extern u8 gInterruptsEnabled; extern u16 gUnknown_203B0AC; extern s16 gUnknown_203B0AE; -extern u32 gIntrTable[]; extern char alt_203B038[]; @@ -227,9 +227,9 @@ void AckInterrupt(u16 flag) void InitIntrTable(const u32 *interrupt_table) { - CpuCopy32(interrupt_table, &gIntrTable, 0x18); // 0x18 = 0x6 * 4 (0x4f00 is 32 bits) - CpuCopy32(&IntrMain, &IntrMain_Buffer, 0x120); // 0x120 = 0x48 * 4 (0x4f00 is 32 bits) - INTR_VECTOR = &IntrMain_Buffer; + CpuCopy32(interrupt_table, gIntrTable, sizeof(gIntrTable)); // 0x18 = 0x6 * 4 (0x4f00 is 32 bits) + CpuCopy32(IntrMain, IntrMain_Buffer, sizeof(IntrMain_Buffer)); // 0x120 = 0x48 * 4 (0x4f00 is 32 bits) + INTR_VECTOR = IntrMain_Buffer; } u32 *sub_800B6E8(u32 r0) -- cgit v1.2.3