Renamed all game object type vtables to there respective names

This commit is contained in:
theclub654 2023-11-02 19:38:12 -04:00
parent 5d14557704
commit b3d773d6e1
139 changed files with 10884 additions and 4539 deletions

BIN
Sly1/Sly1.aps Normal file

Binary file not shown.

BIN
Sly1/Sly1.rc Normal file

Binary file not shown.

View File

@ -140,25 +140,32 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="ac.h" />
<ClInclude Include="alarm.h" />
<ClInclude Include="alo.h" />
<ClInclude Include="aseg.h" />
<ClInclude Include="barrier.h" />
<ClInclude Include="basic.h" />
<ClInclude Include="bis.h" />
<ClInclude Include="blip.h" />
<ClInclude Include="bomb.h" />
<ClInclude Include="break.h" />
<ClInclude Include="brx.h" />
<ClInclude Include="button.h" />
<ClInclude Include="can.h" />
<ClInclude Include="chkpnt.h" />
<ClInclude Include="cm.h" />
<ClInclude Include="cnvo.h" />
<ClInclude Include="coin.h" />
<ClInclude Include="crusher.h" />
<ClInclude Include="crv.h" />
<ClInclude Include="cycle.h" />
<ClInclude Include="dart.h" />
<ClInclude Include="dartgun.h" />
<ClInclude Include="dec.h" />
<ClInclude Include="dialog.h" />
<ClInclude Include="difficulty.h" />
<ClInclude Include="dl.h" />
<ClInclude Include="dysh.h" />
<ClInclude Include="emitter.h" />
<ClInclude Include="flash.h" />
<ClInclude Include="fly.h" />
@ -174,27 +181,40 @@
<ClInclude Include="jack.h" />
<ClInclude Include="jlo.h" />
<ClInclude Include="jp.h" />
<ClInclude Include="jsg.h" />
<ClInclude Include="jt.h" />
<ClInclude Include="jump.h" />
<ClInclude Include="keyhole.h" />
<ClInclude Include="landing.h" />
<ClInclude Include="lgn.h" />
<ClInclude Include="light.h" />
<ClInclude Include="lo.h" />
<ClInclude Include="main.h" />
<ClInclude Include="mb.h" />
<ClInclude Include="mecha.h" />
<ClInclude Include="mgv.h" />
<ClInclude Include="missile.h" />
<ClInclude Include="mouthgame.h" />
<ClInclude Include="mrkv.h" />
<ClInclude Include="murray.h" />
<ClInclude Include="path.h" />
<ClInclude Include="phasemem.h" />
<ClInclude Include="pipe.h" />
<ClInclude Include="pnt.h" />
<ClInclude Include="po.h" />
<ClInclude Include="proxy.h" />
<ClInclude Include="puffer.h" />
<ClInclude Include="pzo.h" />
<ClInclude Include="rail.h" />
<ClInclude Include="rat.h" />
<ClInclude Include="rchm.h" />
<ClInclude Include="ref.h" />
<ClInclude Include="render.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="rip.h" />
<ClInclude Include="rog.h" />
<ClInclude Include="rope.h" />
<ClInclude Include="rwm.h" />
<ClInclude Include="sensor.h" />
<ClInclude Include="serialize.h" />
<ClInclude Include="shadow.h" />
@ -206,11 +226,15 @@
<ClInclude Include="smartguard.h" />
<ClInclude Include="so.h" />
<ClInclude Include="spaprops.h" />
<ClInclude Include="speaker.h" />
<ClInclude Include="spire.h" />
<ClInclude Include="splicemap.h" />
<ClInclude Include="squish.h" />
<ClInclude Include="step.h" />
<ClInclude Include="stepguard.h" />
<ClInclude Include="suv.h" />
<ClInclude Include="sw.h" />
<ClInclude Include="tail.h" />
<ClInclude Include="tank.h" />
<ClInclude Include="target.h" />
<ClInclude Include="tn.h" />
@ -219,28 +243,39 @@
<ClInclude Include="util.h" />
<ClInclude Include="vec.h" />
<ClInclude Include="vis.h" />
<ClInclude Include="water.h" />
<ClInclude Include="waypoint.h" />
<ClInclude Include="wr.h" />
<ClInclude Include="xform.h" />
<ClInclude Include="zap.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="ac.cpp" />
<ClCompile Include="alarm.cpp" />
<ClCompile Include="alo.cpp" />
<ClCompile Include="aseg.cpp" />
<ClCompile Include="barrier.cpp" />
<ClCompile Include="basic.cpp" />
<ClCompile Include="bis.cpp" />
<ClCompile Include="blip.cpp" />
<ClCompile Include="bomb.cpp" />
<ClCompile Include="break.cpp" />
<ClCompile Include="brx.cpp" />
<ClCompile Include="button.cpp" />
<ClCompile Include="can.cpp" />
<ClCompile Include="chkpnt.cpp" />
<ClCompile Include="cm.cpp" />
<ClCompile Include="cnvo.cpp" />
<ClCompile Include="coin.cpp" />
<ClCompile Include="crusher.cpp" />
<ClCompile Include="crv.cpp" />
<ClCompile Include="cycle.cpp" />
<ClCompile Include="dart.cpp" />
<ClCompile Include="dartgun.cpp" />
<ClCompile Include="dialog.cpp" />
<ClCompile Include="difficulty.cpp" />
<ClCompile Include="dl.cpp" />
<ClCompile Include="dysh.cpp" />
<ClCompile Include="emitter.cpp" />
<ClCompile Include="flash.cpp" />
<ClCompile Include="fly.cpp" />
@ -257,27 +292,39 @@
<ClCompile Include="jack.cpp" />
<ClCompile Include="jlo.cpp" />
<ClCompile Include="jp.cpp" />
<ClCompile Include="jsg.cpp" />
<ClCompile Include="jt.cpp" />
<ClCompile Include="jump.cpp" />
<ClCompile Include="keyhole.cpp" />
<ClCompile Include="landing.cpp" />
<ClCompile Include="lgn.cpp" />
<ClCompile Include="light.cpp" />
<ClCompile Include="lo.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="mb.cpp" />
<ClCompile Include="mecha.cpp" />
<ClCompile Include="mgv.cpp" />
<ClCompile Include="missile.cpp" />
<ClCompile Include="mouthgame.cpp" />
<ClCompile Include="mrkv.cpp" />
<ClCompile Include="murray.cpp" />
<ClCompile Include="path.cpp" />
<ClCompile Include="phasemem.cpp" />
<ClCompile Include="pipe.cpp" />
<ClCompile Include="pnt.cpp" />
<ClCompile Include="po.cpp" />
<ClCompile Include="proxy.cpp" />
<ClCompile Include="puffer.cpp" />
<ClCompile Include="pzo.cpp" />
<ClCompile Include="rail.cpp" />
<ClCompile Include="rat.cpp" />
<ClCompile Include="rchm.cpp" />
<ClCompile Include="ref.cpp" />
<ClCompile Include="render.cpp" />
<ClCompile Include="rip.cpp" />
<ClCompile Include="rog.cpp" />
<ClCompile Include="rope.cpp" />
<ClCompile Include="rwm.cpp" />
<ClCompile Include="sensor.cpp" />
<ClCompile Include="serialize.cpp" />
<ClCompile Include="shadow.cpp" />
@ -289,11 +336,15 @@
<ClCompile Include="smartguard.cpp" />
<ClCompile Include="so.cpp" />
<ClCompile Include="spaprops.cpp" />
<ClCompile Include="speaker.cpp" />
<ClCompile Include="spire.cpp" />
<ClCompile Include="splicemap.cpp" />
<ClCompile Include="squish.cpp" />
<ClCompile Include="step.cpp" />
<ClCompile Include="stepguard.cpp" />
<ClCompile Include="suv.cpp" />
<ClCompile Include="sw.cpp" />
<ClCompile Include="tail.cpp" />
<ClCompile Include="tank.cpp" />
<ClCompile Include="target.cpp" />
<ClCompile Include="tn.cpp" />
@ -302,11 +353,19 @@
<ClCompile Include="util.cpp" />
<ClCompile Include="vec.cpp" />
<ClCompile Include="vis.cpp" />
<ClCompile Include="water.cpp" />
<ClCompile Include="waypoint.cpp" />
<ClCompile Include="wr.cpp" />
<ClCompile Include="xform.cpp" />
<ClCompile Include="zap.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\.gitignore" />
<None Include="..\README.md" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Sly1.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -258,6 +258,90 @@
<ClInclude Include="shadow.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="render.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="mecha.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="suv.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="cycle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="lgn.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="water.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="can.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="dartgun.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="alarm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="barrier.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="zap.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="mrkv.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="blip.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="light.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="tail.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="dysh.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="waypoint.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="speaker.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="rope.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pipe.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="rwm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wr.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="jsg.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="rail.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="landing.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="jump.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="spire.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="phasemem.cpp">
@ -503,10 +587,99 @@
<ClCompile Include="shadow.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="render.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mecha.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="suv.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="cycle.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="lgn.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="water.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="can.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dartgun.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="alarm.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="barrier.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="zap.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mrkv.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="blip.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="light.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="tail.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dysh.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="waypoint.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="speaker.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="rope.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pipe.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="rwm.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wr.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="jsg.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="rail.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="landing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="jump.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="spire.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\README.md">
<Filter>Resource Files</Filter>
</None>
<None Include="..\.gitignore">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Sly1.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

