Fixed warnings and IMPLEMENTED A THING in the menu item switch.
This commit is contained in:
12
rsrc/dialogs/abort-game.xml
Normal file
12
rsrc/dialogs/abort-game.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
|
||||
<!--<!DOCTYPE dialog SYSTEM "dialog.dtd">-->
|
||||
<dialog skin='dark' defbtn='cancel'>
|
||||
<pict type='dlog' num='23' top='9' left='9'/>
|
||||
<text top='6' left='53' width='249' height='31'>
|
||||
If you return to the Main Menu, your unsaved progress will be lost.
|
||||
Are you sure you want to do this?
|
||||
</text>
|
||||
<button name='cancel' type='regular' def-key='esc' top='45' left='244'>Cancel</button>
|
||||
<button name='okay' type='large' top='45' left='134'>Main Menu</button>
|
||||
</dialog>
|
@@ -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 = "<group>"; };
|
||||
91FDB5771A4E71A900DE5983 /* shop.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = shop.hpp; sourceTree = "<group>"; };
|
||||
91FDB5791A4E774E00DE5983 /* shop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shop.cpp; sourceTree = "<group>"; };
|
||||
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";
|
||||
|
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>B72B4AE7-6FC5-41F5-A36B-B8B215D30640</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>BoE</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>D78ED5374157250222BE351E55C6AAB18103EDCB</key>
|
||||
<string>https://github.com/calref/cboe</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>src/BoE.xcodeproj</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>D78ED5374157250222BE351E55C6AAB18103EDCB</key>
|
||||
<string>../../..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>https://github.com/calref/cboe</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>111</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>D78ED5374157250222BE351E55C6AAB18103EDCB</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>D78ED5374157250222BE351E55C6AAB18103EDCB</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>cboe-remote</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
@@ -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];
|
||||
|
@@ -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<eMonstAbil,uAbility> 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;
|
||||
|
@@ -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);
|
||||
|
@@ -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};
|
||||
|
@@ -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) {
|
||||
|
@@ -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);
|
||||
|
@@ -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<cPict&>(me["pic"]);
|
||||
if(store_m.invisible)
|
||||
|
@@ -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();
|
||||
|
@@ -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;
|
||||
|
@@ -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<cPlayer*>(current_pc_picked_in_spec_enc)) {
|
||||
else if(dynamic_cast<cPlayer*>(current_pc_picked_in_spec_enc)) {
|
||||
int pc = univ.get_target_i(*current_pc_picked_in_spec_enc);
|
||||
eMainStatus stat;
|
||||
switch(spec.ex1a) {
|
||||
|
@@ -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);
|
||||
});
|
||||
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -43,7 +43,7 @@ public:
|
||||
class cTimer {
|
||||
public:
|
||||
long time;
|
||||
bool node_type;
|
||||
short node_type;
|
||||
short node;
|
||||
};
|
||||
|
||||
|
@@ -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<mon_num_t>(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<mon_num_t>(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) {
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user