void endOfGame() { SplashInit(); SplashUpdate("continue"); SplashRender(); IwGxLightingOn(); gameFinalRender(); IwGxFlush(); IwGxSwapBuffers(); while(!s3eDeviceCheckQuitRequest()) { int64 start = s3eTimerGetMs(); while ((s3eTimerGetMs() - start) < MS_PER_FRAME) { int32 yield = (int32) (MS_PER_FRAME - (s3eTimerGetMs() - start)); if (yield<0) break; s3eDeviceYield(yield); } if (g_Input.getTouchCount() != 0) { s3eResult g_result = s3eOSExecExecute("http://www.facebook.com/Baconbb10", true); } } }
void MainMenuPage::InputChanged() { if (resumeGameButton->WasPressed()) { menu->ChangeState(menu_resume_game); } else if (missionSelectButton->WasPressed()) { #ifdef BOB_LITE menu->SetStartLevel(1); menu->ChangeState(menu_start_game); #else menu->ChangeState(menu_mission_select); #endif } else if (optionsButton->WasPressed()) { menu->ChangeState(menu_options); } else if (instructionsButton->WasPressed()) { menu->ChangeState(menu_instructions); } else if (aboutButton->WasPressed()) { menu->ChangeState(menu_about); } //#ifdef BOB_LITE else if (buyGameButton && buyGameButton->WasPressed()) { //[[UIApplication sharedApplication] openURL:[[NSURL alloc] initWithString: [NSString stringWithCString:"itms://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=308315671&mt=8"]]]; s3eOSExecExecute("itms://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=308315671&mt=8",false); } //#endif }
void execute(const char *str) { #ifdef __S3E__ s3eOSExecExecute(str, false); #elif __ANDROID__ jniBrowse(str); #else OX_ASSERT(!"execute not implemented"); #endif }
void execute(const char *str) { #ifdef __S3E__ s3eOSExecExecute(str, false); #elif __ANDROID__ jniBrowse(str); #elif EMSCRIPTEN EM_ASM_INT({ var url = Pointer_stringify($0); window.open(url, '_blank'); }, str);
void NagButtonYes::buttonReleased() { if(s3eExtOSExecAvailable() == S3E_TRUE) { s3eOSExecExecute("http://download.insurgentgames.com/skeleton-key/", false); /*// if iphone, redirect to app store if(s3eDeviceGetInt(S3E_DEVICE_OS) == S3E_OS_ID_IPHONE) s3eOSExecExecute("http://download.insurgentgames.com/skeleton-key/", false); // if android, redirect to market else s3eOSExecExecute("http://download.insurgentgames.com/skeleton-key/", false);*/ } ((SceneNag*)this->parent)->ontoTheGame(); }
void Streamer::Update(float deltaTime, float alphaMul) { CNode::Update(deltaTime, alphaMul); if (g_pInput->m_Touched) { if(!touched) { touched = true; x = g_pInput->m_X; y = g_pInput->m_Y; } } // Detect screen tap if (!g_pInput->m_Touched && g_pInput->m_PrevTouched && sceneSwitchComplete) { if(playButton->HitTest(g_pInput->m_X, g_pInput->m_Y) && g_pInput->m_X > x - 20 && g_pInput->m_X < x + 20 && g_pInput->m_Y > y - 20 && g_pInput->m_Y < y + 20) { g_pInput->Reset(); playButton->m_X = IwGxGetScreenWidth() * 2.0; stopButton->m_X = IwGxGetScreenWidth() / 2.0; startStreaming(); } else if(stopButton->HitTest(g_pInput->m_X, g_pInput->m_Y) && g_pInput->m_X > x - 20 && g_pInput->m_X < x + 20 && g_pInput->m_Y > y - 20 && g_pInput->m_Y < y + 20) { g_pInput->Reset(); playButton->m_X = IwGxGetScreenWidth() / 2.0; stopButton->m_X = IwGxGetScreenWidth() * 2.0; pauseStreaming(); } if(facebook->HitTest(g_pInput->m_X, g_pInput->m_Y) && g_pInput->m_X > x - 20 && g_pInput->m_X < x + 20 && g_pInput->m_Y > y - 20 && g_pInput->m_Y < y + 20) { g_pInput->Reset(); s3eOSExecExecute("https://www.facebook.com/pages/UCCS-Radio/229529077104562", S3E_FALSE); } else if(twitter->HitTest(g_pInput->m_X, g_pInput->m_Y) && g_pInput->m_X > x - 20 && g_pInput->m_X < x + 20 && g_pInput->m_Y > y - 20 && g_pInput->m_Y < y + 20) { g_pInput->Reset(); s3eOSExecExecute("https://twitter.com/uccsonlineradio", S3E_FALSE); } if ((labelLeft->HitTest(g_pInput->m_X, g_pInput->m_Y) && g_pInput->m_X > x - 20 && g_pInput->m_X < x + 20 && g_pInput->m_Y > y - 20 && g_pInput->m_Y < y + 20) || (g_pInput->m_X>g_pInput->prev_X + IwGxGetDeviceWidth() / 2)) { g_pInput->prev_X = g_pInput->m_X; sceneSwitchComplete = false; g_pInput->Reset(); if(currentPage == 0) { CalendarScene* cal = (CalendarScene*)g_pSceneManager->Find("calscene"); g_pSceneManager->SwitchTo(cal, 1); labelMain->SetText("Calendar"); labelLeft->SetText("Events"); labelRight->SetText("News"); currentPage = 1; } else if(currentPage == 1) { EventsScene* events = (EventsScene*)g_pSceneManager->Find("eventsscene"); g_pSceneManager->SwitchTo(events, 1); labelMain->SetText("Events"); labelLeft->SetText("News"); labelRight->SetText("Cal."); currentPage = 2; } else if(currentPage == 2) { NewsScene* news = (NewsScene*)g_pSceneManager->Find("newsscene"); g_pSceneManager->SwitchTo(news, 1); labelMain->SetText("News"); labelLeft->SetText("Cal."); labelRight->SetText("Events"); currentPage = 0; } } else if ( (labelRight->HitTest(g_pInput->m_X, g_pInput->m_Y) && g_pInput->m_X > x - 20 && g_pInput->m_X < x + 20 && g_pInput->m_Y > y - 20 && g_pInput->m_Y < y + 20) || ((g_pInput->m_X) < (g_pInput->prev_X - (int)IwGxGetDeviceWidth() / 2)) ) { g_pInput->prev_X = g_pInput->m_X; sceneSwitchComplete = false; g_pInput->Reset(); if(currentPage == 0) { EventsScene* events = (EventsScene*)g_pSceneManager->Find("eventsscene"); g_pSceneManager->SwitchTo(events, 0); labelMain->SetText("Events"); labelLeft->SetText("News"); labelRight->SetText("Cal."); currentPage = 2; } else if(currentPage == 1) { NewsScene* news = (NewsScene*)g_pSceneManager->Find("newsscene"); g_pSceneManager->SwitchTo(news, 0); labelMain->SetText("News"); labelLeft->SetText("Cal."); labelRight->SetText("Events"); currentPage = 0; } else if(currentPage == 2) { CalendarScene* cal = (CalendarScene*)g_pSceneManager->Find("calscene"); g_pSceneManager->SwitchTo(cal, 0); labelMain->SetText("Cal."); labelLeft->SetText("Events"); labelRight->SetText("News"); currentPage = 1; } } g_pInput->Reset(); x = 0; y = 0; touched = false; } if(g_pInput->m_PrevTouched) { x = 0; y = 0; touched = false; } }