6
Sly1/alarm.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "alarm.h"
void InitAlarm(ALARM* palarm)
{
InitSo(palarm);
}

9
Sly1/alarm.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
#include "so.h"
class ALARM : public SO
{
public:
};
void InitAlarm(ALARM* palarm);

View File

@ -1,5 +1,21 @@
#include "alo.h"
void InitAlo(ALO* palo)
{
/*InitAloCounter++;
std::cout << InitAloCounter << "\n";*/
InitDl(&palo->dlChild, 0x1C + 0x28);
InitDl(&palo->dlFreeze, 0x64 + 0x28);
InitLo(palo);
palo->sCelBorderMRD = 2139095039;
palo->sMRD = 2139095039;
palo->grfzon = -1;
InitDl(&palo->dlAct, 0x8);
}
void RemoveAloHierarchy(ALO *palo)
{
DLI plo;
@ -28,7 +44,7 @@ void RemoveAloHierarchy(ALO *palo)
void OnAloAdd(ALO* palo)
{
ALO *parentObject = palo->paloParent;
if (parentObject == nullptr)
{
palo->paloRoot = palo;
@ -78,19 +94,6 @@ void ResolveAlo(ALO* palo)
}
void InitAlo(ALO* palo)
{
InitDl(&palo->dlChild, 0x1C);
InitDl(&palo->dlFreeze, 0x64);
InitLo(palo);
palo->sCelBorderMRD = 2139095039;
palo->sMRD = 2139095039;
palo->grfzon = -1;
InitDl(&palo->dlAct, 0x8);
}
void AddAloHierarchy(ALO* palo)
{
DLI plo;
@ -225,3 +228,28 @@ void UpdateAlo(ALO* palo, float dt)
{
}
void RenderAloAll(ALO* palo, CM* pcm, RO* proDup)
{
}
void RenderAloSelf(ALO* palo, CM* pcm, RO* pro)
{
}
void RenderAloGlobset(ALO* palo, CM* pcm, RO* pro)
{
}
void RenderAloLine(ALO* palo, CM* pcm, glm::vec3* ppos0, glm::vec3* ppos1, float rWidth, float uAlpha)
{
}
void RenderAloAsBone(ALO* palo, CM* pcm, RO* pro)
{
}

View File

@ -14,6 +14,12 @@ struct XF
glm::vec3 dv;
glm::vec3 dw;
};
struct RO
{
glm::mat4 mat;
float uAlpha;
float uAlphaCelBorder;
};
class ALO : public LO
{
@ -48,9 +54,11 @@ public:
int cposec;
};
static int InitAloCounter = 0;
// Initialize ALO object
void InitAlo(ALO* palo); // NOT FINISHED
// Adds ALO object to parent ALO object
// Adds alo parent and all the alo childs into the world
void AddAloHierarchy(ALO *palo); // NOT FINISHED
void RemoveAloHierarchy(ALO *palo); // NOT FINISHED
void OnAloAdd(ALO* palo); // NOT FINISHED
@ -61,4 +69,9 @@ void ResolveAlo(ALO *palo);
// Loads ALO object from binary file
void LoadAloFromBrx(ALO* palo, CBinaryInputStream* pbis);
void LoadAloAloxFromBrx(CBinaryInputStream* pbis);
void UpdateAlo(ALO *palo, float dt);
void UpdateAlo(ALO *palo, float dt);
void RenderAloAll(ALO* palo, CM* pcm, RO* proDup);
void RenderAloSelf(ALO* palo, CM* pcm, RO* pro);
void RenderAloGlobset(ALO* palo, CM* pcm, RO* pro);
void RenderAloLine(ALO* palo, CM* pcm, glm::vec3* ppos0, glm::vec3* ppos1, float rWidth, float uAlpha);
void RenderAloAsBone(ALO* palo, CM* pcm, RO* pro);

View File

@ -1,5 +1,10 @@
#include "aseg.h"
void InitAseg(ASEG* paseg)
{
InitLo(paseg);
}
void LoadAsegFromBrx(ASEG* paseg, CBinaryInputStream* pbis)
{
/*LoadAsegaCount++;

View File

@ -7,5 +7,7 @@ class ASEG : public LO
};
static int LoadAsegaCount;
void InitAseg(ASEG* paseg);
void LoadAsegFromBrx(ASEG* paseg, CBinaryInputStream* pbis);
void LoadAsegEventsFromBrx(CBinaryInputStream* pbis, int fFrame);

6
Sly1/barrier.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "barrier.h"
void InitBarrier(BARRIER* pbarrier)
{
InitSo(pbarrier);
}

9
Sly1/barrier.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
#include "so.h"
class BARRIER : public SO
{
public:
};
void InitBarrier(BARRIER* pbarrier);

13710
Sly1/basic.h

File diff suppressed because it is too large Load Diff

11
Sly1/blip.cpp Normal file
View File

@ -0,0 +1,11 @@
#include "blip.h"
void InitBlipg(BLIPG* pblipg)
{
InitAlo(pblipg);
}
void OnBlipgAdd(BLIPG* pblipg)
{
OnAloAdd(pblipg);
}

10
Sly1/blip.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
#include "alo.h"
class BLIPG : public ALO
{
public:
};
void InitBlipg(BLIPG* pblipg);
void OnBlipgAdd(BLIPG* pblipg);

View File

@ -1,5 +1,15 @@
#include "bomb.h"
void InitBomb(BOMB* pbomb)
{
InitSo(pbomb);
}
void OnBombAdd(BOMB* pbomb)
{
OnSoAdd(pbomb);
}
void LoadBombFromBrx(BOMB* pbomb, CBinaryInputStream* pbis)
{
LoadSoFromBrx(pbomb, pbis);

View File

@ -6,4 +6,6 @@ class BOMB : public SO
public:
};
void InitBomb(BOMB* pbomb);
void OnBombAdd(BOMB* pbomb);
void LoadBombFromBrx(BOMB* pbomb, CBinaryInputStream* pbis);

View File

@ -1,6 +1,21 @@
#include "break.h"
void InitBrk(BRK* pbrk)
{
InitSo(pbrk);
}
void InitBreak(BREAK* pbreak)
{
InitBrk(pbreak);
}
void InitFragile(FRAGILE* pfragile)
{
InitBrk(pfragile);
}
void LoadBrkFromBrx(BRK* pbrk, CBinaryInputStream* pbis)
{
LoadSoFromBrx(pbrk, pbis);
}
}

View File

@ -6,4 +6,17 @@ class BRK : public SO
public:
};
class BREAK : public BRK
{
public:
};
class FRAGILE : public BRK
{
public:
};
void InitBrk(BRK* pbrk);
void InitBreak(BREAK* pbreak);
void InitFragile(FRAGILE* pfragile);
void LoadBrkFromBrx(BRK* pbrk, CBinaryInputStream* pbis);

View File

@ -28,12 +28,10 @@ LO* PloNew(CID cid, SW* psw, ALO* paloParent, OID oid, int isplice)
localObject->psw = psw;
// Appending object to parent list
if (localObject->pvtlo->pfnInitLo != 0)
AppendDlEntry(PdlFromSwOid(localObject->psw, localObject->oid), localObject);
AppendDlEntry(PdlFromSwOid(localObject->psw, localObject->oid), localObject);
// GOTTA REMOVE THIS
if (localObject->pvtlo->pfnInitLo != 0)
localObject->pvtlo->pfnInitLo(localObject);
// Initializing local object
localObject->pvtlo->pfnInitLo(localObject);
return (LO*)localObject;
}
@ -53,13 +51,17 @@ void LoadSwObjectsFromBrx(SW *psw, ALO *paloParent, CBinaryInputStream *pbis)
int isplice = pbis->S16Read();
//std::cout << i << "\n";
LO *plo = PloNew(cid, psw, paloParent, oid, isplice);
/*if (cid == CID_MS)
std::cout << plo;*/
plo->pvtlo->pfnLoadLoFromBrx(plo, pbis);
}
}
DL* PdlFromSwOid(SW *psw, OID oid)
{
return psw->firstObjectParents + (oid * 0x95675 & 0x1ff);
return psw->adlHash + (oid * 0x95675 & 0x1ff);
}
void LoadOptionFromBrx(void* pvObject, CBinaryInputStream* pbis)

View File

@ -1,5 +1,15 @@
#include "button.h"
void InitButton(BUTTON* pbutton)
{
InitSo(pbutton);
}
void InitVolbtn(VOLBTN* pvolbtn)
{
InitSo(pvolbtn);
}
void LoadButtonFromBrx(BUTTON* pbutton, CBinaryInputStream* pbis)
{
LoadSoFromBrx(pbutton, pbis);

View File

@ -11,5 +11,7 @@ class VOLBTN : public SO
public:
};
void InitButton(BUTTON* pbutton);
void InitVolbtn(VOLBTN* pvolbtn);
void LoadButtonFromBrx(BUTTON *pbutton, CBinaryInputStream *pbis);
void LoadVolbtnFromBrx(VOLBTN *pvolbtn, CBinaryInputStream *pbis);

6
Sly1/can.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "can.h"
void InitCan(CAN* pcan)
{
InitBreak(pcan);
}

9
Sly1/can.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
#include "break.h"
class CAN : public BREAK
{
public:
};
void InitCan(CAN *pcan);

View File

@ -1,5 +1,10 @@
#include "chkpnt.h"
void InitChkpnt(CHKPNT* pchkpnt)
{
InitAlo(pchkpnt);
}
void LoadChkpntFromBrx(CHKPNT* pchkpnt, CBinaryInputStream* pbis)
{
LoadAloFromBrx(pchkpnt, pbis);

View File

@ -13,5 +13,6 @@ class VOL : public XFM
public:
};
void InitChkpnt(CHKPNT* pchkpnt);
void LoadChkpntFromBrx(CHKPNT* pchkpnt, CBinaryInputStream* pbis);
void LoadVolFromBrx(VOL* pvol, CBinaryInputStream* pbis);

View File

@ -30,4 +30,4 @@ public:
void InitCm(CM* pcm); // NOT FINISHED
// Global pointer to parent camera object
static CM *g_pcm;
extern inline CM *g_pcm = nullptr;

View File

@ -1,5 +1,10 @@
#include "cnvo.h"
void InitCnvo(CNVO* pcnvo)
{
InitSo(pcnvo);
}
void LoadCnvoFromBrx(CNVO* pcnvo, CBinaryInputStream* pbis)
{
LoadSoFromBrx(pcnvo, pbis);

View File

@ -6,5 +6,5 @@ class CNVO : public SO
public:
};
void InitCnvo(CNVO* pcnvo);
void LoadCnvoFromBrx(CNVO* pcnvo, CBinaryInputStream* pbis);

View File

@ -11,7 +11,27 @@ void InitDprize(DPRIZE *pdprize)
}
void InitCharm(CHARM* pcharm)
{
InitDprize(pcharm);
}
void InitCoin(COIN* pcoin)
{
InitDprize(pcoin);
}
void InitKey(KEY* pkey)
{
InitDprize(pkey);
}
void InitGold(GOLD* pgold)
{
InitDprize(pgold);
}
void LoadDprizeFromBrx(DPRIZE *pdprize, CBinaryInputStream *pbis)
{
LoadAloFromBrx((ALO*)pdprize, pbis);
LoadAloFromBrx(pdprize, pbis);
}

