From 1477fef7ce228b2a01ba7678a29501fcc874f883 Mon Sep 17 00:00:00 2001 From: Ben Scott Date: Thu, 12 Feb 2015 01:47:48 -0500 Subject: [PATCH] Fixed warnings and IMPLEMENTED A THING in the menu item switch. --- rsrc/dialogs/abort-game.xml | 12 +++++ src/BoE.xcodeproj/project.pbxproj | 44 ++++++++++++++++++- .../xcshareddata/BoE.xccheckout | 41 +++++++++++++++++ src/boe.actions.cpp | 4 +- src/boe.combat.cpp | 15 ++----- src/boe.dlgutil.cpp | 1 - src/boe.graphics.cpp | 2 +- src/boe.graphutil.cpp | 17 ------- src/boe.graphutil.h | 1 - src/boe.infodlg.cpp | 2 +- src/boe.main.cpp | 13 +++++- src/boe.newgraph.cpp | 2 +- src/boe.specials.cpp | 6 +-- src/boe.town.cpp | 2 +- src/classes/scenario.cpp | 2 +- src/classes/special.h | 2 +- src/scenedit/scen.actions.cpp | 10 ++--- src/tools/fileio_scen.cpp | 2 +- 18 files changed, 128 insertions(+), 50 deletions(-) create mode 100644 rsrc/dialogs/abort-game.xml create mode 100644 src/BoE.xcodeproj/project.xcworkspace/xcshareddata/BoE.xccheckout diff --git a/rsrc/dialogs/abort-game.xml b/rsrc/dialogs/abort-game.xml new file mode 100644 index 00000000..58f825de --- /dev/null +++ b/rsrc/dialogs/abort-game.xml @@ -0,0 +1,12 @@ + + + + + + + If you return to the Main Menu, your unsaved progress will be lost. + Are you sure you want to do this? + + + + \ No newline at end of file diff --git a/src/BoE.xcodeproj/project.pbxproj b/src/BoE.xcodeproj/project.pbxproj index b52f5fd9..6f7b394c 100755 --- a/src/BoE.xcodeproj/project.pbxproj +++ b/src/BoE.xcodeproj/project.pbxproj @@ -297,6 +297,12 @@ 91FCC8F418FF0866007026CE /* pc.appleevents.mm in Sources */ = {isa = PBXBuildFile; fileRef = 91FCC8F318FF069A007026CE /* pc.appleevents.mm */; }; 91FDB57B1A4E77CA00DE5983 /* shop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 91FDB5791A4E774E00DE5983 /* shop.cpp */; }; 91FDB57C1A4E77CA00DE5983 /* shop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 91FDB5791A4E774E00DE5983 /* shop.cpp */; }; + DCCA42001A8C467000E6A9A5 /* SFML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 91F6F8E218F87F3700E3EA15 /* SFML.framework */; }; + DCCA42021A8C467800E6A9A5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DCCA42011A8C467800E6A9A5 /* libz.dylib */; }; + DCCA42031A8C469400E6A9A5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DCCA42011A8C467800E6A9A5 /* libz.dylib */; }; + DCCA42041A8C46A600E6A9A5 /* SFML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 91F6F8E218F87F3700E3EA15 /* SFML.framework */; }; + DCCA42051A8C46B500E6A9A5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DCCA42011A8C467800E6A9A5 /* libz.dylib */; }; + DCCA42061A8C46BE00E6A9A5 /* SFML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 91F6F8E218F87F3700E3EA15 /* SFML.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -720,6 +726,7 @@ 91FCC8F318FF069A007026CE /* pc.appleevents.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = pc.appleevents.mm; sourceTree = ""; }; 91FDB5771A4E71A900DE5983 /* shop.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = shop.hpp; sourceTree = ""; }; 91FDB5791A4E774E00DE5983 /* shop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shop.cpp; sourceTree = ""; }; + DCCA42011A8C467800E6A9A5 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -727,6 +734,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DCCA42041A8C46A600E6A9A5 /* SFML.framework in Frameworks */, + DCCA42031A8C469400E6A9A5 /* libz.dylib in Frameworks */, 914B2AA318E7E507007B6799 /* Cocoa.framework in Frameworks */, 914B2AA618E7E50D007B6799 /* OpenGL.framework in Frameworks */, 914B2ABF18E7E543007B6799 /* sndfile.framework in Frameworks */, @@ -742,6 +751,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DCCA42021A8C467800E6A9A5 /* libz.dylib in Frameworks */, + DCCA42001A8C467000E6A9A5 /* SFML.framework in Frameworks */, 914B2AA418E7E509007B6799 /* Cocoa.framework in Frameworks */, 914B2AA718E7E50E007B6799 /* OpenGL.framework in Frameworks */, 914B2AC018E7E544007B6799 /* sndfile.framework in Frameworks */, @@ -757,6 +768,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DCCA42061A8C46BE00E6A9A5 /* SFML.framework in Frameworks */, + DCCA42051A8C46B500E6A9A5 /* libz.dylib in Frameworks */, 914B2AA518E7E50A007B6799 /* Cocoa.framework in Frameworks */, 914B2AA818E7E50E007B6799 /* OpenGL.framework in Frameworks */, 914B2AC118E7E544007B6799 /* sndfile.framework in Frameworks */, @@ -991,6 +1004,7 @@ 914B2AA018E7E4A3007B6799 /* Linked Frameworks */ = { isa = PBXGroup; children = ( + DCCA42011A8C467800E6A9A5 /* libz.dylib */, 914B2AA118E7E500007B6799 /* Cocoa.framework */, 914B2AA218E7E500007B6799 /* OpenGL.framework */, 91F6F8E218F87F3700E3EA15 /* SFML.framework */, @@ -1706,11 +1720,12 @@ "-Werror=return-type", "-Werror=parentheses", "-Werror=dangling-else", + "-isystem/usr/local/Cellar/boost/1.57.0/include", ); OTHER_LDFLAGS = ( "-lboost_filesystem", "-lboost_system", - "-lz", + "-L/usr/local/Cellar/boost/1.57.0/lib", ); OTHER_LDFLAGS_QUOTED_FOR_PROJECT_1 = "\"$(PROJECT_DIR)/misc/\""; STRIP_INSTALLED_PRODUCT = NO; @@ -1761,11 +1776,12 @@ "-Werror=return-type", "-Werror=parentheses", "-Werror=dangling-else", + "-isystem/usr/local/Cellar/boost/1.57.0/include", ); OTHER_LDFLAGS = ( "-lboost_filesystem", "-lboost_system", - "-lz", + "-L/usr/local/Cellar/boost/1.57.0/lib", ); OTHER_LDFLAGS_QUOTED_FOR_PROJECT_1 = "\"$(PROJECT_DIR)/misc/\""; WARNING_CFLAGS = ( @@ -1779,6 +1795,10 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(LOCAL_LIBRARY_DIR)/Frameworks", + ); GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1795,6 +1815,10 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(LOCAL_LIBRARY_DIR)/Frameworks", + ); GCC_GENERATE_DEBUGGING_SYMBOLS = NO; INFOPLIST_FILE = "Blades of Exile-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; @@ -1830,6 +1854,10 @@ buildSettings = { CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Scenario Editor"; COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(LOCAL_LIBRARY_DIR)/Frameworks", + ); GCC_DYNAMIC_NO_PIC = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; @@ -1848,6 +1876,10 @@ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Scenario Editor"; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(LOCAL_LIBRARY_DIR)/Frameworks", + ); GCC_MODEL_TUNING = G5; INFOPLIST_FILE = "pcedit/Blades of Exile Character Editor-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; @@ -1863,6 +1895,10 @@ buildSettings = { CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)/Scenario Editor"; COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(LOCAL_LIBRARY_DIR)/Frameworks", + ); GCC_DYNAMIC_NO_PIC = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; @@ -1881,6 +1917,10 @@ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)/Scenario Editor"; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(LOCAL_LIBRARY_DIR)/Frameworks", + ); GCC_MODEL_TUNING = G5; INFOPLIST_FILE = "scenedit/BoE Scenario Editor-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; diff --git a/src/BoE.xcodeproj/project.xcworkspace/xcshareddata/BoE.xccheckout b/src/BoE.xcodeproj/project.xcworkspace/xcshareddata/BoE.xccheckout new file mode 100644 index 00000000..3ab49f72 --- /dev/null +++ b/src/BoE.xcodeproj/project.xcworkspace/xcshareddata/BoE.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + B72B4AE7-6FC5-41F5-A36B-B8B215D30640 + IDESourceControlProjectName + BoE + IDESourceControlProjectOriginsDictionary + + D78ED5374157250222BE351E55C6AAB18103EDCB + https://github.com/calref/cboe + + IDESourceControlProjectPath + src/BoE.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + D78ED5374157250222BE351E55C6AAB18103EDCB + ../../.. + + IDESourceControlProjectURL + https://github.com/calref/cboe + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + D78ED5374157250222BE351E55C6AAB18103EDCB + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + D78ED5374157250222BE351E55C6AAB18103EDCB + IDESourceControlWCCName + cboe-remote + + + + diff --git a/src/boe.actions.cpp b/src/boe.actions.cpp index db7f9d34..ae1addee 100644 --- a/src/boe.actions.cpp +++ b/src/boe.actions.cpp @@ -2224,7 +2224,7 @@ void do_rest(long length, int hp_restore, int mp_restore) { for(int j = 0; j < 24; j++) { cItem& item = univ.party[i].items[j]; if(item.ability != eItemAbil::OCCASIONAL_STATUS) continue; - if(item.abil_data[1] < 0 || item.abil_data[1] > 15) continue; + if(item.abil_data[1] > 15) continue; // item.abil_data[1] < 0 || i if(!item.abil_group()) continue; if(get_ran(1,0,5) != 3) continue; int how_much = item.abil_data[0]; @@ -2343,7 +2343,7 @@ void increase_age() { for(int j = 0; j < 24; j++) { cItem& item = univ.party[i].items[j]; if(item.ability != eItemAbil::OCCASIONAL_STATUS) continue; - if(item.abil_data[1] < 0 || item.abil_data[1] > 15) continue; + if(item.abil_data[1] > 15) continue; // item.abil_data[1] < 0 || i if(!item.abil_group()) continue; if(get_ran(1,0,5) != 3) continue; int how_much = item.abil_data[0]; diff --git a/src/boe.combat.cpp b/src/boe.combat.cpp index 49df328f..11eacd43 100644 --- a/src/boe.combat.cpp +++ b/src/boe.combat.cpp @@ -1773,8 +1773,7 @@ void fire_missile(location target) { if(r1 > hit_chance[skill]) add_string_to_buf(" Missed."); else if((victim = univ.target_there(target))) { - size_t i_monst = univ.get_target_i(*victim); - eDamageType dmg_tp = eDamageType::SPECIAL; + eDamageType dmg_tp = eDamageType::SPECIAL; // size_t i_monst = univ.get_target_i(*victim); spec_dam = calc_spec_dam(ammo.ability,ammo.abil_data[0],ammo.abil_data[1],*victim,dmg_tp); if(ammo.ability == eItemAbil::HEALING_WEAPON) { ASB(" There is a flash of light."); @@ -1964,7 +1963,7 @@ bool pick_next_pc() { void combat_run_monst() { - short i,item,item_level; + short i,item; //,item_level; bool update_stat = false; @@ -2138,12 +2137,6 @@ void do_monster_turn() { short i,j,k,num_monst, target,r1,move_target; cCreature *cur_monst; bool pc_adj[6]; - short abil_range[40] = { - 0,6,8,8,10, 10,10,8,6,8, 6,0,0,0,6, 0,0,0,0,4, 10,0,0,6,0, - 0,0,0,0,0, 0,0,8,6,9, 0,0,0,0,0}; - short abil_odds[40] = { - 0,5,7,6,6, 5,5,6,6,6, 6,0,0,0,4, 0,0,0,0,4, 8,0,0,7,0, - 0,0,0,0,0, 0,0,7,5,6, 0,0,0,0,0}; monsters_going = true; // This affects how graphics are drawn. @@ -2915,9 +2908,9 @@ void monster_attack(short who_att,iLiving* target) { //short target; // 100 + - monster is target void monst_fire_missile(short m_num,short bless,std::pair abil,location source,iLiving* target) { - short r1,r2,dam[40] = { + short i,j,r2;/*,dam[40] = { 0,1,2,3,4, 6,8,7,0,0, 0,0,0,0,0, 0,0,0,0,0, - 8,0,0,0,0, 0,0,0,0,0, 0,0,0,0,6, 0,0,0,0,0},i,j; + 8,0,0,0,0, 0,0,0,0,0, 0,0,0,0,6, 0,0,0,0,0},//*/ location targ_space; if(target == nullptr) return; diff --git a/src/boe.dlgutil.cpp b/src/boe.dlgutil.cpp index c3f34e95..9b9d14f2 100644 --- a/src/boe.dlgutil.cpp +++ b/src/boe.dlgutil.cpp @@ -1125,7 +1125,6 @@ void save_prefs(bool resetHelp){ static bool prefs_event_filter (cDialog& me, std::string id, eKeyMod) { bool did_cancel = false,reset_help = false; - short i; if(id == "okay") { me.toast(true); diff --git a/src/boe.graphics.cpp b/src/boe.graphics.cpp index c8151385..7c757f28 100644 --- a/src/boe.graphics.cpp +++ b/src/boe.graphics.cpp @@ -1445,7 +1445,7 @@ void boom_space(location where,short mode,short type,short damage,short sound) { location where_draw(4,4); rectangle source_rect = {0,0,36,28},text_rect,dest_rect = {13,13,49,41},big_to = {13,13,337,265},store_rect; short del_len; - short x_adj = 0,y_adj = 0,which_m; + short x_adj = 0,y_adj = 0; //,which_m; short sound_lookup[20] = { 97,69,70,71,72, 73,55,75,42,86, 87,88,89,98,0, 0,0,0,0,0}; diff --git a/src/boe.graphutil.cpp b/src/boe.graphutil.cpp index 2e515ffe..b2711e01 100644 --- a/src/boe.graphutil.cpp +++ b/src/boe.graphutil.cpp @@ -499,23 +499,6 @@ void draw_party_symbol(location center) { } } -// Give the position of the monster graphic in the picture resource -// Will store monsters the same in Exile's II and III -//short mode; // 0 - left 1 - right 2 - both -rectangle get_monster_rect (unsigned short type_wanted,short mode) { - rectangle store_rect; - short i; - - i = (short) type_wanted; - i = i % 20; - store_rect.top = 0 + BITMAP_HEIGHT * (i % 10) ; - store_rect.bottom = store_rect.top + BITMAP_HEIGHT; - store_rect.left = 0 + (i / 10) * BITMAP_WIDTH * 2 + ((mode != 1) ? 0 : 28); - store_rect.right = store_rect.left + BITMAP_WIDTH * ((mode == 2) ? 2 : 1); - - return store_rect; -} - // Give the position of the monster graphic in the template in memory //mode; // 0 - left 1 - right +10 - combat mode rectangle get_monster_template_rect (pic_num_t picture_wanted,short mode,short which_part) { diff --git a/src/boe.graphutil.h b/src/boe.graphutil.h index f407b99f..66f4db4f 100644 --- a/src/boe.graphutil.h +++ b/src/boe.graphutil.h @@ -13,7 +13,6 @@ void draw_pcs(location center,short mode); void draw_outd_boats(location center); void draw_town_boat(location center) ; void draw_party_symbol(location center); -rectangle get_monster_rect (pic_num_t type_wanted,short mode) ; rectangle get_monster_template_rect (pic_num_t type_wanted,short mode,short which_part) ; rectangle get_item_template_rect (short type_wanted); bool is_fluid(ter_num_t ter_type); diff --git a/src/boe.infodlg.cpp b/src/boe.infodlg.cpp index d0e4263b..f4d8a3dd 100644 --- a/src/boe.infodlg.cpp +++ b/src/boe.infodlg.cpp @@ -323,7 +323,7 @@ void display_pc_item(short pc_num,short item,cItem si,cDialog* parent) { static void put_monst_info(cDialog& me, const cCreature& store_m) { std::string store_text; std::string str; - short abil,i; + short i; //abil cPict& pic = dynamic_cast(me["pic"]); if(store_m.invisible) diff --git a/src/boe.main.cpp b/src/boe.main.cpp index 1f354d1a..b96bfc72 100644 --- a/src/boe.main.cpp +++ b/src/boe.main.cpp @@ -387,11 +387,21 @@ void handle_menu_choice(eMenu item_hit) { draw_startup(0); menu_activate(); break; + case eMenu::FILE_ABORT: + if(overall_mode != MODE_STARTUP) { + std::string choice = cChoiceDlog("abort-game",{"okay","cancel"}).show(); + if (choice=="cancel") return; + reload_startup(); + overall_mode = MODE_STARTUP; + } + party_in_memory = false; + draw_startup(0); + menu_activate(); + break; case eMenu::PREFS: pick_preferences(); break; case eMenu::QUIT: - if(overall_mode == MODE_STARTUP) { if(party_in_memory) { std::string choice = cChoiceDlog("quit-confirm-save", {"save","quit","cancel"}).show(); @@ -567,6 +577,7 @@ void handle_menu_choice(eMenu item_hit) { case eMenu::ABOUT_PRIEST: give_help(209,0); break; + case eMenu::ABOUT_MONSTERS: break; } if(!dialogToShow.empty()) cChoiceDlog(dialogToShow).show(); diff --git a/src/boe.newgraph.cpp b/src/boe.newgraph.cpp index 703eb14d..98e21050 100644 --- a/src/boe.newgraph.cpp +++ b/src/boe.newgraph.cpp @@ -753,7 +753,7 @@ void draw_shop_graphics(bool pressed,rectangle clip_area_rect) { if(shop_array[current_pos] < 0) break; // theoretically, this shouldn't happen cShopItem item = active_shop.getItem(shop_array[current_pos]); - eSpell spell; eSkill skill; + eSpell spell; cur_cost = item.getCost(active_shop.getCostAdjust()); base_item = item.item; std::string cur_name = base_item.full_name, cur_info_str; diff --git a/src/boe.specials.cpp b/src/boe.specials.cpp index 0be2ee12..371ba99d 100644 --- a/src/boe.specials.cpp +++ b/src/boe.specials.cpp @@ -483,7 +483,7 @@ bool check_special_terrain(location where_check,eSpecCtx mode,cPlayer& which_pc, // In town mode, process_fields() is responsible for actually dealing the damage // All this does is print a message void check_fields(location where_check,eSpecCtx mode,cPlayer& which_pc) { - short r1,i; + short r1;//,i; if(mode != eSpecCtx::COMBAT_MOVE && mode != eSpecCtx::TOWN_MOVE && mode != eSpecCtx::OUT_MOVE) { std::cout << "Note: Improper mode passed to check_special_terrain: " << int(mode) << std::endl; @@ -565,7 +565,7 @@ void use_item(short pc,short item) { eItemUse type; eSpell spell; location user_loc; - cCreature *which_m; +// cCreature *which_m; extern effect_pat_type single; eItemAbil abil = univ.party[pc].items[item].ability; level = univ.party[pc].items[item].item_level; @@ -3468,7 +3468,7 @@ void ifthen_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type, i = 0; if(spec.ex1a == -1) i = current_pc_picked_in_spec_enc->is_alive(); - else if(cPlayer* who = dynamic_cast(current_pc_picked_in_spec_enc)) { + else if(dynamic_cast(current_pc_picked_in_spec_enc)) { int pc = univ.get_target_i(*current_pc_picked_in_spec_enc); eMainStatus stat; switch(spec.ex1a) { diff --git a/src/boe.town.cpp b/src/boe.town.cpp index 09cc92ad..d0a146e3 100644 --- a/src/boe.town.cpp +++ b/src/boe.town.cpp @@ -604,7 +604,7 @@ location end_town_mode(short switching_level,location destination) { // returns to_return = univ.party.p_loc; std::remove_if(univ.party.party_event_timers.begin(), univ.party.party_event_timers.end(), [](const cTimer& t) { - return t.node_type == 2; + return (t.node_type == 2); }); } diff --git a/src/classes/scenario.cpp b/src/classes/scenario.cpp index 971ef474..67a0f5c1 100644 --- a/src/classes/scenario.cpp +++ b/src/classes/scenario.cpp @@ -108,7 +108,7 @@ cScenario::cItemStorage::cItemStorage() : ter_type(-1), property(0) { void cScenario::append(legacy::scenario_data_type& old){ is_legacy = true; - int i,j; + int i;//,j; difficulty = old.difficulty; intro_pic = old.intro_pic; default_ground = old.default_ground * 2; diff --git a/src/classes/special.h b/src/classes/special.h index 528d9272..a16fa95b 100644 --- a/src/classes/special.h +++ b/src/classes/special.h @@ -43,7 +43,7 @@ public: class cTimer { public: long time; - bool node_type; + short node_type; short node; }; diff --git a/src/scenedit/scen.actions.cpp b/src/scenedit/scen.actions.cpp index df52c974..7dcc4465 100644 --- a/src/scenedit/scen.actions.cpp +++ b/src/scenedit/scen.actions.cpp @@ -668,12 +668,12 @@ bool handle_action(location the_point,sf::Event /*event*/) { case MODE_PLACE_CREATURE: for(i = 0; i < town->creatures.size(); i++) if(town->creatures[i].number == 0) { - town->creatures[i] = {spot_hit, mode_count, scenario.scen_monsters[mode_count]}; + town->creatures[i] = {spot_hit, static_cast(mode_count), scenario.scen_monsters[mode_count]}; last_placed_monst = town->creatures[i]; break; } if(i == town->creatures.size()) { // Placement failed - town->creatures.push_back({spot_hit, mode_count, scenario.scen_monsters[mode_count]}); + town->creatures.push_back({spot_hit, static_cast(mode_count), scenario.scen_monsters[mode_count]}); last_placed_monst = town->creatures.back(); } overall_mode = MODE_DRAWING; @@ -1866,7 +1866,8 @@ void adjust_space(location l) { bool place_item(location spot_hit,short which_item,bool property,bool always,short odds) { // odds 0 - 100, with 100 always - + (void) property; + (void) always; short x; if((which_item < 0) || (which_item >= scenario.scen_items.size())) @@ -2362,8 +2363,7 @@ void start_string_editing(short mode,short just_redo_text) { // mode 0 - scen 1 - out 2 - town // if just_redo_text not 0, simply need to update text portions void start_special_editing(short mode,short just_redo_text) { - short i; - char str[256]; + short i; // char str[256]; size_t num_specs; bool draw_full = false; switch(mode) { diff --git a/src/tools/fileio_scen.cpp b/src/tools/fileio_scen.cpp index 2cccb9be..a68db243 100644 --- a/src/tools/fileio_scen.cpp +++ b/src/tools/fileio_scen.cpp @@ -564,7 +564,7 @@ static void readTimerFromXml(ticpp::Element& data, cTimer& timer) { data.GetText(&timer.node); } -void initialXmlRead(ticpp::Document& data, std::string root_tag, int& maj, int& min, int& rev, std::string& fname) { +static void initialXmlRead(ticpp::Document& data, std::string root_tag, int& maj, int& min, int& rev, std::string& fname) { // This checks that the root tag is correct and reads the format version from the boes attribute. using namespace ticpp; maj = -1, min = -1, rev = -1; // These are currently unused, but eventually might be used if the format changes