void MyLoadMenu(HWND hWnd) { #ifdef _WIN32 if ((HMENU)g_FileMenu != 0) g_FileMenu.Destroy(); HMENU oldMenu = ::GetMenu(hWnd); HMENU baseMenu = ::LoadMenu(g_hInstance, MAKEINTRESOURCE(IDM_MENU)); ::SetMenu(hWnd, baseMenu); ::DestroyMenu(oldMenu); if (!g_LangID.IsEmpty()) { HMENU menuOld = ::GetMenu(hWnd); MyChangeMenu(menuOld, 0, 0); } ::DrawMenuBar(hWnd); #else extern void rc_MyLoadMenu(HWND hWnd); rc_MyLoadMenu(hWnd); if (!g_LangID.IsEmpty()) { HMENU menuOld = ((wxFrame *)hWnd)->GetMenuBar(); // ::GetMenu(hWnd); MyChangeMenu(menuOld, 0, 0); } #endif }
void MyLoadMenu() { HMENU baseMenu; #ifdef UNDER_CE HMENU oldMenu = g_App._commandBar.GetMenu(0); if (oldMenu) ::DestroyMenu(oldMenu); BOOL b = g_App._commandBar.InsertMenubar(g_hInstance, IDM_MENU, 0); baseMenu = g_App._commandBar.GetMenu(0); if (!g_LangID.IsEmpty()) MyChangeMenu(baseMenu, 0, 0); g_App._commandBar.DrawMenuBar(0); #else HWND hWnd = g_HWND; HMENU oldMenu = ::GetMenu(hWnd); ::SetMenu(hWnd, ::LoadMenu(g_hInstance, MAKEINTRESOURCE(IDM_MENU))); ::DestroyMenu(oldMenu); baseMenu = ::GetMenu(hWnd); if (!g_LangID.IsEmpty()) MyChangeMenu(baseMenu, 0, 0); ::DrawMenuBar(hWnd); #endif if ((HMENU)g_FileMenu != 0) g_FileMenu.Destroy(); g_FileMenu.CreatePopup(); CopyMenu(::GetSubMenu(baseMenu, 0), g_FileMenu); }
void CustomDetailsMenu (void) { int i, choice = 0; CMenu m; do { m.Destroy (); m.Create (DL_MAX); m.AddSlider (TXT_OBJ_COMPLEXITY, gameStates.render.detail.nObjectComplexity, 0, NDL-1, 0, HTX_ONLINE_MANUAL); m.AddSlider (TXT_OBJ_DETAIL, gameStates.render.detail.nObjectDetail, 0, NDL-1, 0, HTX_ONLINE_MANUAL); m.AddSlider (TXT_WALL_DETAIL, gameStates.render.detail.nWallDetail, 0, NDL-1, 0, HTX_ONLINE_MANUAL); m.AddSlider (TXT_WALL_RENDER_DEPTH, gameStates.render.detail.nWallRenderDepth, 0, NDL-1, 0, HTX_ONLINE_MANUAL); m.AddSlider (TXT_DEBRIS_AMOUNT, gameStates.render.detail.nDebrisAmount, 0, NDL-1, 0, HTX_ONLINE_MANUAL); if (!gameStates.app.bGameRunning) m.AddSlider (TXT_SOUND_CHANNELS, gameStates.sound.nSoundChannels, 0, sizeofa (detailData.nSoundChannels) - 1, 0, HTX_ONLINE_MANUAL); m.AddText (TXT_LO_HI, 0); i = m.Menu (NULL, TXT_DETAIL_CUSTOM, CustomDetailsCallback, &choice); } while (i > -1); InitCustomDetails (); }
//------------------------------------------------------------------------------ // Create the main menu. int SetupMainMenu (CMenu& m) { memset (&mainOpts, 0xff, sizeof (mainOpts)); m.Destroy (); m.Create (25); #ifndef DEMO_ONLY SetScreenMode (SCREEN_MENU); #if 1 m.AddText ("", 0); m.Top ()->m_bNoScroll = 1; m.AddText ("", 0); m.Top ()->m_bNoScroll = 1; m.AddText ("", 0); m.Top ()->m_bNoScroll = 1; #endif mainOpts.nNew = m.AddMenu (TXT_NEW_GAME1, KEY_N, HTX_MAIN_NEW); if (!gameStates.app.bNostalgia) mainOpts.nSingle = m.AddMenu (TXT_NEW_SPGAME, KEY_I, HTX_MAIN_SINGLE); mainOpts.nLoad = m.AddMenu (TXT_LOAD_GAME, KEY_L, HTX_MAIN_LOAD); mainOpts.nMulti = m.AddMenu (TXT_MULTIPLAYER_, KEY_M, HTX_MAIN_MULTI); if (gameStates.app.bNostalgia) mainOpts.nConfig = m.AddMenu (TXT_OPTIONS_, KEY_O, HTX_MAIN_CONF); else mainOpts.nConfig = m.AddMenu (TXT_CONFIGURE, KEY_O, HTX_MAIN_CONF); mainOpts.nPilots = m.AddMenu (TXT_CHANGE_PILOTS, KEY_P, HTX_MAIN_PILOT); mainOpts.nDemo = m.AddMenu (TXT_VIEW_DEMO, KEY_D, HTX_MAIN_DEMO); mainOpts.nScores = m.AddMenu (TXT_VIEW_SCORES, KEY_H, HTX_MAIN_SCORES); #if 0 if (CFile::Exist ("orderd2.pcx", gameFolders.szDataDir, 0)) // SHAREWARE mainOpts.nOrder = m.AddMenu (TXT_ORDERING_INFO, -1, NULL); #endif mainOpts.nMovies = m.AddMenu (TXT_PLAY_MOVIES, KEY_V, HTX_MAIN_MOVIES); if (!gameStates.app.bNostalgia) mainOpts.nSongs = m.AddMenu (TXT_PLAY_SONGS, KEY_S, HTX_MAIN_SONGS); mainOpts.nCredits = m.AddMenu (TXT_CREDITS, KEY_C, HTX_MAIN_CREDITS); #endif mainOpts.nQuit = m.AddMenu (TXT_QUIT, KEY_Q, HTX_MAIN_QUIT); return m.ToS (); }
void EffectOptionsMenu (void) { static int choice = 0; CMenu m; int i, j; int optEnableFx, optGatlingTrails, optStaticSmoke, optSoftParticles [3]; #if 0 int optShockwaves; #endif char szSlider [50]; pszExplShrapnels [0] = TXT_NONE; pszExplShrapnels [1] = TXT_FEW; pszExplShrapnels [2] = TXT_MEDIUM; pszExplShrapnels [3] = TXT_MANY; pszExplShrapnels [4] = TXT_EXTREME; pszNoneBasicFull [0] = TXT_NONE; pszNoneBasicFull [1] = TXT_BASIC; pszNoneBasicFull [2] = TXT_FULL; pszNoneBasicAdv [0] = TXT_NONE; pszNoneBasicAdv [1] = TXT_BASIC; pszNoneBasicAdv [2] = TXT_ADVANCED; pszThrusters [0] = TXT_NONE; pszThrusters [1] = TXT_2D; pszThrusters [2] = TXT_3D; nCoronas = gameOpts->render.coronas.bUse ? gameOpts->render.coronas.nStyle == 2 ? 2 : 1 : 0; nShadows = extraGameInfo [0].bShadows ? ((gameOpts->render.shadows.nReach == 2) && (gameOpts->render.shadows.nClip == 2)) ? 2 : 1 : 0; nLightTrails = extraGameInfo [0].bLightTrails ? gameOpts->render.particles.bPlasmaTrails ? 2 : 1 : 0; do { m.Destroy (); m.Create (30); optEnableFx = m.AddCheck (TXT_ENABLE_EFFECTS, gameOpts->render.effects.bEnabled, KEY_F, HTX_ENABLE_EFFECTS); m.AddText (""); sprintf (szSlider + 1, TXT_SMOKE, pszNoneBasicFull [gameOpts->render.particles.nQuality]); *szSlider = *(TXT_SMOKE - 1); effectOpts.nSmoke = m.AddSlider (szSlider + 1, gameOpts->render.particles.nQuality, 0, 2, KEY_S, HTX_SMOKE); if (!gameStates.render.bHaveStencilBuffer) effectOpts.nShadows = -1; else { sprintf (szSlider + 1, TXT_SHADOWS, pszNoneBasicFull [nShadows]); *szSlider = *(TXT_SHADOWS - 1); effectOpts.nShadows = m.AddSlider (szSlider + 1, nShadows, 0, 2, KEY_H, HTX_SHADOWS); } sprintf (szSlider + 1, TXT_CORONAS, pszNoneBasicAdv [nCoronas]); *szSlider = *(TXT_CORONAS - 1); effectOpts.nCoronas = m.AddSlider (szSlider + 1, nCoronas, 0, 1 + ogl.m_states.bDepthBlending, KEY_O, HTX_CORONAS); sprintf (szSlider + 1, TXT_LIGHTNING, pszNoneBasicFull [int (extraGameInfo [0].bUseLightning)]); *szSlider = *(TXT_LIGHTNING - 1); effectOpts.nLightning = m.AddSlider (szSlider + 1, extraGameInfo [0].bUseLightning, 0, 2, KEY_L, HTX_LIGHTNING); m.AddText (""); if (extraGameInfo [0].bUseParticles) { sprintf (szSlider + 1, TXT_EXPLOSION_SHRAPNELS, pszExplShrapnels [gameOpts->render.effects.nShrapnels]); *szSlider = *(TXT_EXPLOSION_SHRAPNELS - 1); effectOpts.nExplShrapnels = m.AddSlider (szSlider + 1, gameOpts->render.effects.nShrapnels, 0, 4, KEY_E, HTX_EXPLOSION_SHRAPNELS); } else effectOpts.nExplShrapnels = -1; sprintf (szSlider + 1, TXT_LIGHTTRAIL_QUAL, pszNoneBasicAdv [nLightTrails]); *szSlider = *(TXT_LIGHTTRAIL_QUAL - 1); effectOpts.nLightTrails = m.AddSlider (szSlider + 1, nLightTrails, 0, 1 + extraGameInfo [0].bUseParticles, KEY_T, HTX_LIGHTTRAIL_QUAL); sprintf (szSlider + 1, TXT_THRUSTER_FLAMES, pszThrusters [int (extraGameInfo [0].bThrusterFlames)]); *szSlider = *(TXT_THRUSTER_FLAMES - 1); effectOpts.nThrusters = m.AddSlider (szSlider + 1, extraGameInfo [0].bThrusterFlames, 0, 2, KEY_U, HTX_THRUSTER_FLAMES); m.AddText (""); if (extraGameInfo [0].bUseParticles) { optStaticSmoke = m.AddCheck (TXT_SMOKE_STATIC, gameOpts->render.particles.bStatic, KEY_A, HTX_ADVRND_STATICSMOKE); optGatlingTrails = m.AddCheck (TXT_GATLING_TRAILS, extraGameInfo [0].bGatlingTrails, KEY_G, HTX_GATLING_TRAILS); } else optStaticSmoke = optGatlingTrails = -1; if ((gameOptions [0].render.nQuality < 3) || (gameOpts->app.bExpertMode != SUPERUSER)) optSoftParticles [0] = optSoftParticles [1] = optSoftParticles [2] = -1; else { m.AddText (""); optSoftParticles [0] = m.AddCheck (TXT_SOFT_SPRITES, (gameOpts->render.effects.bSoftParticles & 1) != 0, KEY_I, HTX_SOFT_SPRITES); optSoftParticles [1] = m.AddCheck (TXT_SOFT_SPARKS, (gameOpts->render.effects.bSoftParticles & 2) != 0, KEY_A, HTX_SOFT_SPARKS); if (extraGameInfo [0].bUseParticles) optSoftParticles [2] = m.AddCheck (TXT_SOFT_SMOKE, (gameOpts->render.effects.bSoftParticles & 4) != 0, KEY_O, HTX_SOFT_SMOKE); else optSoftParticles [2] = -1; } for (;;) { i = m.Menu (NULL, TXT_EFFECT_MENUTITLE, EffectOptionsCallback, &choice); if (i < 0) break; } extraGameInfo [0].bUseParticles = (gameOpts->render.particles.nQuality != 0); if (effectOpts.nShadows >= 0) { if ((extraGameInfo [0].bShadows = (nShadows != 0))) gameOpts->render.shadows.nReach = gameOpts->render.shadows.nClip = nShadows; } if ((gameOpts->render.coronas.bUse = (nCoronas != 0))) gameOpts->render.coronas.nStyle = nCoronas; for (j = 0; j < 3; j++) { if (optSoftParticles [j] >= 0) { if (m [optSoftParticles [j]].m_value) gameOpts->render.effects.bSoftParticles |= 1 << j; else gameOpts->render.effects.bSoftParticles &= ~(1 << j); } } GET_VAL (gameOpts->render.effects.bEnabled, optEnableFx); GET_VAL (gameOpts->render.particles.bStatic, optStaticSmoke); GET_VAL (extraGameInfo [0].bGatlingTrails, optGatlingTrails); if ((extraGameInfo [0].bLightTrails = (nLightTrails != 0))) gameOpts->render.particles.bPlasmaTrails = (nLightTrails == 2); } while (i == -2); SetDebrisCollisions (); DefaultEffectSettings (); if (gameOpts->render.effects.bEnabled && gameOpts->render.effects.bEnergySparks && gameStates.app.bGameRunning && !sparkManager.HaveSparks ()) sparkManager.Setup (); }
~CFileMenuDestroyer() { if ((HMENU)g_FileMenu != 0) g_FileMenu.Destroy(); }
void RenderOptionsMenu (void) { CMenu m; int i; #if DBG int optWireFrame, optTextures, optObjects, optWalls, optDynLight; #endif int nRendQualSave = gameOpts->render.nImageQuality, optSubTitles; static int choice = 0; char szSlider [50]; pszNoneBasicAdv [0] = TXT_NONE; pszNoneBasicAdv [1] = TXT_BASIC; pszNoneBasicAdv [2] = TXT_ADVANCED; pszNoneBasicFull [0] = TXT_NONE; pszNoneBasicFull [1] = TXT_BASIC; pszNoneBasicFull [2] = TXT_FULL; pszNoneBasicStdFull [0] = TXT_NONE; pszNoneBasicStdFull [1] = TXT_BASIC; pszNoneBasicStdFull [2] = TXT_STANDARD; pszNoneBasicStdFull [3] = TXT_FULL; pszImgQual [0] = TXT_QUALITY_LOW; pszImgQual [1] = TXT_QUALITY_MED; pszImgQual [2] = TXT_QUALITY_HIGH; pszImgQual [3] = TXT_VERY_HIGH; pszImgQual [4] = TXT_QUALITY_MAX; pszRendQual [0] = TXT_QUALITY_LOW; pszRendQual [1] = TXT_QUALITY_MED; pszRendQual [2] = TXT_QUALITY_HIGH; pszRendQual [3] = TXT_QUALITY_MAX; pszMeshQual [0] = TXT_NONE; pszMeshQual [1] = TXT_SMALL; pszMeshQual [2] = TXT_MEDIUM; pszMeshQual [3] = TXT_HIGH; pszMeshQual [4] = TXT_EXTREME; pszQuality [0] = TXT_BASIC; pszQuality [1] = TXT_STANDARD; pszQuality [2] = TXT_HIGH; pszQuality [3] = TXT_BEST; lightManager.SetMethod (); nLighting = (gameOpts->render.nLightingMethod == 0) ? 0 : (gameOpts->render.nLightingMethod == 2) ? 3 : (gameStates.render.bLightmapsOk && gameOpts->render.bUseLightmaps) + 1; nPowerups = gameOpts->render.powerups.b3D ? gameOpts->render.powerups.b3DShields ? 2 : 1 : 0; nCameras = extraGameInfo [0].bUseCameras ? gameOpts->render.cameras.bHires ? 2 : 1 : 0; do { m.Destroy (); m.Create (50); #if !DBG if (!gameOpts->app.bNotebookFriendly) renderOpts.nFrameCap = m.AddCheck (TXT_VSYNC, gameOpts->render.nMaxFPS == 1, KEY_V, HTX_RENDER_FRAMECAP); #endif if (!gameStates.app.bNostalgia) renderOpts.nBrightness = m.AddSlider (TXT_BRIGHTNESS, paletteManager.GetGamma (), 0, 16, KEY_B, HTX_RENDER_BRIGHTNESS); m.AddText (""); #if !DBG if (gameOpts->app.bNotebookFriendly) #endif { if (gameOpts->render.nMaxFPS > 1) sprintf (szSlider + 1, TXT_FRAMECAP, gameOpts->render.nMaxFPS); else if (gameOpts->render.nMaxFPS < 0) sprintf (szSlider + 1, TXT_VSYNC, gameOpts->render.nMaxFPS); else sprintf (szSlider + 1, TXT_NO_FRAMECAP); *szSlider = *(TXT_FRAMECAP - 1); renderOpts.nFrameCap = m.AddSlider (szSlider + 1, FindTableFps (gameOpts->render.nMaxFPS), 0, sizeofa (fpsTable) - 1, KEY_F, HTX_RENDER_FRAMECAP); } renderOpts.nLightmaps = renderOpts.nLights = renderOpts.nPasses = -1; if (gameStates.app.bGameRunning || gameStates.app.bNostalgia) renderOpts.nLighting = -1; else { sprintf (szSlider + 1, TXT_LIGHTING, pszQuality [nLighting]); *szSlider = *(TXT_LIGHTING + 1); renderOpts.nLighting = m.AddSlider (szSlider + 1, nLighting, 0, (gameOpts->render.bUseShaders && ogl.m_states.bShadersOk) ? 3 : 1, KEY_L, HTX_LIGHTING); if (nLighting >= 2) { sprintf (szSlider + 1, TXT_LMAP_QUALITY, pszQuality [gameOpts->render.nLightmapQuality]); *szSlider = *(TXT_LMAP_QUALITY + 1); renderOpts.nLightmaps = m.AddSlider (szSlider + 1, gameOpts->render.nLightmapQuality, 0, 3, KEY_M, HTX_LMAP_QUALITY); if (nLighting == 3) { sprintf (szSlider + 1, TXT_MAX_LIGHTS_PER_PASS, gameOpts->ogl.nMaxLightsPerPass); *szSlider = *(TXT_MAX_LIGHTS_PER_PASS - 1); renderOpts.nLights = m.AddSlider (szSlider + 1, gameOpts->ogl.nMaxLightsPerPass - 5, 0, 8 - MIN_LIGHTS_PER_PASS, KEY_P, HTX_MAX_LIGHTS_PER_PASS); } } m.AddText ("", 0); } sprintf (szSlider + 1, TXT_IMAGE_QUALITY, pszImgQual [gameOpts->render.nImageQuality]); *szSlider = *(TXT_IMAGE_QUALITY - 1); renderOpts.nImageQual = m.AddSlider (szSlider + 1, gameOpts->render.nImageQuality, 0, 4, KEY_I, HTX_ADVRND_RENDQUAL); if (gameStates.app.bGameRunning) renderOpts.nRenderQual = renderOpts.nMeshQual = -1; else { sprintf (szSlider + 1, TXT_RENDER_QUALITY, pszRendQual [gameOpts->render.nQuality]); *szSlider = *(TXT_RENDER_QUALITY + 1); renderOpts.nRenderQual = m.AddSlider (szSlider + 1, gameOpts->render.nQuality, 0, 3, KEY_R, HTX_ADVRND_TEXQUAL); if ((gameOpts->render.nLightingMethod == 1) && !gameOpts->render.bUseLightmaps) { sprintf (szSlider + 1, TXT_MESH_QUALITY, pszMeshQual [gameOpts->render.nMeshQuality]); *szSlider = *(TXT_MESH_QUALITY + 1); renderOpts.nMeshQual = m.AddSlider (szSlider + 1, gameOpts->render.nMeshQuality, 0, 3, KEY_V, HTX_MESH_QUALITY); } else renderOpts.nMeshQual = -1; } sprintf (szSlider + 1, TXT_CAMERAS, pszNoneBasicFull [nCameras]); *szSlider = *(TXT_CAMERAS - 1); renderOpts.nCameras = m.AddSlider (szSlider + 1, nCameras, 0, 2, KEY_C, HTX_CAMERAS); sprintf (szSlider + 1, TXT_POWERUPS, pszNoneBasicFull [nPowerups]); *szSlider = *(TXT_POWERUPS - 1); renderOpts.nPowerups = m.AddSlider (szSlider + 1, nPowerups, 0, 2, KEY_O, HTX_POWERUPS); m.AddText (""); optSubTitles = m.AddCheck (TXT_MOVIE_SUBTTL, gameOpts->movies.bSubTitles, KEY_V, HTX_RENDER_SUBTTL); #if DBG if (EXPERTMODE) { m.AddText ("", 0); optWireFrame = m.AddCheck ("Draw wire frame", gameOpts->render.debug.bWireFrame, 0, NULL); optTextures = m.AddCheck ("Draw textures", gameOpts->render.debug.bTextures, 0, NULL); optWalls = m.AddCheck ("Draw walls", gameOpts->render.debug.bWalls, 0, NULL); optObjects = m.AddCheck ("Draw objects", gameOpts->render.debug.bObjects, 0, NULL); optDynLight = m.AddCheck ("Dynamic Light", gameOpts->render.debug.bDynamicLight, 0, NULL); } #endif do { i = m.Menu (NULL, TXT_RENDER_OPTS, RenderOptionsCallback, &choice); } while (i >= 0); if ((extraGameInfo [0].bUseCameras = (nCameras != 0))) gameOpts->render.cameras.bHires = (nCameras == 2); if ((gameOpts->render.powerups.b3D = (nPowerups != 0))) gameOpts->render.powerups.b3DShields = (nPowerups == 2); gameOpts->movies.bSubTitles = (m [optSubTitles].m_value != 0); #if !DBG if (!EXPERTMODE) gameOpts->render.nMaxFPS = m [renderOpts.nFrameCap].m_value ? 1 : 60; #endif if (!gameStates.app.bNostalgia) paletteManager.SetGamma (m [renderOpts.nBrightness].m_value); if (nRendQualSave != gameOpts->render.nImageQuality) ogl.SetRenderQuality (); if ((gameStates.app.bNostalgia > 1) || (nLighting == 0)) gameOpts->render.nLightingMethod = 0; else { gameOpts->render.bUseLightmaps = (nLighting > 1); gameOpts->render.nLightingMethod = nLighting - gameOpts->render.bUseLightmaps; } #if DBG if (EXPERTMODE) { gameOpts->render.debug.bWireFrame = m [optWireFrame].m_value; gameOpts->render.debug.bTextures = m [optTextures].m_value; gameOpts->render.debug.bObjects = m [optObjects].m_value; gameOpts->render.debug.bWalls = m [optWalls].m_value; gameOpts->render.debug.bDynamicLight = m [optDynLight].m_value; } #endif } while (i == -2); lightManager.SetMethod (); DefaultRenderSettings (); }
void MultiplayerMenu (void) { CMenu m; int choice = 0, i, optCreate, optJoin = -1, optConn = -1, nConnections = 0; int nOldGameMode; if ((gameStates.app.bNostalgia < 2) && gameData.multiplayer.autoNG.bValid) { i = MultiChoice (gameData.multiplayer.autoNG.uConnect, !gameData.multiplayer.autoNG.bHost); if (i >= 0) ExecMultiMenuOption (i); } else { do { nOldGameMode = gameData.app.nGameMode; m.Destroy (); m.Create (15); if (gameStates.app.bNostalgia < 2) { optCreate = m.AddMenu (TXT_CREATE_GAME, KEY_S, HTX_NETWORK_SERVER); optJoin = m.AddMenu (TXT_JOIN_GAME, KEY_J, HTX_NETWORK_CLIENT); m.AddText ("", 0); optConn = m.AddRadio (TXT_NGTYPE_IPX, 0, KEY_I, HTX_NETWORK_IPX); m.AddRadio (TXT_NGTYPE_UDP, 0, KEY_U, HTX_NETWORK_UDP); m.AddRadio (TXT_NGTYPE_TRACKER, 0, KEY_T, HTX_NETWORK_TRACKER); m.AddRadio (TXT_NGTYPE_MCAST4, 0, KEY_M, HTX_NETWORK_MCAST); #ifdef KALINIX m.AddRadio (TXT_NGTYPE_KALI, 0, KEY_K, HTX_NETWORK_KALI); #endif nConnections = m.ToS (); m [optConn + NMCLAMP (gameStates.multi.nConnection, 0, nConnections - optConn)].m_value = 1; } else { #ifdef NATIVE_IPX multiOpts.nStartIpx = m.AddMenu (TXT_START_IPX_NET_GAME, -1, HTX_NETWORK_IPX); multiOpts.nJoinIpx = m.AddMenu (TXT_JOIN_IPX_NET_GAME, -1, HTX_NETWORK_IPX); #endif //NATIVE_IPX multiOpts.nStartMCast4 = m.AddMenu (TXT_MULTICAST_START, KEY_M, HTX_NETWORK_MCAST); multiOpts.nJoinMCast4 = m.AddMenu (TXT_MULTICAST_JOIN, KEY_N, HTX_NETWORK_MCAST); #ifdef KALINIX multiOpts.nStartKali = m.AddMenu (TXT_KALI_START, KEY_K, HTX_NETWORK_KALI); multiOpts.nJoinKali = m.AddMenu (TXT_KALI_JOIN, KEY_I, HTX_NETWORK_KALI); #endif // KALINIX if (gameStates.app.bNostalgia > 2) multiOpts.nSerial = m.AddMenu (TXT_MODEM_GAME2, KEY_G, HTX_NETWORK_MODEM); } i = m.Menu (NULL, TXT_MULTIPLAYER, NULL, &choice); if (i > -1) { if (gameStates.app.bNostalgia > 1) i = choice; else { for (gameStates.multi.nConnection = 0; gameStates.multi.nConnection < nConnections; gameStates.multi.nConnection++) if (m [optConn + gameStates.multi.nConnection].m_value) break; i = MultiChoice (gameStates.multi.nConnection, choice == optJoin); } ExecMultiMenuOption (i); } if (nOldGameMode != gameData.app.nGameMode) break; // leave menu } while (i > -1); } }
void NewGameMenu (void) { CMenu menu; int optSelMsn, optMsnName, optLevelText, optLevel, optLaunch, optLoadout; int nMission = gameData.missions.nLastMission, bMsnLoaded = 0; int i, choice = 0; char szDifficulty [50]; char szLevelText [32]; char szLevel [5]; #if DBG int optLives; char szLives [5]; #endif static int nPlayerMaxLevel = 1; static int nLevel = 0; if (gameStates.app.bNostalgia) { LegacyNewGameMenu (); return; } gameStates.app.bD1Mission = 0; gameStates.app.bD1Data = 0; gameOpts->app.nVersionFilter = 3; SetDataVersion (-1); if (nMission < 0) gameFolders.szMsnSubDir [0] = '\0'; else if (gameOpts->app.bSinglePlayer) { if (!strstr (gameFolders.szMsnSubDir, "single/")) nMission = -1; gameFolders.szMsnSubDir [0] = '\0'; } hogFileManager.UseMission (""); for (;;) { menu.Destroy (); menu.Create (15); optSelMsn = menu.AddMenu (TXT_SEL_MISSION, KEY_I, HTX_MULTI_MISSION); optMsnName = menu.AddText ((nMission < 0) ? TXT_NONE_SELECTED : gameData.missions.list [nMission].szMissionName, 0); if ((nMission >= 0) && (nPlayerMaxLevel > 1)) { sprintf (szLevelText, "%s (1-%d)", TXT_LEVEL_, nPlayerMaxLevel); Assert (strlen (szLevelText) < 100); optLevelText = menu.AddText (szLevelText, 0); menu [optLevelText].m_bRebuild = 1; sprintf (szLevel, "%d", nLevel); optLevel = menu.AddInput (szLevel, 4, HTX_MULTI_LEVEL); } else optLevel = -1; #if DBG menu.AddText (""); menu.AddText ("Initial Lives:"); sprintf (szLives, "%d", gameStates.gameplay.nInitialLives); optLives = menu.AddInput (szLives, 4); #endif menu.AddText (" ", 0); sprintf (szDifficulty + 1, TXT_DIFFICULTY2, MENU_DIFFICULTY_TEXT (gameStates.app.nDifficultyLevel)); *szDifficulty = *(TXT_DIFFICULTY2 - 1); nOptDifficulty = menu.AddSlider (szDifficulty + 1, gameStates.app.nDifficultyLevel, 0, 4, KEY_D, HTX_GPLAY_DIFFICULTY); menu.AddText ("", 0); optLoadout = menu.AddMenu (TXT_LOADOUT_OPTION, KEY_B, HTX_MULTI_LOADOUT); if (nMission >= 0) { menu.AddText ("", 0); optLaunch = menu.AddMenu (TXT_LAUNCH_GAME, KEY_L, ""); menu [optLaunch].m_bCentered = 1; } else optLaunch = -1; i = menu.Menu (NULL, TXT_NEWGAME_MENUTITLE, NewGameMenuCallback, &choice); if (i < 0) { SetFunctionMode (FMODE_MENU); return; } if (choice == optLoadout) LoadoutOptionsMenu (); else if (choice == optSelMsn) { i = SelectAndLoadMission (0, NULL); if (i >= 0) { bMsnLoaded = 1; nMission = i; nLevel = 1; PrintLog (" getting highest level allowed to play\n"); nPlayerMaxLevel = GetHighestLevel (); if (nPlayerMaxLevel > gameData.missions.nLastLevel) nPlayerMaxLevel = gameData.missions.nLastLevel; } } else if (choice == optLevel) { i = atoi (menu [optLevel].m_text); #if DBG if (!i || (i < -gameData.missions.nSecretLevels) || (i > nPlayerMaxLevel)) #else if ((i <= 0) || (i > nPlayerMaxLevel)) #endif MsgBox (NULL, NULL, 1, TXT_OK, TXT_INVALID_LEVEL); else if (nLevel == i) break; else nLevel = i; } else if (nMission >= 0) { if ((optLevel > 0) && !(nLevel = atoi (menu [optLevel].m_text))) { MsgBox (NULL, NULL, 1, TXT_OK, TXT_INVALID_LEVEL); nLevel = 1; } else break; } #if DBG else { i = atoi (menu [optLives].m_text); if (i > 0) gameStates.gameplay.nInitialLives = min (i, 255); } #endif } i = menu [nOptDifficulty].m_value; if (gameStates.app.nDifficultyLevel != i) { gameStates.app.nDifficultyLevel = i; gameData.bosses.InitGateIntervals (); } SavePlayerProfile (); paletteManager.DisableEffect (); if (!bMsnLoaded) LoadMission (nMission); if (!StartNewGame (nLevel)) SetFunctionMode (FMODE_MENU); }
void GameplayOptionsMenu (void) { static int choice = 0; CMenu m; int i; int optSmartWeaponSwitch = -1, optHeadlightBuiltIn = -1, optHeadlightPowerDrain = -1, optNoThief = -1; int optReorderPrim, optReorderSec; char szSlider [50]; pszAggressivities [0] = TXT_STANDARD; pszAggressivities [1] = TXT_MODERATE; pszAggressivities [2] = TXT_MEDIUM; pszAggressivities [3] = TXT_HIGH; pszAggressivities [4] = TXT_VERY_HIGH; pszAggressivities [5] = TXT_EXTREME; pszWeaponSwitch [0] = TXT_NEVER; pszWeaponSwitch [1] = TXT_WHEN_EMPTY; pszWeaponSwitch [2] = TXT_CHOSE_BEST; nAIAggressivity = (gameOpts->gameplay.nAIAggressivity && gameOpts->gameplay.nAIAwareness) ? 5 : gameOpts->gameplay.nAIAggressivity; do { m.Destroy (); m.Create (20); sprintf (szSlider + 1, TXT_DIFFICULTY2, MENU_DIFFICULTY_TEXT (gameStates.app.nDifficultyLevel)); *szSlider = *(TXT_DIFFICULTY2 - 1); gplayOpts.nDifficulty = m.AddSlider (szSlider + 1, gameStates.app.nDifficultyLevel, 0, 4, KEY_D, HTX_GPLAY_DIFFICULTY); sprintf (szSlider + 1, TXT_AI_AGGRESSIVITY, pszAggressivities [nAIAggressivity]); *szSlider = *(TXT_AI_AGGRESSIVITY - 1); gplayOpts.nAIAggressivity = m.AddSlider (szSlider + 1, nAIAggressivity, 0, 5, KEY_A, HTX_AI_AGGRESSIVITY); sprintf (szSlider + 1, TXT_WEAPON_SWITCH, pszWeaponSwitch [gameOpts->gameplay.nAutoSelectWeapon]); *szSlider = *(TXT_WEAPON_SWITCH - 1); gplayOpts.nWeaponSwitch = m.AddSlider (szSlider + 1, gameOpts->gameplay.nAutoSelectWeapon, 0, 2, KEY_W, HTX_WEAPON_SWITCH); m.AddText ("", 0); optSmartWeaponSwitch = m.AddCheck (TXT_SMART_WPNSWITCH, extraGameInfo [0].bSmartWeaponSwitch, KEY_S, HTX_GPLAY_SMARTSWITCH); optHeadlightBuiltIn = m.AddCheck (TXT_HEADLIGHT_BUILTIN, extraGameInfo [0].headlight.bBuiltIn, KEY_B, HTX_HEADLIGHT_BUILTIN); optHeadlightPowerDrain = m.AddCheck (TXT_HEADLIGHT_POWERDRAIN, extraGameInfo [0].headlight.bDrainPower, KEY_H, HTX_HEADLIGHT_POWERDRAIN); optNoThief = m.AddCheck (TXT_SUPPRESS_THIEF, gameOpts->gameplay.bNoThief, KEY_T, HTX_SUPPRESS_THIEF); m.AddText (""); optReorderPrim = m.AddMenu (TXT_PRIMARY_PRIO, KEY_P, HTX_OPTIONS_PRIMPRIO); optReorderSec = m.AddMenu (TXT_SECONDARY_PRIO, KEY_E, HTX_OPTIONS_SECPRIO); for (;;) { if (0 > (i = m.Menu (NULL, TXT_GAMEPLAY_OPTS, GameplayOptionsCallback, &choice))) break; if (choice == optReorderPrim) ReorderPrimary (); else if (choice == optReorderSec) ReorderSecondary (); }; } while (i == -2); if (nAIAggressivity == 5) { gameOpts->gameplay.nAIAwareness = 1; gameOpts->gameplay.nAIAggressivity = nAIAggressivity - 1; } else { gameOpts->gameplay.nAIAwareness = 0; gameOpts->gameplay.nAIAggressivity = nAIAggressivity; } extraGameInfo [0].headlight.bAvailable = m [gplayOpts.nHeadlightAvailable].m_value; extraGameInfo [0].bSmartWeaponSwitch = m [optSmartWeaponSwitch].m_value; GET_VAL (gameOpts->gameplay.bNoThief, optNoThief); GET_VAL (extraGameInfo [0].headlight.bDrainPower, optHeadlightPowerDrain); GET_VAL (extraGameInfo [0].headlight.bBuiltIn, optHeadlightBuiltIn); DefaultGameplaySettings (); if (IsMultiGame && !COMPETITION && EGI_FLAG (bSmokeGrenades, 0, 0, 0)) LOCALPLAYER.secondaryAmmo [PROXMINE_INDEX] = 4; if (IsMultiGame) NetworkSendExtraGameInfo (NULL); }
void CockpitOptionsMenu (void) { static int choice = 0; CMenu m; int i; int optTextGauges, optHUD, optReticle, optMissiles, optPosition, optAlignment, optZoomType = -1; char szSlider [50]; szWindowSize [0] = TXT_AUXWIN_SMALL; szWindowSize [1] = TXT_AUXWIN_MEDIUM; szWindowSize [2] = TXT_AUXWIN_LARGE; szWindowSize [3] = TXT_AUXWIN_HUGE; szWindowPos [0] = TXT_POS_BOTTOM; szWindowPos [1] = TXT_POS_TOP; szWindowAlign [0] = TXT_ALIGN_CORNERS; szWindowAlign [1] = TXT_ALIGN_MIDDLE; szWindowAlign [2] = TXT_ALIGN_CENTER; szTgtInd [0] = TXT_NONE; szTgtInd [1] = TXT_MISSILES; szTgtInd [2] = TXT_FULL; nWindowPos = gameOpts->render.cockpit.nWindowPos / 3; nWindowAlign = gameOpts->render.cockpit.nWindowPos % 3; optPosition = optAlignment = optWindowSize = optWindowZoom = optTextGauges = -1; #if WEAPON_ICONS int optIconPos = -1; optWeaponIcons = -1; bShowWeaponIcons = (extraGameInfo [0].nWeaponIcons != 0); #endif nTgtInd = extraGameInfo [0].bMslLockIndicators ? extraGameInfo [0].bTargetIndicators ? 2 : 1 : 0; do { m.Destroy (); m.Create (15); optHUD = m.AddCheck (TXT_SHOW_HUD, gameOpts->render.cockpit.bHUD, KEY_U, HTX_CPIT_SHOWHUD); optReticle = m.AddCheck (TXT_SHOW_RETICLE, gameOpts->render.cockpit.bReticle, KEY_R, HTX_CPIT_SHOWRETICLE); optMissiles = m.AddCheck (TXT_MISSILE_VIEW, gameOpts->render.cockpit.bMissileView, KEY_M, HTX_CPIT_MSLVIEW); optTextGauges = m.AddCheck (TXT_SHOW_GFXGAUGES, !gameOpts->render.cockpit.bTextGauges, KEY_G, HTX_CPIT_GFXGAUGES); //if (gameOpts->app.bExpertMode) optZoomType = m.AddCheck (TXT_ZOOM_SMOOTH, extraGameInfo [IsMultiGame].nZoomMode - 1, KEY_O, HTX_GPLAY_ZOOMSMOOTH); #if 0 optTgtInd = m.AddCheck (TXT_TARGET_INDICATORS, extraGameInfo [0].bTargetIndicators, KEY_T, HTX_CPIT_TGTIND); #else m.AddText ("", 0); sprintf (szSlider, TXT_TARGET_INDICATORS, szTgtInd [nTgtInd]); optTgtInd = m.AddSlider (szSlider, nTgtInd, 0, 2, KEY_T, HTX_CPIT_TGTIND); #endif #if WEAPON_ICONS m.AddText ("", 0); optWeaponIcons = m.AddCheck (TXT_SHOW_WEAPONICONS, bShowWeaponIcons, KEY_W, HTX_CPIT_WPNICONS); if (bShowWeaponIcons) { optIconPos = m.AddRadio (TXT_WPNICONS_TOP, 0, KEY_I, HTX_CPIT_ICONPOS); m.AddRadio (TXT_WPNICONS_BTM, 0, KEY_I, HTX_CPIT_ICONPOS); m.AddRadio (TXT_WPNICONS_LRB, 0, KEY_I, HTX_CPIT_ICONPOS); m.AddRadio (TXT_WPNICONS_LRT, 0, KEY_I, HTX_CPIT_ICONPOS); m [optIconPos + NMCLAMP (extraGameInfo [0].nWeaponIcons - 1, 0, 3)].m_value = 1; } else optIconPos = -1; #endif m.AddText ("", 0); m.AddText (TXT_COCKPIT_WINDOWS, 0); sprintf (szSlider, TXT_AUXWIN_SIZE, szWindowSize [gameOpts->render.cockpit.nWindowSize]); optWindowSize = m.AddSlider (szSlider, gameOpts->render.cockpit.nWindowSize, 0, 3, KEY_S, HTX_CPIT_WINSIZE); sprintf (szSlider, TXT_AUXWIN_ZOOM, gameOpts->render.cockpit.nWindowZoom + 1); optWindowZoom = m.AddSlider (szSlider, gameOpts->render.cockpit.nWindowZoom, 0, 3, KEY_Z, HTX_CPIT_WINZOOM); sprintf (szSlider, TXT_AUXWIN_POSITION, szWindowPos [nWindowPos]); optWindowPos = m.AddSlider (szSlider, nWindowPos, 0, 1, KEY_P, HTX_AUXWIN_POSITION); sprintf (szSlider, TXT_AUXWIN_ALIGNMENT, szWindowAlign [nWindowAlign]); optWindowAlign = m.AddSlider (szSlider, nWindowAlign, 0, 2, KEY_A, HTX_AUXWIN_ALIGNMENT); m.AddText ("", 0); do { i = m.Menu (NULL, TXT_COCKPIT_OPTS, &CockpitOptionsCallback, &choice); if (i < 0) break; #if WEAPON_ICONS if (bShowWeaponIcons && (optIconPos >= 0)) { for (int j = 0; j < 4; j++) if (m [optIconPos + j].m_value) { extraGameInfo [0].nWeaponIcons = j + 1; break; } } #endif } while (i >= 0); GET_VAL (gameOpts->render.cockpit.bReticle, optReticle); GET_VAL (gameOpts->render.cockpit.bHUD, optHUD); GET_VAL (gameOpts->render.cockpit.bMissileView, optMissiles); //GET_VAL (extraGameInfo [0].bTargetIndicators, optTgtInd); gameOpts->render.cockpit.bTextGauges = !m [optTextGauges].m_value; gameOpts->render.cockpit.nWindowPos = nWindowPos * 3 + nWindowAlign; //if (gameOpts->app.bExpertMode) extraGameInfo [IsMultiGame].nZoomMode = m [optZoomType].m_value + 1; #if WEAPON_ICONS if (bShowWeaponIcons) { if (optIconPos >= 0) { for (int j = 0; j < 4; j++) if (m [optIconPos + j].m_value) { extraGameInfo [0].nWeaponIcons = j + 1; break; } } GET_VAL (gameOpts->render.weaponIcons.alpha, optIconAlpha); } #endif } while (i == -2); extraGameInfo [0].bMslLockIndicators = (nTgtInd > 0); extraGameInfo [0].bTargetIndicators = (nTgtInd > 1); DefaultCockpitSettings (); }
void SoundMenu (void) { static int choice = 0; CMenu m; #if 0 char szVolume [50]; #endif int i; int optReverse, optShipSound = -1, optMissileSound = -1, optSpeedUpSound = -1, optFadeMusic = -1, optShieldWarn = -1; int bSongPlaying = (gameConfig.nMidiVolume > 0); gameStates.sound.nSoundChannels = SoundChannelIndex (); do { m.Destroy (); m.Create (20); soundOpts.nGatling = -1; soundOpts.nDigiVol = m.AddSlider (TXT_FX_VOLUME, gameConfig.nDigiVolume, 0, 8, KEY_F, HTX_ONLINE_MANUAL); soundOpts.nMusicVol = m.AddSlider (redbook.Enabled () ? TXT_CD_VOLUME : TXT_MIDI_VOLUME, redbook.Enabled () ? gameConfig.nRedbookVolume : gameConfig.nMidiVolume, 0, 8, KEY_M, HTX_ONLINE_MANUAL); if (gameStates.app.bNostalgia) optShipSound = optMissileSound = optSpeedUpSound = soundOpts.nGatling = -1; else { m.AddText ("", 0); optShipSound = m.AddCheck (TXT_SHIP_SOUND, gameOpts->sound.bShip, KEY_S, HTX_SHIP_SOUND); optMissileSound = m.AddCheck (TXT_MISSILE_SOUND, gameOpts->sound.bMissiles, KEY_M, HTX_MISSILE_SOUND); soundOpts.nGatling = m.AddCheck (TXT_GATLING_SOUND, gameOpts->sound.bGatling, KEY_G, HTX_GATLING_SOUND); if (gameOpts->sound.bGatling) optSpeedUpSound = m.AddCheck (TXT_SPINUP_SOUND, extraGameInfo [0].bGatlingSpeedUp, KEY_U, HTX_SPINUP_SOUND); optShieldWarn = m.AddCheck (TXT_SHIELD_WARNING, gameOpts->gameplay.bShieldWarning, KEY_W, HTX_CPIT_SHIELDWARN); } m.AddText ("", 0); soundOpts.nRedbook = m.AddCheck (TXT_REDBOOK_ENABLED, redbook.Playing (), KEY_C, HTX_ONLINE_MANUAL); optReverse = m.AddCheck (TXT_REVERSE_STEREO, gameConfig.bReverseChannels, KEY_R, HTX_ONLINE_MANUAL); #if 0 if (redbook.Enabled () || !gameConfig.nMidiVolume) optFadeMusic = -1; else optFadeMusic = m.AddCheck (TXT_FADE_MUSIC, gameOpts->sound.bFadeMusic, KEY_F, HTX_FADE_MUSIC); #endif i = m.Menu (NULL, TXT_SOUND_OPTS, SoundMenuCallback, &choice); redbook.Enable (m [soundOpts.nRedbook].m_value); gameConfig.bReverseChannels = m [optReverse].m_value; } while (i == -2); if (gameConfig.nMidiVolume < 1) midi.PlaySong (NULL, NULL, NULL, 0, 0); else if (!bSongPlaying) songManager.PlayCurrent (1); if (!gameStates.app.bNostalgia) { #if 0 GET_VAL (gameOpts->sound.bFadeMusic, optFadeMusic); #endif GET_VAL (gameOpts->sound.bShip, optShipSound); GET_VAL (gameOpts->sound.bMissiles, optMissileSound); GET_VAL (gameOpts->sound.bGatling, soundOpts.nGatling); GET_VAL (extraGameInfo [0].bGatlingSpeedUp, optSpeedUpSound); GET_VAL (gameOpts->gameplay.bShieldWarning, optShieldWarn); if (gameStates.app.bGameRunning && !(gameOpts->sound.bShip && gameOpts->sound.bGatling)) audio.DestroyObjectSound (LOCALPLAYER.nObject); } gameOpts->sound.xCustomSoundVolume = fix (float (gameConfig.nDigiVolume) * 10.0f / 8.0f + 0.5f); }
void PhysicsOptionsMenu (void) { static char nDragTable [] = {0, 3, 6, 10}; static int choice = 0; CMenu m; int i; int optWiggle = -1; char szSlider [50]; pszMslTurnSpeeds [0] = TXT_SLOW; pszMslTurnSpeeds [1] = TXT_MEDIUM; pszMslTurnSpeeds [2] = TXT_STANDARD; pszMslStartSpeeds [0] = TXT_VERY_SLOW; pszMslStartSpeeds [1] = TXT_SLOW; pszMslStartSpeeds [2] = TXT_MEDIUM; pszMslStartSpeeds [3] = TXT_STANDARD; pszAutoLevel [0] = TXT_NONE; pszAutoLevel [1] = TXT_STANDARD; pszAutoLevel [2] = TXT_ADVANCED; pszHitDetection [0] = TXT_BASIC; pszHitDetection [1] = TXT_STANDARD; pszHitDetection [2] = TXT_ADVANCED; pszHitDetection [3] = TXT_BEST; pszDrag [0] = TXT_OFF; pszDrag [1] = TXT_LOW; pszDrag [2] = TXT_MEDIUM; pszDrag [3] = TXT_STANDARD; gameOpts->gameplay.nAutoLeveling = NMCLAMP (gameOpts->gameplay.nAutoLeveling, 0, 2); extraGameInfo [0].nHitboxes = NMCLAMP (extraGameInfo [0].nHitboxes, 0, 2); nHitDetection = (extraGameInfo [0].nHitboxes ? 2 : 0) + extraGameInfo [0].bUseHitAngles; for (nDrag = sizeofa (nDragTable); nDrag; ) { nDrag--; if (extraGameInfo [0].nDrag >= nDragTable [nDrag]) break; } do { m.Destroy (); m.Create (30); sprintf (szSlider + 1, TXT_FUSION_RAMP, extraGameInfo [0].nFusionRamp * 50, '%'); *szSlider = *(TXT_FUSION_RAMP - 1); physOpts.nFusionRamp = m.AddSlider (szSlider + 1, extraGameInfo [0].nFusionRamp - 2, 0, 6, KEY_U, HTX_FUSION_RAMP); sprintf (szSlider + 1, TXT_PLAYER_DRAG, pszDrag [nDrag]); *szSlider = *(TXT_PLAYER_DRAG - 1); physOpts.nDrag = m.AddSlider (szSlider + 1, nDrag, 0, 3, KEY_G, HTX_PLAYER_DRAG); if (gameOpts->app.bExpertMode == SUPERUSER) { sprintf (szSlider + 1, TXT_MSL_TURNSPEED, pszMslTurnSpeeds [int (extraGameInfo [0].nMslTurnSpeed)]); *szSlider = *(TXT_MSL_TURNSPEED - 1); physOpts.nMslTurnSpeed = m.AddSlider (szSlider + 1, extraGameInfo [0].nMslTurnSpeed, 0, 2, KEY_T, HTX_GPLAY_MSL_TURNSPEED); sprintf (szSlider + 1, TXT_MSL_STARTSPEED, pszMslStartSpeeds [int (3) - extraGameInfo [0].nMslStartSpeed]); *szSlider = *(TXT_MSL_STARTSPEED - 1); physOpts.nMslStartSpeed = m.AddSlider (szSlider + 1, 3 - extraGameInfo [0].nMslStartSpeed, 0, 3, KEY_S, HTX_MSL_STARTSPEED); sprintf (szSlider + 1, TXT_SLOWMOTION_SPEEDUP, float (gameOpts->gameplay.nSlowMotionSpeedup) / 2); *szSlider = *(TXT_SLOWMOTION_SPEEDUP - 1); physOpts.nSlomoSpeedup = m.AddSlider (szSlider + 1, gameOpts->gameplay.nSlowMotionSpeedup - 4, 0, 4, KEY_M, HTX_SLOWMOTION_SPEEDUP); m.AddText ("", 0); if (extraGameInfo [0].nDrag) optWiggle = m.AddCheck (TXT_WIGGLE_SHIP, extraGameInfo [0].bWiggle, KEY_W, HTX_MISC_WIGGLE); else optWiggle = -1; } m.AddText ("", 0); sprintf (szSlider + 1, TXT_AUTOLEVEL, pszAutoLevel [gameOpts->gameplay.nAutoLeveling]); *szSlider = *(TXT_AUTOLEVEL - 1); physOpts.nAutoLevel = m.AddSlider (szSlider + 1, gameOpts->gameplay.nAutoLeveling, 0, 2, KEY_A, HTX_AUTO_LEVELING); sprintf (szSlider + 1, TXT_HIT_DETECTION, pszHitDetection [nHitDetection]); *szSlider = *(TXT_HIT_DETECTION - 1); physOpts.nHitDetection = m.AddSlider (szSlider + 1, nHitDetection, 0, 3, KEY_H, HTX_GPLAY_HITBOXES); do { i = m.Menu (NULL, TXT_PHYSICS_MENUTITLE, PhysicsOptionsCallback, &choice); } while (i >= 0); } while (i == -2); extraGameInfo [0].bUseHitAngles = nHitDetection & 1; extraGameInfo [0].nHitboxes = nHitDetection & 2; extraGameInfo [0].nDrag = nDragTable [nDrag]; if (gameOpts->app.bExpertMode == SUPERUSER) { if (optWiggle >= 0) extraGameInfo [0].bWiggle = m [optWiggle].m_value; } DefaultPhysicsSettings (); if (IsMultiGame) NetworkSendExtraGameInfo (NULL); }
void ConfigMenu (void) { static int choice = 0; CMenu menu; int i; int optSound, optConfig, optPerformance, optScrRes, optReorderPrim, optReorderSec, optEffects, optMiscellaneous, optRender, optGameplay, optCockpit, optPhysics = -1; do { menu.Destroy (); menu.Create (20); optRender = optGameplay = optCockpit = -1; optSound = menu.AddMenu (TXT_SOUND_MUSIC, KEY_M, HTX_OPTIONS_SOUND); menu.AddText ("", 0); optConfig = menu.AddMenu (TXT_CONTROLS_, KEY_O, HTX_OPTIONS_CONFIG); menu.AddText ("", 0); if (gameStates.app.bNostalgia) optBrightness = menu.AddSlider (TXT_BRIGHTNESS, paletteManager.GetGamma (), 0, 16, KEY_B, HTX_RENDER_BRIGHTNESS); if (gameStates.app.bNostalgia) optPerformance = menu.AddMenu (TXT_DETAIL_LEVELS, KEY_D, HTX_OPTIONS_DETAIL); else optPerformance = -1; optScrRes = menu.AddMenu (TXT_SCREEN_RES, KEY_S, HTX_OPTIONS_SCRRES); menu.AddText ("", 0); if (gameStates.app.bNostalgia) { optReorderPrim = menu.AddMenu (TXT_PRIMARY_PRIO, KEY_P, HTX_OPTIONS_PRIMPRIO); optReorderSec = menu.AddMenu (TXT_SECONDARY_PRIO, KEY_E, HTX_OPTIONS_SECPRIO); } else optReorderPrim = optReorderSec = -1; optMiscellaneous = menu.AddMenu (gameStates.app.bNostalgia ? TXT_TOGGLES : TXT_MISCELLANEOUS, gameStates.app.bNostalgia ? KEY_T : KEY_I, HTX_OPTIONS_MISC); if (!gameStates.app.bNostalgia) { optCockpit = menu.AddMenu (TXT_COCKPIT_OPTS2, KEY_C, HTX_OPTIONS_COCKPIT); optRender = menu.AddMenu (TXT_RENDER_OPTS2, KEY_R, HTX_OPTIONS_RENDER); optEffects = menu.AddMenu (TXT_EFFECT_OPTIONS, KEY_E, HTX_RENDER_EFFECTOPTS); #ifndef DBG if (gameStates.app.bGameRunning && IsMultiGame && !IsCoopGame) optPhysics = optGameplay = -1; else #endif { optGameplay = menu.AddMenu (TXT_GAMEPLAY_OPTS2, KEY_G, HTX_OPTIONS_GAMEPLAY); optPhysics = menu.AddMenu (TXT_PHYSICS_MENUCALL, KEY_P, HTX_OPTIONS_PHYSICS); } #if 0 optMultiThreading = menu.AddMenu (TXT_MT_MENU_OPTION, KEY_U, HTX_MULTI_THREADING); #endif } i = menu.Menu (NULL, TXT_OPTIONS, ConfigMenuCallback, &choice); if (i >= 0) { if (i == optSound) SoundMenu (); else if (i == optConfig) InputDeviceConfig (); else if (i == optPerformance) { if (gameStates.app.bNostalgia) DetailLevelMenu (); } else if (i == optScrRes) ScreenResMenu (); else if ((optReorderPrim >= 0) && (i == optReorderPrim)) ReorderPrimary (); else if ((optReorderSec >= 0) && (i == optReorderSec)) ReorderSecondary (); else if (i == optMiscellaneous) MiscellaneousMenu (); else if (!gameStates.app.bNostalgia) { if (i == optCockpit) CockpitOptionsMenu (); else if (i == optRender) RenderOptionsMenu (); else if (i == optEffects) EffectOptionsMenu (); else if ((optGameplay >= 0) && (i == optGameplay)) GameplayOptionsMenu (); else if ((optPhysics >= 0) && (i == optPhysics)) PhysicsOptionsMenu (); #if 0 else if ((optMultiThreading >= 0) && (i == optMultiThreading)) MultiThreadingOptionsMenu (); #endif } } } while (i > -1); SavePlayerProfile (); }