diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-24 12:42:13 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-24 14:31:30 +0200 |
commit | 394fb595f6d03fa9d266ed28726975e0b59bc798 (patch) | |
tree | 3a84b6c9ced49b07af9212a3447770ae53897ed5 /crawl-ref/source/ng-restr.h | |
parent | ea81f9787b7cba7a18ec7c098fcd0fe37fe7daef (diff) | |
download | crawl-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/ng-restr.h')
-rw-r--r-- | crawl-ref/source/ng-restr.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crawl-ref/source/ng-restr.h b/crawl-ref/source/ng-restr.h new file mode 100644 index 0000000000..c4593999d6 --- /dev/null +++ b/crawl-ref/source/ng-restr.h @@ -0,0 +1,25 @@ +#ifndef NG_RESTR_H +#define NG_RESTR_H + +#include "newgame.h" + +enum char_choice_restriction +{ + CC_BANNED = 0, + CC_RESTRICTED, + CC_UNRESTRICTED +}; + +char_choice_restriction class_allowed(species_type speci, + job_type char_class); +bool is_good_combination(species_type spc, job_type cls, + bool good = false); +char_choice_restriction book_restriction(startup_book_type booktype, + const newgame_def &ng); +char_choice_restriction weapon_restriction(weapon_type wpn, + const newgame_def &ng); +char_choice_restriction religion_restriction(god_type god, + const newgame_def &ng); + +#endif + |