mirror of
https://github.com/theclub654/ProjectCane.git
synced 2024-11-27 00:20:23 +00:00
Able to load up all game objects into the SW loop list
This commit is contained in:
parent
03530044f6
commit
f758f94417
20
.gitignore
vendored
Normal file
20
.gitignore
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
.vs/
|
||||
Sly1/x64/
|
||||
x64/
|
||||
Sly1/jb_intro
|
||||
Sly1/uw_bonus_drivewheels_final
|
||||
Sly1/uw_bonus_library
|
||||
Sly1/uw_bonus_security
|
||||
Sly1/uw_boss_blimp
|
||||
Sly1/uw_c2_final
|
||||
Sly1/uw_exterior_approach
|
||||
Sly1/uw_rip_off
|
||||
Sly1/uw_t3_final
|
||||
Sly1/ms_approach
|
||||
Sly1/ms_casino
|
||||
Sly1/ms_exterior
|
||||
Sly1/ms_inspector
|
||||
Sly1/ms_rooftop
|
||||
Sly1/ms_sniper
|
||||
Sly1/ms_suv
|
||||
Sly1/ms_vertigo
|
@ -152,6 +152,7 @@
|
||||
<ClInclude Include="cm.h" />
|
||||
<ClInclude Include="cnvo.h" />
|
||||
<ClInclude Include="coin.h" />
|
||||
<ClInclude Include="crusher.h" />
|
||||
<ClInclude Include="crv.h" />
|
||||
<ClInclude Include="dart.h" />
|
||||
<ClInclude Include="dec.h" />
|
||||
@ -162,13 +163,17 @@
|
||||
<ClInclude Include="flash.h" />
|
||||
<ClInclude Include="fly.h" />
|
||||
<ClInclude Include="font.h" />
|
||||
<ClInclude Include="freeze.h" />
|
||||
<ClInclude Include="geom.h" />
|
||||
<ClInclude Include="gl.h" />
|
||||
<ClInclude Include="glob.h" />
|
||||
<ClInclude Include="gomer.h" />
|
||||
<ClInclude Include="hg.h" />
|
||||
<ClInclude Include="hide.h" />
|
||||
<ClInclude Include="hnd.h" />
|
||||
<ClInclude Include="jack.h" />
|
||||
<ClInclude Include="jlo.h" />
|
||||
<ClInclude Include="jp.h" />
|
||||
<ClInclude Include="jt.h" />
|
||||
<ClInclude Include="keyhole.h" />
|
||||
<ClInclude Include="lo.h" />
|
||||
@ -177,6 +182,7 @@
|
||||
<ClInclude Include="mgv.h" />
|
||||
<ClInclude Include="missile.h" />
|
||||
<ClInclude Include="mouthgame.h" />
|
||||
<ClInclude Include="murray.h" />
|
||||
<ClInclude Include="path.h" />
|
||||
<ClInclude Include="phasemem.h" />
|
||||
<ClInclude Include="pnt.h" />
|
||||
@ -191,11 +197,13 @@
|
||||
<ClInclude Include="rog.h" />
|
||||
<ClInclude Include="sensor.h" />
|
||||
<ClInclude Include="serialize.h" />
|
||||
<ClInclude Include="shadow.h" />
|
||||
<ClInclude Include="shape.h" />
|
||||
<ClInclude Include="shd.h" />
|
||||
<ClInclude Include="shdanim.h" />
|
||||
<ClInclude Include="sidebag.h" />
|
||||
<ClInclude Include="sm.h" />
|
||||
<ClInclude Include="smartguard.h" />
|
||||
<ClInclude Include="so.h" />
|
||||
<ClInclude Include="spaprops.h" />
|
||||
<ClInclude Include="splicemap.h" />
|
||||
@ -203,9 +211,11 @@
|
||||
<ClInclude Include="step.h" />
|
||||
<ClInclude Include="stepguard.h" />
|
||||
<ClInclude Include="sw.h" />
|
||||
<ClInclude Include="tank.h" />
|
||||
<ClInclude Include="target.h" />
|
||||
<ClInclude Include="tn.h" />
|
||||
<ClInclude Include="transition.h" />
|
||||
<ClInclude Include="ub.h" />
|
||||
<ClInclude Include="util.h" />
|
||||
<ClInclude Include="vec.h" />
|
||||
<ClInclude Include="vis.h" />
|
||||
@ -225,6 +235,7 @@
|
||||
<ClCompile Include="cm.cpp" />
|
||||
<ClCompile Include="cnvo.cpp" />
|
||||
<ClCompile Include="coin.cpp" />
|
||||
<ClCompile Include="crusher.cpp" />
|
||||
<ClCompile Include="crv.cpp" />
|
||||
<ClCompile Include="dart.cpp" />
|
||||
<ClCompile Include="dialog.cpp" />
|
||||
@ -234,14 +245,18 @@
|
||||
<ClCompile Include="flash.cpp" />
|
||||
<ClCompile Include="fly.cpp" />
|
||||
<ClCompile Include="font.cpp" />
|
||||
<ClCompile Include="freeze.cpp" />
|
||||
<ClCompile Include="geom.cpp" />
|
||||
<ClCompile Include="gl.cpp" />
|
||||
<ClCompile Include="glad.c" />
|
||||
<ClCompile Include="glob.cpp" />
|
||||
<ClCompile Include="gomer.cpp" />
|
||||
<ClCompile Include="hg.cpp" />
|
||||
<ClCompile Include="hide.cpp" />
|
||||
<ClCompile Include="hnd.cpp" />
|
||||
<ClCompile Include="jack.cpp" />
|
||||
<ClCompile Include="jlo.cpp" />
|
||||
<ClCompile Include="jp.cpp" />
|
||||
<ClCompile Include="jt.cpp" />
|
||||
<ClCompile Include="keyhole.cpp" />
|
||||
<ClCompile Include="lo.cpp" />
|
||||
@ -250,6 +265,7 @@
|
||||
<ClCompile Include="mgv.cpp" />
|
||||
<ClCompile Include="missile.cpp" />
|
||||
<ClCompile Include="mouthgame.cpp" />
|
||||
<ClCompile Include="murray.cpp" />
|
||||
<ClCompile Include="path.cpp" />
|
||||
<ClCompile Include="phasemem.cpp" />
|
||||
<ClCompile Include="pnt.cpp" />
|
||||
@ -264,11 +280,13 @@
|
||||
<ClCompile Include="rog.cpp" />
|
||||
<ClCompile Include="sensor.cpp" />
|
||||
<ClCompile Include="serialize.cpp" />
|
||||
<ClCompile Include="shadow.cpp" />
|
||||
<ClCompile Include="shape.cpp" />
|
||||
<ClCompile Include="shd.cpp" />
|
||||
<ClCompile Include="shdanim.cpp" />
|
||||
<ClCompile Include="sidebag.cpp" />
|
||||
<ClCompile Include="sm.cpp" />
|
||||
<ClCompile Include="smartguard.cpp" />
|
||||
<ClCompile Include="so.cpp" />
|
||||
<ClCompile Include="spaprops.cpp" />
|
||||
<ClCompile Include="splicemap.cpp" />
|
||||
@ -276,14 +294,19 @@
|
||||
<ClCompile Include="step.cpp" />
|
||||
<ClCompile Include="stepguard.cpp" />
|
||||
<ClCompile Include="sw.cpp" />
|
||||
<ClCompile Include="tank.cpp" />
|
||||
<ClCompile Include="target.cpp" />
|
||||
<ClCompile Include="tn.cpp" />
|
||||
<ClCompile Include="transition.cpp" />
|
||||
<ClCompile Include="ub.cpp" />
|
||||
<ClCompile Include="util.cpp" />
|
||||
<ClCompile Include="vec.cpp" />
|
||||
<ClCompile Include="vis.cpp" />
|
||||
<ClCompile Include="xform.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\README.md" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
@ -228,6 +228,36 @@
|
||||
<ClInclude Include="sidebag.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="smartguard.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="gomer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ub.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="murray.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="crusher.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="tank.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="jp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="hg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="freeze.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="shadow.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="phasemem.cpp">
|
||||
@ -443,5 +473,40 @@
|
||||
<ClCompile Include="sidebag.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="smartguard.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="gomer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ub.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="murray.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="crusher.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tank.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="jp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="hg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="freeze.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="shadow.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\README.md">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
26
Sly1/alo.cpp
26
Sly1/alo.cpp
@ -44,19 +44,17 @@ void OnAloAdd(ALO* palo)
|
||||
palo->paloFreezeRoot = palo;
|
||||
palo->dlFreeze.paloLast = palo;
|
||||
palo->dlFreeze.paloFirst = palo;
|
||||
|
||||
//
|
||||
|
||||
}
|
||||
else
|
||||
AppendDlEntry(&palo->psw->dlMRDRealClock, palo);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
palo->paloRoot = parentObject->paloRoot;
|
||||
//
|
||||
|
||||
}
|
||||
if (palo->pshadow != 0)
|
||||
AppendDlEntry(&palo->psw->dlShadow, palo->pshadow);
|
||||
//
|
||||
ResolveAlo(palo);
|
||||
}
|
||||
|
||||
void OnAloRemove(ALO* palo)
|
||||
@ -73,6 +71,13 @@ void CloneAlo(ALO* palo)
|
||||
|
||||
}
|
||||
|
||||
void ResolveAlo(ALO* palo)
|
||||
{
|
||||
if (palo->paloRoot != nullptr)
|
||||
palo->paloRoot->cframeStatic = 0;
|
||||
|
||||
}
|
||||
|
||||
void InitAlo(ALO* palo)
|
||||
{
|
||||
InitDl(&palo->dlChild, 0x1C);
|
||||
@ -89,7 +94,6 @@ void InitAlo(ALO* palo)
|
||||
void AddAloHierarchy(ALO* palo)
|
||||
{
|
||||
DLI plo;
|
||||
|
||||
// Loads parent object child entry
|
||||
plo.m_pdl = &palo->dlChild;
|
||||
// Loads the object base offset to child entry list
|
||||
@ -136,9 +140,9 @@ void LoadAloFromBrx(ALO* palo, CBinaryInputStream* pbis)
|
||||
LoadGlobsetFromBrx(&palo->globset, pbis);
|
||||
LoadAloAloxFromBrx(pbis);
|
||||
|
||||
byte unk_8 = pbis->U8Read();
|
||||
palo->cposec = pbis->U8Read();
|
||||
|
||||
for (int i = 0; i < unk_8; i++)
|
||||
for (int i = 0; i < palo->cposec; i++)
|
||||
{
|
||||
pbis->S16Read();
|
||||
|
||||
@ -146,7 +150,7 @@ void LoadAloFromBrx(ALO* palo, CBinaryInputStream* pbis)
|
||||
pbis->F32Read();
|
||||
}
|
||||
|
||||
LoadSwObjectsFromBrx(0, palo, pbis);
|
||||
LoadSwObjectsFromBrx(palo->psw, palo, pbis);
|
||||
}
|
||||
|
||||
void LoadAloAloxFromBrx(CBinaryInputStream* pbis)
|
||||
|
17
Sly1/alo.h
17
Sly1/alo.h
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "lo.h"
|
||||
#include "freeze.h"
|
||||
#include "glob.h"
|
||||
|
||||
struct XF
|
||||
@ -35,34 +36,28 @@ public:
|
||||
glm::mat3 matOrig;
|
||||
glm::vec3 eulOrig;
|
||||
DL dlAct;
|
||||
int cframeStatic;
|
||||
GLOBSET globset;
|
||||
struct SHADOW *pshadow;
|
||||
float sFastShadowRadius;
|
||||
float sFastShadowDepth;
|
||||
int fRealClock;
|
||||
float dtUpdatePause;
|
||||
float sRadiusRenderSelf;
|
||||
float sRadiusRenderAll;
|
||||
};
|
||||
|
||||
// Merge
|
||||
// Used to merge ALO object's
|
||||
struct MRG
|
||||
{
|
||||
DLE dle;
|
||||
// Number of ALO objects to be merged
|
||||
int cpalo;
|
||||
// The ALO object thats gonna be merged
|
||||
ALO **apalo;
|
||||
int cposec;
|
||||
};
|
||||
|
||||
// Initialize ALO object
|
||||
void InitAlo(ALO* palo); // NOT FINISHED
|
||||
// Adds ALO object to parent ALO object
|
||||
void AddAloHierarchy(ALO *palo); // NOT FINISHED
|
||||
void RemoveAloHierarchy(ALO *palo); // NOT FINISHED
|
||||
void OnAloAdd(ALO* palo); // NOT FINISHED
|
||||
void OnAloRemove(ALO* palo);
|
||||
void CloneAloHierarchy(ALO* palo);
|
||||
void CloneAlo(ALO* palo);
|
||||
void ResolveAlo(ALO *palo);
|
||||
// Loads ALO object from binary file
|
||||
void LoadAloFromBrx(ALO* palo, CBinaryInputStream* pbis);
|
||||
void LoadAloAloxFromBrx(CBinaryInputStream* pbis);
|
||||
|
34
Sly1/basic.h
34
Sly1/basic.h
@ -356,7 +356,7 @@ struct VTPO
|
||||
int grfcid = 0xB;
|
||||
int cb = 0x5D0;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (PO*) = InitPo;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -396,7 +396,7 @@ struct VTSTEP
|
||||
int grfcid = 0xB;
|
||||
int cb = 0x6E0;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (STEP*) = InitStep;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -436,7 +436,7 @@ struct VTJT
|
||||
int grfcid = 0xB;
|
||||
int cb = 0x2730;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (JT*) = InitJt;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -476,7 +476,7 @@ struct VTSTEPGUARD
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xB90;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (STEPGUARD*) = InitStepGuard;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -516,7 +516,7 @@ struct VTSMARTGUARD
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xC50;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (SMARTGUARD*) = InitSmartGuard;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -556,7 +556,7 @@ struct VTGOMER
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xBD0;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (GOMER*) = InitGomer;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -596,7 +596,7 @@ struct VTUBG
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xC20;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (UBG*) = InitUbg;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -636,7 +636,7 @@ struct VTMBG
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xDC0;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (MBG*) = InitMbg;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -676,7 +676,7 @@ struct VTBHG
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xBA0;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (BHG*) = InitBhg;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -716,7 +716,7 @@ struct VTMURRAY
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xBC0;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (MURRAY*) = InitMurray;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -756,7 +756,7 @@ struct VTPUFFC
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xBC0;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (STEPGUARD*) = InitStepGuard;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -796,7 +796,7 @@ struct VTCRFOD
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xBA0;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (STEPGUARD*) = InitStepGuard;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -836,7 +836,7 @@ struct VTCRFODB
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xBB0;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (CRFODB*) = InitCrfodb;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -876,7 +876,7 @@ struct VTCRFODK
|
||||
int grfcid = 0xB;
|
||||
int cb = 0xBA0;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (STEPGUARD*) = InitStepGuard;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -916,7 +916,7 @@ struct VTTANK
|
||||
int grfcid = 0xB;
|
||||
int cb = 0x730;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (TANK*) = InitTank;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -956,7 +956,7 @@ struct VTJP
|
||||
int grfcid = 0xB;
|
||||
int cb = 0x950;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (JP*) = InitJp;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
@ -996,7 +996,7 @@ struct VTHG
|
||||
int grfcid = 0xB;
|
||||
int cb = 0x900;
|
||||
|
||||
void (*pfnInitLo) () = nullptr;
|
||||
void (*pfnInitLo) (HG*) = InitHg;
|
||||
void (*pfnSetLoDefaults) () = nullptr;
|
||||
void (*pfnAddLo) () = nullptr;
|
||||
void (*pfnRemoveLo)() = nullptr;
|
||||
|
10
Sly1/brx.cpp
10
Sly1/brx.cpp
@ -27,10 +27,12 @@ LO* PloNew(CID cid, SW* psw, ALO* paloParent, OID oid, int isplice)
|
||||
|
||||
localObject->psw = psw;
|
||||
|
||||
if(cid == CID_CM || cid == CID_MS || cid == CID_SW || cid == CID_VISMAP)
|
||||
// Appending object to parent list
|
||||
if (localObject->pvtlo->pfnInitLo != 0)
|
||||
AppendDlEntry(PdlFromSwOid(localObject->psw, localObject->oid), localObject);
|
||||
|
||||
if (cid == CID_CM || cid == CID_MS || cid == CID_SW || cid == CID_VISMAP)
|
||||
// GOTTA REMOVE THIS
|
||||
if (localObject->pvtlo->pfnInitLo != 0)
|
||||
localObject->pvtlo->pfnInitLo(localObject);
|
||||
|
||||
return (LO*)localObject;
|
||||
@ -49,8 +51,8 @@ void LoadSwObjectsFromBrx(SW *psw, ALO *paloParent, CBinaryInputStream *pbis)
|
||||
OID oid = (OID)pbis->S16Read();
|
||||
// Objects splice event index
|
||||
int isplice = pbis->S16Read();
|
||||
|
||||
LO* plo = PloNew(cid, psw, paloParent, oid, isplice);
|
||||
//std::cout << i << "\n";
|
||||
LO *plo = PloNew(cid, psw, paloParent, oid, isplice);
|
||||
plo->pvtlo->pfnLoadLoFromBrx(plo, pbis);
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
void LoadCnvoFromBrx(CNVO* pcnvo, CBinaryInputStream* pbis)
|
||||
{
|
||||
LoadSoFromBrx(0, pbis);
|
||||
LoadSoFromBrx(pcnvo, pbis);
|
||||
pbis->F32Read();
|
||||
pbis->F32Read();
|
||||
}
|
||||
|
6
Sly1/crusher.cpp
Normal file
6
Sly1/crusher.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "crusher.h"
|
||||
|
||||
void InitCrfodb(CRFODB* pcrfodb)
|
||||
{
|
||||
InitStepGuard(pcrfodb);
|
||||
}
|
14
Sly1/crusher.h
Normal file
14
Sly1/crusher.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include "stepguard.h"
|
||||
|
||||
class CRFOD : public STEPGUARD
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
class CRFODB :public CRFOD
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
void InitCrfodb(CRFODB *pcrfodb);
|
43
Sly1/dec.h
43
Sly1/dec.h
@ -46,17 +46,60 @@ void OnSoAdd(SO* pso);
|
||||
void LoadSoFromBrx(SO* pso, CBinaryInputStream* pbis);
|
||||
void UpdateSo(SO* pso, float dt);
|
||||
|
||||
// Player Object
|
||||
class PO;
|
||||
void InitPo(PO* ppo);
|
||||
|
||||
class STEP;
|
||||
void InitStep(STEP* pstep);
|
||||
|
||||
// Sly
|
||||
class JT;
|
||||
void InitJt(JT* pjt);
|
||||
void LoadJtFromBrx(JT* pjt, CBinaryInputStream* pbis);
|
||||
|
||||
// Guard
|
||||
class STEPGUARD;
|
||||
void InitStepGuard(STEPGUARD *pstepguard);
|
||||
void LoadStepGuardFromBrx(STEPGUARD *pstepguard, CBinaryInputStream* pbis);
|
||||
|
||||
class SMARTGUARD;
|
||||
void InitSmartGuard(SMARTGUARD* psmartguard);
|
||||
|
||||
class GOMER;
|
||||
void InitGomer(GOMER* pgomer);
|
||||
|
||||
class UBG;
|
||||
void InitUbg(UBG* pubg);
|
||||
|
||||
class MBG;
|
||||
void InitMbg(MBG* pmbg);
|
||||
void LoadMbgFromBrx(MBG *pmbg, CBinaryInputStream* pbis);
|
||||
|
||||
class BHG;
|
||||
void InitBhg(BHG* pbhg);
|
||||
|
||||
class MURRAY;
|
||||
void InitMurray(MURRAY* pmurray);
|
||||
|
||||
class PUFFC;
|
||||
|
||||
class CRFOD;
|
||||
|
||||
class CRFODB;
|
||||
void InitCrfodb(CRFODB* pcrfodb);
|
||||
|
||||
class CRFODK;
|
||||
|
||||
class TANK;
|
||||
void InitTank(TANK* ptank);
|
||||
|
||||
class JP;
|
||||
void InitJp(JP* pjp);
|
||||
|
||||
class HG;
|
||||
void InitHg(HG* phg);
|
||||
|
||||
class ROV;
|
||||
void LoadRovFromBrx(ROV *prov, CBinaryInputStream* pbis);
|
||||
|
||||
|
6
Sly1/freeze.cpp
Normal file
6
Sly1/freeze.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "freeze.h"
|
||||
|
||||
void MergeSwGroup(SW *psw, MRG *pmrg)
|
||||
{
|
||||
|
||||
}
|
15
Sly1/freeze.h
Normal file
15
Sly1/freeze.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include "sw.h"
|
||||
|
||||
// Merge
|
||||
// Used to merge ALO object's
|
||||
struct MRG
|
||||
{
|
||||
DLE dle;
|
||||
// Number of ALO objects to be merged
|
||||
int cpalo;
|
||||
// The ALO object thats gonna be merged
|
||||
struct ALO** apalo;
|
||||
};
|
||||
|
||||
void MergeSwGroup(SW *psw, MRG *pmrg);
|
@ -1,4 +0,0 @@
|
||||
# ignore game assets
|
||||
*jb_intro
|
||||
*uw_exterior_boat
|
||||
*x64
|
@ -18,7 +18,7 @@ void LoadGlobsetFromBrx(GLOBSET *pglobset, CBinaryInputStream *pbis)
|
||||
// Loading number of submodels for model
|
||||
pglobset->cglob = pbis->U16Read();
|
||||
|
||||
// Allocating memory for submodel data
|
||||
// Allocating memory for submodel data for model
|
||||
pglobset->aglob = (GLOB*)new GLOB[pglobset->cglob << 7]();
|
||||
pglobset->aglobi = (GLOBI*)new GLOBI[pglobset->cglob * 0x28]();
|
||||
|
||||
@ -191,7 +191,6 @@ void LoadGlobsetFromBrx(GLOBSET *pglobset, CBinaryInputStream *pbis)
|
||||
|
||||
for (int i = 0; i < numSubMesh1; i++)
|
||||
{
|
||||
|
||||
byte vertexCount2 = pbis->U8Read();
|
||||
|
||||
for (int i = 0; i < vertexCount2; i++)
|
||||
|
6
Sly1/gomer.cpp
Normal file
6
Sly1/gomer.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "gomer.h"
|
||||
|
||||
void InitGomer(GOMER* pgomer)
|
||||
{
|
||||
InitStepGuard(pgomer);
|
||||
}
|
9
Sly1/gomer.h
Normal file
9
Sly1/gomer.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "stepguard.h"
|
||||
|
||||
class GOMER:public STEPGUARD
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
void InitGomer(GOMER* pgomer);
|
6
Sly1/hg.cpp
Normal file
6
Sly1/hg.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "hg.h"
|
||||
|
||||
void InitHg(HG* phg)
|
||||
{
|
||||
InitStep(phg);
|
||||
}
|
9
Sly1/hg.h
Normal file
9
Sly1/hg.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "step.h"
|
||||
|
||||
class HG : public STEP
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
void InitHg(HG* phg);
|
6
Sly1/jp.cpp
Normal file
6
Sly1/jp.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "jp.h"
|
||||
|
||||
void InitJp(JP* pjp)
|
||||
{
|
||||
InitStep(pjp);
|
||||
}
|
9
Sly1/jp.h
Normal file
9
Sly1/jp.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "step.h"
|
||||
|
||||
class JP : public STEP
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
void InitJp(JP* pjp);
|
32
Sly1/lo.cpp
32
Sly1/lo.cpp
@ -103,39 +103,33 @@ void OnLoRemove(LO* plo)
|
||||
|
||||
}
|
||||
|
||||
int FIsLoInWorld(LO* plo)
|
||||
int FIsLoInWorld(LO *plo)
|
||||
{
|
||||
if (plo != 0)
|
||||
if (plo != nullptr)
|
||||
{
|
||||
// Loading objects parent
|
||||
ALO* palo = plo->paloParent;
|
||||
ALO *loPaloParent = plo->paloParent;
|
||||
|
||||
while (true)
|
||||
{
|
||||
// Loading objects child list
|
||||
DL* objectChild = &palo->dlChild;
|
||||
ALO *palo = loPaloParent;
|
||||
|
||||
// Loading SW dlChild if parent LO doenst have a parent
|
||||
if (palo == nullptr)
|
||||
objectChild = &plo->psw->dlChild;
|
||||
DL *pdl = &palo->dlChild;
|
||||
|
||||
// Checks to see if object has a child
|
||||
bool isFound = FFindDlEntry(objectChild, plo);
|
||||
if (palo == (ALO*)0x0)
|
||||
pdl = &plo->psw->dlChild;
|
||||
|
||||
int isFound = FFindDlEntry(pdl, plo);
|
||||
|
||||
// If not found than return 0
|
||||
if (isFound == 0)
|
||||
return 0;
|
||||
|
||||
// If object doesnt have a parent
|
||||
if (palo == 0x0)
|
||||
break;
|
||||
if (palo == (ALO*)0x0) break;
|
||||
|
||||
// Loading parent object if LO has one
|
||||
plo = (LO*)palo->paloParent;
|
||||
loPaloParent = palo->paloParent;
|
||||
|
||||
plo = (LO*)palo;
|
||||
}
|
||||
}
|
||||
|
||||
// If object is found return 1
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
10
Sly1/mb.cpp
10
Sly1/mb.cpp
@ -1,5 +1,15 @@
|
||||
#include "mb.h"
|
||||
|
||||
void InitMbg(MBG *pmbg)
|
||||
{
|
||||
InitStepGuard(pmbg);
|
||||
}
|
||||
|
||||
void InitBhg(BHG *pbhg)
|
||||
{
|
||||
InitStepGuard((STEPGUARD*)pbhg);
|
||||
}
|
||||
|
||||
void LoadMbgFromBrx(MBG* pmbg, CBinaryInputStream* pbis)
|
||||
{
|
||||
LoadStepGuardFromBrx(pmbg, pbis);
|
||||
|
@ -6,4 +6,6 @@ class MBG : public STEPGUARD
|
||||
public:
|
||||
};
|
||||
|
||||
void InitMbg(MBG* pmbg);
|
||||
void InitBhg(BHG* pbhg);
|
||||
void LoadMbgFromBrx(MBG *pmbg, CBinaryInputStream *pbis);
|
6
Sly1/murray.cpp
Normal file
6
Sly1/murray.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "murray.h"
|
||||
|
||||
void InitMurray(MURRAY* pmurray)
|
||||
{
|
||||
InitStepGuard(pmurray);
|
||||
}
|
9
Sly1/murray.h
Normal file
9
Sly1/murray.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "stepguard.h"
|
||||
|
||||
class MURRAY : public STEPGUARD
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
void InitMurray(MURRAY* pmurray);
|
@ -2,7 +2,7 @@
|
||||
|
||||
void LoadPathZoneFromBrx(PATHZONE* ppathzone, CBinaryInputStream* pbis)
|
||||
{
|
||||
LoadLoFromBrx(0, pbis);
|
||||
LoadLoFromBrx(ppathzone, pbis);
|
||||
uint16_t unk_0 = pbis->U16Read();
|
||||
uint16_t unk_1 = pbis->U16Read();
|
||||
uint16_t unk_2 = pbis->U16Read();
|
||||
|
@ -46,5 +46,5 @@ void LoadProxyFromBrx(PROXY *pproxy, CBinaryInputStream* pbis)
|
||||
}
|
||||
|
||||
if (numProxyObjs == 1)
|
||||
LoadSwObjectsFromBrx(0, pproxy, pbis);
|
||||
LoadSwObjectsFromBrx(pproxy->psw, pproxy, pbis);
|
||||
}
|
||||
|
1
Sly1/shadow.cpp
Normal file
1
Sly1/shadow.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "shadow.h"
|
7
Sly1/shadow.h
Normal file
7
Sly1/shadow.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
class SHADOW
|
||||
{
|
||||
|
||||
};
|
||||
|
6
Sly1/smartguard.cpp
Normal file
6
Sly1/smartguard.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "smartguard.h"
|
||||
|
||||
void InitSmartGuard(SMARTGUARD* psmartguard)
|
||||
{
|
||||
InitStepGuard(psmartguard);
|
||||
}
|
9
Sly1/smartguard.h
Normal file
9
Sly1/smartguard.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "stepguard.h"
|
||||
|
||||
class SMARTGUARD : public STEPGUARD
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
void InitSmartGuard(SMARTGUARD* psmartguard);
|
@ -15,6 +15,7 @@ void OnSoAdd(SO *pso)
|
||||
|
||||
if (pso->paloParent == nullptr)
|
||||
{
|
||||
pso->psw->cpsoRoot++;
|
||||
AppendDlEntry(&pso->psw->dlRoot, pso);
|
||||
}
|
||||
|
||||
@ -23,7 +24,7 @@ void OnSoAdd(SO *pso)
|
||||
|
||||
void LoadSoFromBrx(SO* pso, CBinaryInputStream* pbis)
|
||||
{
|
||||
byte unk0 = pbis->U8Read();
|
||||
pbis->U8Read();
|
||||
|
||||
uint16_t vertexCount = pbis->ReadGeom();
|
||||
pbis->ReadBspc();
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
void LoadSquishFromBrx(SQUISH* psquish, CBinaryInputStream* pbis)
|
||||
{
|
||||
LoadSoFromBrx(0, pbis);
|
||||
LoadSoFromBrx(psquish, pbis);
|
||||
}
|
||||
|
@ -1 +1,6 @@
|
||||
#include "step.h"
|
||||
|
||||
void InitStep(STEP* pstep)
|
||||
{
|
||||
InitPo(pstep);
|
||||
}
|
||||
|
@ -32,3 +32,5 @@ class STEP : public PO
|
||||
glm::vec3 *pposBumper;
|
||||
SO *psoPhys;
|
||||
};
|
||||
|
||||
void InitStep(STEP* pstep);
|
@ -1,5 +1,10 @@
|
||||
#include "stepguard.h"
|
||||
|
||||
void InitStepGuard(STEPGUARD* pstepguard)
|
||||
{
|
||||
InitStep(pstepguard);
|
||||
}
|
||||
|
||||
void LoadStepGuardFromBrx(STEPGUARD* pstepguard, CBinaryInputStream* pbis)
|
||||
{
|
||||
LoadSoFromBrx(pstepguard, pbis);
|
||||
|
@ -6,4 +6,10 @@ class STEPGUARD : public STEP
|
||||
public:
|
||||
};
|
||||
|
||||
class PUFFC : public STEPGUARD
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
void InitStepGuard(STEPGUARD* pstepguard);
|
||||
void LoadStepGuardFromBrx(STEPGUARD *pstepguard, CBinaryInputStream *pbis);
|
@ -74,6 +74,7 @@ void LoadSwFromBrx(SW* psw, CBinaryInputStream* pbis)
|
||||
// Loads all the static world objects from the binary file
|
||||
LoadSwObjectsFromBrx(psw, 0x0, pbis);
|
||||
pbis->Align(0x10);
|
||||
//std::cout << std::dec << sizeof(LO);
|
||||
std::cout << "File Loaded Successfully\n";
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
DL dlMRDRealClock;
|
||||
// Used to store the first parent of a local object.
|
||||
DL firstObjectParents[512];
|
||||
LO* aploCidHead[162];
|
||||
LO *aploCidHead[162];
|
||||
DL dlAsega;
|
||||
DL dlAsegaRealClock;
|
||||
DL dlAsegaPending;
|
||||
|
6
Sly1/tank.cpp
Normal file
6
Sly1/tank.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "tank.h"
|
||||
|
||||
void InitTank(TANK* ptank)
|
||||
{
|
||||
InitStep(ptank);
|
||||
}
|
9
Sly1/tank.h
Normal file
9
Sly1/tank.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "step.h"
|
||||
|
||||
class TANK : public STEP
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
void InitTank(TANK* ptank);
|
6
Sly1/ub.cpp
Normal file
6
Sly1/ub.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "ub.h"
|
||||
|
||||
void InitUbg(UBG* pubg)
|
||||
{
|
||||
InitGomer(pubg);
|
||||
}
|
Loading…
Reference in New Issue
Block a user