View File

@ -46,5 +46,29 @@ class DPRIZE : public ALO
float cAttract;
};
class CHARM : public DPRIZE
{
public:
};
class COIN : public DPRIZE
{
public:
};
class KEY : public DPRIZE
{
public:
};
class GOLD : public DPRIZE
{
public:
};
void InitDprize(DPRIZE *pdprize);//NOT FINISHED
void InitCharm(CHARM* pcharm);
void InitCoin(COIN* pcoin);
void InitKey(KEY* pkey);
void InitGold(GOLD* pgold);
void LoadDprizeFromBrx(DPRIZE* pdprize, CBinaryInputStream *pbis);//NOT FINISHED

View File

@ -4,3 +4,13 @@ void InitCrfodb(CRFODB* pcrfodb)
{
InitStepGuard(pcrfodb);
}
void OnCrfodAdd(CRFOD* pcrfod)
{
OnStepguardAdd(pcrfod);
}
void InitCrbrain(CRBRAIN* pcrbrain)
{
InitAlo(pcrbrain);
}

View File

@ -11,4 +11,11 @@ class CRFODB :public CRFOD
};
void InitCrfodb(CRFODB *pcrfodb);
class CRBRAIN : public ALO
{
};
void InitCrfodb(CRFODB *pcrfodb);
void OnCrfodAdd(CRFOD* pcrfod);
void InitCrbrain(CRBRAIN* pcrbrain);

