Skip to content
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
1 change: 1 addition & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
config.wibo_tag = "0.6.11"

# Project
config.shift_jis = False
config.config_path = Path("config") / config.version / "config.yml"
config.check_sha_path = Path("config") / config.version / "build.sha1"
config.asflags = [
Expand Down
3 changes: 3 additions & 0 deletions src/SB/Core/gc/iTRC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace ResetButton

bool ROMFont::Init()
{
return false;
}

void ROMFont::InitGX()
Expand Down Expand Up @@ -130,6 +131,7 @@ void iTRCDisk::SetMovieResumeFunction(void (*Func)())

bool iTRCDisk::IsDiskIDed()
{
return false;
}

void iTRCDisk::DisplayErrorMessage()
Expand All @@ -142,4 +144,5 @@ void iTRCDisk::SetDVDState()

bool iTRCDisk::CheckDVDAndResetState()
{
return false;
}
4 changes: 2 additions & 2 deletions src/SB/Core/gc/isavegame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,7 @@ static S32 iSG_mc_fopen(st_ISG_MEMCARD_DATA* mcdata, const char* fname, S32 fsiz

static S32 iSG_mc_fclose(st_ISG_MEMCARD_DATA* mcdata)
{
iSG_mc_fclose(mcdata, NULL);
return iSG_mc_fclose(mcdata, NULL);
}

static S32 iSG_mc_fclose(st_ISG_MEMCARD_DATA* mcdata, CARDStat* stat)
Expand Down Expand Up @@ -1879,7 +1879,7 @@ static S32 iSG_mcqa_fread(st_ISG_MEMCARD_DATA* mcdata, char* buf, S32 len, S32 o
static S32 iSG_mcqa_fwrite(st_ISG_MEMCARD_DATA* mcdata, char* buf, S32 len);
static S32 iSG_mc_fwrite(st_ISG_MEMCARD_DATA* mcdata, char* buf, S32 len)
{
iSG_mcqa_fwrite(mcdata, buf, len);
return iSG_mcqa_fwrite(mcdata, buf, len);
}

static S32 iSG_mcqa_fwrite(st_ISG_MEMCARD_DATA* mcdata, char* buf, S32 len)
Expand Down
1 change: 1 addition & 0 deletions src/SB/Core/x/xBehaveMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct xBehaveMgr : RyzMemData
st_XORDEREDARRAY psylist;

xBehaveMgr();
~xBehaveMgr();
void Startup(S32, S32);
void RegBuiltIn();
xPsyche* Subscribe(xBase* owner, S32 i);
Expand Down
191 changes: 99 additions & 92 deletions src/SB/Game/zAssetTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,83 +36,83 @@ static u32 s_patFootSoundA;
static u32 s_patFootSoundB;

static st_PACKER_ASSETTYPE assetTypeHandlers[78] = {
{'BSP ', 0, 0, BSP_Read, NULL, NULL, NULL, NULL, BSP_Unload, NULL},
{'JSP ', 0, 0, JSP_Read, NULL, NULL, NULL, NULL, JSP_Unload, NULL},
{'TXD '},
{'MODL', 0, 0, Model_Read, NULL, NULL, NULL, NULL, Model_Unload, NULL},
{'ANIM', 0, 0, NULL, NULL, NULL, NULL, NULL, Anim_Unload, NULL},
{'RWTX', 0, 0, RWTX_Read, NULL, NULL, NULL, NULL, TextureRW3_Unload, NULL},
{'LKIT', 0, 0, NULL, NULL, NULL, NULL, NULL, LightKit_Unload, NULL},
{'CAM '},
{'PLYR'},
{'NPC '},
{'ITEM'},
{'PKUP'},
{'TRIG'},
{'SDF '},
{'TEX '},
{'TXT '},
{'ENV '},
{'ATBL', 0, 0, ATBL_Read, NULL, NULL, NULL, NULL, NULL, NULL},
{'MINF'},
{'PICK'},
{'PLAT'},
{'PEND'},
{'MRKR'},
{'MVPT', 0, 0, NULL, NULL, NULL, NULL, NULL, MovePoint_Unload, NULL},
{'TIMR'},
{'CNTR'},
{'PORT'},
{'SND '},
{'SNDS'},
{'GRUP'},
{'MPHT'},
{'SFX '},
{'SNDI', 0, 0, SndInfoRead, NULL, NULL, NULL, NULL, NULL, NULL},
{'HANG'},
{'SIMP'},
{'BUTN'},
{'SURF'},
{'DSTR'},
{'BOUL'},
{'MAPR'},
{'GUST'},
{'VOLU'},
{'UI '},
{'UIFT'},
{'TEXT'},
{'COND'},
{'DPAT'},
{'PRJT'},
{'LOBM'},
{'FOG '},
{'LITE'},
{'PARE'},
{'PARS'},
{'CSN '},
{'CTOC'},
{'CSNM'},
{'EGEN'},
{'ALST'},
{'RAW '},
{'LODT'},
{'SHDW'},
{'DYNA'},
{'VIL '},
{'VILP'},
{'COLL'},
{'PARP'},
{'PIPT'},
{'DSCO'},
{'JAW '},
{'SHRP'},
{'FLY '},
{'TRCK'},
{'CRV ', 0, 0, Curve_Read, NULL, NULL, NULL, NULL, NULL, NULL},
{'ZLIN'},
{'DUPC'},
{'SLID'},
{'CRDT'},
{ 'BSP ', 0, 0, BSP_Read, NULL, NULL, NULL, NULL, BSP_Unload, NULL },
{ 'JSP ', 0, 0, JSP_Read, NULL, NULL, NULL, NULL, JSP_Unload, NULL },
{ 'TXD ' },
{ 'MODL', 0, 0, Model_Read, NULL, NULL, NULL, NULL, Model_Unload, NULL },
{ 'ANIM', 0, 0, NULL, NULL, NULL, NULL, NULL, Anim_Unload, NULL },
{ 'RWTX', 0, 0, RWTX_Read, NULL, NULL, NULL, NULL, TextureRW3_Unload, NULL },
{ 'LKIT', 0, 0, NULL, NULL, NULL, NULL, NULL, LightKit_Unload, NULL },
{ 'CAM ' },
{ 'PLYR' },
{ 'NPC ' },
{ 'ITEM' },
{ 'PKUP' },
{ 'TRIG' },
{ 'SDF ' },
{ 'TEX ' },
{ 'TXT ' },
{ 'ENV ' },
{ 'ATBL', 0, 0, ATBL_Read, NULL, NULL, NULL, NULL, NULL, NULL },
{ 'MINF' },
{ 'PICK' },
{ 'PLAT' },
{ 'PEND' },
{ 'MRKR' },
{ 'MVPT', 0, 0, NULL, NULL, NULL, NULL, NULL, MovePoint_Unload, NULL },
{ 'TIMR' },
{ 'CNTR' },
{ 'PORT' },
{ 'SND ' },
{ 'SNDS' },
{ 'GRUP' },
{ 'MPHT' },
{ 'SFX ' },
{ 'SNDI', 0, 0, SndInfoRead, NULL, NULL, NULL, NULL, NULL, NULL },
{ 'HANG' },
{ 'SIMP' },
{ 'BUTN' },
{ 'SURF' },
{ 'DSTR' },
{ 'BOUL' },
{ 'MAPR' },
{ 'GUST' },
{ 'VOLU' },
{ 'UI ' },
{ 'UIFT' },
{ 'TEXT' },
{ 'COND' },
{ 'DPAT' },
{ 'PRJT' },
{ 'LOBM' },
{ 'FOG ' },
{ 'LITE' },
{ 'PARE' },
{ 'PARS' },
{ 'CSN ' },
{ 'CTOC' },
{ 'CSNM' },
{ 'EGEN' },
{ 'ALST' },
{ 'RAW ' },
{ 'LODT' },
{ 'SHDW' },
{ 'DYNA' },
{ 'VIL ' },
{ 'VILP' },
{ 'COLL' },
{ 'PARP' },
{ 'PIPT' },
{ 'DSCO' },
{ 'JAW ' },
{ 'SHRP' },
{ 'FLY ' },
{ 'TRCK' },
{ 'CRV ', 0, 0, Curve_Read, NULL, NULL, NULL, NULL, NULL, NULL },
{ 'ZLIN' },
{ 'DUPC' },
{ 'SLID' },
{ 'CRDT' },
};

void zAssetStartup()
Expand All @@ -127,8 +127,8 @@ void zAssetShutdown()
}

static HackModelRadius hackRadiusTable[3] = { { 0xFA77E6FAU, 20.0f },
{ 0x5BD0EDACU, 1000.0f },
{ 0xED21A1C6U, 50.0f } };
{ 0x5BD0EDACU, 1000.0f },
{ 0xED21A1C6U, 50.0f } };

static char* jsp_shadow_hack_textures[5] = {
"beach_towel", "wood_board_Nails_singleV2", "wood_board_Nails_singleV3",
Expand Down Expand Up @@ -168,7 +168,11 @@ struct AnimTableList animTable[33] = {
{ "ZNPC_AnimTable_Chuck", ZNPC_AnimTable_Chuck, 0 },
{ "ZNPC_AnimTable_Jelly", ZNPC_AnimTable_Jelly, 0 },
{ "ZNPC_AnimTable_SuperFriend", ZNPC_AnimTable_SuperFriend, 0 },
{ "ZNPC_AnimTable_BossPatrick", ZNPC_AnimTable_BossPatrick, 0, }
{
"ZNPC_AnimTable_BossPatrick",
ZNPC_AnimTable_BossPatrick,
0,
}
};

static xAnimTable* (*tableFuncList[48])() = {
Expand Down Expand Up @@ -227,7 +231,7 @@ extern xJSPHeader sDummyEmptyJSP;

static void* Model_Read(void* param_1, U32 param_2, void* indata, U32 insize, U32* outsize)
{
RpAtomic* model = (RpAtomic *)iModelFileNew(indata, insize);
RpAtomic* model = (RpAtomic*)iModelFileNew(indata, insize);

*outsize = 0x70;

Expand All @@ -237,7 +241,8 @@ static void* Model_Read(void* param_1, U32 param_2, void* indata, U32 insize, U3
{
continue;
}
for (RpAtomic* tmpModel = model; tmpModel != NULL; tmpModel = (RpAtomic *)iModelFile_RWMultiAtomic(tmpModel))
for (RpAtomic* tmpModel = model; tmpModel != NULL;
tmpModel = (RpAtomic*)iModelFile_RWMultiAtomic(tmpModel))
{
tmpModel->boundingSphere.radius = hackRadiusTable[i].radius;

Expand All @@ -260,7 +265,7 @@ static void* Curve_Read(void* param_1, U32 param_2, void* indata, U32 insize, U3
void* __dest = RWSRCGLOBAL(memoryFuncs.rwmalloc(insize));
memcpy(__dest, indata, insize);

*(int *)((int)__dest + 0x10) = (int)__dest + 0x14;
*(int*)((int)__dest + 0x10) = (int)__dest + 0x14;

return __dest;
}
Expand Down Expand Up @@ -305,7 +310,6 @@ static void* BSP_Read(void* param_1, U32 param_2, void* indata, U32 insize, U32*
return bsp;
}


static void BSP_Unload(void*, U32)
{
xEnvFree(globals.sceneCur->env);
Expand Down Expand Up @@ -340,10 +344,12 @@ static RwTexture* TexCB(RwTexture* texture, void* data)
{
*(RwTexture**)(data) = texture;
}
return texture;
}

static void* RWTX_Read(void*, unsigned int, void*, unsigned int, unsigned int*) {

static void* RWTX_Read(void*, unsigned int, void*, unsigned int, unsigned int*)
{
return NULL;
}

static void TextureRW3_Unload(void* a, U32 b)
Expand All @@ -365,10 +371,10 @@ static void ATBL_Init()

void FootstepHackSceneEnter()
{
s_sbFootSoundA = xStrHash("SB_run1L");
s_sbFootSoundB = xStrHash("SB_run1R");
s_scFootSoundA = xStrHash("SC_run_kelpL");
s_scFootSoundB = xStrHash("SC_run_kelpL");
s_sbFootSoundA = xStrHash("SB_run1L");
s_sbFootSoundB = xStrHash("SB_run1R");
s_scFootSoundA = xStrHash("SC_run_kelpL");
s_scFootSoundB = xStrHash("SC_run_kelpL");
s_patFootSoundA = xStrHash("Pat_run_rock_dryL");
s_patFootSoundB = xStrHash("Pat_run_rock_dryR");
}
Expand All @@ -378,8 +384,9 @@ static U8 dummyEffectCB(U32, xAnimActiveEffect*, xAnimSingle*, void*)
return 0;
}

static void* ATBL_Read(void*, unsigned int, void*, unsigned int, unsigned int*) {

static void* ATBL_Read(void*, unsigned int, void*, unsigned int, unsigned int*)
{
return NULL;
}

static void Anim_Unload(void*, U32)
Expand Down
2 changes: 1 addition & 1 deletion src/SB/Game/zCutsceneMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ void zCutsceneMgrFinishLoad(xBase* to)

void zCutsceneMgrFinishExit(xBase* to)
{
zCutsceneMgr* t;
zCutsceneMgr* t = (zCutsceneMgr*)to;

while (1)
{
Expand Down
2 changes: 1 addition & 1 deletion src/SB/Game/zEntPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4678,7 +4678,7 @@ void zEntPlayer_SNDPlayStreamRandom(_tagePlayerStreamSnd player_snd_start,
if (player_snd_start != player_snd_end)
{
S32 first_valid;
S32 num_valid;
S32 num_valid = 0;
for (S32 i = 0; i < diff; i++)
{
S32 possible = rand_array[i];
Expand Down
2 changes: 1 addition & 1 deletion src/SB/Game/zEntSimpleObj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ void zEntSimpleObj_MgrUpdateRender(RpWorld* world, F32 dt)
s32 sp1C;
s32 sp18;
s32 sp14;
f32 spC;
f32 spC = 0.0f;
xVec3 sp8;
f32 temp_f0;
f32 temp_f1;
Expand Down
8 changes: 4 additions & 4 deletions src/SB/Game/zNPCGoalAmbient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ S32 zNPCGoalJellyAttack::Process(en_trantype* arg0, F32 arg1, void* arg2, xScene
return zNPCGoalPushAnim::Process(arg0, arg1, arg2, arg3);
}

S32 zNPCGoalJellyAttack::ZapperStop()
void zNPCGoalJellyAttack::ZapperStop()
{
zNPC_SNDStop((_tageNPCSnd) 4);
for (S32 i = 0; i< 3; ++i)
zNPC_SNDStop((_tageNPCSnd)4);
for (S32 i = 0; i < 3; ++i)
{
if(zap_lytnin[i] != NULL)
if (zap_lytnin[i] != NULL)
{
zLightningKill(zap_lytnin[i]);
}
Expand Down
7 changes: 3 additions & 4 deletions src/SB/Game/zNPCGoalAmbient.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "zNPCSupport.h"
#include "zLightning.h"


xFactoryInst* GOALCreate_Ambient(S32 who, RyzMemGrow* grow, void*);

struct zNPCGoalJellyBirth : zNPCGoalCommon
Expand All @@ -24,13 +23,13 @@ struct zNPCGoalJellyBirth : zNPCGoalCommon

struct zNPCGoalJellyAttack : zNPCGoalPushAnim
{
class zLightning * zap_lytnin[3];
class zLightning* zap_lytnin[3];
U32 lastAnimTime;
S32 Enter(F32 dt, void* updCtxt);
S32 Exit(F32 dt, void* updCtxt);
S32 Process(en_trantype* trantyp, F32 dt, void* updCxt, xScene* xscn);
S32 ZapperStart();
S32 ZapperStop();
S32 ZapperStart();
void ZapperStop();
S32 ZapperUpdate();
};

Expand Down
Loading