bool Engine::StartUp() { #ifdef _DEBUG DevDrop("Starting Engine."); #endif if(InitWindow() == false || BootGL() == false) //If unable to initialize window or boot OpenGL { #ifdef _DEBUG DevError("Error starting engine! Shutting down."); SDL_Quit(); #endif // _DEBUG return false; } if(DisableVSync() == false) { #ifdef _DEBUG DevError("Error Disabling VSync, non-critical."); #endif } else { #ifdef _DEBUG DevDrop("VSync Disabled!"); #endif } #ifdef _DEBUG DevDrop("Engine Started Successfully"); #endif // _DEBUG GraphicsM.Precache_Sheets(); //Precache sheets, they can be called from the GraphicsMananger via pointers. #ifdef _DEBUG DevDrop("Sprite sheets precached and ready!"); #endif // _DEBUG SetupAudio(); gCam.Camera.x = 0; gCam.Camera.y = 0; gCam.Camera.w = GetGameScreen()->w; gCam.Camera.h = GetGameScreen()->h; SDL_EnableKeyRepeat(40,1); //Enable key repeating. After holding a key down for 40ms it will repeat the key press once. SetupLevels(); //This function will be deprecated soon. :(200): Menu->Setup(); //Currently disabled, sets up the Menu initially. return true; }
Crest::Crest(string aMeshKey, string aMaterialKey, btRigidBody* rB, PhysicsManager* physicsMan, CREST_TYPE aCrestType, float mass) : GameObject(aMeshKey, aMaterialKey, rB, physicsMan, VISION_AFFECTED_NOCOLLISION, mass, true) { crestType = aCrestType; inVision = false; renderMan = &RenderManager::getInstance(); SetupAudio(); if(aCrestType != HADES) { CreateLightAndIndex(); } index = 0; canChange = true; }
Crest::Crest(void) { crestType = LEAP; inVision = false; renderMan = &RenderManager::getInstance(); SetupAudio(); if(crestType != HADES) { CreateLightAndIndex(); } index = 0; canChange = true; }
Crest::Crest(string aMeshKey, string aMaterialKey, XMMATRIX* aWorldMatrix, PhysicsManager* physicsMan, CREST_TYPE aCrestType) : GameObject(aMeshKey, aMaterialKey, aWorldMatrix, physicsMan, true) { crestType = aCrestType; inVision = false; renderMan = &RenderManager::getInstance(); SetupAudio(); if(aCrestType != HADES) { CreateLightAndIndex(); } index = 0; canChange = true; }