diff --git a/config/sly1.yaml b/config/sly1.yaml index ac8cd0d2..4bfe66c4 100644 --- a/config/sly1.yaml +++ b/config/sly1.yaml @@ -75,7 +75,7 @@ segments: # All .c files (but compiled as c++) #-------------------------------------------------------- - [0x1dbb8, asm, P2/989snd] #MARK: P2 - - [0x1f560, asm, P2/brx] + - [0x1f560, c, P2/brx] - [0x1fe70, asm, P2/ac] #- [0x, asm, P2/act] @@ -116,10 +116,9 @@ segments: - [0x47100, asm, P2/cnvo] - [0x47340, c, P2/coin] - [0x4a398, asm, P2/cplcy] - - [0x4bbd0, asm, P2/credit] - - - [0x4c0c0, asm, P2/crout] - #- [0x, asm, P2/crusher] + - [0x4bbd0, c, P2/credit] + - [0x4c0c0, c, P2/crout] + - [0x4c550, asm, P2/crusher] - [0x4e0a8, asm, P2/crv] @@ -139,7 +138,7 @@ segments: - [0x5a6e0, asm, P2/eyes] - [0x5aad0, asm, P2/fader] - - [0x5aca0, asm, P2/unk_f] #? unknown file + - [0x5aca0, asm, P2/unk_f] # unknown file, falls alphabetically between fader and find - [0x5af20, c, P2/find] - [0x5b8ac, asm, P2/find_padding] # Needed to align P2/find @@ -272,8 +271,9 @@ segments: #- [0x, asm, P2/suv] - [0xdc480, asm, P2/sw] - #- [0x, asm, P2/tail] - #- [0x, asm, P2/tank] + - [0xdeb20, asm, P2/unk_st] # unknown file, falls alphabetically between sw and tail + - [0xdece0, c, P2/tail] + - [0xdf798, asm, P2/tank] #- [0x, asm, P2/target] - [0xe18f8, asm, P2/text] @@ -287,7 +287,7 @@ segments: - [0xea088, c, P2/ui] - [0xeac78, asm, P2/update] - [0xeb408, c, P2/util] - - [0xec518, asm, P2/uv_unk] #? unknown file + - [0xec518, asm, P2/unk_uv] # unknown file, falls alphabetically between util and vec - [0xee650, c, P2/vec] - [0xef318, asm, P2/vifs] - [0xef900, asm, P2/vis] diff --git a/config/symbol_addrs.txt b/config/symbol_addrs.txt index 8ca9ff7f..1b82b8fa 100644 --- a/config/symbol_addrs.txt +++ b/config/symbol_addrs.txt @@ -361,6 +361,19 @@ FadeAloIn__FP3ALOf = 0x126cb8 = 0x126CB8; // type:func FadeAloOut__FP3ALOf = 0x126d60; // type:func SetAloTargetHitTest__FP3ALOi = 0x12AA28; // type:func + +//////////////////////////////////////////////////////////////// +// P2/brx.c +//////////////////////////////////////////////////////////////// +StartupBrx__Fv = 0x11e560; // type:func +PloNew__F3CIDP2SWP3ALO3OIDi = 0x11E580; // type:func +LoadOptionFromBrx__FPvP5EOPIDP18CBinaryInputStream = 0x11E680; // type:func +LoadOptionsFromBrx__FPvP18CBinaryInputStream = 0x11EC40; // type:func +IploFromStockOid__Fi = 0x11ECA0; // type:func +LoadSwObjectsFromBrx__FP2SWP3ALOP18CBinaryInputStream = 0x11ECB8; // type:func +SetLoDefaults__FP2LO = 0x11EDA8; // type:func + + //////////////////////////////////////////////////////////////// // P2/binoc.c //////////////////////////////////////////////////////////////// @@ -637,6 +650,27 @@ break_bottle = 0x149190; // type:func s_asnipDprize = 0x2619A0; // size:0x3c + +//////////////////////////////////////////////////////////////// +// P2/credit.c +//////////////////////////////////////////////////////////////// +InitCredit__FP6CREDIT5BLOTK = 0x14ABD0; // type:func +PostCreditLoad__FP6CREDIT = 0x14AC48; // type:func +SetCreditClock__FP6CREDITPf = 0x14AD00; // type:func +UpdateCredit__FP6CREDIT = 0x14AD70; // type:func +DrawCredit__FP6CREDIT = 0x14ADE0; // type:func +PlaceCredit__FP6CREDITffi = 0x14AEA0; // type:func +VacateCredit__FP6CREDIT = 0x14AF10; // type:func +SetCreditLine__FP6CREDITiPcf = 0x14AF38; // type:func + + +//////////////////////////////////////////////////////////////// +// P2/crout.c +//////////////////////////////////////////////////////////////// +CroutDecomp__FiPfT1 = 0x14B0C0; // type:func +CroutSolve__FiPfN21 = 0x14B3E0; // type:func + + //////////////////////////////////////////////////////////////// // P2/difficulty.c //////////////////////////////////////////////////////////////// @@ -1148,6 +1182,15 @@ DecrementSwHandsOff__FP2SW = 0x1dda50; // type:func g_psw = 0x275710; // size:0x4 +//////////////////////////////////////////////////////////////// +// P2/tail.c +//////////////////////////////////////////////////////////////// +InitTail__FP4TAIL = 0x1DDCE0; // type:func +PostTailLoad__FP4TAIL = 0x1DDD18; // type:func +UpdateTailConstraints__FP4TAIL = 0x1DDE90; // type:func +MatchTailOtherObject__FP4TAILP3ALO = 0x1DE768; // type:func + + //////////////////////////////////////////////////////////////// // P2/thread.c //////////////////////////////////////////////////////////////// diff --git a/include/tail.h b/include/tail.h new file mode 100644 index 00000000..0be08cc5 --- /dev/null +++ b/include/tail.h @@ -0,0 +1,17 @@ +/** + * @file tail.h + * + * @brief JT tail physics. + */ +#ifndef TAIL_H +#define TAIL_H + +#include "common.h" + +// todo Implement struct. +struct TAIL +{ + // ... +}; + +#endif // TAIL_H diff --git a/src/P2/brx.c b/src/P2/brx.c new file mode 100644 index 00000000..6f7579ba --- /dev/null +++ b/src/P2/brx.c @@ -0,0 +1,19 @@ +#include "common.h" + +INCLUDE_ASM(const s32, "P2/brx", StartupBrx__Fv); + +INCLUDE_ASM(const s32, "P2/brx", PloNew__F3CIDP2SWP3ALO3OIDi); + +INCLUDE_ASM(const s32, "P2/brx", LoadOptionFromBrx__FPvP5EOPIDP18CBinaryInputStream); + +INCLUDE_ASM(const s32, "P2/brx", snd_SendIOPCommandAndWait); + +INCLUDE_ASM(const s32, "P2/brx", snd_SendIOPCommandNoWait); + +INCLUDE_ASM(const s32, "P2/brx", LoadOptionsFromBrx__FPvP18CBinaryInputStream); + +INCLUDE_ASM(const s32, "P2/brx", IploFromStockOid__Fi); + +INCLUDE_ASM(const s32, "P2/brx", LoadSwObjectsFromBrx__FP2SWP3ALOP18CBinaryInputStream); + +INCLUDE_ASM(const s32, "P2/brx", SetLoDefaults__FP2LO); diff --git a/src/P2/credit.c b/src/P2/credit.c new file mode 100644 index 00000000..4565ed1c --- /dev/null +++ b/src/P2/credit.c @@ -0,0 +1,17 @@ +#include "common.h" + +INCLUDE_ASM(const s32, "P2/credit", InitCredit__FP6CREDIT5BLOTK); + +INCLUDE_ASM(const s32, "P2/credit", PostCreditLoad__FP6CREDIT); + +INCLUDE_ASM(const s32, "P2/credit", SetCreditClock__FP6CREDITPf); + +INCLUDE_ASM(const s32, "P2/credit", UpdateCredit__FP6CREDIT); + +INCLUDE_ASM(const s32, "P2/credit", DrawCredit__FP6CREDIT); + +INCLUDE_ASM(const s32, "P2/credit", PlaceCredit__FP6CREDITffi); + +INCLUDE_ASM(const s32, "P2/credit", VacateCredit__FP6CREDIT); + +INCLUDE_ASM(const s32, "P2/credit", SetCreditLine__FP6CREDITiPcf); diff --git a/src/P2/crout.c b/src/P2/crout.c new file mode 100644 index 00000000..a0234485 --- /dev/null +++ b/src/P2/crout.c @@ -0,0 +1,5 @@ +#include "common.h" + +INCLUDE_ASM(const s32, "P2/crout", CroutDecomp__FiPfT1); + +INCLUDE_ASM(const s32, "P2/crout", CroutSolve__FiPfN21); diff --git a/src/P2/tail.c b/src/P2/tail.c new file mode 100644 index 00000000..07feeb05 --- /dev/null +++ b/src/P2/tail.c @@ -0,0 +1,9 @@ +#include + +INCLUDE_ASM(const s32, "P2/tail", InitTail__FP4TAIL); + +INCLUDE_ASM(const s32, "P2/tail", PostTailLoad__FP4TAIL); + +INCLUDE_ASM(const s32, "P2/tail", UpdateTailConstraints__FP4TAIL); + +INCLUDE_ASM(const s32, "P2/tail", MatchTailOtherObject__FP4TAILP3ALO);