6
Sly1/cycle.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "cycle.h"
void InitCycle(CYCLE* pcycle)
{
InitPo(pcycle);
}

9
Sly1/cycle.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
#include "po.h"
class CYCLE : public PO
{
public:
};
void InitCycle(CYCLE *pcycle);

View File

@ -1,5 +1,15 @@
#include "dart.h"
void InitDart(DART* pdart)
{
InitSo(pdart);
}
void OnDartAdd(DART* pdart)
{
OnSoAdd(pdart);
}
void LoadDartFromBrx(DART* pdart, CBinaryInputStream* pbis)
{
LoadSoFromBrx(pdart, pbis);

View File

@ -6,4 +6,6 @@ class DART : public SO
public:
};
void InitDart(DART* pdart);
void OnDartAdd(DART* pdart);
void LoadDartFromBrx(DART* pdart, CBinaryInputStream* pbis);

6
Sly1/dartgun.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "dartgun.h"
void InitDartgun(DARTGUN* pdartgun)
{
InitBreak(pdartgun);
}

9
Sly1/dartgun.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
#include "break.h"
class DARTGUN : public BREAK
{
public:
};
void InitDartgun(DARTGUN* pdartgun);

View File

@ -2,6 +2,8 @@
// Forward declarations
class CBinaryInputStream;
class ALO;
class CM;
struct RO;
extern bool loadEmitMesh;
@ -37,6 +39,9 @@ void CloneAloHierarchy(ALO* palo);
void CloneAlo(ALO* palo);
void LoadAloFromBrx(ALO* palo, CBinaryInputStream* pbis);
void UpdateAlo(ALO* palo, float dt);
void RenderAloAll(ALO* palo, CM* pcm, RO* proDup);
void RenderAloSelf(ALO* palo, CM* pcm, RO* pro);
void RenderAloGlobset(ALO* palo, CM* pcm, RO* pro);
// Static Object
class SO;
@ -49,6 +54,7 @@ void UpdateSo(SO* pso, float dt);
// Player Object
class PO;
void InitPo(PO* ppo);
void OnPoAdd(PO* ppo);
class STEP;
void InitStep(STEP* pstep);
@ -61,6 +67,7 @@ void LoadJtFromBrx(JT* pjt, CBinaryInputStream* pbis);
// Guard
class STEPGUARD;
void InitStepGuard(STEPGUARD *pstepguard);
void OnStepguardAdd(STEPGUARD* pstepguard);
void LoadStepGuardFromBrx(STEPGUARD *pstepguard, CBinaryInputStream* pbis);
class SMARTGUARD;
@ -85,6 +92,7 @@ void InitMurray(MURRAY* pmurray);
class PUFFC;
class CRFOD;
void OnCrfodAdd(CRFOD* pcrfod);
class CRFODB;
void InitCrfodb(CRFODB* pcrfodb);
@ -100,112 +108,281 @@ void InitJp(JP* pjp);
class HG;
void InitHg(HG* phg);
class MECHA;
void InitMecha(MECHA* pmecha);
class ROV;
void InitRov(ROV* prov);
void LoadRovFromBrx(ROV *prov, CBinaryInputStream* pbis);
class VAULT;
void InitVault(VAULT* pvault);
class PUFFER;
void InitPuffer(PUFFER* ppuffer);
void LoadPufferFromBrx(PUFFER *ppuffer, CBinaryInputStream* pbis);
class MGV;
void InitMgv(MGV* pmgv);
void LoadMgvFromBrx(MGV *pmgv, CBinaryInputStream* pbis);
class SUV;
void InitSuv(SUV* psuv);
class CYCLE;
void InitCycle(CYCLE* pcycle);
class LGN;
void InitLgn(LGN* plgn);
class JACK;
void InitJack(JACK* pjack);
class RIPG;
void InitRipg(RIPG* pripg);
class WATER;
void InitWater(WATER* pwater);
class BRK;
void InitBrk(BRK* pbrk);
void LoadBrkFromBrx(BRK *pbrk, CBinaryInputStream* pbis);
class BREAK;
void InitBreak(BREAK* pbreak);
class CAN;
void InitCan(CAN* pcan);
class DARTGUN;
void InitDartgun(DARTGUN* pdartgun);
class SWP;
void InitSwp(SWP* pswp);
class FRAGILE;
void InitFragile(FRAGILE* pfragile);
class BUTTON;
void InitButton(BUTTON* pbutton);
void LoadButtonFromBrx(BUTTON* pbutton, CBinaryInputStream* pbis);
class VOLBTN;
void InitVolbtn(VOLBTN* pvolbtn);
void LoadVolbtnFromBrx(VOLBTN* pvolbtn, CBinaryInputStream* pbis);
class JLOVOL;
void InitJlovol(JLOVOL* pjlovol);
class SQUISH;
void LoadSquishFromBrx(SQUISH* psquish, CBinaryInputStream* pbis);
class SPRIZE;
void InitSprize(SPRIZE* psprize);
void LoadSprizeFromBrx(SPRIZE* psprize, CBinaryInputStream* pbis);
class SCPRIZE;
void InitScprize(SCPRIZE* pscprize);
class CLUE;
void InitClue(CLUE* pclue);
void LoadClueFromBrx(CLUE* pclue, CBinaryInputStream* pbis);
class ALARM;
void InitAlarm(ALARM* palarm);
class SENSOR;
void InitSensor(SENSOR* psensor);
// Laser Sensor
class LASEN;
void InitLasen(LASEN* plasen);
void LoadLasenFromBrx(LASEN* plasen, CBinaryInputStream* pbis);
class CAMSEN;
void InitCamsen(CAMSEN* pcamsen);
class PRSEN;
void InitPrsen(PRSEN* pprsen);
class BARRIER;
void InitBarrier(BARRIER* pbarrier);
class TZP;
void InitTzp(TZP* ptzp);
class VOLZP;
void InitVolzp(VOLZP* pvolzp);
// Convo
class CNVO;
void InitCnvo(CNVO* pcnvo);
void LoadCnvoFromBrx(CNVO* pcnvo, CBinaryInputStream* pbis);
class HBSK;
void InitHbsk(HBSK* phbsk);
void OnHbskAdd(HBSK* phbsk);
void LoadHbskFromBrx(HBSK* phbsk, CBinaryInputStream* pbis);
class BOMB;
void InitBomb(BOMB* pbomb);
void OnBombAdd(BOMB* pbomb);
void LoadBombFromBrx(BOMB* pbomb, CBinaryInputStream* pbis);
class MISSILE;
void InitMissile(MISSILE* pmissile);
void LoadMissileFromBrx(MISSILE* pmissile, CBinaryInputStream* pbis);
class ACCMISS;
void InitAccmiss(ACCMISS* paccmiss);
class TARMISS;
void InitTarmiss(TARMISS* ptarmiss);
class GROUNDMISS;
void InitGroundmiss(GROUNDMISS* pgroundmiss);
class FLY;
void InitFly(FLY* pfly);
void LoadFlyFromBrx(FLY* pfly, CBinaryInputStream* pbis);
class RAT;
void InitRat(RAT* prat);
void OnRatAdd(RAT* prat);
void LoadRatFromBrx(RAT* prat, CBinaryInputStream* pbis);
class ROH;
void InitRoh(ROH* proh);
void LoadRohFromBrx(ROH* proh, CBinaryInputStream* pbis);
class ROC;
void InitRoc(ROC* proc);
void LoadRocFromBrx(ROC* proc, CBinaryInputStream* pbis);
class ROST;
void InitRost(ROST* prost);
void LoadRostFromBrx(ROST* prost, CBinaryInputStream* pbis);
class ROP;
void InitRop(ROP* prop);
void LoadRopFromBrx(ROP* prop, CBinaryInputStream* pbis);
class DART;
void InitDart(DART* pdart);
void OnDartAdd(DART* pdart);
void LoadDartFromBrx(DART* pdart, CBinaryInputStream* pbis);
class JLO;
void InitJlo(JLO* pjlo);
void LoadJloFromBrx(JLO* pjlo, CBinaryInputStream* pbis);
class MRKV;
void InitMrkv(MRKV* pmrkv);
class LGNB;
void InitLgnb(LGNB* plgnb);
class BLIPG;
void InitBlipg(BLIPG* pblipg);
void OnBlipgAdd(BLIPG* pblipg);
class CAMERA;
void InitCamera(CAMERA* pcamera);
class EMITTER;
void InitEmitter(EMITTER* pemitter);
void LoadEmitterFromBrx(EMITTER* pemitter, CBinaryInputStream* pbis);
class LIGHT;
void InitLight(LIGHT* plight);
void OnLightAdd(LIGHT* plight);
// Check Point
class CHKPNT;
void InitChkpnt(CHKPNT* pchkpnt);
void LoadChkpntFromBrx(CHKPNT* pchkpnt, CBinaryInputStream* pbis);
class PROXY;
void InitProxy(PROXY* pproxy);
void LoadProxyFromBrx(PROXY* pproxy, CBinaryInputStream* pbis);
class DPRIZE;
void InitDprize(DPRIZE* pdprize);
void LoadDprizeFromBrx(DPRIZE* pdprize, CBinaryInputStream* pbis);
class CHARM;
void InitCharm(CHARM* pcharm);
class COIN;
void InitCoin(COIN* pcoin);
class KEY;
void InitKey(KEY* pkey);
class GOLD;
void InitGold(GOLD* pgold);
class LOCK;
void LoadLockFromBrx(LOCK* plock, CBinaryInputStream* pbis);
class LOCKG;
void LoadLockgFromBrx(LOCKG* plockg, CBinaryInputStream* pbis);
class TAIL;
void InitTail(TAIL* ptail);
class ROB;
void InitRob(ROB* prob);
class FLASH;
void InitFlash(FLASH* pflash);
void LoadFlashFromBrx(FLASH* pflash, CBinaryInputStream* pbis);
class DYSH;
void InitDysh(DYSH* pdysh);
class SCENTMAP;
void InitScentmap(SCENTMAP* pscentmap);
class WAYPOINT;
void InitWaypoint(WAYPOINT* pwaypoint);
class TN;
void InitTn(TN* ptn);
void LoadTnFromBrx(TN* ptn, CBinaryInputStream* pbis);
void LoadTbspFromBrx(CBinaryInputStream* pbis);
class JLOC;
void InitJloc(JLOC* pjloc);
void LoadJlocFromBrx(JLOC* pjloc, CBinaryInputStream* pbis);
class DIALOG;
void InitDialog(DIALOG* pdialog);
void LoadDialogFromBrx(DIALOG* pdialog, CBinaryInputStream* pbis);
class SPEAKER;
void InitSpeaker(SPEAKER* pspeaker);
class ROPE;
void InitRope(ROPE* prope);
class CRBRAIN;
void InitCrbrain(CRBRAIN* pcrbrain);
class MGC;
void InitMgc(MGC* pmgc);
void LoadMgcFromBrx(MGC* pmgc, CBinaryInputStream* pbis);
class JACKB;
void InitJackb(JACKB* pjackb);
class JACKN;
void InitJackn(JACKN* pjackn);
void LoadJacknFromBrx(JACKN* pjackn, CBinaryInputStream* pbis);
class JACKF;
void InitJackf(JACKF* pjackf);
// Static World
class SW;
void InitSw(SW* psw);
@ -214,38 +391,80 @@ void UpdateSw(SW* psw, float dt);
void GetSwParams(SW* psw, SOP** ppsop);
// Camera
class CM;
void InitCm(CM* pcm);
class SHAPE;
void InitShape(SHAPE* pshape);
void LoadShapeFromBrx(SHAPE* pshape, CBinaryInputStream* pbis);
class HSHAPE;
void InitHshape(HSHAPE* phshape);
void OnHshapeAdd(HSHAPE* phshape);
class PIPE;
void InitPipe(PIPE* ppipe);
void OnPipeAdd(PIPE* ppipe);
void OnPipeRemove(PIPE* ppipe);
class RAIL;
void OnRailAdd(RAIL* prail);
class LANDING;
void OnLandingAdd(LANDING* planding);
class XFM;
void InitXfm(XFM* pxfm);
void LoadXfmFromBrx(XFM* pxfm, CBinaryInputStream* pbis);
class WARP;
void LoadWarpFromBrx(WARP* pwarp, CBinaryInputStream* pbis);
class TARGET;
void InitTarget(TARGET* ptarget);
void OnTargetAdd(TARGET* ptarget);
class HND;
void InitHnd(HND* phnd);
void LoadHndFromBrx(HND* phnd, CBinaryInputStream* pbis);
class EXPLG;
void LoadExplgFromBrx(EXPLG* pexplg, CBinaryInputStream* pbis);
class EXPLO;
void InitExplo(EXPLO* pexplo);
void LoadExploFromBrx(EXPLO* pexplo, CBinaryInputStream* pbis);
class EXPLS;
void InitExpls(EXPLS* pexpls);
class VOL;
void LoadVolFromBrx(VOL* pvol, CBinaryInputStream* pbis);
class RATHOLE;
void OnRatholeAdd(RATHOLE* prathole);
class PUFFV;
void InitPuffv(PUFFV* ppuffv);
class EXIT;
void LoadExitFromBrx(EXIT* pexit, CBinaryInputStream* pbis);
class PNT;
void LoadPntFromBrx(PNT* pnt, CBinaryInputStream* pbis);
class HPNT;
void InitHpnt(HPNT* phpnt);
void OnHpntAdd(HPNT* phpnt);
class JMT;
void OnJmtAdd(JMT* pjmt);
class SPIRE;
void OnSpireAdd(SPIRE* pspire);
// Animation Segment
class ASEG;
void InitAseg(ASEG* paseg);
void LoadAsegFromBrx(ASEG* paseg, CBinaryInputStream* pbis);
// Visibility Map
@ -256,17 +475,31 @@ void LoadVismapFromBrx(VISMAP* pvismap, CBinaryInputStream* pbis);
class SM;
void LoadSmFromBrx(SM* psm, CBinaryInputStream* pbis);
class SGG;
void InitSgg(SGG* psgg);
// AI Path's
class PATHZONE;
void OnPathzoneAdd(PATHZONE* ppathzone);
void LoadPathZoneFromBrx(PATHZONE* ppathzone, CBinaryInputStream* pbis);
// Reach Map
class RCHM;
void InitRchm(RCHM* prchm);
void LoadRchmFromBrx(RCHM* prchm, CBinaryInputStream* pbis);
class RWM;
void InitRwm(RWM* prwm);
class WR;
void InitWr(WR* pwr);
class KEYHOLE;
void InitKeyhole(KEYHOLE* pkeyhole);
void LoadKeyholeFromBrx(KEYHOLE* pkeyhole, CBinaryInputStream* pbis);
class JSG;
void InitJsg(JSG* pjsg);

