summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-27 13:03:56 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-27 13:03:56 +0000
commit02294f67e4fc78d79d639d4c29aa72e22f93b06c (patch)
tree31a170cb7933750ed8b64cf8fd72dff373005ad7 /crawl-ref/source/acr.cc
parent7baa5392145a253c8f4744e12e90770c6147bd74 (diff)
downloadcrawl-ref-02294f67e4fc78d79d639d4c29aa72e22f93b06c.tar.gz
crawl-ref-02294f67e4fc78d79d639d4c29aa72e22f93b06c.zip
Apply Paul's patch 1901939: including files in init.txt
with some clean-up and fix in acr.cc to make the results apply at once (instead of only after a screen redraw). I've tested it and everything works fine. Recursive inclusion, e.g. read_options('init.txt'), prints a stack overflow error but doesn't crash the game, so I think that's fine for now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3469 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 09db1d0a7b..fbbcff2fa5 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -3764,18 +3764,32 @@ static bool initialise(void)
burden_change();
make_hungry(0,true);
- you.redraw_strength = true;
+ you.redraw_strength = true;
you.redraw_intelligence = true;
- you.redraw_dexterity = true;
+ you.redraw_dexterity = true;
you.redraw_armour_class = true;
- you.redraw_evasion = true;
- you.redraw_experience = true;
- you.redraw_gold = true;
- you.wield_change = true;
- you.quiver_change = true;
+ you.redraw_evasion = true;
+ you.redraw_experience = true;
+ you.redraw_gold = true;
+ you.wield_change = true;
+ you.quiver_change = true;
you.start_time = time( NULL ); // start timer on session
+#ifdef CLUA_BINDINGS
+ clua.runhook("chk_startgame", "b", newc);
+ std::string yname = you.your_name;
+ read_init_file(true);
+ Options.fixup_options();
+ strncpy(you.your_name, yname.c_str(), kNameLen);
+ you.your_name[kNameLen - 1] = 0;
+
+ // In case Lua changed the character set.
+ init_char_table(Options.char_set);
+ init_feature_table();
+ init_monster_symbols();
+#endif
+
draw_border();
new_level();
update_turn_count();
@@ -3793,20 +3807,6 @@ static bool initialise(void)
zap_los_monsters();
}
-#ifdef CLUA_BINDINGS
- clua.runhook("chk_startgame", "b", newc);
- std::string yname = you.your_name;
- read_init_file(true);
- Options.fixup_options();
- strncpy(you.your_name, yname.c_str(), kNameLen);
- you.your_name[kNameLen - 1] = 0;
-
- // In case Lua changed the character set.
- init_char_table(Options.char_set);
- init_feature_table();
- init_monster_symbols();
-#endif
-
set_cursor_enabled(false);
viewwindow(1, false); // This just puts the view up for the first turn.