From 8178a6634fb5ba138edb89937fdfd805dc8d456e Mon Sep 17 00:00:00 2001 From: CreateSource Date: Sun, 7 Jan 2024 12:35:52 -0500 Subject: [PATCH] Variable adjustments --- src/game/board/player.c | 43 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/src/game/board/player.c b/src/game/board/player.c index aee15dac..9b4755ac 100644 --- a/src/game/board/player.c +++ b/src/game/board/player.c @@ -3,6 +3,7 @@ #include "game/window.h" #include "game/object.h" #include "game/process.h" +#include "game/hsfman.h" //// #include "game/board/main.h" extern s32 BoardIsStarted(void); @@ -156,14 +157,10 @@ s32 ExecJunction(s32, s16*); s32 MegaPlayerPassFunc(s32, s16); s32 BoardPlayerAnimBlendCheck(s32); -static void (*playerMatCopy[4])(); +static HsfMaterial *playerMatCopy[4]; static s32 (*postTurnHook[4])(); static s32 (*preTurnHook[4])(); -static s32 diceJumpObj[4] = {0, 0, 0, 0}; -static s32 animDoneF[4] = {0, 0, 0, 0}; -static s16 bowserSuitMot[5] = {-1, -1, -1, -1, -1}; - s16 boardPlayerMdl[4]; static s16 playerMot[4]; static s16 junctionArrowRot[4]; @@ -176,6 +173,26 @@ static s16 suitMdl = -1; static s16 suitPlayerMdl = -1; static s16 suitCurrMot = -1; +static s32 diceJumpObj[4] = {0, 0, 0, 0}; +static s32 animDoneF[4] = {0, 0, 0, 0}; +static s16 bowserSuitMot[5] = {-1, -1, -1, -1, -1}; +char* lbl_8013993C[] = { + "eye1", + "eye2", + "mat14", + "mat16", + "mat65", + "mat66", + "Mario", + "Luigi", + "Peach", + "Yoshi", + "Wario", + "Donky", + "Daisy", + "Waluigi", +}; + inline PlayerState* GetPlayer(s32 index) { return &GWPlayer[index]; } @@ -979,4 +996,20 @@ void BoardJunctionMaskReset(s32 arg0) { void BoardJunctionMaskZero(void) { junctionMask = 0; +} + +// ... + +void BoardPlayerCopyMat(s32 arg0) { + s16 modelID; + ModelData *model; + void* temp_r3; + HsfData* temp_r31; + + modelID = BoardModelIDGet(GetBoardPlayer(arg0)); + model = &Hu3DData[modelID]; + temp_r31 = model->hsfData; + temp_r3 = HuMemDirectMallocNum(HEAP_SYSTEM, temp_r31->materialCnt * 0x3C, 0x10000000U); + memcpy(temp_r3, temp_r31->material, temp_r31->materialCnt * 0x3C); + playerMatCopy[arg0] = temp_r3; } \ No newline at end of file