void app_resize( SDL_ResizeEvent * resize ) #endif { DebugPrintf("Window size changed.\n"); // TODO - need to save resize.w/h somewhere if (!bIgnoreWM_SIZE) return; // we should save the size // then startup at this size next time if( MyGameStatus == STATUS_Title ) { LastMenu = CurrentMenu; VduClear(); } // resize d3d to match the window size.. // TODO does d3d do the resizing on it's own now? if( MyGameStatus == STATUS_Title ) { FadeHoloLight(HoloLightBrightness); DarkenRoom2(RoomDarkness); ProcessVduItems( CurrentMenu ); InitialTexturesSet = false; } SetGamePrefs(); }
void CPrefsDlg::OnSelchangeComboWhatgame() { int n = m_wndWhatGame.GetCurSel(); if (n >= 0) { m_wndWhatGame.GetLBText(n, m_strWhatGame); } SetGamePrefs(); }
void CPrefsDlg::LoadPrefs() { CString strBuff; CString strPrefab = g_strAppPath; AddSlash(strPrefab); strPrefab += "Prefabs\\"; m_nMouseButtons = 3; m_bTextureLock = GetCvarInt( TLOCK_KEY, TLOCK_DEF ); m_bRotateLock = GetCvarInt( RLOCK_KEY, TLOCK_DEF ); m_strLastProject = GetCvarString( LASTPROJ_KEY, "" ); m_strLastMap = GetCvarString( LASTMAP_KEY, "" ); m_bLoadLast = GetCvarInt( LOADLAST_KEY, LOADLAST_DEF ); m_bRunBefore = GetCvarInt( RUN_KEY, RUN_DEF ); m_bFace = GetCvarInt( FACE_KEY, 1 ); m_bRightClick = GetCvarInt( RCLICK_KEY, 1 ); m_bVertex = GetCvarInt( VERTEX_KEY, 1 ); m_bAutoSave = GetCvarInt( AUTOSAVE_KEY, 1 ); m_bNewApplyHandling = GetCvarInt( NEWAPPLY_KEY, 0 ); m_bLoadLastMap = GetCvarInt( LOADLASTMAP_KEY, 0 ); m_bGatewayHack = GetCvarInt( HACK_KEY, 0 ); m_bTextureWindow = GetCvarInt( TEXTURE_KEY, 0 ); m_bCleanTiny = GetCvarInt( TINYBRUSH_KEY, 0 ); strBuff = GetCvarString( TINYSIZE_KEY, "0.5" ); m_fTinySize = atof(strBuff ); m_nAutoSave = GetCvarInt( AUTOSAVETIME_KEY, 5 ); if ( m_nAutoSave <= 0 ) { m_nAutoSave = 1; } m_strAutoSave.Format("%i", m_nAutoSave ); m_bSnapShots = GetCvarInt( SNAPSHOT_KEY, 0 ); m_nStatusSize = GetCvarInt( STATUS_KEY, 10 ); m_nMoveSpeed = GetCvarInt( MOVESPEED_KEY, 400 ); m_nAngleSpeed = GetCvarInt( ANGLESPEED_KEY, 300 ); m_bCamXYUpdate = GetCvarInt( CAMXYUPDATE_KEY, 1 ); m_bNewLightDraw = GetCvarInt( LIGHTDRAW_KEY, 1 ); m_bCubicClipping = ( GetCvarInt( CUBICCLIP_KEY, 1) != 0 ); m_nCubicScale = GetCvarInt( CUBICSCALE_KEY, 13 ); m_bALTEdge = GetCvarInt( ALTEDGE_KEY, 0 ); m_bQE4Painting = GetCvarInt( QE4PAINT_KEY, 1 ); m_bSnapTToGrid = GetCvarInt( SNAPT_KEY, 0 ); m_bXZVis = GetCvarInt( XZVIS_KEY, 0 ); m_bYZVis = GetCvarInt( YZVIS_KEY, 0 ); m_bZVis = GetCvarInt( ZVIS_KEY, 1 ); m_bSizePaint = GetCvarInt( SIZEPAINT_KEY, 0 ); m_bWideToolbar = GetCvarInt( WIDETOOLBAR_KEY, 1 ); m_bNoClamp = GetCvarInt( NOCLAMP_KEY, 0 ); m_nRotation = GetCvarInt( ROTATION_KEY, 45 ); m_bHiColorTextures = GetCvarInt( HICOLOR_KEY, 1 ); m_bChaseMouse = GetCvarInt( CHASEMOUSE_KEY, 1 ); m_nEntityShowState = GetCvarInt( ENTITYSHOW_KEY, 0 ); m_nTextureScale = GetCvarInt( TEXTURESCALE_KEY, 50 ); m_bTextureScrollbar = GetCvarInt( TEXTURESCROLLBAR_KEY, TRUE ); m_bDisplayLists = GetCvarInt( DISPLAYLISTS_KEY, TRUE ); m_bSwitchClip = GetCvarInt( SWITCHCLIP_KEY, TRUE ); m_bSelectWholeEntities = GetCvarInt( SELWHOLEENTS_KEY, TRUE ); m_nTextureQuality = GetCvarInt( TEXTUREQUALITY_KEY, 6 ); m_bGLLighting = GetCvarInt( GLLIGHTING_KEY, FALSE ); m_bNoStipple = GetCvarInt( NOSTIPPLE_KEY, 0 ); m_nUndoLevels = GetCvarInt( UNDOLEVELS_KEY, 63 ); m_strMaps = GetCvarString( MAPS_KEY, "" ); m_strModels = GetCvarString( MODELS_KEY, "" ); m_bNoStipple = GetCvarInt( NEWMAPFORMAT_KEY, 1 ); if ( m_bRunBefore == FALSE ) { SetGamePrefs(); } }
void CPrefsDlg::LoadPrefs() { CString strBuff; CString strPrefab = g_strAppPath; AddSlash(strPrefab); strPrefab += "Prefabs\\"; m_nMouse = AfxGetApp()->GetProfileInt(PREF_SECTION, MOUSE_KEY, MOUSE_DEF); if (m_nMouse == 0) m_nMouseButtons = 2; else m_nMouseButtons = 3; m_nView = AfxGetApp()->GetProfileInt(PREF_SECTION, WINDOW_KEY, WINDOW_DEF); m_strQuake2 = AfxGetApp()->GetProfileString(PREF_SECTION, Q2_KEY, Q2_DEF); m_bRunQuake = AfxGetApp()->GetProfileInt(PREF_SECTION, RUNQ2_KEY, RUNQ2_DEF); m_bTextureLock = AfxGetApp()->GetProfileInt(PREF_SECTION, TLOCK_KEY, TLOCK_DEF); m_bRotateLock = AfxGetApp()->GetProfileInt(PREF_SECTION, RLOCK_KEY, TLOCK_DEF); m_strLastProject = AfxGetApp()->GetProfileString(PREF_SECTION, LASTPROJ_KEY, ""); m_strLastMap = AfxGetApp()->GetProfileString(PREF_SECTION, LASTMAP_KEY, ""); m_bLoadLast = AfxGetApp()->GetProfileInt(PREF_SECTION, LOADLAST_KEY, LOADLAST_DEF); m_bRunBefore = AfxGetApp()->GetProfileInt(INTERNAL_SECTION, RUN_KEY, RUN_DEF); //m_b3Dfx = AfxGetApp()->GetProfileInt(PREF_SECTION, _3DFX_KEY, 0); m_bFace = AfxGetApp()->GetProfileInt(PREF_SECTION, FACE_KEY, 1); m_bInternalBSP = AfxGetApp()->GetProfileInt(PREF_SECTION, BSP_KEY, 1); m_bRightClick = AfxGetApp()->GetProfileInt(PREF_SECTION, RCLICK_KEY, 1); m_bVertex = AfxGetApp()->GetProfileInt(PREF_SECTION, VERTEX_KEY, 1); m_bAutoSave = AfxGetApp()->GetProfileInt(PREF_SECTION, AUTOSAVE_KEY, 1); m_bPAK = AfxGetApp()->GetProfileInt(PREF_SECTION, PAK_KEY, 1); m_bNewApplyHandling = AfxGetApp()->GetProfileInt(PREF_SECTION, NEWAPPLY_KEY, 0); m_bLoadLastMap = AfxGetApp()->GetProfileInt(PREF_SECTION, LOADLASTMAP_KEY, 0); m_bGatewayHack = AfxGetApp()->GetProfileInt(PREF_SECTION, HACK_KEY, 0); m_bTextureWindow = AfxGetApp()->GetProfileInt(PREF_SECTION, TEXTURE_KEY, 1); m_bCleanTiny = AfxGetApp()->GetProfileInt(PREF_SECTION, TINYBRUSH_KEY, 0); strBuff = AfxGetApp()->GetProfileString(PREF_SECTION, TINYSIZE_KEY, "0.5"); m_fTinySize = atof(strBuff); m_nAutoSave = AfxGetApp()->GetProfileInt(PREF_SECTION, AUTOSAVETIME_KEY, 5); m_strAutoSave.Format("%i", m_nAutoSave); m_bSnapShots = AfxGetApp()->GetProfileInt(PREF_SECTION, SNAPSHOT_KEY, 1); m_numSnapShots = AfxGetApp()->GetProfileInt(PREF_SECTION, NUMSNAPSHOT_KEY, 10); m_strPAKFile = AfxGetApp()->GetProfileString(PREF_SECTION, PAKFILE_KEY, PAKFILE_DEF); m_nStatusSize = AfxGetApp()->GetProfileInt(PREF_SECTION, STATUS_KEY, 10); m_nMoveSpeed = AfxGetApp()->GetProfileInt(PREF_SECTION, MOVESPEED_KEY, 400); m_nAngleSpeed = AfxGetApp()->GetProfileInt(PREF_SECTION, ANGLESPEED_KEY, 300); m_bSetGame = AfxGetApp()->GetProfileInt(PREF_SECTION, SETGAME_KEY, 0); m_bCamXYUpdate = AfxGetApp()->GetProfileInt(PREF_SECTION, CAMXYUPDATE_KEY, 1); m_bNewLightDraw = AfxGetApp()->GetProfileInt(PREF_SECTION, LIGHTDRAW_KEY, 1); m_bCubicClipping = AfxGetApp()->GetProfileInt(PREF_SECTION, CUBICCLIP_KEY, 1); m_nCubicScale = AfxGetApp()->GetProfileInt(PREF_SECTION, CUBICSCALE_KEY, 13); m_bALTEdge = AfxGetApp()->GetProfileInt(PREF_SECTION, ALTEDGE_KEY, 0); m_bTextureBar = AfxGetApp()->GetProfileInt(PREF_SECTION, TEXTUREBAR_KEY, 0); m_strWhatGame = AfxGetApp()->GetProfileString(PREF_SECTION, WHATGAME_KEY, "Quake3"); m_bFaceColors = AfxGetApp()->GetProfileInt(PREF_SECTION, FACECOLORS_KEY, 0); m_bQE4Painting = AfxGetApp()->GetProfileInt(PREF_SECTION, QE4PAINT_KEY, 1); m_bSnapTToGrid = AfxGetApp()->GetProfileInt(PREF_SECTION, SNAPT_KEY, 0); m_bXZVis = AfxGetApp()->GetProfileInt(PREF_SECTION, XZVIS_KEY, 0); m_bYZVis = AfxGetApp()->GetProfileInt(PREF_SECTION, YZVIS_KEY, 0); m_bZVis = AfxGetApp()->GetProfileInt(PREF_SECTION, ZVIS_KEY, 1); m_bSizePaint = AfxGetApp()->GetProfileInt(PREF_SECTION, SIZEPAINT_KEY, 0); m_bDLLEntities = AfxGetApp()->GetProfileInt(PREF_SECTION, DLLENTITIES_KEY, 0); m_bWideToolbar = AfxGetApp()->GetProfileInt(PREF_SECTION, WIDETOOLBAR_KEY, 0); m_bNoClamp = AfxGetApp()->GetProfileInt(PREF_SECTION, NOCLAMP_KEY, 0); m_strPrefabPath = AfxGetApp()->GetProfileString(PREF_SECTION, PREFAB_KEY, strPrefab); m_strUserPath = AfxGetApp()->GetProfileString(PREF_SECTION, USERINI_KEY, ""); m_nRotation = AfxGetApp()->GetProfileInt(PREF_SECTION, ROTATION_KEY, 45); m_bSGIOpenGL = AfxGetApp()->GetProfileInt(PREF_SECTION, SGIOPENGL_KEY, 0); m_bBuggyICD = AfxGetApp()->GetProfileInt(PREF_SECTION, BUGGYICD_KEY, 0); m_bHiColorTextures = AfxGetApp()->GetProfileInt(PREF_SECTION, HICOLOR_KEY, 1); m_bChaseMouse = AfxGetApp()->GetProfileInt(PREF_SECTION, CHASEMOUSE_KEY, 1); m_nEntityShowState = AfxGetApp()->GetProfileInt(PREF_SECTION, ENTITYSHOW_KEY, 0); m_nTextureScale = AfxGetApp()->GetProfileInt(PREF_SECTION, TEXTURESCALE_KEY, 50); m_bTextureScrollbar = AfxGetApp()->GetProfileInt(PREF_SECTION, TEXTURESCROLLBAR_KEY, TRUE); m_bDisplayLists = AfxGetApp()->GetProfileInt(PREF_SECTION, DISPLAYLISTS_KEY, TRUE); m_bUseShaders = AfxGetApp()->GetProfileInt(PREF_SECTION, SHADERS_KEY, FALSE); m_bSwitchClip = AfxGetApp()->GetProfileInt(PREF_SECTION, SWITCHCLIP_KEY, TRUE); m_bSelectWholeEntities = AfxGetApp()->GetProfileInt(PREF_SECTION, SELWHOLEENTS_KEY, TRUE); m_nTextureQuality = AfxGetApp()->GetProfileInt(PREF_SECTION, TEXTUREQUALITY_KEY, 6); m_bShowShaders = AfxGetApp()->GetProfileInt(PREF_SECTION, SHOWSHADERS_KEY, TRUE); m_bShaderTest = AfxGetApp()->GetProfileInt(PREF_SECTION, SHADERTEST_KEY, TRUE); if (m_bRunBefore == FALSE) { SetGamePrefs(); } }