Fix BoE build (was broken by enchantments change) and make more use of the direction enum
This commit is contained in:
@@ -740,7 +740,8 @@ static void handle_item_shop_action(short item_hit) {
|
||||
else {
|
||||
play_sound(51);
|
||||
ASB("Your item is now enchanted.");
|
||||
enchant_weapon(stat_window,item_hit,shop_identify_cost,store_selling_values[i]);
|
||||
eEnchant ench = eEnchant(shop_identify_cost);
|
||||
univ.party[stat_window].items[item_hit].enchant_weapon(ench,store_selling_values[i]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -161,7 +161,7 @@ static void init_party_scen_data() {
|
||||
univ.party.special_notes.clear();
|
||||
univ.party.talk_save.clear();
|
||||
|
||||
univ.party.direction = 0;
|
||||
univ.party.direction = DIR_N;
|
||||
univ.party.at_which_save_slot = 0;
|
||||
for(i = 0; i < univ.scenario.towns.size(); i++)
|
||||
univ.party.can_find_town[i] = !univ.scenario.towns[i]->is_hidden;
|
||||
|
@@ -668,7 +668,7 @@ bool abil_exists(eItemAbil abil) { // use when outdoors
|
||||
|
||||
|
||||
|
||||
void start_town_combat(short direction) {
|
||||
void start_town_combat(eDirection direction) {
|
||||
short i;
|
||||
|
||||
place_party(direction);
|
||||
@@ -708,7 +708,7 @@ void start_town_combat(short direction) {
|
||||
|
||||
}
|
||||
|
||||
short end_town_combat() {
|
||||
eDirection end_town_combat() {
|
||||
short num_tries = 0,r1,i;
|
||||
|
||||
r1 = get_ran(1,0,5);
|
||||
|
@@ -9,8 +9,8 @@ void handle_leave_town_specials(short town_number, short which_spec,location sta
|
||||
void handle_town_specials(short town_number, bool town_dead,location start_loc) ;
|
||||
bool abil_exists(eItemAbil abil);
|
||||
|
||||
void start_town_combat(short direction);
|
||||
short end_town_combat();
|
||||
void start_town_combat(eDirection direction);
|
||||
eDirection end_town_combat();
|
||||
void place_party(short direction);
|
||||
void create_out_combat_terrain(short type,short num_walls,short spec_code);
|
||||
void elim_monst(ter_num_t which,short spec_a,short spec_b);
|
||||
|
@@ -55,19 +55,6 @@ enum class eMonstGen {RAY, TOUCH, GAZE, BREATH, SPIT};
|
||||
|
||||
enum class eMonstSummon {TYPE, LEVEL, SPECIES};
|
||||
|
||||
// Directions!
|
||||
enum eDirection {
|
||||
DIR_N = 0,
|
||||
DIR_NE = 1,
|
||||
DIR_E = 2,
|
||||
DIR_SE = 3,
|
||||
DIR_S = 4,
|
||||
DIR_SW = 5,
|
||||
DIR_W = 6,
|
||||
DIR_NW = 7,
|
||||
DIR_HERE = 8,
|
||||
};
|
||||
|
||||
inline eDirection& operator++ (eDirection& me, int) {
|
||||
if(me == DIR_HERE) return me = DIR_N;
|
||||
else return me = (eDirection)(1 + (int)me);
|
||||
|
@@ -127,7 +127,7 @@ void cParty::append(legacy::party_record_type& old){
|
||||
talk_save.push_back(t);
|
||||
help_received[i] = old.help_received[i];
|
||||
}
|
||||
direction = old.direction;
|
||||
direction = eDirection(old.direction);
|
||||
at_which_save_slot = old.at_which_save_slot;
|
||||
for(i = 0; i < 20 ; i++)
|
||||
alchemy[i] = old.alchemy[i];
|
||||
|
@@ -93,7 +93,7 @@ public:
|
||||
std::map<ePartyStatus,short> status;
|
||||
location left_at;
|
||||
size_t left_in;
|
||||
short direction;
|
||||
eDirection direction;
|
||||
short at_which_save_slot;
|
||||
char alchemy[20];
|
||||
bool can_find_town[200];
|
||||
|
@@ -51,7 +51,8 @@ public:
|
||||
// transient stuff
|
||||
std::map<eSkill,eSpell> last_cast;
|
||||
location combat_pos;
|
||||
short marked_damage = 0, dir, parry, last_attacked;
|
||||
short marked_damage = 0, parry, last_attacked;
|
||||
eDirection dir;
|
||||
|
||||
void finish_create();
|
||||
void apply_status(eStatus which, int how_much);
|
||||
|
@@ -16,6 +16,19 @@ typedef signed short spec_num_t;
|
||||
typedef signed short item_num_t;
|
||||
typedef unsigned short str_num_t;
|
||||
|
||||
// Directions!
|
||||
enum eDirection {
|
||||
DIR_N = 0,
|
||||
DIR_NE = 1,
|
||||
DIR_E = 2,
|
||||
DIR_SE = 3,
|
||||
DIR_S = 4,
|
||||
DIR_SW = 5,
|
||||
DIR_W = 6,
|
||||
DIR_NW = 7,
|
||||
DIR_HERE = 8,
|
||||
};
|
||||
|
||||
enum class eMainStatus {
|
||||
ABSENT = 0, // absent, empty slot
|
||||
ALIVE = 1,
|
||||
|
Reference in New Issue
Block a user