Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more c file splits #123

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions config/sly1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]

Expand All @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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]
Expand Down
43 changes: 43 additions & 0 deletions config/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -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
////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -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
////////////////////////////////////////////////////////////////
Expand Down
17 changes: 17 additions & 0 deletions include/tail.h
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions src/P2/brx.c
Original file line number Diff line number Diff line change
@@ -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);
17 changes: 17 additions & 0 deletions src/P2/credit.c
Original file line number Diff line number Diff line change
@@ -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);
5 changes: 5 additions & 0 deletions src/P2/crout.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "common.h"

INCLUDE_ASM(const s32, "P2/crout", CroutDecomp__FiPfT1);

INCLUDE_ASM(const s32, "P2/crout", CroutSolve__FiPfN21);
9 changes: 9 additions & 0 deletions src/P2/tail.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <tail.h>

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);
Loading