View File

@ -1,5 +1,10 @@
#include "dialog.h"
void InitDialog(DIALOG* pdialog)
{
InitAlo(pdialog);
}
void LoadDialogFromBrx(DIALOG* pdialog, CBinaryInputStream* pbis)
{
LoadAloFromBrx(pdialog, pbis);

View File

@ -6,5 +6,6 @@ class DIALOG : public ALO
public:
};
void InitDialog(DIALOG* pdialog);
void LoadDialogFromBrx(DIALOG* pdialog, CBinaryInputStream* pbis);
void LoadDialogEventsFromBrx(CBinaryInputStream *pbis);

View File

@ -9,6 +9,7 @@ struct DL
void *pvFirst;
class LO *ploFirst;
class ALO *paloFirst;
class SO *psoFirst;
};
union
@ -17,6 +18,7 @@ struct DL
void *pvLast;
class LO *ploLast;
class ALO *paloLast;
class SO *psoLast;
};
// Base offset to DL entry (DLE)
@ -28,10 +30,23 @@ struct DL
// Entry is just another word for linked list
struct DLE
{
// Stores ptr to next data
void *pvNext;
// Stores ptr to previous data
void *pvPrev;
union
{
// Stores ptr to next data
void* pvNext;
class LO* ploNext;
class ALO *paloNext;
class SO *psoNext;
};
union
{
// Stores ptr to previous data
void *pvPrev;
class LO *ploPrev;
class ALO *paloPrev;
class SO *psoPrev;
};
};
@ -69,4 +84,4 @@ int FIsDlEmpty(DL *pdl);
// Global DLI pointer to a parent object
static DLI *s_pdliFirst;
static DLI *s_pdliFirst = nullptr;

