This commit is contained in:
Daveo 2001-07-02 14:26:38 +00:00
parent e5589bb6bf
commit 16fc446712
2 changed files with 23 additions and 12 deletions

View File

@ -107,8 +107,6 @@ SpriteBank *CGameScene::s_GlobalSpritebank;
CLayerCollision *CGameScene::s_GlobalCollision; CLayerCollision *CGameScene::s_GlobalCollision;
CHealthManager *CGameScene::m_HealthManager; CHealthManager *CGameScene::m_HealthManager;
MATRIX CGameScene::CamMtx;
/*****************************************************************************/ /*****************************************************************************/
CGameScene::ACTOR_TYPE CGameScene::actorType[40] = CGameScene::ACTOR_TYPE CGameScene::actorType[40] =
{ {
@ -186,9 +184,11 @@ CGameScene GameScene;
void CGameScene::init() void CGameScene::init()
{ {
// Setup Constant Camera Matrix // Setup Constant Camera Matrix
SetIdentTrans(&CamMtx,0,0,RenderZ); // SetIdentTrans(&CamMtx,0,0,RenderZ);
SetGeomScreen(RenderZ); // SetGeomScreen(RenderZ);
SetTransMatrix(&CamMtx); // SetTransMatrix(&CamMtx);
setCameraMtx();
s_genericFont=new ("CGameScene::Init") FontBank(); s_genericFont=new ("CGameScene::Init") FontBank();
s_genericFont->initialise( &standardFont ); s_genericFont->initialise( &standardFont );
@ -336,10 +336,11 @@ void CGameScene::render_playing()
CConversation::render(); CConversation::render();
CThingManager::renderAllThings(); CThingManager::renderAllThings();
SetIdentTrans(&CamMtx,0,0,RenderZ); setCameraMtx();
SetGeomScreen(RenderZ); // SetIdentTrans(&CamMtx,0,0,RenderZ);
SetRotMatrix(&CamMtx); // SetGeomScreen(RenderZ);
SetTransMatrix(&CamMtx); // SetRotMatrix(&CamMtx);
// SetTransMatrix(&CamMtx);
Level.render(); Level.render();
m_HealthManager->render(); m_HealthManager->render();
@ -765,3 +766,14 @@ void CGameScene::thinkCameraShake(int _frames)
} }
} }
/*****************************************************************************/
void CGameScene::setCameraMtx()
{
MATRIX CamMtx;
SetIdentTrans(&CamMtx,0,0,RenderZ);
SetGeomScreen(RenderZ);
SetRotMatrix(&CamMtx);
SetTransMatrix(&CamMtx);
}

View File

@ -57,8 +57,6 @@ static void restartlevel() {s_restartLevel=true;}
CLevel &GetLevel() {return(Level);} CLevel &GetLevel() {return(Level);}
// static MATRIX &GetCamMtx() {return(CamMtx);}
static ACTOR_TYPE getActorType( int actorNum ) {return actorType[actorNum];} static ACTOR_TYPE getActorType( int actorNum ) {return actorType[actorNum];}
static void setBossHasBeenKilled() {s_bossHasBeenKilled=true;} static void setBossHasBeenKilled() {s_bossHasBeenKilled=true;}
@ -70,6 +68,8 @@ static void dropHealth(DVECTOR &Pos,int Amount,int Vel);
static void setCameraShake(s16 X,s16 Y); static void setCameraShake(s16 X,s16 Y);
static void shakeCamera(DVECTOR &CamPos); static void shakeCamera(DVECTOR &CamPos);
void thinkCameraShake(int _frames); void thinkCameraShake(int _frames);
static void setCameraMtx();
private: private:
typedef enum typedef enum
{ {
@ -109,7 +109,6 @@ class CPlayer *m_player;
static CHealthManager *m_HealthManager; static CHealthManager *m_HealthManager;
static FontBank *s_genericFont; static FontBank *s_genericFont;
class ScalableFontBank *m_scalableFont; class ScalableFontBank *m_scalableFont;
static MATRIX CamMtx;
static int s_restartLevel; static int s_restartLevel;
static int s_readyToExit; static int s_readyToExit;