Mercurial > mm7
comparison Game.cpp @ 2006:30c2b575d25c
signed fixes
DamagePlayerFromMonster -1 indexing
author | zipi |
---|---|
date | Wed, 06 Nov 2013 13:06:02 +0000 |
parents | 4088cc908c78 |
children | 28cb79ae2f6f |
comparison
equal
deleted
inserted
replaced
2005:8fa26b63244a | 2006:30c2b575d25c |
---|---|
232 | 232 |
233 if (uCurrentlyLoadedLevelType == LEVEL_Indoor) | 233 if (uCurrentlyLoadedLevelType == LEVEL_Indoor) |
234 { | 234 { |
235 int sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); | 235 int sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); |
236 sprintf(pTmpBuf.data(), "Party Sector ID: %u/%u\n", sector_id, pIndoor->uNumSectors); | 236 sprintf(pTmpBuf.data(), "Party Sector ID: %u/%u\n", sector_id, pIndoor->uNumSectors); |
237 pPrimaryWindow->DrawText(pFontArrus, 16, 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF); | 237 pPrimaryWindow->DrawText(pFontArrus, 16, 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, -1); |
238 } | 238 } |
239 sprintf(pTmpBuf.data(), "Party Position: % d % d % d", pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); | 239 sprintf(pTmpBuf.data(), "Party Position: % d % d % d", pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); |
240 pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF); | 240 pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, -1); |
241 | 241 |
242 if (uCurrentlyLoadedLevelType == LEVEL_Indoor) | 242 if (uCurrentlyLoadedLevelType == LEVEL_Indoor) |
243 { | 243 { |
244 uint uFaceID; | 244 uint uFaceID; |
245 int sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); | 245 int sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); |
250 { | 250 { |
251 int on_water, _a6; | 251 int on_water, _a6; |
252 int floor_level = ODM_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, 0, &on_water, &_a6, false); | 252 int floor_level = ODM_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, 0, &on_water, &_a6, false); |
253 sprintf(pTmpBuf.data(), "ODM_GetFloorLevel: %d on_water: %s a6 = %d\n", floor_level, on_water ? "true" : "false", _a6); | 253 sprintf(pTmpBuf.data(), "ODM_GetFloorLevel: %d on_water: %s a6 = %d\n", floor_level, on_water ? "true" : "false", _a6); |
254 } | 254 } |
255 pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF); | 255 pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, -1); |
256 } | 256 } |
257 | 257 |
258 GUI_UpdateWindows(); | 258 GUI_UpdateWindows(); |
259 pParty->UpdatePlayersAndHirelingsEmotions(); | 259 pParty->UpdatePlayersAndHirelingsEmotions(); |
260 | 260 |
297 signed int v16; // [sp+14h] [bp-50h]@8 | 297 signed int v16; // [sp+14h] [bp-50h]@8 |
298 //int v17[4]; // [sp+18h] [bp-4Ch]@80 | 298 //int v17[4]; // [sp+18h] [bp-4Ch]@80 |
299 MSG Msg; // [sp+28h] [bp-3Ch]@20 | 299 MSG Msg; // [sp+28h] [bp-3Ch]@20 |
300 char Source[64]; // [sp+44h] [bp-20h]@76 | 300 char Source[64]; // [sp+44h] [bp-20h]@76 |
301 | 301 |
302 bLoading = uCurrentMenuID == MENU_LoadingProcInMainMenu; | 302 bLoading = sCurrentMenuID == MENU_LoadingProcInMainMenu; |
303 SetCurrentMenuID((MENU_STATE)-1); | 303 SetCurrentMenuID((MENU_STATE)-1); |
304 if (bLoading) | 304 if (bLoading) |
305 { | 305 { |
306 pParty->Reset(); | 306 pParty->Reset(); |
307 dword_6BE340 = 0; | 307 dword_6BE340 = 0; |
717 return true; | 717 return true; |
718 } | 718 } |
719 | 719 |
720 | 720 |
721 //----- (0044EDE4) -------------------------------------------------------- | 721 //----- (0044EDE4) -------------------------------------------------------- |
722 bool Game::AlterGamma_BLV(BLVFace *pFace, unsigned int *pColor) | 722 bool Game::AlterGamma_BLV(BLVFace *pFace, signed int *pColor) |
723 { | 723 { |
724 if (uFlags2 & GAME_FLAGS_2_SATURATE_LIGHTMAPS && | 724 if (uFlags2 & GAME_FLAGS_2_SATURATE_LIGHTMAPS && |
725 pFace->uAttributes & FACE_CAN_SATURATE_COLOR) | 725 pFace->uAttributes & FACE_CAN_SATURATE_COLOR) |
726 { | 726 { |
727 *pColor = ReplaceHSV(*pColor, 1.0, fSaturation, -1.0); | 727 *pColor = ReplaceHSV(*pColor, 1.0, fSaturation, -1.0); |
730 else | 730 else |
731 return false; | 731 return false; |
732 } | 732 } |
733 | 733 |
734 //----- (0044EE30) -------------------------------------------------------- | 734 //----- (0044EE30) -------------------------------------------------------- |
735 bool Game::AlterGamma_ODM(ODMFace *pFace, unsigned int *pColor) | 735 bool Game::AlterGamma_ODM(ODMFace *pFace, signed int *pColor) |
736 { | 736 { |
737 if (uFlags2 & GAME_FLAGS_2_SATURATE_LIGHTMAPS && | 737 if (uFlags2 & GAME_FLAGS_2_SATURATE_LIGHTMAPS && |
738 pFace->uAttributes & FACE_CAN_SATURATE_COLOR) | 738 pFace->uAttributes & FACE_CAN_SATURATE_COLOR) |
739 { | 739 { |
740 *pColor = ReplaceHSV(*pColor, 1.0, fSaturation, -1.0); | 740 *pColor = ReplaceHSV(*pColor, 1.0, fSaturation, -1.0); |