diff --git a/src/boe.combat.cpp b/src/boe.combat.cpp index 7fb5d5fb..d2bd72a7 100644 --- a/src/boe.combat.cpp +++ b/src/boe.combat.cpp @@ -148,7 +148,7 @@ effect_pat_type open_square = {{ {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}}}; -effect_pat_type rad2 = {{ +effect_pat_type radius2 = {{ {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,1,1,1,0,0,0}, @@ -158,7 +158,7 @@ effect_pat_type rad2 = {{ {0,0,0,1,1,1,0,0,0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}}}; -effect_pat_type rad3 = {{ +effect_pat_type radius3 = {{ {0,0,0,0,0,0,0,0,0}, {0,0,0,1,1,1,0,0,0}, {0,0,1,1,1,1,1,0,0}, @@ -1010,7 +1010,7 @@ void do_combat_cast(location target) { add_missile(target,9,1,0,0); store_sound = 11; r1 = min(18,(level * 7) / 10 + 2 * bonus); - place_spell_pattern(rad2,target,DAMAGE_MAGIC,r1,current_pc); + place_spell_pattern(radius2,target,DAMAGE_MAGIC,r1,current_pc); ashes_loc = target; break; @@ -1065,7 +1065,7 @@ void do_combat_cast(location target) { r1 = min(12,1 + (level * 2) / 3 + bonus) + 2; if(r1 > 20) r1 = (r1 * 8) / 10; - place_spell_pattern(rad2,target,DAMAGE_FIRE,r1,current_pc); + place_spell_pattern(radius2,target,DAMAGE_FIRE,r1,current_pc); ashes_loc = target; break; case eSpell::KILL: @@ -1418,7 +1418,7 @@ void load_missile() { add_string_to_buf(" (Hit 's' to cancel.)"); current_spell_range = 12; if(univ.party[current_pc].items[arrow].ability == eItemAbil::MISSILE_EXPLODING) - current_pat = rad2; + current_pat = radius2; else current_pat = single; } @@ -1487,7 +1487,7 @@ void fire_missile(location target) { pause(dist(univ.party[current_pc].combat_pos,target)*5); run_a_missile(univ.party[missile_firer].combat_pos,target,2,1,5,0,0,100); start_missile_anim(); - place_spell_pattern(rad2,target, DAMAGE_FIRE,univ.party[missile_firer].items[ammo_inv_slot].ability_strength * 2,missile_firer); + place_spell_pattern(radius2,target, DAMAGE_FIRE,univ.party[missile_firer].items[ammo_inv_slot].ability_strength * 2,missile_firer); do_explosion_anim(5,0); end_missile_anim(); handle_marked_damage(); @@ -2610,7 +2610,7 @@ void monst_fire_missile(short m_num,short bless,short level,location source,shor ASB("Creature breathes."); run_a_missile(source,targ_space,0,0,44, 0,0,100); - place_spell_pattern(rad2,targ_space,CLOUD_SLEEP,7); + place_spell_pattern(radius2,targ_space,CLOUD_SLEEP,7); } else if(level == 14) { // vapors //play_sound(44); @@ -3066,7 +3066,7 @@ bool monst_cast_mage(cCreature *caster,short targ) { break; case eSpell::CONFLAGRATION: run_a_missile(l,target,13,1,25,0,0,80); - place_spell_pattern(rad2,target,WALL_FIRE,7); + place_spell_pattern(radius2,target,WALL_FIRE,7); break; case eSpell::FIREBALL: r1 = 1 + (caster->level * 3) / 4; @@ -3108,7 +3108,7 @@ bool monst_cast_mage(cCreature *caster,short targ) { break; case eSpell::WEB: play_sound(25); - place_spell_pattern(rad2,target,FIELD_WEB,7); + place_spell_pattern(radius2,target,FIELD_WEB,7); break; case eSpell::POISON: run_a_missile(l,vict_loc,11,0,25,0,0,80); @@ -3153,12 +3153,12 @@ bool monst_cast_mage(cCreature *caster,short targ) { r1 = 1 + (caster->level * 3) / 4 + 3; if(r1 > 29) r1 = 29; start_missile_anim(); - place_spell_pattern(rad2,target,DAMAGE_FIRE,r1,7); + place_spell_pattern(radius2,target,DAMAGE_FIRE,r1,7); ashes_loc = target; break; case eSpell::SHOCKSTORM: run_a_missile(l,target,6,1,11,0,0,80); - place_spell_pattern(rad2,target,WALL_FORCE,7); + place_spell_pattern(radius2,target,WALL_FORCE,7); break; case eSpell::POISON_MAJOR: run_a_missile(l,vict_loc,11,1,11,0,0,80); @@ -3513,7 +3513,7 @@ bool monst_cast_priest(cCreature *caster,short targ) { r1 = (caster->level * 3) / 4 + 5; if(r1 > 29) r1 = 29; start_missile_anim(); - place_spell_pattern(rad2,target,DAMAGE_MAGIC,r1,7 ); + place_spell_pattern(radius2,target,DAMAGE_MAGIC,r1,7 ); ashes_loc = target; break; } @@ -4409,7 +4409,7 @@ bool combat_cast_mage_spell() { break; case eSpell::BLADE_AURA: // Pyhrrus effect - place_spell_pattern(rad2,univ.party[current_pc].combat_pos,WALL_BLADES,6); + place_spell_pattern(radius2,univ.party[current_pc].combat_pos,WALL_BLADES,6); break; } @@ -4601,10 +4601,10 @@ void start_spell_targeting(eSpell num, bool freebie) { case eSpell::CONFLAGRATION: case eSpell::FIRESTORM: case eSpell::SHOCKSTORM: case eSpell::WEB: case eSpell::ANTIMAGIC: case eSpell::WALL_ICE_BALL: case eSpell::CLOUD_SLEEP_LARGE: case eSpell::DIVINE_THUD: case eSpell::DISPEL_SPHERE: - current_pat = rad2; + current_pat = radius2; break; case eSpell::PESTILENCE: case eSpell::GOO_BOMB: case eSpell::FOUL_VAPOR: - current_pat = rad3; + current_pat = radius3; break; case eSpell::WALL_FORCE: case eSpell::WALL_ICE: case eSpell::WALL_BLADES: add_string_to_buf(" (Hit space to rotate.)"); diff --git a/src/boe.main.cpp b/src/boe.main.cpp index 76b9d73d..2e0c0e1c 100644 --- a/src/boe.main.cpp +++ b/src/boe.main.cpp @@ -614,7 +614,7 @@ void handle_menu_choice(eMenu item_hit) { } make_cursor_sword(); break; - case eMenu::HELP_INDEX: + case eMenu::HELP_TOC: launchURL("https://calref.net/~sylae/boe-doc/game/Contents.html"); break; case eMenu::ABOUT_MAGE: diff --git a/src/boe.menus.h b/src/boe.menus.h index 784a8260..85d6ab77 100644 --- a/src/boe.menus.h +++ b/src/boe.menus.h @@ -24,7 +24,7 @@ enum class eMenu { OPTIONS_TALK_NOTES, OPTIONS_ENCOUNTER_NOTES, OPTIONS_STATS, OPTIONS_JOURNAL, ACTIONS_ALCHEMY, ACTIONS_WAIT, ACTIONS_AUTOMAP, LIBRARY_MAGE, LIBRARY_PRIEST, LIBRARY_SKILLS, LIBRARY_ALCHEMY, LIBRARY_TIPS, LIBRARY_INTRO, - HELP_INDEX, HELP_OUT, HELP_TOWN, HELP_COMBAT, HELP_BARRIER, HELP_HINTS, HELP_SPELLS, + HELP_TOC, HELP_OUT, HELP_TOWN, HELP_COMBAT, HELP_BARRIER, HELP_HINTS, HELP_SPELLS, // The "About This Menu" options ABOUT_MONSTERS, ABOUT_MAGE, ABOUT_PRIEST, }; diff --git a/src/boe.menus.win.cpp b/src/boe.menus.win.cpp index 649b6592..ac764579 100644 --- a/src/boe.menus.win.cpp +++ b/src/boe.menus.win.cpp @@ -88,7 +88,7 @@ void init_menubar() { eMenu::NONE, eMenu::LIBRARY_INTRO, }; static const eMenu help_choices[] = { - eMenu::HELP_INDEX, eMenu::ABOUT, eMenu::NONE, eMenu::HELP_OUT, eMenu::HELP_TOWN, eMenu::HELP_COMBAT, eMenu::HELP_BARRIER, + eMenu::HELP_TOC, eMenu::ABOUT, eMenu::NONE, eMenu::HELP_OUT, eMenu::HELP_TOWN, eMenu::HELP_COMBAT, eMenu::HELP_BARRIER, eMenu::NONE, eMenu::HELP_HINTS, eMenu::HELP_SPELLS, }; diff --git a/src/boe.party.cpp b/src/boe.party.cpp index 8e9efbee..d58ed63a 100644 --- a/src/boe.party.cpp +++ b/src/boe.party.cpp @@ -75,7 +75,7 @@ extern eSpell store_mage, store_priest; //extern cOutdoors outdoors[2][2]; extern short store_mage_lev, store_priest_lev; extern short store_spell_target,pc_casting,stat_screen_mode; -extern effect_pat_type null_pat,single,t,square,rad2,rad3; +extern effect_pat_type null_pat,single,t,square,radius2,radius3; extern effect_pat_type current_pat; extern short current_spell_range; extern short hit_chance[21],combat_active_pc;//,pc_moves[6]; @@ -1037,7 +1037,7 @@ void do_mage_spell(short pc_num,eSpell spell_num) { case eSpell::ANTIMAGIC: add_string_to_buf(" Target spell. "); - current_pat = rad2; + current_pat = radius2; start_town_targeting(spell_num,pc_num); break; @@ -1175,7 +1175,7 @@ void do_priest_spell(short pc_num,eSpell spell_num) { case eSpell::DISPEL_SPHERE: case eSpell::DISPEL_FIELD: add_string_to_buf(" Target spell. "); - current_pat = (spell_num == eSpell::DISPEL_SPHERE) ? rad2 : single; + current_pat = (spell_num == eSpell::DISPEL_SPHERE) ? radius2 : single; start_town_targeting(spell_num,pc_num); break; diff --git a/src/boe.specials.cpp b/src/boe.specials.cpp index 9e338b2e..c625c104 100644 --- a/src/boe.specials.cpp +++ b/src/boe.specials.cpp @@ -2017,7 +2017,7 @@ void run_special(eSpecCtx which_mode,short which_type,short start_spec,location //print_nums(1111,cur_spec_type,cur_node.type); - if(cur_node.type == eSpecType::ERROR) { + if(cur_node.type == eSpecType::INVALID) { special_in_progress = false; return; } @@ -2072,7 +2072,7 @@ cSpecial get_node(short cur_spec,short cur_spec_type) { cSpecial dummy_node; dummy_node = univ.scenario.scen_specials[0]; - dummy_node.type = eSpecType::ERROR; + dummy_node.type = eSpecType::INVALID; if(cur_spec_type == 0) { if(cur_spec != minmax(0,255,cur_spec)) { giveError("The scenario called a scenario special node out of range."); diff --git a/src/classes/simpletypes.h b/src/classes/simpletypes.h index dd6b814c..edd56edc 100644 --- a/src/classes/simpletypes.h +++ b/src/classes/simpletypes.h @@ -568,7 +568,7 @@ enum class eSpecCtx { }; enum class eSpecType { - ERROR = -1, // A magic value used while processing nodes + INVALID = -1, // A magic value used while processing nodes NONE = 0, SET_SDF = 1, INC_SDF = 2, diff --git a/src/classes/special.cpp b/src/classes/special.cpp index 46549f4f..a88a6195 100644 --- a/src/classes/special.cpp +++ b/src/classes/special.cpp @@ -219,7 +219,7 @@ std::istream& operator >> (std::istream& in, eSpecType& e) { in >> i; e = (eSpecType) i; if(getNodeCategory(e) == eSpecCat::INVALID) - e = eSpecType::ERROR; + e = eSpecType::INVALID; return in; } diff --git a/src/pcedit/pc.menus.h b/src/pcedit/pc.menus.h index 712bf7e5..edbf03ba 100644 --- a/src/pcedit/pc.menus.h +++ b/src/pcedit/pc.menus.h @@ -15,7 +15,7 @@ void menu_activate(); enum class eMenu { NONE, ABOUT, QUIT, - FILE_OPEN, FILE_CLOSE, FILE_SAVE, FILE_SAVE_AS, FILE_REVERT, HELP_INDEX, + FILE_OPEN, FILE_CLOSE, FILE_SAVE, FILE_SAVE_AS, FILE_REVERT, HELP_TOC, // Edit Party menu EDIT_GOLD, EDIT_FOOD, EDIT_ALCHEMY, HEAL_DAMAGE, RESTORE_MANA, RAISE_DEAD, CURE_CONDITIONS, diff --git a/src/scenedit/scen.core.cpp b/src/scenedit/scen.core.cpp index c8bfffe9..98f2bd0e 100644 --- a/src/scenedit/scen.core.cpp +++ b/src/scenedit/scen.core.cpp @@ -1564,7 +1564,7 @@ bool edit_make_scen_2(short& out_w, short& out_h, short& town_l, short& town_m, extern fs::path progDir; extern eScenMode overall_mode; bool build_scenario() { - short width, height, large, med, small, which_town; + short width, height, lg, med, sm, which_town; bool default_town, grass; std::string filename, title; short i,j; @@ -1573,7 +1573,7 @@ bool build_scenario() { if(!edit_make_scen_1(filename, title, grass)) return false; filename += ".boes"; - if(!edit_make_scen_2(width, height, large, med, small, default_town)) + if(!edit_make_scen_2(width, height, lg, med, sm, default_town)) return false; scenario = cScenario(true); scenario.scen_name = title; @@ -1606,7 +1606,7 @@ bool build_scenario() { scenario.towns.push_back(warriors_grove); // TODO: Append i+1 to each town name - for(i = 0; i < large; i++) { + for(i = 0; i < lg; i++) { which_town = scenario.num_towns; scenario.num_towns++; scenario.town_size[which_town] = 0; @@ -1624,7 +1624,7 @@ bool build_scenario() { scenario.addTown(); town->town_name = "Medium town"; } - for(i = 0; i < small; i++) { + for(i = 0; i < sm; i++) { which_town = scenario.num_towns; scenario.num_towns++; scenario.town_size[which_town] = 2; diff --git a/src/scenedit/scen.main.cpp b/src/scenedit/scen.main.cpp index e531754f..59c25843 100644 --- a/src/scenedit/scen.main.cpp +++ b/src/scenedit/scen.main.cpp @@ -465,7 +465,7 @@ void handle_menu_choice(eMenu item_hit) { helpDlog = "about-scened"; isHelp = true; break; - case eMenu::HELP_INDEX: + case eMenu::HELP_TOC: launchURL("https://calref.net/~sylae/boe-doc/editor/About.html"); break; case eMenu::HELP_START: diff --git a/src/scenedit/scen.menus.h b/src/scenedit/scen.menus.h index 9da46f6b..a20891ee 100644 --- a/src/scenedit/scen.menus.h +++ b/src/scenedit/scen.menus.h @@ -17,7 +17,7 @@ enum class eMenu { NONE, ABOUT, QUIT, FRILL, UNFRILL, FILE_NEW, FILE_OPEN, FILE_CLOSE, FILE_SAVE, FILE_REVERT, EDIT_UNDO, EDIT_REDO, EDIT_CUT, EDIT_COPY, EDIT_PASTE, EDIT_DELETE, EDIT_SELECT_ALL, - HELP_INDEX, HELP_START, HELP_TEST, HELP_DIST, HELP_CONTEST, + HELP_TOC, HELP_START, HELP_TEST, HELP_DIST, HELP_CONTEST, // Scenario menu TOWN_CREATE, SCEN_DETAILS, SCEN_INTRO, TOWN_START, SCEN_SPECIALS, SCEN_TEXT, SCEN_JOURNALS, TOWN_IMPORT, diff --git a/src/scenedit/scen.menus.win.cpp b/src/scenedit/scen.menus.win.cpp index 458ed095..171db0b3 100644 --- a/src/scenedit/scen.menus.win.cpp +++ b/src/scenedit/scen.menus.win.cpp @@ -85,7 +85,7 @@ void init_menubar() { eMenu::OUT_SPECIALS, eMenu::OUT_TEXT, eMenu::OUT_SIGNS, }; static const eMenu help_choices[] = { - eMenu::HELP_INDEX, eMenu::ABOUT, eMenu::NONE, eMenu::HELP_START, eMenu::HELP_TEST, eMenu::HELP_DIST, + eMenu::HELP_TOC, eMenu::ABOUT, eMenu::NONE, eMenu::HELP_START, eMenu::HELP_TEST, eMenu::HELP_DIST, }; HMENU file_menu = GetSubMenu(menuHandle, FILE_MENU_POS);