MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / TitleOptions

Method TitleOptions

TombEngine/Game/gui.cpp:285–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283 }
284
285 InventoryResult GuiController::TitleOptions(ItemInfo* item)
286 {
287 enum TitleOption
288 {
289 NewGame,
290 HomeLevel,
291 LoadGame,
292 Options,
293 ExitGame,
294
295 Count
296 };
297
298 constexpr auto TITLE_OPTION_COUNT = TitleOption::Count - 1;
299 constexpr auto LOAD_GAME_OPTION_COUNT = SAVEGAME_MAX - 1;
300 constexpr auto OPTION_OPTION_COUNT = 2;
301
302 static int selectedOptionBackup;
303 auto inventoryResult = InventoryResult::None;
304
305 TimeInMenu++;
306
307 // Stuff for credits goes here!
308
309 switch (MenuToDisplay)
310 {
311 case Menu::Title:
312 OptionCount = TITLE_OPTION_COUNT;
313
314 if (!g_GameFlow->IsHomeLevelEnabled())
315 OptionCount--;
316
317 if (!g_GameFlow->IsLoadSaveEnabled())
318 OptionCount--;
319
320 break;
321
322 case Menu::SelectLevel:
323 inventoryResult = InventoryResult::None;
324 OptionCount = g_GameFlow->GetNumLevels() - 2;
325
326 if (g_GameFlow->IsHomeLevelEnabled())
327 OptionCount--;
328
329 break;
330
331 case Menu::LoadGame:
332 OptionCount = LOAD_GAME_OPTION_COUNT;
333 break;
334
335 case Menu::Options:
336 OptionCount = OPTION_OPTION_COUNT;
337 break;
338
339 case Menu::Display:
340 HandleDisplaySettingsInput(false);
341 return inventoryResult;
342

Callers 1

HandleMenuCallsFunction · 0.80

Calls 5

SoundEffectFunction · 0.85
IsHomeLevelEnabledMethod · 0.80
IsLoadSaveEnabledMethod · 0.80
GetNumLevelsMethod · 0.80
IsLevelSelectEnabledMethod · 0.80

Tested by

no test coverage detected