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

Method dump

crawl-ref/source/state.cc:469–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469void game_state::dump()
470{
471 fprintf(stderr, "\nGame state:\n\n");
472
473 fprintf(stderr, "mouse_enabled: %d, waiting_for_command: %d, "
474 "terminal_resized: %d\n",
475 mouse_enabled, waiting_for_command, terminal_resized);
476 fprintf(stderr, "io_inited: %d, need_save: %d, saving_game: %d, "
477 "updating_scores: %d:\n",
478 io_inited, need_save, saving_game, updating_scores);
479 fprintf(stderr, "seen_hups: %d, map_stat_gen: %d, type: %d, "
480 "arena_suspended: %d\n",
481 seen_hups, map_stat_gen, type, arena_suspended);
482 if (last_winch)
483 {
484 fprintf(stderr, "Last resize was %" PRId64" seconds ago.\n",
485 (int64_t)(time(0) - last_winch));
486 }
487
488 fprintf(stderr, "\n");
489
490 // Arena mode can change behavior of the rest of the code and/or lead
491 // to asserts.
492 unwind_var<game_type> _type(type, GAME_TYPE_NORMAL);
493 unwind_bool _arena_suspended(arena_suspended, false);
494
495 fprintf(stderr, "prev_cmd = %s\n", command_to_name(prev_cmd).c_str());
496
497 if (doing_prev_cmd_again)
498 {
499 fprintf(stderr, "Doing prev_cmd again with keys: ");
500 for (int key : prev_cmd_keys)
501 fprintf(stderr, "%d, ", key);
502 fprintf(stderr, "\n");
503 fprintf(stderr, "As ASCII keys: ");
504 for (int key : prev_cmd_keys)
505 fprintf(stderr, "%c", (char) key);
506 fprintf(stderr, "\n\n");
507 }
508 fprintf(stderr, "repeat_cmd = %s\n", command_to_name(repeat_cmd).c_str());
509
510 fprintf(stderr, "\n");
511
512 if (god_act.which_god != GOD_NO_GOD || god_act.depth != 0)
513 {
514 fprintf(stderr, "God %s currently acting with depth %d\n\n",
515 god_name(god_act.which_god).c_str(), god_act.depth);
516 }
517
518 if (!god_act_stack.empty())
519 {
520 fprintf(stderr, "Other gods acting:\n");
521 for (const god_act_state &godact : god_act_stack)
522 {
523 fprintf(stderr, "God %s with depth %d\n",
524 god_name(godact.which_god).c_str(), godact.depth);
525 }
526 fprintf(stderr, "\n\n");

Callers

nothing calls this directly

Calls 5

command_to_nameFunction · 0.85
god_nameFunction · 0.85
debug_mon_strFunction · 0.85
debug_dump_monFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected