summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 4023971c9a..d3c9e1bf70 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -189,6 +189,8 @@ static void startup_tutorial();
static void read_messages();
#endif
+static void compile_time_asserts();
+
/*
It all starts here. Some initialisations are run first, then straight to
new_game and then input.
@@ -199,6 +201,7 @@ int old_main( int argc, char *argv[] )
int main( int argc, char *argv[] )
#endif
{
+ compile_time_asserts(); // just to quiet "unused static function" warning
// Load in the system environment variables
get_system_environment();
@@ -4360,3 +4363,20 @@ static void update_replay_state()
if (!is_processing_macro())
repeat_again_rec.clear();
}
+
+
+void compile_time_asserts()
+{
+ // Check that the numbering comments in enum.h haven't been
+ // disturbed accidentally.
+ COMPILE_CHECK(SK_UNARMED_COMBAT == 19 , c1);
+ COMPILE_CHECK(SK_EVOCATIONS == 39 , c2);
+ COMPILE_CHECK(SP_MERFOLK == 35 , c3);
+ COMPILE_CHECK(SPELL_BOLT_OF_MAGMA == 18 , c4);
+ COMPILE_CHECK(SPELL_POISON_ARROW == 94 , c5);
+ COMPILE_CHECK(SPELL_SUMMON_MUSHROOMS == 221 , c6);
+
+ //jmf: NEW ASSERTS: we ought to do a *lot* of these
+ COMPILE_CHECK(NUM_SPELLS < SPELL_NO_SPELL , c7);
+ COMPILE_CHECK(NUM_JOBS < JOB_UNKNOWN , c8);
+}