Mercurial > mm7
diff mm7_5.cpp @ 1423:350959f13283
Слияние
author | Ritor1 |
---|---|
date | Tue, 30 Jul 2013 09:34:14 +0600 |
parents | 9a1adf08f4ed |
children | 71a2cf416478 |
line wrap: on
line diff
--- a/mm7_5.cpp Tue Jul 30 09:33:52 2013 +0600 +++ b/mm7_5.cpp Tue Jul 30 09:34:14 2013 +0600 @@ -2198,6 +2198,7 @@ default: if ( uMessageParam != 5 ) { + __debugbreak(); // warning C4700: uninitialized local variable 'v200' used sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[35], v200); GameUI_SetFooterString(pTmpBuf.data()); continue; @@ -2264,7 +2265,7 @@ GameUI_SetFooterString(pTmpBuf.data()); continue; case UIMSG_ShowFinalWindow: - sprintf(pFinalMessage.data(), "%s\n \n%s\n \n%s", pGlobalTXT_LocalizationStrings[151],// "Congratulations Adventurer." + sprintfex(pFinalMessage.data(), "%s\n \n%s\n \n%s", pGlobalTXT_LocalizationStrings[151],// "Congratulations Adventurer." pGlobalTXT_LocalizationStrings[118],// "We hope that you've enjoyed playing Might and Magic VII as much as we did making it. We have saved this screen as MM7_WIN.PCX in your MM7 directory. You can print it out as proof of your accomplishment." pGlobalTXT_LocalizationStrings[167]);// "- The Might and Magic VII Development Team." ModalWindow(pFinalMessage.data(), 196); @@ -2568,7 +2569,7 @@ pNPCData4 = (NPCData *)((v93 > v92 + pMapInfo->EncM2percent) + 2); else pNPCData4 = (NPCData *)1; - if ( !sub_45063B(pMapInfo, (int)pNPCData4) ) + if ( !_45063B_spawn_some_monster(pMapInfo, (int)pNPCData4) ) pNPCData4 = 0; if ( pNPCData4 ) { @@ -3434,7 +3435,7 @@ case UIMSG_ChangeGameState: uGameState = GAME_FINISHED; break; - case UIMSG_11: + case UIMSG_ChangeCursor: pMouse->SetCursorBitmap("MICON2"); break; case UIMSG_3A: @@ -3582,6 +3583,7 @@ break; case UIMSG_PlayerCreationRemoveDownSkill: uPlayerCreationUI_SelectedCharacter = pParam; + __debugbreak(); pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(3) @@ -3598,13 +3600,10 @@ //----- (00436427) -------------------------------------------------------- double __cdecl get_shading_dist_mist() { - double result; // st7@2 - - if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) - result = (double)pOutdoorCamera->shading_dist_mist; + if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) + return (double)pOutdoorCamera->shading_dist_mist; else - result = 16192.0; - return result; + return 16192.0; } //----- (0043648F) -------------------------------------------------------- @@ -4713,7 +4712,7 @@ v19 = 0; v29 = 0; if ( v17 <= 0 ) - goto LABEL_29; + return 0; do { if ( a3a >= 2 ) @@ -4748,7 +4747,6 @@ while ( v29 < v28 ); result = 1; if ( a3a != 1 ) -LABEL_29: result = 0; return result; } @@ -4848,7 +4846,7 @@ v25 = 0; v16 = dword_4F5B24_ys[1] >= a3; if ( v15 <= 0 ) - goto LABEL_29; + return 0; do { if ( a5a >= 2 ) @@ -4883,7 +4881,6 @@ while ( v25 < v15 ); result = 1; if ( a5a != 1 ) -LABEL_29: result = 0; return result; } @@ -5194,14 +5191,22 @@ { v35 = v27->uAttributes; if ( v35 & 2 || (v51 & 0x80000000u) != 0 || (signed int)v51 > 12 || (signed int)v28 >= 500 ) - goto LABEL_92; + { + pMouse->RemoveHoldingItem(); + dword_50CDCC = 1; + return; + } LOWORD(v35) = v35 | 0x210; v27->uAttributes = v35; } else { if ( (signed int)pParty->pPickedItem.uItemID <= 245 ) - goto LABEL_92; + { + pMouse->RemoveHoldingItem(); + dword_50CDCC = 1; + return; + } if ( (signed int)pParty->pPickedItem.uItemID <= 250 ) { v27->UpdateTempBonus(pParty->uTimePlayed); @@ -5212,7 +5217,11 @@ || v27->uEnchantmentType || v51 && v51 != 1 && v51 != 2 || (signed int)v33 >= 500 ) - goto LABEL_92; + { + pMouse->RemoveHoldingItem(); + dword_50CDCC = 1; + return; + } v34 = *(int *)&aSbwb00[4 * pParty->pPickedItem.uItemID + 4]; a2.y = (int)v29 << 7; v31 = (double)(signed int)((int)v29 << 7); @@ -5228,7 +5237,11 @@ || v27->uEnchantmentType || v51 && v51 != 1 && v51 != 2 || (signed int)v30 >= 500 ) - goto LABEL_92; + { + pMouse->RemoveHoldingItem(); + dword_50CDCC = 1; + return; + } a2.y = (int)v29 << 7; v27->uSpecEnchantmentType = 40; v31 = (double)a2.y; @@ -5241,7 +5254,9 @@ v27->uAttributes = v32; } _50C9A8_item_enchantment_timer = 256; - goto LABEL_92; + pMouse->RemoveHoldingItem(); + dword_50CDCC = 1; + return; } v36 = (70.0 - (double)pParty->pPickedItem.uEnchantmentType) * 0.01; if ( v36 < 0.0 ) @@ -5255,7 +5270,9 @@ v37 = (signed __int64)((double)a2.y - v36 * (double)a2.y); v27->uMaxCharges = v37; v27->uNumCharges = (unsigned __int8)v37; - goto LABEL_92; + pMouse->RemoveHoldingItem(); + dword_50CDCC = 1; + return; } v14 = v13 - 222; v15 = pParty->pPickedItem.uItemID - 222; @@ -5396,9 +5413,16 @@ if ( !(pItemsTable->pItems[*(int *)(v22 + 532) ].uItemID_Rep_St) ) *(int *)(v22 + 552) |= 1u; if ( !dword_4E455C ) - goto LABEL_92; + { + pMouse->RemoveHoldingItem(); + dword_50CDCC = 1; + return; + } v0->PlaySound(SPEECH_16, 0); - goto LABEL_91; + dword_4E455C = 0; + pMouse->RemoveHoldingItem(); + dword_50CDCC = 1; + return; } if ( v45 ) { @@ -5437,10 +5461,8 @@ if ( v0->CanAct() ) v0->PlaySound(SPEECH_17, 0); ShowStatusBarString(pGlobalTXT_LocalizationStrings[444], 2u); -LABEL_91: dword_4E455C = 0; } -LABEL_92: pMouse->RemoveHoldingItem(); dword_50CDCC = 1; return; @@ -5530,4 +5552,5 @@ break; } assert(false); + return 0; } \ No newline at end of file