BOOL OptDlgProc::DlgProc( TimeValue t,IParamMap *map, HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) { switch (msg) { case WM_INITDIALOG: SetupLevels(map); SetWindowText(GetDlgItem(hWnd,IDC_OPT_VERTCOUNT),NULL); SetWindowText(GetDlgItem(hWnd,IDC_OPT_FACECOUNT),NULL); SetupManButton(hWnd,map); break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDC_OPT_VIEWSL1: case IDC_OPT_VIEWSL2: SetupLevels(map); break; case IDC_OPT_MANUPDATE: SetupManButton(hWnd,map); break; case IDC_OPT_UPDATE: mod->forceUpdate = TRUE; mod->NotifyDependents(FOREVER,PART_ALL,REFMSG_CHANGE); ip->RedrawViews(ip->GetTime()); break; } break; } return FALSE; }
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; }