This commit is contained in:
parent
a0355ecfea
commit
291914a0cc
3 changed files with 56 additions and 45 deletions
|
@ -248,52 +248,52 @@ typedef u32 sOT;
|
|||
|
||||
// Extra prims :o)
|
||||
#define GetPrimTF3() GetPrim(TPOLY_F3);\
|
||||
setTPolyF3(CurrPrim-sizeof(TPOLY_F3))
|
||||
setTPolyF3((TPOLY_F3*)CurrPrim-sizeof(TPOLY_F3))
|
||||
|
||||
#define GetPrimTF4() GetPrim(TPOLY_F4);\
|
||||
setTPolyF4(CurrPrim-sizeof(TPOLY_F4))
|
||||
setTPolyF4((TPOLY_F4*)CurrPrim-sizeof(TPOLY_F4))
|
||||
|
||||
#define GetPrimTG3() GetPrim(TPOLY_G3);\
|
||||
setTPolyG3(CurrPrim-sizeof(TPOLY_G3))
|
||||
setTPolyG3((TPOLY_G3*)CurrPrim-sizeof(TPOLY_G3))
|
||||
|
||||
#define GetPrimTG4() GetPrim(TPOLY_G4);\
|
||||
setTPolyG4(CurrPrim-sizeof(TPOLY_G4))
|
||||
setTPolyG4((TPOLY_G4*)CurrPrim-sizeof(TPOLY_G4))
|
||||
|
||||
#define GetPrimTLF2() GetPrim(TLINE_F2); \
|
||||
setTLineF2(CurrPrim-sizeof(TLINE_F2))
|
||||
setTLineF2((TLINE_F2*)CurrPrim-sizeof(TLINE_F2))
|
||||
|
||||
#define GetPrimTLF3() GetPrim(TLINE_F3);\
|
||||
setTLineF3(CurrPrim-sizeof(TLINE_F3))
|
||||
setTLineF3((TLINE_F3*)CurrPrim-sizeof(TLINE_F3))
|
||||
|
||||
#define GetPrimTLF4() GetPrim(TLINE_F4);\
|
||||
setTLineF4((TLINE_F4*)CurrPrim-1)
|
||||
|
||||
#define GetPrimTLG2() GetPrim(TLINE_G2);\
|
||||
setTLineG2(CurrPrim-sizeof(TLINE_G2))
|
||||
setTLineG2((TLINE_G2*)CurrPrim-sizeof(TLINE_G2))
|
||||
|
||||
#define GetPrimTLG3() GetPrim(TLINE_G3);\
|
||||
setTLineG3(CurrPrim-sizeof(TLINE_G3))
|
||||
setTLineG3((TLINE_G3*)CurrPrim-sizeof(TLINE_G3))
|
||||
|
||||
#define GetPrimTLG4() GetPrim(TLINE_G4);\
|
||||
setTLineG4(CurrPrim-sizeof(TLINE_G4))
|
||||
setTLineG4((TLINE_G4*)CurrPrim-sizeof(TLINE_G4))
|
||||
|
||||
#define GetPrimTSPRT8() GetPrim(TSPRT8);\
|
||||
setTSprt8(CurrPrim-sizeof(TSPRT8))
|
||||
setTSprt8((TSPRT8*)CurrPrim-sizeof(TSPRT8))
|
||||
|
||||
#define GetPrimTSPRT16() GetPrim(TSPRT16);\
|
||||
setTSprt16(CurrPrim-sizeof(TSPRT16))
|
||||
setTSprt16((TSPRT16*)CurrPrim-sizeof(TSPRT16))
|
||||
|
||||
#define GetPrimTSPRT() GetPrim(TSPRT);\
|
||||
setTSprt(CurrPrim-sizeof(TSPRT))
|
||||
setTSprt((TSPRT*)CurrPrim-sizeof(TSPRT))
|
||||
|
||||
#define GetPrimTTILE8() GetPrim(TTILE8);\
|
||||
setTile(CurrPrim-sizeof(TTILE8))
|
||||
setTile((TTILE8*)CurrPrim-sizeof(TTILE8))
|
||||
|
||||
#define GetPrimTTILE16() GetPrim(TTILE16);\
|
||||
setTile(CurrPrim-sizeof(TTILE16))
|
||||
setTile((TTILE16*)CurrPrim-sizeof(TTILE16))
|
||||
|
||||
#define GetPrimTTILE() GetPrim(TTILE);\
|
||||
setTile(CurrPrim-sizeof(TTILE))
|
||||
setTile((TTILE*)CurrPrim-sizeof(TTILE))
|
||||
|
||||
|
||||
/********************************************************************************************************/
|
||||
|
|
|
@ -1092,6 +1092,16 @@ DVECTOR const &CamPos=CLevel::getCameraPos();
|
|||
#endif
|
||||
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
void CThing::calcRenderPos(DVECTOR const &Pos,DVECTOR &renderPos)
|
||||
{
|
||||
DVECTOR const &CamPos=CLevel::getCameraPos();
|
||||
|
||||
renderPos.vx = Pos.vx - CamPos.vx;
|
||||
renderPos.vy = Pos.vy - CamPos.vy;
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
#ifdef SHOW_BBOX
|
||||
#include "gfx\prim.h"
|
||||
|
|
|
@ -51,50 +51,50 @@ class CThing;
|
|||
class CThingManager
|
||||
{
|
||||
public:
|
||||
static void init();
|
||||
static void shutdown();
|
||||
static void killAllThingsForRespawn();
|
||||
static void init();
|
||||
static void shutdown();
|
||||
static void killAllThingsForRespawn();
|
||||
|
||||
static void initAllThings();
|
||||
static void thinkAllThings(int _frames);
|
||||
static void renderAllThings();
|
||||
static void processEventAllThings(GAME_EVENT _event,CThing *_sourceThing);
|
||||
static void initAllThings();
|
||||
static void thinkAllThings(int _frames);
|
||||
static void renderAllThings();
|
||||
static void processEventAllThings(GAME_EVENT _event,CThing *_sourceThing);
|
||||
|
||||
static CThing* checkCollisionAreaAgainstThings(CRECT *_area,int _type,int _continue);
|
||||
static void initCollision();
|
||||
static void matchWheelsAndWeights();
|
||||
static void matchPressureSwitches();
|
||||
static void matchGaryTriggers();
|
||||
static CThing *checkCollisionAreaAgainstThings(CRECT *_area,int _type,int _continue);
|
||||
static void initCollision();
|
||||
static void matchWheelsAndWeights();
|
||||
static void matchPressureSwitches();
|
||||
static void matchGaryTriggers();
|
||||
|
||||
static sBBox &getRenderBBox() {return(m_RenderBBox);}
|
||||
static sBBox &getThinkBBox() {return(m_ThinkBBox);}
|
||||
static sBBox &getRenderBBox() {return(m_RenderBBox);}
|
||||
static sBBox &getThinkBBox() {return(m_ThinkBBox);}
|
||||
|
||||
protected:
|
||||
static void initList(CThing **List);
|
||||
static void addToThingList(CThing *_this);
|
||||
static void removeFromThingList(CThing *_this);
|
||||
static void initList(CThing **List);
|
||||
static void addToThingList(CThing *_this);
|
||||
static void removeFromThingList(CThing *_this);
|
||||
|
||||
static void addToCollisionList(CThing *_this);
|
||||
static void addToCollisionList(CThing *_this);
|
||||
|
||||
friend class CThing;
|
||||
|
||||
private:
|
||||
static CThing *s_thingLists[];
|
||||
static int s_initialised;
|
||||
static CThing *s_thingLists[];
|
||||
static int s_initialised;
|
||||
|
||||
static CThing *s_CollisionLists[];
|
||||
static sBBox m_RenderBBox;
|
||||
static sBBox m_ThinkBBox;
|
||||
static CThing *s_CollisionLists[];
|
||||
static sBBox m_RenderBBox;
|
||||
static sBBox m_ThinkBBox;
|
||||
public:
|
||||
// FreeList Stuff
|
||||
static void initFreeList();
|
||||
static void resetFreeList();
|
||||
static void shutdownFreeList();
|
||||
static CThing *GetThing(int Type,int SubType);
|
||||
static void DeleteThing(CThing *Thing);
|
||||
static void initFreeList();
|
||||
static void resetFreeList();
|
||||
static void shutdownFreeList();
|
||||
static CThing *GetThing(int Type,int SubType);
|
||||
static void DeleteThing(CThing *Thing);
|
||||
|
||||
private:
|
||||
static CThing **s_FreeList[];
|
||||
static CThing **s_FreeList[];
|
||||
};
|
||||
|
||||
|
||||
|
@ -150,6 +150,7 @@ virtual void render();
|
|||
void setToShutdown(bool f=true) {m_isShuttingDown = f;}
|
||||
u8 isSetToShutdown() {return( m_isShuttingDown);}
|
||||
virtual int dontKillDuringLevelRespawn() {return false;}
|
||||
void calcRenderPos(DVECTOR const &Pos,DVECTOR &renderPos);
|
||||
|
||||
// Linkage
|
||||
void addChild(CThing *Child);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue