diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-11 17:38:55 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-11 17:38:55 +0200 |
commit | f802db8cbf123d07c8a373b0cfc4188de34f386e (patch) | |
tree | 6525525c9ca95ec2a109d82785ac406c7e4c044a /src/birth.c | |
parent | 5a310053e1ed6331155e4c4a3a645291c0a95650 (diff) |
Lua: Gods: Move Theme god definitions to C
Diffstat (limited to 'src/birth.c')
-rw-r--r-- | src/birth.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/birth.c b/src/birth.c index 243f080e..274b50bf 100644 --- a/src/birth.c +++ b/src/birth.c @@ -2331,16 +2331,17 @@ static bool_ player_birth_aux_ask() } else { - int *choice; + int choice[MAX_GODS]; int max = 0; - C_MAKE(choice, max_gods, int); - /* Get the list of possible gods */ - for (n = 0; n < max_gods; n++) + for (n = 0; n < MAX_GODS; n++) { - if ((cp_ptr->gods | spp_ptr->gods) & BIT(n)) + if (god_enabled(&deity_info[n]) && + ((cp_ptr->gods | spp_ptr->gods) & BIT(n))) + { choice[max++] = n; + } } if (!max) @@ -2368,8 +2369,6 @@ static bool_ player_birth_aux_ask() if (c == 'Q') quit(NULL); if (c == 'S') { - C_FREE(choice, max_gods, int); - return (FALSE); } if (c == '*') @@ -2424,8 +2423,6 @@ static bool_ player_birth_aux_ask() else bell(); } - C_FREE(choice, max_gods, int); - /* Set god */ p_ptr->pgod = k; p_ptr->grace = 0; |