MCPcopy Create free account
hub / github.com/crawl/crawl / _launch_game

Function _launch_game

crawl-ref/source/main.cc:423–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423NORETURN static void _launch_game()
424{
425 const bool game_start = startup_step();
426
427 // Attach the macro key recorder
428 remove_key_recorder(&repeat_again_rec);
429 add_key_recorder(&repeat_again_rec);
430
431 // Override some options when playing in hints mode.
432 init_hints_options();
433
434 _set_removed_types_as_identified();
435
436 Version::record(you.prev_save_version);
437
438 if (!crawl_state.game_is_tutorial())
439 {
440 msg::stream << "<yellow>Welcome" << (game_start? "" : " back") << ", "
441 << you.your_name << " the "
442 << species::name(you.species)
443 << " " << get_job_name(you.char_class) << ".</yellow>";
444 // TODO: seeded sprint?
445 if (crawl_state.type == GAME_TYPE_CUSTOM_SEED)
446 msg::stream << endl << "<white>" << seed_description() << "</white>";
447 else
448 {
449 const string type_name = crawl_state.game_type_name();
450 if (!type_name.empty())
451 msg::stream << "<white> [" << type_name << "]</white>";
452 }
453 msg::stream << endl;
454 }
455
456#ifdef USE_TILE
457 viewwindow();
458 update_screen();
459#endif
460
461 if (game_start)
462 _announce_goal_message();
463
464 _god_greeting_message(game_start);
465
466 if (!crawl_state.game_is_tutorial())
467 mpr("Press <w>?</w> for a list of commands and other information.");
468
469 _prep_input();
470
471 if (game_start)
472 {
473 // TODO: convert this to the hints mode
474 if (crawl_state.game_is_hints())
475 _startup_hints_mode();
476 _take_starting_note();
477 }
478 else
479 hints_load_game();
480

Callers 1

_launch_game_loopFunction · 0.85

Calls 15

startup_stepFunction · 0.85
remove_key_recorderFunction · 0.85
add_key_recorderFunction · 0.85
init_hints_optionsFunction · 0.85
nameFunction · 0.85
get_job_nameFunction · 0.85
seed_descriptionFunction · 0.85
viewwindowFunction · 0.85
_announce_goal_messageFunction · 0.85
_god_greeting_messageFunction · 0.85
mprFunction · 0.85

Tested by

no test coverage detected