summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/newgame.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-24 12:42:13 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-24 14:31:30 +0200
commit394fb595f6d03fa9d266ed28726975e0b59bc798 (patch)
tree3a84b6c9ced49b07af9212a3447770ae53897ed5 /crawl-ref/source/newgame.h
parentea81f9787b7cba7a18ec7c098fcd0fe37fe7daef (diff)
downloadcrawl-ref-394fb595f6d03fa9d266ed28726975e0b59bc798.tar.gz
crawl-ref-394fb595f6d03fa9d266ed28726975e0b59bc798.zip
Extract newgame character restrictions from newgame.cc.
The functions in the new ng-restr.cc are "pure": They don't access global state; data is passed in via the new and incomplete newgame_def. Eventually, new_game should be split into something like newgame_def choose_game(); that doesn't access "you", and void setup_game(newgame_def); that sets up the player. Also get rid of player_size in favour of player::body_size. Rename player_size_type to size_part_type since it's not really player-specific (used in actor::body_size). Move parts of player_genus, player::has_claws, body_size out into species.cc.
Diffstat (limited to 'crawl-ref/source/newgame.h')
-rw-r--r--crawl-ref/source/newgame.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/newgame.h b/crawl-ref/source/newgame.h
index bb3feb5dbd..dfc9a2ac8e 100644
--- a/crawl-ref/source/newgame.h
+++ b/crawl-ref/source/newgame.h
@@ -9,6 +9,7 @@
#define NEWGAME_H
+#include "enum.h"
#include "itemprop.h"
enum death_knight_type
@@ -40,6 +41,16 @@ enum startup_wand_type
SWT_RANDOM
};
+class player;
+struct newgame_def
+{
+ species_type species;
+ job_type job;
+ // TODO: fill in
+
+ void init(const player &p);
+};
+
undead_state_type get_undead_state(const species_type sp);
/* ***********************************************************************