6
Sly1/dysh.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "dysh.h"
void InitDysh(DYSH* pdysh)
{
InitAlo(pdysh);
}

9
Sly1/dysh.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
#include "alo.h"
class DYSH : public ALO
{
public:
};
void InitDysh(DYSH* pdysh);

View File

@ -1,5 +1,20 @@
#include "emitter.h"
void InitExplo(EXPLO* pexplo)
{
InitXfm(pexplo);
}
void InitEmitter(EMITTER* pemitter)
{
InitAlo(pemitter);
}
void InitExpls(EXPLS* pexpls)
{
InitExplo(pexpls);
}
void LoadEmitMeshFromBrx(CBinaryInputStream* pbis)
{
uint16_t cpos = pbis->U16Read();

View File

@ -27,6 +27,14 @@ class EXPLO : public EXPL
OID oidShape;
};
class EXPLS : public EXPLO
{
public:
};
void InitExplo(EXPLO* pexplo);
void InitEmitter(EMITTER* pemitter);
void InitExpls(EXPLS* pexpls);
void LoadEmitMeshFromBrx(CBinaryInputStream* pbis);
void LoadEmitblipColorsFromBrx(int crgba, CBinaryInputStream* pbis);
void LoadEmitterFromBrx(EMITTER* pemitter, CBinaryInputStream* pbis);

View File

@ -1,5 +1,10 @@
#include "flash.h"
void InitFlash(FLASH* pflash)
{
InitAlo(pflash);
}
void LoadFlashFromBrx(FLASH* pflash, CBinaryInputStream* pbis)
{
LoadAloFromBrx(pflash, pbis);

View File

@ -8,4 +8,5 @@ class FLASH : public ALO
public:
};
void InitFlash(FLASH* pflash);
void LoadFlashFromBrx(FLASH* pflash, CBinaryInputStream* pbis);

View File

@ -1,5 +1,10 @@
#include "fly.h"
void InitFly(FLY* pfly)
{
InitSo(pfly);
}
void LoadFlyFromBrx(FLY* pfly, CBinaryInputStream* pbis)
{
LoadSoFromBrx(pfly, pbis);

View File

@ -6,4 +6,5 @@ class FLY : public SO
public:
};
void InitFly(FLY* pfly);
void LoadFlyFromBrx(FLY* pfly, CBinaryInputStream* pbis);

View File

