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

Function _reset_game

crawl-ref/source/main.cc:352–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352static void _reset_game()
353{
354 clua.close();
355 dlua.close();
356
357 clrscr();
358 // Unset by death, but not by saving with restart_after_save.
359 crawl_state.reset_game();
360 clear_message_store();
361 macro_clear_buffers();
362 crawl_state.show_more_prompt = true;
363 the_lost_ones.clear();
364 shopping_list = ShoppingList();
365 you = player();
366 reset_hud();
367 StashTrack = StashTracker();
368 travel_cache = TravelCache();
369 // TODO: hint state needs seem work
370 Hints.hints_events.init(false);
371 clear_level_target();
372 overview_clear();
373 clear_message_window();
374 note_list.clear();
375 dlua_errors.clear();
376 msg::deinitialise_mpr_streams();
377 quiver::reset_state();
378
379#ifdef USE_TILE_LOCAL
380 // [ds] Don't show the title screen again, just go back to
381 // the menu.
382 crawl_state.title_screen = false;
383#endif
384#ifdef USE_TILE
385 tiles.clear_text_tags(TAG_NAMED_MONSTER);
386#endif
387}
388
389static void _launch_game_loop()
390{

Callers 1

_launch_game_loopFunction · 0.85

Calls 15

clear_message_storeFunction · 0.85
macro_clear_buffersFunction · 0.85
ShoppingListClass · 0.85
reset_hudFunction · 0.85
StashTrackerClass · 0.85
TravelCacheClass · 0.85
clear_level_targetFunction · 0.85
overview_clearFunction · 0.85
clear_message_windowFunction · 0.85
deinitialise_mpr_streamsFunction · 0.85
reset_stateFunction · 0.85
reset_gameMethod · 0.80

Tested by

no test coverage detected