Skip to content

Commit 8ba7265

Browse files
authored
Merge pull request bfbbdecomp#30 from bluisblu/main
zExplosion work and split zWad files
2 parents d1fda18 + 2ea3eb4 commit 8ba7265

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+5598
-5401
lines changed

src/SB/Core/x/xSGT.cpp

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
S32 xSGT_LoadPrefsCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, U32 ui,
2+
S32 i)
3+
{
4+
U32 stereo;
5+
6+
xSGReadData(xsgdata, rctxt, &stereo, 1);
7+
xSGReadData(xsgdata, rctxt, &gSnd.categoryVolFader[2], 1);
8+
xSGReadData(xsgdata, rctxt, &gSnd.categoryVolFader[0], 1);
9+
xSGReadData(xsgdata, rctxt, &globals.option_vibration, 1);
10+
if (globals.option_vibration != 0)
11+
{
12+
xPadRumbleEnable(globals.currentActivePad, 1);
13+
}
14+
else
15+
{
16+
xPadRumbleEnable(globals.currentActivePad, 0);
17+
}
18+
return 1;
19+
}
20+
21+
S32 xSGT_LoadLoadCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, U32 ui,
22+
S32 i)
23+
{
24+
char bigbuf[32] = {};
25+
S32 compdiff = 0;
26+
27+
xSGReadData(xsgdata, rctxt, bigbuf, 1, strlen(currSceneStr));
28+
if (strlen(currSceneStr) != strlen(bigbuf))
29+
{
30+
compdiff = 1;
31+
}
32+
if (compdiff == 0)
33+
{
34+
strcpy(sceneRead, bigbuf);
35+
}
36+
37+
return compdiff == 0;
38+
}
39+
40+
S32 xSGT_SaveProcPrefsCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt)
41+
{
42+
int sum = 0;
43+
sum += xSGWriteData(xsgdata, wctxt, &gSnd.stereo, 1);
44+
sum += xSGWriteData(xsgdata, wctxt, &gSnd.categoryVolFader[2], 1);
45+
sum += xSGWriteData(xsgdata, wctxt, &gSnd.categoryVolFader[0], 1);
46+
sum += xSGWriteData(xsgdata, wctxt, &globals.option_vibration, 1);
47+
return sum + 1;
48+
}
49+
50+
S32 xSGT_SaveInfoPrefsCB(void* p1, st_XSAVEGAME_DATA* data, S32* i, S32* j)
51+
{
52+
*i = 16;
53+
*j = *i * 2;
54+
return 1;
55+
}
56+
57+
S32 xSGT_SaveProcCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt)
58+
{
59+
if (globals.sceneCur->sceneID == 'PG12')
60+
{
61+
strcpy(currSceneStr, xUtil_idtag2string('HB01', 0));
62+
}
63+
else
64+
{
65+
strcpy(currSceneStr, xUtil_idtag2string(globals.sceneCur->sceneID, 0));
66+
}
67+
return xSGWriteData(xsgdata, wctxt, currSceneStr, 1, strlen(currSceneStr)) + 1;
68+
}
69+
70+
S32 xSGT_SaveInfoCB(void* vp, st_XSAVEGAME_DATA* xsgdata, S32* need, S32* most)
71+
{
72+
*need = xSGWriteStrLen(currSceneStr);
73+
*most = *need << 1;
74+
return 1;
75+
}

src/SB/Game/zActionLine.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "zActionLine.h"

src/SB/Game/zAnimList.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "zAnimList.h"

src/SB/Game/zAssetTypes.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// TODO: Set up all the headers that this one includes
2+
//#include "zAssetTypes.h"

src/SB/Game/zAsync.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "zAsync.h"

src/SB/Game/zAsync.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#ifndef ZASYNC_H
2+
#define ZASYNC_H
3+
4+
#endif

src/SB/Game/zBusStop.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "zBusStop.h"

src/SB/Game/zBusStop.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#ifndef ZBUSSTOP_H
2+
#define ZBUSSTOP_H
3+
4+
#endif

src/SB/Game/zCam.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "zCam.h"

src/SB/Game/zCam.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#ifndef ZCAM_H
2+
#define ZCAM_H
3+
4+
#endif

0 commit comments

Comments
 (0)