@ -1,5 +1,35 @@
#include "hide.h"
void InitHbsk(HBSK* phbsk)
{
InitSo(phbsk);
}
void OnHbskAdd(HBSK* phbsk)
{
OnSoAdd(phbsk);
}
void InitHshape(HSHAPE* phshape)
{
InitShape(phshape);
}
void OnHshapeAdd(HSHAPE* phshape)
{
OnLoAdd(phshape);
}
void InitHpnt(HPNT* phpnt)
{
InitLo(phpnt);
}
void OnHpntAdd(HPNT* phpnt)
{
OnLoAdd(phpnt);
}
void LoadHbskFromBrx(HBSK* phbsk, CBinaryInputStream* pbis)
{
LoadSoFromBrx(phbsk, pbis);

View File

@ -1,9 +1,27 @@
#pragma once
#include "so.h"
#include "shape.h"
#include "pnt.h"
class HBSK : public SO
{
public:
};
class HSHAPE : public SHAPE
{
public:
};
class HPNT : public PNT
{
public:
};
void InitHbsk(HBSK* phbsk);
void OnHbskAdd(HBSK* phbsk);
void InitHshape(HSHAPE* phshape);
void OnHshapeAdd(HSHAPE* phshape);
void InitHpnt(HPNT* phpnt);
void OnHpntAdd(HPNT* phpnt);
void LoadHbskFromBrx(HBSK* phbsk, CBinaryInputStream* pbis);

View File

@ -1,5 +1,10 @@
#include "hnd.h"
void InitHnd(HND* phnd)
{
InitTarget(phnd);
}
void LoadHndFromBrx(HND* phnd, CBinaryInputStream* pbis)
{
LoadXfmFromBrx(phnd, pbis);

View File

@ -6,4 +6,5 @@ class HND : public TARGET
public:
};
void InitHnd(HND* phnd);
void LoadHndFromBrx(HND* phnd, CBinaryInputStream* pbis);

View File

@ -1,5 +1,25 @@
#include "jack.h"
void InitJack(JACK* pjack)
{
InitPo(pjack);
}
void InitJackb(JACKB* pjackb)
{
InitAlo(pjackb);
}
void InitJackn(JACKN* pjackn)
{
InitAlo(pjackn);
}
void InitJackf(JACKF* pjackf)
{
InitAlo(pjackf);
}
void LoadJacknFromBrx(JACKN* pjackn, CBinaryInputStream* pbis)
{
LoadAloFromBrx(pjackn, pbis);

View File

@ -1,9 +1,27 @@
#pragma once
#include "alo.h"
#include "po.h"
class JACK : public PO
{
public:
};
class JACKN : public ALO
{
public:
};
class JACKB : public ALO
{
public:
};
class JACKF : public ALO
{
public:
};
void InitJack(JACK *pjack);
void InitJackb(JACKB* pjackb);
void InitJackn(JACKN* pjackn);
void InitJackf(JACKF* pjackf);
void LoadJacknFromBrx(JACKN* pjackn, CBinaryInputStream* pbis);

View File

@ -1,8 +1,22 @@
#include "jlo.h"
void InitJlovol(JLOVOL* pjlovol)
{
InitVolbtn(pjlovol);
}
void InitJlo(JLO* pjlo)
{
InitSo(pjlo);
}
void InitJloc(JLOC* pjloc)
{
InitAlo(pjloc);
}
void LoadJloFromBrx(JLO* pjlo, CBinaryInputStream* pbis)
{
//std::cout << std::hex << pbis->file.tellg() <<"\n";
LoadSoFromBrx(pjlo, pbis);
}

View File

@ -1,5 +1,5 @@
#pragma once
#include "so.h"
#include "button.h"
class JLO : public SO
{
@ -11,5 +11,13 @@ class JLOC : public ALO
public:
};
class JLOVOL : public VOLBTN
{
public:
};
void InitJlovol(JLOVOL* pjlovol);
void InitJlo(JLO* pjlo);
void InitJloc(JLOC* pjloc);
void LoadJloFromBrx(JLO* pjlo, CBinaryInputStream* pbis);
void LoadJlocFromBrx(JLOC* pjloc, CBinaryInputStream* pbis);

6
Sly1/jsg.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "jsg.h"
void InitJsg(JSG* pjsg)
{
InitLo(pjsg);
}

9
Sly1/jsg.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
#include "lo.h"
class JSG : public LO
{
public:
};
void InitJsg(JSG* pjsg);

6
Sly1/jump.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "jump.h"
void OnJmtAdd(JMT* pjmt)
{
OnLoAdd(pjmt);
}

9
Sly1/jump.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
#include "pnt.h"
class JMT : public PNT
{
public:
};
void OnJmtAdd(JMT* pjmt);

6
Sly1/landing.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "landing.h"
void OnLandingAdd(LANDING* planding)
{
OnLoAdd(planding);
}

9
Sly1/landing.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
#include "shape.h"
class LANDING : public SHAPE
{
public:
};
void OnLandingAdd(LANDING* planding);

16
Sly1/lgn.cpp Normal file
View File

@ -0,0 +1,16 @@
#include "lgn.h"
void InitLgn(LGN* plgn)
{
InitPo(plgn);
}
void InitLgnb(LGNB* plgnb)
{
InitSo(plgnb);
}
void InitSwp(SWP* pswp)
{
InitBreak(pswp);
}

22
Sly1/lgn.h Normal file
View File

@ -0,0 +1,22 @@
#pragma once
#include "po.h"
#include "break.h"
class LGN : public PO
{
public:
};
class LGNB : public SO
{
public:
};
class SWP : public BREAK
{
public:
};
void InitLgn(LGN* plgn);
void InitLgnb(LGNB* plgnb);
void InitSwp(SWP* pswp);

11
Sly1/light.cpp Normal file
View File

@ -0,0 +1,11 @@
#include "light.h"
void InitLight(LIGHT* plight)
{
InitAlo(plight);
}
void OnLightAdd(LIGHT* plight)
{
OnAloAdd(plight);
}

10
Sly1/light.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
#include "alo.h"
class LIGHT : public ALO
{
public:
};
void InitLight(LIGHT* plight);
void OnLightAdd(LIGHT* plight);

View File

@ -1,9 +1,9 @@
#include "lo.h"
void InitLo(LO* parentLo)
void InitLo(LO* plo)
{
SetLoDefaults(parentLo);
parentLo->pvtlo->pfnAddLo(parentLo);
plo->pvtlo->pfnSetLoDefaults(plo);
plo->pvtlo->pfnAddLo(plo);
}
void SetLoDefaults(LO* parentLo)

View File

@ -16,7 +16,11 @@ int main(int cphzArgs, char* aphzArgs[])
// Loads level
g_transition.Execute();
}
if (g_psw != nullptr)
{
RenderSw(g_psw, g_pcm);
}
}
return 0;
}

View File

@ -1,9 +1,10 @@
#pragma once
#include <iostream>
#include "gl.h"
#include "transition.h"
int main(int cphzArgs, char* aphzArgs[]);
void RenderSw(SW* psw, CM* pcm);
int main(int cphzArgs, char* aphzArgs[]);
// Initializing all the things needed for the game to run
void Startup();

View File

@ -10,6 +10,11 @@ void InitBhg(BHG *pbhg)
InitStepGuard((STEPGUARD*)pbhg);
}
void InitScentmap(SCENTMAP* pscentmap)
{
InitAlo(pscentmap);
}
void LoadMbgFromBrx(MBG* pmbg, CBinaryInputStream* pbis)
{
LoadStepGuardFromBrx(pmbg, pbis);

View File

@ -6,6 +6,12 @@ class MBG : public STEPGUARD
public:
};
class SCENTMAP : public ALO
{
public:
};
void InitMbg(MBG* pmbg);
void InitBhg(BHG* pbhg);
void InitScentmap(SCENTMAP* pscentmap);
void LoadMbgFromBrx(MBG *pmbg, CBinaryInputStream *pbis);

6
Sly1/mecha.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "mecha.h"
void InitMecha(MECHA* pmecha)
{
InitStep(pmecha);
}

9
Sly1/mecha.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
#include "step.h"
class MECHA : public STEP
{
};
void InitMecha(MECHA* pmecha);

View File

@ -1,5 +1,25 @@
#include "missile.h"
void InitMissile(MISSILE* pmissile)
{
InitBomb(pmissile);
}
void InitAccmiss(ACCMISS* paccmiss)
{
InitMissile(paccmiss);
}
void InitTarmiss(TARMISS* ptarmiss)
{
InitAccmiss(ptarmiss);
}
void InitGroundmiss(GROUNDMISS* pgroundmiss)
{
InitMissile(pgroundmiss);
}
void LoadMissileFromBrx(MISSILE* pmissile, CBinaryInputStream* pbis)
{
LoadBombFromBrx(pmissile, pbis);

View File

@ -6,4 +6,23 @@ class MISSILE : public BOMB
public:
};
class ACCMISS : public MISSILE
{
public:
};
class TARMISS : public ACCMISS
{
public:
};
class GROUNDMISS : public MISSILE
{
public:
};
void InitMissile(MISSILE* pmissile);
void InitAccmiss(ACCMISS* paccmiss);
void InitTarmiss(TARMISS* ptarmiss);
void InitGroundmiss(GROUNDMISS* pgroundmiss);
void LoadMissileFromBrx(MISSILE* pmissile, CBinaryInputStream* pbis);

View File

