Adds some menu functions

This commit is contained in:
Luciano Ciccariello 2022-01-09 14:56:43 +00:00
parent 7c2f7a9f6a
commit dab4a5d56b
8 changed files with 719 additions and 711 deletions

View File

@ -16,6 +16,10 @@ Recompilable code that creates 1:1 binaries for the commercial videogame Castlev
1. Run `make extract` to generate the assembly files
1. Run `make all` to compile the binaries into the `build/` directory
## Non-matching build
Some of the functions that do not fully match the original game can be compiled by defining `#define NON_MATCHING` on a header file or by passing `-DNON_MATCHING to the compiler. In theory they might be logically equivalent in-game, but I cannot promise that. Few of them could match by tuning or changing the compiler.
# Notes
* I suspect that GCC 2.7.2 / PSY-Q 3.6 have been used to originally compile `DRA.BIN`

View File

@ -7,7 +7,7 @@ options:
asset_path: assets/dra
src_path: src/dra
compiler: GCC
symbol_addrs_path: config/sym.dra.txt
symbol_addrs_path: config/symbols.txt
undefined_syms_path: config/undefined_syms.dra.txt
undefined_funcs_auto_path: config/undefined_funcs_auto.dra.txt
undefined_syms_auto_path: config/undefined_syms_auto.dra.txt

View File

@ -7,7 +7,7 @@ options:
asset_path: assets/main
src_path: src/main
compiler: GCC
symbol_addrs_path: config/sym.main.txt
symbol_addrs_path: config/symbols.txt
undefined_syms_path: config/undefined_syms.main.txt
undefined_funcs_auto_path: config/undefined_funcs_auto.main.txt
undefined_syms_auto_path: config/undefined_syms_auto.main.txt

View File

@ -1,563 +0,0 @@
aDraBin1 = 0x80010040;
aFMapBin1 = 0x8001004C;
a0123456789abcd = 0x8001005C;
jpt_80011B20 = 0x80010074;
aClip3d3dDD = 0x80010120;
aOfs3d3d = 0x80010138;
aTwDDDD = 0x80010148;
aDtdD = 0x80010160;
aDfeD = 0x8001016C;
aDisp3d3dDD = 0x80010178;
aScreen3d3dDD = 0x80010194;
aIsinterD = 0x800101B0;
aIsrgb24D = 0x800101BC;
aIdSysCV1831995 = 0x800101C8;
aSBadRect = 0x800102B0;
str = 0x800102D4;
aLoadimage = 0x800102E0;
aStoreimage = 0x800102EC;
aMoveimage = 0x800102F8;
aVsyncTimeout = 0x800103C4;
aIdIntrCV173199 = 0x800103D4;
a0123456789abcd_0 = 0x8001046C;
a0123456789abcd_1 = 0x80010480;
jpt_800163F4 = 0x80010494;
aNone = 0x80010560;
aCdlreads = 0x80010568;
aCdlseekp = 0x80010574;
aCdlseekl = 0x80010580;
aCdlgettd = 0x8001058C;
aCdlgettn = 0x80010598;
aCdlgetlocp = 0x800105A4;
aCdlgetlocl = 0x800105B0;
aCdldemute = 0x800105DC;
aCdlmute = 0x800105E8;
aCdlreset = 0x800105F0;
aCdlpause = 0x800105FC;
aCdlstop = 0x80010608;
aCdlstandby = 0x80010610;
aCdlreadn = 0x8001061C;
aCdlbackword = 0x80010628;
aCdlforward = 0x80010634;
aCdlplay = 0x80010640;
aCdlsetloc = 0x80010648;
aCdlnop = 0x80010654;
aCdlsync = 0x8001065C;
aDiskerror_0 = 0x80010664;
aDataend = 0x80010670;
aAcknowledge = 0x80010678;
aComplete = 0x80010684;
aDataready = 0x80010690;
aNointr = 0x8001069C;
aCdTimeout = 0x800106A4;
aDiskerror = 0x800106D0;
aCdromUnknownIn = 0x800106F8;
jpt_80019DE8 = 0x80010718;
aCdSync = 0x8001072C;
aCdReady = 0x80010734;
aCdCw = 0x80010758;
aIdBiosCV177199 = 0x80010760;
aCdInit = 0x80010794;
aCdDatasync = 0x800107AC;
aSDirWasNotFoun = 0x800107D4;
aCd001 = 0x80010870;
aCdreadSectorEr = 0x800109A4;
aCdreadShellOpe = 0x800109BC;
aCdreadRetry = 0x800109D4;
jpt_8001DE24 = 0x80010A60;
jpt_8001EECC = 0x80010C48;
jpt_8001EFB8 = 0x80010CA8;
jpt_80020818 = 0x80010CD4;
aWaitReset = 0x80010CFC;
aWaitWrdyHL = 0x80010D0C;
aWaitDmafClearW = 0x80010D20;
aSpuTimeOutWait = 0x80010D34;
jpt_8002A518 = 0x80010D74;
jpt_8002A5E8 = 0x80010D94;
jpt_8002ADFC = 0x80010DB4;
jpt_8002AEC4 = 0x80010DD4;
__main = 0x80010DF4;
start = 0x80010DFC;
stup1 = 0x80010E20;
stup0 = 0x80010E9C;
main = 0x80010EB8;
SetDumpFnt = 0x8001134C;
FntLoad = 0x8001138C;
FntOpen = 0x8001142C;
FntFlush = 0x800116E4;
DumpClut = 0x80011EA0;
AddPrim = 0x80011F18;
setSemiTrans = 0x80011FCC;
setShadeTex = 0x80011FF4;
setPolyGT3 = 0x80012058;
setPolyG4 = 0x80012094;
setPolyGT4 = 0x800120A8;
setSprt8 = 0x800120BC;
setSprt16 = 0x800120D0;
setSprt = 0x800120E4;
setTile = 0x80012134;
setLineG2 = 0x80012170;
ResetGraph = 0x80012434;
SetGraphReverse = 0x80012604;
SetGraphQueue = 0x8001277C;
GsGetWorkBase = 0x80012818;
GsGetWorkBase_0 = 0x80012828;
DrawSyncCallback = 0x80012838;
SetDispMask = 0x80012894;
DrawSync = 0x8001290C;
debugLog = 0x80012978;
ClearImage = 0x80012A90;
LoadImage = 0x80012B24;
StoreImage = 0x80012B88;
MoveImage = 0x80012BEC;
ClearOTag = 0x80012C90;
ClearOTagR = 0x80012D3C;
DrawOTag = 0x80012E1C;
PutDrawEnv = 0x80012E8C;
PutDispEnv = 0x80012FE4;
InitHeap = 0x80015138;
Load = 0x80015148;
Exec = 0x80015158;
GPU_cw = 0x80015168;
_bu_init = 0x80015178;
open = 0x80015188;
lseek = 0x80015198;
read = 0x800151A8;
write = 0x800151B8;
close = 0x800151C8;
format = 0x800151D8;
firstfile = 0x800151E8;
nextfile = 0x800151F8;
erase = 0x80015208;
Krom2RawAdd = 0x80015218;
ChangeClearPAD = 0x80015228;
StopPAD = 0x800152D8;
PAD_init2 = 0x800152E8;
PAD_dr = 0x800152F8;
VSync = 0x80015308;
VSyncWait = 0x80015450;
ChangeClearRCnt = 0x800154EC;
ResetCallback = 0x800154FC;
InterruptCallback = 0x8001552C;
DMACallback = 0x8001555C;
VSyncCallback = 0x8001558C;
VSyncCallbacks = 0x800155C0;
StopCallback = 0x800155F0;
RestartCallback = 0x80015620;
CheckCallback = 0x80015650;
GetIntrMask = 0x80015660;
SetIntrMask = 0x80015678;
_96_remove = 0x80015C0C;
ReturnFromException = 0x80015C1C;
ResetEntryInt = 0x80015C2C;
HookEntryInt = 0x80015C3C;
EnterCriticalSection = 0x80015C4C;
ExitCriticalSection = 0x80015C5C;
GsGetWorkBase_1 = 0x80016054;
exit = 0x80016064;
puts = 0x80016074;
setjmp = 0x80016084;
strcat = 0x80016094;
strcpy = 0x800160A4;
strlen = 0x800160B4;
memcpy = 0x800160C4;
memset = 0x800160D4;
rand = 0x800160E4;
srand = 0x800160F4;
malloc = 0x80016104;
free = 0x80016114;
printf = 0x80016124;
fprintf = 0x80016134;
memchr = 0x80016990;
_card_info = 0x80016A0C;
_card_load = 0x80016A1C;
InitCARD = 0x80016A2C;
StartCARD = 0x80016A3C;
_card_clear = 0x80016A4C;
_card_write = 0x80016A84;
_new_card = 0x80016A94;
rsin = 0x80016C9C;
sin_1 = 0x80016CD8;
SetFogNear = 0x80016E08;
CompMatrix = 0x800172BC;
SetMulMatrix = 0x800176F4;
ReadColorMatrix = 0x80017C88;
TransMatrix = 0x80017CDC;
SetRotMatrix = 0x80017E3C;
SetLightMatrix = 0x80017E6C;
SetColorMatrix = 0x80017E9C;
SetTransMatrix = 0x80017ECC;
SetVertex0 = 0x80017EEC;
SetVertex1 = 0x80017EFC;
SetVertex2 = 0x80017F0C;
SetVertexTri = 0x80017F1C;
SetRGBfifo = 0x80017F3C;
SetIR123 = 0x80017F50;
SetIR0 = 0x80017F64;
SetSZfifo3 = 0x80017F70;
SetSZfifo4 = 0x80017F84;
SetSXSYfifo = 0x80017F9C;
SetRii = 0x80017FB0;
SetMAC123 = 0x80017FC4;
SetData32 = 0x80017FD8;
SetDQA = 0x80017FE4;
SetDQB = 0x80017FF0;
SetBackColor = 0x80017FFC;
SetFarColor = 0x8001801C;
SetGeomOffset = 0x8001803C;
SetGeomScreen = 0x8001805C;
LocalLight = 0x8001806C;
DpqColor = 0x80018090;
NormalColor = 0x800180AC;
NormalColor3 = 0x800180C8;
NormalColorDpq = 0x80018104;
NormalColorDpq3 = 0x80018128;
NormalColorCol = 0x80018170;
NormalColorCol3 = 0x80018190;
ColorDpq = 0x800181D4;
ColorCol = 0x800181FC;
AverageSZ3 = 0x80018220;
AverageSZ4 = 0x80018230;
RotTransPers = 0x8001824C;
RotTransPers3 = 0x8001827C;
RotTrans = 0x800182DC;
NormalClip = 0x8001830C;
RotTransPers4 = 0x8001833C;
RotAverage3 = 0x800183BC;
RotAverage4 = 0x8001841C;
RotAverageNclip3 = 0x8001849C;
RotAverageNclip4 = 0x8001852C;
RotAverageNclipColorCol3 = 0x800185DC;
RotMatrix = 0x800186AC;
RotMatrixYXZ = 0x8001893C;
RotMatrixX = 0x80018BCC;
RotMatrixY = 0x80018D6C;
RotMatrixZ = 0x80018F0C;
FlushCache = 0x800192CC;
CdInit = 0x8001930C;
DeliverEvent = 0x80019414;
strcmp = 0x8001BC64;
strncmp = 0x8001BC74;
StClearRing = 0x8001C320;
StSetStream = 0x8001C4C8;
SsVoKeyOff = 0x8001F7AC;
SsVoKeyOn = 0x8001F7E8;
_SsInit = 0x80020328;
SsInitHot = 0x80020410;
SsVabClose = 0x800211D0;
SsVabFakeBody = 0x800212AC;
_SsVmSetProgVol = 0x80025840;
_SsVmGetProgVol = 0x800258B0;
_SsVmSetProgPan = 0x80025900;
_SsVmSetProgVol_0 = 0x80025908;
_SsVmGetProgPan = 0x80025970;
_SsVmGetProgVol_0 = 0x80025978;
_SsVmSetProgPan_0 = 0x800259C8;
_SsVmGetProgPan_0 = 0x80025A38;
SsUtKeyOnV = 0x800264A0;
SsUtKeyOffV = 0x800267E8;
SsUtPitchBend = 0x80026954;
SsUtGetDetVVol = 0x80026DD8;
SsUtSetDetVVol = 0x80026E14;
SsUtGetDetVVol_0 = 0x80026E2C;
SsUtSetDetVVol_0 = 0x80026E68;
SsUtGetVVol = 0x80026E78;
SsUtGetVVol_0 = 0x80026ECC;
SsUtSetVVol = 0x80026F24;
SsUtSetVVol_0 = 0x80026F78;
OpenEvent = 0x800271C8;
EnableEvent = 0x800271D8;
CloseEvent = 0x800283A4;
DisableEvent = 0x800283B4;
SpuInitMalloc = 0x800283C4;
SpuMalloc = 0x80028418;
SpuMallocWithStartAddr = 0x80028D40;
_spu_setReverbAttr = 0x80029810;
SpuClearReverbWorkArea = 0x80029CE0;
WaitEvent = 0x80029E7C;
TestEvent = 0x8002AD5C;
g_InterruptMask = 0x8002D348;
_vsync_rcnt = 0x8002D374;
aThisFunctionIs = 0x8002E1EA;
g_CurrentPlayableCharacter = 0x8003C9A0;
g_CurrentRoomTileLayout = 0x80073084;
g_CurrentRoomHSize = 0x800730A4;
g_CurrentRoomVSize = 0x800730A8;
g_CurrentRoomLeft = 0x800730B0;
g_CurrentRoomTop = 0x800730B4;
g_CurrentRoomRight = 0x800730B8;
g_CurrentRoomBottom = 0x800730BC;
g_CurrentRoomWidth = 0x800730C8;
g_CurrentRoomHeight = 0x800730CC;
playerX = 0x800973F0;
playerY = 0x800973F4;
player_hp = 0x80097BA0;
player_hp_max = 0x80097BA4;
player_heart = 0x80097BA8;
player_heart_max = 0x80097BAC;
player_mp = 0x80097BB0;
player_mp_max = 0x80097BB4;
player_stat_str = 0x80097BB8;
player_stat_con = 0x80097BBC;
player_stat_int = 0x80097BC0;
player_stat_lck = 0x80097BC4;
player_level = 0x80097BE8;
player_exp = 0x80097BEC;
player_gold = 0x80097BF0;
player_kill_count = 0x80097BF4;
player_equip_right_hand = 0x80097BF8;
player_equip_left_hand = 0x80097BFC;
player_equip_head = 0x80097C00;
player_equip_body = 0x80097C04;
player_equip_cloak = 0x80097C08;
player_equip_ring1 = 0x80097C0C;
player_equip_ring2 = 0x80097C10;
m_ptr_menu_text_kills = 0x800A8284;
rect = 0x800ACD98;
aPbav = 0x800B107C;
aPbav_0 = 0x800B407C;
aPbav_2 = 0x800B607C;
aPbav_1 = 0x800B807C;
aPqes_1 = 0x800BA07C;
aPqes = 0x800BC37D;
aPqes_0 = 0x800BCAC3;
aO = 0x800DB3B4;
aDr03x = 0x800DB44C;
aGt403x = 0x800DB458;
aG403x = 0x800DB464;
aGt303x = 0x800DB470;
aLine03x = 0x800DB47C;
aSp1603x = 0x800DB488;
aSp03x = 0x800DB494;
aTile03x = 0x800DB4A0;
aEnv03x = 0x800DB4AC;
aEff03x = 0x800DB4B8;
aRed = 0x800DB4C4;
aGreen = 0x800DB4C8;
aBlue = 0x800DB4D0;
aHalfOn = 0x800DB4D8;
aHalfOff = 0x800DB4E4;
aRgb02x02x02x = 0x800DB4F0;
a0104x04x = 0x800DB504;
a2304x04x = 0x800DB514;
jpt_800E4A64 = 0x800DB530;
jpt_800E55C4 = 0x800DB560;
a02x02x = 0x800DB720;
aMemoryCardLoad = 0x800DB730;
aEnding = 0x800DB744;
aIwaLoad = 0x800DB74C;
aIgaLoad = 0x800DB758;
aHagiLoad = 0x800DB764;
aLoadCBinSBin = 0x800DB770;
aAlucard = 0x800DB784;
aRichter = 0x800DB790;
jpt_800E63C4 = 0x800DB7A0;
jpt_800E7034 = 0x800DB7E8;
jpt_800E7484 = 0x800DB808;
jpt_800E7B18 = 0x800DB828;
aSimCBinFTitle1 = 0x800DBB38;
aSimCSoundDataS_0 = 0x800DBD14;
aSimCSoundDataS_1 = 0x800DBD50;
jpt_800E7C28 = 0x800DBD70;
jpt_800E7E3C = 0x800DBD88;
aSimCBin = 0x800DBDE0;
aSimCSoundDataS = 0x800DBDF4;
aSimCBinW0000Bi = 0x800DBE14;
aSimCBinW1000Bi = 0x800DBE2C;
aSimCBinF0000Bi = 0x800DBE44;
aSimCBinF1000Bi = 0x800DBE5C;
aSimCBinTt000Bi = 0x800DBE74;
aSimCBinFt000Bi = 0x800DBE8C;
aSimCBinMo000Bi = 0x800DBEA4;
aOErrS = 0x800DBEBC;
aRErr = 0x800DBEC8;
aClErr = 0x800DBED0;
aTrErr = 0x800DBED8;
aBu1d1d = 0x800DBEE0;
aBu1d1dS = 0x800DBEEC;
jpt_800E98E4 = 0x800DBEF8;
jpt_800E9934 = 0x800DBF10;
jpt_800E9A48 = 0x800DBF28;
aBaslus00067dra = 0x800DC194;
jpt_800EA8C0 = 0x800DC1A8;
jpt_800EB120 = 0x800DC1E8;
aOver08x04x = 0x800DC228;
jpt_800EE2FC = 0x800DC238;
jpt_800EF590 = 0x800DC290;
aSimCBinDemoKey = 0x800DC490;
aSimCBinDk000Bi = 0x800DC4A8;
aDemonstration = 0x800DC4C8;
aDemoKeyIn04x04 = 0x800DC4D8;
aDemoOverflow = 0x800DC4F0;
jpt_800F0658 = 0x800DC500;
jpt_800F096C = 0x800DC514;
jpt_800F288C = 0x800DC534;
jpt_800F3684 = 0x800DC55C;
jpt_800F3758 = 0x800DC57C;
jpt_800F3C14 = 0x800DC59C;
jpt_800F42A0 = 0x800DC5B4;
aWindowColorSet = 0x800DC5FC;
jpt_800F8150 = 0x800DC68C;
jpt_800F93A0 = 0x800DC6AC;
jpt_800FA060 = 0x800DC71C;
jpt_800FBCC4 = 0x800DC75C;
jpt_800FC36C = 0x800DCB7C;
jpt_800FC5B8 = 0x800DCB94;
jpt_800FD6E0 = 0x800DCBAC;
jpt_800FD7E0 = 0x800DCBC4;
jpt_800FDB40 = 0x800DCBDC;
aXXVQ = 0x800DCBF4;
aAxearmor = 0x800DCC00;
jpt_80102810 = 0x800DCC0C;
jpt_80102918 = 0x800DCC2C;
jpt_80102D9C = 0x800DCC54;
aMemoryCard = 0x800DCC80;
aMemoryCardIs = 0x800DCCAC;
aCannot = 0x800DCCCC;
aNoGame = 0x800DCCE8;
aMemoryCard_0 = 0x800DCD24;
aYes = 0x800DCDB0;
aNo = 0x800DCDB8;
jpt_80103F08 = 0x800DCDC0;
aGold = 0x800DD0A8;
aNz0 = 0x800DD0B0;
aFNz0 = 0x800DD0B4;
aTop = 0x800DD0BC;
aTop_0 = 0x800DD0C0;
aFTop = 0x800DD0C4;
aTogi = 0x800DD0CC;
aAre = 0x800DD0D4;
aFAre = 0x800DD0D8;
aMizu = 0x800DD0E0;
aNo4 = 0x800DD0E8;
aFNo4 = 0x800DD0EC;
aCen = 0x800DD0F4;
aFCen = 0x800DD0F8;
aSiro1 = 0x800DD100;
aNp3 = 0x800DD108;
aFNp3 = 0x800DD10C;
aFNo0 = 0x800DD180;
aMpty = 0x800DEC54;
aUnequip = 0x800DF9EC;
a3pecial = 0x800DFA60;
aAmiliar = 0x800DFA74;
a2ichter = 0x800DFD38;
a7indow = 0x800DFDFC;
a2ight = 0x800DFE78;
aUtton = 0x800DFEC0;
m_menu_text_kills = 0x800DFEEC;
aHealHpBySheddi = 0x800E00B0;
aDarkMetamorpho = 0x800E00D4;
aCausesItemsToM = 0x800E042C;
aTransformIntoB = 0x800E05B4;
aSoulOfBat = 0x800E05C8;
jpt_8010812C = 0x800E0D38;
aDmaError = 0x800E0D54;
aSdHeaderError = 0x800E0D64;
aDiskError = 0x800E0D78;
aRetry = 0x800E0D84;
aRetryXa = 0x800E0D8C;
aCdShellOpenErr = 0x800E0D98;
aCheckingCd = 0x800E0DB0;
aErrorStep02x = 0x800E0DC0;
jpt_80108CFC = 0x800E0DD8;
aStep04x = 0x800E0E28;
aBatIStep04x = 0x800E0E34;
jpt_8010A86C = 0x800E0E48;
jpt_8010AA30 = 0x800E0E88;
jpt_8010AE88 = 0x800E0EC8;
jpt_8010B3B4 = 0x800E0EF0;
jpt_8010B658 = 0x800E0FC0;
jpt_8010F424 = 0x800E108C;
jpt_8010F48C = 0x800E12AC;
jpt_8010F75C = 0x800E12C4;
jpt_8010F958 = 0x800E12DC;
jpt_8010F9E8 = 0x800E12F4;
jpt_801109D0 = 0x800E1308;
jpt_80110C1C = 0x800E1320;
aPlPose02x = 0x800E1334;
jpt_80110E54 = 0x800E1348;
jpt_80111080 = 0x800E1360;
jpt_8011131C = 0x800E1380;
aCommandOk = 0x800E13A0;
a100swordSetOk = 0x800E13AC;
aCharal02x = 0x800E1400;
jpt_80112264 = 0x800E1410;
jpt_80112C9C = 0x800E1588;
jpt_80113328 = 0x800E1750;
jpt_80113938 = 0x800E18C8;
jpt_80113B10 = 0x800E18E0;
aDamKind04x = 0x800E18F4;
jpt_801140A8 = 0x800E1908;
jpt_801141F0 = 0x800E1948;
jpt_80114300 = 0x800E1990;
jpt_80114388 = 0x800E19B0;
jpt_80115DF0 = 0x800E19D0;
jpt_8011643C = 0x800E19E8;
jpt_801169F4 = 0x800E1A00;
jpt_80116CF8 = 0x800E1A20;
aErrorStep = 0x800E1A38;
jpt_80118D54 = 0x800E1A44;
aStrY02x = 0x800E1A74;
jpt_801195F4 = 0x800E1A84;
aAtariNuki = 0x800E1AA4;
jpt_8011AD40 = 0x800E1AB4;
jpt_8011AD94 = 0x800E1AD4;
jpt_8011C214 = 0x800E1AF4;
jpt_8011C490 = 0x800E1B44;
jpt_8011CB08 = 0x800E1B74;
jpt_8011DC74 = 0x800E1B94;
jpt_8011DD70 = 0x800E1BF4;
jpt_8011DDCC = 0x800E1C54;
jpt_8011E580 = 0x800E1CB4;
jpt_8011E648 = 0x800E1CE4;
jpt_8011E9D4 = 0x800E1D1C;
jpt_8011EADC = 0x800E1D4C;
jpt_80120C98 = 0x800E1D84;
jpt_80120FDC = 0x800E1DA4;
jpt_80122494 = 0x800E1DBC;
jpt_80124410 = 0x800E1DD4;
jpt_80126808 = 0x800E1E34;
aLightTimer02x = 0x800E1E48;
jpt_80126F54 = 0x800E1E5C;
jpt_80128C94 = 0x800E1E7C;
jpt_8012A918 = 0x800E1E90;
jpt_8012D4D8 = 0x800E1EB0;
jpt_8012EFE4 = 0x800E1EC8;
jpt_8012FA74 = 0x800E1EF0;
jpt_8012FAC0 = 0x800E1F18;
jpt_80130384 = 0x800E1F30;
jpt_801303DC = 0x800E1F58;
jpt_80130728 = 0x800E1F70;
jpt_80130788 = 0x800E1F98;
jpt_80130B00 = 0x800E1FB0;
jpt_80131014 = 0x800E1FD8;
jpt_801314B4 = 0x800E2000;
jpt_80132F94 = 0x800E2034;
jpt_801332C4 = 0x800E205C;
jpt_80133990 = 0x800E2074;
jpt_80133C10 = 0x800E208C;
jpt_80135058 = 0x800E20B4;
jpt_801353DC = 0x800E2354;
nullsub_8 = 0x800E2F34;
entrypoint_sotn = 0x800E3988;
nullsub_9 = 0x800E7384;
SetRoomForegroundLayer = 0x800ED774;
SetRoomBackgroundLayer = 0x800ED90C;
LoadRoomLayer = 0x800ED9F4;
CheckCollision = 0x800EF45C;
IsSpriteOutsideDrawArea = 0x800F54CC;
ScissorSprite = 0x800F57C8;
drawMenuChar = 0x800F678C;
drawMenuInt = 0x800F68F4;
setMenuBackgroundRect = 0x80107330;
CopyMapOverlayCallback = 0x801074BC;
nullsub_10 = 0x801362A4;
g_someValue = 0x8013792C;
g_OverlayCopySrcIndex = 0x80137F70;
g_OverlayCopyDstIndex = 0x80137F74;
g_OverlayCopySrc = 0x80137F80;
g_OverlayCopyDst = 0x80137F84;
g_OverlayBlockCount = 0x80137F8C;
g_OverlayLastBlockSize = 0x80137F90;
p = 0x80180014;

View File

@ -349,10 +349,10 @@ D_8003C9CC = 0x8003C9CC;
D_8003C9DC = 0x8003C9DC;
D_8003C9E0 = 0x8003C9E0;
D_8003C9E4 = 0x8003C9E4;
D_8003C9E8 = 0x8003C9E8;
g_menuButtonSettingsCursorPos = 0x8003C9E8;
D_8003C9EC = 0x8003C9EC;
D_8003C9F0 = 0x8003C9F0;
D_8003C9F8 = 0x8003C9F8;
g_menuButtonSettingsConfig = 0x8003C9F8;
D_8003C9FC = 0x8003C9FC;
D_8003CA14 = 0x8003CA14;
D_8003CA18 = 0x8003CA18;
@ -368,8 +368,8 @@ D_8003CAC0 = 0x8003CAC0;
D_8003CAC4 = 0x8003CAC4;
D_8003CAC8 = 0x8003CAC8;
D_8003CACC = 0x8003CACC;
D_8003CAF8 = 0x8003CAF8;
D_8003CAFC = 0x8003CAFC;
g_SettingsCloakMode = 0x8003CAF8;
g_SettingsSoundMode = 0x8003CAFC;
D_8003CB00 = 0x8003CB00;
D_8003CB04 = 0x8003CB04;
D_8003CB08 = 0x8003CB08;
@ -525,14 +525,23 @@ D_80073070 = 0x80073070;
D_80073074 = 0x80073074;
D_80073078 = 0x80073078;
D_8007307C = 0x8007307C;
g_CurrentRoomTileLayout = 0x80073084;
D_80073088 = 0x80073088;
D_8007308E = 0x8007308E;
D_80073092 = 0x80073092;
D_8007309C = 0x8007309C;
D_800730A0 = 0x800730A0;
g_CurrentRoomHSize = 0x800730A4;
g_CurrentRoomVSize = 0x800730A8;
D_800730AC = 0x800730AC;
g_CurrentRoomLeft = 0x800730B0;
g_CurrentRoomTop = 0x800730B4;
g_CurrentRoomRight = 0x800730B8;
g_CurrentRoomBottom = 0x800730BC;
D_800730C0 = 0x800730C0;
D_800730C4 = 0x800730C4;
g_CurrentRoomWidth = 0x800730C8;
g_CurrentRoomHeight = 0x800730CC;
D_800730D8 = 0x800730D8;
D_800730DC = 0x800730DC;
D_800730E2 = 0x800730E2;
@ -635,6 +644,8 @@ D_80086FFC = 0x80086FFC;
D_80087012 = 0x80087012;
D_800973B8 = 0x800973B8;
D_800973EC = 0x800973EC;
playerX = 0x800973F0;
playerY = 0x800973F4;
D_800973F8 = 0x800973F8;
D_800973FC = 0x800973FC;
D_80097400 = 0x80097400;
@ -726,6 +737,16 @@ D_80097A8D = 0x80097A8D;
D_80097B36 = 0x80097B36;
D_80097B90 = 0x80097B90;
D_80097B9C = 0x80097B9C;
player_hp = 0x80097BA0;
player_hp_max = 0x80097BA4;
player_heart = 0x80097BA8;
player_heart_max = 0x80097BAC;
player_mp = 0x80097BB0;
player_mp_max = 0x80097BB4;
player_stat_str = 0x80097BB8;
player_stat_con = 0x80097BBC;
player_stat_int = 0x80097BC0;
player_stat_lck = 0x80097BC4;
D_80097BC8 = 0x80097BC8;
D_80097BCC = 0x80097BCC;
D_80097BD0 = 0x80097BD0;
@ -734,6 +755,17 @@ D_80097BD8 = 0x80097BD8;
D_80097BDC = 0x80097BDC;
D_80097BE0 = 0x80097BE0;
D_80097BE4 = 0x80097BE4;
player_level = 0x80097BE8;
player_exp = 0x80097BEC;
player_gold = 0x80097BF0;
player_kill_count = 0x80097BF4;
player_equip_right_hand = 0x80097BF8;
player_equip_left_hand = 0x80097BFC;
player_equip_head = 0x80097C00;
player_equip_body = 0x80097C04;
player_equip_cloak = 0x80097C08;
player_equip_ring1 = 0x80097C0C;
player_equip_ring2 = 0x80097C10;
D_80097C14 = 0x80097C14;
D_80097C18 = 0x80097C18;
D_80097C1C = 0x80097C1C;
@ -782,4 +814,297 @@ D_80097F48 = 0x80097F48;
D_80097F49 = 0x80097F49;
D_80097F4A = 0x80097F4A;
D_800987B4 = 0x800987B4;
D_80098850 = 0x80098850;
D_80098850 = 0x80098850;
c_chPlaystationButtons = 0x800A2D70;
c_chShoulderButtons = 0x800A2D74;
c_strKills = 0x800A8284;
c_strButton = 0x800A8298;
c_strCloak = 0x800A829C;
c_strCloak2 = 0x800A82A0;
c_strExterior = 0x800A82A8;
c_strLining = 0x800A82AC;
c_strButtonRightHand = 0x800A82B0;
c_strButtonLeftHand = 0x800A82B4;
c_strButtonJump = 0x800A82B8;
c_strButtonSpecial = 0x800A82BC;
c_strButtonWolf = 0x800A82C0;
c_strButtonMist = 0x800A82C4;
c_strButtonBat = 0x800A82C8;
c_strNormal = 0x800A82D0;
c_strReversal = 0x800A82D4;
c_strSound = 0x800A82D8;
c_strStereo = 0x800A82DC;
c_strMono = 0x800A82E0;
c_strWindow = 0x800A82E4;
c_strTime = 0x800A82E8;
c_strEquip = 0x800A83C8;
c_strSpells = 0x800A83CC;
c_strRelics = 0x800A83D0;
c_strSystem = 0x800A83D4;
c_strFamiliars = 0x800A83D8;
c_strFamiliar = 0x800A83DC;
c_strSpecial2 = 0x800A83E0;
c_strSSword = 0x800A83E4;
c_strSword = 0x800A83E8;
c_strThrow = 0x800A83EC;
c_strFist = 0x800A83F0;
c_strClub = 0x800A83F4;
c_strTwoHand = 0x800A83F8;
c_strFood = 0x800A83FC;
c_strBomb = 0x800A8400;
c_strThrow2 = 0x800A8404;
c_strShield = 0x800A8408;
c_strMedicine = 0x800A840C;
c_strDarkMethamorphosis = 0x800A8410;
rect = 0x800ACD98;
aPbav = 0x800B107C;
aPbav_0 = 0x800B407C;
aPbav_2 = 0x800B607C;
aPbav_1 = 0x800B807C;
aPqes_1 = 0x800BA07C;
aPqes = 0x800BC37D;
aPqes_0 = 0x800BCAC3;
aO = 0x800DB3B4;
aDr03x = 0x800DB44C;
aGt403x = 0x800DB458;
aG403x = 0x800DB464;
aGt303x = 0x800DB470;
aLine03x = 0x800DB47C;
aSp1603x = 0x800DB488;
aSp03x = 0x800DB494;
aTile03x = 0x800DB4A0;
aEnv03x = 0x800DB4AC;
aEff03x = 0x800DB4B8;
aRed = 0x800DB4C4;
aGreen = 0x800DB4C8;
aBlue = 0x800DB4D0;
aHalfOn = 0x800DB4D8;
aHalfOff = 0x800DB4E4;
aRgb02x02x02x = 0x800DB4F0;
a0104x04x = 0x800DB504;
a2304x04x = 0x800DB514;
jpt_800E4A64 = 0x800DB530;
jpt_800E55C4 = 0x800DB560;
a02x02x = 0x800DB720;
aMemoryCardLoad = 0x800DB730;
aEnding = 0x800DB744;
aIwaLoad = 0x800DB74C;
aIgaLoad = 0x800DB758;
aHagiLoad = 0x800DB764;
aLoadCBinSBin = 0x800DB770;
aAlucard = 0x800DB784;
aRichter = 0x800DB790;
jpt_800E63C4 = 0x800DB7A0;
jpt_800E7034 = 0x800DB7E8;
jpt_800E7484 = 0x800DB808;
jpt_800E7B18 = 0x800DB828;
aSimCBinFTitle1 = 0x800DBB38;
aSimCSoundDataS_0 = 0x800DBD14;
aSimCSoundDataS_1 = 0x800DBD50;
jpt_800E7C28 = 0x800DBD70;
jpt_800E7E3C = 0x800DBD88;
aSimCBin = 0x800DBDE0;
aSimCSoundDataS = 0x800DBDF4;
aSimCBinW0000Bi = 0x800DBE14;
aSimCBinW1000Bi = 0x800DBE2C;
aSimCBinF0000Bi = 0x800DBE44;
aSimCBinF1000Bi = 0x800DBE5C;
aSimCBinTt000Bi = 0x800DBE74;
aSimCBinFt000Bi = 0x800DBE8C;
aSimCBinMo000Bi = 0x800DBEA4;
aOErrS = 0x800DBEBC;
aRErr = 0x800DBEC8;
aClErr = 0x800DBED0;
aTrErr = 0x800DBED8;
aBu1d1d = 0x800DBEE0;
aBu1d1dS = 0x800DBEEC;
jpt_800E98E4 = 0x800DBEF8;
jpt_800E9934 = 0x800DBF10;
jpt_800E9A48 = 0x800DBF28;
aBaslus00067dra = 0x800DC194;
jpt_800EA8C0 = 0x800DC1A8;
jpt_800EB120 = 0x800DC1E8;
aOver08x04x = 0x800DC228;
jpt_800EE2FC = 0x800DC238;
jpt_800EF590 = 0x800DC290;
aSimCBinDemoKey = 0x800DC490;
aSimCBinDk000Bi = 0x800DC4A8;
aDemonstration = 0x800DC4C8;
aDemoKeyIn04x04 = 0x800DC4D8;
aDemoOverflow = 0x800DC4F0;
jpt_800F0658 = 0x800DC500;
jpt_800F096C = 0x800DC514;
jpt_800F288C = 0x800DC534;
jpt_800F3684 = 0x800DC55C;
jpt_800F3758 = 0x800DC57C;
jpt_800F3C14 = 0x800DC59C;
jpt_800F42A0 = 0x800DC5B4;
aWindowColorSet = 0x800DC5FC;
jpt_800F8150 = 0x800DC68C;
jpt_800F93A0 = 0x800DC6AC;
jpt_800FA060 = 0x800DC71C;
jpt_800FBCC4 = 0x800DC75C;
jpt_800FC36C = 0x800DCB7C;
jpt_800FC5B8 = 0x800DCB94;
jpt_800FD6E0 = 0x800DCBAC;
jpt_800FD7E0 = 0x800DCBC4;
jpt_800FDB40 = 0x800DCBDC;
aXXVQ = 0x800DCBF4;
aAxearmor = 0x800DCC00;
jpt_80102810 = 0x800DCC0C;
jpt_80102918 = 0x800DCC2C;
jpt_80102D9C = 0x800DCC54;
aMemoryCard = 0x800DCC80;
aMemoryCardIs = 0x800DCCAC;
aCannot = 0x800DCCCC;
aNoGame = 0x800DCCE8;
aMemoryCard_0 = 0x800DCD24;
aYes = 0x800DCDB0;
aNo = 0x800DCDB8;
jpt_80103F08 = 0x800DCDC0;
aGold = 0x800DD0A8;
aNz0 = 0x800DD0B0;
aFNz0 = 0x800DD0B4;
aTop = 0x800DD0BC;
aTop_0 = 0x800DD0C0;
aFTop = 0x800DD0C4;
aTogi = 0x800DD0CC;
aAre = 0x800DD0D4;
aFAre = 0x800DD0D8;
aMizu = 0x800DD0E0;
aNo4 = 0x800DD0E8;
aFNo4 = 0x800DD0EC;
aCen = 0x800DD0F4;
aFCen = 0x800DD0F8;
aSiro1 = 0x800DD100;
aNp3 = 0x800DD108;
aFNp3 = 0x800DD10C;
aFNo0 = 0x800DD180;
aMpty = 0x800DEC54;
aUnequip = 0x800DF9EC;
a3pecial = 0x800DFA60;
aAmiliar = 0x800DFA74;
a2ichter = 0x800DFD38;
a7indow = 0x800DFDFC;
a2ight = 0x800DFE78;
aUtton = 0x800DFEC0;
m_menu_text_kills = 0x800DFEEC;
aHealHpBySheddi = 0x800E00B0;
aDarkMetamorpho = 0x800E00D4;
aCausesItemsToM = 0x800E042C;
aTransformIntoB = 0x800E05B4;
aSoulOfBat = 0x800E05C8;
jpt_8010812C = 0x800E0D38;
aDmaError = 0x800E0D54;
aSdHeaderError = 0x800E0D64;
aDiskError = 0x800E0D78;
aRetry = 0x800E0D84;
aRetryXa = 0x800E0D8C;
aCdShellOpenErr = 0x800E0D98;
aCheckingCd = 0x800E0DB0;
aErrorStep02x = 0x800E0DC0;
jpt_80108CFC = 0x800E0DD8;
aStep04x = 0x800E0E28;
aBatIStep04x = 0x800E0E34;
jpt_8010A86C = 0x800E0E48;
jpt_8010AA30 = 0x800E0E88;
jpt_8010AE88 = 0x800E0EC8;
jpt_8010B3B4 = 0x800E0EF0;
jpt_8010B658 = 0x800E0FC0;
jpt_8010F424 = 0x800E108C;
jpt_8010F48C = 0x800E12AC;
jpt_8010F75C = 0x800E12C4;
jpt_8010F958 = 0x800E12DC;
jpt_8010F9E8 = 0x800E12F4;
jpt_801109D0 = 0x800E1308;
jpt_80110C1C = 0x800E1320;
aPlPose02x = 0x800E1334;
jpt_80110E54 = 0x800E1348;
jpt_80111080 = 0x800E1360;
jpt_8011131C = 0x800E1380;
aCommandOk = 0x800E13A0;
a100swordSetOk = 0x800E13AC;
aCharal02x = 0x800E1400;
jpt_80112264 = 0x800E1410;
jpt_80112C9C = 0x800E1588;
jpt_80113328 = 0x800E1750;
jpt_80113938 = 0x800E18C8;
jpt_80113B10 = 0x800E18E0;
aDamKind04x = 0x800E18F4;
jpt_801140A8 = 0x800E1908;
jpt_801141F0 = 0x800E1948;
jpt_80114300 = 0x800E1990;
jpt_80114388 = 0x800E19B0;
jpt_80115DF0 = 0x800E19D0;
jpt_8011643C = 0x800E19E8;
jpt_801169F4 = 0x800E1A00;
jpt_80116CF8 = 0x800E1A20;
aErrorStep = 0x800E1A38;
jpt_80118D54 = 0x800E1A44;
aStrY02x = 0x800E1A74;
jpt_801195F4 = 0x800E1A84;
aAtariNuki = 0x800E1AA4;
jpt_8011AD40 = 0x800E1AB4;
jpt_8011AD94 = 0x800E1AD4;
jpt_8011C214 = 0x800E1AF4;
jpt_8011C490 = 0x800E1B44;
jpt_8011CB08 = 0x800E1B74;
jpt_8011DC74 = 0x800E1B94;
jpt_8011DD70 = 0x800E1BF4;
jpt_8011DDCC = 0x800E1C54;
jpt_8011E580 = 0x800E1CB4;
jpt_8011E648 = 0x800E1CE4;
jpt_8011E9D4 = 0x800E1D1C;
jpt_8011EADC = 0x800E1D4C;
jpt_80120C98 = 0x800E1D84;
jpt_80120FDC = 0x800E1DA4;
jpt_80122494 = 0x800E1DBC;
jpt_80124410 = 0x800E1DD4;
jpt_80126808 = 0x800E1E34;
aLightTimer02x = 0x800E1E48;
jpt_80126F54 = 0x800E1E5C;
jpt_80128C94 = 0x800E1E7C;
jpt_8012A918 = 0x800E1E90;
jpt_8012D4D8 = 0x800E1EB0;
jpt_8012EFE4 = 0x800E1EC8;
jpt_8012FA74 = 0x800E1EF0;
jpt_8012FAC0 = 0x800E1F18;
jpt_80130384 = 0x800E1F30;
jpt_801303DC = 0x800E1F58;
jpt_80130728 = 0x800E1F70;
jpt_80130788 = 0x800E1F98;
jpt_80130B00 = 0x800E1FB0;
jpt_80131014 = 0x800E1FD8;
jpt_801314B4 = 0x800E2000;
jpt_80132F94 = 0x800E2034;
jpt_801332C4 = 0x800E205C;
jpt_80133990 = 0x800E2074;
jpt_80133C10 = 0x800E208C;
jpt_80135058 = 0x800E20B4;
jpt_801353DC = 0x800E2354;
nullsub_8 = 0x800E2F34;
entrypoint_sotn = 0x800E3988;
nullsub_9 = 0x800E7384;
SetRoomForegroundLayer = 0x800ED774;
SetRoomBackgroundLayer = 0x800ED90C;
LoadRoomLayer = 0x800ED9F4;
CheckCollision = 0x800EF45C;
IsSpriteOutsideDrawArea = 0x800F54CC;
ScissorSprite = 0x800F57C8;
DrawMenuChar = 0x800F678C;
DrawMenuStr = 0x800F67EC;
DrawMenuInt = 0x800F68F4;
DrawSettingsButton = 0x800F6FA4;
DrawSettingsReverseCloak = 0x800F70DC;
DrawSettingsSound = 0x800F7168;
SetMenuBackgroundRect = 0x80107330;
CopyMapOverlayCallback = 0x801074BC;
nullsub_10 = 0x801362A4;
g_someValue = 0x8013792C;
g_OverlayCopySrcIndex = 0x80137F70;
g_OverlayCopyDstIndex = 0x80137F74;
g_OverlayCopySrc = 0x80137F80;
g_OverlayCopyDst = 0x80137F84;
g_OverlayBlockCount = 0x80137F8C;
g_OverlayLastBlockSize = 0x80137F90;
p = 0x80180014;

View File

@ -27,7 +27,11 @@ typedef struct
typedef struct
{
Rect tag, unk1;
s16 cursorX;
s16 cursorY;
s16 unk4;
s16 unk6;
Rect unk1;
int w;
int unk14;
int unk18;
@ -58,13 +62,45 @@ extern s32 D_800974AC;
extern u8 D_8009798A;
extern u8 D_80097A8D;
extern const char *c_strKills;
extern const char *c_strButton;
extern const char *c_strCloak;
extern const char *c_strCloak2;
extern const char *c_strExterior;
extern const char *c_strLining;
extern const char *c_strButtonRightHand;
extern const char *c_strButtonLeftHand;
extern const char *c_strButtonJump;
extern const char *c_strButtonSpecial;
extern const char *c_strButtonWolf;
extern const char *c_strButtonMist;
extern const char *c_strButtonBat;
extern const char *c_strNormal;
extern const char *c_strReversal;
extern const char *c_strSound;
extern const char *c_strStereo;
extern const char *c_strMono;
extern const char *c_strWindow;
extern const char *c_strTime;
extern const char *c_strSSword;
extern s32 D_800A4B04;
extern s32 D_800A7718;
extern u16 D_800A7734;
extern const char *c_strEquip;
extern const char *c_strSpells;
extern const char *c_strRelics;
extern const char *c_strSystem;
extern const char *c_strFamiliars;
extern const char *c_strFamiliar;
extern const char *c_strSpecial2;
extern u8 D_80137460;
extern s32 D_801375DC;
extern s32 D_801375FC;
extern s32 D_80137618;
extern s8 D_80137638;
extern s32 D_80137844;
extern s32 D_80137848;
extern s32 D_8013784C;
extern s32 D_80137960;
extern s32 D_80137964;
extern s32 D_80137968;
@ -104,8 +140,13 @@ void func_800F53A4(void);
s32 IsSpriteOutsideDrawArea(s32 x0, s32 x1, s32 y0, s32 y1, MenuContext* a5);
bool ScissorSprite(SPRT* arg0, MenuContext* arg1);
void func_800F5904(void*, s32 x, s32 y, s32 w, u32 h, s32 u, s32 v, s32 unk1, s32 unk2, bool disableTexShade, s32 unk4);
void func_800F5E68(MenuContext*, s32 iOption, s32 x, s32 y, s32 w, s32 h, s32, s32);
s32 func_800F62E8(s32 arg0);
void drawMenuChar(s32 ch, int x, int y, void* context);
void DrawMenuChar(s32 ch, int x, int y, void* context);
void DrawMenuStr(const char* str, s32 x, s32 y, MenuContext* context);
void DrawSettingsReverseCloak(MenuContext* context);
void DrawSettingsSound(MenuContext* context);
void func_800F8858(MenuContext* context);
void func_800FABEC(s32 arg0);
void func_800FAC30(void);
s32 func_800FD664(s32 arg0);
@ -119,7 +160,7 @@ void func_80102DEC(s32 arg0);
void func_80103EAC(void);
void func_801071CC(s32, u8, s32);
void func_80107250(s32 arg0, s32 arg1);
void setMenuBackgroundRect(UnkPoly* arg0, s16 x, s16 y, s16 width, s16 height);
void SetMenuBackgroundRect(UnkPoly* arg0, s16 x, s16 y, s32 width, s32 height);
void func_8010D584(s16 arg0);
void func_8010E0A8(void);
void func_8010E0B8(void);

View File

@ -20,7 +20,10 @@ typedef struct
extern s32 D_8003925C;
extern s32 D_8003C734;
extern s32 g_SettingsCloakMode;
extern s32 g_SettingsSoundMode;
extern s32 g_CurrentPlayableCharacter;
extern s32 D_8003CACC;
extern void func_80015238(s32 arg0);
extern unsigned char func_80019424();

View File

@ -42,8 +42,8 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800E38CC);
INCLUDE_ASM("asm/dra/nonmatchings/42398", entrypoint_sotn);
void func_800E4124(s32 arg0) {
D_8003C734 = arg0;
void func_800E4124(s32 context) {
D_8003C734 = context;
D_80073060 = 0;
D_8006C39C = 0;
D_8006C3A0 = 0;
@ -121,27 +121,30 @@ void func_800E8D24(void) {
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800E8D54);
// https://decomp.me/scratch/YhofM
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800E8DF0);
// void func_800E8DF0(void) {
// Unkstruct1* phi_v1;
// Unkstruct1* phi_a0;
// s32 phi_a1;
#else
void func_800E8DF0(void) {
Unkstruct1* phi_v1;
Unkstruct1* phi_a0;
s32 phi_a1;
// func_80015238(0);
// phi_a0 = &D_80097490;
// phi_a1 = 0;
// phi_v1 = &D_80097490.unk2;
func_80015238(0);
phi_a0 = &D_80097490;
phi_a1 = 0;
phi_v1 = &D_80097490.unk2;
// do {
// phi_a1++;
// phi_v1->unk2 = 0;
// phi_v1->unk0 = 0;
// phi_v1 += 1;
// phi_a0->unk0 = 0;
// phi_a0++;
// } while (phi_a1 < 2);
// func_800E8D24();
// }
do {
phi_a1++;
phi_v1->unk2 = 0;
phi_v1->unk0 = 0;
phi_v1 += 1;
phi_a0->unk0 = 0;
phi_a0++;
} while (phi_a1 < 2);
func_800E8D24();
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800E8E48);
@ -206,17 +209,20 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800EA720);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800EA7CC);
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800EAD0C);
// void func_800EAD0C(void) {
// func_800EA5E4(4);
// func_800EA5E4(5);
// func_800EA5E4(6);
// func_800EA5E4(7);
// func_800EA5E4(8);
// if (g_CurrentPlayableCharacter == 0 && D_800974A0 != 0x1F) {
// func_800EA5E4(0x17);
// }
// }
#else
void func_800EAD0C(void) {
func_800EA5E4(4);
func_800EA5E4(5);
func_800EA5E4(6);
func_800EA5E4(7);
func_800EA5E4(8);
if (g_CurrentPlayableCharacter == 0 && D_800974A0 != 0x1F) {
func_800EA5E4(0x17);
}
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800EAD7C);
@ -260,14 +266,17 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", SetRoomBackgroundLayer);
INCLUDE_ASM("asm/dra/nonmatchings/42398", LoadRoomLayer);
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800EDA70);
// void func_800EDA70(s32 *arg0) {
// s32 i;
// s32 n = 0xd;
// for (i = 0; i < n; i++) {
// *arg0++ = 0;
// }
// }
#else
void func_800EDA70(s32 *context) {
s32 i;
s32 n = 0xd;
for (i = 0; i < n; i++) {
*context++ = 0;
}
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800EDA94);
@ -383,15 +392,73 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F53D4);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F548C);
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", IsSpriteOutsideDrawArea);
// https://decomp.me/scratch/3ZEVB
#else
s32 IsSpriteOutsideDrawArea(s32 x0, s32 x1, s32 y0, s32 y1, MenuContext* a5) {
s16 scissorX = (s16)a5->unk1.x;
if (scissorX < x1) {
s16 scissorY = (s16)a5->unk1.y;
if (scissorY < y1 && x0 < (scissorX + (s16)a5->unk1.w))
return (y0 < scissorY + (s16)a5->unk1.h) ^ 1;
}
return true;
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F5530);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F564C);
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", ScissorSprite);
// https://decomp.me/scratch/J7S3a
#else
bool ScissorSprite(SPRT* sprite, MenuContext* arg1) {
s16 spriteX = sprite->x0;
s16 spriteY = sprite->y0;
if (IsSpriteOutsideDrawArea(spriteX, spriteX + sprite->w, spriteY, spriteY + sprite->h, arg1) == false) {
s16 scissorx0;
s16 scissory0;
s32 scissory1;
s32 scissorx1;
s32 spritex1;
s32 spritey1;
scissorx0 = arg1->unk1.x;
if (sprite->x0 < scissorx0) {
s32 a0 = sprite->x0;
s32 diffx = scissorx0 - a0;
sprite->x0 = a0 + diffx;
sprite->u0 = sprite->u0 + diffx;
sprite->w = sprite->w - diffx;
}
scissory0 = arg1->unk1.y;
if (sprite->y0 < scissory0) {
s32 diffy = scissory0 - sprite->y0;
sprite->y0 = sprite->y0 + diffy;
sprite->v0 = sprite->v0 + diffy;
sprite->h = sprite->h - diffy;
}
scissorx1 = (s16)arg1->unk1.x + (s16)arg1->unk1.w;
spritex1 = sprite->x0 + sprite->w;
if (scissorx1 < spritex1) {
sprite->w = sprite->w - (spritex1 - scissorx1);
}
scissory1 = (s16)arg1->unk1.y + (s16)arg1->unk1.h;
spritey1 = sprite->y0 + sprite->h;
if (scissory1 < spritey1) {
sprite->h = sprite->h - (spritey1 - scissory1);
}
return false;
}
return true;
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F5904);
// https://decomp.me/scratch/DP2LU
@ -410,8 +477,8 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F5EF0);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F622C);
s32 func_800F62E8(s32 arg0) {
s32 temp_v0 = arg0 * 3;
s32 func_800F62E8(s32 context) {
s32 temp_v0 = context * 3;
s32 phi_v0 = temp_v0 < 0 ? temp_v0 + 3 : temp_v0;
return phi_v0 >> 2;
}
@ -428,14 +495,18 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F6618);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F66BC);
INCLUDE_ASM("asm/dra/nonmatchings/42398", drawMenuChar);
// void drawMenuChar(s32 ch, int x, int y, void* context) {
// func_800F5904(context, x, y, 8, 8, (ch & 0xF) * 8, (u32) (ch & 0xF0) >> 1, 0x196, 0x1E, 1, 0);
// }
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", DrawMenuChar);
#else
void DrawMenuChar(s32 ch, int x, int y, void* context) {
func_800F5904(context, x, y, 8, 8, (ch & 0xF) * 8, (u32) (ch & 0xF0) >> 1, 0x196, 0x1E, 1, 0);
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F67EC);
INCLUDE_ASM("asm/dra/nonmatchings/42398", DrawMenuStr);
// https://decomp.me/scratch/S4Dzb
INCLUDE_ASM("asm/dra/nonmatchings/42398", drawMenuInt);
INCLUDE_ASM("asm/dra/nonmatchings/42398", DrawMenuInt);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F6998);
@ -449,11 +520,65 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F6CC0);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F6DC8);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F6FA4);
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", DrawSettingsButton);
#else
extern s32 g_menuButtonSettingsCursorPos;
extern s32 g_menuButtonSettingsConfig[];
extern u8 c_chPlaystationButtons[];
extern u8 c_chShoulderButtons[];
void DrawSettingsButton(MenuContext* context) {
const int ActionCount = 7;
const char** strAction;
s32 tmpi;
s32 curX;
s32 curY;
s32 buttonId;
s32 i;
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F70DC);
i = 0;
strAction = &c_strButtonRightHand;
curY = 48;
for (; i < ActionCount; i++)
{
DrawMenuStr(*strAction, 0x98, curY, context);
buttonId = g_menuButtonSettingsConfig[i];
curX = buttonId * 0xC;
DrawMenuChar(c_chPlaystationButtons[buttonId], curX + 0x30 + 0xC0, curY, context);
strAction++;
if (buttonId >= 4) {
DrawMenuChar(c_chShoulderButtons[buttonId], curX + 0x38 + 0xC0, curY, context);
}
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F7168);
curY += 16;
}
func_800F5E68(context, g_menuButtonSettingsCursorPos, 0x96, 0x2E, 0x54, 0xC, 4, 1);
}
#endif
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", DrawSettingsReverseCloak);
#else
void DrawSettingsReverseCloak(MenuContext* context) {
DrawMenuStr(c_strNormal, 176, 48, context);
DrawMenuStr(c_strReversal, 176, 64, context);
func_800F5E68(context, g_SettingsCloakMode, 174, 46, 64, 12, 4, 1);
}
#endif
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", DrawSettingsSound);
#else
void DrawSettingsSound(MenuContext* context) {
s16 cursorX = context->cursorX;
s16 cursorY = context->cursorY;
s32 subMenuX = cursorX + 4;
DrawMenuStr(c_strStereo, subMenuX, cursorY + 4, context);
DrawMenuStr(c_strMono, subMenuX, cursorY + 0x14, context);
func_800F5E68(context, g_SettingsSoundMode, cursorX + 2, cursorY + 2, 53, 12, 4, 1);
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F7218);
@ -475,9 +600,55 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F84CC);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F86E4);
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F8754);
#else
void func_800F8754(MenuContext* context, s32 arg1, s32 arg2) {
s32 buttonId;
s32 phi_a1;
if (D_801375DC == 0) {
D_8013784C = 1;
}
DrawMenuStr(c_strSpells, arg1 + 14, arg2 + 20, context);
if (D_801375FC == 0) {
D_8013784C = 1;
} else {
D_8013784C = 0;
}
phi_a1 = arg1 + 2;
DrawMenuStr(c_strFamiliars, phi_a1, arg2 + 68, context);
D_8013784C = 0;
DrawMenuStr(c_strEquip, arg1 + 18, arg2 + 4, context);
buttonId = arg1 + 0xE;
DrawMenuStr(c_strRelics, buttonId, arg2 + 36, context);
DrawMenuStr(c_strSystem, buttonId, arg2 + 52, context);
}
#endif
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F8858);
#else
void func_800F8858(MenuContext* context) {
s32 i = 0;
const char** pStrEquipTypes = &c_strSSword;
s32 curY = 8;
s32* phi_s1 = &D_8003CACC;
s32 nexti;
do {
nexti = i + 1;
DrawMenuStr(pStrEquipTypes[*phi_s1], context->cursorX + 4, context->cursorY + curY, context);
phi_s1++;
curY += 0x10;
i = nexti;
} while (i < 0xB);
func_800F5E68(context, D_80137618, (s16) context->cursorX + 2, (s16) context->cursorY + 4, 0x48, 0x10, 0, 1);
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F892C);
@ -529,8 +700,8 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FAB8C);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FABBC);
void func_800FABEC(s32 arg0) {
((s8*)&D_80137638)[arg0 * 0x1E] = 0;
void func_800FABEC(s32 context) {
((s8*)&D_80137638)[context * 0x1E] = 0;
}
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FAC0C);
@ -579,8 +750,8 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FD4C0);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FD5BC);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FD664);
// s32 func_800FD664(s32 arg0) {
// s32 phi_a0 = arg0;
// s32 func_800FD664(s32 context) {
// s32 phi_a0 = context;
// if ((D_800974A0 & 0x20) != 0) {
// phi_a0 <<= 1;
// }
@ -591,24 +762,24 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FD688);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FD6C4);
u8 *func_800FD744(s32 arg0) {
u8 *func_800FD744(s32 context) {
u8 *phi_v0 = &D_80097A8D;
if (arg0 != 0) {
if (context != 0) {
phi_v0 += 0xA9;
}
return phi_v0;
}
u8 *func_800FD760(s32 arg0) {
u8 *func_800FD760(s32 context) {
s8 *phi_v0 = &D_8009798A;
if (arg0 != 0) {
if (context != 0) {
phi_v0 += 0xA9;
}
return phi_v0;
}
s32 func_800FD77C(s32 arg0, s32 arg1) {
if (arg0 == 0) {
s32 func_800FD77C(s32 context, s32 arg1) {
if (context == 0) {
return *(&D_800A4B04 + (arg1 * 13));
}
@ -617,63 +788,66 @@ s32 func_800FD77C(s32 arg0, s32 arg1) {
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FD7C0);
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FD874);
// void func_800FD874(u16 arg0, s32 arg1) {
// u8 *temp_a0_2;
// u8 *temp_v0;
// u8 temp_a1;
// u8 temp_v1;
// u8 *phi_a0;
// u8 *phi_a0_2;
// u16 phi_s3;
// s32 phi_a1;
// s32 phi_a1_2;
#else
void func_800FD874(u16 context, s32 arg1) {
u8 *temp_a0_2;
u8 *temp_v0;
u8 temp_a1;
u8 temp_v1;
u8 *phi_a0;
u8 *phi_a0_2;
u16 i;
s32 phi_a1;
s32 phi_a1_2;
// u8 *temp_s1 = func_800FD744(arg1);
// u8* temp_a3 = func_800FD760(arg1);
// u16 temp_a2 = arg0 & 0xFFFF;
// u8 *temp_a0 = temp_a3 + temp_a2;
// if (*temp_a0 < 0x63) {
// temp_a1 = *temp_a0;
// *temp_a0 = temp_a1 + 1;
// if (*temp_a0 == 1) {
// *temp_a0 = temp_a1;
// if (arg1 != 0) {
// phi_s3 = *(&D_800A7734 + (temp_a2 << 5));
// }
u8 *cursorY = func_800FD744(arg1);
u8* temp_a3 = func_800FD760(arg1);
u16 temp_a2 = context & 0xFFFF;
u8 *temp_a0 = temp_a3 + temp_a2;
if (*temp_a0 < 0x63) {
temp_a1 = *temp_a0;
*temp_a0 = temp_a1 + 1;
if (*temp_a0 == 1) {
*temp_a0 = temp_a1;
if (arg1 != 0) {
i = *(&D_800A7734 + (temp_a2 << 5));
}
// phi_a0 = temp_s1;
// phi_a1 = 0;
// phi_a1_2 = 0;
// while (true) {
// if (*++phi_a0 == temp_a2)
// break;
// phi_a1_2 += 1;
// }
phi_a0 = cursorY;
phi_a1 = 0;
phi_a1_2 = 0;
while (true) {
if (*++phi_a0 == temp_a2)
break;
phi_a1_2 += 1;
}
// phi_a0_2 = temp_s1;
// loop_8:
// temp_v1 = *phi_a0_2;
// if (*((s8*)temp_a3 + temp_v1) != 0) {
// block_12:
// phi_a0_2 += 1;
// phi_a1 += 1;
// goto loop_8;
// }
// if ((arg1 != 0) && (phi_s3 != *(&D_800A7734 + (temp_v1 << 5)))) {
// goto block_12;
// }
phi_a0_2 = cursorY;
loop_8:
temp_v1 = *phi_a0_2;
if (*((s8*)temp_a3 + temp_v1) != 0) {
block_12:
phi_a0_2 += 1;
phi_a1 += 1;
goto loop_8;
}
if ((arg1 != 0) && (i != *(&D_800A7734 + (temp_v1 << 5)))) {
goto block_12;
}
// temp_v0 = temp_a3 + (arg0 & 0xFFFF);
// *temp_v0 += 1;
// temp_a0_2 = &temp_s1[phi_a1];
// if (phi_a1 < phi_a1_2) {
// temp_s1[phi_a1_2] = *temp_a0_2;
// *temp_a0_2 = arg0;
// }
// }
// }
// }
temp_v0 = temp_a3 + (context & 0xFFFF);
*temp_v0 += 1;
temp_a0_2 = &cursorY[phi_a1];
if (phi_a1 < phi_a1_2) {
cursorY[phi_a1_2] = *temp_a0_2;
*temp_a0_2 = context;
}
}
}
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FD9D4);
@ -719,8 +893,8 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FEEA4);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FF064);
void func_800FF0A0(s32 arg0) {
*(&D_80139828 + (arg0 * 1)) = 0;
void func_800FF0A0(s32 context) {
*(&D_80139828 + (context * 1)) = 0;
}
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800FF0B8);
@ -773,9 +947,9 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_80102D08);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_80102D70);
void func_80102DEC(s32 arg0) {
void func_80102DEC(s32 context) {
D_80137E64 = 0;
D_80137E68 = arg0;
D_80137E68 = context;
}
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_80102E04);
@ -819,13 +993,16 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_8010715C);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_801071CC);
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_80107250);
// void func_80107250(s32 arg0, s32 arg1) {
// func_801071CC(arg0, arg1, 0);
// func_801071CC(arg0, arg1, 1);
// func_801071CC(arg0, arg1, 2);
// func_801071CC(arg0, arg1, 3);
// }
#else
void func_80107250(s32 context, s32 arg1) {
func_801071CC(context, arg1, 0);
func_801071CC(context, arg1, 1);
func_801071CC(context, arg1, 2);
func_801071CC(context, arg1, 3);
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_801072BC);
@ -833,16 +1010,34 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_801072DC);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_801072FC);
INCLUDE_ASM("asm/dra/nonmatchings/42398", setMenuBackgroundRect);
// https://decomp.me/scratch/GPSfb
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", SetMenuBackgroundRect);
#else
void SetMenuBackgroundRect(UnkPoly* context, s16 x, s16 y, s32 width, s32 height) {
s16 x1 = x + width;
s16 y1 = y + height;
context->x0 = x;
context->y0 = y;
context->x1 = x1;
context->y1 = y;
context->unk20 = x;
context->unk2C = x1;
context->unk22 = y1;
context->unk2E = y1;
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_80107360);
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_801073C0);
// void func_801073C0(void) {
// func_800195C8(0);
// func_800199D0(0);
// }
#else
void func_801073C0(void) {
func_800195C8(0);
func_800199D0(0);
}
#endif
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_801073E8);
@ -908,8 +1103,8 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_8010D010);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_8010D2C8);
void func_8010D584(s16 arg0) {
D_80073404 = arg0;
void func_8010D584(s16 context) {
D_80073404 = context;
D_80073406 = 0;
}
@ -1355,8 +1550,8 @@ INCLUDE_ASM("asm/dra/nonmatchings/42398", func_8013136C);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_801315F8);
void func_80131EBC(s32 arg0, s32 arg1) {
D_80138784[arg1 << 0x10 >> 0x10] = arg0;
void func_80131EBC(s32 context, s32 arg1) {
D_80138784[arg1 << 0x10 >> 0x10] = context;
}
void func_80131ED8(s32 value) {
@ -1376,13 +1571,16 @@ s32 func_80131F28(void) {
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_80131F38);
#ifndef NON_MATCHING
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_80131F68);
// bool func_80131F68(void) {
// if (D_8013B61C == 0) {
// return D_8013901C != 0;
// }
// return true;
// }
#else
bool func_80131F68(void) {
if (D_8013B61C == 0) {
return D_8013901C != 0;
}
return true;
}
#endif
s16 func_80131F94(void) {
return D_8013B668;