diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 16:16:17 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 17:49:18 +0200 |
commit | b6c2bf9050a56841bb5a82549fd36a98b03e2f41 (patch) | |
tree | 3f5f7d75af05de6306ad7fb6ce9155a663e91c5d /src/init2.c | |
parent | 838246d8d5d9febf38452f82692b25d7dc092ef3 (diff) |
Lua: Remove unnecessary dynamism from "powers" handling
Diffstat (limited to 'src/init2.c')
-rw-r--r-- | src/init2.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/init2.c b/src/init2.c index 015a1c0f..8a20cfb3 100644 --- a/src/init2.c +++ b/src/init2.c @@ -1959,13 +1959,6 @@ static errr init_misc(void) /* Hack -- No messages yet */ message__tail = MESSAGE_BUF; - /* Prepare powers */ - p_ptr->powers = NULL; - powers_type = NULL; - power_max = POWER_MAX_INIT; - reinit_powers_type(power_max); - C_COPY(powers_type, powers_type_init, POWER_MAX_INIT, power_type); - /* Prepare quests */ quest = NULL; max_q_idx = MAX_Q_IDX_INIT; @@ -2080,34 +2073,6 @@ static errr init_wilderness(void) return 0; } -/* - * XXX XXX XXX XXX XXX Realloc is not guaranteed to work (see main-gtk.c - * and main-mac.c. - */ -void reinit_powers_type(s16b new_size) -{ - power_type *new_powers_type; - bool_ *new_powers; - - C_MAKE(new_powers_type, new_size, power_type); - C_MAKE(new_powers, new_size, bool_); - - /* Reallocate the extra memory */ - if (powers_type && p_ptr->powers) - { - C_COPY(new_powers_type, powers_type, power_max, power_type); - C_COPY(new_powers, p_ptr->powers, power_max, bool_); - - C_FREE(powers_type, power_max, power_type); - C_FREE(p_ptr->powers, power_max, bool_); - } - - powers_type = new_powers_type; - p_ptr->powers = new_powers; - - power_max = new_size; -} - void reinit_quests(s16b new_size) { quest_type *new_quest; |