bool HelloWorldUpdate() { if(s3eKeyboardGetState(s3eKeyBack) & S3E_KEY_STATE_RELEASED) { s3eDebugTraceLine("back check"); std::hash_map<char*, char*>::iterator ihashMap; if(hashMap.size() > 1) { ihashMap = hashMap.find("ShowAt"); if(ihashMap->second == "both"){ vservManagerFetchingAdData(); }else if(ihashMap->second == "end") { vservManagerFetchingAdData(); } else if(ihashMap->second == "start"){ s3eDeviceExit(); return false; } } } if(CheckButtonStatus("Exit") & S3E_KEY_STATE_RELEASED) /*S3E_KEY_STATE_PRESSED)*/ { s3eDebugTraceLine("Exit check"); HelloWorldShutDown(); return false; } return true; }
//----------------------------------------------------------------------------- // Main global function //----------------------------------------------------------------------------- int main() { IwGxInit(); Iw2DInit(); //SplashInit(); //SplashRender(); srand(time(NULL)); g_Input.Init(); LifeStatusInit(); FontInit(); //MenuInit(); FondoInit(); BaconInit(); MusicInit("./textures/musicOn.jpg"); while (menuB) { menuB = false; menu(); } spriteManager->removeSprite(corazon); delete corazon; for (int i=0; i<10; i++) { spriteManager->removeSprite(garras[i]); delete garras[i]; spriteManager->removeSprite(tnts[i]); delete tnts[i]; } for (int i=0; i<20; i++) { spriteManager->removeSprite(miniCoins[i]); delete miniCoins[i]; } delete tank; spriteManager->removeSprite(maxiCoin); delete maxiCoin; delete chuletas; g_Input.Release(); FondoShutDown(); BaconShutDown(); FontShutDown(); SplashShutDown(); LifeStatusShutDown(); IwGxFontTerminate(); IwGxTerminate(); Iw2DTerminate(); s3eDeviceExit(); return 0; }
void HelloWorldShutDown() { std::hash_map<char*, char*>::iterator ihashMap; if(hashMap.size() > 1) { ihashMap = hashMap.find("ShowAt"); s3eSurfaceUnRegister(S3E_SURFACE_SCREENSIZE, HelloWorldRotationCallBack); if(ihashMap->second == "end" || ihashMap->second == "both"){ vservManagerFetchingAdData(); } else if(ihashMap->second == "start"){ s3eDeviceExit(); } } }