From 336db3e336c38c44f8ff0b6b8bf81c14e6d9a8d8 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Tue, 12 Dec 2006 09:50:26 +0000 Subject: Tweaked startup initialisation so that Crawl can load maps before curses initialisation, but after item initialisation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@617 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/acr.cc | 32 ++++++++++++++++---------------- crawl-ref/source/util/levcomp.ypp | 1 - 2 files changed, 16 insertions(+), 17 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index a212571bab..d5225c6ebe 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -213,13 +213,6 @@ int main( int argc, char *argv[] ) exit(0); } - init_io(); - -#ifdef USE_MACROS - // Load macros - macro_init(); -#endif - bool game_start = initialise(); if (game_start || Options.always_greet) @@ -2654,13 +2647,6 @@ static bool initialise(void) you.symbol = '@'; you.colour = LIGHTGREY; - // system initialisation stuff: - textbackground(0); - -#ifdef DOS - directvideo = 1; -#endif - seed_rng(); clear_ids(); // in itemname.cc init_char_table(Options.char_set); @@ -2670,8 +2656,6 @@ static bool initialise(void) init_monsters(mcolour); // this needs to be way up top {dlb} init_playerspells(); // this needs to be way up top {dlb} - clrscr(); - // init item array: for (i = 0; i < MAX_ITEMS; i++) init_item( i ); @@ -2723,6 +2707,22 @@ static bool initialise(void) // Read special levels and vaults. read_maps(); + + init_io(); + +#ifdef USE_MACROS + // Load macros + macro_init(); +#endif + + // system initialisation stuff: + textbackground(0); + +#ifdef DOS + directvideo = 1; +#endif + + clrscr(); // sets up a new game: bool newc = new_game(); diff --git a/crawl-ref/source/util/levcomp.ypp b/crawl-ref/source/util/levcomp.ypp index 77d5981810..6a16128b94 100644 --- a/crawl-ref/source/util/levcomp.ypp +++ b/crawl-ref/source/util/levcomp.ypp @@ -11,7 +11,6 @@ extern int yylineno; void yyerror(const char *e) { - io_cleanup(); fprintf(stderr, "%s:%d: %s\n", lc_desfile.c_str(), yylineno, e); // Bail bail bail. exit(1); -- cgit v1.2.3-54-g00ecf