Skip to content

Commit e3d19f6

Browse files
author
Niko
committed
3 new functions
1 parent 3ce1d6d commit e3d19f6

File tree

5 files changed

+57
-50
lines changed

5 files changed

+57
-50
lines changed

decompile/WorkInProgress/src/233/233_19_CS_LoadBossCallback.c renamed to decompile/General/233/233_19_CS_LoadBossCallback.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
void DECOMP_CS_LoadBossCallback(struct LoadQueueSlot * lqs)
44
{
55
sdata->load_inProgress = 0;
6-
7-
// CTR Model File (head)
8-
*(int*)0x800b7778 = lqs->ptrDestination;
6+
OVR_233.ptrModelBossHead = lqs->ptrDestination;
97
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#include <common.h>
2+
3+
void DECOMP_CS_LoadBossCallback(struct LoadQueueSlot * lqs);
4+
5+
void DECOMP_CS_LoadBoss(struct BossCutsceneData* bcd)
6+
{
7+
unsigned int *ptrDestination;
8+
int index;
9+
10+
index = 3 - sdata->gGT->activeMempackIndex;
11+
12+
CDSYS_XAPauseRequest();
13+
14+
// CTR Model file (body)
15+
ptrDestination = &OVR_233.ptrModelBossBody;
16+
17+
// erase HEAD + BODY
18+
ptrDestination[0] = 0;
19+
ptrDestination[-1] = 0;
20+
21+
sdata->gGT->levID_in_each_mempack[index] = -1;
22+
23+
MEMPACK_SwapPacks(index);
24+
MEMPACK_ClearLowMem();
25+
26+
sdata->load_inProgress = 1;
27+
28+
// This will be 1 or 2,
29+
// now equals 0 or 1
30+
index -= 1;
31+
32+
#if 0 // UNUSED
33+
if (bcd->vrmFile != 0)
34+
{
35+
// CTR vram file (body and head)
36+
LOAD_AppendQueue(sdata->ptrBigfileCdPos_2, LT_VRAM, bcd->vrmFile+index, 0, 0);
37+
}
38+
#endif
39+
40+
// skip null check
41+
//if (bcd->bodyFile != 0)
42+
{
43+
// CTR Model File (body)
44+
LOAD_AppendQueue(sdata->ptrBigfileCdPos_2, LT_DRAM, bcd->bodyFile+index, ptrDestination, -0x2);
45+
}
46+
47+
// CTR Model File (head)
48+
LOAD_AppendQueue(sdata->ptrBigfileCdPos_2, LT_DRAM, bcd->headFile+index, 0, DECOMP_CS_LoadBossCallback);
49+
}

decompile/WorkInProgress/src/233/233_22_CS_Camera_BoolGotoBoss.c renamed to decompile/General/233/233_22_CS_Camera_BoolGotoBoss.c

File renamed without changes.

decompile/WorkInProgress/src/233/233_20_CS_LoadBoss.c

Lines changed: 0 additions & 40 deletions
This file was deleted.

decompile/buildList.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// 498 = 972-474, "comm... - //comm..."
2-
// 498+43+33+27+38+14+18+35+46+12+6+9+2+1+1+2+2+3+3+2+4+2+3+3+16+3+47 = 873 rewritten so far
3-
// 498 for every 'common' and ','
1+
// 504 = 978-474, "comm... - //comm..."
2+
// 504+43+33+27+38+14+18+35+46+12+6+9+2+1+1+2+2+3+3+2+4+2+3+3+16+3+47 = 879 rewritten so far
3+
// 504 for every 'common' and ','
44
// additions for every file that has multiple functions,
55
// 43 for HOWL block
66
// 33 for LOAD block
@@ -233,10 +233,10 @@ common, 232, AH_WarpPad_GetSpawnPosRot, 0x0, General/232
233233
//common, 233, CS_Instance_BoolPlaySound, 0x0, General/233/233_12_CS_Instance_BoolPlaySound.c
234234
//common, 233, CS_DestroyPodium_StartDriving, 0x0, General/233/233_13_CS_DestroyPodium_StartDriving.c
235235
// Skip CS_Thread (14-18)
236-
// Skip Boss (19-22)
237-
236+
common, 233, CS_LoadBossCallback, 0x0, General/233/233_19_CS_LoadBossCallback.c
237+
common, 233, CS_LoadBoss, 0x0, General/233/233_20_CS_LoadBoss.c
238238
common, 233, CS_Camera_ThTick_Boss, 0x0, General/233/233_21_CS_Camera_ThTick_Boss.c
239-
239+
common, 233, CS_Camera_BoolGotoBoss, 0x0, General/233/233_22_CS_Camera_BoolGotoBoss.c
240240
// Skip Podium (23-25)
241241
//common, 233, CS_Podium_Prize_ThTick3, 0x0, General/233/233_26_CS_Podium_Prize_ThTick3.c
242242
common, 233, CS_Podium_Prize_ThTick2, 0x0, General/233/233_27_CS_Podium_Prize_ThTick2.c
@@ -1276,7 +1276,7 @@ common, exe, UI_CupStandings_InputAndDraw, 0x0, General/UI/UI_58_CupSta
12761276
// ====================================================================================================================
12771277
common, exe, VehAfterColl_GetSurface, 0x0, General/Vehicle/VehAfterColl_0_GetSurface.c
12781278
common, exe, VehAfterColl_GetTerrain, 0x0, General/Vehicle/VehAfterColl_1_GetTerrain.c
1279-
common, exe, VehBirth_TeleportSelf, 0x0, General/Vehicle/VehBirth_0_TeleportSelf.c
1279+
//common, exe, VehBirth_TeleportSelf, 0x0, General/Vehicle/VehBirth_0_TeleportSelf.c
12801280
common, exe, VehBirth_TeleportAll, 0x0, General/Vehicle/VehBirth_1_TeleportAll.c
12811281
common, exe, VehBirth_GetModelByName, 0x0, General/Vehicle/VehBirth_2_GetModelByName.c
12821282
common, exe, VehBirth_SetConsts, 0x0, General/Vehicle/VehBirth_3_SetConsts.c

0 commit comments

Comments
 (0)