@ -1,5 +1,15 @@
#include "mouthgame.h"
void InitMgc(MGC* pmgc)
{
InitAlo(pmgc);
}
void InitMgv(MGV* pmgv)
{
InitPo(pmgv);
}
void LoadMgcFromBrx(MGC* pmgc, CBinaryInputStream* pbis)
{
LoadAloFromBrx(pmgc, pbis);

View File

@ -1,9 +1,17 @@
#pragma once
#include "alo.h"
#include "po.h"
class MGC : public ALO
{
public:
};
class MGV : public PO
{
public:
};
void InitMgc(MGC* pmgc);
void InitMgv(MGV *pmgv);
void LoadMgcFromBrx(MGC* pmgc, CBinaryInputStream* pbis);

6
Sly1/mrkv.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "mrkv.h"
void InitMrkv(MRKV* pmrkv)
{
InitSo(pmrkv);
}

10
Sly1/mrkv.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
#include "so.h"
class MRKV : public SO
{
public:
};
void InitMrkv(MRKV* pmrkv);

View File

@ -1,5 +1,10 @@
#include "path.h"
void OnPathzoneAdd(PATHZONE* ppathzone)
{
OnLoAdd(ppathzone);
}
void LoadPathZoneFromBrx(PATHZONE* ppathzone, CBinaryInputStream* pbis)
{
LoadLoFromBrx(ppathzone, pbis);

View File

@ -6,4 +6,5 @@ class PATHZONE : public LO
public:
};
void OnPathzoneAdd(PATHZONE* ppathzone);
void LoadPathZoneFromBrx(PATHZONE* ppathzone, CBinaryInputStream* pbis);

16
Sly1/pipe.cpp Normal file
View File

@ -0,0 +1,16 @@
#include "pipe.h"
void InitPipe(PIPE* ppipe)
{
InitShape(ppipe);
}
void OnPipeAdd(PIPE* ppipe)
{
OnLoAdd(ppipe);
}
void OnPipeRemove(PIPE* ppipe)
{
OnLoRemove(ppipe);
}

11
Sly1/pipe.h Normal file
View File

@ -0,0 +1,11 @@
#pragma once
#include "shape.h"
class PIPE : public SHAPE
{
public:
};
void InitPipe(PIPE* ppipe);
void OnPipeAdd(PIPE* ppipe);
void OnPipeRemove(PIPE* ppipe);

View File

@ -4,3 +4,8 @@ void InitPo(PO* ppo)
{
InitSo(ppo);
}
void OnPoAdd(PO* ppo)
{
OnSoAdd(ppo);
}

View File

@ -4,11 +4,7 @@
class PO : public SO
{
public:
int fPlayable;
int fLockBase;
glm::vec3 posBasePrev;
float tWakeRipple;
ALO *paloUseCharm;
};
void InitPo(PO *ppo);//NOT FINISHED
void InitPo(PO *ppo);//NOT FINISHED
void OnPoAdd(PO* ppo);

View File

@ -8,6 +8,9 @@ void InitProxy(PROXY *pproxy)
void LoadProxyFromBrx(PROXY *pproxy, CBinaryInputStream* pbis)
{
//LoadProxyFromBrxCount++;
//std::cout << LoadProxyFromBrxCount << "\n";
pbis->ReadMatrix();
pbis->ReadVector();

View File

@ -11,5 +11,7 @@ class PROXY : public ALO
DLE dleProxy;
};
static int LoadProxyFromBrxCount = 0;
void InitProxy(PROXY *pproxy);
void LoadProxyFromBrx(PROXY *pproxy, CBinaryInputStream *pbis);

View File

@ -1,5 +1,15 @@
#include "puffer.h"
void InitPuffer(PUFFER* ppuffer)
{
InitPo(ppuffer);
}
void InitPuffv(PUFFV* ppuffv)
{
InitXfm(ppuffv);
}
void LoadPufferFromBrx(PUFFER *ppuffer, CBinaryInputStream *pbis)
{
LoadSoFromBrx(ppuffer, pbis);

View File

@ -1,5 +1,6 @@
#pragma once
#include "po.h"
#include "chkpnt.h"
class PUFFER : public PO
{
@ -7,4 +8,11 @@ class PUFFER : public PO
};
class PUFFV : public VOL
{
public:
};
void InitPuffer(PUFFER *ppuffer);
void InitPuffv(PUFFV* ppuffv);
void LoadPufferFromBrx(PUFFER *ppuffer, CBinaryInputStream *pbis);

View File

@ -1,5 +1,25 @@
#include "pzo.h"
void InitVault(VAULT* pvault)
{
InitPo(pvault);
}
void InitSprize(SPRIZE* psprize)
{
InitSo(psprize);
}
void InitScprize(SCPRIZE* pscprize)
{
InitSprize(pscprize);
}
void InitClue(CLUE* pclue)
{
InitSprize(pclue);
}
void LoadSprizeFromBrx(SPRIZE* psprize, CBinaryInputStream* pbis)
{
LoadSoFromBrx(psprize, pbis);

View File

@ -1,5 +1,5 @@
#pragma once
#include "so.h"
#include "po.h"
class SPRIZE : public SO
{
@ -22,7 +22,21 @@ class LOCKG : public ALO
public:
};
class VAULT : public PO
{
public:
};
class SCPRIZE : public SPRIZE
{
public:
};
void InitVault(VAULT* pvault);
void InitSprize(SPRIZE* psprize);
void InitScprize(SCPRIZE* pscprize);
void InitClue(CLUE* pclue);
void LoadSprizeFromBrx(SPRIZE *psprize, CBinaryInputStream *pbis);
void LoadClueFromBrx(CLUE *pclue, CBinaryInputStream *pbis);
void LoadLockFromBrx(LOCK* plock, CBinaryInputStream* pbis);
void LoadLockgFromBrx(LOCKG* plockg, CBinaryInputStream* pbis);
void LoadLockgFromBrx(LOCKG* plockg, CBinaryInputStream* pbis);

6
Sly1/rail.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "rail.h"
void OnRailAdd(RAIL* prail)
{
OnLoAdd(prail);
}

10
Sly1/rail.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
#include "shape.h"
class RAIL : public SHAPE
{
public:
};
void OnRailAdd(RAIL* prail);

View File

@ -1,5 +1,20 @@
#include "rat.h"
void InitRat(RAT* prat)
{
InitSo(prat);
}
void OnRatAdd(RAT* prat)
{
OnSoAdd(prat);
}
void OnRatholeAdd(RATHOLE* prathole)
{
OnLoAdd(prathole);
}
void LoadRatFromBrx(RAT* prat, CBinaryInputStream* pbis)
{
LoadSoFromBrx(prat, pbis);

View File

@ -1,10 +1,19 @@
#pragma once
#include "so.h"
#include "chkpnt.h"
class RAT : public SO
{
public:
};
class RATHOLE : public VOL
{
public:
};
void InitRat(RAT* prat);
void OnRatAdd(RAT* prat);
void OnRatholeAdd(RATHOLE* prathole);
void LoadRatFromBrx(RAT* prat, CBinaryInputStream* pbis);

View File

@ -1,5 +1,10 @@
#include "rchm.h"
void InitRchm(RCHM* prchm)
{
InitLo(prchm);
}
void LoadRchmFromBrx(RCHM* prchm, CBinaryInputStream* pbis)
{
for (int i = 0; i <= 0x17; i++)

View File

@ -6,4 +6,5 @@ class RCHM : public LO
public:
};
void InitRchm(RCHM* prchm);
void LoadRchmFromBrx(RCHM* prchm, CBinaryInputStream* pbis);

Some files were not shown because too many files have changed in this diff Show More