Initialise a whole lot of stuff...
| 81 | |
| 82 | // Initialise a whole lot of stuff... |
| 83 | static void _initialize() |
| 84 | { |
| 85 | Options.fixup_options(); |
| 86 | |
| 87 | you.symbol = MONS_PLAYER; |
| 88 | msg::initialise_mpr_streams(); |
| 89 | |
| 90 | rng::seed(); // don't use any chosen seed yet |
| 91 | |
| 92 | clua.init_libraries(); |
| 93 | |
| 94 | init_char_table(Options.char_set); |
| 95 | init_show_table(); |
| 96 | init_monster_symbols(); |
| 97 | init_spell_descs(); // This needs to be way up top. {dlb} |
| 98 | init_zap_index(); |
| 99 | init_mut_index(); |
| 100 | init_sac_index(); |
| 101 | init_duration_index(); |
| 102 | init_mon_name_cache(); |
| 103 | init_mons_spells(); |
| 104 | init_parchment_overlays(); |
| 105 | |
| 106 | // init_item_name_cache() needs to be redone after init_char_table() |
| 107 | // and init_show_table() have been called, so that the glyphs will |
| 108 | // be set to use with item_names_by_glyph_cache. |
| 109 | init_item_name_cache(); |
| 110 | |
| 111 | unwind_bool no_more(crawl_state.show_more_prompt, false); |
| 112 | |
| 113 | // Init item array. |
| 114 | for (int i = 0; i < MAX_ITEMS; ++i) |
| 115 | init_item(i); |
| 116 | |
| 117 | reset_all_monsters(); |
| 118 | init_anon(); |
| 119 | |
| 120 | env.igrid.init(NON_ITEM); |
| 121 | env.mgrid.init(NON_MONSTER); |
| 122 | env.map_knowledge.init(map_cell()); |
| 123 | env.pgrid.init(terrain_property_t{}); |
| 124 | |
| 125 | you.unique_creatures.reset(); |
| 126 | you.unique_items.init(UNIQ_NOT_EXISTS); |
| 127 | |
| 128 | // Set up the Lua interpreter for the dungeon builder. |
| 129 | init_dungeon_lua(); |
| 130 | |
| 131 | #ifdef USE_TILE_LOCAL |
| 132 | // Draw the splash screen before the database gets initialised as that |
| 133 | // may take awhile and it's better if the player can look at a pretty |
| 134 | // screen while this happens. |
| 135 | loading_screen_open(); |
| 136 | #endif |
| 137 | |
| 138 | // Initialise internal databases. |
| 139 | _loading_message("Loading databases..."); |
| 140 | databaseSystemInit(); |
no test coverage detected