From 8fac44d0a965107266d04b35705dda94bab05ea3 Mon Sep 17 00:00:00 2001 From: Zac Date: Thu, 21 Nov 2024 20:13:45 +0000 Subject: [PATCH] Split tail.c --- config/sly1.yaml | 9 +++++---- config/symbol_addrs.txt | 29 +++++++++++++++++++---------- include/tail.h | 17 +++++++++++++++++ src/P2/tail.c | 9 +++++++++ 4 files changed, 50 insertions(+), 14 deletions(-) create mode 100644 include/tail.h create mode 100644 src/P2/tail.c diff --git a/config/sly1.yaml b/config/sly1.yaml index d66599ed..4bfe66c4 100644 --- a/config/sly1.yaml +++ b/config/sly1.yaml @@ -138,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 @@ -271,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] @@ -286,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 9ddda944..1b82b8fa 100644 --- a/config/symbol_addrs.txt +++ b/config/symbol_addrs.txt @@ -654,21 +654,21 @@ s_asnipDprize = 0x2619A0; // size:0x3c //////////////////////////////////////////////////////////////// // P2/credit.c //////////////////////////////////////////////////////////////// -InitCredit = 0x14ABD0; // type:func -PostCreditLoad = 0x14AC48; // type:func -SetCreditClock = 0x14AD00; // type:func -UpdateCredit = 0x14AD70; // type:func -DrawCredit = 0x14ADE0; // type:func -PlaceCredit = 0x14AEA0; // type:func -VacateCredit = 0x14AF10; // type:func -SetCreditLine = 0x14AF38; // type:func +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 = 0x14B0C0; // type:func -CroutSolve = 0x14B3E0; // type:func +CroutDecomp__FiPfT1 = 0x14B0C0; // type:func +CroutSolve__FiPfN21 = 0x14B3E0; // type:func //////////////////////////////////////////////////////////////// @@ -1182,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/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);