diff --git a/src/SB/Core/gc/iAnim.cpp b/src/SB/Core/gc/iAnim.cpp index 3c766380..dcfb4f37 100644 --- a/src/SB/Core/gc/iAnim.cpp +++ b/src/SB/Core/gc/iAnim.cpp @@ -204,7 +204,6 @@ void iAnimBlend(float32 BlendFactor, float32 BlendRecip, uint16* BlendTimeOffset Quat1++; - if (Quat2) { q2++; diff --git a/src/SB/Core/gc/iPad.cpp b/src/SB/Core/gc/iPad.cpp index 7ef91fec..a42715b8 100644 --- a/src/SB/Core/gc/iPad.cpp +++ b/src/SB/Core/gc/iPad.cpp @@ -10,7 +10,6 @@ int32 iPadInit() return 1; } - #if 0 _tagxPad* iPadEnable(_tagxPad* pad, int16 port) { diff --git a/src/SB/Core/gc/iSnd.cpp b/src/SB/Core/gc/iSnd.cpp index bdc7c090..69a93942 100644 --- a/src/SB/Core/gc/iSnd.cpp +++ b/src/SB/Core/gc/iSnd.cpp @@ -15,7 +15,6 @@ extern float32 _1262; extern float32 _1263; extern volatile int32 fc; - void arq_callback(long32) { if (!soundInited) @@ -25,58 +24,22 @@ void arq_callback(long32) SoundFlags = 0; } - - - - - - - - - - - - - - - - void iSndExit() { soundInited = 0; AXQuit(); } - //not sure where this type is from. void iSndSetEnvironmentalEffect(isound_effect) { return; } - void iSndInitSceneLoaded() { } - - - - - - - - - - - - - - - - - - #ifdef NON_MATCHING uint32 iVolFromX(float32 param1) { @@ -95,13 +58,6 @@ uint32 iVolFromX(float32 param1) } #endif - - - - - - - void iSndVolUpdate(xSndVoiceInfo* info, vinfo* vinfo) { MIXUnMute(vinfo->voice); @@ -116,10 +72,6 @@ void iSndVolUpdate(xSndVoiceInfo* info, vinfo* vinfo) } } - - - - void iSndUpdateSounds() { if (!soundInited) @@ -136,39 +88,10 @@ void iSndUpdateSounds() } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - void iSndStartStereo(uint32 id1, uint32 id2, float32 pitch) { } - void iSndStereo(uint32 i) { if (i == 0) @@ -199,16 +122,11 @@ void iSndWaitForDeadSounds() } #endif - -// +// void iSndSuspendCD(uint32) { } - - - - void iSndMessWithEA(sDSPADPCM* param1) //sDSPADPCM* { if (param1 != NULL) @@ -227,24 +145,15 @@ uint32 SampleToNybbleAddress(uint32 sample) } #endif - void sndloadcb(tag_xFile* tag) { SoundFlags = 0; } - - - - - - - void iSndSetExternalCallback(void (*func_ptr)(uint32)) { } - void iSndMyAXFree(_AXVPB** param1) { if (param1 != NULL && *param1 != NULL) diff --git a/src/SB/Core/gc/iSystem.cpp b/src/SB/Core/gc/iSystem.cpp index 0ce4bd34..a6453130 100644 --- a/src/SB/Core/gc/iSystem.cpp +++ b/src/SB/Core/gc/iSystem.cpp @@ -40,10 +40,6 @@ uint16 my_dsc(uint16 dsc) return dsc; } - - - - // void MemoryProtectionErrorHandler(uint16 last, OSContext* ctx, uint64 unk1, uint64 unk2) @@ -72,9 +68,6 @@ void TRCInit() #endif - - - /* void iSystemExit() { @@ -89,15 +82,6 @@ void iSystemExit() } */ - - - - - - - - - int32 RenderWareExit() { RwEngineStop(); @@ -105,9 +89,6 @@ int32 RenderWareExit() return RwEngineTerm(); } - - - void null_func() { mem_base_alloc += 4; diff --git a/src/SB/Core/gc/isavegame.cpp b/src/SB/Core/gc/isavegame.cpp index f5fe2d38..d50c4034 100644 --- a/src/SB/Core/gc/isavegame.cpp +++ b/src/SB/Core/gc/isavegame.cpp @@ -12,7 +12,6 @@ extern st_ISGSESSION g_isgdata_MAIN; extern int32 g_isginit; - #if 0 int32 iSGStartup() { @@ -32,14 +31,12 @@ int32 iSGStartup() } #endif - int32 iSGShutdown() { iSG_discard_icondata(); return 1; } - #if 0 // WIP int8* iSGMakeName(en_NAMEGEN_TYPE type, const int8* base, int32 idx) @@ -79,7 +76,6 @@ int8* iSGMakeName(en_NAMEGEN_TYPE type, const int8* base, int32 idx) } #endif - #if 0 // Struct definition is screwed up. st_ISGSESSION* iSGSessionBegin(void* cltdata, void (*chgfunc)(void*, en_CHGCODE), int32 monitor) @@ -95,7 +91,6 @@ st_ISGSESSION* iSGSessionBegin(void* cltdata, void (*chgfunc)(void*, en_CHGCODE) } #endif - #if 0 // Structs make no sense void iSGSessionEnd(st_ISGSESSION* isgdata) diff --git a/src/SB/Core/x/iCamera.cpp b/src/SB/Core/x/iCamera.cpp index 6be1c1ef..6d128fff 100644 --- a/src/SB/Core/x/iCamera.cpp +++ b/src/SB/Core/x/iCamera.cpp @@ -329,9 +329,6 @@ iFogParams& iFogParams::operator=(const iFogParams& other) // temp return *this; } - - - void iCameraSetFogRenderStates() { RwCamera* pCamera; diff --git a/src/SB/Core/x/xAnim.cpp b/src/SB/Core/x/xAnim.cpp index b22c95c6..b7ad7723 100644 --- a/src/SB/Core/x/xAnim.cpp +++ b/src/SB/Core/x/xAnim.cpp @@ -63,7 +63,6 @@ static bool _xCharIn(char ch, const char* str) // _xCheckAnimNameInner(const char*,const char*,int,char*,int*,int*) - bool _xCheckAnimNameInner(const char* name, const char* pattern, int32 patternSize, int8* extra, int32* nameOut, int32* extraOut); @@ -105,9 +104,6 @@ float std::atan2f(float y, float x) } #endif - - - float CalcRecipBlendMax(uint16*); static uint32 StateHasTransition(xAnimState* state, xAnimTransition* tran) @@ -186,9 +182,6 @@ static void TransitionTimeInit(xAnimSingle* single, xAnimTransition* tran) } #endif - - - xAnimFile* xAnimFileNewBilinear(void** rawData, const char* name, uint32 flags, xAnimFile** linkedList, uint32 numX, uint32 numY); @@ -197,12 +190,6 @@ xAnimFile* xAnimFileNew(void* rawData, const char* name, uint32 flags, xAnimFile return xAnimFileNewBilinear(&rawData, name, flags, linkedList, 1, 1); } - - - - - - void xAnimFileEval(xAnimFile* data, float32 time, float32* bilinear, uint32 flags, xVec3* tran, xQuat* quat, float32*); @@ -607,19 +594,14 @@ static void EffectSingleRun(xAnimSingle* single) single->Effect = effect; } - - - void EffectSingleLoop(xAnimSingle* single); // EffectSingleStop(xAnimSingle*) - void EffectSingleStop(xAnimSingle* single); // StopUpdate(xAnimSingle*) - static void LoopUpdate(xAnimSingle* single) { float32 time = single->Time; @@ -635,12 +617,6 @@ static void LoopUpdate(xAnimSingle* single) } } - - - - - - void SingleUpdate(xAnimSingle* single, float32 timeDelta); static void SingleEval(xAnimSingle* single, xVec3* tran, xQuat* quat) @@ -713,9 +689,6 @@ void xAnimPlayChooseTransition(xAnimPlay* play) } } - - - void xAnimPlayUpdate(xAnimPlay* play, float32 timeDelta) { uint32 i; @@ -734,9 +707,6 @@ void xAnimPlayUpdate(xAnimPlay* play, float32 timeDelta) } } - - - void xAnimPoolCB(xMemPool* pool, void* data) { int32 i; @@ -800,9 +770,6 @@ void xAnimPoolCB(xMemPool* pool, void* data) clone->Pool = pool; } - - - xAnimPlay* xAnimPoolAlloc(xMemPool* pool, void* object, xAnimTable* table, xModelInstance* modelInst) { diff --git a/src/SB/Core/x/xBehaveMgr.cpp b/src/SB/Core/x/xBehaveMgr.cpp index 589adbe8..60b34b2c 100644 --- a/src/SB/Core/x/xBehaveMgr.cpp +++ b/src/SB/Core/x/xBehaveMgr.cpp @@ -8,7 +8,6 @@ extern int32 g_modinit_xBehaveMgr; extern xBehaveMgr* g_behavmgr; - #ifdef NON_MATCHING void xBehaveMgr_Startup() { @@ -20,7 +19,6 @@ void xBehaveMgr_Startup() } #endif - #if 0 void xBehaveMgr_Shutdown() { @@ -36,46 +34,36 @@ void xBehaveMgr_Shutdown() } #endif - xBehaveMgr* xBehaveMgr_GetSelf() { return g_behavmgr; } - xFactory* xBehaveMgr_GoalFactory() { return g_behavmgr->GetFactory(); } - void xBehaveMgr_ScenePrepare() { g_behavmgr->ScenePrepare(); } - void xBehaveMgr_SceneFinish() { g_behavmgr->SceneFinish(); } - void xBehaveMgr_SceneReset() { g_behavmgr->SceneReset(); } - - - - void xBehaveMgr::RegBuiltIn() { xGoalSimple_RegisterTypes(this->goalFactory); } - xPsyche* xBehaveMgr::Subscribe(xBase* owner, int32 i) { xPsyche* psyche = &this->psypool[this->psylist.cnt]; @@ -85,25 +73,21 @@ xPsyche* xBehaveMgr::Subscribe(xBase* owner, int32 i) return psyche; } - void xBehaveMgr::UnSubscribe(xPsyche* psy) { psy->KillBrain(this->goalFactory); XOrdRemove(&this->psylist, psy, -1); } - void xBehaveMgr::ScenePrepare() { } - void xBehaveMgr::SceneFinish() { XOrdReset(&this->psylist); } - void xBehaveMgr::SceneReset() { for (int32 i = 0; i < this->psylist.cnt; i++) @@ -113,7 +97,6 @@ void xBehaveMgr::SceneReset() } } - void xPsyche::BrainBegin() { xFactory* factory = xBehaveMgr_GoalFactory(); @@ -121,7 +104,6 @@ void xPsyche::BrainBegin() factory->GrowDataEnable(&this->fakebase, false); } - void xPsyche::BrainExtend() { xFactory* factory = xBehaveMgr_GoalFactory(); @@ -129,14 +111,12 @@ void xPsyche::BrainExtend() factory->GrowDataEnable(&this->fakebase, true); } - void xPsyche::BrainEnd() { xBehaveMgr_GoalFactory()->GrowDataDisable(); this->psystat = PSY_STAT_THINK; } - #ifdef NON_MATCHING // Regalloc xGoal* xPsyche::AddGoal(int32 gid, void* createData) @@ -163,7 +143,6 @@ xGoal* xPsyche::AddGoal(int32 gid, void* createData) } #endif - extern float32 _750; void xPsyche::FreshWipe() { @@ -189,7 +168,6 @@ void xPsyche::FreshWipe() this->flg_psyche |= 1; } - void xPsyche::SetOwner(xBase* clt_owner, void* userContext) { this->clt_owner = clt_owner; @@ -207,14 +185,12 @@ void xPsyche::SetOwner(xBase* clt_owner, void* userContext) this->fakebase.eventFunc = NULL; } - void xPsyche::KillBrain(xFactory* factory) { this->Lobotomy(factory); this->fun_remap = NULL; } - void xPsyche::Lobotomy(xFactory* factory) { while (this->goallist != NULL) @@ -224,7 +200,6 @@ void xPsyche::Lobotomy(xFactory* factory) } } - #if 0 void xPsyche::Amnesia(int32 i) { diff --git a/src/SB/Core/x/xCamera.cpp b/src/SB/Core/x/xCamera.cpp index 3c6f2468..c6472ada 100644 --- a/src/SB/Core/x/xCamera.cpp +++ b/src/SB/Core/x/xCamera.cpp @@ -918,9 +918,6 @@ void xCameraSetScene(xCamera* cam, xScene* sc) iCameraAssignEnv(cam->lo_cam, sc->env->geom); } - - - void xCameraSetTargetMatrix(xCamera* cam, xMat4x3* mat) { cam->tgt_mat = mat; diff --git a/src/SB/Core/x/xClimate.cpp b/src/SB/Core/x/xClimate.cpp index 35487705..024c3338 100644 --- a/src/SB/Core/x/xClimate.cpp +++ b/src/SB/Core/x/xClimate.cpp @@ -14,8 +14,8 @@ _tagClimate* sClimate; float snow_life = 3.0f; -const xVec3 snow_vel = {0.0f, -2.0f, 0.0f}; -const xVec3 snow_dvel = {0.1f, 0.1f, 0.1f}; +const xVec3 snow_vel = { 0.0f, -2.0f, 0.0f }; +const xVec3 snow_dvel = { 0.1f, 0.1f, 0.1f }; void xClimateVecFromAngle(float32 angleDegrees, xVec3* vec) { @@ -46,20 +46,20 @@ void xClimateInitAsset(_tagClimate* climate, xEnvAsset* asset) sClimate = climate; climate->wind.strength = 0.0f; xClimateVecFromAngle(climate->wind.angle, &climate->wind.dir); - - if(asset->climateFlags == 0) + + if (asset->climateFlags == 0) { climate->wind.strength = 0.0f; climate->rain.strength = 0.0f; return; } - if(asset->climateFlags & 1) + if (asset->climateFlags & 1) { climate->rain.rain = 1.0f; climate->rain.strength = 0.5f * (asset->climateStrengthMax - asset->climateStrengthMin); climate->rain.strength += asset->climateStrengthMin; } - else if(asset->climateFlags & 2) + else if (asset->climateFlags & 2) { climate->rain.rain = 0.0f; climate->rain.strength = 0.5f * (asset->climateStrengthMax - asset->climateStrengthMin); @@ -102,10 +102,10 @@ void UpdateRain(_tagClimate* climate, float seconds) memset(&info, 0, sizeof(xParEmitterCustomSettings)); info.custom_flags = 0x100; - if(r->rain != 0) + if (r->rain != 0) { int32 total_rain_drops = 25.0f * r->strength; - for(int32 i = 0; i < total_rain_drops; i++) + for (int32 i = 0; i < total_rain_drops; i++) { GetPosBigDogWhattupFool(&info.pos); info.pos.x += 25.0f * xurand() - 12.5f; @@ -114,15 +114,15 @@ void UpdateRain(_tagClimate* climate, float seconds) xParEmitterEmitCustom(r->rain_emitter, seconds, &info); } return; - } + } xVec3 fool; int32 total_snow_flakes = 25.0f * r->strength; info.custom_flags |= 0x202; GetPosBigDogWhattupFool(&fool); - if(gPTankDisable) + if (gPTankDisable) { - for(int32 i = 0; i < total_snow_flakes; i++) + for (int32 i = 0; i < total_snow_flakes; i++) { info.pos = fool; info.pos.x += 45.0f * xurand() - 22.5f; @@ -137,7 +137,6 @@ void UpdateRain(_tagClimate* climate, float seconds) info.vel.y = snow_dvel.y * xurand() + snow_vel.y; info.vel.z = snow_dvel.z * xurand() + snow_vel.z; - info.life.val[0] = snow_life * perc + snow_life; xParEmitterEmitCustom(r->snow_emitter, seconds, &info); } @@ -145,14 +144,13 @@ void UpdateRain(_tagClimate* climate, float seconds) } int32 num = (float32)total_snow_flakes * 0.1f; - if(num > 0) + if (num > 0) { xVec3* pos = (xVec3*)xMemPushTemp(num * 2 * sizeof(xVec3)); - xVec3* vel = pos+num; - if(pos != NULL) + xVec3* vel = pos + num; + if (pos != NULL) { - - for(int32 i = 0; i < num; i++) + for (int32 i = 0; i < num; i++) { *pos = fool; pos->x += 45.0f * xurand() - 22.5f; diff --git a/src/SB/Core/x/xClumpColl.cpp b/src/SB/Core/x/xClumpColl.cpp index 599f3cc9..56dd213d 100644 --- a/src/SB/Core/x/xClumpColl.cpp +++ b/src/SB/Core/x/xClumpColl.cpp @@ -2,7 +2,6 @@ #include - xClumpCollBSPTree* xClumpColl_StaticBufferInit(void* data, uint32 param_2) { uint32* header; // unused @@ -26,7 +25,6 @@ xClumpCollBSPTree* xClumpColl_StaticBufferInit(void* data, uint32 param_2) return tree; } - void xClumpColl_InstancePointers(xClumpCollBSPTree* tree, RpClump* clump) { int32 i; diff --git a/src/SB/Core/x/xCollide.cpp b/src/SB/Core/x/xCollide.cpp index 4fb031cb..0d495626 100644 --- a/src/SB/Core/x/xCollide.cpp +++ b/src/SB/Core/x/xCollide.cpp @@ -7,7 +7,6 @@ // extern float32 lbl_803CCAA8; // 0.0 - #ifdef NON_MATCHING // Will match once we can use float literals for this _xCollsIdx xCollideGetCollsIdx(const xCollis* coll, const xVec3* tohit, const xMat3x3* mat) @@ -86,13 +85,11 @@ _xCollsIdx xCollideGetCollsIdx(const xCollis* coll, const xVec3* tohit, const xM } #endif - void xCollideInit(xScene* sc) { iCollideInit(sc); } - #if 0 //WIP, very wrong but it compiles at least // Need to figure out why it defines scale twice and why ghidra passes in wrong values to xVec3SMul diff --git a/src/SB/Core/x/xCollideFast.cpp b/src/SB/Core/x/xCollideFast.cpp index 3ffb11d9..b5396175 100644 --- a/src/SB/Core/x/xCollideFast.cpp +++ b/src/SB/Core/x/xCollideFast.cpp @@ -3,7 +3,6 @@ #include - void xCollideFastInit(xScene* sc) { iCollideFastInit(sc); diff --git a/src/SB/Core/x/xCutscene.cpp b/src/SB/Core/x/xCutscene.cpp index 45c11250..e9cf3d45 100644 --- a/src/SB/Core/x/xCutscene.cpp +++ b/src/SB/Core/x/xCutscene.cpp @@ -22,7 +22,6 @@ extern float32 _672; // 1.0 extern float32 lbl_803CCB3C; // 0.0 extern float32 lbl_803CCB40; // 0.033333335 - #ifdef NON_MATCHING // Non-matching: scheduling void xCutscene_Init(void* toc) @@ -54,7 +53,6 @@ void xCutscene_Init(void* toc) } #endif - #if 0 // Damn RwEngineInstance ruining this (as well as the members being accessed incorrectly by Ghidra) xCutscene* xCutscene_Create(uint32 id) @@ -98,7 +96,6 @@ xCutscene* xCutscene_Create(uint32 id) } #endif - #if 0 // WIP int32 xCutscene_Destroy(xCutscene* csn) @@ -144,7 +141,6 @@ int32 xCutscene_Destroy(xCutscene* csn) } #endif - int32 xCutscene_LoadStart(xCutscene* csn) { uint32 cnt; @@ -160,7 +156,6 @@ int32 xCutscene_LoadStart(xCutscene* csn) return 1; } - #if 0 // WIP float32 xCutsceneConvertBreak(float param_1, xCutsceneBreak* param_2, uint32 param_3, int param_4) @@ -195,34 +190,6 @@ float32 xCutsceneConvertBreak(float param_1, xCutsceneBreak* param_2, uint32 par } #endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - xCutscene* xCutscene_CurrentCutscene() { return &sActiveCutscene; diff --git a/src/SB/Core/x/xDebug.cpp b/src/SB/Core/x/xDebug.cpp index 959eff29..6bdc1289 100644 --- a/src/SB/Core/x/xDebug.cpp +++ b/src/SB/Core/x/xDebug.cpp @@ -41,9 +41,6 @@ void xtextbox::render(bool cache) const render(temp_layout(cache), 0, -1); } - - - #if 0 // WIP. xfont& xfont::operator=(const xfont& other) @@ -75,12 +72,6 @@ xfont& xfont::operator=(const xfont& other) #endif - - - - - - float32 NSCREENY(float32 scale) { return _781 * scale; diff --git a/src/SB/Core/x/xDecal.cpp b/src/SB/Core/x/xDecal.cpp index 93899717..34b814d4 100644 --- a/src/SB/Core/x/xDecal.cpp +++ b/src/SB/Core/x/xDecal.cpp @@ -5,10 +5,6 @@ //Doesn't OK if you use it from header, so assuming it's global. extern uint32 active_emitters_size; - - - - void xDecalInit() { active_emitters_size = 0; diff --git a/src/SB/Core/x/xDecal.h b/src/SB/Core/x/xDecal.h index f793c467..8401b958 100644 --- a/src/SB/Core/x/xDecal.h +++ b/src/SB/Core/x/xDecal.h @@ -69,11 +69,11 @@ struct xDecalEmitter uint32 curve_index; float32 ilife; - void set_curve(const curve_node* curve, ulong32 size); - void refresh_config(); - void set_texture(const int8* name); - void set_default_config(); - void init(int32 max_size, const int8*); + void set_curve(const curve_node* curve, ulong32 size); + void refresh_config(); + void set_texture(const int8* name); + void set_default_config(); + void init(int32 max_size, const int8*); }; void xDecalInit(); diff --git a/src/SB/Core/x/xEntBoulder.cpp b/src/SB/Core/x/xEntBoulder.cpp index 9e0e9fcc..465acbf5 100644 --- a/src/SB/Core/x/xEntBoulder.cpp +++ b/src/SB/Core/x/xEntBoulder.cpp @@ -4,25 +4,11 @@ #include - - - - - - - void xEntBoulder_Init(void* ent, void* asset) { xEntBoulder_Init((xEntBoulder*)ent, (xEntAsset*)asset); } - - - - - - - void xEntBoulder_AddInstantForce(xEntBoulder* ent, xVec3* force) { if (ent->update != 0) @@ -32,7 +18,6 @@ void xEntBoulder_AddInstantForce(xEntBoulder* ent, xVec3* force) } } - void xEntBoulder_AddForce(xEntBoulder* ent, xVec3* force) { if (ent->update != 0) @@ -42,69 +27,11 @@ void xEntBoulder_AddForce(xEntBoulder* ent, xVec3* force) } } - void xEntBoulder_BUpdate() { //For some reason this seems to be a completely empty function } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Core/x/xEntMotion.cpp b/src/SB/Core/x/xEntMotion.cpp index fd09e033..c21b629d 100644 --- a/src/SB/Core/x/xEntMotion.cpp +++ b/src/SB/Core/x/xEntMotion.cpp @@ -2,78 +2,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Core/x/xFFX.cpp b/src/SB/Core/x/xFFX.cpp index 8607e76f..2241fca0 100644 --- a/src/SB/Core/x/xFFX.cpp +++ b/src/SB/Core/x/xFFX.cpp @@ -10,9 +10,6 @@ extern uint32 rot_match_psize; extern xFFXRotMatchState* rot_match_pool; extern xFFXRotMatchState* rot_match_alist; - - - // Structure same as the bottom function, get that one, you get this one. //void xFFXPoolInit(uint32 num_ffx); @@ -120,12 +117,6 @@ void xFFXApply(xEnt* ent, xScene* sc, float32 dt) } } - - - - - - // The structure of this is identical to the pool init below. Figure out that one, you get this one as well. //void xFFXShakePoolInit(uint32 num); diff --git a/src/SB/Core/x/xFX.cpp b/src/SB/Core/x/xFX.cpp index e2321029..b41efb29 100644 --- a/src/SB/Core/x/xFX.cpp +++ b/src/SB/Core/x/xFX.cpp @@ -79,7 +79,6 @@ static void DrawRingSceneExit() #if 1 static void DrawRing(xFXRing* m); - #else static void DrawRing(xFXRing* m) { @@ -383,12 +382,6 @@ static RpAtomic* AtomicSetShininess(RpAtomic* atomic, void* data) return atomic; } - - - - - - struct xFXBubbleParams { uint32 pass1 : 1; @@ -419,28 +412,10 @@ static xFXBubbleParams defaultBFX = { static uint32 bfx_curr = 0; static xFXBubbleParams* BFX = &defaultBFX; - - - static uint32 sFresnelMap = 0; static uint32 sEnvMap = 0; static int32 sTweaked = 0; - - - - - - - - - - - - - - - static RxPipeline* xFXanimUVPipeline = NULL; float32 xFXanimUVRotMat0[2] = { 1.0f, 0.0f }; float32 xFXanimUVRotMat1[2] = { 0.0f, 1.0f }; @@ -452,36 +427,6 @@ float32 xFXanimUV2PTrans[2] = { 0.0f, 0.0f }; float32 xFXanimUV2PScale[2] = { 1.0f, 1.0f }; RwTexture* xFXanimUV2PTexture = NULL; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - namespace { #define ALPHA_COUNT 300 @@ -490,18 +435,6 @@ namespace uint8 alpha_count1[ALPHA_COUNT]; } // namespace - - - - - - - - - - - - // clip_triangle jumptable static uint32 _1933[] = { 0x80028610, 0x80028640, 0x80028640, 0x80028640, 0x80028640, 0x80028640, 0x80028640, 0x80028620, 0x80028640, 0x80028640, 0x80028640, 0x80028640, @@ -510,49 +443,10 @@ static uint32 _1933[] = { 0x80028610, 0x80028640, 0x80028640, 0x80028640, 0x8002 0x80028640, 0x80028640, 0x80028640, 0x80028640, 0x80028620, 0x80028640, 0x80028640, 0x80028640, 0x80028640, 0x80028640, 0x80028640, 0x80028610 }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static const uint8 segments_1637[43] = { 0, 1, 3, 0, 1, 2, 4, 0, 3, 4, 3, 0, 0, 0, 0, 0, 1, 2, 4, 0, 2, 1, 2, 0, 4, 2, 1, 0, 0, 0, 0, 0, 3, 4, 3, 0, 4, 2, 1, 0, 3, 1, 0 }; - - - struct _tagFirework { int32 state; @@ -571,49 +465,10 @@ static zParEmitter* sFirework2Emit = NULL; static uint32 sFireworkSoundID = 0; static uint32 sFireworkLaunchSoundID = 0; - - - - - - - - - static RwIm3DVertex sStripVert_2188[4]; - - - - - - - - - - - - - - - - - - - - - - - - static RwIm3DVertex blah_2485[4]; - - - - - - namespace { #define RIBBON_COUNT 64 @@ -623,90 +478,6 @@ namespace bool ribbons_dirty = false; } // namespace - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - struct _xFXAuraAngle { float32 angle; @@ -732,186 +503,6 @@ static _xFXAuraAngle sAuraAngle[2]; static RwTexture* gAuraTex = NULL; static _xFXAura sAura[AURA_COUNT]; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - __declspec(section ".rodata") static const char _stringBase0_7[] = "bubble buddy\0" "bubble missile\0" "bubble helmet\0" diff --git a/src/SB/Core/x/xFont.cpp b/src/SB/Core/x/xFont.cpp index f000fe8a..0e4a3429 100644 --- a/src/SB/Core/x/xFont.cpp +++ b/src/SB/Core/x/xFont.cpp @@ -1247,7 +1247,6 @@ namespace #if 1 - #else xtextbox::layout& xtextbox::temp_layout(bool cache) const { @@ -1319,8 +1318,6 @@ xtextbox::callback xtextbox::text_cb = { xtextbox::text_render, NULL, NULL }; static substr arg_buffer_1611[32]; static xtextbox::tag_entry entry_buffer_1612[16]; - - #else xtextbox::tag_entry_list xtextbox::read_tag(const substr& s) { diff --git a/src/SB/Core/x/xGrid.cpp b/src/SB/Core/x/xGrid.cpp index 717e5aad..719d2011 100644 --- a/src/SB/Core/x/xGrid.cpp +++ b/src/SB/Core/x/xGrid.cpp @@ -10,7 +10,6 @@ extern float xGrid_float_0p001; extern float xGrid_float_one; extern float xGrid_float_one_quarter; - void xGridBoundInit(xGridBound* bound, void* data) { bound->data = data; @@ -23,7 +22,6 @@ void xGridBoundInit(xGridBound* bound, void* data) bound->gpad = 0xea; } - #ifdef NON_MATCHING // Usual floating point problems, floating point loads get pulled to the start. // Also, there's something funny going on with the malloc + memset at the end, @@ -68,14 +66,12 @@ void xGridInit(xGrid* grid, xBox* bounds, uint16 nx, uint16 nz, uint8 ingrid_id) } #endif - void xGridKill(xGrid* grid) { xGridEmpty(grid); grid->cells = NULL; } - void xGridEmpty(xGrid* grid) { for (int32 x = 0; x < grid->nx; ++x) @@ -104,7 +100,6 @@ void xGridEmpty(xGrid* grid) grid->other = NULL; } - bool xGridAddToCell(xGridBound** boundList, xGridBound* bound) { if (bound->head) @@ -128,16 +123,11 @@ bool xGridAddToCell(xGridBound** boundList, xGridBound* bound) return true; } - void xGridAdd(xGrid* grid, xGridBound* bound, int32 x, int32 z) { xGridAddToCell(&grid->cells[z * grid->nx] + x, bound); } - - - - int32 xGridRemove(xGridBound* bound) { if (bound->head) @@ -169,7 +159,6 @@ int32 xGridRemove(xGridBound* bound) return 1; } - void xGridUpdate(xGrid* grid, xEnt* ent) { int32 dx; @@ -185,7 +174,6 @@ void xGridUpdate(xGrid* grid, xEnt* ent) } } - xGridBound** xGridGetCell(xGrid* grid, const xEnt* ent, int32& grx, int32& grz) { const xBound* bound = &ent->bound; @@ -211,7 +199,6 @@ xGridBound** xGridGetCell(xGrid* grid, const xEnt* ent, int32& grx, int32& grz) return &grid->cells[grz * grid->nx] + grx; } - #ifdef NON_MATCHING void xGridGetCell(xGrid* grid, float32 x, float32 y, float32 z, int32& grx, int32& grz) { @@ -223,7 +210,6 @@ void xGridGetCell(xGrid* grid, float32 x, float32 y, float32 z, int32& grx, int3 } #endif - xGridBound* xGridIterFirstCell(xGrid* grid, float32 posx, float32 posy, float32 posz, int32& grx, int32& grz, xGridIterator& iter) { diff --git a/src/SB/Core/x/xGroup.cpp b/src/SB/Core/x/xGroup.cpp index 67beed5b..be7f0a49 100644 --- a/src/SB/Core/x/xGroup.cpp +++ b/src/SB/Core/x/xGroup.cpp @@ -21,8 +21,8 @@ void xGroupInit(xBase* b, xGroupAsset* asset) if (b->linkCount) { // Seek to then end of the xGroupAsset header and then seek to the end of the subsequent array of IDs - b->link = (xLinkAsset*)((uint8*)(t->asset) + sizeof(xGroupAsset) - + asset->itemCount * sizeof(uint32)); + b->link = (xLinkAsset*)((uint8*)(t->asset) + sizeof(xGroupAsset) + + asset->itemCount * sizeof(uint32)); } else { @@ -99,76 +99,76 @@ int32 xGroupEventCB(xBase* to, xBase* from, uint32 toEvent, const float32* toPar else if (g->asset->groupFlags & 2) { index = g->last_index; - g->last_index = (g->last_index+1) % g->asset->itemCount; + g->last_index = (g->last_index + 1) % g->asset->itemCount; } switch (toEvent) { - case eEventFastVisible: - for(int32 i = 0; i < g->asset->itemCount; i++) + case eEventFastVisible: + for (int32 i = 0; i < g->asset->itemCount; i++) + { + if (!(index == -1 || index == i)) + { + continue; + } + + xBase* b = g->item[i]; + if (!b) + { + continue; + } + + if (b->baseFlags & 0x20) + { + xEntShow((xEnt*)b); + } + else + { + zEntEvent(b, toEvent, toParam, toParamWidget); + } + } + return 1; + case eEventFastInvisible: + for (int32 i = 0; i < g->asset->itemCount; i++) + { + if (!(index == -1 || index == i)) { - if(!(index == -1 || index == i)) - { - continue; - } - - xBase* b = g->item[i]; - if(!b) - { - continue; - } - - if(b->baseFlags & 0x20) - { - xEntShow((xEnt*)b); - } - else - { - zEntEvent(b, toEvent, toParam, toParamWidget); - } + continue; } - return 1; - case eEventFastInvisible: - for(int32 i = 0; i < g->asset->itemCount; i++) + + xBase* b = g->item[i]; + if (!b) + { + continue; + } + + if (b->baseFlags & 0x20) { - if(!(index == -1 || index == i)) - { - continue; - } - - xBase* b = g->item[i]; - if(!b) - { - continue; - } - - if(b->baseFlags & 0x20) - { - xEntHide((xEnt*)b); - } - else - { - zEntEvent(b, toEvent, toParam, toParamWidget); - } + xEntHide((xEnt*)b); } - return 1; - default: - for(int32 i = 0; i < g->asset->itemCount; i++) + else { - if(!(index == -1 || index == i)) - { - continue; - } - - xBase* b = g->item[i]; - if(!b) - { - continue; - } - zEntEvent(b, toEvent, toParam, toParamWidget); } - return 1; + } + return 1; + default: + for (int32 i = 0; i < g->asset->itemCount; i++) + { + if (!(index == -1 || index == i)) + { + continue; + } + + xBase* b = g->item[i]; + if (!b) + { + continue; + } + + zEntEvent(b, toEvent, toParam, toParamWidget); + } + return 1; } // Note (Square): This is unreachable. No idea what the default return was meant to bel @@ -207,7 +207,7 @@ uint32 xGroup::get_any() { return NULL; } - + uint32 last = ((uint32*)((uint8*)this->asset + sizeof(xGroupAsset)))[this->last_index]; uint32 cnt = this->last_index + 1; this->last_index = cnt % numItems; diff --git a/src/SB/Core/x/xHudModel.cpp b/src/SB/Core/x/xHudModel.cpp index f52b2144..553de8e1 100644 --- a/src/SB/Core/x/xHudModel.cpp +++ b/src/SB/Core/x/xHudModel.cpp @@ -19,30 +19,6 @@ xAnimTable* XHUD_AnimTable_Idle() #endif - - - - - - - - - - - - - - - - - - - - - - - - #if 0 // Works except for the string label offset. char* xhud::model_asset::type_name() diff --git a/src/SB/Core/x/xIni.cpp b/src/SB/Core/x/xIni.cpp index fa480062..3aa30b68 100644 --- a/src/SB/Core/x/xIni.cpp +++ b/src/SB/Core/x/xIni.cpp @@ -3,21 +3,6 @@ #include #include - - - - - - - - - - - - - - - int32 xIniGetInt(xIniFile* ini, int8* tok, int32 def) { int32 index = xIniGetIndex(ini, tok); diff --git a/src/SB/Core/x/xJSP.cpp b/src/SB/Core/x/xJSP.cpp index c978931c..d0448d29 100644 --- a/src/SB/Core/x/xJSP.cpp +++ b/src/SB/Core/x/xJSP.cpp @@ -21,7 +21,6 @@ RpAtomic* CountAtomicCB(RpAtomic* atomic, uint32* param_2) return atomic; } - #if 0 RpMesh* AddMeshCB(RpMesh* mesh, RpMeshHeader* header, RwV3d** param_3) { @@ -43,7 +42,6 @@ RpMesh* AddMeshCB(RpMesh* mesh, RpMeshHeader* header, RwV3d** param_3) } #endif - #if 0 // ¯\_(ツ)_/¯ RpAtomic* AddAtomicCB(RpAtomic* atomic, void* data) @@ -58,7 +56,6 @@ RpAtomic* AddAtomicCB(RpAtomic* atomic, void* data) } #endif - #if 0 // not in dwarf data // ¯\_(ツ)_/¯ diff --git a/src/SB/Core/x/xLaserBolt.cpp b/src/SB/Core/x/xLaserBolt.cpp index f106862d..76ce7ccb 100644 --- a/src/SB/Core/x/xLaserBolt.cpp +++ b/src/SB/Core/x/xLaserBolt.cpp @@ -9,9 +9,6 @@ extern tagiRenderInput gRenderBuffer; extern float32 lbl_803CF7A4; // 0.0f extern float32 lbl_803CF7A8; // 255f - - - void xLaserBoltEmitter::set_texture(char* name) { set_texture(xStrHash(name)); @@ -39,9 +36,6 @@ void xLaserBoltEmitter::set_texture(RwRaster* raster) this->bolt_raster = raster; } - - - void xLaserBoltEmitter::refresh_config() { float32 alpha; @@ -56,15 +50,6 @@ void xLaserBoltEmitter::refresh_config() this->ialpha = alpha; } - - - - - - - - - #if 0 // WIP. @@ -75,24 +60,12 @@ void xLaserBoltEmitter::attach_effects(fx_when_enum when, effect_data* fx, size_ #endif - - - - - - - - - RxObjSpace3DVertex* xLaserBoltEmitter::get_vert_buffer(int32& dat) { dat = (uint32)0x1e0; return gRenderBuffer.m_vertex; } - - - #if 0 // WIP. @@ -103,129 +76,3 @@ void xLaserBoltEmitter::reset_fx(fx_when_enum when) } #endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Core/x/xLightKit.cpp b/src/SB/Core/x/xLightKit.cpp index 9aaad54e..f74c465b 100644 --- a/src/SB/Core/x/xLightKit.cpp +++ b/src/SB/Core/x/xLightKit.cpp @@ -11,7 +11,6 @@ extern int32 iModelHack_DisablePrelight; float32 MAX_COLOR = 1.0f; #endif - #ifdef NON_MATCHING // Will match once able to use float literals xLightKit* xLightKit_Prepare(void* data) @@ -96,7 +95,6 @@ xLightKit* xLightKit_Prepare(void* data) } #endif - void xLightKit_Enable(xLightKit* lkit, RpWorld* world) { if (lkit != gLastLightKit) @@ -125,13 +123,11 @@ void xLightKit_Enable(xLightKit* lkit, RpWorld* world) } } - xLightKit* xLightKit_GetCurrent(RpWorld* world) { return gLastLightKit; } - void xLightKit_Destroy(xLightKit* lkit) { if (lkit == NULL) diff --git a/src/SB/Core/x/xMath.cpp b/src/SB/Core/x/xMath.cpp index 547a9366..670861b5 100644 --- a/src/SB/Core/x/xMath.cpp +++ b/src/SB/Core/x/xMath.cpp @@ -109,9 +109,6 @@ uint32 xMathSolveQuadratic(float32 a, float32 b, float32 c, float32* x1, float32 } #endif - - - float32 xAngleClamp(float32 a) { float32 b; @@ -160,9 +157,6 @@ float32 xDangleClamp(float32 a) return b; } - - - #ifdef NON_MATCHING float32 xAccelMoveTime(float32 dx, float32 a, float32, float32 maxv) { diff --git a/src/SB/Core/x/xMemMgr.cpp b/src/SB/Core/x/xMemMgr.cpp index 834ef7ca..acf9ec76 100644 --- a/src/SB/Core/x/xMemMgr.cpp +++ b/src/SB/Core/x/xMemMgr.cpp @@ -11,12 +11,10 @@ extern xMemInfo_tag gMemInfo; extern xMemHeap_tag gxHeap[3]; extern void (*sMemBaseNotifyFunc)(); - void xMemDebug_SoakLog(const int8*) { } - #ifdef NON_MATCHING // The instructions putting 0/1/2 into registers happen in the wrong order. void xMemInit() @@ -35,13 +33,11 @@ void xMemInit() } #endif - void xMemExit() { iMemExit(); } - void xMemInitHeap(xMemHeap_tag* heap, uint32 base, uint32 size, uint32 flags) { uint32 old_base = base; @@ -81,7 +77,6 @@ void xMemInitHeap(xMemHeap_tag* heap, uint32 base, uint32 size, uint32 flags) heap->opp_heap[1] = -1; } - #if 0 // Not particularly close. This function is a nightmare, it has so many // variables to untangle. @@ -136,7 +131,6 @@ void xMemGetBlockInfo(xMemHeap_tag* heap, uint32 size, int32 align, xMemBlkInfo_ } #endif - #if 0 // Not particularly close. Not 100% confident that I understand what's going on, // in particular the bit that goes: @@ -178,7 +172,6 @@ void* xMemGrowAlloc(uint32 heapID, uint32 size) } #endif - // void* xMemAlloc(uint32 heapID, uint32 size, int32 align) { @@ -230,19 +223,16 @@ void* xMemAlloc(uint32 heapID, uint32 size, int32 align) return (void*)hdr->addr; } - void* xMemPushTemp(uint32 size) { return RwMalloc(size); } - void xMemPopTemp(void* memory) { RwFree(memory); } - int32 xMemPushBase(uint32 heapID) { xMemHeap_tag* heap = &gxHeap[heapID]; @@ -258,13 +248,11 @@ int32 xMemPushBase(uint32 heapID) return heap->state_idx - 1; } - int32 xMemPushBase() { return xMemPushBase(gActiveHeap); } - #ifdef NON_MATCHING // Load/Store swap of sMemBaseNotifyFunc and state_idx int32 xMemPopBase(uint32 heapID, int32 depth) @@ -285,31 +273,26 @@ int32 xMemPopBase(uint32 heapID, int32 depth) } #endif - int32 xMemPopBase(int32 depth) { return xMemPopBase(gActiveHeap, depth); } - int32 xMemGetBase(uint32 heapID) { return gxHeap[heapID].state_idx; } - void xMemRegisterBaseNotifyFunc(void (*func)()) { sMemBaseNotifyFunc = func; } - int32 xMemGetBase() { return xMemGetBase(gActiveHeap); } - void xMemPoolAddElements(xMemPool* pool, void* buffer, uint32 count) { int32 i; @@ -342,8 +325,6 @@ void xMemPoolAddElements(xMemPool* pool, void* buffer, uint32 count) pool->Total += count; } - - void xMemPoolSetup(xMemPool* pool, void* buffer, uint32 nextOffset, uint32 flags, xMemPoolInitCB initCB, uint32 size, uint32 count, uint32 numRealloc) { @@ -359,7 +340,6 @@ void xMemPoolSetup(xMemPool* pool, void* buffer, uint32 nextOffset, uint32 flags xMemPoolAddElements(pool, buffer, count); } - void* xMemPoolAlloc(xMemPool* pool) { void* retval = pool->FreeList; @@ -383,7 +363,6 @@ void* xMemPoolAlloc(xMemPool* pool) return retval; } - void xMemPoolFree(xMemPool* pool, void* data) { void** prev; diff --git a/src/SB/Core/x/xModel.cpp b/src/SB/Core/x/xModel.cpp index 0bb457ad..8fa92b06 100644 --- a/src/SB/Core/x/xModel.cpp +++ b/src/SB/Core/x/xModel.cpp @@ -1,52 +1,3 @@ #include "xModel.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Core/x/xModelBucket.cpp b/src/SB/Core/x/xModelBucket.cpp index a3f4d436..60dba9d1 100644 --- a/src/SB/Core/x/xModelBucket.cpp +++ b/src/SB/Core/x/xModelBucket.cpp @@ -57,9 +57,6 @@ void xModelBucket_PreCountReset() sAlphaList = NULL; } - - - #if 0 // Idk. void xModelBucket_PreCountAlloc(int32 maxAlphaModels) @@ -83,12 +80,6 @@ void xModelBucket_PreCountAlloc(int32 maxAlphaModels) #endif - - - - - - void xModelBucket_Init() { if (sBucketDummyCamera != NULL) @@ -101,9 +92,6 @@ void xModelBucket_Init() } } - - - void xModelBucket_Begin() { for (int32 i = 0; i < sBucketCount; i++) @@ -113,12 +101,6 @@ void xModelBucket_Begin() xModelBucketEnabled = 1; } - - - - - - #if 0 // Scheduling! void xModelBucket_RenderAlphaBegin() diff --git a/src/SB/Core/x/xMovePoint.cpp b/src/SB/Core/x/xMovePoint.cpp index edeae4f7..96930c94 100644 --- a/src/SB/Core/x/xMovePoint.cpp +++ b/src/SB/Core/x/xMovePoint.cpp @@ -8,7 +8,6 @@ float32 xVec3Hdng(xVec3* a, const xVec3* b, const xVec3* c); - void xMovePointInit(xMovePoint* ent, xMovePointAsset* asset) { xBaseInit(ent, asset); @@ -30,19 +29,16 @@ void xMovePointInit(xMovePoint* ent, xMovePointAsset* asset) } } - void xMovePointSave(xMovePoint* ent, xSerial* s) { xBaseSave(ent, s); } - void xMovePointLoad(xMovePoint* ent, xSerial* s) { xBaseLoad(ent, s); } - void xMovePointReset(xMovePoint* m) { xBaseReset(m, m->asset); @@ -51,7 +47,6 @@ void xMovePointReset(xMovePoint* m) m->delay = m->asset->delay; } - void xMovePointSetup(xMovePoint* m, xScene* sc) { m->node_wt_sum = 0; @@ -65,10 +60,6 @@ void xMovePointSetup(xMovePoint* m, xScene* sc) } } - - - - void xMovePointSplineDestroy(xMovePoint* m) { if (m->spl != NULL) @@ -77,7 +68,6 @@ void xMovePointSplineDestroy(xMovePoint* m) } } - #if 0 // If you uncomment the numPoints variable then this function is a perfect match // minus ordering. In the original assembly some variable fetches are lifted to @@ -148,7 +138,6 @@ float32 xMovePointGetNext(xMovePoint* m, xMovePoint* prev, xMovePoint** next, xV } #endif - xVec3* xMovePointGetPos(xMovePoint* m) { return m->pos; diff --git a/src/SB/Core/x/xNPCBasic.cpp b/src/SB/Core/x/xNPCBasic.cpp index a323c219..cbcfad2a 100644 --- a/src/SB/Core/x/xNPCBasic.cpp +++ b/src/SB/Core/x/xNPCBasic.cpp @@ -45,7 +45,6 @@ void NPC_entwrap_bupdate(xEnt*, xVec3*); void NPC_entwrap_move(xEnt*, xScene*, float32, xEntFrame*); void NPC_entwrap_render(xEnt*); - #ifdef NON_MATCHING // The order of the function pointer assignment instructions at the end of the @@ -110,7 +109,6 @@ void xNPCBasic::Init(xEntAsset* asset) } #endif - #ifndef NOT_MATCHING #else @@ -143,7 +141,6 @@ void xNPCBasic::Reset() } #endif - void NPC_alwaysUseSphere(xEnt* ent, xVec3* value) { xNPCBasic* npc = (xNPCBasic*)ent; @@ -168,7 +165,6 @@ void NPC_alwaysUseSphere(xEnt* ent, xVec3* value) } } - void NPC_spdBasedColFreq(xNPCBasic* npc, float32 dt) { if (dt < xNPCBasic_float_1eminus5) @@ -196,7 +192,6 @@ void NPC_spdBasedColFreq(xNPCBasic* npc, float32 dt) npc->colFreq = MIN(npc->colFreq, nf); } - void xNPCBasic::Process(xScene* xscn, float32 dt) { xEnt* thisEnt = this; @@ -295,7 +290,6 @@ void xNPCBasic::Process(xScene* xscn, float32 dt) } } - void xNPCBasic::CollideReview() { if (DBG_IsNormLog(eNPCDCAT_Eight, 2)) @@ -305,13 +299,11 @@ void xNPCBasic::CollideReview() } } - void xNPCBasic::NewTime(xScene*, float32) { flags1.flg_basenpc &= ~0x4; } - void NPC_entwrap_setup(xEnt* ent) { xNPCBasic* npc = (xNPCBasic*)ent; @@ -319,7 +311,6 @@ void NPC_entwrap_setup(xEnt* ent) npc->Setup(); } - void NPC_entwrap_reset(xEnt* ent) { xNPCBasic* npc = (xNPCBasic*)ent; @@ -327,7 +318,6 @@ void NPC_entwrap_reset(xEnt* ent) npc->Reset(); } - void NPC_entwrap_update(xEnt* ent, xScene* scn, float32 dt_caller) { float32 dt = dt_caller; @@ -360,19 +350,16 @@ void NPC_entwrap_update(xEnt* ent, xScene* scn, float32 dt_caller) npc->NewTime(scn, dt); } - void NPC_entwrap_bupdate(xEnt* ent, xVec3* pos) { ((xNPCBasic*)ent)->BUpdate(pos); } - void NPC_entwrap_move(xEnt* ent, xScene* scn, float32 dt, xEntFrame* frame) { ((xNPCBasic*)ent)->Move(scn, dt, frame); } - int32 NPC_entwrap_event(xBase* from, xBase* to, uint32 toEvent, const float32* toParam, xBase* toParamWidget) { @@ -380,23 +367,19 @@ int32 NPC_entwrap_event(xBase* from, xBase* to, uint32 toEvent, const float32* t return ((xNPCBasic*)to)->SysEvent(from, to, toEvent, toParam, toParamWidget, &handled); } - void NPC_entwrap_render(xEnt* ent) { ((xNPCBasic*)ent)->Render(); } - void xNPCBasic::DBG_PStatClear() { } - void xNPCBasic::DBG_HaltOnMe(uint32, int8*) { } - void xNPCBasic::BUpdate(xVec3* v) { xEntDefaultBoundUpdate(this, v); diff --git a/src/SB/Core/x/xPad.cpp b/src/SB/Core/x/xPad.cpp index c99fffb3..771ec84d 100644 --- a/src/SB/Core/x/xPad.cpp +++ b/src/SB/Core/x/xPad.cpp @@ -54,12 +54,6 @@ void xPadRumbleEnable(int32 idx, int32 enable) } } - - - - - - void xPadKill() { iPadKill(); diff --git a/src/SB/Core/x/xParEmitter.cpp b/src/SB/Core/x/xParEmitter.cpp index be7a9021..debde9e6 100644 --- a/src/SB/Core/x/xParEmitter.cpp +++ b/src/SB/Core/x/xParEmitter.cpp @@ -1,28 +1,3 @@ #include "xParEmitter.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Core/x/xParEmitterType.cpp b/src/SB/Core/x/xParEmitterType.cpp index f4daeb7e..ffabd89e 100644 --- a/src/SB/Core/x/xParEmitterType.cpp +++ b/src/SB/Core/x/xParEmitterType.cpp @@ -2,111 +2,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Core/x/xPartition.cpp b/src/SB/Core/x/xPartition.cpp index 2766a91e..858476bb 100644 --- a/src/SB/Core/x/xPartition.cpp +++ b/src/SB/Core/x/xPartition.cpp @@ -39,19 +39,3 @@ int32 xPartitionGetTrueIdx(_tagPartition* part, int32 x_spaces, int32 y_spaces, } #endif - - - - - - - - - - - - - - - - diff --git a/src/SB/Core/x/xPartition.h b/src/SB/Core/x/xPartition.h index 94357e13..17de7e29 100644 --- a/src/SB/Core/x/xPartition.h +++ b/src/SB/Core/x/xPartition.h @@ -35,8 +35,10 @@ _tagPartLink* PartitionGetFreeLink(); void PartitionSpaceReset(_tagPartSpace* space); void PartitionSpaceInsert(_tagPartSpace* space, void* data); int32 xPartitionGetTrueIdx(_tagPartition* part, int32 x_spaces, int32 y_spaces, int32 z_spaces); -void xPartitionWorld(_tagPartition* part, xEnv* env, int32 x_spaces, int32 y_spaces, int32 z_spaces); -void xPartitionVolume(_tagPartition* part, xVolume* volume, int32 x_spaces, int32 y_spaces, int32 z_spaces); +void xPartitionWorld(_tagPartition* part, xEnv* env, int32 x_spaces, int32 y_spaces, + int32 z_spaces); +void xPartitionVolume(_tagPartition* part, xVolume* volume, int32 x_spaces, int32 y_spaces, + int32 z_spaces); void xPartitionDump(_tagPartition* part, char* string); int32 xPartitionUpdate(_tagPartition* part, void* data, int32 old_idx, xVec3* current_pos); int32 xPartitionInsert(_tagPartition* part, void* insert_data, xVec3* insert_pos); diff --git a/src/SB/Core/x/xPtankPool.cpp b/src/SB/Core/x/xPtankPool.cpp index 846d70d5..df352bbd 100644 --- a/src/SB/Core/x/xPtankPool.cpp +++ b/src/SB/Core/x/xPtankPool.cpp @@ -1,37 +1,3 @@ #include "xPtankPool.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Core/x/xQuickCull.cpp b/src/SB/Core/x/xQuickCull.cpp index 3f551328..26b98d9a 100644 --- a/src/SB/Core/x/xQuickCull.cpp +++ b/src/SB/Core/x/xQuickCull.cpp @@ -48,31 +48,3 @@ int32 xQuickCullIsects(const xQCData* a, const xQCData* b) } #endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Core/x/xSFX.cpp b/src/SB/Core/x/xSFX.cpp index 51dd514e..7a440ac2 100644 --- a/src/SB/Core/x/xSFX.cpp +++ b/src/SB/Core/x/xSFX.cpp @@ -8,16 +8,11 @@ extern xSFX* s_managedEnvSFX[1]; - void xSFXEnvironmentalStreamSceneExit(void) { memset(&s_managedEnvSFX, 0, 4); } - - - - #ifdef NON_MATCHING int32 xSFXWillSendDone(xSFX* param_1) { @@ -36,14 +31,12 @@ int32 xSFXWillSendDone(xSFX* param_1) } #endif - void xSFXInit(void* t, void* asset) { xSFXInit((xSFX*)t, (xSFXAsset*)asset); } - #ifdef NON_MATCHING void xSFXInit(xSFX* t, xSFXAsset* asset) { @@ -71,25 +64,21 @@ void xSFXInit(xSFX* t, xSFXAsset* asset) } #endif - void xSFXSave(xSFX* ent, xSerial* s) { xBaseSave(ent, s); } - void xSFXLoad(xSFX* ent, xSerial* s) { xBaseLoad(ent, s); } - void xSFXReset(xSFX* param_1) { xBaseReset(param_1, param_1->asset); } - #if 0 uint32 xSFXConvertFlags(uint32 param_1) { @@ -97,7 +86,6 @@ uint32 xSFXConvertFlags(uint32 param_1) } #endif - void xSFXUpdate(xSFX* param_1) { if ((param_1->asset->flagsSFX & 0x800) && (param_1->sndID) && @@ -109,13 +97,6 @@ void xSFXUpdate(xSFX* param_1) } } - - - - - - - void xSFXStop(xSFX* param_1) { xSndStop(param_1->sndID); diff --git a/src/SB/Core/x/xScene.cpp b/src/SB/Core/x/xScene.cpp index f23ba883..65d502ff 100644 --- a/src/SB/Core/x/xScene.cpp +++ b/src/SB/Core/x/xScene.cpp @@ -168,11 +168,6 @@ void xSceneForAllNPCs(xScene* sc, xSceneEntCallback func, void* data) } } - - - - - void xRayHitsTikiLandableEnt(xScene* sc, xRay3* r, xQCData* qcr, xEnt* ent, void* colldata) { xCollis* coll = (xCollis*)colldata; @@ -255,21 +250,11 @@ void xRayHitsEnt(xScene* sc, xRay3* r, xQCData* qcr, xEnt* ent, void* colldata) } } - - - - - - - - - cb_ray_hits_ent::cb_ray_hits_ent(const xRay3& ray, xCollis& coll, uint8 chkby, uint8 collType) : ray(ray), coll(coll), chkby(chkby), collType(collType) { } - void ProjectTriangle(xVec3* param_1, xVec3* param_2, float* param_3, float* param_4) { float fVar1; @@ -301,9 +286,8 @@ void ProjectTriangle(xVec3* param_1, xVec3* param_2, float* param_3, float* para return; } - #ifdef NON_MATCHING -// Float memes +// Float memes void ProjectBox(xVec3* param_1, xBox* param_2, float* param_3, float* param_4) { float32 fVar7 = lbl_803CCF78 * (param_1->x * ((param_2->upper).x + (param_2->lower).x) + @@ -317,19 +301,9 @@ void ProjectBox(xVec3* param_1, xBox* param_2, float* param_3, float* param_4) } #endif - - - static RpCollisionTriangle* nearestFloorCB(RpIntersection*, RpCollisionTriangle* collTriangle, float32, void* data); - - - - - - - static RpCollisionTriangle* sectorNearestFloorCB(RpIntersection* intersection, RpWorldSector*, RpCollisionTriangle* collTriangle, float32 distance, void* data) @@ -337,12 +311,6 @@ static RpCollisionTriangle* sectorNearestFloorCB(RpIntersection* intersection, R return nearestFloorCB(intersection, collTriangle, distance, data); } - - - - - - bool cb_ray_hits_ent::operator()(xEnt& ent, xGridBound& gridb) { xCollis c; @@ -395,22 +363,11 @@ bool cb_ray_hits_ent::operator()(xEnt& ent, xGridBound& gridb) return true; } - - - void xEntEnable(xEnt* ent) { xBaseEnable(ent); } - - - - - - - - template <> uint16 range_limit(uint16 v, uint16 minv, uint16 maxv) { if (v <= minv) diff --git a/src/SB/Core/x/xShadow.cpp b/src/SB/Core/x/xShadow.cpp index 7578a853..89280591 100644 --- a/src/SB/Core/x/xShadow.cpp +++ b/src/SB/Core/x/xShadow.cpp @@ -1,96 +1,3 @@ #include "xShadow.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Core/x/xShadowSimple.cpp b/src/SB/Core/x/xShadowSimple.cpp index fe9bc030..26c65aa3 100644 --- a/src/SB/Core/x/xShadowSimple.cpp +++ b/src/SB/Core/x/xShadowSimple.cpp @@ -2,46 +2,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Core/x/xSnd.cpp b/src/SB/Core/x/xSnd.cpp index e765ea44..08f8b50d 100644 --- a/src/SB/Core/x/xSnd.cpp +++ b/src/SB/Core/x/xSnd.cpp @@ -43,7 +43,6 @@ void xSndInit() } #endif - void xSndSceneInit() { gSnd.listenerMode = SND_LISTENER_MODE_PLAYER; @@ -89,20 +88,11 @@ void xSndResume() sDelayedPaused = 0; } - - - - - - void xSndSetCategoryVol(sound_category category, float32 vol) { gSnd.categoryVolFader[category] = vol; } - - - #ifdef NON_MATCHING void xSndDelayedInit() { @@ -115,13 +105,6 @@ void xSndDelayedInit() } #endif - - - - - - - void xSndCalculateListenerPosition() { xMat4x3* pMat; @@ -148,9 +131,6 @@ void xSndCalculateListenerPosition() } } - - - #ifdef NON_MATCHING void xSndInternalUpdateVoicePos(xSndVoiceInfo* pVoice) { @@ -204,7 +184,6 @@ void xSndInternalUpdateVoicePos(xSndVoiceInfo* pVoice) } #endif - void xSndUpdate() { xSndCalculateListenerPosition(); @@ -213,7 +192,6 @@ void xSndUpdate() iSndUpdate(); } - void xSndSetListenerData(sound_listener_type listenerType, const xMat4x3* matrix) { /* @@ -227,20 +205,17 @@ void xSndSetListenerData(sound_listener_type listenerType, const xMat4x3* matrix gSnd.listenerMat[i] = *matrix; } - void xSndSelectListenerMode(sound_listener_game_mode listenerGameMode) { gSnd.listenerMode = listenerGameMode; } - void xSndExit() { iSndExit(); reset_faders(); } - uint32 xSndPlay(uint32 id, float32 vol, float32 pitch, uint32 priority, uint32 flags, uint32 parentID, sound_category category, float32 delay) { @@ -248,17 +223,17 @@ uint32 xSndPlay(uint32 id, float32 vol, float32 pitch, uint32 priority, uint32 f category, delay); } - -uint32 xSndPlay3D(uint32 id, float32 vol, float32 pitch, uint32 priority, uint32 flags, xEnt* parent, - float32 innerRadius, float32 outerRadius, sound_category category, float32 delay) +uint32 xSndPlay3D(uint32 id, float32 vol, float32 pitch, uint32 priority, uint32 flags, + xEnt* parent, float32 innerRadius, float32 outerRadius, sound_category category, + float32 delay) { return xSndPlayInternal(id, vol, pitch, priority, flags, NULL, parent, NULL, innerRadius, outerRadius, category, delay); } - -uint32 xSndPlay3D(uint32 id, float32 vol, float32 pitch, uint32 priority, uint32 flags, const xVec3* pos, - float32 innerRadius, float32 outerRadius, sound_category category, float32 delay) +uint32 xSndPlay3D(uint32 id, float32 vol, float32 pitch, uint32 priority, uint32 flags, + const xVec3* pos, float32 innerRadius, float32 outerRadius, + sound_category category, float32 delay) { if (flags & 0x800) { @@ -272,17 +247,11 @@ uint32 xSndPlay3D(uint32 id, float32 vol, float32 pitch, uint32 priority, uint32 } } - - - - - void xSndStartStereo(uint32 id1, uint32 id2, float32 pitch) { iSndStartStereo(id1, id2, pitch); } - uint32 xSndIDIsPlaying(uint32 sndID) { xSndVoiceInfo* voice = gSnd.voice; @@ -296,13 +265,11 @@ uint32 xSndIDIsPlaying(uint32 sndID) return 0; } - void xSndStop(uint32 snd) { iSndStop(snd); } - void xSndParentDied(uint32 pid) { xSndVoiceInfo* voice = gSnd.voice; @@ -315,7 +282,6 @@ void xSndParentDied(uint32 pid) } } - void xSndStopChildren(uint32 pid) { uint32 i = 0; @@ -330,43 +296,20 @@ void xSndStopChildren(uint32 pid) } } - void xSndSetVol(uint32 snd, float32 vol) { iSndSetVol(snd, vol); } - void xSndSetPitch(uint32 snd, float32 pitch) { iSndSetPitch(snd, pitch); } - void xSndSetExternalCallback(void (*callback)(uint32)) { iSndSetExternalCallback(callback); } - - - - - - - - - - - - - - - - - - - - #if 0 // Subtle issue with the register use in the setup of the loop @@ -413,7 +356,6 @@ uint32 xSndCategoryGetsEffects(sound_category category) } #endif - float32 xSndGetVol(uint32 snd) { return iSndGetVol(snd); diff --git a/src/SB/Core/x/xSpline.cpp b/src/SB/Core/x/xSpline.cpp index cb96e538..86fa29bd 100644 --- a/src/SB/Core/x/xSpline.cpp +++ b/src/SB/Core/x/xSpline.cpp @@ -1,22 +1,3 @@ #include "xSpline.h" #include - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Core/x/xString.cpp b/src/SB/Core/x/xString.cpp index 62b4fe60..5ce72537 100644 --- a/src/SB/Core/x/xString.cpp +++ b/src/SB/Core/x/xString.cpp @@ -46,15 +46,6 @@ uint32 xStrHashCat(uint32 prefix, const int8* str) return hash; } - - - - - - - - - char* xStrupr(char* string) { char* p = string; @@ -69,12 +60,6 @@ char* xStrupr(char* string) return string; } - - - - - - // @unnamed@xString_cpp@::tolower(char) extern "C" { uint32 tolower__21_esc__2_unnamed_esc__2_xString_cpp_esc__2_Fc(uint32 param_1) diff --git a/src/SB/Core/x/xUpdateCull.cpp b/src/SB/Core/x/xUpdateCull.cpp index 442b6fdc..78c85f45 100644 --- a/src/SB/Core/x/xUpdateCull.cpp +++ b/src/SB/Core/x/xUpdateCull.cpp @@ -1,14 +1,3 @@ #include "xUpdateCull.h" #include - - - - - - - - - - - diff --git a/src/SB/Core/x/xpkrsvc.cpp b/src/SB/Core/x/xpkrsvc.cpp index a4f2d86d..367fe41a 100644 --- a/src/SB/Core/x/xpkrsvc.cpp +++ b/src/SB/Core/x/xpkrsvc.cpp @@ -23,7 +23,6 @@ volatile int32 g_memalloc_pair; volatile int32 g_memalloc_runtot; volatile int32 g_memalloc_runfree; - st_PACKER_READ_FUNCS* PKRGetReadFuncs(int32 apiver) { switch (apiver) @@ -49,7 +48,6 @@ int32 PKRStartup() } #endif - st_PACKER_READ_FUNCS& st_PACKER_READ_FUNCS::operator=(const st_PACKER_READ_FUNCS& other) { this->api_ver = other.api_ver; @@ -72,20 +70,17 @@ st_PACKER_READ_FUNCS& st_PACKER_READ_FUNCS::operator=(const st_PACKER_READ_FUNCS return *this; } - int32 PKRShutdown() { g_packinit--; return g_packinit; } - int32 PKRLoadStep(int32) { return PKR_LoadStep_Async(); } - st_PACKER_READ_DATA* PKR_ReadInit(void* userdata, int8* pkgfile, uint32 opts, int32* cltver, st_PACKER_ASSETTYPE* typelist) { @@ -154,7 +149,6 @@ st_PACKER_READ_DATA* PKR_ReadInit(void* userdata, int8* pkgfile, uint32 opts, in return pr; } - void PKR_ReadDone(st_PACKER_READ_DATA* pr) { int32 i; @@ -223,7 +217,6 @@ void PKR_ReadDone(st_PACKER_READ_DATA* pr) g_loadlock &= ~(1 << lockid); } - #ifdef NON_MATCHING // Incorrect (but equivalent) logic for comparing the loadflag int32 PKR_SetActive(st_PACKER_READ_DATA* pr, en_LAYER_TYPE layer) @@ -280,7 +273,6 @@ int32 PKR_SetActive(st_PACKER_READ_DATA* pr, en_LAYER_TYPE layer) } #endif - int32 PKR_parse_TOC(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { int32 done = 0; @@ -335,7 +327,6 @@ int32 PKR_parse_TOC(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) return done; } - int32 PKR_LoadStep_Async() { int32 rc; @@ -432,7 +423,6 @@ int32 PKR_LoadStep_Async() return rc; } - int8* PKR_LayerMemReserve(st_PACKER_READ_DATA* pr, st_PACKER_LTOC_NODE* layer) { int8* mem = NULL; @@ -461,7 +451,6 @@ int8* PKR_LayerMemReserve(st_PACKER_READ_DATA* pr, st_PACKER_LTOC_NODE* layer) return mem; } - void PKR_LayerMemRelease(st_PACKER_READ_DATA* pr, st_PACKER_LTOC_NODE* layer) { switch (PKR_layerLoadDest(layer->laytyp)) @@ -484,18 +473,15 @@ void PKR_LayerMemRelease(st_PACKER_READ_DATA* pr, st_PACKER_LTOC_NODE* layer) } } - void PKR_drv_guardLayer(st_PACKER_LTOC_NODE*) { } - int32 PKR_drv_guardVerify(st_PACKER_LTOC_NODE*) { return 1; } - en_PKR_LAYER_LOAD_DEST PKR_layerLoadDest(en_LAYER_TYPE layer) { switch (layer) @@ -520,7 +506,6 @@ en_PKR_LAYER_LOAD_DEST PKR_layerLoadDest(en_LAYER_TYPE layer) } } - int32 PKR_layerTypeNeedsXForm(en_LAYER_TYPE layer) { switch (layer) @@ -544,7 +529,6 @@ int32 PKR_layerTypeNeedsXForm(en_LAYER_TYPE layer) } } - #ifdef NON_MATCHING //Regalloc int32 PKR_findNextLayerToLoad(st_PACKER_READ_DATA** work_on_pkg, st_PACKER_LTOC_NODE** next_layer) @@ -600,7 +584,6 @@ int32 PKR_findNextLayerToLoad(st_PACKER_READ_DATA** work_on_pkg, st_PACKER_LTOC_ } #endif - #ifdef NON_MATCHING //Regalloc void PKR_updateLayerAssets(st_PACKER_LTOC_NODE* laynode) @@ -641,7 +624,6 @@ void PKR_updateLayerAssets(st_PACKER_LTOC_NODE* laynode) } #endif - void PKR_xformLayerAssets(st_PACKER_LTOC_NODE* laynode) { int32 i; @@ -668,8 +650,7 @@ void PKR_xformLayerAssets(st_PACKER_LTOC_NODE* laynode) } } - -// +// void PKR_xform_asset(st_PACKER_ATOC_NODE* assnode, int32 dumpable_layer) { if (!(assnode->infoflag & 4)) @@ -727,7 +708,6 @@ void PKR_xform_asset(st_PACKER_ATOC_NODE* assnode, int32 dumpable_layer) } } - void* PKR_FindAsset(st_PACKER_READ_DATA* pr, uint32 aid) { st_PACKER_ATOC_NODE* assnode = NULL; @@ -750,19 +730,16 @@ void* PKR_FindAsset(st_PACKER_READ_DATA* pr, uint32 aid) return NULL; } - int32 PKR_LoadLayer(st_PACKER_READ_DATA* pr, en_LAYER_TYPE layer) { return 0; } - void* PKR_LoadAsset(st_PACKER_READ_DATA* pr, uint32 aid, const int8*, void*) { return PKR_FindAsset(pr, aid); } - uint32 PKR_GetAssetSize(st_PACKER_READ_DATA* pr, uint32 aid) { st_PACKER_ATOC_NODE* assnode = NULL; @@ -784,7 +761,6 @@ uint32 PKR_GetAssetSize(st_PACKER_READ_DATA* pr, uint32 aid) return 0; } - int32 PKR_AssetCount(st_PACKER_READ_DATA* pr, uint32 type) { int32 count = 0; @@ -804,7 +780,6 @@ int32 PKR_AssetCount(st_PACKER_READ_DATA* pr, uint32 type) return count; } - void* PKR_AssetByType(st_PACKER_READ_DATA* pr, uint32 type, int32 idx, uint32* size) { if (size != NULL) @@ -837,8 +812,7 @@ void* PKR_AssetByType(st_PACKER_READ_DATA* pr, uint32 type, int32 idx, uint32* s return assnode->memloc; } - -// +// int32 PKR_IsAssetReady(st_PACKER_READ_DATA* pr, uint32 aid) { int32 ready = false; @@ -859,13 +833,11 @@ int32 PKR_IsAssetReady(st_PACKER_READ_DATA* pr, uint32 aid) return ready; } - uint32 PKR_getPackTimestamp(st_PACKER_READ_DATA* pr) { return pr->time_made; } - void PKR_Disconnect(st_PACKER_READ_DATA* pr) { if (pr->pkg != NULL) @@ -875,13 +847,11 @@ void PKR_Disconnect(st_PACKER_READ_DATA* pr) } } - uint32 PKRAssetIDFromInst(void* inst) { return ((st_PACKER_ATOC_NODE*)inst)->aid; } - int8* PKR_AssetName(st_PACKER_READ_DATA* pr, uint32 aid) { int8* name = NULL; @@ -902,13 +872,11 @@ int8* PKR_AssetName(st_PACKER_READ_DATA* pr, uint32 aid) return name; } - uint32 PKR_GetBaseSector(st_PACKER_READ_DATA* pr) { return pr->base_sector; } - int32 PKR_GetAssetInfo(st_PACKER_READ_DATA* pr, uint32 aid, st_PKR_ASSET_TOCINFO* tocainfo) { memset(tocainfo, 0, sizeof(st_PKR_ASSET_TOCINFO)); @@ -926,7 +894,6 @@ int32 PKR_GetAssetInfo(st_PACKER_READ_DATA* pr, uint32 aid, st_PKR_ASSET_TOCINFO return idx >= 0 ? 1 : 0; } - int32 PKR_GetAssetInfoByType(st_PACKER_READ_DATA* pr, uint32 type, int32 idx, st_PKR_ASSET_TOCINFO* tocainfo) { @@ -959,7 +926,6 @@ int32 PKR_GetAssetInfoByType(st_PACKER_READ_DATA* pr, uint32 type, int32 idx, return 1; } - int32 PKR_PkgHasAsset(st_PACKER_READ_DATA* pr, uint32 aid) { int32 idx = XOrdLookup(&pr->asstoc, (void*)aid, OrdTest_R_AssetID); @@ -981,7 +947,6 @@ int32 PKR_PkgHasAsset(st_PACKER_READ_DATA* pr, uint32 aid) return rc; } - int32 PKR_FRIEND_assetIsGameDup(uint32 aid, const st_PACKER_READ_DATA* skippr, int32 oursize, uint32 ourtype, uint32 chksum, int8*) { @@ -1041,7 +1006,6 @@ int32 PKR_FRIEND_assetIsGameDup(uint32 aid, const st_PACKER_READ_DATA* skippr, i return is_dup; } - int32 PKR_makepool_anode(st_PACKER_READ_DATA* pr, int32 cnt) { if (cnt == 0) @@ -1059,7 +1023,6 @@ int32 PKR_makepool_anode(st_PACKER_READ_DATA* pr, int32 cnt) return assnode != NULL ? cnt * sizeof(st_PACKER_ATOC_NODE) : 0; } - void PKR_kiilpool_anode(st_PACKER_READ_DATA* pr) { if (pr->asscnt == 0) @@ -1072,8 +1035,7 @@ void PKR_kiilpool_anode(st_PACKER_READ_DATA* pr) pr->pool_nextaidx = 0; } - -// +// st_PACKER_ATOC_NODE* PKR_newassnode(st_PACKER_READ_DATA* pr, uint32 aid) { int32 idx = pr->pool_nextaidx; @@ -1085,7 +1047,6 @@ st_PACKER_ATOC_NODE* PKR_newassnode(st_PACKER_READ_DATA* pr, uint32 aid) return newnode; } - st_PACKER_LTOC_NODE* PKR_newlaynode(en_LAYER_TYPE layer, int32 refcnt) { st_PACKER_LTOC_NODE* newnode = @@ -1097,14 +1058,12 @@ st_PACKER_LTOC_NODE* PKR_newlaynode(en_LAYER_TYPE layer, int32 refcnt) return newnode; } - void PKR_oldlaynode(st_PACKER_LTOC_NODE* laynode) { XOrdDone(&laynode->assref, 0); PKR_relmem('LNOD', sizeof(st_PACKER_LTOC_NODE), laynode, laynode->laytyp + 0x8000, 0); } - int32 OrdComp_R_Asset(void* vkey, void* vitem) { int32 rc; @@ -1123,7 +1082,6 @@ int32 OrdComp_R_Asset(void* vkey, void* vitem) return rc; } - int32 OrdTest_R_AssetID(const void* vkey, void* vitem) { int32 rc; @@ -1142,14 +1100,12 @@ int32 OrdTest_R_AssetID(const void* vkey, void* vitem) return rc; } - int32 LOD_r_HIPA(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { pr->pkgver = 'HIPA'; return 1; } - int32 LOD_r_PACK(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { uint32 cid = g_hiprf->enter(pkg); @@ -1182,7 +1138,6 @@ int32 LOD_r_PACK(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) return 1; } - #ifdef NON_MATCHING // reordering int32 LOD_r_PVER(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) @@ -1215,7 +1170,6 @@ int32 LOD_r_PVER(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) } #endif - #ifdef NON_MATCHING // reordering int32 LOD_r_PFLG(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) @@ -1226,7 +1180,6 @@ int32 LOD_r_PFLG(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) } #endif - int32 LOD_r_PCNT(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { int32 cnt = 0; @@ -1240,7 +1193,6 @@ int32 LOD_r_PCNT(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) return 1; } - #ifdef NON_MATCHING // need all of .rodata to generate for the OK int32 LOD_r_PCRT(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) @@ -1259,7 +1211,6 @@ int32 LOD_r_PCRT(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) } #endif - int32 LOD_r_PMOD(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { int32 time_mod = 0; @@ -1268,7 +1219,6 @@ int32 LOD_r_PMOD(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) return 1; } - #ifdef NON_MATCHING // String data int32 ValidatePlatform(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr, int32 plattag, int8* plat, @@ -1347,7 +1297,6 @@ int32 ValidatePlatform(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr, int32 platt } #endif - #ifdef NON_MATCHING // Orderings and Regalloc int32 LOD_r_PLAT(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) @@ -1375,7 +1324,6 @@ int32 LOD_r_PLAT(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) } #endif - int32 LOD_r_DICT(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { uint32 cid = g_hiprf->enter(pkg); @@ -1398,7 +1346,6 @@ int32 LOD_r_DICT(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) return 1; } - int32 LOD_r_ATOC(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { uint32 cid = g_hiprf->enter(pkg); @@ -1419,7 +1366,6 @@ int32 LOD_r_ATOC(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) return 1; } - #ifdef NON_MATCHING // reordering int32 LOD_r_AINF(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) @@ -1430,7 +1376,6 @@ int32 LOD_r_AINF(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) } #endif - int32 LOD_r_AHDR(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { int32 ival = 0; @@ -1484,7 +1429,6 @@ int32 LOD_r_AHDR(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) return 1; } - #ifdef NON_MATCHING // uses reordering and uses .rodata int32 LOD_r_ADBG(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr, st_PACKER_ATOC_NODE* assnode) @@ -1510,7 +1454,6 @@ int32 LOD_r_ADBG(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr, st_PACKER_ATOC_NO } #endif - int32 LOD_r_LTOC(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { uint32 cid = g_hiprf->enter(pkg); @@ -1531,7 +1474,6 @@ int32 LOD_r_LTOC(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) return 1; } - #ifdef NON_MATCHING // reordering int32 LOD_r_LINF(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) @@ -1542,7 +1484,6 @@ int32 LOD_r_LINF(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) } #endif - #ifdef NON_MATCHING // reordering int32 LOD_r_LHDR(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) @@ -1595,7 +1536,6 @@ int32 LOD_r_LHDR(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) } #endif - int32 LOD_r_LDBG(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr, st_PACKER_LTOC_NODE* laynode) { int32 ivar = 0; @@ -1607,7 +1547,6 @@ int32 LOD_r_LDBG(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr, st_PACKER_LTOC_NO return 1; } - int32 LOD_r_STRM(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { uint32 cid = g_hiprf->enter(pkg); @@ -1628,7 +1567,6 @@ int32 LOD_r_STRM(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) return 1; } - #ifdef NON_MATCHING // reordering int32 LOD_r_DHDR(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) @@ -1639,18 +1577,15 @@ int32 LOD_r_DHDR(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) } #endif - int32 LOD_r_DPAK(st_HIPLOADDATA* pkg, st_PACKER_READ_DATA* pr) { return 1; } - void PKR_spew_verhist() { } - st_PACKER_ASSETTYPE* PKR_type2typeref(uint32 asstype, st_PACKER_ASSETTYPE* types) { st_PACKER_ASSETTYPE* da_type = NULL; @@ -1672,7 +1607,6 @@ st_PACKER_ASSETTYPE* PKR_type2typeref(uint32 asstype, st_PACKER_ASSETTYPE* types return da_type; } - #if 0 // Probably func match, weird regalloc void PKR_bld_typecnt(st_PACKER_READ_DATA* pr) @@ -1764,7 +1698,6 @@ void PKR_bld_typecnt(st_PACKER_READ_DATA* pr) } #endif - int32 PKR_typeHdlr_idx(st_PACKER_READ_DATA* pr, uint32 type) { int32 idx = -1; @@ -1784,18 +1717,15 @@ int32 PKR_typeHdlr_idx(st_PACKER_READ_DATA* pr, uint32 type) return idx; } - void PKR_alloc_chkidx() { } - void* PKR_getmem(uint32 id, int32 amount, uint32 ui, int32 align) { return PKR_getmem(id, amount, ui, align, false, NULL); } - void* PKR_getmem(uint32 id, int32 amount, uint32, int32 align, int32 isTemp, int8** memtrue) { if (amount == 0) @@ -1849,7 +1779,6 @@ void* PKR_getmem(uint32 id, int32 amount, uint32, int32 align, int32 isTemp, int return memptr; } - void PKR_relmem(uint32 id, int32 blksize, void* memptr, uint32, int32 isTemp) { g_memalloc_pair--; @@ -1873,22 +1802,16 @@ void PKR_relmem(uint32 id, int32 blksize, void* memptr, uint32, int32 isTemp) } } - void PKR_push_memmark() { xMemPushBase(); } - void PKR_pop_memmark() { xMemPopBase(xMemGetBase() - 1); } - - - - int8* st_PACKER_ATOC_NODE::Name() const { return xpkrsvc_strings + 82; diff --git a/src/SB/Core/x/xsavegame.cpp b/src/SB/Core/x/xsavegame.cpp index 035afad5..bf26aaba 100644 --- a/src/SB/Core/x/xsavegame.cpp +++ b/src/SB/Core/x/xsavegame.cpp @@ -13,7 +13,6 @@ st_XSAVEGAME_DATA g_xsgdata = {}; st_XSAVEGAME_LEADER g_leaders[3] = {}; XSGAutoData g_autodata; - int32 xSGStartup() { if (g_xsginit++ == 0) @@ -26,7 +25,6 @@ int32 xSGStartup() return g_xsginit; } - int32 xSGShutdown() { g_xsginit--; @@ -38,7 +36,6 @@ int32 xSGShutdown() return g_xsginit; } - st_XSAVEGAME_DATA* xSGInit(en_SAVEGAME_MODE mode) { st_XSAVEGAME_DATA* xsgdata = &g_xsgdata; @@ -68,7 +65,6 @@ st_XSAVEGAME_DATA* xSGInit(en_SAVEGAME_MODE mode) return xsgdata; } - int32 xSGDone(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -117,25 +113,21 @@ int32 xSGDone(st_XSAVEGAME_DATA* xsgdata) return result; } - int32 xSGCheckForCorruptFiles(st_XSAVEGAME_DATA* xsgdata, int8 files[][64]) { return iSGCheckForCorruptFiles(xsgdata->isgsess, files); } - int32 xSGTgtCount(st_XSAVEGAME_DATA* xsgdata, int32* max) { return iSGTgtCount(xsgdata->isgsess, max); } - int32 xSGTgtPhysSlotIdx(st_XSAVEGAME_DATA* xsgdata, int32 tidx) { return iSGTgtPhysSlotIdx(xsgdata->isgsess, tidx); } - int32 xSGTgtIsFormat(st_XSAVEGAME_DATA* xsgdata, int32 tidx, int32* badEncode) { int32 result = 0; @@ -160,13 +152,11 @@ int32 xSGTgtIsFormat(st_XSAVEGAME_DATA* xsgdata, int32 tidx, int32* badEncode) return rc; } - int32 xSGTgtFormatTgt(st_XSAVEGAME_DATA* xsgdata, int32 tidx, int32* canRecover) { return iSGTgtFormat(xsgdata->isgsess, tidx, 0, canRecover); } - int32 xSGTgtSelect(st_XSAVEGAME_DATA* xsgdata, int32 tidx) { int32 result = iSGTgtSetActive(xsgdata->isgsess, tidx); @@ -177,7 +167,6 @@ int32 xSGTgtSelect(st_XSAVEGAME_DATA* xsgdata, int32 tidx) return result; } - int32 xSGTgtHasGameDir(st_XSAVEGAME_DATA* xsgdata, int32 tidx) { int32 rc = iSGTgtSetActive(xsgdata->isgsess, tidx); @@ -188,7 +177,6 @@ int32 xSGTgtHasGameDir(st_XSAVEGAME_DATA* xsgdata, int32 tidx) return rc; } - int32 xSGTgtHaveRoom(st_XSAVEGAME_DATA* xsgdata, int32 tidx, int32 fsize, int32 slotidx, int32* bytesNeeded, int32* availOnDisk, int32* needFile) { @@ -205,7 +193,6 @@ int32 xSGTgtHaveRoom(st_XSAVEGAME_DATA* xsgdata, int32 tidx, int32 fsize, int32 needFile); } - int32 xSGTgtHaveRoomStartup(st_XSAVEGAME_DATA* xsgdata, int32 tidx, int32 fsize, int32 slotidx, int32* bytesNeeded, int32* availOnDisk, int32* needFile) { @@ -222,25 +209,21 @@ int32 xSGTgtHaveRoomStartup(st_XSAVEGAME_DATA* xsgdata, int32 tidx, int32 fsize, availOnDisk, needFile); } - uint8 xSGCheckMemoryCard(st_XSAVEGAME_DATA* xsgdata, int32 index) { return iSGCheckMemoryCard(xsgdata->isgsess, index); } - void xSGGameSet(st_XSAVEGAME_DATA* xsgdata, int32 gidx) { xsgdata->gslot = gidx; } - int32 xSGGameIsEmpty(st_XSAVEGAME_DATA* xsgdata, int32 gidx) { return xSGGameSize(xsgdata, gidx) <= 0; } - int32 xSGGameSize(st_XSAVEGAME_DATA* xsgdata, int32 gidx) { int32 size = 0; @@ -252,7 +235,6 @@ int32 xSGGameSize(st_XSAVEGAME_DATA* xsgdata, int32 gidx) return size; } - int8* xSGGameModDate(st_XSAVEGAME_DATA* xsgdata, int32 gidx) { static int8 da_date[32] = {}; @@ -337,7 +319,6 @@ int8* xSGGameModDate(st_XSAVEGAME_DATA* xsgdata, int32 gidx) return da_date; } - int8* xSGGameLabel(st_XSAVEGAME_DATA* xsgdata, int32 gidx) { int8* da_name = NULL; @@ -348,7 +329,6 @@ int8* xSGGameLabel(st_XSAVEGAME_DATA* xsgdata, int32 gidx) return da_name; } - int32 xSGGameThumbIndex(st_XSAVEGAME_DATA* xsgdata, int32 gidx) { int32 idx_thum = -1; @@ -360,7 +340,6 @@ int32 xSGGameThumbIndex(st_XSAVEGAME_DATA* xsgdata, int32 gidx) return idx_thum; } - int32 xSGGameProgress(st_XSAVEGAME_DATA* xsgdata, int32 gidx) { int32 progress = -1; @@ -372,7 +351,6 @@ int32 xSGGameProgress(st_XSAVEGAME_DATA* xsgdata, int32 gidx) return progress; } - int32 xSGAddSaveClient(st_XSAVEGAME_DATA* xsgdata, uint32 clttag, void* cltdata, int32 (*infofunc)(void*, st_XSAVEGAME_DATA*, int32*, int32*), int32 (*procfunc)(void*, st_XSAVEGAME_DATA*, st_XSAVEGAME_WRITECONTEXT*)) @@ -410,7 +388,6 @@ int32 xSGAddSaveClient(st_XSAVEGAME_DATA* xsgdata, uint32 clttag, void* cltdata, return result; } - int32 xSGAddLoadClient(st_XSAVEGAME_DATA* xsgdata, uint32 clttag, void* cltdata, int32 (*loadfunc)(void*, st_XSAVEGAME_DATA*, st_XSAVEGAME_READCONTEXT*, uint32, int32)) @@ -467,13 +444,11 @@ int32 xSGAddLoadClient(st_XSAVEGAME_DATA* xsgdata, uint32 clttag, void* cltdata, return result; } - int32 xSGSetup(st_XSAVEGAME_DATA* xsgdata) { return xSGSetup(xsgdata, 0, "nothing", -1, 0, 0); } - int32 xSGSetup(st_XSAVEGAME_DATA* xsgdata, int32 gidx, int8* label, int32 progress, iTime playtime, int32 thumbIconIdx) { @@ -520,7 +495,6 @@ int32 xSGSetup(st_XSAVEGAME_DATA* xsgdata, int32 gidx, int8* label, int32 progre return result; } - int32 xSGProcess(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -578,7 +552,6 @@ int32 xSGProcess(st_XSAVEGAME_DATA* xsgdata) return result; } - int32 xSGWrapup(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -662,7 +635,6 @@ int32 xSGWrapup(st_XSAVEGAME_DATA* xsgdata) return result; } - en_XSGASYNC_STATUS xSGAsyncStatus(st_XSAVEGAME_DATA* xsgdata, int32 block, en_XSG_WHYFAIL* whyFail, int8* errmsg) { @@ -719,7 +691,6 @@ en_XSGASYNC_STATUS xSGAsyncStatus(st_XSAVEGAME_DATA* xsgdata, int32 block, en_XS return xstat; } - int32 xSG_cb_leader_svinfo(void*, st_XSAVEGAME_DATA*, int32* cur_space, int32* max_fullgame) { *cur_space = 0x100; @@ -727,7 +698,6 @@ int32 xSG_cb_leader_svinfo(void*, st_XSAVEGAME_DATA*, int32* cur_space, int32* m return 1; } - int32 xSG_cb_leader_svproc(void* cltdata, st_XSAVEGAME_DATA* original_xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt) { @@ -746,7 +716,6 @@ int32 xSG_cb_leader_svproc(void* cltdata, st_XSAVEGAME_DATA* original_xsgdata, return 1; } - int32 xSG_cb_leader_load(void*, st_XSAVEGAME_DATA* original_xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, uint32, int32) { @@ -757,7 +726,6 @@ int32 xSG_cb_leader_load(void*, st_XSAVEGAME_DATA* original_xsgdata, return 1; } - int32 xSGWriteData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt, int8* data, int32 elesiz, int32 n) { @@ -820,7 +788,6 @@ int32 xSGWriteData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt, return cnt; } - int32 xSGWriteStrLen(const int8* str) { int32 len = strlen(str); @@ -828,35 +795,30 @@ int32 xSGWriteStrLen(const int8* str) return len; } - int32 xSGWriteData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt, int8* data, int32 n) { return xSGWriteData(xsgdata, wctxt, data, sizeof(int8), n); } - int32 xSGWriteData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt, int32* data, int32 n) { return xSGWriteData(xsgdata, wctxt, (int8*)data, sizeof(int32), n); } - int32 xSGWriteData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt, uint32* data, int32 n) { return xSGWriteData(xsgdata, wctxt, (int8*)data, sizeof(uint32), n); } - int32 xSGWriteData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt, float32* data, int32 n) { return xSGWriteData(xsgdata, wctxt, (int8*)data, sizeof(float32), n); } - int32 xSGReadData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, int8* buff, int32 elesiz, int32 n) { @@ -901,33 +863,28 @@ int32 xSGReadData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, i return cnt / elesiz; } - int32 xSGReadData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, int8* buff, int32 n) { return xSGReadData(xsgdata, rctxt, buff, sizeof(int8), n); } - int32 xSGReadData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, int32* buff, int32 n) { return xSGReadData(xsgdata, rctxt, (int8*)buff, sizeof(int32), n); } - int32 xSGReadData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, uint32* buff, int32 n) { return xSGReadData(xsgdata, rctxt, (int8*)buff, sizeof(uint32), n); } - int32 xSGReadData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, float32* buff, int32 n) { return xSGReadData(xsgdata, rctxt, (int8*)buff, sizeof(float32), n); } - int32 xSG_grab_leaders(st_XSAVEGAME_DATA* xsgdata) { int32 num_found = 0; @@ -957,7 +914,6 @@ int32 xSG_grab_leaders(st_XSAVEGAME_DATA* xsgdata) return num_found; } - int32 xSG_chdir_gamedir(st_XSAVEGAME_DATA* xsgdata) { int32 rc = 1; @@ -969,7 +925,6 @@ int32 xSG_chdir_gamedir(st_XSAVEGAME_DATA* xsgdata) return rc; } - int8* xSG_cm_slotname(st_XSAVEGAME_DATA* xsgdata, int32 gidx) { static int8 slotname[32] = {}; @@ -988,7 +943,6 @@ int8* xSG_cm_slotname(st_XSAVEGAME_DATA* xsgdata, int32 gidx) return slotname; } - void xSG_areaComposeLabel(int8* label, int, int8*, int) { int8 buf[64] = {}; @@ -996,7 +950,6 @@ void xSG_areaComposeLabel(int8* label, int, int8*, int) sprintf(label, "%s", buf); } - int32 xSG_sv_flipinfo(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -1033,7 +986,6 @@ int32 xSG_sv_flipinfo(st_XSAVEGAME_DATA* xsgdata) return result; } - int32 xSG_sv_prepdest(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -1061,7 +1013,6 @@ int32 xSG_sv_prepdest(st_XSAVEGAME_DATA* xsgdata) return result; } - int32 xSG_sv_flipproc(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -1104,7 +1055,6 @@ int32 xSG_sv_flipproc(st_XSAVEGAME_DATA* xsgdata) return result; } - int32 xSG_sv_bldchksum(st_XSAVEGAME_DATA* xsgdata) { xsgdata->chksum = @@ -1112,7 +1062,6 @@ int32 xSG_sv_bldchksum(st_XSAVEGAME_DATA* xsgdata) return 1; } - int32 xSG_smem_blkopen(st_XSAVEGAME_DATA* xsgdata) { int32 i = '3333'; @@ -1129,7 +1078,6 @@ int32 xSG_smem_blkopen(st_XSAVEGAME_DATA* xsgdata) return 1; } - int32 xSG_smem_blkclose(st_XSAVEGAME_DATA* xsgdata) { xsgdata->upd_tally = 0; @@ -1147,7 +1095,6 @@ int32 xSG_smem_blkclose(st_XSAVEGAME_DATA* xsgdata) return 1; } - int32 xSG_smem_cltopen(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_CLIENT* clt) { int32 i = '3333'; @@ -1164,7 +1111,6 @@ int32 xSG_smem_cltopen(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_CLIENT* clt) return 1; } - int32 xSG_smem_cltclose(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_CLIENT* clt) { xUtil_idtag2string(clt->idtag, 0); @@ -1188,7 +1134,6 @@ int32 xSG_smem_cltclose(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_CLIENT* clt) return 1; } - int32 xSG_sv_commit(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -1215,7 +1160,6 @@ int32 xSG_sv_commit(st_XSAVEGAME_DATA* xsgdata) return result; } - void xSG_cb_ISGChange(void*, en_CHGCODE what) { XSGAutoData* asg = xSGAutoSave_GetCache(); @@ -1232,7 +1176,6 @@ void xSG_cb_ISGChange(void*, en_CHGCODE what) } } - int32 xSG_ld_prepload(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -1251,7 +1194,6 @@ int32 xSG_ld_prepload(st_XSAVEGAME_DATA* xsgdata) return result; } - int32 xSG_ld_readgame(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -1274,7 +1216,6 @@ int32 xSG_ld_readgame(st_XSAVEGAME_DATA* xsgdata) return result; } - int32 xSG_ld_readhead(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -1310,7 +1251,6 @@ int32 xSG_ld_readhead(st_XSAVEGAME_DATA* xsgdata) return result; } - int32 xSG_ld_validate(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -1329,7 +1269,6 @@ int32 xSG_ld_validate(st_XSAVEGAME_DATA* xsgdata) return result; } - int32 xSG_ld_findcltblk(st_XSAVEGAME_DATA* xsgdata) { int32 ival = 0; @@ -1417,7 +1356,6 @@ int32 xSG_ld_findcltblk(st_XSAVEGAME_DATA* xsgdata) return 1; } - int32 xSG_ld_flipload(st_XSAVEGAME_DATA* xsgdata) { int32 result = 1; @@ -1452,13 +1390,11 @@ int32 xSG_ld_flipload(st_XSAVEGAME_DATA* xsgdata) return result; } - XSGAutoData* xSGAutoSave_GetCache() { return &g_autodata; } - void xSGAutoSave_Startup() { XSGAutoData* asg = xSGAutoSave_GetCache(); @@ -1469,7 +1405,6 @@ void xSGAutoSave_Startup() iSGAutoSave_Startup(); } - int32 XSGAutoData::IsValid() { if (this->flg_autodata & 1 && !XSGAutoData::HWCheckConnect(this->lastTarg)) @@ -1479,13 +1414,11 @@ int32 XSGAutoData::IsValid() return this->flg_autodata & 1; } - void XSGAutoData::MarkInvalid() { this->flg_autodata &= 0xfffffffe; } - int32 XSGAutoData::SetCache(int32 targ, int32 game, int32 physicalSlot) { this->Discard(); @@ -1502,7 +1435,6 @@ int32 XSGAutoData::SetCache(int32 targ, int32 game, int32 physicalSlot) return 1; } - void XSGAutoData::Discard() { this->flg_autodata = 0; @@ -1516,7 +1448,6 @@ void XSGAutoData::Discard() this->isg_monitor = NULL; } - st_ISGSESSION* XSGAutoData::HWConnect(int32 targ) { return iSGAutoSave_Connect(targ, xSGAutoSave_GetCache(), ASG_ISG_changed); @@ -1527,13 +1458,11 @@ void XSGAutoData::HWDisconnect(st_ISGSESSION* isgsess) iSGAutoSave_Disconnect(isgsess); } - int32 XSGAutoData::HWCheckConnect(int32 targ) { return iSGAutoSave_Monitor(this->isg_monitor, this->lastTarg); } - void ASG_ISG_changed(void*, en_CHGCODE what) { XSGAutoData* asg = xSGAutoSave_GetCache(); diff --git a/src/SB/Core/x/xserializer.cpp b/src/SB/Core/x/xserializer.cpp index 53ac63ef..f9fd6404 100644 --- a/src/SB/Core/x/xserializer.cpp +++ b/src/SB/Core/x/xserializer.cpp @@ -1,142 +1,3 @@ #include "xserializer.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Core/x/xstransvc.cpp b/src/SB/Core/x/xstransvc.cpp index 0fcc799b..f4e1de18 100644 --- a/src/SB/Core/x/xstransvc.cpp +++ b/src/SB/Core/x/xstransvc.cpp @@ -14,7 +14,6 @@ int32 g_straninit; st_PACKER_READ_FUNCS* g_pkrf; st_PACKER_ASSETTYPE* g_typeHandlers; - int32 xSTStartup(st_PACKER_ASSETTYPE* handlers) { if (g_straninit++ == 0) @@ -27,7 +26,6 @@ int32 xSTStartup(st_PACKER_ASSETTYPE* handlers) return g_straninit; } - int32 xSTShutdown() { g_straninit--; @@ -40,7 +38,6 @@ int32 xSTShutdown() return g_straninit; } - // This doesn't seem exactly how HI would have written this, but it OKs // TODO: Try to clean this up? int32 xSTPreLoadScene(uint32 sid, void* userdata, int32 flg_hiphop) @@ -122,7 +119,6 @@ int32 xSTPreLoadScene(uint32 sid, void* userdata, int32 flg_hiphop) return result; } - int32 xSTQueueSceneAssets(uint32 sid, int32 flg_hiphop) { int32 result = 1; @@ -141,7 +137,6 @@ int32 xSTQueueSceneAssets(uint32 sid, int32 flg_hiphop) return result; } - void xSTUnLoadScene(uint32 sid, int32 flg_hiphop) { st_STRAN_SCENE* sdata; @@ -175,7 +170,6 @@ void xSTUnLoadScene(uint32 sid, int32 flg_hiphop) } } - float32 xSTLoadStep(uint32) { float32 pct = PKRLoadStep(0) != 0 ? 0.0f : 1.00001f; @@ -185,7 +179,6 @@ float32 xSTLoadStep(uint32) return pct; } - void xSTDisconnect(uint32 sid, int32 flg_hiphop) { st_STRAN_SCENE* sdata = XST_find_bySID(sid, (flg_hiphop & 3) == 2 ? 1 : 0); @@ -195,7 +188,6 @@ void xSTDisconnect(uint32 sid, int32 flg_hiphop) } } - int32 xSTSwitchScene(uint32 sid, void* userdata, int32 (*progmon)(void*, float32)) { st_STRAN_SCENE* sdata; @@ -221,7 +213,6 @@ int32 xSTSwitchScene(uint32 sid, void* userdata, int32 (*progmon)(void*, float32 return rc; } - int8* xSTAssetName(uint32 aid) { int8* aname = NULL; @@ -243,7 +234,6 @@ int8* xSTAssetName(uint32 aid) return aname; } - int8* xSTAssetName(void* raw_HIP_asset) { int8* aname = NULL; @@ -262,7 +252,6 @@ int8* xSTAssetName(void* raw_HIP_asset) return aname; } - void* xSTFindAsset(uint32 aid, uint32* size) { void* memloc = NULL; @@ -300,7 +289,6 @@ void* xSTFindAsset(uint32 aid, uint32* size) return memloc; } - int32 xSTAssetCountByType(uint32 type) { int32 sum = 0; @@ -313,7 +301,6 @@ int32 xSTAssetCountByType(uint32 type) return sum; } - void* xSTFindAssetByType(uint32 type, int32 idx, uint32* size) { void* memptr = NULL; @@ -335,7 +322,6 @@ void* xSTFindAssetByType(uint32 type, int32 idx, uint32* size) return memptr; } - int32 xSTGetAssetInfo(uint32 aid, st_PKR_ASSET_TOCINFO* tocainfo) { int32 rc = 0; @@ -356,7 +342,6 @@ int32 xSTGetAssetInfo(uint32 aid, st_PKR_ASSET_TOCINFO* tocainfo) return rc; } - #if 0 // WIP int32 xSTGetAssetInfoByType(uint32 type, int32 idx, st_PKR_ASSET_TOCINFO* ainfo) @@ -391,7 +376,6 @@ int32 xSTGetAssetInfoByType(uint32 type, int32 idx, st_PKR_ASSET_TOCINFO* ainfo) } #endif - int32 xSTGetAssetInfoInHxP(uint32 aid, st_PKR_ASSET_TOCINFO* ainfo, uint32 j) { int32 rc = 0; @@ -412,13 +396,11 @@ int32 xSTGetAssetInfoInHxP(uint32 aid, st_PKR_ASSET_TOCINFO* ainfo, uint32 j) return rc; } - int8* xST_xAssetID_HIPFullPath(uint32 aid) { return xST_xAssetID_HIPFullPath(aid, 0); } - int8* xST_xAssetID_HIPFullPath(uint32 aid, uint32* sceneID) { int8* id = NULL; @@ -440,7 +422,6 @@ int8* xST_xAssetID_HIPFullPath(uint32 aid, uint32* sceneID) return id; } - #ifdef NON_MATCHING // register crap int32 XST_PreLoadScene(st_STRAN_SCENE* sdata, const int8* name) @@ -456,7 +437,6 @@ int32 XST_PreLoadScene(st_STRAN_SCENE* sdata, const int8* name) } #endif - int8* XST_translate_sid(uint32 sid, int8* extension) { static int8 buffer[0x40] = {}; @@ -464,7 +444,6 @@ int8* XST_translate_sid(uint32 sid, int8* extension) return buffer; } - int8* XST_translate_sid_path(uint32 sid, int8* extension) { // NOTE: This buffer extends for 0x44 bytes in the rom @@ -476,13 +455,11 @@ int8* XST_translate_sid_path(uint32 sid, int8* extension) return buffer; } - void XST_reset_raw() { memset(&g_xstdata, 0, sizeof(st_STRAN_DATA)); } - st_STRAN_SCENE* XST_lock_next() { st_STRAN_SCENE* sdata = NULL; @@ -507,7 +484,6 @@ st_STRAN_SCENE* XST_lock_next() return sdata; } - #ifdef NON_MATCHING void XST_unlock(st_STRAN_SCENE* sdata) { @@ -524,7 +500,6 @@ void XST_unlock(st_STRAN_SCENE* sdata) } #endif - void XST_unlock_all() { if (g_xstdata.loadlock) @@ -539,13 +514,11 @@ void XST_unlock_all() } } - st_STRAN_SCENE* XST_get_rawinst(int32 index) { return &g_xstdata.hipscn[index]; } - int32 XST_cnt_locked() { int32 sum = 0; @@ -559,7 +532,6 @@ int32 XST_cnt_locked() return sum; } - st_STRAN_SCENE* XST_nth_locked(int32 index) { st_STRAN_SCENE* sdata = NULL; @@ -580,7 +552,6 @@ st_STRAN_SCENE* XST_nth_locked(int32 index) return sdata; } - st_STRAN_SCENE* XST_find_bySID(uint32 sid, int32 findTheHOP) { st_STRAN_SCENE* da_sdata = NULL; @@ -600,7 +571,6 @@ st_STRAN_SCENE* XST_find_bySID(uint32 sid, int32 findTheHOP) return da_sdata; } - void iFileAsyncService() { } diff --git a/src/SB/Game/zActionLine.cpp b/src/SB/Game/zActionLine.cpp index 24a9a043..0849ab92 100644 --- a/src/SB/Game/zActionLine.cpp +++ b/src/SB/Game/zActionLine.cpp @@ -13,7 +13,6 @@ extern _tagActionLine* sActionLine[8]; extern RwRaster* sActionLineRaster; extern const int8 zActionLineStrings[]; - #if 0 void zActionLineInit() { @@ -53,7 +52,6 @@ void zActionLineUpdate(float32 seconds) } } - #if 0 void RenderActionLine(_tagActionLine* l) { diff --git a/src/SB/Game/zAnimList.cpp b/src/SB/Game/zAnimList.cpp index 6df204a5..492f97b4 100644 --- a/src/SB/Game/zAnimList.cpp +++ b/src/SB/Game/zAnimList.cpp @@ -16,7 +16,6 @@ uint32 AlwaysConditional(xAnimTransition*, xAnimSingle*, void*) return 1; } - #if 0 void zAnimListInit() { diff --git a/src/SB/Game/zAssetTypes.cpp b/src/SB/Game/zAssetTypes.cpp index 9c2dfc05..9d731362 100644 --- a/src/SB/Game/zAssetTypes.cpp +++ b/src/SB/Game/zAssetTypes.cpp @@ -10,24 +10,11 @@ extern xJSPHeader* sTempJSP; extern xJSPHeader sDummyEmptyJSP; - - - void zAssetShutdown() { xSTShutdown(); } - - - - - - - - - - #if 0 // Ghidra's output here is not helpful void* BSP_Read(void* param_1, uint32 param_2, void* indata, uint32 insize, uint32* outsize) @@ -62,19 +49,6 @@ void* BSP_Read(void* param_1, uint32 param_2, void* indata, uint32 insize, uint3 } #endif - - - - - - - - - - - - - void* JSP_Read(void* param_1, uint32 param_2, void* indata, uint32 insize, uint32* outsize) { xJSPHeader* retjsp = &sDummyEmptyJSP; @@ -89,29 +63,3 @@ void* JSP_Read(void* param_1, uint32 param_2, void* indata, uint32 insize, uint3 jsp_shadow_hack(retjsp); return retjsp; } - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zBusStop.cpp b/src/SB/Game/zBusStop.cpp index 206fea33..4ae18cd8 100644 --- a/src/SB/Game/zBusStop.cpp +++ b/src/SB/Game/zBusStop.cpp @@ -64,7 +64,6 @@ void zBusStop_Setup(zBusStop* bstop) sBusStopUI = (xEnt*)zSceneFindObject(xStrHash("mnu4 busstop")); } - #if 0 // This function is so close, it's off by a single floating point register // assignment right at the end of the function :( diff --git a/src/SB/Game/zCamera.cpp b/src/SB/Game/zCamera.cpp index 1fc6448f..fd162192 100644 --- a/src/SB/Game/zCamera.cpp +++ b/src/SB/Game/zCamera.cpp @@ -12,7 +12,6 @@ #include "xScrFx.h" #include "xstransvc.h" - // extern int8 buffer[16]; // extern int8 buffer[16]; // extern basic_rect screen_bounds; @@ -112,7 +111,6 @@ extern float32 zCamera_f_3_141; // 3.141593 ~ pi extern float32 zCamera_f_20_0; // 20.0 extern float32 zCamera_f_180_0; // 180.0 - #if 0 void zCameraReset(xCamera* cam) { @@ -207,7 +205,6 @@ float32 EaseInOut(float32 param) return param * (param * (zCamera_f_2_0 - zCamera_f_1_5 * param) + zCamera_f_0_5); } - #if 0 void zCameraConversUpdate(xCamera* cam, float32 dt) { @@ -281,9 +278,6 @@ float32 MatrixSpeed(zFlyKey keys[]) return xacos(m) * zCamera_f_114_592 * zCamera_f_30_0; } - - - zFlyKey& zFlyKey::operator=(const zFlyKey& other) { this->frame = other.frame; @@ -300,7 +294,6 @@ zFlyKey& zFlyKey::operator=(const zFlyKey& other) return *this; } - #if 0 void zCameraFlyStart(uint32 assetID) { @@ -331,16 +324,6 @@ void zCameraFlyStart(uint32 assetID) } #endif - - - - - - - - - - #if 0 void zCameraFreeLookSetGoals(xCamera* cam, float32 pitch_s, float32& dgoal, float32& hgoal, float32& pitch_goal, float32& lktm, float32 dt) @@ -456,15 +439,11 @@ void zCameraFreeLookSetGoals(xCamera* cam, float32 pitch_s, float32& dgoal, floa } #endif - - - void zCameraSetBbounce(int32 bbouncing) { zcam_bbounce = bbouncing; } - #if 0 void zCameraSetLongbounce(int32 lbounce) { @@ -479,7 +458,6 @@ void zCameraSetLongbounce(int32 lbounce) } #endif - #if 0 void zCameraSetHighbounce(int32 lbounce) { @@ -509,61 +487,46 @@ void zCameraEnableTracking(camera_owner_enum owner) stop_track = stop_track & ~owner; } - uint32 zCameraIsTrackingDisabled() { return stop_track; } - void zCameraDisableInput() { input_enabled = 0; } - void zCameraEnableInput() { input_enabled = 1; } - void zCameraDisableLassoCam() { lassocam_enabled = 0; } - void zCameraEnableLassoCam() { lassocam_enabled = 1; } - void zCameraSetLassoCamFactor(float32 new_factor) { lassocam_factor = new_factor; } - float32 zCameraGetLassoCamFactor() { return lassocam_factor; } - int32 zCameraGetConvers() { return zcam_convers; } - - - - - - - void zCameraTranslate(xCamera* cam, float32 x, float32 y, float32 z) { cam->mat.pos.x += x; @@ -574,10 +537,6 @@ void zCameraTranslate(xCamera* cam, float32 x, float32 y, float32 z) cam->tran_accum.z += z; } - - - - void zCameraDisableWallJump(xCamera* cam) { if (wall_jump_enabled != WJVS_DISABLED) @@ -586,7 +545,6 @@ void zCameraDisableWallJump(xCamera* cam) } } - void zCameraSetReward(int32 reward) { if (zCameraIsTrackingDisabled() != 0) @@ -597,22 +555,16 @@ void zCameraSetReward(int32 reward) zcam_reward = reward; } - void zCameraMinTargetHeightSet(float32 min_height) { zcam_mintgtheight = min_height; } - void zCameraMinTargetHeightClear() { zcam_mintgtheight = zCamera_f_n1_0_e38; } - - - - float32 xVec3Dist2(const xVec3* vecA, const xVec3* vecB) { float dx = vecA->x - vecB->x; diff --git a/src/SB/Game/zCameraTweak.cpp b/src/SB/Game/zCameraTweak.cpp index 2311277f..6e704c51 100644 --- a/src/SB/Game/zCameraTweak.cpp +++ b/src/SB/Game/zCameraTweak.cpp @@ -1,40 +1,3 @@ #include "zCameraTweak.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zCombo.cpp b/src/SB/Game/zCombo.cpp index a9a1ce6f..722cec03 100644 --- a/src/SB/Game/zCombo.cpp +++ b/src/SB/Game/zCombo.cpp @@ -43,7 +43,6 @@ extern float32 zCombo_float32_3; // probably comboTimer extern xBase* sHideText[5]; extern xBase* sHideUIF[1]; - void fillCombo(zComboReward* reward) { int32 rewardLeft = reward->reward; @@ -81,7 +80,6 @@ void fillCombo(zComboReward* reward) reward->rewardNum = j; } - #if 0 // Can't get the floating point instructions to go in the right order // the zCombo_float32_3 = zCombo_float_minusone always gets lifted to the @@ -162,7 +160,6 @@ void zCombo_Setup() } #endif - #if 0 /* Can't figure out how to get the assignments to happen in the right order */ void zCombo_Add(int32 points) @@ -185,13 +182,11 @@ void zCombo_Add(int32 points) } #endif - void zComboHideMessage(xhud::widget& w, xhud::motive& motive) { w.hide(); } - void zCombo_HideImmediately() { if (comboHUD != NULL) @@ -200,10 +195,6 @@ void zCombo_HideImmediately() } } - - - - bool ztextbox::visible() { return this->flag.visible; diff --git a/src/SB/Game/zConditional.cpp b/src/SB/Game/zConditional.cpp index be92a2b3..a6ce46b5 100644 --- a/src/SB/Game/zConditional.cpp +++ b/src/SB/Game/zConditional.cpp @@ -8,7 +8,6 @@ int32 zConditionalEventCB(xBase*, xBase*, uint32, const float32*, xBase*); - void zConditionalInit(void* b, void* asset) { zConditionalInit((xBase*)b, (zCondAsset*)asset); @@ -20,7 +19,6 @@ struct UnknownTypeInheritingBase : xBase int8* unknownPtr; }; - void zConditionalInit(xBase* b, zCondAsset* asset) { xBaseInit(b, asset); @@ -41,25 +39,21 @@ void zConditionalInit(xBase* b, zCondAsset* asset) } } - void zConditionalReset(_zConditional* ent) { xBaseReset(ent, ent->asset); } - void zConditionalSave(_zConditional* ent, xSerial* s) { xBaseSave(ent, s); } - void zConditionalLoad(_zConditional* ent, xSerial* s) { xBaseLoad(ent, s); } - bool zConditional_Evaluate(_zConditional* c) { zVarEntry* v = NULL; @@ -109,7 +103,6 @@ bool zConditional_Evaluate(_zConditional* c) } } - #if 0 // This doesn't work because it's missing a single branch instruction // The original assembly has a redundant branch instruction: diff --git a/src/SB/Game/zCutsceneMgr.cpp b/src/SB/Game/zCutsceneMgr.cpp index 232cda58..771af0d1 100644 --- a/src/SB/Game/zCutsceneMgr.cpp +++ b/src/SB/Game/zCutsceneMgr.cpp @@ -28,13 +28,11 @@ extern float32 gSkipTimeCutscene; extern float32 _897; - void zCutsceneMgrInit(void* b, void* tasset) { zCutsceneMgrInit((xBase*)b, (xCutsceneMgrAsset*)tasset); } - void zCutsceneMgrInit(xBase* b, xCutsceneMgrAsset* tasset) { zCutsceneMgr* mgr = (zCutsceneMgr*)b; @@ -53,7 +51,6 @@ void zCutsceneMgrInit(xBase* b, xCutsceneMgrAsset* tasset) ents_hidden = 0; } - void zCutsceneMgrReset(zCutsceneMgr* mgr) { xBaseReset(mgr, mgr->tasset); @@ -66,7 +63,6 @@ void zCutsceneMgrReset(zCutsceneMgr* mgr) ents_hidden = 0; } - void zCutsceneMgrSave(zCutsceneMgr*, xSerial* s) { for (uint32 i = 0; i < 14; i++) @@ -82,7 +78,6 @@ void zCutsceneMgrSave(zCutsceneMgr*, xSerial* s) } } - void zCutsceneMgrLoad(zCutsceneMgr*, xSerial* s) { for (uint32 i = 0; i < 14; i++) @@ -91,7 +86,6 @@ void zCutsceneMgrLoad(zCutsceneMgr*, xSerial* s) } } - RpAtomic* HackBoundCB(RpAtomic* atomic, void* data) { atomic->worldBoundingSphere.radius = *(RwReal*)data; @@ -101,7 +95,6 @@ RpAtomic* HackBoundCB(RpAtomic* atomic, void* data) return atomic; } - RpMaterial* HackAlphaSetMaterialAlphaCB(RpMaterial* material, void* data) { RwRGBA color = material->color; @@ -110,7 +103,6 @@ RpMaterial* HackAlphaSetMaterialAlphaCB(RpMaterial* material, void* data) return material; } - RpAtomic* HackAlphaCB(RpAtomic* atomic, void* data) { RpGeometry* pGeom = atomic->geometry; @@ -122,7 +114,6 @@ RpAtomic* HackAlphaCB(RpAtomic* atomic, void* data) return atomic; } - void zCutSceneNamesTable_clearAll() { for (int i = 0; i < 14; i++) @@ -197,7 +188,6 @@ void zCutsceneMgrPlayStart(zCutsceneMgr* t) } #endif - int32 zCutsceneMgrEventCB(xBase*, xBase* to, uint32 toEvent, const float32*, xBase*) { zCutsceneMgr* t = (zCutsceneMgr*)to; @@ -292,7 +282,6 @@ void zCutsceneMgrFinishExit(xBase* to) } #endif - void zCutsceneMgrKillFX(zCutsceneMgr* t) { xCutsceneMgrAsset* a = t->tasset; @@ -310,7 +299,6 @@ void zCutsceneMgrKillFX(zCutsceneMgr* t) } } - void zCutsceneMgrUpdateFX(zCutsceneMgr* t, float32) { xCutsceneMgrAsset* a = t->tasset; @@ -342,7 +330,6 @@ void zCutsceneMgrUpdateFX(zCutsceneMgr* t, float32) } } - void zCutsceneMgrUpdate(xBase* to, xScene* sc, float32 dt) { zCutsceneMgr* t = (zCutsceneMgr*)to; @@ -437,7 +424,6 @@ void zCutsceneMgrUpdate(xBase* to, xScene* sc, float32 dt) check_hide_entities(); } - void check_hide_entities() { bool mgrNotNull = globals.cmgr; diff --git a/src/SB/Game/zDiscoFloor.cpp b/src/SB/Game/zDiscoFloor.cpp index b9b03672..033d1f18 100644 --- a/src/SB/Game/zDiscoFloor.cpp +++ b/src/SB/Game/zDiscoFloor.cpp @@ -164,14 +164,8 @@ namespace uint32 get_tile(const uint8*, ulong32); - - - void set_tile(uint8*, ulong32, uint32); - - - void translate_mask(uint8* r3, const uint8* r4, ulong32 r5) { for (ulong32 i = 0; i < r5; i++) @@ -408,12 +402,6 @@ namespace } } // namespace - - - - - - namespace { void render_model(xModelInstance* model, const xSphere& sph) @@ -968,9 +956,6 @@ void z_disco_floor::update_pulse(float32 dt) } #endif - - - void z_disco_floor::refresh_cull_dist() { if (!tiles_size) diff --git a/src/SB/Game/zDispatcher.cpp b/src/SB/Game/zDispatcher.cpp index f2c17a11..e5e633fa 100644 --- a/src/SB/Game/zDispatcher.cpp +++ b/src/SB/Game/zDispatcher.cpp @@ -42,17 +42,14 @@ extern float64 _1199; extern uint8 menu_fmv_played; extern int8 zEventLogBuf[256][20]; - void zDispatcher_Startup() { } - void zDispatcher_Shutdown() { } - void zDispatcher_scenePrepare() { st_ZDISPATCH_DEPOT* depot = &g_zdsp_depot; @@ -62,7 +59,6 @@ void zDispatcher_scenePrepare() } } - void zDispatcher_sceneFinish() { st_ZDISPATCH_DEPOT* depot = &g_zdsp_depot; @@ -74,7 +70,6 @@ void zDispatcher_sceneFinish() } } - #ifdef NON_MATCHING // Compiler is optimizng the size calcuation and moving parameters for memset differently. st_ZDISPATCH_DATA* zDispatcher_memPool(int32 cnt) @@ -96,37 +91,31 @@ st_ZDISPATCH_DATA* zDispatcher_memPool(int32 cnt) } #endif - st_ZDISPATCH_DATA* zDispatcher_getInst(st_ZDISPATCH_DATA* pool, int32 idx) { return &pool[idx]; } - void zDispatcher_Init(st_ZDISPATCH_DATA* dspdata, xBaseAsset* bass) { ZDSP_instInit(dspdata, bass); } - void zDispatcher_InitDep(st_ZDISPATCH_DATA* dspdata, zScene* scene) { ZDSP_instInitDep(dspdata, scene); } - void zDispatcher_Save(st_ZDISPATCH_DATA* dspdata, xSerial* s) { xBaseSave(dspdata, s); } - void zDispatcher_Load(st_ZDISPATCH_DATA* dspdata, xSerial* s) { xBaseLoad(dspdata, s); } - void ZDSP_instInit(st_ZDISPATCH_DATA* dspdata, xBaseAsset* bass) { xBaseInit(dspdata, bass); @@ -144,13 +133,11 @@ void ZDSP_instInit(st_ZDISPATCH_DATA* dspdata, xBaseAsset* bass) xSceneID2Name(globals.sceneCur, dspdata->id); } - void ZDSP_instInitDep(st_ZDISPATCH_DATA* dspdata, zScene* scene) { xSceneID2Name(globals.sceneCur, dspdata->id); } - void ZDSP_instReset(st_ZDISPATCH_DATA* dspdata, zScene* scene) { xBaseAsset* ass = dspdata->rawass; @@ -160,18 +147,15 @@ void ZDSP_instReset(st_ZDISPATCH_DATA* dspdata, zScene* scene) ZDSP_instInitDep(dspdata, scene); } - void ZDSP_readAsset(st_ZDISPATCH_DATA* dspdata) { } - void ZDSP_injectCmd(st_ZDISPATCH_DATA* dspdata, en_DISPATCH_COMMAND cmd) { ZDSP_injectCmd(dspdata, cmd, NULL, NULL, NULL); } - void ZDSP_injectCmd(st_ZDISPATCH_DATA* dspdata, en_DISPATCH_COMMAND cmd, int32 i) { int32 arr[2]; @@ -179,7 +163,6 @@ void ZDSP_injectCmd(st_ZDISPATCH_DATA* dspdata, en_DISPATCH_COMMAND cmd, int32 i ZDSP_injectCmd(dspdata, cmd, (void*)arr, NULL, NULL); } - void ZDSP_injectCmd(st_ZDISPATCH_DATA* dspdata, en_DISPATCH_COMMAND cmd, void* indata, void* inxtra, void* result) { @@ -191,7 +174,6 @@ void ZDSP_injectCmd(st_ZDISPATCH_DATA* dspdata, en_DISPATCH_COMMAND cmd, void* i ZDSP_doCommand(dspdata, &ctx); } - int32 ZDSP_doCommand(st_ZDISPATCH_DATA* dspdata, st_ZDISPATCH_CONTEXT* cmdCtxt) { int32 iv; @@ -363,7 +345,6 @@ int32 ZDSP_doCommand(st_ZDISPATCH_DATA* dspdata, st_ZDISPATCH_CONTEXT* cmdCtxt) return 1; } - void zDispatcherStoreOptions() { oldVibrationOption = globals.option_vibration; @@ -384,7 +365,6 @@ void zDispatcherRestoreOptions() } #endif - #if 0 // WIP // This switch is a mess, good luck. diff --git a/src/SB/Game/zEGenerator.cpp b/src/SB/Game/zEGenerator.cpp index 4c23ac8b..c7ed6ba7 100644 --- a/src/SB/Game/zEGenerator.cpp +++ b/src/SB/Game/zEGenerator.cpp @@ -111,9 +111,6 @@ void zEGenerator_Move(zEGenerator* egen, xScene* sc, float32 dt) { } - - - void zEGenerator_Render(zEGenerator* egen) { xEntRender((xEnt*)egen); diff --git a/src/SB/Game/zEnt.cpp b/src/SB/Game/zEnt.cpp index 6382d091..a6d9176f 100644 --- a/src/SB/Game/zEnt.cpp +++ b/src/SB/Game/zEnt.cpp @@ -36,7 +36,6 @@ extern float32 _1268_zEnt; extern float32 _1269_zEnt; extern float32 _1270_zEnt; - void zEntInit(zEnt* ent, xEntAsset* asset, uint32 type) { xEntInit(ent, asset); @@ -217,14 +216,12 @@ void zEntInit(zEnt* ent, xEntAsset* asset, uint32 type) xEntInitForType(ent); } - void zEntSetup(zEnt* ent) { xEntSetup(ent); checkpoint_collision_hack(ent); } - #ifdef NON_MATCHING // This can't OK right now because it has static locals that are in zDispatcher.s void checkpoint_collision_hack(zEnt* ent) @@ -266,19 +263,16 @@ void checkpoint_collision_hack(zEnt* ent) } #endif - void zEntSave(zEnt* ent, xSerial* s) { xEntSave(ent, s); } - void zEntLoad(zEnt* ent, xSerial* s) { xEntLoad(ent, s); } - void zEntReset(zEnt* ent) { xEntReset(ent); @@ -307,13 +301,11 @@ void zEntReset(zEnt* ent) checkpoint_collision_hack(ent); } - void zEntUpdate(zEnt* ent, zScene* scene, float32 elapsedSec) { xEntUpdate(ent, scene, elapsedSec); } - void zEntEventAll(xBase* from, uint32 fromEvent, uint32 toEvent, float32* toParam) { zScene* s = globals.sceneCur; @@ -323,7 +315,6 @@ void zEntEventAll(xBase* from, uint32 fromEvent, uint32 toEvent, float32* toPara } } - void zEntEventAllOfType(xBase* from, uint32 fromEvent, uint32 toEvent, float32* toParam, uint32 type) { @@ -343,7 +334,6 @@ void zEntEventAllOfType(xBase* from, uint32 fromEvent, uint32 toEvent, float32* } } - void zEntEventAllOfType(uint32 toEvent, uint32 type) { zEntEventAllOfType(NULL, 0, toEvent, NULL, type); @@ -406,7 +396,6 @@ xModelInstance* zEntRecurseModelInfo(void* info, xEnt* ent) } #endif - void zEntParseModelInfo(xEnt* ent, uint32 assetID) { uint32 bufsize[4]; @@ -765,7 +754,6 @@ void zEntAnimEvent_AutoAnim(zEnt* ent, uint32 animEvent, const float32* animPara } #endif - xModelAssetParam* zEntGetModelParams(uint32 assetID, uint32* size) { uint32 bufsize; @@ -788,7 +776,6 @@ xModelAssetParam* zEntGetModelParams(uint32 assetID, uint32* size) return NULL; } - int8* zParamGetString(xModelAssetParam* param, uint32 size, int8* tok, int8* def) { uint32 hash = xStrHash(tok); @@ -807,13 +794,11 @@ int8* zParamGetString(xModelAssetParam* param, uint32 size, int8* tok, int8* def return def; } - int32 zParamGetInt(xModelAssetParam* param, uint32 size, const int8* tok, int32 def) { return zParamGetInt(param, size, (int8*)tok, def); } - int32 zParamGetInt(xModelAssetParam* param, uint32 size, int8* tok, int32 def) { int8* str = zParamGetString(param, size, tok, NULL); @@ -824,13 +809,11 @@ int32 zParamGetInt(xModelAssetParam* param, uint32 size, int8* tok, int32 def) return def; } - float32 zParamGetFloat(xModelAssetParam* param, uint32 size, const int8* tok, float32 def) { return zParamGetFloat(param, size, (int8*)tok, def); } - float32 zParamGetFloat(xModelAssetParam* param, uint32 size, int8* tok, float32 def) { int8* str = zParamGetString(param, size, tok, NULL); @@ -841,14 +824,12 @@ float32 zParamGetFloat(xModelAssetParam* param, uint32 size, int8* tok, float32 return def; } - int32 zParamGetFloatList(xModelAssetParam* param, uint32 size, const int8* tok, int32 count, float32* def, float32* result) { return zParamGetFloatList(param, size, (int8*)tok, count, def, result); } - int32 zParamGetFloatList(xModelAssetParam* param, uint32 size, int8* tok, int32 count, float32* def, float32* result) { @@ -870,14 +851,12 @@ int32 zParamGetFloatList(xModelAssetParam* param, uint32 size, int8* tok, int32 return act; } - int32 zParamGetVector(xModelAssetParam* param, uint32 size, const int8* tok, xVec3 vec1, xVec3* vec2) { return zParamGetVector(param, size, (int8*)tok, vec1, vec2); } - int32 zParamGetVector(xModelAssetParam* param, uint32 size, int8* tok, xVec3 vec1, xVec3* vec2) { int8* str = zParamGetString(param, size, tok, NULL); @@ -910,7 +889,6 @@ int32 zParamGetVector(xModelAssetParam* param, uint32 size, int8* tok, xVec3 vec return list; } - void zEntGetShadowParams(xEnt* ent, xVec3* center, float32* radius, xEntShadow::radius_enum rtype) { *center = *xBoundCenter(&ent->bound); @@ -960,26 +938,22 @@ void zEntGetShadowParams(xEnt* ent, xVec3* center, float32* radius, xEntShadow:: } } - void xModelAnimCollStop(xModelInstance& m) { m.Flags = m.Flags & 0xe7ff; } - xMat4x3* xEntGetFrame(const xEnt* ent) { return xModelGetFrame(ent->model); } - void xSndPlay3D(uint32 id, float32 vol, float32 pitch, uint32 priority, uint32 flags, const xVec3* pos, float32 radius, sound_category category, float32 delay) { xSndPlay3D(id, vol, pitch, priority, flags, pos, radius * _1039_zEnt, radius, category, delay); } - int32 xNPCBasic::SelfType() const { return myNPCType; diff --git a/src/SB/Game/zEntCruiseBubble.cpp b/src/SB/Game/zEntCruiseBubble.cpp index 45eb9957..21962421 100644 --- a/src/SB/Game/zEntCruiseBubble.cpp +++ b/src/SB/Game/zEntCruiseBubble.cpp @@ -34,150 +34,151 @@ namespace cruise_bubble { -extern basic_rect screen_bounds; -// basic_rect default_adjust; -// int8 buffer[16]; -// int8 buffer[16]; -extern tweak_group normal_tweak; -extern tweak_group cheat_tweak; -extern tweak_group* current_tweak; -extern xBase base; -extern const char* start_anim_states[37]; // string array of names - -extern struct _class_36 -{ - int32 flags; - state_type* state[MAX_THREAD]; - // Offset: 0x10 - state_type* states[MAX_STATE]; - // Offset: 0x40 - xVec2 last_sp; - // Offset: 0x48 - xVec2 sp; - // Offset: 0x50 - xVec3 hit_loc; - // Offset: 0x5c - xVec3 hit_norm; - // Offset: 0x68 - xModelInstance* missle_model; - // Offset: 0x6c - xEnt* hits[32]; - // Offset: 0xec - int32 hits_size; - uint32 player_health; - xVec3 player_motion; - // Offset: 0x100 - float32 fov_default; - zShrapnelAsset* droplet_shrapnel; - float32 dialog_freq; - struct _class_45 - { - float32 samples; - float32 bubbles; - xMat4x3 mat; - xQuat dir; - } trail; - struct _class_6 - { - struct _class_8 + extern basic_rect screen_bounds; + // basic_rect default_adjust; + // int8 buffer[16]; + // int8 buffer[16]; + extern tweak_group normal_tweak; + extern tweak_group cheat_tweak; + extern tweak_group* current_tweak; + extern xBase base; + extern const char* start_anim_states[37]; // string array of names + + extern struct _class_36 + { + int32 flags; + state_type* state[MAX_THREAD]; + // Offset: 0x10 + state_type* states[MAX_STATE]; + // Offset: 0x40 + xVec2 last_sp; + // Offset: 0x48 + xVec2 sp; + // Offset: 0x50 + xVec3 hit_loc; + // Offset: 0x5c + xVec3 hit_norm; + // Offset: 0x68 + xModelInstance* missle_model; + // Offset: 0x6c + xEnt* hits[32]; + // Offset: 0xec + int32 hits_size; + uint32 player_health; + xVec3 player_motion; + // Offset: 0x100 + float32 fov_default; + zShrapnelAsset* droplet_shrapnel; + float32 dialog_freq; + struct _class_45 { - xAnimState* aim; - xAnimState* fire; - xAnimState* idle; - } player; - struct _class_16 + float32 samples; + float32 bubbles; + xMat4x3 mat; + xQuat dir; + } trail; + struct _class_6 { - // Offset: 0x170 - xAnimState* fire; - xAnimState* fly; - } missle; - } astate; - struct _class_25 - { - struct _class_28 + struct _class_8 + { + xAnimState* aim; + xAnimState* fire; + xAnimState* idle; + } player; + struct _class_16 + { + // Offset: 0x170 + xAnimState* fire; + xAnimState* fly; + } missle; + } astate; + struct _class_25 { - xAnimTransition* aim; - xAnimTransition* fire; - xAnimTransition* idle; - xAnimTransition* end; - } player; - struct _class_33 + struct _class_28 + { + xAnimTransition* aim; + xAnimTransition* fire; + xAnimTransition* idle; + xAnimTransition* end; + } player; + struct _class_33 + { + xAnimTransition* fly; + } missle; + } atran; + } shared; + extern xMat4x3 start_cam_mat; + extern fixed_queue missle_record; + extern xFXRibbon wake_ribbon[2]; + extern xDecalEmitter explode_decal; + extern const xFXRibbon::curve_node wake_ribbon_curve[2]; + extern const xFXRibbon::curve_node cheat_wake_ribbon_curve[2]; + extern const xDecalEmitter::curve_node explode_curve[3]; + extern const xDecalEmitter::curve_node cheat_explode_curve[3]; + extern sound_config sounds[4]; + // quadrant_set qzone; + + extern struct _class_17 + { + bool hiding; + float32 alpha; + float32 alpha_vel; + float32 glow; + float32 glow_vel; + + // Offset 0x14 + struct _class_21 { - xAnimTransition* fly; - } missle; - } atran; -} shared; -extern xMat4x3 start_cam_mat; -extern fixed_queue missle_record; -extern xFXRibbon wake_ribbon[2]; -extern xDecalEmitter explode_decal; -extern const xFXRibbon::curve_node wake_ribbon_curve[2]; -extern const xFXRibbon::curve_node cheat_wake_ribbon_curve[2]; -extern const xDecalEmitter::curve_node explode_curve[3]; -extern const xDecalEmitter::curve_node cheat_explode_curve[3]; -extern sound_config sounds[4]; -// quadrant_set qzone; - -extern struct _class_17 -{ - bool hiding; - float32 alpha; - float32 alpha_vel; - float32 glow; - float32 glow_vel; - - // Offset 0x14 - struct _class_21 - { - xModelInstance* reticle; - xModelInstance* target; - xModelInstance* swirl; - xModelInstance* wind; - } model; - // Offset 0x24 - hud_gizmo gizmo[33]; - // Offset 0x654 - uint32 gizmos_used; - // Offset 0x658 - uv_animated_model uv_swirl; - // Offset 0x674 - uv_animated_model uv_wind; -} hud; -// void (*xAnimDefaultBeforeEnter)(xAnimPlay*, xAnimState*); -// uint32 (*check_anim_aim)(xAnimTransition*, xAnimSingle*, void*); -// zGlobals globals; -// RpAtomic* (*AtomicDefaultRenderCallBack)(RpAtomic*); -// RpAtomic* (*custom_bubble_render)(RpAtomic*); -// iColor_tag g_WHITE; -// uint32 gActiveHeap; -// _anon0 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @20state_camera_restore; -// _anon5 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @10state_type; -// _anon6 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @19state_camera_survey; -// _anon1 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @19state_camera_attach; -// _anon9 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @18state_camera_seize; -// _anon10 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @16state_camera_aim; -// _anon3 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @20state_missle_explode; -// _anon7 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @16state_missle_fly; -// _anon2 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @19state_missle_appear; -// _anon4 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @17state_player_wait; -// _anon8 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @17state_player_fire; -// _anon11 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @16state_player_aim; -// _anon12 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @17state_player_halt; -// RpAtomic* (*gAtomicRenderCallBack)(RpAtomic*); -// uint32 gFXSurfaceFlags; -// xVec3 m_UnitAxisY; -// xGrid npcs_grid; -// xGrid colls_oso_grid; -// xGrid colls_grid; -// uint8 (*hazard_check)(NPCHazard&, void*); -// xQCControl xqc_def_ctrl; -// void (*SweptSphereHitsCameraEnt)(xScene*, xRay3*, xQCData*, xEnt*, void*); -// void (*cb_droplet)(zFrag*, zFragAsset*); -// uint8 (*hazard_check)(NPCHazard&, void*); -// uint8 (*hazard_check)(NPCHazard&, void*); -// int32 gGridIterActive; - -extern const char stringBase0[]; // "Idle01\0Idle02\0Idle03\0Idle04\0Idle05\0Idle06\0Idle07\0Idle08\0Idle09\0Idle10\0Idle11\0Idle12\0Idle13\0SlipIdle01\0Inactive01\0Inactive02\0Inactive03\0Inactive04\0Inactive05\0Inactive06\0Inactive07\0Inactive08\0Inactive09\0Inactive10\0Walk01\0Run01\0Run02\0Run03\0Land01\0LandRun01\0LandHigh01\0WallLand01\0Hit01\0Hit02\0Hit03\0Hit04\0Hit05\0SB_cruise_start\0SB_cruise_hit\0SB_cruise_nav_loop\0cruise_bubble_bind.MINF\0lightning\0Wake Ribbon 0\0Player|Cruise Bubble|Wake Ribbon 0|\0Wake Ribbon 1\0Player|Cruise Bubble|Wake Ribbon 1|\0par_cruise_explode\0Cruise Bubble Explosion\0cruise_bubble_droplet_shrapnel\0.minf\0.dff\0ui_3dicon_reticle\0ui_3dicon_target_lock\0ui_3dicon_missile_frame02\0%02d:%02d\0aura2\0aim_delay\0player.halt_time\0player.aim.turn_speed\0player.aim.anim_delta\0player.fire.delay_wand\0missle.life\0missle.hit_dist\0missle.crash_angle\0missle.collide_twist\0missle.hit_tests\0missle.appear.delay_show\0missle.appear.delay_fly\0missle.appear.offset\0missle.fly.accel\0missle.fly.max_vel\0missle.fly.engine_pitch_max\0missle.fly.engine_pitch_sensitivity\0missle.fly.flash_interval\0missle.fly.turn.xdelta\0missle.fly.turn.ydelta\0missle.fly.turn.xdecay\0missle.fly.turn.ydecay\0missle.fly.turn.ybound\0missle.fly.turn.roll_frac\0missle.explode.hit_radius\0missle.explode.hit_duration\0camera.aim.dist\0camera.aim.height\0camera.aim.pitch\0camera.aim.accel\0camera.aim.max_vel\0camera.aim.stick_decel\0camera.aim.stick_accel\0camera.aim.stick_max_vel\0camera.aim.turn_speed\0camera.seize.delay\0camera.seize.blend_time\0camera.seize.fade_dist\0camera.seize.hide_dist\0camera.seize.fov\0camera.survey.duration\0camera.survey.min_duration\0camera.survey.min_dist\0camera.survey.cut_dist\0camera.survey.drift_dist\0camera.survey.drift_softness\0camera.survey.jerk_offset\0camera.survey.jerk_deflect\0camera.restore.control_delay\0material.env_alpha\0material.env_coeff\0material.fresnel_alpha\0material.fresnel_coeff\0reticle.dist_min\0reticle.dist_max\0reticle.ang_show\0reticle.ang_hide\0reticle.delay_retarget\0trail.sample_rate\0trail.bubble_rate\0trail.bubble_emit_radius\0trail.wake_emit_radius\0blast.emit\0blast.radius\0blast.vel\0blast.rand_vel\0droplet.dist_min\0droplet.dist_max\0droplet.emit_min\0droplet.emit_max\0droplet.vel_min\0droplet.vel_max\0droplet.vel_perturb\0droplet.vel_angle\0droplet.rot_vel_max\0hud.glow_size\0hud.time_fade\0hud.time_glow\0hud.wind.size\0hud.wind.du\0hud.wind.dv\0hud.reticle.size\0hud.target.size\0hud.timer.font\0hud.timer.font_width\0hud.timer.font_height\0hud.timer.x\0hud.timer.y\0hud.timer.glow_size\0dialog.freq\0dialog.decay\0dialog.min_freq\0gloss_edge\0rainbowfilm_smooth32\0cruise_bubble_aim\0cruise_bubble_fire\0cruise_bubble_idle\0cruise_bubble_aim cruise_bubble_fire cruise_bubble_idle\0Cruise Bubble\0fire\0fly\0\0\0\0" + xModelInstance* reticle; + xModelInstance* target; + xModelInstance* swirl; + xModelInstance* wind; + } model; + // Offset 0x24 + hud_gizmo gizmo[33]; + // Offset 0x654 + uint32 gizmos_used; + // Offset 0x658 + uv_animated_model uv_swirl; + // Offset 0x674 + uv_animated_model uv_wind; + } hud; + // void (*xAnimDefaultBeforeEnter)(xAnimPlay*, xAnimState*); + // uint32 (*check_anim_aim)(xAnimTransition*, xAnimSingle*, void*); + // zGlobals globals; + // RpAtomic* (*AtomicDefaultRenderCallBack)(RpAtomic*); + // RpAtomic* (*custom_bubble_render)(RpAtomic*); + // iColor_tag g_WHITE; + // uint32 gActiveHeap; + // _anon0 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @20state_camera_restore; + // _anon5 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @10state_type; + // _anon6 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @19state_camera_survey; + // _anon1 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @19state_camera_attach; + // _anon9 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @18state_camera_seize; + // _anon10 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @16state_camera_aim; + // _anon3 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @20state_missle_explode; + // _anon7 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @16state_missle_fly; + // _anon2 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @19state_missle_appear; + // _anon4 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @17state_player_wait; + // _anon8 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @17state_player_fire; + // _anon11 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @16state_player_aim; + // _anon12 __vt__Q313cruise_bubble30 @unnamed @zEntCruiseBubble_cpp @17state_player_halt; + // RpAtomic* (*gAtomicRenderCallBack)(RpAtomic*); + // uint32 gFXSurfaceFlags; + // xVec3 m_UnitAxisY; + // xGrid npcs_grid; + // xGrid colls_oso_grid; + // xGrid colls_grid; + // uint8 (*hazard_check)(NPCHazard&, void*); + // xQCControl xqc_def_ctrl; + // void (*SweptSphereHitsCameraEnt)(xScene*, xRay3*, xQCData*, xEnt*, void*); + // void (*cb_droplet)(zFrag*, zFragAsset*); + // uint8 (*hazard_check)(NPCHazard&, void*); + // uint8 (*hazard_check)(NPCHazard&, void*); + // int32 gGridIterActive; + + extern const char stringBase0 + []; // "Idle01\0Idle02\0Idle03\0Idle04\0Idle05\0Idle06\0Idle07\0Idle08\0Idle09\0Idle10\0Idle11\0Idle12\0Idle13\0SlipIdle01\0Inactive01\0Inactive02\0Inactive03\0Inactive04\0Inactive05\0Inactive06\0Inactive07\0Inactive08\0Inactive09\0Inactive10\0Walk01\0Run01\0Run02\0Run03\0Land01\0LandRun01\0LandHigh01\0WallLand01\0Hit01\0Hit02\0Hit03\0Hit04\0Hit05\0SB_cruise_start\0SB_cruise_hit\0SB_cruise_nav_loop\0cruise_bubble_bind.MINF\0lightning\0Wake Ribbon 0\0Player|Cruise Bubble|Wake Ribbon 0|\0Wake Ribbon 1\0Player|Cruise Bubble|Wake Ribbon 1|\0par_cruise_explode\0Cruise Bubble Explosion\0cruise_bubble_droplet_shrapnel\0.minf\0.dff\0ui_3dicon_reticle\0ui_3dicon_target_lock\0ui_3dicon_missile_frame02\0%02d:%02d\0aura2\0aim_delay\0player.halt_time\0player.aim.turn_speed\0player.aim.anim_delta\0player.fire.delay_wand\0missle.life\0missle.hit_dist\0missle.crash_angle\0missle.collide_twist\0missle.hit_tests\0missle.appear.delay_show\0missle.appear.delay_fly\0missle.appear.offset\0missle.fly.accel\0missle.fly.max_vel\0missle.fly.engine_pitch_max\0missle.fly.engine_pitch_sensitivity\0missle.fly.flash_interval\0missle.fly.turn.xdelta\0missle.fly.turn.ydelta\0missle.fly.turn.xdecay\0missle.fly.turn.ydecay\0missle.fly.turn.ybound\0missle.fly.turn.roll_frac\0missle.explode.hit_radius\0missle.explode.hit_duration\0camera.aim.dist\0camera.aim.height\0camera.aim.pitch\0camera.aim.accel\0camera.aim.max_vel\0camera.aim.stick_decel\0camera.aim.stick_accel\0camera.aim.stick_max_vel\0camera.aim.turn_speed\0camera.seize.delay\0camera.seize.blend_time\0camera.seize.fade_dist\0camera.seize.hide_dist\0camera.seize.fov\0camera.survey.duration\0camera.survey.min_duration\0camera.survey.min_dist\0camera.survey.cut_dist\0camera.survey.drift_dist\0camera.survey.drift_softness\0camera.survey.jerk_offset\0camera.survey.jerk_deflect\0camera.restore.control_delay\0material.env_alpha\0material.env_coeff\0material.fresnel_alpha\0material.fresnel_coeff\0reticle.dist_min\0reticle.dist_max\0reticle.ang_show\0reticle.ang_hide\0reticle.delay_retarget\0trail.sample_rate\0trail.bubble_rate\0trail.bubble_emit_radius\0trail.wake_emit_radius\0blast.emit\0blast.radius\0blast.vel\0blast.rand_vel\0droplet.dist_min\0droplet.dist_max\0droplet.emit_min\0droplet.emit_max\0droplet.vel_min\0droplet.vel_max\0droplet.vel_perturb\0droplet.vel_angle\0droplet.rot_vel_max\0hud.glow_size\0hud.time_fade\0hud.time_glow\0hud.wind.size\0hud.wind.du\0hud.wind.dv\0hud.reticle.size\0hud.target.size\0hud.timer.font\0hud.timer.font_width\0hud.timer.font_height\0hud.timer.x\0hud.timer.y\0hud.timer.glow_size\0dialog.freq\0dialog.decay\0dialog.min_freq\0gloss_edge\0rainbowfilm_smooth32\0cruise_bubble_aim\0cruise_bubble_fire\0cruise_bubble_idle\0cruise_bubble_aim cruise_bubble_fire cruise_bubble_idle\0Cruise Bubble\0fire\0fly\0\0\0\0" } // namespace cruise_bubble @@ -285,7 +286,7 @@ void cruise_bubble::stop_sound(int32 which, uint32 handle) { handle = s->handle; } - + if (handle != 0) { xSndStop(handle); @@ -294,7 +295,6 @@ void cruise_bubble::stop_sound(int32 which, uint32 handle) s->handle = 0; } - // will match once file is complete, see comment below #if 0 uint32 cruise_bubble::play_sound(int32 which, float32 volFactor) @@ -340,7 +340,6 @@ uint32 cruise_bubble::play_sound(int32 which, float32 volFactor) } #endif - // will match once file is complete, see comment below #if 0 uint32 cruise_bubble::play_sound(int32 which, float32 volFactor, const xVec3* pos) @@ -380,11 +379,11 @@ void cruise_bubble::set_pitch(int32 which, float32 pitch, uint32 handle) { for (int32 i = s->first; i <= s->last; ++i) { - zEntPlayer_SNDSetPitch((_tagePlayerSnd) i, pitch); + zEntPlayer_SNDSetPitch((_tagePlayerSnd)i, pitch); } return; } - + if (handle == 0) { handle = s->handle; @@ -430,7 +429,6 @@ void cruise_bubble::release_camera() xCameraDoCollisions(1, 1); } - #ifdef NON_MATCHING bool cruise_bubble::camera_taken() { @@ -453,99 +451,103 @@ void cruise_bubble::start_damaging() namespace cruise_bubble { -namespace -{ - + namespace + { #ifndef NON_MATCHING -void damage_entity(xEnt& ent, const xVec3& loc, const xVec3& dir, const xVec3& hit_norm, float32 radius, bool explosive); + void damage_entity(xEnt& ent, const xVec3& loc, const xVec3& dir, const xVec3& hit_norm, + float32 radius, bool explosive); #else -void damage_entity(xEnt& ent, const xVec3& loc, const xVec3& dir, const xVec3& hit_norm, float32 radius, bool explosive) -{ - if (shared.hits_size >= 32) - { - return; - } - shared.hits[shared.hits_size] = &ent; - shared.hits_size++; - - switch (ent.baseType) { - case eBaseTypeButton: - zEntButton_Press((_zEntButton*) &ent, 0x10); - return; - - case eBaseTypeDestructObj: - zEntDestructObj_Hit((zEntDestructObj*) &ent, 0x10000); - return; - - case eBaseTypePlatform: - switch (ent.subType) { - case 0xc: - if ((((zPlatform*) &ent)->passet->paddle.paddleFlags & 0x20) == 0) + void damage_entity(xEnt& ent, const xVec3& loc, const xVec3& dir, const xVec3& hit_norm, + float32 radius, bool explosive) + { + if (shared.hits_size >= 32) { return; } + shared.hits[shared.hits_size] = &ent; + shared.hits_size++; - xCollis coll; - coll.optr = &ent; - coll.mptr = ent.collModel != NULL ? ent.collModel : ent.model; - - if (explosive != 0) + switch (ent.baseType) { - coll.flags = 0x600; + case eBaseTypeButton: + zEntButton_Press((_zEntButton*)&ent, 0x10); + return; - xSphere o; - o.center = loc; - o.r = radius; - xSphereHitsBound(&o, &ent.bound, &coll); + case eBaseTypeDestructObj: + zEntDestructObj_Hit((zEntDestructObj*)&ent, 0x10000); + return; - if ((coll.flags & 0x1) == 0) + case eBaseTypePlatform: + switch (ent.subType) { - return; - } + case 0xc: + if ((((zPlatform*)&ent)->passet->paddle.paddleFlags & 0x20) == 0) + { + return; + } - if (ent.collLev == 0x5) - { - xSphereHitsModel(&o, coll.mptr, &coll); + xCollis coll; + coll.optr = &ent; + coll.mptr = ent.collModel != NULL ? ent.collModel : ent.model; - if ((coll.flags & 0x1) == 0) + if (explosive != 0) { + coll.flags = 0x600; + + xSphere o; + o.center = loc; + o.r = radius; + xSphereHitsBound(&o, &ent.bound, &coll); + + if ((coll.flags & 0x1) == 0) + { + return; + } + + if (ent.collLev == 0x5) + { + xSphereHitsModel(&o, coll.mptr, &coll); + + if ((coll.flags & 0x1) == 0) + { + return; + } + } + + xVec3 hit_dir = coll.tohit.up_normal(); + zPlatform_PaddleCollide(&coll, &loc, &hit_dir, 0x1); return; } + + coll.flags = 0x201; + coll.norm = hit_norm; + zPlatform_PaddleCollide(&coll, &loc, &dir, 1); + return; } + break; - xVec3 hit_dir = coll.tohit.up_normal(); - zPlatform_PaddleCollide(&coll, &loc, &hit_dir, 0x1); + case eBaseTypeNPC: + if (explosive) + { + // fuck this... weird scheduling + xVec3 edir = (*xEntGetCenter(&ent) - loc).up_normal(); + ((zNPCCommon*)&ent)->Damage(DMGTYP_CRUISEBUBBLE, &base, &edir); + } + else + { + // while this matches + ((zNPCCommon*)&ent)->Damage(DMGTYP_CRUISEBUBBLE, &base, &dir); + } return; } - coll.flags = 0x201; - coll.norm = hit_norm; - zPlatform_PaddleCollide(&coll, &loc, &dir,1); - return; - } - break; - - case eBaseTypeNPC: - if (explosive) - { - // fuck this... weird scheduling - xVec3 edir = (*xEntGetCenter(&ent) - loc).up_normal(); - ((zNPCCommon*) &ent)->Damage(DMGTYP_CRUISEBUBBLE, &base, &edir); + zEntEvent(&ent, 0x1c7); } - else { - // while this matches - ((zNPCCommon*) &ent)->Damage(DMGTYP_CRUISEBUBBLE, &base, &dir); - } - return; - } - - zEntEvent(&ent, 0x1c7); -} #endif -} -} + } // namespace +} // namespace cruise_bubble uint8 cruise_bubble::can_damage(xEnt* ent) { @@ -558,12 +560,11 @@ uint8 cruise_bubble::can_damage(xEnt* ent) return false; } if (ent->baseType == eBaseTypeDestructObj && - zEntDestructObj_isDestroyed((zEntDestructObj*) ent) != 0) + zEntDestructObj_isDestroyed((zEntDestructObj*)ent) != 0) { return false; } - if (ent->baseType == eBaseTypeNPC && - !((zNPCCommon*) ent)->IsHealthy()) + if (ent->baseType == eBaseTypeNPC && !((zNPCCommon*)ent)->IsHealthy()) { return false; } @@ -581,7 +582,7 @@ uint8 cruise_bubble::was_damaged(xEnt* ent) // ... but this does xEnt** i = shared.hits; xEnt** n = i + shared.hits_size; - for ( ; i != n; ++i) + for (; i != n; ++i) { if (ent == *i) { @@ -596,7 +597,7 @@ void cruise_bubble::notify_triggers(xScene& s, const xSphere& o, const xVec3& di { zEntTrigger** it = (zEntTrigger**)s.trigs; zEntTrigger** end = it + s.num_trigs; - for ( ; it != end; ++it) + for (; it != end; ++it) { zEntTrigger& trig = **it; @@ -608,7 +609,7 @@ void cruise_bubble::notify_triggers(xScene& s, const xSphere& o, const xVec3& di bool want_exit = false; xLinkAsset* link = trig.link; xLinkAsset* end_link = link + trig.linkCount; - for ( ; link != end_link; ++link) + for (; link != end_link; ++link) { if (link->srcEvent == 0x201) { @@ -634,10 +635,12 @@ void cruise_bubble::notify_triggers(xScene& s, const xSphere& o, const xVec3& di trig.entered = trig.entered & 0xfffffffd; } - if (want_enter && inside) { + if (want_enter && inside) + { zEntEvent(&trig, 0x201); } - else if (want_exit && !inside) { + else if (want_exit && !inside) + { zEntEvent(&trig, 0x202); } } @@ -655,7 +658,7 @@ void cruise_bubble::exit_triggers(xScene& s) it = (zEntTrigger**)s.trigs; end = it + s.num_trigs; - for ( ; it != end; ++it) + for (; it != end; ++it) { trig = *it; @@ -669,7 +672,7 @@ void cruise_bubble::exit_triggers(xScene& s) link = trig->link; end_link = link + trig->linkCount; - for ( ; link != end_link; ++link) + for (; link != end_link; ++link) { if (link->srcEvent == 0x202) { @@ -693,7 +696,6 @@ void cruise_bubble::refresh_trail(xMat4x3& mat, xQuat& quat) xQuatFromMat(&quat, &mat); } - #ifdef NON_MATCHING void cruise_bubble::start_trail() { @@ -701,7 +703,7 @@ void cruise_bubble::start_trail() { return; } - + shared.flags = shared.flags | 0x180; shared.fov_default = zEntCruiseBubble_f_0_0; shared.dialog_freq = zEntCruiseBubble_f_0_0; @@ -731,7 +733,6 @@ void cruise_bubble::set_state(cruise_bubble::thread_enum thread, cruise_bubble:: } } - #if 0 void cruise_bubble::state_type::start() { @@ -739,7 +740,6 @@ void cruise_bubble::state_type::start() } #endif - #if 0 void cruise_bubble::state_type::stop() { @@ -749,11 +749,10 @@ void cruise_bubble::state_type::stop() bool cruise_bubble::check_launch() { - // this can surely be written better and still OK + // this can surely be written better and still OK bool can_cruise_bubble = false; - if (!globals.player.ControlOff && !globals.player.cheat_mode && - globals.player.g.PowerUp[1] && globals.player.s->pcType == ePlayer_SB && - (globals.pad0->pressed & 0x100)) + if (!globals.player.ControlOff && !globals.player.cheat_mode && globals.player.g.PowerUp[1] && + globals.player.s->pcType == ePlayer_SB && (globals.pad0->pressed & 0x100)) { can_cruise_bubble = true; } @@ -761,7 +760,7 @@ bool cruise_bubble::check_launch() { return false; } - + xAnimState* state = globals.player.ent.model->Anim->Single->State; for (uint32 i = 0; i < 37; ++i) { @@ -778,7 +777,8 @@ void cruise_bubble::kill(bool reset_camera, bool abortive) { if (abortive) { - for (int32 i = THREAD_PLAYER; i < MAX_THREAD; ++i) { + for (int32 i = THREAD_PLAYER; i < MAX_THREAD; ++i) + { if (shared.state[i] != NULL) { (shared.state[i])->abort(); @@ -786,10 +786,12 @@ void cruise_bubble::kill(bool reset_camera, bool abortive) } } } - else { - for (int32 i = THREAD_PLAYER; i < MAX_THREAD; ++i) { + else + { + for (int32 i = THREAD_PLAYER; i < MAX_THREAD; ++i) + { // either STATE_INVALID or BACKUP_STATE_PLAYER, both == 0x11111111 - set_state((thread_enum) i, STATE_INVALID); + set_state((thread_enum)i, STATE_INVALID); } } @@ -808,13 +810,14 @@ void cruise_bubble::kill(bool reset_camera, bool abortive) stop_trail(); distort_screen(zEntCruiseBubble_f_0_0); xSndSelectListenerMode(SND_LISTENER_MODE_PLAYER); - + xAnimState* state = globals.player.ent.model->Anim->Single->State; - if (state == shared.astate.player.aim || - state == shared.astate.player.fire || + if (state == shared.astate.player.aim || state == shared.astate.player.fire || state == shared.astate.player.idle) { - xAnimPlayStartTransition(globals.player.ent.model->Anim, shared.atran.player.end); // [xAnimPlayStartTransition__FP9xAnimPlayP15xAnimTransition] + xAnimPlayStartTransition( + globals.player.ent.model->Anim, + shared.atran.player.end); // [xAnimPlayStartTransition__FP9xAnimPlayP15xAnimTransition] } exit_triggers(*globals.sceneCur); } @@ -824,7 +827,6 @@ void cruise_bubble::distort_screen(float32) // emtpy } - #if 0 void cruise_bubble::state_type::abort() { @@ -832,7 +834,6 @@ void cruise_bubble::state_type::abort() } #endif - #ifdef NON_MATCHING void cruise_bubble::update_player(xScene& s, float32 dt) { @@ -841,8 +842,8 @@ void cruise_bubble::update_player(xScene& s, float32 dt) xVec3 drive_motion; bool stop = zEntPlayer_MinimalUpdate(&globals.player.ent, &s, dt, drive_motion) || - globals.player.Health < shared.player_health; - + globals.player.Health < shared.player_health; + if (!stop) { shared.player_motion += get_player_loc() - pre_update_loc - drive_motion; @@ -852,7 +853,7 @@ void cruise_bubble::update_player(xScene& s, float32 dt) stop = true; } } - + if (stop) { kill(true, false); @@ -878,7 +879,8 @@ void cruise_bubble::refresh_controls() void cruise_bubble::update_state(xScene* s, float32 dt) { - for (int32 i = THREAD_PLAYER; i < MAX_THREAD; ++i) { + for (int32 i = THREAD_PLAYER; i < MAX_THREAD; ++i) + { state_type** state = &shared.state[i]; state_enum newtype; @@ -917,7 +919,6 @@ void cruise_bubble::render_state() } } - #if 0 void cruise_bubble::state_type::render() { @@ -925,7 +926,6 @@ void cruise_bubble::state_type::render() } #endif - cruise_bubble::state_camera_restore::state_camera_restore() : state_type(STATE_CAMERA_RESTORE) { } @@ -983,7 +983,7 @@ void cruise_bubble::init_missle_model() { // stringBase0 + 0x163 == "cruise_bubble_bind.MINF" uint32 aid = xStrHash(stringBase0 + 0x163); - xEnt* ent = (xEnt*) xSTFindAsset(aid, NULL); + xEnt* ent = (xEnt*)xSTFindAsset(aid, NULL); xModelInstance* model = zEntRecurseModelInfo(ent, NULL); model->PipeFlags = model->PipeFlags & 0xffffffcf | 0x10; @@ -996,7 +996,6 @@ void cruise_bubble::init_missle_model() shared.missle_model = model; } - #ifdef NON_MATCHING // `stringBase0 + 0x17b` gets cached in r31 where original asm reloads it everytime @@ -1008,7 +1007,6 @@ void cruise_bubble::reset_wake_ribbons() wake_ribbon[0].cfg.blend_src = 5; wake_ribbon[0].cfg.blend_dst = 2; - if ((shared.flags & 0x200) == 0) { // stringBase0 + 0x17b == "lightning" @@ -1019,7 +1017,8 @@ void cruise_bubble::reset_wake_ribbons() wake_ribbon[0].cfg.life_time = zEntCruiseBubble_f_3_0; } - else { + else + { wake_ribbon[0].set_texture(stringBase0 + 0x17b); wake_ribbon[1].set_texture(stringBase0 + 0x17b); wake_ribbon[0].set_curve(&cheat_wake_ribbon_curve[0], 2); @@ -1029,7 +1028,7 @@ void cruise_bubble::reset_wake_ribbons() } wake_ribbon[0].cfg.pivot = zEntCruiseBubble_f_1_0; wake_ribbon[1].cfg = wake_ribbon[0].cfg; - + wake_ribbon[0].refresh_config(); wake_ribbon[1].refresh_config(); } @@ -1045,7 +1044,6 @@ xFXRibbon::config& xFXRibbon::config::operator=(const xFXRibbon::config& other) return *this; } - void cruise_bubble::init_wake_ribbons() { // stringBase0 + 0x185 == "Wake Ribbon 0" @@ -1081,7 +1079,6 @@ void cruise_bubble::reset_explode_decal() explode_decal.refresh_config(); } - #ifdef NON_MATCHING void cruise_bubble::init_explode_decal() @@ -1104,10 +1101,8 @@ void cruise_bubble::init_explode_decal() void cruise_bubble::init_shrapnel() { - shared.droplet_shrapnel = (zShrapnelAsset*) xSTFindAsset(xStrHash(stringBase0 + 0x214), NULL); + shared.droplet_shrapnel = (zShrapnelAsset*)xSTFindAsset(xStrHash(stringBase0 + 0x214), NULL); } - - #ifdef NON_MATCHING void cruise_bubble::update_trail(float32 dt) @@ -1121,7 +1116,7 @@ void cruise_bubble::update_trail(float32 dt) } shared.trail.samples += dt * current_tweak->trail.sample_rate; - int32 samples = (int32) shared.trail.samples; + int32 samples = (int32)shared.trail.samples; if (samples <= 0) { @@ -1131,7 +1126,7 @@ void cruise_bubble::update_trail(float32 dt) else { // float cast - shared.trail.samples -= (float32) samples; + shared.trail.samples -= (float32)samples; } xMat4x3 end_mat; @@ -1139,7 +1134,7 @@ void cruise_bubble::update_trail(float32 dt) refresh_trail(end_mat, end_dir); // float cast - float32 ds = zEntCruiseBubble_f_1_0 / (float32) samples; + float32 ds = zEntCruiseBubble_f_1_0 / (float32)samples; float32 ddt = dt * ds; xVec3 dloc = (end_mat.pos - shared.trail.mat.pos) * ds; int32 flip = 0; @@ -1148,7 +1143,8 @@ void cruise_bubble::update_trail(float32 dt) xMat4x3 mat[2]; mat[0] = shared.trail.mat; - for (int i = 0; i < samples; ++i) { + for (int i = 0; i < samples; ++i) + { xMat4x3* mat0 = mat + flip; flip = flip ^ 1; xMat4x3* mat1 = mat + flip; @@ -1186,7 +1182,8 @@ void cruise_bubble::update_missle(xScene& s, float32 dt) void cruise_bubble::render_missle() { xModelInstance* m = shared.missle_model; - if ((m->Flags & 1) == 0) { + if ((m->Flags & 1) == 0) + { return; } xModelRender(m); @@ -1198,25 +1195,25 @@ xModelInstance* cruise_bubble::load_model(uint32 aid) xModelInstance* model; uint32 size; - model = (xModelInstance*) xSTFindAsset(xStrHashCat(aid, stringBase0 + 0x233), &size); + model = (xModelInstance*)xSTFindAsset(xStrHashCat(aid, stringBase0 + 0x233), &size); if (model != NULL) { model = zEntRecurseModelInfo(model, NULL); return model; } - model = (xModelInstance*) xSTFindAsset(aid, &size); + model = (xModelInstance*)xSTFindAsset(aid, &size); if (model == NULL) { - model = (xModelInstance*) xSTFindAsset(xStrHashCat(aid, stringBase0 + 0x239), &size); + model = (xModelInstance*)xSTFindAsset(xStrHashCat(aid, stringBase0 + 0x239), &size); } - if (model == NULL) { + if (model == NULL) + { return NULL; } - return xModelInstanceAlloc((RpAtomic*) model, NULL, 0, 0, NULL); + return xModelInstanceAlloc((RpAtomic*)model, NULL, 0, 0, NULL); } - #ifdef NON_MATCHING void cruise_bubble::init_hud() { @@ -1243,29 +1240,33 @@ void cruise_bubble::init_hud() bool cruise_bubble::uv_animated_model::init(RpAtomic* m) { this->model = m; - if (m == NULL) { + if (m == NULL) + { return false; } - if (!this->clone_uv(this->uv, this->uvsize, m)) { + if (!this->clone_uv(this->uv, this->uvsize, m)) + { return false; } - + this->offset.assign(zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_0); this->offset_vel.assign(zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_0); return true; } -bool cruise_bubble::uv_animated_model::clone_uv(RwTexCoords*& coords, int32& size, RpAtomic* m) const +bool cruise_bubble::uv_animated_model::clone_uv(RwTexCoords*& coords, int32& size, + RpAtomic* m) const { RwTexCoords* c; if (!this->get_uv(c, size, m)) { return false; } - - coords = (RwTexCoords*) xMemAlloc(gActiveHeap, size * 8, 0); - if (coords == NULL) { + + coords = (RwTexCoords*)xMemAlloc(gActiveHeap, size * 8, 0); + if (coords == NULL) + { return false; } @@ -1283,7 +1284,7 @@ bool cruise_bubble::uv_animated_model::get_uv(RwTexCoords*& coords, int32& size, { return false; } - + size = geo->numVertices; if (!(size > 0)) { @@ -1309,15 +1310,12 @@ void cruise_bubble::show_gizmo(hud_gizmo& gizmo, const basic_rect& rect void cruise_bubble::update_gizmo(cruise_bubble::hud_gizmo& gizmo, float32 dt) { - gizmo.alpha = range_limit(gizmo.alpha_vel * dt + gizmo.alpha, - zEntCruiseBubble_f_0_0, - zEntCruiseBubble_f_1_0); - gizmo.glow = range_limit(gizmo.glow_vel * dt + gizmo.glow, - zEntCruiseBubble_f_0_0, - zEntCruiseBubble_f_1_0); + gizmo.alpha = range_limit(gizmo.alpha_vel * dt + gizmo.alpha, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0); + gizmo.glow = range_limit(gizmo.glow_vel * dt + gizmo.glow, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0); } - #ifdef NON_MATCHING void cruise_bubble::flash_hud() { @@ -1327,11 +1325,10 @@ void cruise_bubble::flash_hud() } #endif - #ifdef NON_MATCHING void cruise_bubble::render_timer(float32 alpha, float32 glow) { - state_missle_fly* state = (state_missle_fly*) shared.state[THREAD_MISSLE]; + state_missle_fly* state = (state_missle_fly*)shared.state[THREAD_MISSLE]; if (state == NULL || state->type != STATE_MISSLE_FLY) { return; @@ -1340,20 +1337,19 @@ void cruise_bubble::render_timer(float32 alpha, float32 glow) float32 life = state->life; char buffer[16]; // stringBase0 + 0x280 == "%02d:%02d" - sprintf(buffer, stringBase0 + 0x280, - (int32) life, - ((int32) (zEntCruiseBubble_f_100_0 * life)) - (100 * (int32) life)); + sprintf(buffer, stringBase0 + 0x280, (int32)life, + ((int32)(zEntCruiseBubble_f_100_0 * life)) - (100 * (int32)life)); float32 dsize = glow * current_tweak->hud.timer.glow_size; // zEntCruiseBubble_f_0_0 is loaded too early, should be just before the call - xfont font = xfont::create(current_tweak->hud.timer.font, - current_tweak->hud.timer.font_width + dsize, - current_tweak->hud.timer.font_height + dsize, - zEntCruiseBubble_f_0_0, g_WHITE, screen_bounds); + xfont font = + xfont::create(current_tweak->hud.timer.font, current_tweak->hud.timer.font_width + dsize, + current_tweak->hud.timer.font_height + dsize, zEntCruiseBubble_f_0_0, g_WHITE, + screen_bounds); // register use for copying fields into font off, also causes a larger stack frame // also the color tags are loaded too early, should be just before the call lerp(font.color, glow, zEntCruiseBubble_color_80_00_00_FF, zEntCruiseBubble_color_FF_14_14_FF); - font.color.a = (int32) (zEntCruiseBubble_f_255_0 * alpha + zEntCruiseBubble_f_0_5); + font.color.a = (int32)(zEntCruiseBubble_f_255_0 * alpha + zEntCruiseBubble_f_0_5); basic_rect bound = font.bounds(buffer); float32 x = current_tweak->hud.timer.x - bound.x - zEntCruiseBubble_f_0_5 * bound.w; @@ -1371,17 +1367,15 @@ void cruise_bubble::lerp(iColor_tag& c, float32 t, iColor_tag a, iColor_tag b) lerp(c.a, t, a.a, b.a); } - #ifdef NON_MATCHING void cruise_bubble::lerp(uint8& x, float32 t, uint8 a, uint8 b) { // will match once file complete // casting from int8 to float uses a float constant which cannot be extern'd - x = zEntCruiseBubble_f_0_5 + ((float32) a + t * ((float32) b - (float32) a)); + x = zEntCruiseBubble_f_0_5 + ((float32)a + t * ((float32)b - (float32)a)); } #endif - #ifdef NON_MATCHING void cruise_bubble::update_hud(float32 dt) { @@ -1389,12 +1383,15 @@ void cruise_bubble::update_hud(float32 dt) { return; } - - hud.alpha = range_limit(hud.alpha_vel * dt + hud.alpha, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0); - hud.glow = range_limit(hud.glow_vel * dt + hud.glow, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0); + + hud.alpha = range_limit(hud.alpha_vel * dt + hud.alpha, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0); + hud.glow = range_limit(hud.glow_vel * dt + hud.glow, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0); // scheduling off - float32 vel_frac = ((state_missle_fly*) shared.states[STATE_MISSLE_FLY])->vel / current_tweak->missle.fly.max_vel; + float32 vel_frac = ((state_missle_fly*)shared.states[STATE_MISSLE_FLY])->vel / + current_tweak->missle.fly.max_vel; hud.uv_wind.offset_vel.assign(current_tweak->hud.wind.du, current_tweak->hud.wind.dv); hud.uv_wind.offset_vel *= vel_frac; @@ -1432,15 +1429,10 @@ void cruise_bubble::update_hud(float32 dt) } #endif - - - - - void cruise_bubble::uv_animated_model::update(float32 dt) { - if (zEntCruiseBubble_f_0_0 == this->offset_vel.x && - zEntCruiseBubble_f_0_0 == this->offset_vel.y) + if (zEntCruiseBubble_f_0_0 == this->offset_vel.x && + zEntCruiseBubble_f_0_0 == this->offset_vel.y) { return; } @@ -1451,7 +1443,6 @@ void cruise_bubble::uv_animated_model::update(float32 dt) this->refresh(); } - #ifdef NON_MATCHING void cruise_bubble::render_hud() { @@ -1464,8 +1455,8 @@ void cruise_bubble::render_hud() if (hud.model.wind->Alpha > zEntCruiseBubble_f_0_0) { - RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*) 5); - RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*) 2); + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)5); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)2); basic_rect bound; bound.set_size(current_tweak->hud.wind.size, current_tweak->hud.wind.size); @@ -1474,8 +1465,8 @@ void cruise_bubble::render_hud() render_model_2d(hud.model.wind, bound, hud.model.wind->Alpha); } - RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*) 5); - RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*) 6); + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)5); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)6); for (int32 i = 0; i < hud.gizmos_used; ++i) { @@ -1487,13 +1478,13 @@ void cruise_bubble::render_hud() } } - RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*) 5); - RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*) 2); + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)5); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)2); for (int32 i = 0; i < hud.gizmos_used; ++i) { hud_gizmo* gizmo = &hud.gizmo[i]; - + // regalloc float32 glow = hud.glow + gizmo->glow; if (glow > zEntCruiseBubble_f_1_0) @@ -1504,7 +1495,7 @@ void cruise_bubble::render_hud() { continue; } - + float32 alpha = hud.alpha * gizmo->alpha * gizmo->opacity; if (!(alpha <= zEntCruiseBubble_f_0_0)) { @@ -1516,7 +1507,6 @@ void cruise_bubble::render_hud() } #endif - #if 0 void cruise_bubble::show_hud() { @@ -1538,7 +1528,6 @@ void cruise_bubble::show_hud() } #endif - #ifdef NON_MATCHING void cruise_bubble::hide_hud() { @@ -1553,13 +1542,13 @@ xVec3 cruise_bubble::world_to_screen(const xVec3& loc) iCameraUpdatePos(globals.camera.lo_cam, &globals.camera.mat); xVec3 world_loc; - xMat4x3* view_mat = (xMat4x3*) &globals.camera.lo_cam->viewMatrix; + xMat4x3* view_mat = (xMat4x3*)&globals.camera.lo_cam->viewMatrix; xMat4x3Toworld(&world_loc, view_mat, &loc); - + xVec3 screen_loc; float32 iz = zEntCruiseBubble_f_1_0 / world_loc.z; screen_loc.assign(world_loc.x * iz, world_loc.y * iz, zEntCruiseBubble_f_1_0); - + return screen_loc; } @@ -1576,7 +1565,6 @@ int32 cruise_bubble::find_locked_target(const xVec3* target) return -1; } - #ifdef NON_MATCHING void cruise_bubble::lock_target(int32 index, const xVec3* target, float32 opacity) { @@ -1589,7 +1577,7 @@ void cruise_bubble::lock_target(int32 index, const xVec3* target, float32 opacit if (index <= -1) { index = hud.gizmos_used; - gizmo = &hud.gizmo[hud.gizmos_used++]; + gizmo = &hud.gizmo[hud.gizmos_used++]; // offsets for gizmo and gizmo->bound are calculated incremental // instead should be to absolute offsets from the same base show_gizmo(*gizmo, gizmo->bound, hud.model.target); @@ -1619,8 +1607,7 @@ void cruise_bubble::check_lock_target(const xVec3* target) } ang = offset.length(); - if ((ang >= zEntCruiseBubble_f_n0_00001) && - (ang <= zEntCruiseBubble_f_0_00001)) + if ((ang >= zEntCruiseBubble_f_n0_00001) && (ang <= zEntCruiseBubble_f_0_00001)) { ang = zEntCruiseBubble_f_0_0; } @@ -1628,7 +1615,7 @@ void cruise_bubble::check_lock_target(const xVec3* target) { ang = xacos(offset.dot(mat->at) / ang); } - + float32 max_ang = current_tweak->reticle.ang_show; float32 min_ang = current_tweak->reticle.ang_hide; @@ -1659,22 +1646,17 @@ uint32 cruise_bubble::check_anim_aim(xAnimTransition*, xAnimSingle*) return false; } - - - - - void cruise_bubble::load_settings() { uint32 params_size; // stringBase0 + 0x163 == "cruise_bubble_bind.MINF" xModelAssetParam* params = zEntGetModelParams(xStrHash(stringBase0 + 0x163), ¶ms_size); - + if (params == NULL) { params_size = 0; } - + normal_tweak.load(params, params_size); memcpy(&cheat_tweak, &normal_tweak, sizeof(tweak_group)); load_cheat_tweak(); @@ -1686,145 +1668,151 @@ void cruise_bubble::tweak_group::load(xModelAssetParam* params, uint32 size) this->register_tweaks(true, params, size, NULL); } - #ifdef NON_MATCHING -void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap, uint32 apsize, const int8*) +void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap, uint32 apsize, + const int8*) { if (init) { this->aim_delay = zEntCruiseBubble_f_0_2; // scheduling for loading ap and apsize is off :( // stringBase0 + 0x290 == "aim_delay" - auto_tweak::load_param(this->aim_delay, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x290); + auto_tweak::load_param(this->aim_delay, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x290); } if (init) { this->player.halt_time = zEntCruiseBubble_f_0_5; // stringBase0 + 0x29a == "player.halt_time" - auto_tweak::load_param(this->player.halt_time, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x29a); + auto_tweak::load_param(this->player.halt_time, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x29a); } - + if (init) { this->player.aim.turn_speed = zEntCruiseBubble_f_0_05; // stringBase0 + 0x2ab == "player.aim.turn_speed" auto_tweak::load_param(this->player.aim.turn_speed, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x2ab); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x2ab); } - + if (init) { this->player.aim.anim_delta = zEntCruiseBubble_f_0_5; // stringBase0 + 0x2c1 == "player.aim.anim_delta" auto_tweak::load_param(this->player.aim.anim_delta, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x2c1); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x2c1); } - + if (init) { this->player.fire.delay_wand = zEntCruiseBubble_f_0_0667; // stringBase0 + 0x2d7 == "player.fire.delay_wand" auto_tweak::load_param(this->player.fire.delay_wand, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, - ap, apsize, stringBase0 + 0x2d7); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100_0, ap, apsize, + stringBase0 + 0x2d7); } - + if (init) { this->missle.life = zEntCruiseBubble_f_6_0; // stringBase0 + 0x2ee == "missle.life" - auto_tweak::load_param(this->missle.life, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x2ee); + auto_tweak::load_param(this->missle.life, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x2ee); } - + if (init) { this->missle.hit_dist = zEntCruiseBubble_f_0_3; // stringBase0 + 0x2fa == "missle.hit_dist" - auto_tweak::load_param(this->missle.hit_dist, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x2fa); + auto_tweak::load_param(this->missle.hit_dist, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x2fa); } - + if (init) { this->missle.crash_angle = zEntCruiseBubble_f_30_0; // stringBase0 + 0x30a == "missle.crash_angle" - auto_tweak::load_param(this->missle.crash_angle, - zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_60_0, - ap, apsize, stringBase0 + 0x30a); + auto_tweak::load_param(this->missle.crash_angle, zEntCruiseBubble_f_0_017, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_60_0, + ap, apsize, stringBase0 + 0x30a); } if (init) { this->missle.collide_twist = zEntCruiseBubble_f_0_025; // stringBase0 + 0x31d == "missle.collide_twist" - auto_tweak::load_param(this->missle.collide_twist, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x31d); + auto_tweak::load_param(this->missle.collide_twist, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x31d); } if (init) { this->missle.hit_tests = 4; // stringBase0 + 0x332 == "missle.hit_tests" - auto_tweak::load_param(this->missle.hit_tests, - 1, 1, 100, ap, apsize, stringBase0 + 0x332); + auto_tweak::load_param(this->missle.hit_tests, 1, 1, 100, ap, apsize, + stringBase0 + 0x332); } - + if (init) { this->missle.appear.delay_show = zEntCruiseBubble_f_0_1333; // stringBase0 + 0x343 == "missle.appear.delay_show" auto_tweak::load_param(this->missle.appear.delay_show, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, - ap, apsize, stringBase0 + 0x343); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100_0, ap, apsize, + stringBase0 + 0x343); } - + if (init) { this->missle.appear.delay_fly = zEntCruiseBubble_f_0_667; // stringBase0 + 0x35c == "missle.appear.delay_fly" auto_tweak::load_param(this->missle.appear.delay_fly, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, - ap, apsize, stringBase0 + 0x35c); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100_0, ap, apsize, + stringBase0 + 0x35c); } - + if (init) { this->missle.appear.offset = xVec3::create( - zEntCruiseBubble_f_n0_049, - zEntCruiseBubble_f_1_728, - zEntCruiseBubble_f_0_922); + zEntCruiseBubble_f_n0_049, zEntCruiseBubble_f_1_728, zEntCruiseBubble_f_0_922); // stringBase0 + 0x374 == "missle.appear.offset" - auto_tweak::load_param(this->missle.appear.offset, - 0, 0, 0, ap, apsize, stringBase0 + 0x374); + auto_tweak::load_param(this->missle.appear.offset, 0, 0, 0, ap, apsize, + stringBase0 + 0x374); } if (init) { this->missle.fly.accel = zEntCruiseBubble_f_6_0; // stringBase0 + 0x389 == "missle.fly.accel" - auto_tweak::load_param(this->missle.fly.accel, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x389); + auto_tweak::load_param(this->missle.fly.accel, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x389); } if (init) { this->missle.fly.max_vel = zEntCruiseBubble_f_12_0; // stringBase0 + 0x39a == "missle.fly.max_vel" - auto_tweak::load_param(this->missle.fly.max_vel, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x39a); + auto_tweak::load_param(this->missle.fly.max_vel, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x39a); } if (init) @@ -1832,152 +1820,166 @@ void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap this->missle.fly.engine_pitch_max = zEntCruiseBubble_f_10_0; // stringBase0 + 0x3ad == "missle.fly.engine_pitch_max" auto_tweak::load_param(this->missle.fly.engine_pitch_max, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x3ad); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x3ad); } - + if (init) { this->missle.fly.engine_pitch_sensitivity = zEntCruiseBubble_f_0_005; // stringBase0 + 0x3c9 == "missle.fly.engine_pitch_sensitivity" auto_tweak::load_param(this->missle.fly.engine_pitch_sensitivity, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x3c9); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0, ap, apsize, + stringBase0 + 0x3c9); } - + if (init) { this->missle.fly.flash_interval = zEntCruiseBubble_f_2_0; // stringBase0 + 0x3ed == "missle.fly.flash_interval" auto_tweak::load_param(this->missle.fly.flash_interval, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x3ed); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x3ed); } - + if (init) { this->missle.fly.turn.xdelta = zEntCruiseBubble_f_5_0; // stringBase0 + 0x407 == "missle.fly.turn.xdelta" auto_tweak::load_param(this->missle.fly.turn.xdelta, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x407); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x407); } - + if (init) { this->missle.fly.turn.ydelta = zEntCruiseBubble_f_4_0; // stringBase0 + 0x41e == "missle.fly.turn.ydelta" auto_tweak::load_param(this->missle.fly.turn.ydelta, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x41e); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x41e); } - + if (init) { this->missle.fly.turn.xdecay = zEntCruiseBubble_f_0_99; // stringBase0 + 0x435 == "missle.fly.turn.xdecay" auto_tweak::load_param(this->missle.fly.turn.xdecay, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x435); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0, ap, apsize, + stringBase0 + 0x435); } - + if (init) { this->missle.fly.turn.ydecay = zEntCruiseBubble_f_0_99; // stringBase0 + 0x44c == "missle.fly.turn.ydecay" auto_tweak::load_param(this->missle.fly.turn.ydecay, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x44c); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0, ap, apsize, + stringBase0 + 0x44c); } - + if (init) { this->missle.fly.turn.ybound = zEntCruiseBubble_f_0_6; // stringBase0 + 0x463 == "missle.fly.turn.ybound" auto_tweak::load_param(this->missle.fly.turn.ybound, - zEntCruiseBubble_f_1_5708, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x463); + zEntCruiseBubble_f_1_5708, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0, ap, apsize, + stringBase0 + 0x463); } - + if (init) { this->missle.fly.turn.roll_frac = zEntCruiseBubble_f_0_2; // stringBase0 + 0x47a == "missle.fly.turn.roll_frac" auto_tweak::load_param(this->missle.fly.turn.roll_frac, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_n1_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x47a); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_n1_0, + zEntCruiseBubble_f_1_0, ap, apsize, + stringBase0 + 0x47a); } - + if (init) { this->missle.explode.hit_radius = zEntCruiseBubble_f_1_0; // stringBase0 + 0x494 == "missle.explode.hit_radius" auto_tweak::load_param(this->missle.explode.hit_radius, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x494); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_10_0, ap, apsize, + stringBase0 + 0x494); } - + if (init) { this->missle.explode.hit_duration = zEntCruiseBubble_f_0_25; // stringBase0 + 0x4ae == "missle.explode.hit_duration" auto_tweak::load_param(this->missle.explode.hit_duration, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x4ae); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_10_0, ap, apsize, + stringBase0 + 0x4ae); } if (init) { this->camera.aim.dist = zEntCruiseBubble_f_2_0; // stringBase0 + 0x4ca == "camera.aim.dist" - auto_tweak::load_param(this->camera.aim.dist, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, - ap, apsize, stringBase0 + 0x4ca); + auto_tweak::load_param(this->camera.aim.dist, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, + ap, apsize, stringBase0 + 0x4ca); } - + if (init) { this->camera.aim.height = zEntCruiseBubble_f_1_5; // stringBase0 + 0x4da == "camera.aim.height" - auto_tweak::load_param(this->camera.aim.height, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_n10_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x4da); + auto_tweak::load_param(this->camera.aim.height, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_n10_0, zEntCruiseBubble_f_10_0, + ap, apsize, stringBase0 + 0x4da); } - + if (init) { this->camera.aim.pitch = zEntCruiseBubble_f_0_0; // stringBase0 + 0x4ec == "camera.aim.pitch" - auto_tweak::load_param(this->camera.aim.pitch, - zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_n90_0, zEntCruiseBubble_f_90_0, - ap, apsize, stringBase0 + 0x4ec); + auto_tweak::load_param(this->camera.aim.pitch, zEntCruiseBubble_f_0_017, + zEntCruiseBubble_f_n90_0, zEntCruiseBubble_f_90_0, + ap, apsize, stringBase0 + 0x4ec); } - + if (init) { this->camera.aim.accel = zEntCruiseBubble_f_10_0; // stringBase0 + 0x4fd == "camera.aim.accel" - auto_tweak::load_param(this->camera.aim.accel, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x4fd); + auto_tweak::load_param(this->camera.aim.accel, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x4fd); } - + if (init) { this->camera.aim.max_vel = zEntCruiseBubble_f_5_0; // stringBase0 + 0x50e == "camera.aim.max_vel" - auto_tweak::load_param(this->camera.aim.max_vel, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x50e); + auto_tweak::load_param(this->camera.aim.max_vel, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x50e); } - + if (init) { this->camera.aim.stick_decel = zEntCruiseBubble_f_720_0; // stringBase0 + 0x521 == "camera.aim.stick_decel" auto_tweak::load_param(this->camera.aim.stick_decel, - zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x521); + zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x521); } if (init) @@ -1985,35 +1987,39 @@ void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap this->camera.aim.stick_accel = zEntCruiseBubble_f_360_0; // stringBase0 + 0x538 == "camera.aim.stick_accel" auto_tweak::load_param(this->camera.aim.stick_accel, - zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x538); + zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x538); } - + if (init) { this->camera.aim.stick_max_vel = zEntCruiseBubble_f_135_0; // stringBase0 + 0x54f == "camera.aim.stick_max_vel" auto_tweak::load_param(this->camera.aim.stick_max_vel, - zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_01, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x54f); + zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_01, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x54f); } - + if (init) { this->camera.aim.turn_speed = zEntCruiseBubble_f_0_2; // stringBase0 + 0x568 == "camera.aim.turn_speed" auto_tweak::load_param(this->camera.aim.turn_speed, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_001, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x568); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_001, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x568); } - + if (init) { this->camera.seize.delay = zEntCruiseBubble_f_0_0; // stringBase0 + 0x57e == "camera.seize.delay" - auto_tweak::load_param(this->camera.seize.delay, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x57e); + auto_tweak::load_param(this->camera.seize.delay, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x57e); } if (init) @@ -2021,8 +2027,9 @@ void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap this->camera.seize.blend_time = zEntCruiseBubble_f_1_5; // stringBase0 + 0x591 == "camera.seize.blend_time" auto_tweak::load_param(this->camera.seize.blend_time, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x591); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x591); } if (init) @@ -2030,26 +2037,28 @@ void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap this->camera.seize.fade_dist = zEntCruiseBubble_f_2_0; // stringBase0 + 0x5a9 == "camera.seize.fade_dist" auto_tweak::load_param(this->camera.seize.fade_dist, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x5a9); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_10_0, ap, apsize, + stringBase0 + 0x5a9); } - + if (init) { this->camera.seize.hide_dist = zEntCruiseBubble_f_1_0; // stringBase0 + 0x5c0 == "camera.seize.hide_dist" auto_tweak::load_param(this->camera.seize.hide_dist, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x5c0); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_10_0, ap, apsize, + stringBase0 + 0x5c0); } if (init) { this->camera.seize.fov = zEntCruiseBubble_f_95_0; // stringBase0 + 0x5d7 == "camera.seize.fov" - auto_tweak::load_param(this->camera.seize.fov, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_10_0, zEntCruiseBubble_f_180_0, - ap, apsize, stringBase0 + 0x5d7); + auto_tweak::load_param(this->camera.seize.fov, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_10_0, zEntCruiseBubble_f_180_0, + ap, apsize, stringBase0 + 0x5d7); } if (init) @@ -2057,44 +2066,49 @@ void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap this->camera.survey.duration = zEntCruiseBubble_f_2_0; // stringBase0 + 0x5e8 == "camera.survey.duration" auto_tweak::load_param(this->camera.survey.duration, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x5e8); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_10_0, ap, apsize, + stringBase0 + 0x5e8); } - + if (init) { this->camera.survey.min_duration = zEntCruiseBubble_f_0_25; // stringBase0 + 0x5ff == "camera.survey.min_duration" auto_tweak::load_param(this->camera.survey.min_duration, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x5ff); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_10_0, ap, apsize, + stringBase0 + 0x5ff); } - + if (init) { this->camera.survey.min_dist = zEntCruiseBubble_f_10_0; // stringBase0 + 0x61a == "camera.survey.min_dist" auto_tweak::load_param(this->camera.survey.min_dist, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, - ap, apsize, stringBase0 + 0x61a); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100_0, ap, apsize, + stringBase0 + 0x61a); } - + if (init) { this->camera.survey.cut_dist = zEntCruiseBubble_f_6_0; // stringBase0 + 0x631 == "camera.survey.cut_dist" auto_tweak::load_param(this->camera.survey.cut_dist, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, - ap, apsize, stringBase0 + 0x631); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100_0, ap, apsize, + stringBase0 + 0x631); } - + if (init) { this->camera.survey.drift_dist = zEntCruiseBubble_f_8_0; // stringBase0 + 0x648 == "camera.survey.drift_dist" auto_tweak::load_param(this->camera.survey.drift_dist, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, - ap, apsize, stringBase0 + 0x648); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100_0, ap, apsize, + stringBase0 + 0x648); } if (init) @@ -2102,9 +2116,9 @@ void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap this->camera.survey.drift_softness = zEntCruiseBubble_f_0_1; // stringBase0 + 0x661 == "camera.survey.drift_softness" auto_tweak::load_param(this->camera.survey.drift_softness, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_5, - ap, apsize, stringBase0 + 0x661); - + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_0_5, ap, apsize, + stringBase0 + 0x661); } if (init) @@ -2112,17 +2126,19 @@ void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap this->camera.survey.jerk_offset = zEntCruiseBubble_f_0_8; // stringBase0 + 0x67e == "camera.survey.jerk_offset" auto_tweak::load_param(this->camera.survey.jerk_offset, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_2_0, - ap, apsize, stringBase0 + 0x67e); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_2_0, ap, apsize, + stringBase0 + 0x67e); } - + if (init) { this->camera.survey.jerk_deflect = zEntCruiseBubble_f_0_6; // stringBase0 + 0x698 == "camera.survey.jerk_deflect" auto_tweak::load_param(this->camera.survey.jerk_deflect, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x698); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0, ap, apsize, + stringBase0 + 0x698); } if (init) @@ -2130,28 +2146,27 @@ void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap this->camera.restore.control_delay = zEntCruiseBubble_f_0_25; // stringBase0 + 0x6b3 == "camera.restore.control_delay" auto_tweak::load_param(this->camera.restore.control_delay, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x6b3); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0, ap, apsize, + stringBase0 + 0x6b3); } - + if (init) { this->material.env_alpha = zEntCruiseBubble_f_0_5; // stringBase0 + 0x6d0 == "material.env_alpha" - auto_tweak::load_param(this->material.env_alpha, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x6d0); - + auto_tweak::load_param(this->material.env_alpha, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x6d0); } if (init) { this->material.env_coeff = zEntCruiseBubble_f_0_5; // stringBase0 + 0x6e3 == "material.env_coeff" - auto_tweak::load_param(this->material.env_coeff, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x6e3); - + auto_tweak::load_param(this->material.env_coeff, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x6e3); } if (init) @@ -2159,366 +2174,381 @@ void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap this->material.fresnel_alpha = zEntCruiseBubble_f_0_0; // stringBase0 + 0x6f6 == "material.fresnel_alpha" auto_tweak::load_param(this->material.fresnel_alpha, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x6f6); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0, ap, apsize, + stringBase0 + 0x6f6); } - + if (init) { this->material.fresnel_coeff = zEntCruiseBubble_f_0_75; // stringBase0 + 0x70d == "material.fresnel_coeff" auto_tweak::load_param(this->material.fresnel_coeff, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x70d); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_1_0, ap, apsize, + stringBase0 + 0x70d); } - + if (init) { this->reticle.dist_min = zEntCruiseBubble_f_3_0; // stringBase0 + 0x724 == "reticle.dist_min" - auto_tweak::load_param(this->reticle.dist_min, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x724); + auto_tweak::load_param(this->reticle.dist_min, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_10_0, + ap, apsize, stringBase0 + 0x724); } if (init) { this->reticle.dist_max = zEntCruiseBubble_f_30_0; // stringBase0 + 0x735 == "reticle.dist_max" - auto_tweak::load_param(this->reticle.dist_max, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_10000_0, - ap, apsize, stringBase0 + 0x735); + auto_tweak::load_param(this->reticle.dist_max, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_10000_0, + ap, apsize, stringBase0 + 0x735); } - + if (init) { this->reticle.ang_show = zEntCruiseBubble_f_4_0; // stringBase0 + 0x746 == "reticle.ang_show" - auto_tweak::load_param(this->reticle.ang_show, - zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_90_0, - ap, apsize, stringBase0 + 0x746); + auto_tweak::load_param(this->reticle.ang_show, zEntCruiseBubble_f_0_017, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_90_0, + ap, apsize, stringBase0 + 0x746); } - + if (init) { this->reticle.ang_hide = zEntCruiseBubble_f_22_5; // stringBase0 + 0x757 == "reticle.ang_hide" - auto_tweak::load_param(this->reticle.ang_hide, - zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_90_0, - ap, apsize, stringBase0 + 0x757); + auto_tweak::load_param(this->reticle.ang_hide, zEntCruiseBubble_f_0_017, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_90_0, + ap, apsize, stringBase0 + 0x757); } - + if (init) { this->reticle.delay_retarget = zEntCruiseBubble_f_0_25; // stringBase0 + 0x768 == "reticle.delay_retarget" auto_tweak::load_param(this->reticle.delay_retarget, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_5_0, - ap, apsize, stringBase0 + 0x768); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_5_0, ap, apsize, + stringBase0 + 0x768); } - + if (init) { this->trail.sample_rate = zEntCruiseBubble_f_60_0; // stringBase0 + 0x77f == "trail.sample_rate" - auto_tweak::load_param(this->trail.sample_rate, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10000_0, - ap, apsize, stringBase0 + 0x77f); + auto_tweak::load_param(this->trail.sample_rate, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10000_0, + ap, apsize, stringBase0 + 0x77f); } - + if (init) { this->trail.bubble_rate = zEntCruiseBubble_f_60_0; // stringBase0 + 0x791 == "trail.bubble_rate" - auto_tweak::load_param(this->trail.bubble_rate, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10000_0, - ap, apsize, stringBase0 + 0x791); + auto_tweak::load_param(this->trail.bubble_rate, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10000_0, + ap, apsize, stringBase0 + 0x791); } - + if (init) { this->trail.bubble_emit_radius = zEntCruiseBubble_f_0_5; // stringBase0 + 0x7a3 == "trail.bubble_emit_radius" auto_tweak::load_param(this->trail.bubble_emit_radius, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x7a3); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_10_0, ap, apsize, + stringBase0 + 0x7a3); } - + if (init) { this->trail.wake_emit_radius = zEntCruiseBubble_f_0_1; // stringBase0 + 0x7bc == "trail.wake_emit_radius" auto_tweak::load_param(this->trail.wake_emit_radius, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x7bc); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_10_0, ap, apsize, + stringBase0 + 0x7bc); } - + if (init) { this->blast.emit = 300; // stringBase0 + 0x7d3 == "blast.emit" - auto_tweak::load_param(this->blast.emit, - 1, 0, 0x3e8, ap, apsize, stringBase0 + 0x7d3); + auto_tweak::load_param(this->blast.emit, 1, 0, 0x3e8, ap, apsize, + stringBase0 + 0x7d3); } - + if (init) { this->blast.radius = zEntCruiseBubble_f_0_0; // stringBase0 + 0x7de == "blast.radius" - auto_tweak::load_param(this->blast.radius, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x7de); + auto_tweak::load_param(this->blast.radius, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, + ap, apsize, stringBase0 + 0x7de); } - + if (init) { this->blast.vel = zEntCruiseBubble_f_5_0; // stringBase0 + 0x7eb == "blast.vel" - auto_tweak::load_param(this->blast.vel, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_n100000_0, zEntCruiseBubble_f_100000_0, - ap, apsize, stringBase0 + 0x7eb); + auto_tweak::load_param(this->blast.vel, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_n100000_0, + zEntCruiseBubble_f_100000_0, ap, apsize, + stringBase0 + 0x7eb); } - + if (init) { this->blast.rand_vel = zEntCruiseBubble_f_0_5; // stringBase0 + 0x7f5 == "blast.rand_vel" - auto_tweak::load_param(this->blast.rand_vel, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_n100000_0, zEntCruiseBubble_f_100000_0, - ap, apsize, stringBase0 + 0x7f5); + auto_tweak::load_param(this->blast.rand_vel, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_n100000_0, + zEntCruiseBubble_f_100000_0, ap, apsize, + stringBase0 + 0x7f5); } - + if (init) { this->droplet.dist_min = zEntCruiseBubble_f_1_0; // stringBase0 + 0x804 == "droplet.dist_min" - auto_tweak::load_param(this->droplet.dist_min, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x804); + auto_tweak::load_param(this->droplet.dist_min, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, + ap, apsize, stringBase0 + 0x804); } - + if (init) { this->droplet.dist_max = zEntCruiseBubble_f_2_0; // stringBase0 + 0x815 == "droplet.dist_max" - auto_tweak::load_param(this->droplet.dist_max, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x815); + auto_tweak::load_param(this->droplet.dist_max, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, + ap, apsize, stringBase0 + 0x815); } - + if (init) { this->droplet.emit_min = 10; // stringBase0 + 0x826 == "droplet.emit_min" - auto_tweak::load_param(this->droplet.emit_min, - 1, 0, 0x1e, ap, apsize, stringBase0 + 0x826); + auto_tweak::load_param(this->droplet.emit_min, 1, 0, 0x1e, ap, apsize, + stringBase0 + 0x826); } - + if (init) { this->droplet.emit_max = 20; // stringBase0 + 0x837 == "droplet.emit_max" - auto_tweak::load_param(this->droplet.emit_max, - 1, 0, 0x1e, ap, apsize, stringBase0 + 0x837); + auto_tweak::load_param(this->droplet.emit_max, 1, 0, 0x1e, ap, apsize, + stringBase0 + 0x837); } - + if (init) { this->droplet.vel_min = zEntCruiseBubble_f_2_0; // stringBase0 + 0x848 == "droplet.vel_min" - auto_tweak::load_param(this->droplet.vel_min, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100000_0, - ap, apsize, stringBase0 + 0x848); + auto_tweak::load_param(this->droplet.vel_min, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100000_0, ap, apsize, + stringBase0 + 0x848); } - + if (init) { this->droplet.vel_max = zEntCruiseBubble_f_6_0; // stringBase0 + 0x858 == "droplet.vel_max" - auto_tweak::load_param(this->droplet.vel_max, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100000_0, - ap, apsize, stringBase0 + 0x858); + auto_tweak::load_param(this->droplet.vel_max, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100000_0, ap, apsize, + stringBase0 + 0x858); } - + if (init) { this->droplet.vel_perturb = zEntCruiseBubble_f_0_25; // stringBase0 + 0x868 == "droplet.vel_perturb" - auto_tweak::load_param(this->droplet.vel_perturb, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100000_0, - ap, apsize, stringBase0 + 0x868); + auto_tweak::load_param(this->droplet.vel_perturb, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100000_0, ap, apsize, + stringBase0 + 0x868); } - + if (init) { this->droplet.vel_angle = zEntCruiseBubble_f_60_0; // stringBase0 + 0x87c == "droplet.vel_angle" - auto_tweak::load_param(this->droplet.vel_angle, - zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100000_0, - ap, apsize, stringBase0 + 0x87c); + auto_tweak::load_param(this->droplet.vel_angle, zEntCruiseBubble_f_0_017, + zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100000_0, ap, apsize, + stringBase0 + 0x87c); } - + if (init) { this->droplet.rot_vel_max = zEntCruiseBubble_f_360_0; // stringBase0 + 0x88e == "droplet.rot_vel_max" auto_tweak::load_param(this->droplet.rot_vel_max, - zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100000_0, - ap, apsize, stringBase0 + 0x88e); + zEntCruiseBubble_f_0_017, zEntCruiseBubble_f_0_0, + zEntCruiseBubble_f_100000_0, ap, apsize, + stringBase0 + 0x88e); } - + if (init) { this->hud.glow_size = zEntCruiseBubble_f_0_05; // stringBase0 + 0x8a2 == "hud.glow_size" - auto_tweak::load_param(this->hud.glow_size, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_001, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x8a2); + auto_tweak::load_param(this->hud.glow_size, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_001, zEntCruiseBubble_f_10_0, + ap, apsize, stringBase0 + 0x8a2); } - + if (init) { this->hud.time_fade = zEntCruiseBubble_f_0_25; // stringBase0 + 0x8b0 == "hud.time_fade" - auto_tweak::load_param(this->hud.time_fade, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_001, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x8b0); + auto_tweak::load_param(this->hud.time_fade, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_001, zEntCruiseBubble_f_10_0, + ap, apsize, stringBase0 + 0x8b0); } - + if (init) { this->hud.time_glow = zEntCruiseBubble_f_0_5; // stringBase0 + 0x8be == "hud.time_glow" - auto_tweak::load_param(this->hud.time_glow, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_001, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x8be); + auto_tweak::load_param(this->hud.time_glow, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_001, zEntCruiseBubble_f_10_0, + ap, apsize, stringBase0 + 0x8be); } - + if (init) { this->hud.wind.size = zEntCruiseBubble_f_0_75; // stringBase0 + 0x8cc == "hud.wind.size" - auto_tweak::load_param(this->hud.wind.size, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, - ap, apsize, stringBase0 + 0x8cc); + auto_tweak::load_param(this->hud.wind.size, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, + ap, apsize, stringBase0 + 0x8cc); } - + if (init) { this->hud.wind.du = zEntCruiseBubble_f_0_0; // stringBase0 + 0x8da == "hud.wind.du" - auto_tweak::load_param(this->hud.wind.du, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_n1000000000_0, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x8da); + auto_tweak::load_param(this->hud.wind.du, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_n1000000000_0, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x8da); } - + if (init) { this->hud.wind.dv = zEntCruiseBubble_f_4_0; // stringBase0 + 0x8e6 == "hud.wind.dv" - auto_tweak::load_param(this->hud.wind.dv, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_n1000000000_0, zEntCruiseBubble_f_1000000000_0, - ap, apsize, stringBase0 + 0x8e6); + auto_tweak::load_param(this->hud.wind.dv, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_n1000000000_0, + zEntCruiseBubble_f_1000000000_0, ap, apsize, + stringBase0 + 0x8e6); } - + if (init) { this->hud.reticle.size = zEntCruiseBubble_f_0_1; // stringBase0 + 0x8f2 == "hud.reticle.size" - auto_tweak::load_param(this->hud.reticle.size, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, - ap, apsize, stringBase0 + 0x8f2); + auto_tweak::load_param(this->hud.reticle.size, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, + ap, apsize, stringBase0 + 0x8f2); } - + if (init) { this->hud.target.size = zEntCruiseBubble_f_0_1; // stringBase0 + 0x903 == "hud.target.size" - auto_tweak::load_param(this->hud.target.size, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, - ap, apsize, stringBase0 + 0x903); + auto_tweak::load_param(this->hud.target.size, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_100_0, + ap, apsize, stringBase0 + 0x903); } - + if (init) { this->hud.timer.font = 2; // stringBase0 + 0x913 == "hud.timer.font" - auto_tweak::load_param(this->hud.timer.font, - 1, 0, 4, ap, apsize, stringBase0 + 0x913); + auto_tweak::load_param(this->hud.timer.font, 1, 0, 4, ap, apsize, + stringBase0 + 0x913); } - + if (init) { this->hud.timer.font_width = zEntCruiseBubble_f_0_0275; // stringBase0 + 0x922 == "hud.timer.font_width" - auto_tweak::load_param(this->hud.timer.font_width, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_001, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x922); + auto_tweak::load_param(this->hud.timer.font_width, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_001, zEntCruiseBubble_f_1_0, + ap, apsize, stringBase0 + 0x922); } - + if (init) { this->hud.timer.font_height = zEntCruiseBubble_f_0_047; // stringBase0 + 0x937 == "hud.timer.font_height" auto_tweak::load_param(this->hud.timer.font_height, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_001, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x937); + zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_001, + zEntCruiseBubble_f_1_0, ap, apsize, + stringBase0 + 0x937); } - + if (init) { this->hud.timer.x = zEntCruiseBubble_f_0_78; // stringBase0 + 0x94d == "hud.timer.x" - auto_tweak::load_param(this->hud.timer.x, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x94d); + auto_tweak::load_param(this->hud.timer.x, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x94d); } - + if (init) { this->hud.timer.y = zEntCruiseBubble_f_0_86; // stringBase0 + 0x959 == "hud.timer.y" - auto_tweak::load_param(this->hud.timer.y, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x959); + auto_tweak::load_param(this->hud.timer.y, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x959); } - + if (init) { this->hud.timer.glow_size = zEntCruiseBubble_f_0_01; // stringBase0 + 0x965 == "hud.timer.glow_size" - auto_tweak::load_param(this->hud.timer.glow_size, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, - ap, apsize, stringBase0 + 0x965); + auto_tweak::load_param(this->hud.timer.glow_size, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_10_0, + ap, apsize, stringBase0 + 0x965); } - + if (init) { this->dialog.freq = zEntCruiseBubble_f_1_0; // stringBase0 + 0x979 == "dialog.freq" - auto_tweak::load_param(this->dialog.freq, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x979); + auto_tweak::load_param(this->dialog.freq, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x979); } - + if (init) { this->dialog.decay = zEntCruiseBubble_f_0_75; // stringBase0 + 0x985 == "dialog.decay" - auto_tweak::load_param(this->dialog.decay, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x985); + auto_tweak::load_param(this->dialog.decay, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x985); } - + if (init) { this->dialog.min_freq = zEntCruiseBubble_f_0_1; // stringBase0 + 0x992 == "dialog.min_freq" - auto_tweak::load_param(this->dialog.min_freq, - zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, - ap, apsize, stringBase0 + 0x992); + auto_tweak::load_param(this->dialog.min_freq, zEntCruiseBubble_f_1_0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, ap, + apsize, stringBase0 + 0x992); } - + if (init) { this->material.fresnel_texture = xStrHash(stringBase0 + 0x9a2); @@ -2527,7 +2557,6 @@ void cruise_bubble::tweak_group::register_tweaks(bool init, xModelAssetParam* ap } #endif - #ifdef NON_MATCHING void cruise_bubble::init() { @@ -2535,11 +2564,11 @@ void cruise_bubble::init() { return; } - + init_sound(); shared.flags = shared.flags | 0x2; - + load_settings(); init_states(); init_missle_model(); @@ -2569,7 +2598,6 @@ void cruise_bubble::reset() kill(true, false); } - #ifdef NON_MATCHING void cruise_bubble::launch() { @@ -2577,7 +2605,7 @@ void cruise_bubble::launch() { return; } - + if ((zGameExtras_CheatFlags() & 0x20000000) != 0) { // scheduling off @@ -2598,7 +2626,7 @@ void cruise_bubble::launch() // scheduling off shared.player_motion = zEntCruiseBubble_f_0_0; shared.fov_default = xCameraGetFOV(&globals.camera); - + ztalkbox::permit(0x0, 0xffffffff); set_state(THREAD_PLAYER, BEGIN_STATE_PLAYER); } @@ -2623,7 +2651,7 @@ bool cruise_bubble::update(xScene* s, float32 dt) } } - if(globals.player.ControlOff) + if (globals.player.ControlOff) { kill(true, false); return false; @@ -2636,7 +2664,7 @@ bool cruise_bubble::update(xScene* s, float32 dt) { return false; } - + update_player(*s, dt); update_missle(*s, dt); update_hud(dt); @@ -2672,7 +2700,6 @@ void cruise_bubble::render_screen() render_hud(); } - #ifdef NON_MATCHING void cruise_bubble::insert_player_animations(xAnimTable& table) { @@ -2681,28 +2708,28 @@ void cruise_bubble::insert_player_animations(xAnimTable& table) // register allocation, caching stringBase at reused offsets // closest to a match i got was by incrementing the offsets from stringBase such that they're all unique // after that its pretty clear that this is a functional match - + if (shared.astate.player.aim != NULL) { return; } - + // stringBase0 + 0x9c2 == "cruise_bubble_aim" - shared.astate.player.aim = xAnimTableNewState(&table, stringBase0 + 0x9c2, 0x10, 0, - zEntCruiseBubble_f_1_0, NULL, NULL, zEntCruiseBubble_f_0_0, NULL, - NULL, xAnimDefaultBeforeEnter, NULL, NULL); - + shared.astate.player.aim = + xAnimTableNewState(&table, stringBase0 + 0x9c2, 0x10, 0, zEntCruiseBubble_f_1_0, NULL, NULL, + zEntCruiseBubble_f_0_0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); + // stringBase0 + 0x9d4 == "cruise_bubble_fire" - shared.astate.player.fire = xAnimTableNewState(&table, stringBase0 + 0x9d4, 0x20, 0, - zEntCruiseBubble_f_1_0, NULL, NULL, zEntCruiseBubble_f_0_0, NULL, - NULL, xAnimDefaultBeforeEnter, NULL, NULL); - + shared.astate.player.fire = + xAnimTableNewState(&table, stringBase0 + 0x9d4, 0x20, 0, zEntCruiseBubble_f_1_0, NULL, NULL, + zEntCruiseBubble_f_0_0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); + // stringBase0 + 0x9e7 == "cruise_bubble_idle" - shared.astate.player.idle = xAnimTableNewState(&table, stringBase0 + 0x9e7, 0x10, 0, - zEntCruiseBubble_f_1_0, NULL, NULL, zEntCruiseBubble_f_0_0, NULL, - NULL, xAnimDefaultBeforeEnter, NULL, NULL); - - char* start_from = (char*) xMemPushTemp(0x250); + shared.astate.player.idle = + xAnimTableNewState(&table, stringBase0 + 0x9e7, 0x10, 0, zEntCruiseBubble_f_1_0, NULL, NULL, + zEntCruiseBubble_f_0_0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); + + char* start_from = (char*)xMemPushTemp(0x250); memset(start_from, 0, 0x250); char* s = start_from; *s = '\0'; @@ -2713,37 +2740,39 @@ void cruise_bubble::insert_player_animations(xAnimTable& table) *s = ' '; *++s = '\0'; } - + // stringBase0 + 0x9c2 == "cruise_bubble_aim" - shared.atran.player.aim = xAnimTableNewTransition(&table, start_from, stringBase0 + 0x9c2, - (xAnimTransitionConditionalCallback) &check_anim_aim, NULL, 0, 0, - zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_0, 0, 0, zEntCruiseBubble_f_0_15, NULL); + shared.atran.player.aim = + xAnimTableNewTransition(&table, start_from, stringBase0 + 0x9c2, + (xAnimTransitionConditionalCallback)&check_anim_aim, NULL, 0, 0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_0, 0, 0, + zEntCruiseBubble_f_0_15, NULL); // stringBase0 + 0x9c2 == "cruise_bubble_aim" // stringBase0 + 0x9d4 == "cruise_bubble_fire" - shared.atran.player.fire = xAnimTableNewTransition(&table, stringBase0 + 0x9c2, stringBase0 + 0x9d4, - NULL, NULL, 0, 0, - zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_0, 0, 0, zEntCruiseBubble_f_0_15, NULL); + shared.atran.player.fire = + xAnimTableNewTransition(&table, stringBase0 + 0x9c2, stringBase0 + 0x9d4, NULL, NULL, 0, 0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_0, 0, 0, + zEntCruiseBubble_f_0_15, NULL); // stringBase0 + 0x9d4 == "cruise_bubble_fire" // stringBase0 + 0x9e7 == "cruise_bubble_idle" - shared.atran.player.idle = xAnimTableNewTransition(&table, stringBase0 + 0x9d4, stringBase0 + 0x9e7, - NULL, NULL, 0x10, 0, - zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_0, 0, 0, zEntCruiseBubble_f_0_15, NULL); + shared.atran.player.idle = + xAnimTableNewTransition(&table, stringBase0 + 0x9d4, stringBase0 + 0x9e7, NULL, NULL, 0x10, + 0, zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_0, 0, 0, + zEntCruiseBubble_f_0_15, NULL); // stringBase0 + 0x9fa == "cruise_bubble_aim cruise_bubble_fire cruise_bubble_idle" // stringBase0 + 0x0 == "Idle01" - shared.atran.player.end = xAnimTableNewTransition(&table, stringBase0 + 0x9fa, stringBase0 + 0x0, - NULL, NULL, 0, 0, - zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_0, 0, 0, zEntCruiseBubble_f_0_15, NULL); + shared.atran.player.end = + xAnimTableNewTransition(&table, stringBase0 + 0x9fa, stringBase0 + 0x0, NULL, NULL, 0, 0, + zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_0_0, 0, 0, + zEntCruiseBubble_f_0_15, NULL); xMemPopTemp(start_from); } #endif - - - bool cruise_bubble::active() { return shared.flags & 0x10; @@ -2751,7 +2780,7 @@ bool cruise_bubble::active() float32 cruise_bubble::exploding() { - state_missle_explode* state = (state_missle_explode*) shared.state[THREAD_MISSLE]; + state_missle_explode* state = (state_missle_explode*)shared.state[THREAD_MISSLE]; if (state == NULL || state->type != STATE_MISSLE_EXPLODE) { return zEntCruiseBubble_f_0_0; @@ -2762,7 +2791,7 @@ float32 cruise_bubble::exploding() void cruise_bubble::get_explode_sphere(xVec3& center, float32& radius) { - state_missle_explode* state = (state_missle_explode*) shared.state[THREAD_MISSLE]; + state_missle_explode* state = (state_missle_explode*)shared.state[THREAD_MISSLE]; if (state == NULL || state->type != STATE_MISSLE_EXPLODE) { return; @@ -2784,7 +2813,7 @@ float32 cruise_bubble::state_missle_explode::get_radius() const xEnt** cruise_bubble::get_explode_hits(int32& size) { - state_missle_explode* state = (state_missle_explode*) shared.state[THREAD_MISSLE]; + state_missle_explode* state = (state_missle_explode*)shared.state[THREAD_MISSLE]; if (state == NULL || state->type != STATE_MISSLE_EXPLODE) { size = 0; @@ -2795,22 +2824,21 @@ xEnt** cruise_bubble::get_explode_hits(int32& size) size = 0; return NULL; } - + size = shared.hits_size; return shared.hits; } - #ifdef NON_MATCHING // param names guessed void cruise_bubble::add_life(float32 life, float32 max) { - state_missle_fly* state = (state_missle_fly*) shared.state[THREAD_MISSLE]; + state_missle_fly* state = (state_missle_fly*)shared.state[THREAD_MISSLE]; if (state == NULL || state->type != STATE_MISSLE_FLY) { return; } - + state->life += life; if (max < zEntCruiseBubble_f_0_0) @@ -2834,23 +2862,23 @@ void cruise_bubble::add_life(float32 life, float32 max) void cruise_bubble::set_life(float32 life) { - state_missle_fly* state = (state_missle_fly*) shared.state[THREAD_MISSLE]; + state_missle_fly* state = (state_missle_fly*)shared.state[THREAD_MISSLE]; if (state == NULL || state->type != STATE_MISSLE_FLY) { return; } - + state->life = life; } void cruise_bubble::reset_life() { - state_missle_fly* state = (state_missle_fly*) shared.state[THREAD_MISSLE]; + state_missle_fly* state = (state_missle_fly*)shared.state[THREAD_MISSLE]; if (state == NULL || state->type != STATE_MISSLE_FLY) { return; } - + state->life = current_tweak->missle.life; } @@ -2858,27 +2886,26 @@ bool cruise_bubble::event_handler(xBase* from, uint32 event, const float32* fpar { switch (event) { - case 0x205: - add_life(fparam[0], fparam[1]); - return true; + case 0x205: + add_life(fparam[0], fparam[1]); + return true; - case 0x206: - set_life(fparam[0]); - return true; + case 0x206: + set_life(fparam[0]); + return true; - case 0x207: - reset_life(); - return true; + case 0x207: + reset_life(); + return true; - case 0x203: - case 0x204: - return true; + case 0x203: + case 0x204: + return true; } - + return false; } - #if 0 void cruise_bubble::state_player_halt::start() { @@ -2886,7 +2913,6 @@ void cruise_bubble::state_player_halt::start() } #endif - #if 0 void cruise_bubble::state_player_halt::stop() { @@ -2894,7 +2920,6 @@ void cruise_bubble::state_player_halt::stop() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_player_halt::update(float32 dt) { @@ -2921,7 +2946,6 @@ cruise_bubble::state_enum cruise_bubble::state_player_halt::update(float32 dt) } #endif - #if 0 void cruise_bubble::state_player_aim::start() { @@ -2939,10 +2963,9 @@ void cruise_bubble::state_player_aim::start() xMat4x3* cruise_bubble::get_player_mat() { - return (xMat4x3*) globals.player.ent.model->Mat; + return (xMat4x3*)globals.player.ent.model->Mat; } - #if 0 void cruise_bubble::state_player_aim::stop() { @@ -2950,7 +2973,6 @@ void cruise_bubble::state_player_aim::stop() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_player_aim::update(float32 dt) { @@ -2970,15 +2992,14 @@ cruise_bubble::state_enum cruise_bubble::state_player_aim::update(float32 dt) } #endif - #ifdef NON_MATCHING void cruise_bubble::state_player_aim::update_animation(float32 dt) { - float32 r = range_limit( - this->yaw_vel * current_tweak->player.aim.anim_delta, - zEntCruiseBubble_f_n1_0, zEntCruiseBubble_f_1_0); + float32 r = range_limit(this->yaw_vel * current_tweak->player.aim.anim_delta, + zEntCruiseBubble_f_n1_0, zEntCruiseBubble_f_1_0); xAnimSingle* s = globals.player.ent.model->Anim->Single; - s->BilinearLerp[0] = zEntCruiseBubble_f_0_5 * ((zEntCruiseBubble_f_1_0 + s->BilinearLerp[0]) + r); + s->BilinearLerp[0] = + zEntCruiseBubble_f_0_5 * ((zEntCruiseBubble_f_1_0 + s->BilinearLerp[0]) + r); } #endif @@ -2990,7 +3011,6 @@ void cruise_bubble::state_player_aim::apply_yaw() m->up.assign(zEntCruiseBubble_f_0_0, zEntCruiseBubble_f_1_0, zEntCruiseBubble_f_0_0); } - #ifdef NON_MATCHING void cruise_bubble::state_player_aim::face_camera(float32 dt) { @@ -2999,10 +3019,8 @@ void cruise_bubble::state_player_aim::face_camera(float32 dt) xMat4x3* mat = &globals.camera.mat; float32 new_yaw; - if (mat->at.x >= zEntCruiseBubble_f_n0_00001 && - mat->at.x <= zEntCruiseBubble_f_0_00001 && - mat->at.z >= zEntCruiseBubble_f_n0_00001 && - mat->at.z <= zEntCruiseBubble_f_0_00001) + if (mat->at.x >= zEntCruiseBubble_f_n0_00001 && mat->at.x <= zEntCruiseBubble_f_0_00001 && + mat->at.z >= zEntCruiseBubble_f_n0_00001 && mat->at.z <= zEntCruiseBubble_f_0_00001) { new_yaw = this->yaw; } @@ -3013,7 +3031,7 @@ void cruise_bubble::state_player_aim::face_camera(float32 dt) float32 diff = new_yaw - this->yaw; if (diff > zEntCruiseBubble_f_3_1415) - { + { diff -= zEntCruiseBubble_f_6_2832; } else if (diff < zEntCruiseBubble_f_n3_1415) @@ -3032,7 +3050,6 @@ void cruise_bubble::state_player_aim::face_camera(float32 dt) } #endif - #if 0 void cruise_bubble::state_player_fire::start() { @@ -3056,10 +3073,9 @@ void cruise_bubble::state_player_fire::start() xMat4x3* cruise_bubble::get_missle_mat() { - return (xMat4x3*) shared.missle_model->Mat; + return (xMat4x3*)shared.missle_model->Mat; } - #if 0 void cruise_bubble::state_player_fire::stop() { @@ -3067,7 +3083,6 @@ void cruise_bubble::state_player_fire::stop() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_player_fire::update(float32 dt) { @@ -3103,7 +3118,6 @@ void cruise_bubble::state_player_fire::update_wand(float32 dt) // empty } - #if 0 void cruise_bubble::state_player_wait::start() { @@ -3111,7 +3125,6 @@ void cruise_bubble::state_player_wait::start() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_player_wait::update(float32) { @@ -3119,7 +3132,6 @@ cruise_bubble::state_enum cruise_bubble::state_player_wait::update(float32) } #endif - #if 0 void cruise_bubble::state_missle_appear::start() { @@ -3144,7 +3156,6 @@ void cruise_bubble::state_missle_appear::move() mat.pos += prod; } - #if 0 void cruise_bubble::state_missle_appear::stop() { @@ -3152,7 +3163,6 @@ void cruise_bubble::state_missle_appear::stop() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_missle_appear::update(float32 dt) { @@ -3178,7 +3188,6 @@ void cruise_bubble::state_missle_appear::update_effects(float32 dt) //empty } - #ifndef NON_MATCHING void cruise_bubble::state_missle_fly::start() { @@ -3186,7 +3195,7 @@ void cruise_bubble::state_missle_fly::start() // & to match function size shared.flags = (shared.flags | 0x8) & 0x4; this->life = current_tweak->missle.life; - + show_missle(); start_trail(); start_damaging(); @@ -3200,7 +3209,7 @@ void cruise_bubble::state_missle_fly::start() missle_record.reset(); missle_record.push_front(missle_record_data(this->last_loc, this->rot.z)); - missle_record.push_front(missle_record_data(get_missle_mat()->pos, this->rot.z)); + missle_record.push_front(missle_record_data(get_missle_mat()->pos, this->rot.z)); play_sound(2, zEntCruiseBubble_f_1_0, &get_missle_mat()->pos); signal_event(0x203); @@ -3209,8 +3218,8 @@ void cruise_bubble::state_missle_fly::start() cruise_bubble::missle_record_data::missle_record_data(const xVec3& loc, float32 roll) : loc(loc), roll(roll) -{ } - +{ +} #if 0 void cruise_bubble::state_missle_fly::stop() @@ -3229,7 +3238,6 @@ void cruise_bubble::state_missle_fly::stop() } #endif - #if 0 void cruise_bubble::state_missle_fly::abort() { @@ -3243,7 +3251,6 @@ void cruise_bubble::state_missle_fly::abort() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_missle_fly::update(float32 dt) { @@ -3289,17 +3296,17 @@ void cruise_bubble::state_missle_fly::update_flash(float32 dt) { this->flash_time += dt; - float32 tflash = current_tweak->missle.fly.flash_interval * (this->life / current_tweak->missle.life); + float32 tflash = + current_tweak->missle.fly.flash_interval * (this->life / current_tweak->missle.life); if (this->flash_time > tflash) { flash_hud(); - + float32 floor_frac = std::floorf(this->flash_time / tflash); this->flash_time = this->flash_time - (floor_frac * tflash); } } - #ifdef NON_MATCHING void cruise_bubble::state_missle_fly::update_engine_sound(float32 dt) { @@ -3319,11 +3326,12 @@ uint8 cruise_bubble::state_missle_fly::collide_hazards() NPCHazard* c[2]; c[0] = NULL; HAZ_Iterate(&cruise_bubble::state_missle_fly::hazard_check, c, 0xa000); - - if (c[0] == NULL) { + + if (c[0] == NULL) + { return false; } - + if ((c[0]->flg_hazard & 0x200000) != 0) { c[0]->MarkForRecycle(); @@ -3331,7 +3339,6 @@ uint8 cruise_bubble::state_missle_fly::collide_hazards() shared.hit_loc = get_missle_mat()->pos; return true; } - #ifdef NON_MATCHING bool cruise_bubble::state_missle_fly::hazard_check(NPCHazard& haz, void* context) @@ -3343,7 +3350,7 @@ bool cruise_bubble::state_missle_fly::hazard_check(NPCHazard& haz, void* context // scheduling for implicit copy ctor off if (vvar.length2() < fvar * fvar) { - ((NPCHazard**) context)[0] = &haz; + ((NPCHazard**)context)[0] = &haz; return false; } @@ -3368,7 +3375,8 @@ uint8 cruise_bubble::state_missle_fly::collide() if (can_damage(hit_ent)) { - damage_entity(*hit_ent, *hit_loc, get_missle_mat()->at, *hit_norm, zEntCruiseBubble_f_0_0, false); + damage_entity(*hit_ent, *hit_loc, get_missle_mat()->at, *hit_norm, + zEntCruiseBubble_f_0_0, false); return true; } @@ -3378,7 +3386,7 @@ uint8 cruise_bubble::state_missle_fly::collide() { return true; } - + mat->pos += hit_depen; xVec3 diff = mat->pos - this->last_loc; float32 len = diff.length2(); @@ -3386,45 +3394,45 @@ uint8 cruise_bubble::state_missle_fly::collide() { return false; } - + len = xsqrt(len); xVec3 diff_normalized = diff * (zEntCruiseBubble_f_1_0 / len); - float32 sin = -xasin(diff_normalized.y); + float32 sin = -xasin(diff_normalized.y); if (float32(iabs(sin)) > zEntCruiseBubble_f_1_5708 * current_tweak->missle.fly.turn.ybound) { return true; } - + float32 tan = xatan2(diff_normalized.x, diff_normalized.z); - float32 mod = xrmod(zEntCruiseBubble_f_3_1415 + (tan - this->rot.x)) - zEntCruiseBubble_f_3_1415; + float32 mod = + xrmod(zEntCruiseBubble_f_3_1415 + (tan - this->rot.x)) - zEntCruiseBubble_f_3_1415; this->rot.x += mod * current_tweak->missle.collide_twist; this->rot.y += (sin - this->rot.y) * current_tweak->missle.collide_twist; xMat3x3Euler(mat, &this->rot); - + if (hit_depen.length2() < zEntCruiseBubble_f_0_000001) { return false; } - } - while (++i < current_tweak->missle.hit_tests); + } while (++i < current_tweak->missle.hit_tests); float32 dist = zEntCruiseBubble_f_0_1 * current_tweak->missle.hit_dist; if (hit_depen.length2() < dist * dist) { return false; } - + return this->hit_test(*hit_loc, *hit_norm, hit_depen, hit_ent); } - #ifdef NON_MATCHING -uint8 cruise_bubble::state_missle_fly::hit_test(xVec3& hit_loc, xVec3& hit_norm, xVec3& hit_depen, xEnt*& hit_ent) const +uint8 cruise_bubble::state_missle_fly::hit_test(xVec3& hit_loc, xVec3& hit_norm, xVec3& hit_depen, + xEnt*& hit_ent) const { xScene* s = globals.sceneCur; xVec3* loc = &get_missle_mat()->pos; xSweptSphere ss; - xSweptSpherePrepare(&ss, (xVec3*) &this->last_loc, loc, current_tweak->missle.hit_dist); + xSweptSpherePrepare(&ss, (xVec3*)&this->last_loc, loc, current_tweak->missle.hit_dist); ss.optr = NULL; if (!xSweptSphereToScene(&ss, s, NULL, 0x10)) { @@ -3441,26 +3449,24 @@ uint8 cruise_bubble::state_missle_fly::hit_test(xVec3& hit_loc, xVec3& hit_norm, hit_loc = ss.worldPos + ss.worldTangent * overshoot.dot(ss.worldTangent); hit_depen = hit_loc - *loc; hit_norm = ss.worldNormal; - hit_ent = (xEnt*) ss.optr; + hit_ent = (xEnt*)ss.optr; return true; } #endif - #ifdef NON_MATCHING void cruise_bubble::state_missle_fly::update_move(float32 dt) { float32 move = zEntCruiseBubble_f_0_0; - xAccelMove(move, this->vel, current_tweak->missle.fly.accel, dt, current_tweak->missle.fly.max_vel); - + xAccelMove(move, this->vel, current_tweak->missle.fly.accel, dt, + current_tweak->missle.fly.max_vel); + xMat4x3* mat = get_missle_mat(); mat->pos += mat->at * move; } #endif - - #ifdef NON_MATCHING void cruise_bubble::state_missle_explode::start() { @@ -3472,65 +3478,19 @@ void cruise_bubble::state_missle_explode::start() { this->apply_damage(current_tweak->missle.explode.hit_radius); } - + float32 dist = (shared.hit_loc - get_player_loc()).length2(); // regalloc for current_tweak - float32 min_dist = current_tweak->camera.survey.min_dist * current_tweak->camera.survey.min_dist; + float32 min_dist = + current_tweak->camera.survey.min_dist * current_tweak->camera.survey.min_dist; // scheduling for THREAD_CAMERA set_state(THREAD_CAMERA, dist <= min_dist ? STATE_CAMERA_RESTORE : STATE_CAMERA_SURVEY); - play_sound(1, zEntCruiseBubble_f_1_0, &get_missle_mat()->pos); this->start_effects(); } #endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #if 0 void cruise_bubble::state_missle_explode::stop() { @@ -3538,7 +3498,6 @@ void cruise_bubble::state_missle_explode::stop() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_missle_explode::update(float32 dt) { @@ -3554,20 +3513,19 @@ cruise_bubble::state_enum cruise_bubble::state_missle_explode::update(float32 dt } #endif - #ifdef NON_MATCHING void cruise_bubble::state_camera_aim::start() { capture_camera(); xSndSelectListenerMode(SND_LISTENER_MODE_CAMERA); xCameraUpdate(&globals.camera, zEntCruiseBubble_f_0_001); - + this->phi_vel = this->height_vel = this->dist_vel = zEntCruiseBubble_f_0_0; xMat4x3* mat = &globals.camera.mat; xVec3& ploc = get_player_loc(); // pretty sure the next 5 lines were originally just 1 looking like this: // xVec2 offset = {mat->pos.x - ploc.x, mat->pos.z - ploc.z}; - // this will however call the implicit copy constructor with a generated instance + // this will however call the implicit copy constructor with a generated instance // in the .sbss2 section (lbl_803D0830) // writing it like this narrowed the diff down to only a few // regalloc and scheduling issues @@ -3576,19 +3534,18 @@ void cruise_bubble::state_camera_aim::start() xVec2 offset = lbl_803D0830; offset.x = x; offset.y = y; - + this->phi = xatan2(offset.x, offset.y); this->height = mat->pos.y - ploc.y; this->dist = offset.length(); this->control_delay = this->seize_delay = zEntCruiseBubble_f_0_0; - + xQuatFromMat(&this->facing, mat); start_cam_mat = *mat; start_cam_mat.pos -= ploc; } #endif - #if 0 void cruise_bubble::state_camera_aim::stop() { @@ -3596,7 +3553,6 @@ void cruise_bubble::state_camera_aim::stop() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_camera_aim::update(float32 dt) { @@ -3650,7 +3606,6 @@ void cruise_bubble::state_camera_seize::start() } #endif - #if 0 void cruise_bubble::state_camera_seize::stop() { @@ -3659,7 +3614,6 @@ void cruise_bubble::state_camera_seize::stop() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_camera_seize::update(float32 dt) { @@ -3684,7 +3638,6 @@ cruise_bubble::state_enum cruise_bubble::state_camera_seize::update(float32 dt) } #endif - #if 0 void cruise_bubble::state_camera_attach::start() { @@ -3697,7 +3650,6 @@ void cruise_bubble::state_camera_attach::start() } #endif - #if 0 void cruise_bubble::state_camera_attach::stop() { @@ -3708,7 +3660,6 @@ void cruise_bubble::state_camera_attach::stop() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_camera_attach::update(float32 dt) { @@ -3720,7 +3671,6 @@ cruise_bubble::state_enum cruise_bubble::state_camera_attach::update(float32 dt) return STATE_CAMERA_ATTACH; } #endif - #if 0 void cruise_bubble::state_camera_survey::start() @@ -3740,7 +3690,6 @@ void cruise_bubble::state_camera_survey::start() } #endif - #if 0 void cruise_bubble::state_camera_survey::stop() { @@ -3748,7 +3697,6 @@ void cruise_bubble::state_camera_survey::stop() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_camera_survey::update(float32 dt) { @@ -3801,7 +3749,6 @@ void cruise_bubble::state_camera_restore::start() } #endif - #if 0 void cruise_bubble::state_camera_restore::stop() { @@ -3810,7 +3757,6 @@ void cruise_bubble::state_camera_restore::stop() } #endif - #if 0 cruise_bubble::state_enum cruise_bubble::state_camera_restore::update(float32 dt) { @@ -3824,7 +3770,6 @@ cruise_bubble::state_enum cruise_bubble::state_camera_restore::update(float32 dt } #endif - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Game/zEntCruiseBubble.h b/src/SB/Game/zEntCruiseBubble.h index ca73016b..81510376 100644 --- a/src/SB/Game/zEntCruiseBubble.h +++ b/src/SB/Game/zEntCruiseBubble.h @@ -1,4 +1,5 @@ #ifndef ZENTCRUISEBUBBLE_H + #define ZENTCRUISEBUBBLE_H #include "zNPCHazard.h" @@ -13,8 +14,10 @@ // probably working on one of the bosses which also seem to use this. // As of now I'm not sure if you should include this declaration, // define your own or find a good place for shared use. -namespace auto_tweak { - template void load_param(T1&, T2, T2, T2, xModelAssetParam*, uint32, const char*); +namespace auto_tweak +{ + template + void load_param(T1&, T2, T2, T2, xModelAssetParam*, uint32, const char*); }; namespace cruise_bubble @@ -184,7 +187,8 @@ namespace cruise_bubble uint8 hit_test(xVec3& hit_loc, xVec3& hit_norm, xVec3& hit_depen, xEnt*& hit_ent) const; void update_move(float32 dt); void update_turn(float32 dt); - void calculate_rotation(xVec2& d1, xVec2& v1, float32 dt, const xVec2& d0, const xVec2& v0, const xVec2& a0, const xVec2& a1) const; + void calculate_rotation(xVec2& d1, xVec2& v1, float32 dt, const xVec2& d0, const xVec2& v0, + const xVec2& a0, const xVec2& a1) const; }; struct state_missle_appear : state_type @@ -259,7 +263,7 @@ namespace cruise_bubble void start(); void stop(); state_enum update(float32 dt); - + void move(); void eval_missle_path(float32 dist, xVec3& loc, float32& roll) const; void lerp(float32& x, float32 t, float32 a, float32 b) const; @@ -351,7 +355,7 @@ namespace cruise_bubble float32 delay_wand; } fire; } player; - + // Size: 0x5c, Offset: 0x14 struct _class_22 { @@ -463,7 +467,7 @@ namespace cruise_bubble float32 bubble_emit_radius; float32 wake_emit_radius; } trail; - + // Size: 0x10, Offset: 0x108 struct _class_29 { @@ -486,7 +490,7 @@ namespace cruise_bubble float32 vel_angle; float32 rot_vel_max; } droplet; - + // Size: 0x44, Offset: 0x13c struct _class_43 { @@ -526,7 +530,7 @@ namespace cruise_bubble float32 glow_size; } timer; } hud; - + // Size: 0xc, Offset: 0x180 struct _class_34 { @@ -546,11 +550,10 @@ namespace cruise_bubble { xVec3 loc; float32 roll; - + missle_record_data(const xVec3& loc, float32 roll); }; - void init_sound(); void stop_sound(int32 which, uint32 handle); uint32 play_sound(int32 which, float32 volFactor); @@ -593,7 +596,8 @@ namespace cruise_bubble void reset_explode_decal(); void init_explode_decal(); void init_shrapnel(); - void add_trail_sample(const xVec3& loc0, const xVec3& dir0, const xVec3& loc1, const xVec3& dir1, float32 dt); + void add_trail_sample(const xVec3& loc0, const xVec3& dir0, const xVec3& loc1, + const xVec3& dir1, float32 dt); void update_trail(float32 dt); void refresh_missle_model(); void update_missle(xScene& s, float32 dt); @@ -641,4 +645,4 @@ namespace cruise_bubble xMat4x3* get_missle_mat(); } // namespace cruise_bubble -#endif \ No newline at end of file +#endif diff --git a/src/SB/Game/zEntDestructObj.cpp b/src/SB/Game/zEntDestructObj.cpp index 3f3c9078..6e061429 100644 --- a/src/SB/Game/zEntDestructObj.cpp +++ b/src/SB/Game/zEntDestructObj.cpp @@ -1,57 +1,3 @@ #include "zEntDestructObj.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zEntHangable.cpp b/src/SB/Game/zEntHangable.cpp index b867c8d2..e45a100a 100644 --- a/src/SB/Game/zEntHangable.cpp +++ b/src/SB/Game/zEntHangable.cpp @@ -4,55 +4,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Game/zEntPickup.cpp b/src/SB/Game/zEntPickup.cpp index 7c208855..52ff8984 100644 --- a/src/SB/Game/zEntPickup.cpp +++ b/src/SB/Game/zEntPickup.cpp @@ -1111,9 +1111,6 @@ void zEntPickup_GiveAllRewardsNow() memset(sRewards, 0, sizeof(sRewards)); } - - - void zEntPickup_Reset(zEntPickup* ent) { zEntReset(ent); @@ -1336,8 +1333,6 @@ zPickupAuraInfo zPickupAuraTable[] = static void zEntPickup_UpdateFX(zEntPickup* ent, xScene*, float32 dt); // Uses int-to-float conversion - - static void set_alpha_blend(xModelInstance* model) { model->PipeFlags &= ~0xFF0C; @@ -1428,13 +1423,8 @@ void zEntPickup_RenderOne(xEnt* ent) } #endif - - - // Uses int-to-float conversion - - static uint32 rewardRequest(uint32 shinyType, xVec3* ppos, xVec3 pos) { for (int32 i = 0; i < REWARD_PICKUP_COUNT; i++) diff --git a/src/SB/Game/zEntPlayer.cpp b/src/SB/Game/zEntPlayer.cpp index 40726444..fa52f43b 100644 --- a/src/SB/Game/zEntPlayer.cpp +++ b/src/SB/Game/zEntPlayer.cpp @@ -61,9 +61,6 @@ extern const int8 zEntPlayer_Strings[]; extern uint32 sPlayerSnd[ePlayer_MAXTYPES][ePlayerSnd_Total]; extern uint32 sPlayerSndID[ePlayer_MAXTYPES][ePlayerSnd_Total]; - - - void zEntPlayerKillCarry() { if (!globals.player.carry.grabbed) @@ -92,12 +89,6 @@ void zEntPlayerKillCarry() globals.player.carry.grabbed = NULL; } - - - - - - void TellPlayerVillainIsNear(float32 visnear) { globals.player.BadGuyNearTimer = visnear; @@ -108,181 +99,11 @@ void SetPlayerKillsVillainTimer(float32 time) globals.player.VictoryTimer = time; } - - - - - - - - - - - - - - - - - - - - - void HealthReset() { globals.player.Health = globals.player.MaxHealth; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uint32 BubbleBounceCheck(xAnimTransition* tran, xAnimSingle* anim, void* param_3) { if (globals.player.cheat_mode) @@ -293,9 +114,6 @@ uint32 BubbleBounceCheck(xAnimTransition* tran, xAnimSingle* anim, void* param_3 return (!globals.player.ControlOff && (globals.pad0->pressed & 0x20000)); } - - - uint32 BBounceAttackCB(xAnimTransition* tran, xAnimSingle* anim, void* param_3) { globals.player.ent.frame->vel.y = -globals.player.g.BBounceSpeed; @@ -307,16 +125,6 @@ uint32 BBounceStrikeCheck(xAnimTransition* tran, xAnimSingle* anim, void* param_ return (globals.player.JumpState == 0 || globals.player.JumpState == 1); } - - - - - - - - - - uint32 BbowlCheck(xAnimTransition* tran, xAnimSingle* anim, void* param_3) { if (globals.player.cheat_mode) @@ -333,9 +141,6 @@ uint32 BbowlCheck(xAnimTransition* tran, xAnimSingle* anim, void* param_3) globals.player.g.PowerUp[0]); } - - - uint32 BbowlWindupEndCheck(xAnimTransition* tran, xAnimSingle* anim, void* param_3) { if (anim->Time < sBubbleBowlLastWindupTime && sShouldBubbleBowl) @@ -419,7 +224,6 @@ uint32 GooDeathCB(xAnimTransition* tran, xAnimSingle* anim, void* param_3) } #else - #endif uint32 Hit01Check(xAnimTransition* tran, xAnimSingle* anim, void* param_3) @@ -513,9 +317,6 @@ uint32 Defeated05Check(xAnimTransition* tran, xAnimSingle* anim, void* param_3) return globals.player.Health == 0 && player_dead_anim % tran->UserFlags + 1 == 5; } - - - uint32 SpatulaGrabCheck(xAnimTransition*, xAnimSingle*) { // much different than PS2 version of this function @@ -531,38 +332,11 @@ int32 zEntPlayer_InBossBattle() ); } - - - - - - - uint32 LCopterCheck(xAnimTransition*, xAnimSingle*) { return (globals.player.JumpState && sLassoInfo->canCopter && !globals.player.ControlOff && (globals.pad0->pressed & 0x10000)); } - - - - - - - - - - - - - - - - - - - - uint32 WallJumpFlightLandCallback(xAnimTransition* tran, xAnimSingle* anim, void* param_3) { @@ -570,10 +344,6 @@ uint32 WallJumpFlightLandCallback(xAnimTransition* tran, xAnimSingle* anim, void return 0; } - - - - uint32 WallJumpLandFlightCallback(xAnimTransition* tran, xAnimSingle* anim, void* param_3) { globals.player.WallJumpState = k_WALLJUMP_FLIGHT; @@ -586,19 +356,6 @@ uint32 JumpCheck(xAnimTransition* tran, xAnimSingle* anim, void* param_3) (globals.pad0->pressed & 0x10000)); } - - - - - - - - - - - - - #if 0 // surprisingly doesn't match at all even though it appears to be simple uint32 BounceStopLCopterCB(xAnimTransition* tran, xAnimSingle* anim, void* param_3) @@ -612,286 +369,37 @@ uint32 BounceStopLCopterCB(xAnimTransition* tran, xAnimSingle* anim, void* param } #endif +uint32 LassoLostTargetCheck(xAnimTransition*, xAnimSingle*) +{ + return !sLassoInfo->target; +} +uint32 LassoStraightToDestroyCheck(xAnimTransition*, xAnimSingle*) +{ + return sLasso->flags & (1 << 11); +} +uint32 LassoAboutToDestroyCheck(xAnimTransition*, xAnimSingle*) +{ + return 0; +} +uint32 LassoDestroyCheck(xAnimTransition*, xAnimSingle*) +{ + return sLasso->flags & (1 << 11); +} +uint32 LassoReyankCheck(xAnimTransition*, xAnimSingle*) +{ + return 0; +} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -uint32 LassoLostTargetCheck(xAnimTransition*, xAnimSingle*) -{ - return !sLassoInfo->target; -} - - -uint32 LassoStraightToDestroyCheck(xAnimTransition*, xAnimSingle*) -{ - return sLasso->flags & (1 << 11); -} - - -uint32 LassoAboutToDestroyCheck(xAnimTransition*, xAnimSingle*) -{ - return 0; -} - - -uint32 LassoDestroyCheck(xAnimTransition*, xAnimSingle*) -{ - return sLasso->flags & (1 << 11); -} - - -uint32 LassoReyankCheck(xAnimTransition*, xAnimSingle*) -{ - return 0; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -bool zEntPlayer_IsSneaking() -{ - if (gCurrentPlayer != eCurrentPlayerSpongeBob) - { - return false; - } +bool zEntPlayer_IsSneaking() +{ + if (gCurrentPlayer != eCurrentPlayerSpongeBob) + { + return false; + } uint32 flags = globals.player.ent.model->Anim->Single->State->UserFlags; if ((flags & 1) != 0 || (flags & 0x1e) == 2 || (flags & 0x1e) == 4) @@ -904,7 +412,6 @@ bool zEntPlayer_IsSneaking() } } - #if 0 // The cmpw instruction used in `if ((int32)non_choices[j] - 1 == i)` has its // operands in the wrong order. @@ -1008,104 +515,16 @@ void load_player_ini() } } - - - - - - void zEntPlayer_Load(xEnt* ent, xSerial* serial) { return; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void zEntPlayer_PatrickLaunch(xEnt* patLauncher) { globals.player.carry.patLauncher = patLauncher; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int32 zEntPlayer_Damage(xBase* src, uint32 damage, const xVec3* knockback) { int32 newDamage = zEntPlayer_Damage(src, damage); @@ -1125,18 +544,6 @@ int32 zEntPlayer_Damage(xBase* src, uint32 damage, const xVec3* knockback) return true; } - - - - - - - - - - - - void zEntPlayer_GiveHealth(int32 quantity) { if (quantity < 0 && -quantity > (int32)globals.player.Health) @@ -1155,7 +562,6 @@ void zEntPlayer_GiveHealth(int32 quantity) } } - #if 0 void zEntPlayer_GiveSpatula(int32) @@ -1241,182 +647,6 @@ void zEntPlayer_GiveLevelPickupCurrentLevel(int32 quantity) } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void zEntPlayer_SNDSetVol(_tagePlayerSnd player_snd, float32 new_vol) { if (sPlayerSnd[gCurrentPlayer][player_snd]) @@ -1433,69 +663,11 @@ void zEntPlayer_SNDSetPitch(_tagePlayerSnd player_snd, float32 new_pitch) } } - - - - - - void zEntPlayer_SNDNotifyPlaying(uint32 id) { sCurrentStreamSndID = id; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; @@ -1507,66 +679,16 @@ void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) o->z = z; } - - - - - - - - - - - - - - - - - - - - - uint8 xSndIsPlaying(uint32 assetID) { return (uint8)iSndIsPlaying(assetID); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - int32 zNPCTiki::IsHealthy() { return flg_vuln != 0; } - void zCameraTranslate(xCamera* cam, xVec3* pos) { zCameraTranslate(cam, pos->x, pos->y, pos->z); @@ -1594,7 +716,6 @@ xVec3* NPCC_upDir(xEnt* ent) return (xVec3*)&ent->model->Mat->up; } - int32 zGooIs(xEnt* ent) { float32 temp; diff --git a/src/SB/Game/zEntPlayerBungeeState.cpp b/src/SB/Game/zEntPlayerBungeeState.cpp index b396f006..582bcf37 100644 --- a/src/SB/Game/zEntPlayerBungeeState.cpp +++ b/src/SB/Game/zEntPlayerBungeeState.cpp @@ -4,565 +4,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; @@ -573,11 +14,3 @@ void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) o->y = y; o->z = z; } - - - - - - - - diff --git a/src/SB/Game/zEntPlayerOOBState.cpp b/src/SB/Game/zEntPlayerOOBState.cpp index 0e2e6e75..75b234ae 100644 --- a/src/SB/Game/zEntPlayerOOBState.cpp +++ b/src/SB/Game/zEntPlayerOOBState.cpp @@ -1,398 +1,3 @@ #include "zEntPlayerOOBState.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zEntTeleportBox.cpp b/src/SB/Game/zEntTeleportBox.cpp index c0ca4166..219aac3f 100644 --- a/src/SB/Game/zEntTeleportBox.cpp +++ b/src/SB/Game/zEntTeleportBox.cpp @@ -241,9 +241,6 @@ void zEntTeleportBox_Init(xBase& data, xDynAsset& asset, ulong32) void zEntTeleportBox_Init(_zEntTeleportBox* ent, teleport_asset* asset); - - - void zEntTeleportBox_InitAll() { sPlayerIn = 0; @@ -251,8 +248,6 @@ void zEntTeleportBox_InitAll() void zEntTeleportBox_Setup(_zEntTeleportBox* ent); - - #if 1 // wip void zEntTeleportBox_Update(xEnt* rawent, xScene* sc, float32 dt); #else diff --git a/src/SB/Game/zFX.cpp b/src/SB/Game/zFX.cpp index ec412009..19db5a8d 100644 --- a/src/SB/Game/zFX.cpp +++ b/src/SB/Game/zFX.cpp @@ -32,9 +32,6 @@ void on_spawn_bubble_wall(const tweak_info& tweak) zFX_SpawnBubbleWall(); } - - - void zFX_SceneExit(RpWorld* world) { xFX_SceneExit(world); @@ -74,9 +71,6 @@ void zFXMuscleArmWave(xVec3* pos) xFXRingCreate(pos, &sMuscleArmRing[0]); } - - - void zFXGoo_SceneEnter() { int32 i; @@ -123,15 +117,6 @@ void zFXGoo_SceneExit() } } - - - - - - - - - void zFXUpdate(float32 dt) { zFXGooUpdate(dt); @@ -140,135 +125,6 @@ void zFXUpdate(float32 dt) xFXUpdate(dt); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #if 0 // Idk what the name of the other function is. void init_poppers() @@ -279,58 +135,11 @@ void init_poppers() #endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xDebugAddTweak(const char* unk1, const char* unk2, const tweak_callback* unk3, void* unk4, uint32 unk5) { } - - - - - - xVec3& xVec3::up_normalize() { return safe_normalize(xVec3::m_UnitAxisY); diff --git a/src/SB/Game/zGame.cpp b/src/SB/Game/zGame.cpp index 6c5f3b23..b6e7ff1f 100644 --- a/src/SB/Game/zGame.cpp +++ b/src/SB/Game/zGame.cpp @@ -39,10 +39,6 @@ extern float32 lbl_803CF5AC; // A extern float32 lbl_803CDA54; extern float32 lbl_803CDA58; - - - - #ifdef NON_MATCHING // Scheduling, I guess void zGameInit(uint32 theSceneID) @@ -76,7 +72,6 @@ void zGameInit(uint32 theSceneID) } #endif - #ifdef NON_MATCHING // Scheduling, I guess void zGameExit() @@ -106,7 +101,6 @@ void zGameExit() } #endif - #ifdef NON_MATCHING void zGameSetup() { @@ -151,10 +145,6 @@ void zGameSetup() } #endif - - - - int32 zGameIsPaused() { if (gGameMode == 8) @@ -172,7 +162,6 @@ int32 zGameIsPaused() return 0; } - #ifdef NON_MATCHING int32 zGameLoopContinue() { @@ -197,7 +186,6 @@ int32 zGameLoopContinue() } #endif - int32 zGameOkToPause() { int32 uVar1 = 0; @@ -229,7 +217,6 @@ int32 zGameOkToPause() return uVar1; } - #ifdef NON_MATCHING void zGamePause() { @@ -253,7 +240,6 @@ void zGamePause() } #endif - #ifdef NON_MATCHING void zGameStall() { @@ -267,21 +253,10 @@ void zGameStall() } #endif - - - - - - - - - - void zGameTakeSnapShot(RwCamera*) { } - #ifdef NON_MATCHING // Float memes void zGameUpdateTransitionBubbles() @@ -295,7 +270,6 @@ void zGameUpdateTransitionBubbles() } #endif - #ifdef NON_MATCHING // Tons of extra instructions for some reason void zGameScreenTransitionBegin() @@ -324,7 +298,6 @@ void zGameScreenTransitionBegin() } #endif - // void zGameScreenTransitionUpdate(float32 percentComplete, char* msg) { @@ -334,10 +307,6 @@ void zGameScreenTransitionUpdate(float32 percentComplete, char* msg) } } - - - - void zGameScreenTransitionEnd() { RwFrame* frame; @@ -367,24 +336,15 @@ void zGameScreenTransitionEnd() gGameWhereAmI = eGameWhere_TransitionEnded; } - - - - void zGameStats_Init() { } - - - - void xDrawEnd() { iDrawEnd(); } - void xDrawBegin() { iDrawBegin(); diff --git a/src/SB/Game/zGameExtras.cpp b/src/SB/Game/zGameExtras.cpp index 08dcbc9b..beb5ec6b 100644 --- a/src/SB/Game/zGameExtras.cpp +++ b/src/SB/Game/zGameExtras.cpp @@ -218,7 +218,7 @@ int32 EGG_check_ExtrasFlags(EGGItem*) if (g_currDay == 6) g_gameExtraFlags |= 0b001000000; break; - + case JULY: if (g_currDay == 4) // Independence Day g_gameExtraFlags |= 0b000000010; @@ -314,7 +314,6 @@ int32 zGameExtras_CheatFlags() return g_flg_chEnabled; } - #if 0 void zGameExtras_NewGameReset() { @@ -373,9 +372,6 @@ void AddToCheatPressed(uint32 button) sCheatPressed[15] = button; } - - - void GEC_CheatFlagAdd(int32 bit) { g_flg_chEnabled |= bit; @@ -386,7 +382,6 @@ void GEC_CheatFlagToggle(int32 bit) g_flg_chEnabled ^= bit; } - #if 1 static uint32 aid_sndList_1160[7] = {}; #else @@ -522,7 +517,6 @@ void GEC_cb_ChaChing() xSndPlay(aid_snd, _1192, _975, 0x80, 0, 0, SND_CAT_GAME, _975); } - #if 0 void GEC_cb_RestoreHealth() { @@ -561,7 +555,6 @@ void GEC_cb_NoPantsMode() xSndPlay(aid_snd, _1192, _975, 0x80, 0, 0, SND_CAT_GAME, _975); } - #if 1 static uint32 choices_1318[3] = {}; #else @@ -598,7 +591,6 @@ void GEC_cb_SwapCCUD() GEC_dfltSound(); } - #if 1 static uint32 aid_sndList_1342[6] = {}; #else @@ -678,7 +670,6 @@ uint32 zGame_HackIsGallery() return 0; } - #if 0 template <> uint32 xUtil_choose(uint32 const* list, int32 size, float32 const* float_list) { diff --git a/src/SB/Game/zGust.cpp b/src/SB/Game/zGust.cpp index 6547f3fe..372fd566 100644 --- a/src/SB/Game/zGust.cpp +++ b/src/SB/Game/zGust.cpp @@ -2,48 +2,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #if 0 // WIP. void zGustUpdateFX(float32 seconds) diff --git a/src/SB/Game/zHud.cpp b/src/SB/Game/zHud.cpp index 0371e2e6..6b981d04 100644 --- a/src/SB/Game/zHud.cpp +++ b/src/SB/Game/zHud.cpp @@ -1,34 +1,3 @@ #include "zHud.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zLOD.cpp b/src/SB/Game/zLOD.cpp index c3200540..2ad37a22 100644 --- a/src/SB/Game/zLOD.cpp +++ b/src/SB/Game/zLOD.cpp @@ -16,7 +16,6 @@ extern float32 lbl_803CDC40; // 1.0 extern float32 lbl_803CDC48; // 4.0 extern float32 lbl_803CDC4C; // 10.0 - #ifdef NON_MATCHING // Float memes void AddToLODList(xModelInstance* model) @@ -72,7 +71,6 @@ void AddToLODList(xModelInstance* model) } #endif - xEnt* AddToLODList(xEnt* ent, xScene* scene, void* v) { if (!ent->model) @@ -98,13 +96,6 @@ xEnt* AddToLODList(xEnt* ent, xScene* scene, void* v) return ent; } - - - - - - - zLODTable* zLOD_Get(xEnt* ent) { if (!ent->model) diff --git a/src/SB/Game/zLight.cpp b/src/SB/Game/zLight.cpp index 660c1bc3..7c4397d6 100644 --- a/src/SB/Game/zLight.cpp +++ b/src/SB/Game/zLight.cpp @@ -21,7 +21,6 @@ extern float32 zLight_float; extern xVec3 sDefaultShadowVec; extern void (*sEffectFuncs[18])(_zLight*, float32); - #ifdef NON_MATCHING void zLightResetAll(xEnv* env) @@ -41,13 +40,11 @@ void zLightResetAll(xEnv* env) } #endif - void zLightInit(void* b, void* tasset) { zLightInit((xBase*)b, (zLightAsset*)tasset); } - void zLightInit(xBase* b, zLightAsset* tasset) { _zLight* t = (_zLight*)b; @@ -114,7 +111,6 @@ void zLightInit(xBase* b, zLightAsset* tasset) } } - void zLightResolveLinks() { int32 i; @@ -134,7 +130,6 @@ void zLightResolveLinks() } } - void zLightDestroyAll() { int32 total = sLightTotal; @@ -146,13 +141,11 @@ void zLightDestroyAll() sLightTotal = 0; } - void zLightDestroy(_zLight* param_1) { iLightDestroy(¶m_1->light); } - void zLightReset(_zLight* param_1) { xBaseReset(param_1, param_1->tasset); @@ -164,19 +157,16 @@ void zLightReset(_zLight* param_1) zLightEffectSet(param_1, param_1->tasset->lightEffect); } - void zLightSave(_zLight* ent, xSerial* s) { xBaseSave(ent, s); } - void zLightLoad(_zLight* ent, xSerial* s) { xBaseLoad(ent, s); } - int32 zLightEventCB(xBase* param_1, xBase* to, uint32 toEvent, const float* param_4, xBase* param_5) { _zLight* t = (_zLight*)to; @@ -205,7 +195,6 @@ int32 zLightEventCB(xBase* param_1, xBase* to, uint32 toEvent, const float* para return 1; } - #ifdef NON_MATCHING // Float issue void zLightUpdate(xBase* to, xScene* param_2, float32 dt) @@ -227,7 +216,6 @@ void zLightUpdate(xBase* to, xScene* param_2, float32 dt) } #endif - #if 0 // Something is wrong with gNumTemporaryLights void zLightAddLocalEnv() @@ -251,7 +239,6 @@ void zLightAddLocalEnv() } #endif - #ifdef NON_MATCHING // Float issue void zLightAddLocal(xEnt* ent) @@ -269,7 +256,6 @@ void zLightAddLocal(xEnt* ent) } #endif - void zLightRemoveLocalEnv() { int i; @@ -284,7 +270,6 @@ void zLightRemoveLocalEnv() gNumTemporaryLights = 0; } - void zLightSetVolume(zVolume* vol) { if (!vol) diff --git a/src/SB/Game/zLightning.cpp b/src/SB/Game/zLightning.cpp index c53aa9fd..d425196a 100644 --- a/src/SB/Game/zLightning.cpp +++ b/src/SB/Game/zLightning.cpp @@ -42,27 +42,6 @@ void lightningTweakStart(tweak_info& t) #endif - - - - - - - - - - - - - - - - - - - - - #if 0 // WIP. void zLightningRender() @@ -101,10 +80,6 @@ void zLightningKill(zLightning* l) l->flags &= 0xfffffefe; } - - - - void xDebugAddTweak(char* name, uint8* property, uint8 param_3, uint8 param_4, tweak_callback* callback, void* param_6, uint32 param_7) { diff --git a/src/SB/Game/zMenu.cpp b/src/SB/Game/zMenu.cpp index a6a8ca4c..24316f1c 100644 --- a/src/SB/Game/zMenu.cpp +++ b/src/SB/Game/zMenu.cpp @@ -68,13 +68,11 @@ extern int8 menu_fmv_played; extern iColor_tag BlackColorInitializer; extern iColor_tag ClearColorInitializer; - int32 zMenuRunning() { return sInMenu; } - void zMenuInit(uint32 theSceneID) { sInMenu = 1; @@ -88,7 +86,6 @@ void zMenuInit(uint32 theSceneID) zMusicInit(); } - void zMenuExit() { zMusicKill(); @@ -98,7 +95,6 @@ void zMenuExit() sInMenu = 0; } - void zMenuSetup() { globals.player.MaxHealth = 3; @@ -117,7 +113,6 @@ void zMenuSetup() zEntEvent(&globals.player.ent, 8); } - #ifdef NON_MATCHING // Floating point code uses different register allocation / order, but I think // that the function has the correct behavior. @@ -316,19 +311,16 @@ void zMenuLoop() } #endif - uint32 zMenuIsPaused() { return 0; } - uint32 zMenuLoopContinue() { return gGameMode != eGameMode_Game; } - uint32 zMenuUpdateMode() { uint32 retVal = 0; @@ -358,7 +350,6 @@ uint32 zMenuUpdateMode() return retVal; } - uint32 zMenuGetCorruptFiles(int8 name[][64]) { for (int i = 0; i < corruptFileCount; ++i) @@ -368,7 +359,6 @@ uint32 zMenuGetCorruptFiles(int8 name[][64]) return corruptFileCount; } - bool zMenuCardCheckStartup(int32* bytesNeeded, int32* availOnDisk, int32* neededFiles) { st_XSAVEGAME_DATA* ldinst = xSGInit(XSG_MODE_SAVE); @@ -508,13 +498,11 @@ bool zMenuCardCheckStartup(int32* bytesNeeded, int32* availOnDisk, int32* needed return !rc; } - int32 zMenuGetBadCard() { return card + 1; } - #ifdef NON_MATCHING // Floating point assignments are out of order. void zMenuFMVPlay(int8* filename, uint32 buttons, float32 time, bool skippable, bool lockController) @@ -529,13 +517,11 @@ void zMenuFMVPlay(int8* filename, uint32 buttons, float32 time, bool skippable, } #endif - int32 zMenuIsFirstBoot() { return sFirstBoot; } - void zMenuFirstBootSet(int32 value) { sFirstBoot = value; diff --git a/src/SB/Game/zMusic.cpp b/src/SB/Game/zMusic.cpp index cda0849e..507fa467 100644 --- a/src/SB/Game/zMusic.cpp +++ b/src/SB/Game/zMusic.cpp @@ -26,7 +26,6 @@ extern zGlobals globals; extern const char zMusic_strings[]; - #ifdef NON_MATCHING void volume_reset() { @@ -51,7 +50,6 @@ void zMusicRefreshVolume() } } - void zMusicInit() { sMusicPaused = 0; @@ -187,10 +185,6 @@ int32 getCurrLevelMusicEnum() } #endif - - - - #if 0 // Probably floating point memes idk void zMusicNotify(int32 situation) @@ -223,15 +217,6 @@ void zMusicNotify(int32 situation) } #endif - - - - - - - - - // Stop all tracks and set them to null. void zMusicKill() { diff --git a/src/SB/Game/zNPCFXCinematic.cpp b/src/SB/Game/zNPCFXCinematic.cpp index f6f64a75..f0d6094b 100644 --- a/src/SB/Game/zNPCFXCinematic.cpp +++ b/src/SB/Game/zNPCFXCinematic.cpp @@ -5,325 +5,10 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void zNPCFXShutdown() { } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Game/zNPCGlyph.cpp b/src/SB/Game/zNPCGlyph.cpp index 693cf02c..ab8257ca 100644 --- a/src/SB/Game/zNPCGlyph.cpp +++ b/src/SB/Game/zNPCGlyph.cpp @@ -7,7 +7,6 @@ extern char* g_strz_glyphmodel[10]; extern int32 g_cnt_activeGlyphs[10]; extern float32 lbl_803CF948; - void zNPCGlyph_Startup() { } @@ -16,41 +15,14 @@ void zNPCGlyph_Shutdown() { } - - - - - - - void zNPCGlyph_SceneReset() { } - void zNPCGlyph_ScenePostInit() { } - - - - - - - - - - - - - - - - - - - #ifdef NON_MATCHING // Usual float memes void NPCGlyph::Reset() diff --git a/src/SB/Game/zNPCGoalAmbient.cpp b/src/SB/Game/zNPCGoalAmbient.cpp index 5e6c945c..a414c25e 100644 --- a/src/SB/Game/zNPCGoalAmbient.cpp +++ b/src/SB/Game/zNPCGoalAmbient.cpp @@ -5,79 +5,6 @@ #include "zNPCGoalAmbient.h" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Game/zNPCGoalRobo.cpp b/src/SB/Game/zNPCGoalRobo.cpp index b8be0e08..173ce6a0 100644 --- a/src/SB/Game/zNPCGoalRobo.cpp +++ b/src/SB/Game/zNPCGoalRobo.cpp @@ -4,1138 +4,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Game/zNPCGoalStd.cpp b/src/SB/Game/zNPCGoalStd.cpp index d67fc42a..6a83064a 100644 --- a/src/SB/Game/zNPCGoalStd.cpp +++ b/src/SB/Game/zNPCGoalStd.cpp @@ -4,247 +4,8 @@ #include "xNPCBasic.h" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #if 0 - #else zNPCGoalCommon::zNPCGoalCommon(int32 goalID) : xGoal(goalID) { @@ -261,43 +22,26 @@ WEAK xGoal::xGoal(int32 goalID) } #endif - - - - - - - - - - - - - uint8 xNPCBasic::PhysicsFlags() const { return 0; } - uint8 xNPCBasic::ColPenByFlags() const { return 0; } - uint8 xNPCBasic::ColChkByFlags() const { return 0; } - uint8 xNPCBasic::ColPenFlags() const { return 0; } - uint8 xNPCBasic::ColChkFlags() const { return 0; diff --git a/src/SB/Game/zNPCGoalVillager.cpp b/src/SB/Game/zNPCGoalVillager.cpp index 511cd0f9..a3901afb 100644 --- a/src/SB/Game/zNPCGoalVillager.cpp +++ b/src/SB/Game/zNPCGoalVillager.cpp @@ -5,31 +5,6 @@ extern zGlobals globals; - - - - - - - - - - - - - - - - - - - - - - - - - void zNPCGoalPlayerNear::DoCheatPanHandle() { if (globals.player.Inv_Shiny > 75000) @@ -37,100 +12,3 @@ void zNPCGoalPlayerNear::DoCheatPanHandle() globals.player.Inv_Shiny -= 500; } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zNPCHazard.cpp b/src/SB/Game/zNPCHazard.cpp index 696fc02a..36d6f8f6 100644 --- a/src/SB/Game/zNPCHazard.cpp +++ b/src/SB/Game/zNPCHazard.cpp @@ -58,9 +58,6 @@ void zNPCHazard_ScenePrepare() #endif - - - void zNPCHazard_SceneReset() { for (int32 i = 0; i < 64; i++) @@ -78,9 +75,6 @@ void zNPCHazard_ScenePostInit() zNPCHazard_InitEffects(); } - - - void zNPCHazard_KillEffects() { } @@ -107,12 +101,6 @@ int32 HAZ_ord_sorttest(void* vkey, void* vitem) } } - - - - - - #if 0 // Close, kind of. NPCHazard* HAZ_Acquire() @@ -139,9 +127,6 @@ int32 HAZ_AvailablePool() return 64 - g_cnt_activehaz; } - - - void NPCHazard::WipeIt() { this->typ_hazard = NPC_HAZ_UNKNOWN; @@ -201,24 +186,6 @@ void NPCHazard::Reconfigure(en_npchaz haztype) } } - - - - - - - - - - - - - - - - - - void NPCHazard::PosSet(const xVec3* pos) { if (pos != NULL) @@ -231,15 +198,6 @@ void NPCHazard::PosSet(const xVec3* pos) } } - - - - - - - - - void NPCHazard::SetAlpha(float32 alpha) { if (this->mdl_hazard == NULL) @@ -250,12 +208,6 @@ void NPCHazard::SetAlpha(float32 alpha) this->mdl_hazard->Alpha = alpha; } - - - - - - int32 NPCHazard::ColPlyrSphere(float32 rad) { return this->ColTestSphere(&globals.player.ent.bound, rad); @@ -278,9 +230,6 @@ void NPCHazard::HurtThePlayer() } } - - - void NPCHazard::TypData_RotMatSet(xMat3x3* mat) { xMat3x3* frame = (xMat3x3*)xModelGetFrame(this->mdl_hazard); @@ -295,21 +244,6 @@ void NPCHazard::TypData_RotMatApply(xMat3x3* mat) xModelSetFrame(this->mdl_hazard, (xMat4x3*)frame); } - - - - - - - - - - - - - - - void NPCHazard::StagColStat() { this->StagColGeneral(1); @@ -330,165 +264,12 @@ void NPCHazard::CollideResponse(xSweptSphere* swdata, float32 tym_inFuture) this->ColResp_Default(swdata, tym_inFuture); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void UVAModelInfo::Hemorrage() { model = 0; uv = 0; } - - - - - - - - - #if 0 // Need to figure out what is wrong with the final return statement, and the b and blr swaps. int32 UVAModelInfo::GetUV(RwTexCoords*& coords, int32& numVertices, RpAtomic* model) @@ -511,12 +292,6 @@ int32 UVAModelInfo::GetUV(RwTexCoords*& coords, int32& numVertices, RpAtomic* mo #endif - - - - - - RwV3d* NPCHazard::At() { return &this->mdl_hazard->Mat->at; @@ -541,18 +316,6 @@ NPCHazard::NPCHazard(en_npchaz haztype) this->typ_hazard = haztype; } - - - - - - - - - - - - float32 xVec2Length2(const xVec2* v) { return xVec2Dot(v, v); diff --git a/src/SB/Game/zNPCMessenger.cpp b/src/SB/Game/zNPCMessenger.cpp index 386a1b9d..29080caf 100644 --- a/src/SB/Game/zNPCMessenger.cpp +++ b/src/SB/Game/zNPCMessenger.cpp @@ -1,82 +1,3 @@ #include "zNPCMessenger.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zNPCMgr.cpp b/src/SB/Game/zNPCMgr.cpp index 592e5be0..58318754 100644 --- a/src/SB/Game/zNPCMgr.cpp +++ b/src/SB/Game/zNPCMgr.cpp @@ -100,9 +100,6 @@ xEnt* zNPCMgr_createNPCInst(int32, xEntAsset* assdat) return zNPCMgrSelf()->CreateNPC(assdat); } - - - void zNPCMgr::Shutdown() { if (this->npcFactory != NULL) @@ -134,42 +131,6 @@ void zNPCMgr::ScenePrepare(int32 npccnt) #endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #if 0 // Yeah good luck getting it to spit out an li instead of doing a shift. int32 zNPCMgr_OrdComp_npcid(void* vkey, void* vitem) diff --git a/src/SB/Game/zNPCSndTable.cpp b/src/SB/Game/zNPCSndTable.cpp index f1442460..8df3d696 100644 --- a/src/SB/Game/zNPCSndTable.cpp +++ b/src/SB/Game/zNPCSndTable.cpp @@ -2,34 +2,6 @@ #include - - - void NPCS_Shutdown() { } - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zNPCSpawner.cpp b/src/SB/Game/zNPCSpawner.cpp index 4680125c..0184fe21 100644 --- a/src/SB/Game/zNPCSpawner.cpp +++ b/src/SB/Game/zNPCSpawner.cpp @@ -152,48 +152,6 @@ void zNPCSpawner::MapPreferred() #endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void zNPCSpawner::SetNPCStatus(zNPCCommon* npc, en_SM_NPC_STATUS status) { SMNPCStatus* stat = this->StatForNPC(npc); @@ -203,16 +161,6 @@ void zNPCSpawner::SetNPCStatus(zNPCCommon* npc, en_SM_NPC_STATUS status) } } - - - - - - - - - - SMNPCStatus* zNPCSpawner::ToastedBeastie(zNPCCommon* npc) { SMNPCStatus* ret = this->StatForNPC(npc); @@ -225,17 +173,6 @@ void zNPCSpawner::ChildHeartbeat(float32 dt) { } - - - - - - - - - - - uint8 zMovePoint::IsOn() { return this->on; diff --git a/src/SB/Game/zNPCSupplement.cpp b/src/SB/Game/zNPCSupplement.cpp index 42b3bbe1..0fcdc57a 100644 --- a/src/SB/Game/zNPCSupplement.cpp +++ b/src/SB/Game/zNPCSupplement.cpp @@ -32,7 +32,6 @@ extern float32 _1018_0_375; // 0.375 extern float32 _909_0_5; // 0.5 extern float32 _1562_0_625; // 0.625 - void NPCSupplement_Startup() { return; @@ -43,45 +42,32 @@ void NPCSupplement_Shutdown() NPCWidget_Shutdown(); } - void NPCSupplement_ScenePrepare() { NPAR_ScenePrepare(); } - void NPCSupplement_SceneFinish() { NPAR_SceneFinish(); } - void NPCSupplement_ScenePostInit() { NPAR_PartySetup(NPAR_TYP_VISSPLASH, 0, 0); } - void NPCSupplement_SceneReset(void) { NPAR_SceneReset(); NPCC_ShadowCacheReset(); } - void NPCSupplement_Timestep(float dt) { NPAR_Timestep(dt); } - - - - - - - - #if 0 uint32 NPCC_StreakCreate(en_npcstreak styp) { @@ -91,25 +77,6 @@ uint32 NPCC_StreakCreate(en_npcstreak styp) } #endif - - - - - - - - - - - - - - - - - - - void NPAR_ScenePrepare() { for (int i = 0; i < 12; i++) @@ -118,7 +85,6 @@ void NPAR_ScenePrepare() } } - void NPAR_SceneFinish() { for (int i = 0; i < 12; i++) @@ -130,7 +96,6 @@ void NPAR_SceneFinish() g_day = 0; } - void NPAR_SceneReset() { for (int i = 0; i < 12; i++) @@ -139,7 +104,6 @@ void NPAR_SceneReset() } } - void NPAR_CheckSpecials() { g_gameExtrasFlags = zGameExtras_ExtrasFlags(); @@ -147,7 +111,6 @@ void NPAR_CheckSpecials() g_isSpecialDay = g_gameExtrasFlags & 0b111110111; } - #if 0 // WIP void NPAR_Timestep(float32 dt) @@ -169,7 +132,6 @@ void NPAR_Timestep(float32 dt) } #endif - NPARMgmt* NPAR_PartySetup(en_nparptyp parType, void** userData, NPARXtraData* xtraData) { NPARMgmt* mgmt = &g_npar_mgmt[parType]; @@ -182,7 +144,6 @@ NPARMgmt* NPAR_PartySetup(en_nparptyp parType, void** userData, NPARXtraData* xt return mgmt; } - NPARMgmt* NPAR_FindParty(en_nparptyp parType) { NPARMgmt* mgmt = &g_npar_mgmt[parType]; @@ -195,10 +156,6 @@ NPARMgmt* NPAR_FindParty(en_nparptyp parType) return mgmt; } - - - - void NPARMgmt::Clear() { typ_npar = NPAR_TYP_UNKNOWN; @@ -211,20 +168,11 @@ void NPARMgmt::Clear() user_data = 0; } - void NPARMgmt::UpdateAndRender(float32 param_1) { g_npar_info[typ_npar].fun_update(this, param_1); } - - - - - - - - void NPAR_CopyNPARToPTPool(NPARData* param_1, ptank_pool__pos_color_size_uv2* param_2) { *param_2->pos = param_1->pos; @@ -240,14 +188,6 @@ void NPAR_CopyNPARToPTPool(NPARData* param_1, ptank_pool__pos_color_size_uv2* pa param_2->uv[1].y = param_1->uv_br[1]; } - - - - - - - - #ifdef NON_MATCHING // Matches, it just defines new data that won't match until that stuff can be redefined. // It also loads a bunch of byte stuff at the end for some reason @@ -424,224 +364,46 @@ void NPAR_TubeSpiralMagic(RwRGBA* color, int unused, float32 pam) } #endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - float32 ARCH3(float32 param_1) { return _907_1_0 - BOWL3(param_1); } - float32 BOWL3(float32 param_1) { return QUB((float32)_1022_2_0 * (float32)iabs(param_1 - _909_0_5)); } - float32 QUB(float32 param_1) { return param_1 * param_1 * param_1; } - float32 ARCH(float32 param_1) { return _907_1_0 - BOWL(param_1); } - - - - void NPARMgmt::Done() { Clear(); } - void NPARMgmt::Reset() { cnt_active = 0; } - int32 NPARMgmt::IsReady() { return num_max != 0 && par_buf != 0; } - void NPARMgmt::XtraDataSet(NPARXtraData* param_1) { xtra_data = param_1; } - void NPARMgmt::UserDataSet(void** param_1) { user_data = param_1; diff --git a/src/SB/Game/zNPCSupport.cpp b/src/SB/Game/zNPCSupport.cpp index 7c7c07f3..c084b30f 100644 --- a/src/SB/Game/zNPCSupport.cpp +++ b/src/SB/Game/zNPCSupport.cpp @@ -6,9 +6,6 @@ #include "zNPCGlyph.h" #include "zNPCSupplement.h" - - - void NPCSupport_Shutdown() { zNPCHazard_Shutdown(); @@ -17,24 +14,6 @@ void NPCSupport_Shutdown() NPCSupplement_Shutdown(); } - - - - - - - - - - - - - - - - - - void NPCWidget_Shutdown() { } diff --git a/src/SB/Game/zNPCTypeAmbient.cpp b/src/SB/Game/zNPCTypeAmbient.cpp index abcd63fa..b1723378 100644 --- a/src/SB/Game/zNPCTypeAmbient.cpp +++ b/src/SB/Game/zNPCTypeAmbient.cpp @@ -85,12 +85,6 @@ xAnimTable* ZNPC_AnimTable_Ambient() return table; } - - - - - - /* This should be 100% matching but it causes a vtable duplication error for some reason void zNPCAmbient::Init(xEntAsset* asset) { @@ -102,9 +96,6 @@ void zNPCAmbient::Init(xEntAsset* asset) } */ - - - void zNPCAmbient::Reset() { zNPCCommon::Reset(); @@ -137,13 +128,6 @@ void zNPCAmbient::SelfSetup() psy->SetSafety('NGN0'); } - - - - - - - /* This should be 100% matching but it causes a vtable duplication error for some reason void zNPCJelly::Init(xEntAsset* asset) { @@ -154,9 +138,6 @@ void zNPCJelly::Init(xEntAsset* asset) } */ - - - void zNPCJelly::ParseINI() { int32 selfType; @@ -237,46 +218,6 @@ void zNPCJelly::JellyKill() } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /* This should be 100% matching but it causes a vtable duplication error for some reason void zNPCNeptune::ParseINI() { @@ -287,9 +228,6 @@ void zNPCNeptune::ParseINI() } */ - - - #ifdef NON_MATCHING void zNPCNeptune::Reset() { @@ -298,16 +236,6 @@ void zNPCNeptune::Reset() } #endif - - - - - - - - - - /* This should be 100% matching but it causes a vtable duplication error for some reason void zNPCMimeFish::Reset() { @@ -316,27 +244,12 @@ void zNPCMimeFish::Reset() } */ - - - /* This should be 100% matching but it causes a vtable duplication error for some reason void zNPCMimeFish::Process(xScene* xscn, float32 dt) { } */ - - - - - - - - - - - - int32 zNPCAmbient::AmbiHandleMail(NPCMsg msg) { return 0; @@ -376,9 +289,6 @@ uint8 zNPCAmbient::PhysicsFlags() return 3; } - - - /* This should be 100% matching but it causes a vtable duplication error for some reason void zNPCNeptune::SelfSetup() { diff --git a/src/SB/Game/zNPCTypeBossPatrick.cpp b/src/SB/Game/zNPCTypeBossPatrick.cpp index 8abc2b86..2d87bef2 100644 --- a/src/SB/Game/zNPCTypeBossPatrick.cpp +++ b/src/SB/Game/zNPCTypeBossPatrick.cpp @@ -5,230 +5,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; @@ -239,7 +15,3 @@ void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) o->y = y; o->z = z; } - - - - diff --git a/src/SB/Game/zNPCTypeBossPlankton.cpp b/src/SB/Game/zNPCTypeBossPlankton.cpp index 95d9995c..ba9ed0af 100644 --- a/src/SB/Game/zNPCTypeBossPlankton.cpp +++ b/src/SB/Game/zNPCTypeBossPlankton.cpp @@ -1,640 +1,3 @@ #include "zNPCTypeBossPlankton.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zNPCTypeBossSB1.cpp b/src/SB/Game/zNPCTypeBossSB1.cpp index a5000db0..0381f8f1 100644 --- a/src/SB/Game/zNPCTypeBossSB1.cpp +++ b/src/SB/Game/zNPCTypeBossSB1.cpp @@ -6,10 +6,6 @@ extern zEnt* sSB1_armTgtHit; - - - - void SB1Dummy_UpdateFunc(xEnt* ent, xScene* param_2, float32 param_3) { if (ent->frame != NULL) @@ -22,20 +18,17 @@ void SB1Dummy_UpdateFunc(xEnt* ent, xScene* param_2, float32 param_3) } } - void SB1Dummy_BoundFunc(xEnt* ent, xVec3* param_2) { xBoundUpdate(&ent->bound); zGridUpdateEnt(ent); } - void SB1Dummy_RenderFunc(xEnt* ent) { xDrawSphere(&(ent->bound).sph, 0xc0006); } - int32 SB1Dummy_TgtEventFunc(xBase* to, xBase* from, uint32 toEvent, const float32* param_f, xBase* param_x) { @@ -45,98 +38,3 @@ int32 SB1Dummy_TgtEventFunc(xBase* to, xBase* from, uint32 toEvent, const float3 } return 1; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zNPCTypeBossSB2.cpp b/src/SB/Game/zNPCTypeBossSB2.cpp index 75e51bfd..255c7452 100644 --- a/src/SB/Game/zNPCTypeBossSB2.cpp +++ b/src/SB/Game/zNPCTypeBossSB2.cpp @@ -5,539 +5,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Game/zNPCTypeBossSandy.cpp b/src/SB/Game/zNPCTypeBossSandy.cpp index a4cc41a5..de8723f3 100644 --- a/src/SB/Game/zNPCTypeBossSandy.cpp +++ b/src/SB/Game/zNPCTypeBossSandy.cpp @@ -129,9 +129,6 @@ void on_change_shockwave(const tweak_info& tweak) sSandyPtr->shockRadius = __831; } - - - uint32 HeadIsCarried(xAnimTransition*, xAnimSingle*, void*) { return globals.player.carry.grabbed == sSandyPtr->headBoulder; @@ -152,7 +149,6 @@ uint32 HeadNotShocked(xAnimTransition*, xAnimSingle*, void*) return !(sSandyPtr->bossFlags & 0x100); } - #if 0 #define str_SandyBossHead (bossSandyStrings + 0xff) #define str_Idle01 (bossSandyStrings + 0x10d) @@ -185,21 +181,6 @@ xAnimTable* ZNPC_AnimTable_BossSandyHead() } #endif - - - - - - - - - - - - - - - void zNPCBSandy::ParseINI() { zNPCCommon::ParseINI(); @@ -210,13 +191,6 @@ void zNPCBSandy::ParseINI() NPCS_SndTablePrepare(g_sndTrax_BossSandy); } - - - - - - - void zNPCBSandy_BossDamageEffect_Init() { for (int32 i = 0; i < 4; i++) @@ -225,40 +199,6 @@ void zNPCBSandy_BossDamageEffect_Init() } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void zNPCBSandy::hiddenByCutscene() { for (int32 i = 0; i < 3; i++) @@ -328,9 +268,6 @@ void zNPCBSandy::Damage(en_NPC_DAMAGE_TYPE damtype, xBase*, const xVec3*) } } - - - void zNPCBSandy_GameIsPaused(zScene*) { if (sSandyPtr) @@ -343,9 +280,6 @@ void zNPCBSandy_GameIsPaused(zScene*) } } - - - int32 idleCB(xGoal* rawgoal, void*, en_trantype* trantype, float32, void*) { zNPCGoalBossSandyIdle* idle = (zNPCGoalBossSandyIdle*)rawgoal; @@ -437,12 +371,6 @@ int32 tauntCB(xGoal* rawgoal, void*, en_trantype* trantype, float32 dt, void*) return nextgoal; } - - - - - - int32 noHeadCB(xGoal* rawgoal, void*, en_trantype* trantype, float32 dt, void*) { zNPCGoalBossSandyNoHead* noHead = (zNPCGoalBossSandyNoHead*)rawgoal; @@ -538,116 +466,6 @@ int32 leapCB(xGoal* rawgoal, void*, en_trantype* trantype, float32 dt, void*) return nextgoal; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xBinaryCamera::add_tweaks(char const*) { } diff --git a/src/SB/Game/zNPCTypeCommon.cpp b/src/SB/Game/zNPCTypeCommon.cpp index 931b79df..878a24dc 100644 --- a/src/SB/Game/zNPCTypeCommon.cpp +++ b/src/SB/Game/zNPCTypeCommon.cpp @@ -108,37 +108,11 @@ void zNPCCommon_Timestep(float32 dt) } } - - - - - - - - - - - - void zNPCCommon::Destroy() { SelfDestroy(); } - - - - - - - - - - - - - - void zNPCCommon::Process(xScene* xscn, float32 dt) { if ((flg_misc & 4) != 0) @@ -149,44 +123,6 @@ void zNPCCommon::Process(xScene* xscn, float32 dt) xNPCBasic::Process(xscn, dt); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void zNPCCommon::ParseProps() { for (int32 i = 0x3f; i < 0x42; i++) @@ -202,9 +138,6 @@ void zNPCCommon::ParseProps() } } - - - bool zNPCCommon::IsMountableType(en_ZBASETYPE type) { switch (type) @@ -228,9 +161,6 @@ void zNPCCommon::SelfDestroy() psy_instinct = NULL; } - - - int32 zNPCCommon::GetVertPos(en_mdlvert vid, xVec3* pos) { NPCConfig* cfg = cfg_npc; @@ -242,162 +172,17 @@ int32 zNPCCommon::GetVertPos(en_mdlvert vid, xVec3* pos) return 1; } - - - - - - - - - - - - - - - - - - void zNPCCommon::ConfigSceneDone() { g_ncfghead = 0; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void zNPCCommon_WonderReset() { g_isConversation = 0; g_flg_wonder = 0; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uint32 zNPCCommon::LassoInit() { lassdata = PRIV_GetLassoData(); @@ -414,75 +199,27 @@ uint32 zNPCCommon::LassoInit() return 0; } - - - - - - - - - - - - - zNPCLassoInfo* zNPCCommon::GimmeLassInfo() { return flg_vuln & 0x1000000 ? lassdata : NULL; } - - - - - - - - - - - - void zNPCCommon::AddDEVGoals() { } - - - - - - - - - - - - - - - - - - void zNPCCommon::DBG_AddTweakers() { } - void zNPCCommon::SelfSetup() { } - void zNPCCommon::DBG_RptDataSize() { } - - - xEntDrive* zNPCCommon::PRIV_GetDriverData() { return NULL; @@ -492,19 +229,16 @@ void zNPCCommon::ModelScaleSet(const xVec3* vec) ModelScaleSet(vec->x, vec->y, vec->z); } - xAnimTable* zNPCCommon::AnimGetTable() { return model->Anim->Table; } - zNPCLassoInfo* zNPCCommon::PRIV_GetLassoData() { return NULL; } - void zNPCCommon::DuploOwner(zNPCCommon* duper) { npc_duplodude = duper; @@ -531,7 +265,6 @@ float32 zNPCCommon::GenShadCacheRad() return lbl_803CE4C0; } - #if 0 #else @@ -566,34 +299,28 @@ xNPCBasic::xNPCBasic(int32 value) } #endif - void xNPCBasic::Setup() { } - void xNPCBasic::Move(xScene* xscn, float32 dt, xEntFrame* frm) { } - int32 xNPCBasic::SysEvent(xBase* from, xBase* to, uint32 toEvent, const float32* toParam, xBase* toParamWidget, int32* handled) { return 1; } - void xNPCBasic::DBG_PStatOn(en_npcperf stat) { } - void xNPCBasic::DBG_PStatCont(en_npcperf stat) { } - void xNPCBasic::PostInit() { } @@ -603,15 +330,6 @@ void xNPCBasic::Render() xEntRender(this); } - - - - - - - - - void xPsyche::ImmTranOn() { flg_psyche |= 1; @@ -632,25 +350,7 @@ int32 xPsyche::HasGoal(int32 goal) return FindGoal(goal) != NULL; } - - - - - - - - - uint32 xSndIsPlaying(uint32 assetID, uint32 parid) { return iSndIsPlaying(assetID, parid) & 0xff; } - - - - - - - - - diff --git a/src/SB/Game/zNPCTypeCommon.h b/src/SB/Game/zNPCTypeCommon.h index e0166d20..f6b9f58f 100644 --- a/src/SB/Game/zNPCTypeCommon.h +++ b/src/SB/Game/zNPCTypeCommon.h @@ -227,8 +227,8 @@ struct NPCConfig : xListItem xVec3 animFrameRange[9]; int32 cnt_esteem[5]; float32 rad_sound; - NPCSndTrax *snd_trax; - NPCSndTrax *snd_traxShare; + NPCSndTrax* snd_trax; + NPCSndTrax* snd_traxShare; int32 test_count; uint8 talk_filter[4]; uint8 talk_filter_size; @@ -341,42 +341,42 @@ enum en_NPC_MSG_DATA struct zNPCLassoInfo { en_LASSO_STATUS stage; - xEnt *lassoee; - xAnimState *holdGuideAnim; - xModelInstance *holdGuideModel; - xAnimState *grabGuideAnim; - xModelInstance *grabGuideModel; + xEnt* lassoee; + xAnimState* holdGuideAnim; + xModelInstance* holdGuideModel; + xAnimState* grabGuideAnim; + xModelInstance* grabGuideModel; }; struct zNPCCommon : xNPCBasic { - xEntAsset *entass; // 0x1BC - xEntNPCAsset *npcass; - zNPCSettings *npcsetass; + xEntAsset* entass; // 0x1BC + xEntNPCAsset* npcass; + zNPCSettings* npcsetass; int32 flg_vuln; int32 flg_move; int32 flg_misc; int32 flg_able; - NPCConfig *cfg_npc; + NPCConfig* cfg_npc; zNPCSettings npcset; - zMovePoint *nav_past; - zMovePoint *nav_curr; - zMovePoint *nav_dest; - zMovePoint *nav_lead; - xSpline3 *spl_mvptspline; + zMovePoint* nav_past; + zMovePoint* nav_curr; + zMovePoint* nav_dest; + zMovePoint* nav_lead; + xSpline3* spl_mvptspline; float32 len_mvptspline; float32 dst_curspline; - xEntDrive *drv_data; - xPsyche *psy_instinct; - zNPCCommon *npc_duplodude; + xEntDrive* drv_data; + xPsyche* psy_instinct; + zNPCCommon* npc_duplodude; float32 spd_throttle; int32 flg_xtrarend; float32 tmr_fidget; float32 tmr_invuln; - zShrapnelAsset *explosion; - xModelAssetParam *parmdata; + zShrapnelAsset* explosion; + xModelAssetParam* parmdata; uint32 pdatsize; - zNPCLassoInfo *lassdata; + zNPCLassoInfo* lassdata; NPCSndQueue snd_queue[4]; zNPCCommon(int32 myType); @@ -384,54 +384,54 @@ struct zNPCCommon : xNPCBasic void VelStop(); static void ConfigSceneDone(); uint32 LassoInit(); - zNPCLassoInfo *GimmeLassInfo(); + zNPCLassoInfo* GimmeLassInfo(); void AddDEVGoals(); void DBG_AddTweakers(); void DBG_RptDataSize(); - xAnimTable *AnimGetTable(); - float32 AnimTimeRemain(xAnimState *ast); + xAnimTable* AnimGetTable(); + float32 AnimTimeRemain(xAnimState* ast); bool IsMountableType(en_ZBASETYPE type); - void MvptReset(zMovePoint *nav_goto); + void MvptReset(zMovePoint* nav_goto); void ModelScaleSet(float32 x, float32 y, float32 z); - void ModelScaleSet(const xVec3 *vec); + void ModelScaleSet(const xVec3* vec); int32 AnimStart(uint32 animID, int32 forceRestart); uint32 AnimCurStateID(); void GiveReward(); int32 SndPlayRandom(en_NPC_SOUND sndtype); int32 SndChanIsBusy(int32 flg_chan); int32 LassoUseGuides(int32 idx_grabmdl, int32 idx_holdmdl); - int32 GetVertPos(en_mdlvert vid, xVec3 *pos); + int32 GetVertPos(en_mdlvert vid, xVec3* pos); void Vibrate(en_npcvibe vibe, float32 duration); - void AddScripting(xPsyche *psy, - int32 (*eval_script)(xGoal *, void *, en_trantype *, float32, void *), - int32 (*eval_playanim)(xGoal *, void *, en_trantype *, float32, void *), - int32 (*eval_attack)(xGoal *, void *, en_trantype *, float32, void *), - int32 (*eval_move)(xGoal *, void *, en_trantype *, float32, void *), - int32 (*eval_follow)(xGoal *, void *, en_trantype *, float32, void *), - int32 (*eval_lead)(xGoal *, void *, en_trantype *, float32, void *), - int32 (*eval_wait)(xGoal *, void *, en_trantype *, float32, void *)); - void AddBaseline(xPsyche *, int (*)(xGoal *, void *, en_trantype *, float, void *), - int (*)(xGoal *, void *, en_trantype *, float, void *), - int (*)(xGoal *, void *, en_trantype *, float, void *), - int (*)(xGoal *, void *, en_trantype *, float, void *), - int (*)(xGoal *, void *, en_trantype *, float, void *)); + void AddScripting(xPsyche* psy, + int32 (*eval_script)(xGoal*, void*, en_trantype*, float32, void*), + int32 (*eval_playanim)(xGoal*, void*, en_trantype*, float32, void*), + int32 (*eval_attack)(xGoal*, void*, en_trantype*, float32, void*), + int32 (*eval_move)(xGoal*, void*, en_trantype*, float32, void*), + int32 (*eval_follow)(xGoal*, void*, en_trantype*, float32, void*), + int32 (*eval_lead)(xGoal*, void*, en_trantype*, float32, void*), + int32 (*eval_wait)(xGoal*, void*, en_trantype*, float32, void*)); + void AddBaseline(xPsyche*, int (*)(xGoal*, void*, en_trantype*, float, void*), + int (*)(xGoal*, void*, en_trantype*, float, void*), + int (*)(xGoal*, void*, en_trantype*, float, void*), + int (*)(xGoal*, void*, en_trantype*, float, void*), + int (*)(xGoal*, void*, en_trantype*, float, void*)); // vTable (xNPCBasic) - virtual void Init(xEntAsset *asset); + virtual void Init(xEntAsset* asset); virtual void Reset(); virtual void Setup(); - virtual void Process(xScene *xscn, float32 dt); - virtual void BUpdate(xVec3 *pos); - virtual void NewTime(xScene *xscn, float32 dt); - virtual void Move(xScene *xscn, float32 dt, xEntFrame *); - virtual int32 SysEvent(xBase *from, xBase *to, uint32 toEvent, const float32 *toParam, - xBase *toParamWidget, int32 *handled); + virtual void Process(xScene* xscn, float32 dt); + virtual void BUpdate(xVec3* pos); + virtual void NewTime(xScene* xscn, float32 dt); + virtual void Move(xScene* xscn, float32 dt, xEntFrame*); + virtual int32 SysEvent(xBase* from, xBase* to, uint32 toEvent, const float32* toParam, + xBase* toParamWidget, int32* handled); virtual void CollideReview(); virtual void Destroy(); // vTable (zNPCCommon) - virtual int32 NPCMessage(NPCMsg *mail); + virtual int32 NPCMessage(NPCMsg* mail); virtual void RenderExtra(); virtual void RenderExtraPostParticles(); virtual void ParseINI(); @@ -441,10 +441,10 @@ struct zNPCCommon : xNPCBasic virtual void SelfDestroy(); virtual int32 IsHealthy(); virtual int32 IsAlive(); - virtual void Damage(en_NPC_DAMAGE_TYPE damtype, xBase *who, const xVec3 *vec_hit); - virtual int32 Respawn(const xVec3 *pos, zMovePoint *mvptFirst, zMovePoint *mvptSpawnRef); - virtual void DuploOwner(zNPCCommon *duper); - virtual void DuploNotice(en_SM_NOTICES, void *); + virtual void Damage(en_NPC_DAMAGE_TYPE damtype, xBase* who, const xVec3* vec_hit); + virtual int32 Respawn(const xVec3* pos, zMovePoint* mvptFirst, zMovePoint* mvptSpawnRef); + virtual void DuploOwner(zNPCCommon* duper); + virtual void DuploNotice(en_SM_NOTICES, void*); virtual int32 CanRope(); virtual void LassoNotify(en_LASSO_EVENT event); virtual int32 SetCarryState(en_NPC_CARRY_STATE); @@ -454,16 +454,16 @@ struct zNPCCommon : xNPCBasic virtual void SpeakStart(uint32 sound, uint32 param_2, int32 param_3); virtual void SpeakStop(); - virtual uint32 AnimPick(int32 animID, en_NPC_GOAL_SPOT gspot, xGoal *goal) + virtual uint32 AnimPick(int32 animID, en_NPC_GOAL_SPOT gspot, xGoal* goal) { return 0; } - virtual void GetParm(en_npcparm pid, void *val); - virtual void GetParmDefault(en_npcparm pid, void *val); + virtual void GetParm(en_npcparm pid, void* val); + virtual void GetParmDefault(en_npcparm pid, void* val); virtual float32 GenShadCacheRad(); - virtual xEntDrive *PRIV_GetDriverData(); - virtual zNPCLassoInfo *PRIV_GetLassoData(); + virtual xEntDrive* PRIV_GetDriverData(); + virtual zNPCLassoInfo* PRIV_GetLassoData(); virtual int32 LassoSetup(); protected: @@ -475,11 +475,11 @@ struct NPCSysEvent { int32 doLinkEvents; int32 handled; - xBase *from; - xBase *to; + xBase* from; + xBase* to; uint32 toEvent; float32 toParam[4]; - xBase *toParamWidget; + xBase* toParamWidget; }; struct NPCBlastInfo @@ -498,21 +498,21 @@ struct NPCChatInfo struct NPCSpawnInfo { xVec3 pos_spawn; - zMovePoint *nav_firstMovepoint; - zMovePoint *nav_spawnReference; + zMovePoint* nav_firstMovepoint; + zMovePoint* nav_spawnReference; int32 spawnSuccess; }; struct NPCTargetInfo { - xBase *bas_tgt; + xBase* bas_tgt; xVec3 pos_tgt; }; struct NPCDamageInfo { en_NPC_DAMAGE_TYPE dmg_type; - xBase *dmg_from; + xBase* dmg_from; xVec3 vec_dmghit; }; @@ -530,13 +530,13 @@ struct NPCScriptInfo struct NPCMountInfo { - xEnt *ent_toMount; - xCollis *col_forMount; + xEnt* ent_toMount; + xCollis* col_forMount; }; struct NPCAreaInfo { - zNPCCommon *npc_origin; + zNPCCommon* npc_origin; xVec3 pos_origin; }; @@ -559,24 +559,24 @@ struct NPCMsg NPCMountInfo mountdata; NPCAreaInfo areadata; }; - void *attached; - NPCMsg *next; + void* attached; + NPCMsg* next; float32 tmr_delay; }; -xFactoryInst *ZNPC_Create_Common(int32 who, RyzMemGrow *grow, void *); -void ZNPC_Destroy_Common(xFactoryInst *inst); +xFactoryInst* ZNPC_Create_Common(int32 who, RyzMemGrow* grow, void*); +void ZNPC_Destroy_Common(xFactoryInst* inst); void zNPCCommon_ScenePrepare(); void zNPCCommon_SceneFinish(); void zNPCPlyrSnd_Reset(); void zNPCPlyrSnd_Update(float32 dt); void zNPCCommon_SceneReset(); -void ZNPC_Destroy_Common(xFactoryInst *inst); +void ZNPC_Destroy_Common(xFactoryInst* inst); void zNPCSettings_MakeDummy(); void ZNPC_Common_Startup(); void zNPCCommon_WonderReset(); void ZNPC_Common_Shutdown(); -void NPCC_BuildStandardAnimTran(xAnimTable *table, char **namelist, int32 *ourAnims, int32 idx_dflt, +void NPCC_BuildStandardAnimTran(xAnimTable* table, char** namelist, int32* ourAnims, int32 idx_dflt, float32 blend); void zNPCCommon_EjectPhlemOnPawz(); diff --git a/src/SB/Game/zNPCTypeDuplotron.cpp b/src/SB/Game/zNPCTypeDuplotron.cpp index a24f2d27..0c20ce67 100644 --- a/src/SB/Game/zNPCTypeDuplotron.cpp +++ b/src/SB/Game/zNPCTypeDuplotron.cpp @@ -16,7 +16,6 @@ extern xParEmitterCustomSettings g_parf_overheat; extern char* zNPCTypeDuplotron_strings[]; - void ZNPC_Duplotron_Startup() { for (int i = 0; i < 5; i++) @@ -25,23 +24,19 @@ void ZNPC_Duplotron_Startup() } } - void ZNPC_Duplotron_Shutdown() { } - void ZNPC_Duplotron_ScenePrepare() { } - void zNPCDuplotron_SceneFinish() { DUPO_KillEffects(); } - void zNPCDuplotron_ScenePostInit() { DUPO_InitEffects(); @@ -73,34 +68,6 @@ void ZNPC_Destroy_Duplotron(xFactoryInst* inst) delete inst; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - #if 0 // 100% match that needs the full vtable to be filled out // because it induces vtable generation @@ -117,23 +84,6 @@ void zNPCDuplotron::SelfSetup() } #endif - - - - - - - - - - - - - - - - - #if 0 // non-matching: scheduling? void DUPO_InitEffects() @@ -155,56 +105,38 @@ void DUPO_InitEffects() } #endif - void DUPO_KillEffects() { } - - - - - - - - - - -zNPCDuplotron::zNPCDuplotron(int32 myType) - : zNPCCommon(myType) +zNPCDuplotron::zNPCDuplotron(int32 myType) : zNPCCommon(myType) { } - void zNPCDuplotron::Move(xScene*, float32, xEntFrame*) { } - uint8 zNPCDuplotron::ColChkFlags() const { return 0; } - uint8 zNPCDuplotron::ColPenFlags() const { return 0; } - uint8 zNPCDuplotron::ColChkByFlags() const { return XENT_COLLTYPE_PLYR | XENT_COLLTYPE_NPC; } - uint8 zNPCDuplotron::ColPenByFlags() const { return XENT_COLLTYPE_PLYR | XENT_COLLTYPE_NPC; } - uint8 zNPCDuplotron::PhysicsFlags() const { return 0; diff --git a/src/SB/Game/zNPCTypeDutchman.cpp b/src/SB/Game/zNPCTypeDutchman.cpp index 19db0732..fdf3754a 100644 --- a/src/SB/Game/zNPCTypeDutchman.cpp +++ b/src/SB/Game/zNPCTypeDutchman.cpp @@ -4,814 +4,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; @@ -822,7 +14,3 @@ void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) o->y = y; o->z = z; } - - - - diff --git a/src/SB/Game/zNPCTypeKingJelly.cpp b/src/SB/Game/zNPCTypeKingJelly.cpp index c90c7b73..f5e0c698 100644 --- a/src/SB/Game/zNPCTypeKingJelly.cpp +++ b/src/SB/Game/zNPCTypeKingJelly.cpp @@ -1,443 +1,3 @@ #include "zNPCTypeKingJelly.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zNPCTypePrawn.cpp b/src/SB/Game/zNPCTypePrawn.cpp index 1c17cc4c..1f0b3f8f 100644 --- a/src/SB/Game/zNPCTypePrawn.cpp +++ b/src/SB/Game/zNPCTypePrawn.cpp @@ -1,461 +1,3 @@ #include "zNPCTypePrawn.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zNPCTypeRobot.cpp b/src/SB/Game/zNPCTypeRobot.cpp index cd700e4f..885348a4 100644 --- a/src/SB/Game/zNPCTypeRobot.cpp +++ b/src/SB/Game/zNPCTypeRobot.cpp @@ -25,9 +25,6 @@ void zNPCSleepy_Timestep(float32 dt); void zNPCFodBzzt_DoTheHokeyPokey(float32 dt); void ZNPC_Destroy_Robot(xFactoryInst* inst); - - - void PlayTheFiddle() { } @@ -188,57 +185,6 @@ void ZNPC_Destroy_Robot(xFactoryInst* inst) delete inst; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uint8 zNPCRobot::ColChkFlags() const { int32 flags = 0x3E; @@ -353,9 +299,6 @@ void zNPCRobot::Reset() } } - - - void zNPCRobot::ParseINI() { zNPCCommon::ParseINI(); @@ -405,18 +348,6 @@ void zNPCRobot::SelfSetup() psy->SetSafety('NGN0'); } - - - - - - - - - - - - void zNPCRobot::DuploOwner(zNPCCommon* duper) { zNPCCommon::DuploOwner(duper); @@ -431,40 +362,6 @@ void zNPCRobot::DuploOwner(zNPCCommon* duper) } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int32 zNPCRobot::LassoSetup() { int32 param1 = -1; @@ -478,29 +375,11 @@ int32 zNPCRobot::LassoSetup() return zNPCCommon::LassoSetup(); } - - - int32 zNPCRobot::IsWounded() { return IsDead() ? 0 : cfg_npc->pts_damage - hitpoints; } - - - - - - - - - - - - - - - void zNPCRobot::InflictPain(int32 numHitPoints, int32 giveCreditToPlayer) { if (numHitPoints < 0) @@ -520,835 +399,64 @@ void zNPCRobot::InflictPain(int32 numHitPoints, int32 giveCreditToPlayer) } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void zNPCFodBzzt_ResetDanceParty() { cnt_alerthokey__11zNPCFodBzzt = 0; } +void ROBO_KillEffects() +{ +} +void UVAModelInfo::Clear() +{ + memset(this, 0, sizeof(UVAModelInfo)); +} +void UVAModelInfo::UVVelSet(float x, float y) +{ + offset_vel.x = x; + offset_vel.y = y; +} +zNPCLassoInfo* zNPCRobot::PRIV_GetLassoData() +{ + return &raw_lassoinfo; +} +int32 zNPCRobot::IsAlive() +{ + return !IsDead(); +} +void zNPCRobot::LassoModelIndex(int32* idxgrab, int32* idxhold) +{ + *idxgrab = 0xffffffff; + *idxhold = 0xffffffff; +} +void zNPCSlick::LassoModelIndex(int32* idxgrab, int32* idxhold) +{ + *idxgrab = 2; + *idxhold = 3; +} +int32 zNPCRobot::IsHealthy() +{ + return (hitpoints < 0) ? 0 : hitpoints; +} +xEntDrive* zNPCRobot::PRIV_GetDriverData() +{ + return &raw_drvdata; +} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void ROBO_KillEffects() -{ -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void UVAModelInfo::Clear() -{ - memset(this, 0, sizeof(UVAModelInfo)); -} - -void UVAModelInfo::UVVelSet(float x, float y) -{ - offset_vel.x = x; - offset_vel.y = y; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -zNPCLassoInfo* zNPCRobot::PRIV_GetLassoData() -{ - return &raw_lassoinfo; -} - - -int32 zNPCRobot::IsAlive() -{ - return !IsDead(); -} - - - - -void zNPCRobot::LassoModelIndex(int32* idxgrab, int32* idxhold) -{ - *idxgrab = 0xffffffff; - *idxhold = 0xffffffff; -} - -void zNPCSlick::LassoModelIndex(int32* idxgrab, int32* idxhold) -{ - *idxgrab = 2; - *idxhold = 3; -} - -int32 zNPCRobot::IsHealthy() -{ - return (hitpoints < 0) ? 0 : hitpoints; -} - - - - - - - -xEntDrive* zNPCRobot::PRIV_GetDriverData() -{ - return &raw_drvdata; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -int32 xEntIsEnabled(xEnt* ent) +int32 xEntIsEnabled(xEnt* ent) { return xBaseIsEnabled((xBase*)ent) & 0xff; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Game/zNPCTypeTiki.cpp b/src/SB/Game/zNPCTypeTiki.cpp index e1876911..bbd6864f 100644 --- a/src/SB/Game/zNPCTypeTiki.cpp +++ b/src/SB/Game/zNPCTypeTiki.cpp @@ -51,37 +51,6 @@ void zNPCTiki_InitFX(zScene* scene) } */ -void test(int32 a) -{ -} - -extern uint32 orphanList; - -void zNPCTiki_InitStacking(zScene* zsc) -{ - for (int32 i = 0; i < zsc->num_npcs; i++) - { - xNPCBasic* npc = (xNPCBasic*)zsc->npcs[i]; - - if ((npc->SelfType() & 0xffffff00) == 'NTT\0') - { - zNPCTiki* tiki = (zNPCTiki*)npc; - - if (npc->SelfType() != 'NTT1' && (tiki->FindParents(zsc), tiki->numParents == 0)) - { - float32 dh = tiki->landHt - tiki->bound.box.box.lower.y; - tiki->bound.box.box.lower.y += dh; - tiki->bound.box.box.upper.y += dh; - tiki->bound.box.center.y += dh; - tiki->model->Mat->pos.y += dh; - } - tiki->tikiFlag &= ~0x1; - } - } - - orphanList = 0; -} - xFactoryInst* ZNPC_Create_Tiki(int32 who, RyzMemGrow* grow, void*) { zNPCTiki* tiki = NULL; diff --git a/src/SB/Game/zNPCTypeVillager.cpp b/src/SB/Game/zNPCTypeVillager.cpp index 822d0dca..6fd137cc 100644 --- a/src/SB/Game/zNPCTypeVillager.cpp +++ b/src/SB/Game/zNPCTypeVillager.cpp @@ -141,251 +141,16 @@ xAnimTable* ZNPC_AnimTable_Villager() return ZNPC_AnimTable_Villager(NULL); } - - - xAnimTable* ZNPC_AnimTable_BalloonBoy() { return ZNPC_AnimTable_BalloonBoy(NULL); } - - - xAnimTable* ZNPC_AnimTable_SuperFriend() { return ZNPC_AnimTable_SuperFriend(NULL); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /* void FOLK_InitEffects() { @@ -400,103 +165,6 @@ void FOLK_KillEffects() { } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Game/zParCmd.cpp b/src/SB/Game/zParCmd.cpp index 945610f5..ad513f5f 100644 --- a/src/SB/Game/zParCmd.cpp +++ b/src/SB/Game/zParCmd.cpp @@ -13,7 +13,6 @@ extern int32 sClipVolumeTotal; extern char* zParCmd_strings; - void zParCmdInit() { xParCmdInit(); @@ -27,7 +26,6 @@ void zParCmdInit() xParCmdRegister(0x11, 0x10, xParCmdKillDistance_Update); } - #ifdef NON_MATCHING void zParCmdFindClipVolumes() @@ -48,13 +46,6 @@ void zParCmdFindClipVolumes() } #endif - - - - - - - void xParCmdPlayerCollision_Update(xParCmd* c, xParGroup* ps, float32 dt) { return; diff --git a/src/SB/Game/zParPTank.cpp b/src/SB/Game/zParPTank.cpp index d2a729c5..5d0eac46 100644 --- a/src/SB/Game/zParPTank.cpp +++ b/src/SB/Game/zParPTank.cpp @@ -1,84 +1,3 @@ #include "zParPTank.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zPendulum.cpp b/src/SB/Game/zPendulum.cpp index a3a2e96b..1cc206ad 100644 --- a/src/SB/Game/zPendulum.cpp +++ b/src/SB/Game/zPendulum.cpp @@ -46,12 +46,6 @@ void zPendulum_Setup(_zPendulum* pend, xScene* sc) zEntSetup((zEnt*)pend); } - - - - - - void zPendulum_Move(_zPendulum* pend, xScene* sc, float32 dt, xEntFrame* frame) { xEntMotionMove(&pend->motion, sc, dt, frame); diff --git a/src/SB/Game/zPlatform.cpp b/src/SB/Game/zPlatform.cpp index 666a16ef..2e733727 100644 --- a/src/SB/Game/zPlatform.cpp +++ b/src/SB/Game/zPlatform.cpp @@ -2,7 +2,6 @@ #include - void genericPlatRender(xEnt* ent) { if (!ent->model || !xEntIsVisible(ent)) @@ -13,25 +12,16 @@ void genericPlatRender(xEnt* ent) xModelRender(ent->model); } - void zPlatform_Init(void* plat, void* asset) { zPlatform_Init((zPlatform*)plat, (xEntAsset*)asset); } - - - - - - - void zPlatform_Save(zPlatform* ent, xSerial* s) { zEntSave(ent, s); } - void zPlatform_Load(zPlatform* ent, xSerial* s) { zEntLoad(ent, s); diff --git a/src/SB/Game/zRenderState.cpp b/src/SB/Game/zRenderState.cpp index 2aad79f3..739a6126 100644 --- a/src/SB/Game/zRenderState.cpp +++ b/src/SB/Game/zRenderState.cpp @@ -11,19 +11,16 @@ volatile _SDRenderState sRS; // For things to line up right this has to be present. int32 padding; - void zRenderStateInit() { sRS = SDRS_Unknown; } - _SDRenderState zRenderStateCurrent() { return sRS; } - void zRenderState(_SDRenderState newState) { if (newState == sRS) diff --git a/src/SB/Game/zSaveLoad.cpp b/src/SB/Game/zSaveLoad.cpp index 4ee2ab1a..ef5dfca2 100644 --- a/src/SB/Game/zSaveLoad.cpp +++ b/src/SB/Game/zSaveLoad.cpp @@ -115,7 +115,6 @@ extern float32 _849; extern float64 _850; extern float64 _852; - void zUpdateThumbIcon() { int32 i; @@ -247,7 +246,6 @@ int32 zSaveLoad_poll(int32 i) } #endif - void zSendEventToThumbIcon(uint32 toEvent) { const char* iconString = gGameMode == eGameMode_Load ? "MNU3 THUMBICON" : "MNU4 THUMBICON"; @@ -268,14 +266,12 @@ void zChangeThumbIcon(const int8* icon) } #endif - void zSaveLoadInit() { zSaveLoadUITableInit(zSaveLoadUITable); zSaveLoadGameTableInit(zSaveLoadGameTable); } - void zSaveLoadGameTableInit(zSaveLoadGame* saveTable) { for (int32 i = 0; i < 3; i++) @@ -288,7 +284,6 @@ void zSaveLoadGameTableInit(zSaveLoadGame* saveTable) } } - void zSaveLoadUITableInit(zSaveLoadUI* saveTable) { //Doesn't match the zSaveLoadUITable size for some reason @@ -298,13 +293,11 @@ void zSaveLoadUITableInit(zSaveLoadUI* saveTable) } } - void zSaveLoad_UIEvent(int32 i, uint32 toEvent) { zEntEvent(zSceneFindObject(zSaveLoadUITable[i].nameID), toEvent); } - st_XSAVEGAME_DATA* zSaveLoadSGInit(en_SAVEGAME_MODE mode) { if (mode == XSG_MODE_LOAD) @@ -327,7 +320,6 @@ st_XSAVEGAME_DATA* zSaveLoadSGInit(en_SAVEGAME_MODE mode) return xSGInit(mode); } - int32 zSaveLoadSGDone(st_XSAVEGAME_DATA* data) { if (data->mode == XSG_MODE_LOAD) @@ -341,43 +333,36 @@ int32 zSaveLoadSGDone(st_XSAVEGAME_DATA* data) return xSGDone(data); } - int32 zSaveLoad_getgame() { return currentGame; } - int32 zSaveLoad_getcard() { return currentCard; } - int32 zSaveLoad_getMCavailable() { return sAvailable; } - int32 zSaveLoad_getMCneeded() { return sNeeded; } - int32 zSaveLoad_getMCAccessType() { return sAccessType; } - int32 zSaveLoadGetAutoSaveCard() { return autoSaveCard; } - int32 format(int32 num, int32 mode) { st_XSAVEGAME_DATA* data = zSaveLoadSGInit(XSG_MODE_LOAD); @@ -440,7 +425,6 @@ int32 format(int32 num, int32 mode) return rc; } - int32 CardtoTgt(int32 card) { st_XSAVEGAME_DATA* ldinst = xSGInit(XSG_MODE_LOAD); @@ -462,13 +446,11 @@ int32 CardtoTgt(int32 card) return -1; } - int32 zSaveLoad_CardCount() { return 1; } - int32 zSaveLoad_CardPrompt(int32 cardNumber) { int32 i = 0x15; @@ -519,7 +501,6 @@ int32 zSaveLoad_CardPrompt(int32 cardNumber) return promptSel; } - int32 zSaveLoad_CardPromptFormat(int32 mode) { int32 i = 0x15; @@ -547,7 +528,6 @@ int32 zSaveLoad_CardPromptFormat(int32 mode) return promptSel; } - int32 zSaveLoad_CardPromptSpace(int32 mode) { int32 i = 0x15; @@ -569,7 +549,6 @@ int32 zSaveLoad_CardPromptSpace(int32 mode) return promptSel; } - int32 zSaveLoad_CardPromptGames(int32 mode) { int32 i = 0x15; @@ -591,7 +570,6 @@ int32 zSaveLoad_CardPromptGames(int32 mode) return promptSel; } - int32 zSaveLoad_CardPromptGameSlotEmpty() { zSaveLoad_UIEvent(0, eEventUIFocusOff_Unselect); @@ -606,7 +584,6 @@ int32 zSaveLoad_CardPromptGameSlotEmpty() return promptSel; } - int32 zSaveLoad_CardPromptOverwrite() { zSaveLoad_UIEvent(0x15, eEventUIFocusOff_Unselect); @@ -622,7 +599,6 @@ int32 zSaveLoad_CardPromptOverwrite() return promptSel; } - int32 zSaveLoad_CardPromptOverwriteDamaged() { zSaveLoad_UIEvent(0x15, eEventUIFocusOff_Unselect); @@ -638,7 +614,6 @@ int32 zSaveLoad_CardPromptOverwriteDamaged() return promptSel; } - int32 zSaveLoad_ErrorPrompt(int32 cardNumber) { int32 i = 0x2b; @@ -663,7 +638,6 @@ int32 zSaveLoad_ErrorPrompt(int32 cardNumber) return promptSel; } - int32 zSaveLoad_DamagedSaveGameErrorPrompt(int32 cardNumber) { zSaveLoad_UIEvent(0x3c, eEventUIFocusOn_Select); @@ -676,7 +650,6 @@ int32 zSaveLoad_DamagedSaveGameErrorPrompt(int32 cardNumber) return promptSel; } - int32 zSaveLoad_CardWrongDeviceErrorPrompt(int32 mode) { int i = 0x3a; @@ -701,7 +674,6 @@ int32 zSaveLoad_CardWrongDeviceErrorPrompt(int32 mode) return promptSel; } - int32 zSaveLoad_CardDamagedErrorPrompt(int32 mode) { int i = 0x38; @@ -726,7 +698,6 @@ int32 zSaveLoad_CardDamagedErrorPrompt(int32 mode) return promptSel; } - int32 zSaveLoad_SaveDamagedErrorPrompt(int32 cardNumber) { zSaveLoad_UIEvent(0x35, eEventUIFocusOn_Select); @@ -740,7 +711,6 @@ int32 zSaveLoad_SaveDamagedErrorPrompt(int32 cardNumber) return promptSel; } - int32 zSaveLoad_CardYankedErrorPrompt(int32 cardNumber) { zSaveLoad_UIEvent(0x36, eEventUIFocusOn_Select); @@ -754,7 +724,6 @@ int32 zSaveLoad_CardYankedErrorPrompt(int32 cardNumber) return promptSel; } - int32 zSaveLoad_ErrorFormatPrompt(int32 cardNumber) { int i = 0x2e; @@ -779,7 +748,6 @@ int32 zSaveLoad_ErrorFormatPrompt(int32 cardNumber) return 6; } - int32 zSaveLoad_ErrorFormatCardYankedPrompt(int32 cardNumber) { int i = 0x2f; @@ -804,7 +772,6 @@ int32 zSaveLoad_ErrorFormatCardYankedPrompt(int32 cardNumber) return 6; } - int32 zSaveLoad_CardCheckSingle(int32 cardNumber) { st_XSAVEGAME_DATA* ldinst = xSGInit(XSG_MODE_LOAD); @@ -848,7 +815,6 @@ int32 zSaveLoad_CardCheckSingle(int32 cardNumber) return -1; } - int32 zSaveLoad_CardCheckFormattedSingle(int32 cardNumber) { int32 rc; @@ -905,7 +871,6 @@ int32 zSaveLoad_CardCheckFormattedSingle(int32 cardNumber) return rc; } - int32 zSaveLoad_CardCheckSpaceSingle_doCheck(st_XSAVEGAME_DATA* xsgdata, int32 cardNumber) { int rc; @@ -934,7 +899,6 @@ int32 zSaveLoad_CardCheckSpaceSingle_doCheck(st_XSAVEGAME_DATA* xsgdata, int32 c return rc; } - int32 zSaveLoad_CardCheckSpaceSingle(int32 cardNumber) { st_XSAVEGAME_DATA* ldinst = xSGInit(XSG_MODE_SAVE); @@ -971,7 +935,6 @@ int32 zSaveLoad_CardCheckSpaceSingle(int32 cardNumber) return rc; } - int32 zSaveLoad_CardCheckGamesSingle_doCheck(st_XSAVEGAME_DATA* xsgdata, int32 cardNumber) { int rc; @@ -999,7 +962,6 @@ int32 zSaveLoad_CardCheckGamesSingle_doCheck(st_XSAVEGAME_DATA* xsgdata, int32 c return rc; } - int32 zSaveLoad_CardCheckGamesSingle(int32 cardNumber) { st_XSAVEGAME_DATA* ldinst = xSGInit(XSG_MODE_LOAD); @@ -1035,7 +997,6 @@ int32 zSaveLoad_CardCheckGamesSingle(int32 cardNumber) return rc; } - int32 zSaveLoad_CardCheckSlotEmpty_hasGame_doCheck(st_XSAVEGAME_DATA* xsgdata, int32 cardNumber, int32 gameNumber) { @@ -1061,7 +1022,6 @@ int32 zSaveLoad_CardCheckSlotEmpty_hasGame_doCheck(st_XSAVEGAME_DATA* xsgdata, i return rc; } - int32 zSaveLoad_CardCheckSlotEmpty_hasGame(int32 cardNumber, int32 gameNumber) { st_XSAVEGAME_DATA* ldinst = xSGInit(XSG_MODE_LOAD); @@ -1096,7 +1056,6 @@ int32 zSaveLoad_CardCheckSlotEmpty_hasGame(int32 cardNumber, int32 gameNumber) return rc; } - int32 zSaveLoad_CardCheckSlotOverwrite_Free(int32 cardNumber, int32 gameNumber) { int32 i = zSaveLoad_CardCheckSlotEmpty_hasGame(cardNumber, gameNumber); @@ -1116,7 +1075,6 @@ int32 zSaveLoad_CardCheckSlotOverwrite_Free(int32 cardNumber, int32 gameNumber) } } - int32 zSaveLoad_CardCheck(int32 cardNumber, int32 mode) { int32 cardResult = zSaveLoad_CardCheckSingle(cardNumber); @@ -1134,7 +1092,6 @@ int32 zSaveLoad_CardCheck(int32 cardNumber, int32 mode) return cardResult == 9 ? 9 : 1; } - int32 zSaveLoad_CardCheckFormatted(int32 cardNumber, int32 mode) { int32 result; @@ -1167,7 +1124,6 @@ int32 zSaveLoad_CardCheckFormatted(int32 cardNumber, int32 mode) return 1; } - int32 zSaveLoad_CardCheckValid(int32 cardNumber, int32 mode) { if (mode == 1) @@ -1180,7 +1136,6 @@ int32 zSaveLoad_CardCheckValid(int32 cardNumber, int32 mode) } } - int32 zSaveLoad_CardCheckSpace(int32 cardNumber, int32 mode) { int32 result = zSaveLoad_CardCheckSpaceSingle(cardNumber); @@ -1203,7 +1158,6 @@ int32 zSaveLoad_CardCheckSpace(int32 cardNumber, int32 mode) return 1; } - int32 zSaveLoad_CardCheckGames(int32 cardNumber, int32 mode) { int32 result = zSaveLoad_CardCheckGamesSingle(cardNumber); @@ -1226,7 +1180,6 @@ int32 zSaveLoad_CardCheckGames(int32 cardNumber, int32 mode) return 1; } - int32 zSaveLoad_CardCheckGameSlot(int32 cardNumber, int32 gameNumber, int32 mode) { if (mode == 1) @@ -1239,7 +1192,6 @@ int32 zSaveLoad_CardCheckGameSlot(int32 cardNumber, int32 gameNumber, int32 mode } } - int32 zSaveLoad_CardCheckSlotEmpty(int32 cardNumber, int32 gameNumber) { int32 i = zSaveLoad_CardCheckSlotEmpty_hasGame(cardNumber, gameNumber); @@ -1260,7 +1212,6 @@ int32 zSaveLoad_CardCheckSlotEmpty(int32 cardNumber, int32 gameNumber) return 1; } - #ifdef NON_MATCHING // Optimizing zSaveLoadGameTable lookup out of loop int32 zSaveLoad_CardCheckSlotOverwrite(int32 cardNumber, int32 gameNumber) @@ -1294,7 +1245,6 @@ int32 zSaveLoad_CardCheckSlotOverwrite(int32 cardNumber, int32 gameNumber) } #endif - int32 zSaveLoad_CardPick(int32 mode) { int32 done = 0; @@ -1429,7 +1379,6 @@ int32 zSaveLoad_CardPick(int32 mode) return done; } - bool IsValidName(int8* name) { if (strcmp((char*)name, "") == 0) @@ -1447,7 +1396,6 @@ bool IsValidName(int8* name) return 1; } - void BuildIt(int8* build_txt, int32 i) { int8 date1[32] = {}; @@ -1486,7 +1434,6 @@ void BuildIt(int8* build_txt, int32 i) } } - void zSaveLoad_BuildName(int8* name_txt, int32 idx) { int8 desired[128]; @@ -1519,7 +1466,6 @@ void zSaveLoad_BuildName(int8* name_txt, int32 idx) } } - #ifdef NON_MATCHING int32 zSaveLoad_GameSelect(int32 mode) { @@ -1717,13 +1663,11 @@ int32 zSaveLoad_GameSelect(int32 mode) } #endif - uint8 zSaveLoadGetPreAutoSave() { return preAutoSaving; } - void zSaveLoadPreAutoSave(bool onOff) { preAutoSaving = onOff; @@ -1737,7 +1681,6 @@ void zSaveLoadPreAutoSave(bool onOff) } } - void zSaveLoadAutoSaveUpdate() { xBase* obj; @@ -1797,7 +1740,6 @@ void zSaveLoadAutoSaveUpdate() } } - int32 zSaveLoad_DoAutoSave() { int32 success = 0; @@ -1912,7 +1854,6 @@ int32 zSaveLoad_DoAutoSave() } } - #ifdef NON_MATCHING // Reordering at beginning int32 zSaveLoad_SaveGame() @@ -2037,7 +1978,6 @@ int32 zSaveLoad_SaveGame() } #endif - #ifdef NON_MATCHING // Reordering, causing different register use at the end int32 zSaveLoad_LoadGame() @@ -2136,7 +2076,6 @@ int32 zSaveLoad_LoadGame() } #endif - uint32 zSaveLoad_LoadLoop() { zSaveLoadInit(); @@ -2222,7 +2161,6 @@ uint32 zSaveLoad_LoadLoop() (uint32)sceneRead[2] << 0x8 | (uint32)sceneRead[3]; } - #ifdef NON_MATCHING // Scheduling meme on the return uint32 zSaveLoad_SaveLoop() @@ -2400,7 +2338,6 @@ void zSaveLoad_DispatchCB(uint32 dispatchEvent, const float32* toParam) } #endif - int32 xSGT_SaveInfoCB(void* vp, st_XSAVEGAME_DATA* xsgdata, int32* need, int32* most) { *need = xSGWriteStrLen(currSceneStr); @@ -2408,7 +2345,6 @@ int32 xSGT_SaveInfoCB(void* vp, st_XSAVEGAME_DATA* xsgdata, int32* need, int32* return 1; } - int32 xSGT_SaveProcCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt) { if (globals.sceneCur->sceneID == 'PG12') @@ -2422,7 +2358,6 @@ int32 xSGT_SaveProcCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECO return xSGWriteData(xsgdata, wctxt, currSceneStr, 1, strlen(currSceneStr)) + 1; } - int32 xSGT_SaveInfoPrefsCB(void* p1, st_XSAVEGAME_DATA* data, int32* i, int32* j) { *i = 16; @@ -2430,7 +2365,6 @@ int32 xSGT_SaveInfoPrefsCB(void* p1, st_XSAVEGAME_DATA* data, int32* i, int32* j return 1; } - int32 xSGT_SaveProcPrefsCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt) { int sum = 0; @@ -2441,7 +2375,6 @@ int32 xSGT_SaveProcPrefsCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WR return sum + 1; } - int32 xSGT_LoadLoadCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, uint32 ui, int32 i) { @@ -2463,7 +2396,6 @@ int32 xSGT_LoadLoadCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCON return compdiff == 0; } - int32 xSGT_LoadPrefsCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCONTEXT* rctxt, uint32 ui, int32 i) { @@ -2484,7 +2416,6 @@ int32 xSGT_LoadPrefsCB(void* vp, st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_READCO return 1; } - uint32 zSaveLoad_slotIsEmpty(uint32 slot) { // TODO: Fix this hardcoded offset once string generation is correct @@ -2492,19 +2423,16 @@ uint32 zSaveLoad_slotIsEmpty(uint32 slot) return strcmp(label, "ld gameslot group" + 0x49c) == 0 ? 1 : 0; } - int32 XSGAutoData::LastPhysicalSlot() { return this->lastPhysicalSlot; } - int32 XSGAutoData::LastGame() { return this->lastGame; } - int32 XSGAutoData::LastTarget() { return this->lastTarg; diff --git a/src/SB/Game/zScene.cpp b/src/SB/Game/zScene.cpp index e85da22f..a8816bd3 100644 --- a/src/SB/Game/zScene.cpp +++ b/src/SB/Game/zScene.cpp @@ -3613,12 +3613,10 @@ void xModelBucket_RenderAlpha() xModelBucket_RenderAlphaEnd(); } - void xNPCBasic::Save(xSerial*) const { } - void xNPCBasic::Load(xSerial*) { } diff --git a/src/SB/Game/zScript.cpp b/src/SB/Game/zScript.cpp index 750cb852..06bcf6e2 100644 --- a/src/SB/Game/zScript.cpp +++ b/src/SB/Game/zScript.cpp @@ -15,7 +15,6 @@ void zScriptInit(void* data, void* asset) zScriptInit((xBase*)data, (xScriptAsset*)asset); } - void zScriptInit(xBase* b, xScriptAsset* tasset) { _zScript* script = (_zScript*)b; @@ -53,7 +52,6 @@ void zScriptLoad(_zScript* script, xSerial* s) xBaseLoad((xBase*)script, s); } - int32 zScriptEventCB(xBase* to, xBase* from, uint32 event, const float32*, xBase*) { _zScript* fromScript = (_zScript*)from; @@ -89,7 +87,6 @@ int32 zScriptEventCB(xBase* to, xBase* from, uint32 event, const float32*, xBase return eEventEnable; } - void zScriptExecuteEvents(_zScript* script, float32 start, float32 end) { script->more = 0; @@ -116,7 +113,6 @@ void zScriptExecuteEvents(_zScript* script, float32 start, float32 end) } } - void zScriptUpdate(xBase* obj, xScene* scene, float32 dt) { _zScript* script = (_zScript*)obj; diff --git a/src/SB/Game/zShrapnel.cpp b/src/SB/Game/zShrapnel.cpp index a41d5f99..b626af32 100644 --- a/src/SB/Game/zShrapnel.cpp +++ b/src/SB/Game/zShrapnel.cpp @@ -2,133 +2,6 @@ #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { float32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; diff --git a/src/SB/Game/zSurface.cpp b/src/SB/Game/zSurface.cpp index 4ab7e6d1..ea99264d 100644 --- a/src/SB/Game/zSurface.cpp +++ b/src/SB/Game/zSurface.cpp @@ -23,13 +23,6 @@ extern float32 lbl_803CDED8; // 1.0 // @701 extern const char* zSurface_strings[]; - - - - - - - // TODO: Hacked to OK (with volatile sMapperCount and assignment in if), fix later void zSurfaceRegisterMapper(uint32 assetId) { @@ -47,21 +40,18 @@ void zSurfaceRegisterMapper(uint32 assetId) } } - void zSurfaceExit() { xSurfaceExit(); sMapperCount = 0; } - void zSurfaceResetSurface(xSurface* surf) { xSurfaceReset(); surf->friction = ((zSurfaceProps*)(surf->moprops))->asset->friction; } - #if 0 xSurface* zSurfaceGetSurface(uint32 mat_id) { @@ -97,7 +87,6 @@ xSurface* zSurfaceGetSurface(uint32 mat_id) } #endif - xSurface* zSurfaceGetSurface(const xCollis* coll) { xSurface* surf = NULL; @@ -121,7 +110,6 @@ xSurface* zSurfaceGetSurface(const xCollis* coll) return surf; } - uint32 zSurfaceGetSlide(const xSurface* surf) { if (surf->moprops) @@ -131,7 +119,6 @@ uint32 zSurfaceGetSlide(const xSurface* surf) return 0; } - uint32 zSurfaceGetStep(const xSurface* surf) { if (surf->moprops) @@ -141,7 +128,6 @@ uint32 zSurfaceGetStep(const xSurface* surf) return 0; } - uint8 zSurfaceOutOfBounds(const xSurface& s) { if (s.moprops) @@ -151,7 +137,6 @@ uint8 zSurfaceOutOfBounds(const xSurface& s) return 0; } - #if 0 // Float issues float32 zSurfaceGetSlideStartAngle(const xSurface* surf) @@ -165,10 +150,6 @@ float32 zSurfaceGetSlideStartAngle(const xSurface* surf) } #endif - - - - uint32 zSurfaceGetMatchOrient(const xSurface* surf) { if (surf->moprops) @@ -178,7 +159,6 @@ uint32 zSurfaceGetMatchOrient(const xSurface* surf) return 0; } - int32 zSurfaceGetDamageType(const xSurface* surf) { if (surf->moprops) @@ -188,7 +168,6 @@ int32 zSurfaceGetDamageType(const xSurface* surf) return 0; } - uint32 zSurfaceGetDamagePassthrough(const xSurface* surf) { if (surf->moprops) @@ -198,7 +177,6 @@ uint32 zSurfaceGetDamagePassthrough(const xSurface* surf) return 0; } - uint32 zSurfaceGetSticky(const xSurface* surf) { if (surf->moprops) @@ -208,7 +186,6 @@ uint32 zSurfaceGetSticky(const xSurface* surf) return 0; } - uint32 zSurfaceGetStandOn(const xSurface* surf) { if (surf->moprops) @@ -218,13 +195,11 @@ uint32 zSurfaceGetStandOn(const xSurface* surf) return 1; } - float32 zSurfaceGetFriction(const xSurface* surf) { return surf->friction; } - float32 zSurfaceGetOutOfBoundsDelay(xSurface& s) { if (s.moprops) @@ -234,31 +209,26 @@ float32 zSurfaceGetOutOfBoundsDelay(xSurface& s) return lbl_803CDEDC; } - int32 zSurfaceGetSlickness(const xSurface* surf) { return (int)(lbl_803CDED8 / surf->friction); } - float32 zSurfaceGetDamping(const xSurface* surf, float32 min_vel) { return xpow(min_vel, surf->friction); } - void zSurfaceSave(xSurface* ent, xSerial* s) { xSurfaceSave(ent, s); } - void zSurfaceLoad(xSurface* ent, xSerial* s) { xSurfaceLoad(ent, s); } - void zSurfaceSetup(xSurface* s) { zSurfaceProps* pp = (zSurfaceProps*)s->moprops; @@ -279,13 +249,6 @@ void zSurfaceSetup(xSurface* s) } } - - - - - - - void zSurfaceGetName(int32 type, int8* buffer) { *buffer = NULL; @@ -362,7 +325,6 @@ void zSurfaceGetName(int32 type, int8* buffer) } } - xSurface& zSurfaceGetDefault() { return sDef_surf; diff --git a/src/SB/Game/zTalkBox.cpp b/src/SB/Game/zTalkBox.cpp index 6aa4171b..f39f0024 100644 --- a/src/SB/Game/zTalkBox.cpp +++ b/src/SB/Game/zTalkBox.cpp @@ -1,464 +1,3 @@ #include "zTalkBox.h" #include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SB/Game/zTaskBox.cpp b/src/SB/Game/zTaskBox.cpp index 66c1b55d..c528817d 100644 --- a/src/SB/Game/zTaskBox.cpp +++ b/src/SB/Game/zTaskBox.cpp @@ -227,9 +227,6 @@ bool ztaskbox::exists(state_enum stage) return state != STATE_BEGIN && xSTFindAsset(state, NULL); } - - - #if 0 void ztaskbox::on_talk_start() { @@ -241,15 +238,6 @@ void ztaskbox::on_talk_start() #endif - - - - - - - - - #if 0 // This one just doesn't feel like working. void ztaskbox::talk_callback::on_start() diff --git a/src/SB/Game/zTaxi.cpp b/src/SB/Game/zTaxi.cpp index 8a015b79..14388798 100644 --- a/src/SB/Game/zTaxi.cpp +++ b/src/SB/Game/zTaxi.cpp @@ -15,12 +15,6 @@ void zTaxi_Init(xBase& data, xDynAsset& asset, ulong32) zTaxi_Init((zTaxi*)&data, (taxi_asset*)&asset); } - - - - - - void zTaxi_Setup(zTaxi* taxi) { // Load assets. @@ -36,9 +30,6 @@ void zTaxi_Setup(zTaxi* taxi) taxi->baseFlags |= (uint16)2; } - - - void zTaxi_tb_answer(ztalkbox::answer_enum answer) { sAnswer = answer; diff --git a/src/SB/Game/zThrown.cpp b/src/SB/Game/zThrown.cpp index 0aa2e1bd..66586df5 100644 --- a/src/SB/Game/zThrown.cpp +++ b/src/SB/Game/zThrown.cpp @@ -16,9 +16,6 @@ extern uint32 sThrowButtonMask; extern float32 _842; // 0.5f extern float32 _844; // 0.0f - - - void zThrown_AddTempFrame(zThrownStruct* thrown) { xEnt* ent = thrown->ent; @@ -30,12 +27,6 @@ void zThrown_AddTempFrame(zThrownStruct* thrown) } } - - - - - - void Recurse_TranslateStack(xEnt* ent, xVec3* delta) { sDebugDepth++; @@ -52,27 +43,6 @@ void Recurse_TranslateStack(xEnt* ent, xVec3* delta) sDebugDepth--; } - - - - - - - - - - - - - - - - - - - - - #if 0 // WIP. void zThrown_PatrickLauncher(xEnt* ent, xEnt* launcher) @@ -88,23 +58,6 @@ void zThrown_PatrickLauncher(xEnt* ent, xEnt* launcher) #endif - - - - - - - - - - - - - - - - - void zThrownCollide_ThrowFreeze(zThrownStruct* thrown, xEntCollis* collis, float* bounce, float* friction) { @@ -142,10 +95,6 @@ void zThrownCollide_Tiki(zThrownStruct* thrown, xEntCollis* collis, float32* bou zEntEvent(thrown->ent, eEventDestroy); } - - - - #if 0 // WIP. int32 zThrown_IsFruit(xEnt* ent, float32* stackHeight) @@ -169,9 +118,6 @@ int32 zThrown_IsFruit(xEnt* ent, float32* stackHeight) #endif - - - #if 0 // Random OR added in. void checkAgainstButtons(xEnt* ent) @@ -189,19 +135,10 @@ void checkAgainstButtons(xEnt* ent) #endif - - - void xDrawSphere(xSphere* s, uint32 unk) { } - - - - - - #if 0 // Idk what is wrong with this one. xEntDrive& xEntDrive::operator=(const xEntDrive& other) diff --git a/src/SB/Game/zUI.cpp b/src/SB/Game/zUI.cpp index 57e7af8a..dbd0830d 100644 --- a/src/SB/Game/zUI.cpp +++ b/src/SB/Game/zUI.cpp @@ -1042,9 +1042,6 @@ void zUIRenderAll() } #endif - - - int32 zUIEventCB(xBase*, xBase* to, uint32 toEvent, const float32* toParam, xBase*) { _zUI* s = (_zUI*)to; diff --git a/src/SB/Game/zVar.cpp b/src/SB/Game/zVar.cpp index 53c6cef7..49b97d0f 100644 --- a/src/SB/Game/zVar.cpp +++ b/src/SB/Game/zVar.cpp @@ -81,7 +81,6 @@ int8* var_text(const substr& str); uint32 zVarEntryCB_SndFXVol(void*); uint32 zVarEntryCB_SndMusicVol(void*); - extern const int8 zVar_strings[]; // Buffers for var_text callbacks. These should all be changed to: @@ -134,7 +133,6 @@ namespace return zVar_printf_buffer1; } - int8* var_text_BadCard() { int32 badCardCount = zMenuGetBadCard(); @@ -149,14 +147,12 @@ namespace return zVar_printf_buffer2; } - int8* var_text_BadCardAvailable() { sprintf(zVar_printf_buffer3, &zVar_strings[0] /*"%d"*/, bad_card_available); return zVar_printf_buffer3; } - // var_text_BadCardNeeded__18_esc__2_unnamed_esc__2_zVar_cpp_esc__2_Fv int8* var_text_BadCardNeeded() { @@ -164,7 +160,6 @@ namespace return zVar_printf_buffer4; } - #ifdef NON_MATCHING // Indexing into zVar_strings didn't get pulled out of the loop in the original // code for some reason. @@ -182,20 +177,17 @@ namespace } #endif - const char* var_text_CurrentArea() { return zSceneGetAreaname(globals.sceneCur->sceneID); } - int8* var_text_CurrentData() { iGetCurrFormattedDate(zVar_printf_buffer6); return zVar_printf_buffer6; } - int8* var_text_CurrentLevelCollectable() { sprintf(zVar_printf_buffer7, zVar_strings /*"%d"*/, @@ -203,7 +195,6 @@ namespace return zVar_printf_buffer7; } - int8* var_text_CurrentLevelPatsSocks() { sprintf(zVar_printf_buffer8, zVar_strings /*"%d"*/, @@ -211,7 +202,6 @@ namespace return zVar_printf_buffer8; } - int8* var_text_CurrentScene() { sprintf(zVar_printf_buffer9, &zVar_strings[0x10] /*"%s"*/, @@ -219,7 +209,6 @@ namespace return zVar_printf_buffer9; } - int8* var_text_CurrentTime() { iGetCurrFormattedTime(zVar_printf_buffer10); @@ -228,7 +217,6 @@ namespace } // namespace - // Note: zVarGameSlotInfo should be in the anonymous namespace, need the // anomymous namespace symbol formatting fix from Seil to move it in though. #if 1 @@ -236,7 +224,6 @@ namespace // header file. int8* zVarGameSlotInfo(int32 i, int8* buffer, ulong32 something); - #else // I don't understand this function. The behavior perfectly matches... but // it never ends up doing anything with the buffer it makes up?? It just returns @@ -304,55 +291,47 @@ int8* zVarGameSlotInfo(int32 i, int8* buffer, ulong32 something) namespace { - + int8* var_text_GameSlot0() { return zVarGameSlotInfo(0, zVar_buffer11, 0x3f); } - int8* var_text_GameSlot1() { return zVarGameSlotInfo(1, zVar_buffer12, 0x3f); } - int8* var_text_GameSlot2() { return zVarGameSlotInfo(2, zVar_buffer13, 0x3f); } - int8* var_text_GameSlot3() { return zVarGameSlotInfo(3, zVar_buffer14, 0x3f); } - int8* var_text_GameSlot4() { return zVarGameSlotInfo(4, zVar_buffer15, 0x3f); } - int8* var_text_GameSlot5() { return zVarGameSlotInfo(5, zVar_buffer16, 0x3f); } - int8* var_text_GameSlot6() { return zVarGameSlotInfo(6, zVar_buffer17, 0x3f); } - int8* var_text_GameSlot7() { return zVarGameSlotInfo(7, zVar_buffer18, 0x3f); } - int8* var_text_MCAccessType() { return state_text[zSaveLoad_getMCAccessType()]; @@ -364,7 +343,6 @@ namespace return zVar_buffer19; } - int8* var_text_MCPS2MaxSpace() { // Yes... this matches. Probably just stripped out during porting since it @@ -373,40 +351,34 @@ namespace return zVar_buffer20; } - int8* var_text_MCPS2MinSpace() { sprintf(zVar_buffer21, &zVar_strings[0] /*"%d*/, 0); return zVar_buffer21; } - int8* var_text_MCSelectedCard() { sprintf(zVar_buffer22, &zVar_strings[0x3] /*"%c"*/, 'A' + zSaveLoad_getcard()); return zVar_buffer22; } - int8* var_text_MCSelectedGame() { sprintf(zVar_buffer23, &zVar_strings[0] /*"%d"*/, zSaveLoad_getgame() + 1); return zVar_buffer23; } - int8* var_text_PlayerHeShe() { return heshe_text[gCurrentPlayer]; } - int8* var_text_PlayerName() { return playername_text[gCurrentPlayer]; } - int8* var_text_PlayerPosition() { xEntFrame* frame = globals.player.ent.frame; @@ -415,7 +387,6 @@ namespace return zVar_buffer24; } - const char* var_text_SelectedArea() { // Looks like this variable was actually declared in this function given @@ -423,14 +394,12 @@ namespace return zSceneGetAreaname(selSceneID); } - int8* var_text_ShinyCount() { sprintf(zVar_buffer25, &zVar_strings[0] /*"%d"*/, globals.player.Inv_Shiny); return zVar_buffer25; } - int8* var_text_ShinyCountText() { if (globals.player.Inv_Shiny == 0) @@ -449,28 +418,24 @@ namespace return lbl_80291708; } - int8* var_text_SoundFXVolume() { sprintf(zVar_buffer26, &zVar_strings[0] /*"%d"*/, zVarEntryCB_SndFXVol(NULL)); return zVar_buffer26; } - int8* var_text_SoundMusicVolume() { sprintf(zVar_buffer27, &zVar_strings[0] /*"%d"*/, zVarEntryCB_SndMusicVol(NULL)); return zVar_buffer27; } - int8* var_text_SpaceAvailable() { sprintf(zVar_buffer28, &zVar_strings[0], zSaveLoad_getMCavailable()); return zVar_buffer28; } - int8* var_text_SpaceAvailableString() { // What a wierd dance... they could have just used zVar_buffer29 directly. @@ -483,21 +448,18 @@ namespace return zVar_buffer29; } - int8* var_text_SpaceNeeded() { sprintf(zVar_buffer30, &zVar_strings[0] /*"%d"*/, zSaveLoad_getMCneeded()); return zVar_buffer30; } - int8* var_text_TotalPatsSocks() { sprintf(zVar_buffer31, &zVar_strings[0] /*"%d"*/, globals.player.Inv_PatsSock_Total); return zVar_buffer31; } - int8* var_text_MCName() { switch (zSaveLoad_getcard()) @@ -515,7 +477,6 @@ namespace return zVar_buffer32; } - var_type* find_var(const substr& str) { uint32 start = 0; @@ -542,7 +503,6 @@ namespace return NULL; } - // Note: This function is actually in the anonymous namespace #if 0 // Not close, don't know enough about the data structures to know if things are @@ -575,14 +535,12 @@ namespace } // namespace - void var_init() { extern xtextbox::tag_type var_tag[]; xtextbox::register_tags(var_tag, 1); } - int8* var_text(const substr& str) { var_type* entry = find_var(str); @@ -592,7 +550,6 @@ int8* var_text(const substr& str) return entry->get_text(); } - void zVarInit(zVarEntry* table) { for (int32 i = 0; i < 18; ++i) @@ -601,12 +558,10 @@ void zVarInit(zVarEntry* table) } } - void zVarNewGame() { } - uint32 zVarEntryCB_SndMode(void* arg) { return gSnd.stereo; @@ -629,7 +584,6 @@ uint32 zVarEntryCB_SndFXVol(void* arg) } #endif - #if 0 // The branching in this function is totally stupid, no idea how to untangle // what they originally wrote here because the code makes no sense. I think @@ -672,7 +626,6 @@ uint32 zVarEntryCB_MCAvailable(void* arg) } #endif - uint32 zVarEntryCB_VibrationOn(void* arg) { // I'm pretty sure they actually and'd with a bit mask here, I couldn't find @@ -680,7 +633,6 @@ uint32 zVarEntryCB_VibrationOn(void* arg) return globals.option_vibration & 0x1; } - int32 zVarEntryCB_CurrentSceneLetter() { int8 buffer[16]; @@ -703,7 +655,6 @@ int32 zVarEntryCB_CurrentSceneLetter() return (mostSignificantChar - 'A') + 1; } - int32 zVarEntryCB_CurrentRoom() { int8 buffer[16]; @@ -728,55 +679,46 @@ int32 zVarEntryCB_CurrentRoom() return room + ((mostSignificantChar - 'A') + 1) * 100; } - int32 zVarEntryCB_CurrentLevelPickup() { return globals.player.Inv_LevelPickups_CurrentLevel; } - int32 zVarEntryCB_CurrentLevelPSocks() { return globals.player.Inv_PatsSock_CurrentLevel; } - int32 zVarEntryCB_TotalPSocks() { return globals.player.Inv_PatsSock_Total; } - int32 zVarEntryCB_Shinies() { return globals.player.Inv_Shiny; } - int32 zVarEntryCB_Spatulas() { return globals.player.Inv_Spatula; } - int32 zVarEntryCB_Date() { return iGetDay() + iGetMonth() * 0x64; } - int32 zVarEntryCB_Hour() { return iGetHour(); } - int32 zVarEntryCB_Minute() { return iGetMinute(); } - int32 zVarEntryCB_CounterValue(void* arg) { // Given the void argument type, no idea what type this actually is. @@ -789,13 +731,11 @@ int32 zVarEntryCB_CounterValue(void* arg) return ((something*)arg)->theValue; } - int32 zVarEntryCB_IsEnabled(void* arg) { return xBaseIsEnabled((xBase*)arg) != 0; } - int32 zVarEntryCB_IsVisible(void* arg) { return xEntIsVisible((xEnt*)arg) != 0;