Mercurial > mm7
comparison Player.cpp @ 1568:addae48bc203
Fixing compiler warnings
author | Grumpy7 |
---|---|
date | Sun, 08 Sep 2013 07:28:20 +0200 |
parents | 9f8b3e904e14 |
children | 5658d0f3b5ee |
comparison
equal
deleted
inserted
replaced
1567:9f8b3e904e14 | 1568:addae48bc203 |
---|---|
1975 //----- (0048D6AA) -------------------------------------------------------- | 1975 //----- (0048D6AA) -------------------------------------------------------- |
1976 bool Player::HasItemEquipped(ITEM_EQUIP_TYPE uEquipIndex) | 1976 bool Player::HasItemEquipped(ITEM_EQUIP_TYPE uEquipIndex) |
1977 { | 1977 { |
1978 auto i = pEquipment.pIndices[uEquipIndex]; | 1978 auto i = pEquipment.pIndices[uEquipIndex]; |
1979 if (i) | 1979 if (i) |
1980 return ~(pOwnItems[i - 1].uAttributes & ITEM_BROKEN); | 1980 return (~(pOwnItems[i - 1].uAttributes & ITEM_BROKEN)) != 0; |
1981 else | 1981 else |
1982 return false; | 1982 return false; |
1983 } | 1983 } |
1984 | 1984 |
1985 //----- (0048D6D0) -------------------------------------------------------- | 1985 //----- (0048D6D0) -------------------------------------------------------- |
2275 if (broke_armor ) | 2275 if (broke_armor ) |
2276 { | 2276 { |
2277 armor_indx = pEquipment.uArmor; | 2277 armor_indx = pEquipment.uArmor; |
2278 if ( armor_indx ) | 2278 if ( armor_indx ) |
2279 { | 2279 { |
2280 if ( !pOwnItems[armor_indx-1].uAttributes & ITEM_ENCHANTED) | 2280 if ( !(pOwnItems[armor_indx-1].uAttributes & ITEM_ENCHANTED)) |
2281 { | 2281 { |
2282 pOwnItems[armor_indx-1].SetBroken(); | 2282 pOwnItems[armor_indx-1].SetBroken(); |
2283 } | 2283 } |
2284 } | 2284 } |
2285 } | 2285 } |
2288 PlaySound(SPEECH_24, 0); | 2288 PlaySound(SPEECH_24, 0); |
2289 return recieved_dmg; | 2289 return recieved_dmg; |
2290 } | 2290 } |
2291 | 2291 |
2292 //----- (0048DCF6) -------------------------------------------------------- | 2292 //----- (0048DCF6) -------------------------------------------------------- |
2293 int Player::_48DCF6(int a2, Actor *pActor) | 2293 int Player::_48DCF6(int a2, Actor *pActor) //TODO check this with IDA to see what the uninitialized vars are supposed to contain |
2294 { | 2294 { |
2295 signed int v3; // edi@1 | 2295 signed int v3; // edi@1 |
2296 signed int v4; // ebx@1 | 2296 signed int v4; // ebx@1 |
2297 Player *v5; // esi@1 | 2297 Player *v5; // esi@1 |
2298 int v6; // eax@2 | 2298 int v6; // eax@2 |