Squelch some MSVC warnings
This commit is contained in:
@@ -473,6 +473,10 @@ void handle_info_request(cShopItem item) {
|
||||
}
|
||||
|
||||
void set_up_shop_array() {
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4258)
|
||||
#endif
|
||||
int i = 0;
|
||||
for(int j = 0; i < 30 && j < 30; j++) {
|
||||
cShopItem entry = active_shop.getItem(j);
|
||||
@@ -548,6 +552,9 @@ void set_up_shop_array() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
shop_sbar->setMaximum(i - 8);
|
||||
std::fill(shop_array + i, shop_array + 30, -1);
|
||||
}
|
||||
|
@@ -898,7 +898,7 @@ void do_mage_spell(short pc_num,eSpell spell_num,bool freebie) {
|
||||
}
|
||||
|
||||
void do_priest_spell(short pc_num,eSpell spell_num,bool freebie) {
|
||||
short r1,r2, target, i,item,store,adj,x,y;
|
||||
short r1,r2, target,item,store,adj,x,y;
|
||||
location loc;
|
||||
location where;
|
||||
|
||||
@@ -972,7 +972,7 @@ void do_priest_spell(short pc_num,eSpell spell_num,bool freebie) {
|
||||
if(!freebie)
|
||||
univ.party[pc_num].cur_sp -= (*spell_num).cost;
|
||||
r1 = level / 6 + adj / 3 + get_ran(1,0,1);
|
||||
for(i = 0; i < r1; i++) {
|
||||
for(int i = 0; i < r1; i++) {
|
||||
r2 = get_ran(1,0,7);
|
||||
store = get_ran(2,1,5) + adj;
|
||||
if(!summon_monster((r2 == 1) ? 100 : 99,where,store,eAttitude::FRIENDLY,true))
|
||||
@@ -985,7 +985,7 @@ void do_priest_spell(short pc_num,eSpell spell_num,bool freebie) {
|
||||
store = get_ran(2,1,4) + adj;
|
||||
if(!summon_monster(126,where,store,eAttitude::FRIENDLY,true))
|
||||
add_string_to_buf(" Summon failed.");
|
||||
for(i = 0; i < 4; i++) {
|
||||
for(int i = 0; i < 4; i++) {
|
||||
store = get_ran(2,1,4) + adj;
|
||||
if(!summon_monster(125,where,store,eAttitude::FRIENDLY,true))
|
||||
add_string_to_buf(" Summon failed.");
|
||||
@@ -1188,7 +1188,7 @@ void do_priest_spell(short pc_num,eSpell spell_num,bool freebie) {
|
||||
}
|
||||
else sout << " wasn't stoned.";
|
||||
} else if(spell_num == eSpell::CURSE_REMOVE) {
|
||||
for(i = 0; i < 24; i++)
|
||||
for(int i = 0; i < 24; i++)
|
||||
if(univ.party[target].items[i].cursed){
|
||||
r1 = get_ran(1,0,200) - 10 * adj;
|
||||
if(r1 < 60) {
|
||||
@@ -1215,7 +1215,7 @@ void do_priest_spell(short pc_num,eSpell spell_num,bool freebie) {
|
||||
}
|
||||
else {
|
||||
univ.party[target].main_status = eMainStatus::ALIVE;
|
||||
for(i = 0; i < 3; i++)
|
||||
for(int i = 0; i < 3; i++)
|
||||
if(get_ran(1,0,2) < 2) {
|
||||
eSkill skill = eSkill(i);
|
||||
univ.party[target].skills[skill] -= (univ.party[target].skills[skill] > 1) ? 1 : 0;
|
||||
@@ -1230,7 +1230,7 @@ void do_priest_spell(short pc_num,eSpell spell_num,bool freebie) {
|
||||
} else if(spell_num == eSpell::RESURRECT) {
|
||||
if(univ.party[target].main_status != eMainStatus::ALIVE) {
|
||||
univ.party[target].main_status = eMainStatus::ALIVE;
|
||||
for(i = 0; i < 3; i++)
|
||||
for(int i = 0; i < 3; i++)
|
||||
if(get_ran(1,0,2) < 1) {
|
||||
eSkill skill = eSkill(i);
|
||||
univ.party[target].skills[skill] -= (univ.party[target].skills[skill] > 1) ? 1 : 0;
|
||||
@@ -1285,7 +1285,7 @@ void do_priest_spell(short pc_num,eSpell spell_num,bool freebie) {
|
||||
break;
|
||||
}
|
||||
|
||||
for(i = 0; i < 6; i++)
|
||||
for(int i = 0; i < 6; i++)
|
||||
if(univ.party[i].main_status == eMainStatus::ALIVE) {
|
||||
if(spell_num == eSpell::SANCTUARY_MASS) {
|
||||
store = get_ran(0,1,3) + level / 6 + adj;
|
||||
|
@@ -821,7 +821,8 @@ void cParty::readFrom(std::istream& file){
|
||||
} else if(cur == "TOWNSAVE") {
|
||||
int i;
|
||||
std::string str;
|
||||
bin >> i >> creature_save[i].which_town >> str;
|
||||
bin >> i;
|
||||
bin >> creature_save[i].which_town >> str;
|
||||
creature_save[i].hostile = str == "HOSTILE";
|
||||
} else if(cur == "TOWNVISIBLE") {
|
||||
int i;
|
||||
|
@@ -352,7 +352,8 @@ void set_clipboard_img(sf::Image& img) {
|
||||
}
|
||||
info->bV5Size = sizeof(BITMAPV5HEADER);
|
||||
info->bV5Width = img.getSize().x;
|
||||
info->bV5Height = -img.getSize().y;
|
||||
info->bV5Height = img.getSize().y;
|
||||
info->bV5Height *= -1;
|
||||
info->bV5Planes = 1;
|
||||
info->bV5BitCount = 32;
|
||||
info->bV5Compression = BI_BITFIELDS;
|
||||
|
Reference in New Issue
Block a user