Fix Windows build

This commit is contained in:
2015-10-15 15:16:05 -04:00
parent d8dc88e506
commit 63df1e4401
4 changed files with 8 additions and 8 deletions

View File

@@ -708,7 +708,7 @@ void pc_attack_weapon(short who_att,iLiving& target,short hit_adj,short dam_adj,
if(weap.weap_type == eSkill::INVALID) if(weap.weap_type == eSkill::INVALID)
skill = univ.party[who_att].skill(eSkill::EDGED_WEAPONS); skill = univ.party[who_att].skill(eSkill::EDGED_WEAPONS);
else if(weap.weap_type == eSkill::MAX_HP) else if(weap.weap_type == eSkill::MAX_HP)
skill = 20 * univ.party[who_att].cur_health / univ.party[who_att].m_health; skill = 20 * univ.party[who_att].cur_health / univ.party[who_att].max_health;
else if(weap.weap_type == eSkill::MAX_SP) else if(weap.weap_type == eSkill::MAX_SP)
skill = 20 * univ.party[who_att].cur_sp / univ.party[who_att].max_sp; skill = 20 * univ.party[who_att].cur_sp / univ.party[who_att].max_sp;
else skill = univ.party[who_att].skill(weap.weap_type); else skill = univ.party[who_att].skill(weap.weap_type);
@@ -725,7 +725,7 @@ void pc_attack_weapon(short who_att,iLiving& target,short hit_adj,short dam_adj,
// Forcecage penalties (reduced for pole weapons) // Forcecage penalties (reduced for pole weapons)
if(attacker.status[eStatus::FORCECAGE] > 0) if(attacker.status[eStatus::FORCECAGE] > 0)
r1 += what_skill == eSkill::POLE_WEAPONS ? 1 : 3; r1 += weap.weap_type == eSkill::POLE_WEAPONS ? 1 : 3;
if(target.status[eStatus::FORCECAGE] > 0) if(target.status[eStatus::FORCECAGE] > 0)
r1 += 1; r1 += 1;
@@ -793,7 +793,7 @@ void pc_attack_weapon(short who_att,iLiving& target,short hit_adj,short dam_adj,
if(weap.ability == eItemAbil::HEALING_WEAPON) { if(weap.ability == eItemAbil::HEALING_WEAPON) {
ASB(" There is a flash of light."); ASB(" There is a flash of light.");
target.heal(r2); target.heal(r2);
} else switch(what_skill) { } else switch(weap.weap_type) {
case eSkill::EDGED_WEAPONS: case eSkill::EDGED_WEAPONS:
if(weap.item_level < 8) if(weap.item_level < 8)
dmg_snd = 1; dmg_snd = 1;
@@ -879,7 +879,7 @@ void pc_attack_weapon(short who_att,iLiving& target,short hit_adj,short dam_adj,
draw_terrain(2); draw_terrain(2);
create_line = " " + univ.party[who_att].name + " misses."; create_line = " " + univ.party[who_att].name + " misses.";
add_string_to_buf(create_line); add_string_to_buf(create_line);
if(what_skill == eSkill::POLE_WEAPONS) if(weap.weap_type == eSkill::POLE_WEAPONS)
play_sound(19); play_sound(19);
else play_sound(2); else play_sound(2);
} }
@@ -1730,7 +1730,7 @@ void fire_missile(location target) {
if(missile.weap_type == eSkill::INVALID) if(missile.weap_type == eSkill::INVALID)
skill = missile_firer.skill(eSkill::ARCHERY); skill = missile_firer.skill(eSkill::ARCHERY);
else if(missile.weap_type == eSkill::MAX_HP) else if(missile.weap_type == eSkill::MAX_HP)
skill = 20 * missile_firer.cur_health / missile_firer.m_health; skill = 20 * missile_firer.cur_health / missile_firer.max_health;
else if(missile.weap_type == eSkill::MAX_SP) else if(missile.weap_type == eSkill::MAX_SP)
skill = 20 * missile_firer.cur_sp / missile_firer.max_sp; skill = 20 * missile_firer.cur_sp / missile_firer.max_sp;
else skill = missile_firer.skill(missile.weap_type); else skill = missile_firer.skill(missile.weap_type);

View File

@@ -155,7 +155,7 @@ void adjust_window_mode() {
} }
#ifndef __APPLE__ // This overrides Dock icon on OSX, which isn't what we want at all #ifndef __APPLE__ // This overrides Dock icon on OSX, which isn't what we want at all
ImageRsrc& icon = *ResMgr::get<ImageRsrc>("icon"); ImageRsrc& icon = *ResMgr::get<ImageRsrc>("icon");
mainPtr.setIcon(icon.getSize().x, icon.getSize().y, icon.getPixelsPtr()); mainPtr.setIcon(icon.getSize().x, icon.getSize().y, icon.copyToImage().getPixelsPtr());
#endif #endif
if(!firstTime) redraw_screen(REFRESH_NONE); if(!firstTime) redraw_screen(REFRESH_NONE);
if(text_sbar) { if(text_sbar) {

View File

@@ -116,7 +116,7 @@ void Initialize(void) {
mainPtr.create(sf::VideoMode(590, height), "Blades of Exile Character Editor", sf::Style::Titlebar | sf::Style::Close); mainPtr.create(sf::VideoMode(590, height), "Blades of Exile Character Editor", sf::Style::Titlebar | sf::Style::Close);
#ifndef __APPLE__ // This overrides Dock icon on OSX, which isn't what we want at all #ifndef __APPLE__ // This overrides Dock icon on OSX, which isn't what we want at all
ImageRsrc& icon = *ResMgr::get<ImageRsrc>("icon"); ImageRsrc& icon = *ResMgr::get<ImageRsrc>("icon");
mainPtr.setIcon(icon.getSize().x, icon.getSize().y, icon.getPixelsPtr()); mainPtr.setIcon(icon.getSize().x, icon.getSize().y, icon.copyToImage().getPixelsPtr());
#endif #endif
init_menubar(); init_menubar();
} }

View File

@@ -116,7 +116,7 @@ void init_scened(int argc, char* argv[]) {
mainPtr.setPosition(windRect.topLeft()); mainPtr.setPosition(windRect.topLeft());
#ifndef __APPLE__ // This overrides Dock icon on OSX, which isn't what we want at all #ifndef __APPLE__ // This overrides Dock icon on OSX, which isn't what we want at all
ImageRsrc& icon = *ResMgr::get<ImageRsrc>("icon"); ImageRsrc& icon = *ResMgr::get<ImageRsrc>("icon");
mainPtr.setIcon(icon.getSize().x, icon.getSize().y, icon.getPixelsPtr()); mainPtr.setIcon(icon.getSize().x, icon.getSize().y, icon.copyToImage().getPixelsPtr());
#endif #endif
mainPtr.clear(sf::Color::Black); mainPtr.clear(sf::Color::Black);
mainPtr.display(); mainPtr.display();