From 4d236bc25414a474b2ee8b98eba8db41817e5b1b Mon Sep 17 00:00:00 2001 From: gamemasterplc Date: Fri, 15 Nov 2024 17:36:16 -0600 Subject: [PATCH] Split more Also introduce version.h header --- config/GMPP01_00/splits.txt | 19 +++++ config/GMPP01_00/symbols.txt | 154 +++++++++++++++++------------------ configure.py | 2 +- include/version.h | 18 ++++ src/game/wipe.c | 6 ++ 5 files changed, 118 insertions(+), 81 deletions(-) create mode 100644 include/version.h diff --git a/config/GMPP01_00/splits.txt b/config/GMPP01_00/splits.txt index da937dd3..acd9362b 100644 --- a/config/GMPP01_00/splits.txt +++ b/config/GMPP01_00/splits.txt @@ -226,3 +226,22 @@ game/ClusterExec.c: game/ShapeExec.c: .text start:0x80040B88 end:0x80040F98 .sdata2 start:0x801F2290 end:0x801F22A0 + +game/wipe.c: + .text start:0x80040F98 end:0x80041ED4 + .data start:0x8012FF40 end:0x8012FF60 + .bss start:0x801AF700 end:0x801AF760 + .sdata start:0x801F0988 end:0x801F0990 + .sbss start:0x801F1168 end:0x801F1170 + .sdata2 start:0x801F22A0 end:0x801F22C8 + +game/window.c: + .text start:0x80041ED4 end:0x80048110 + .data start:0x8012FF60 end:0x80130550 + .bss start:0x801AF760 end:0x801B3B80 + .sdata start:0x801F0990 end:0x801F0998 + .sbss start:0x801F1170 end:0x801F11B0 + .sdata2 start:0x801F22C8 end:0x801F2358 + +game/messdata.c: + .text start:0x80048110 end:0x800481F8 diff --git a/config/GMPP01_00/symbols.txt b/config/GMPP01_00/symbols.txt index 4b2283be..2d1ba4be 100644 --- a/config/GMPP01_00/symbols.txt +++ b/config/GMPP01_00/symbols.txt @@ -731,28 +731,28 @@ WipeExecAlways = .text:0x8004104C; // type:function size:0x288 WipeCreate = .text:0x800412D4; // type:function size:0x12C WipeColorSet = .text:0x80041400; // type:function size:0x58 WipeStatGet = .text:0x80041458; // type:function size:0x10 -fn_80041468 = .text:0x80041468; // type:function size:0x8 -fn_80041470 = .text:0x80041470; // type:function size:0xFC -fn_8004156C = .text:0x8004156C; // type:function size:0x31C -fn_80041888 = .text:0x80041888; // type:function size:0x184 -fn_80041A0C = .text:0x80041A0C; // type:function size:0x4C8 -fn_80041ED4 = .text:0x80041ED4; // type:function size:0x74 -fn_80041F48 = .text:0x80041F48; // type:function size:0x214 -fn_8004215C = .text:0x8004215C; // type:function size:0x544 +WipeDummyFade = .text:0x80041468; // type:function size:0x8 scope:local +WipeNormalFade = .text:0x80041470; // type:function size:0xFC scope:local +WipeColorFill = .text:0x8004156C; // type:function size:0x31C scope:local +WipeCrossFade = .text:0x80041888; // type:function size:0x184 scope:local +WipeFrameStill = .text:0x80041A0C; // type:function size:0x4C8 scope:local +HuWindowInit = .text:0x80041ED4; // type:function size:0x74 +HuWinInit = .text:0x80041F48; // type:function size:0x214 +HuWinCreate = .text:0x8004215C; // type:function size:0x544 HuWinKill = .text:0x800426A0; // type:function size:0xA4 HuWinAllKill = .text:0x80042744; // type:function size:0x1AC -fn_800428F0 = .text:0x800428F0; // type:function size:0x7C4 -fn_800430B4 = .text:0x800430B4; // type:function size:0x480 -fn_80043534 = .text:0x80043534; // type:function size:0xF4 -fn_80043628 = .text:0x80043628; // type:function size:0xF60 -fn_80044588 = .text:0x80044588; // type:function size:0x54 -fn_800445DC = .text:0x800445DC; // type:function size:0x90 -fn_8004466C = .text:0x8004466C; // type:function size:0xA4 -fn_80044710 = .text:0x80044710; // type:function size:0x88 -fn_80044798 = .text:0x80044798; // type:function size:0x10C -fn_800448A4 = .text:0x800448A4; // type:function size:0x1A4 -fn_80044A48 = .text:0x80044A48; // type:function size:0x80 -fn_80044AC8 = .text:0x80044AC8; // type:function size:0xA9C +MesDispFunc = .text:0x800428F0; // type:function size:0x7C4 scope:local +winBGMake = .text:0x800430B4; // type:function size:0x480 scope:local +HuWinProc = .text:0x80043534; // type:function size:0xF4 scope:local +HuWinDrawMes = .text:0x80043628; // type:function size:0xF60 scope:local +HuWinCR = .text:0x80044588; // type:function size:0x54 +_HuWinHomeClear = .text:0x800445DC; // type:function size:0x90 +HuWinHomeClear = .text:0x8004466C; // type:function size:0xA4 +HuWinKeyWaitEntry = .text:0x80044710; // type:function size:0x88 +HuWinKeyWait = .text:0x80044798; // type:function size:0x10C scope:local +HuWinSpcFontEntry = .text:0x800448A4; // type:function size:0x1A4 scope:local +HuWinSpcFontClear = .text:0x80044A48; // type:function size:0x80 scope:local +HuWinChoice = .text:0x80044AC8; // type:function size:0xA9C scope:local HuWinActivePadGet = .text:0x80045564; // type:function size:0x68 HuWinActiveKeyGetX = .text:0x800455CC; // type:function size:0xE8 HuWinPosSet = .text:0x800456B4; // type:function size:0x6C @@ -786,21 +786,21 @@ HuWinSprIDGet = .text:0x800466F0; // type:function size:0x38 HuWinSprKill = .text:0x80046728; // type:function size:0x68 HuWinDispOff = .text:0x80046790; // type:function size:0x90 HuWinDispOn = .text:0x80046820; // type:function size:0x90 -fn_800468B0 = .text:0x800468B0; // type:function size:0xC0 -fn_80046970 = .text:0x80046970; // type:function size:0x44 -fn_800469B4 = .text:0x800469B4; // type:function size:0x98 -fn_80046A4C = .text:0x80046A4C; // type:function size:0x1D4 -fn_80046C20 = .text:0x80046C20; // type:function size:0x10 -fn_80046C30 = .text:0x80046C30; // type:function size:0x17C -fn_80046DAC = .text:0x80046DAC; // type:function size:0x60 -fn_80046E0C = .text:0x80046E0C; // type:function size:0x8 -fn_80046E14 = .text:0x80046E14; // type:function size:0x120 -fn_80046F34 = .text:0x80046F34; // type:function size:0x2C0 -fn_800471F4 = .text:0x800471F4; // type:function size:0x1CC -fn_800473C0 = .text:0x800473C0; // type:function size:0x88 -fn_80047448 = .text:0x80047448; // type:function size:0x2C -fn_80047474 = .text:0x80047474; // type:function size:0x34 -fn_800474A8 = .text:0x800474A8; // type:function size:0x38 +HuWinComKeyWait = .text:0x800468B0; // type:function size:0xC0 +HuWinComKeySet = .text:0x80046970; // type:function size:0x44 +_HuWinComKeySet = .text:0x800469B4; // type:function size:0x98 +HuWinComKeyGet = .text:0x80046A4C; // type:function size:0x1D4 +HuWinComKeyReset = .text:0x80046C20; // type:function size:0x10 +HuWinMesMaxSizeGet = .text:0x80046C30; // type:function size:0x17C +HuWinInsertMesSizeGet = .text:0x80046DAC; // type:function size:0x60 +HuWinMesSizeCancelCRSet = .text:0x80046E0C; // type:function size:0x8 +HuWinMesMaxSizeBetGet = .text:0x80046E14; // type:function size:0x120 +GetMesMaxSizeSub = .text:0x80046F34; // type:function size:0x2C0 scope:local +GetMesMaxSizeSub2 = .text:0x800471F4; // type:function size:0x1CC scope:local +HuWinKeyWaitNumGet = .text:0x800473C0; // type:function size:0x88 +HuWinPushKeySet = .text:0x80047448; // type:function size:0x2C +HuWinDisablePlayerSet = .text:0x80047474; // type:function size:0x34 +HuWinDisablePlayerReset = .text:0x800474A8; // type:function size:0x38 HuWinExCreate = .text:0x800474E0; // type:function size:0x4C HuWinExCreateStyled = .text:0x8004752C; // type:function size:0x228 HuWinExAnimIn = .text:0x80047754; // type:function size:0x3B0 @@ -5052,13 +5052,13 @@ lbl_8012FBDF = .data:0x8012FBDF; // type:object size:0xF data:string lbl_8012FBEE = .data:0x8012FBEE; // type:object size:0x12 _ovltbl = .data:0x8012FC00; // type:object size:0x320 lbl_8012FF20 = .data:0x8012FF20; // type:object size:0x20 -lbl_8012FF40 = .data:0x8012FF40; // type:object size:0xC -lbl_8012FF4C = .data:0x8012FF4C; // type:object size:0x14 -lbl_8012FF60 = .data:0x8012FF60; // type:object size:0x170 -lbl_801300D0 = .data:0x801300D0; // type:object size:0x130 -lbl_80130200 = .data:0x80130200; // type:object size:0x140 -lbl_80130340 = .data:0x80130340; // type:object size:0x3C -lbl_8013037C = .data:0x8013037C; // type:object size:0x10 +fadeInFunc = .data:0x8012FF40; // type:object size:0xC scope:local +fadeOutFunc = .data:0x8012FF4C; // type:object size:0xC scope:local +spcFontTbl = .data:0x8012FF60; // type:object size:0x170 scope:local +charWETbl = .data:0x801300D0; // type:object size:0x130 +charWJTbl = .data:0x80130200; // type:object size:0x140 +charColPal = .data:0x80130340; // type:object size:0x3C scope:local align:32 +frameFileTbl = .data:0x8013037C; // type:object size:0x10 scope:local lbl_8013038C = .data:0x8013038C; // type:object size:0xE data:string lbl_8013039A = .data:0x8013039A; // type:object size:0xF data:string lbl_801303A9 = .data:0x801303A9; // type:object size:0x10 data:string @@ -5071,11 +5071,11 @@ lbl_8013040C = .data:0x8013040C; // type:object size:0x10 data:string lbl_8013041C = .data:0x8013041C; // type:object size:0x11 data:string lbl_8013042D = .data:0x8013042D; // type:object size:0x10 data:string lbl_8013043D = .data:0x8013043D; // type:object size:0x13 -lbl_80130450 = .data:0x80130450; // type:object size:0x30 -lbl_80130480 = .data:0x80130480; // type:object size:0x54 +mesDataTbl = .data:0x80130450; // type:object size:0x30 scope:local +winVoiceTbl = .data:0x80130480; // type:object size:0x54 scope:local lbl_801304D4 = .data:0x801304D4; // type:object size:0x13 data:string lbl_801304E7 = .data:0x801304E7; // type:object size:0x19 -lbl_80130500 = .data:0x80130500; // type:object size:0x50 +winPortraitTbl = .data:0x80130500; // type:object size:0x50 scope:local lbl_80130550 = .data:0x80130550; // type:object size:0x26 data:string lbl_80130576 = .data:0x80130576; // type:object size:0x2A lbl_801305A0 = .data:0x801305A0; // type:object size:0x19 data:string @@ -5484,11 +5484,11 @@ espanim = .bss:0x801AE200; // type:object size:0x1200 data:4byte lbl_80192060 = .bss:0x801AF400; // type:object size:0x100 lbl_80192160 = .bss:0x801AF500; // type:object size:0x100 lbl_80192260 = .bss:0x801AF600; // type:object size:0x100 -wipeData = .bss:0x801AF700; // type:object size:0x60 data:4byte -lbl_801AF760 = .bss:0x801AF760; // type:object size:0x3000 data:byte -lbl_801B2760 = .bss:0x801B2760; // type:object size:0x10 -lbl_801B2770 = .bss:0x801B2770; // type:object size:0x1400 -lbl_801B3B70 = .bss:0x801B3B70; // type:object size:0x10 +wipeData = .bss:0x801AF700; // type:object size:0x4C data:4byte +winData = .bss:0x801AF760; // type:object size:0x3000 align:32 data:byte +winKey = .bss:0x801B2760; // type:object size:0x10 +winComKeyBuf = .bss:0x801B2770; // type:object size:0x1400 +mesWInsert = .bss:0x801B3B70; // type:object size:0x10 lbl_801B3B80 = .bss:0x801B3B80; // type:object size:0x400 data:byte lbl_801B3F80 = .bss:0x801B3F80; // type:object size:0x20 lbl_801B3FA0 = .bss:0x801B3FA0; // type:object size:0x2C0 @@ -5776,15 +5776,9 @@ lbl_801F0968 = .sdata:0x801F0968; // type:object size:0x8 scope:local lbl_801F0970 = .sdata:0x801F0970; // type:object size:0x8 lbl_801F0978 = .sdata:0x801F0978; // type:object size:0x8 lbl_801F0980 = .sdata:0x801F0980; // type:object size:0x8 -lbl_801F0988 = .sdata:0x801F0988; // type:object size:0x1 data:byte -lbl_801F0989 = .sdata:0x801F0989; // type:object size:0x1 data:byte -lbl_801F098A = .sdata:0x801F098A; // type:object size:0x1 data:byte -lbl_801F098B = .sdata:0x801F098B; // type:object size:0x1 data:byte -lbl_801F098C = .sdata:0x801F098C; // type:object size:0x1 data:byte -lbl_801F098D = .sdata:0x801F098D; // type:object size:0x1 data:byte -lbl_801F098E = .sdata:0x801F098E; // type:object size:0x1 data:byte -lbl_801F098F = .sdata:0x801F098F; // type:object size:0x1 data:byte -lbl_801F0990 = .sdata:0x801F0990; // type:object size:0x8 data:2byte +colorN$226 = .sdata:0x801F0988; // type:object size:0x4 scope:local data:byte +colorN$271 = .sdata:0x801F098C; // type:object size:0x4 scope:local data:byte +winPrio = .sdata:0x801F0990; // type:object size:0x2 scope:local data:2byte lbl_801F0998 = .sdata:0x801F0998; // type:object size:0x8 lbl_801F09A0 = .sdata:0x801F09A0; // type:object size:0x8 lbl_801F09A8 = .sdata:0x801F09A8; // type:object size:0x8 @@ -6213,26 +6207,26 @@ seqTimer = .sbss:0x801F1156; // type:object size:0x2 scope:local data:2byte gid = .sbss:0x801F1158; // type:object size:0x2 scope:local data:2byte lbl_801D3DA0 = .sbss:0x801F1160; // type:object size:0x8 wipeFadeInF = .sbss:0x801F1168; // type:object size:0x8 data:4byte -lbl_801F1170 = .sbss:0x801F1170; // type:object size:0x4 data:4byte -lbl_801F1174 = .sbss:0x801F1174; // type:object size:0x1 data:byte -lbl_801F1176 = .sbss:0x801F1176; // type:object size:0x2 data:2byte -lbl_801F1178 = .sbss:0x801F1178; // type:object size:0x2 data:2byte -lbl_801F117A = .sbss:0x801F117A; // type:object size:0x2 data:2byte -lbl_801F117C = .sbss:0x801F117C; // type:object size:0x4 data:4byte -lbl_801F1180 = .sbss:0x801F1180; // type:object size:0x4 data:4byte -lbl_801F1184 = .sbss:0x801F1184; // type:object size:0x4 data:4byte -lbl_801F1188 = .sbss:0x801F1188; // type:object size:0x1 data:byte -lbl_801F1189 = .sbss:0x801F1189; // type:object size:0x1 data:byte -lbl_801F118A = .sbss:0x801F118A; // type:object size:0x2 data:2byte -lbl_801F118C = .sbss:0x801F118C; // type:object size:0x2 data:2byte -lbl_801F1190 = .sbss:0x801F1190; // type:object size:0x4 data:4byte -lbl_801F1194 = .sbss:0x801F1194; // type:object size:0x4 data:4byte -lbl_801F1198 = .sbss:0x801F1198; // type:object size:0x4 data:4byte -lbl_801F119C = .sbss:0x801F119C; // type:object size:0x4 data:4byte -lbl_801F11A0 = .sbss:0x801F11A0; // type:object size:0x4 data:4byte -lbl_801F11A4 = .sbss:0x801F11A4; // type:object size:0x4 data:4byte -lbl_801F11A8 = .sbss:0x801F11A8; // type:object size:0x8 data:4byte -lbl_801F11B0 = .sbss:0x801F11B0; // type:object size:0x1 data:byte +fontAnim = .sbss:0x801F1170; // type:object size:0x4 data:4byte +LanguageNo = .sbss:0x801F1174; // type:object size:0x1 scope:local data:byte +comKeyIdx = .sbss:0x801F1176; // type:object size:0x2 scope:local data:2byte +comKeyIdxNow = .sbss:0x801F1178; // type:object size:0x2 scope:local data:2byte +mesCharCnt = .sbss:0x801F117A; // type:object size:0x2 scope:local data:2byte +cancelCRF = .sbss:0x801F117C; // type:object size:0x4 scope:local data:4byte +fontWidthP = .sbss:0x801F1180; // type:object size:0x4 scope:local data:4byte +winAMemP = .sbss:0x801F1184; // type:object size:0x4 scope:local data:4byte +winInsertF = .sbss:0x801F1188; // type:object size:0x1 scope:local data:byte +winTabSize = .sbss:0x801F1189; // type:object size:0x1 scope:local data:byte +winMaxHeight = .sbss:0x801F118A; // type:object size:0x2 scope:local data:2byte +winMaxWidth = .sbss:0x801F118C; // type:object size:0x2 scope:local data:2byte +messDataNo = .sbss:0x801F1190; // type:object size:0x4 scope:local data:4byte +messDataPtr = .sbss:0x801F1194; // type:object size:0x4 data:4byte +winProc = .sbss:0x801F1198; // type:object size:0x4 scope:local data:4byte +cardAnimB = .sbss:0x801F119C; // type:object size:0x4 scope:local data:4byte +cardAnimA = .sbss:0x801F11A0; // type:object size:0x4 scope:local data:4byte +cursorAnim = .sbss:0x801F11A4; // type:object size:0x4 scope:local data:4byte +iconAnim = .sbss:0x801F11A8; // type:object size:0x8 scope:local data:4byte +lbl_801F11B0 = .sbss:0x801F11B0; // type:object size:0x1 scope:local data:byte lbl_801F11B4 = .sbss:0x801F11B4; // type:object size:0x4 data:4byte lbl_801F11B8 = .sbss:0x801F11B8; // type:object size:0x2 data:2byte lbl_801F11BC = .sbss:0x801F11BC; // type:object size:0x4 data:4byte @@ -6550,7 +6544,7 @@ lbl_801F1644 = .sbss:0x801F1644; // type:object size:0x4 data:4byte lbl_801F1648 = .sbss:0x801F1648; // type:object size:0x4 data:4byte lbl_801F164C = .sbss:0x801F164C; // type:object size:0x4 data:4byte lbl_801F1650 = .sbss:0x801F1650; // type:object size:0x4 data:4byte -lbl_801F1654 = .sbss:0x801F1654; // type:object size:0x1 data:byte +boardTutorialF = .sbss:0x801F1654; // type:object size:0x1 data:byte lbl_801F1656 = .sbss:0x801F1656; // type:object size:0x2 data:2byte lbl_801F1658 = .sbss:0x801F1658; // type:object size:0x1 data:byte lbl_801F1659 = .sbss:0x801F1659; // type:object size:0x1 data:byte diff --git a/configure.py b/configure.py index 96f70d76..0c48e37b 100644 --- a/configure.py +++ b/configure.py @@ -408,7 +408,7 @@ config.libs = [ Object(Matching, "game/code_8003FF68.c"), Object(Matching, "game/ClusterExec.c"), Object(Matching, "game/ShapeExec.c"), - Object(MatchingFor("GMPE01_00", "GMPE01_01"), "game/wipe.c"), + Object(Matching, "game/wipe.c"), Object(MatchingFor("GMPE01_00", "GMPE01_01"), "game/window.c"), Object(MatchingFor("GMPE01_00", "GMPE01_01"), "game/messdata.c"), Object(MatchingFor("GMPE01_00", "GMPE01_01"), "game/card.c"), diff --git a/include/version.h b/include/version.h new file mode 100644 index 00000000..8d91dabf --- /dev/null +++ b/include/version.h @@ -0,0 +1,18 @@ +#ifndef _VERSION_H +#define _VERSION_H + +#define VERSION_NO_ENG0 0 +#define VERSION_NO_ENG1 1 +#define VERSION_NO_PAL0 2 +#define VERSION_NO_PAL2 3 +#define VERSION_NO_JAP 4 + +#define VERSION_ENG (VERSION == VERSION_NO_ENG0 || VERSION == VERSION_NO_ENG1) +#define VERSION_PAL (VERSION == VERSION_NO_PAL0 || VERSION == VERSION_NO_PAL2) +#define VERSION_JAP (VERSION == VERSION_NO_JAP) +#define VERSION_NTSC (!VERSION_PAL) + +#define VERSION_REV0 (VERSION == VERSION_NO_ENG0 || VERSION == VERSION_NO_PAL0 || VERSION == VERSION_NO_JAP) +#define VERSION_REV1 (!VERSION_REV0) + +#endif diff --git a/src/game/wipe.c b/src/game/wipe.c index f3902d7e..aa7c1d9a 100644 --- a/src/game/wipe.c +++ b/src/game/wipe.c @@ -3,6 +3,7 @@ #include "game/memory.h" #include "game/flag.h" #include "game/board/tutorial.h" +#include "version.h" s16 HuSysVWaitGet(s16 old); @@ -141,6 +142,11 @@ void WipeCreate(s16 mode, s16 type, s16 duration) void WipeColorSet(u8 r, u8 g, u8 b) { + #if VERSION_PAL + if(r > 160 && g > 160 && b > 160) { + r = g = b = 160; + } + #endif wipeData.color.r = r; wipeData.color.g = g; wipeData.color.b = b;