Mercurial > might-and-magic-trilogy
comparison mm7_3.cpp @ 114:8e802a11b20d
Merge
author | Nomad |
---|---|
date | Wed, 07 Nov 2012 20:26:28 +0200 |
parents | 9a99c386885a 62772029b56d |
children | 918dca162239 |
comparison
equal
deleted
inserted
replaced
113:9a99c386885a | 114:8e802a11b20d |
---|---|
15219 if ( !DstBuf.uDecompressedSize ) | 15219 if ( !DstBuf.uDecompressedSize ) |
15220 v5 = DstBuf.uTextureSize; | 15220 v5 = DstBuf.uTextureSize; |
15221 memset(&DstBuf, 0, 0x48u); | 15221 memset(&DstBuf, 0, 0x48u); |
15222 if ( (signed int)v5 >= (signed int)uBufferSize ) | 15222 if ( (signed int)v5 >= (signed int)uBufferSize ) |
15223 { | 15223 { |
15224 sprintfex(&Args, "File %s Size %lu - Buffer size %lu", v3, v5, uBufferSize); | 15224 sprintf(&Args, "File %s Size %lu - Buffer size %lu", v3, v5, uBufferSize); |
15225 Abortf(&Args); | 15225 Abortf(&Args); |
15226 } | 15226 } |
15227 memcpy(Dst, ptr, v5); | 15227 memcpy(Dst, ptr, v5); |
15228 pAllocator->FreeChunk(ptr); | 15228 pAllocator->FreeChunk(ptr); |
15229 return v5; | 15229 return v5; |
15296 } | 15296 } |
15297 | 15297 |
15298 uLevelStrNumStrings = (signed __int16)v2 - 1; | 15298 uLevelStrNumStrings = (signed __int16)v2 - 1; |
15299 if ( v0 > 800 ) | 15299 if ( v0 > 800 ) |
15300 { | 15300 { |
15301 sprintfex(Args, "MAX_EVENT_TEXT_LENGTH needs to be increased to %lu", v0 + 1); | 15301 sprintf(Args, "MAX_EVENT_TEXT_LENGTH needs to be increased to %lu", v0 + 1); |
15302 Abortf(Args); | 15302 Abortf(Args); |
15303 } | 15303 } |
15304 v6 = 0; | 15304 v6 = 0; |
15305 if ( (signed __int16)v2 - 1 > 0 ) | 15305 if ( (signed __int16)v2 - 1 > 0 ) |
15306 { | 15306 { |
15822 } | 15822 } |
15823 else | 15823 else |
15824 { | 15824 { |
15825 if ( v10 ) | 15825 if ( v10 ) |
15826 { | 15826 { |
15827 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[409], v0->pName);// "Do you wish to leave %s?" | 15827 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[409], v0->pName);// "Do you wish to leave %s?" |
15828 v1 = pTmpBuf; | 15828 v1 = pTmpBuf; |
15829 goto LABEL_12; | 15829 goto LABEL_12; |
15830 } | 15830 } |
15831 v1 = ""; | 15831 v1 = ""; |
15832 } | 15832 } |
15855 const char *v3; // [sp-4h] [bp-2Ch]@2 | 15855 const char *v3; // [sp-4h] [bp-2Ch]@2 |
15856 char pContainer[32]; // [sp+0h] [bp-28h]@1 | 15856 char pContainer[32]; // [sp+0h] [bp-28h]@1 |
15857 | 15857 |
15858 pEventTimer->Pause(); | 15858 pEventTimer->Pause(); |
15859 v0 = const_2(); | 15859 v0 = const_2(); |
15860 sprintfex(pContainer, "evt%02d", v0); | 15860 sprintf(pContainer, "evt%02d", v0); |
15861 if ( pParty->uAlignment ) | 15861 if ( pParty->uAlignment ) |
15862 { | 15862 { |
15863 if ( pParty->uAlignment != 2 ) | 15863 if ( pParty->uAlignment != 2 ) |
15864 goto LABEL_6; | 15864 goto LABEL_6; |
15865 v3 = "-c"; | 15865 v3 = "-c"; |
15872 LABEL_6: | 15872 LABEL_6: |
15873 pTexture_Dialogue_Background = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)]; | 15873 pTexture_Dialogue_Background = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)]; |
15874 pTexture_outside = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("outside", TEXTURE_16BIT_PALETTE)]; | 15874 pTexture_outside = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("outside", TEXTURE_16BIT_PALETTE)]; |
15875 v1 = pMapStats->GetMapInfo(pCurrentMapName); | 15875 v1 = pMapStats->GetMapInfo(pCurrentMapName); |
15876 if ( v1 ) | 15876 if ( v1 ) |
15877 sprintfex(byte_591098, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" | 15877 sprintf(byte_591098, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" |
15878 else | 15878 else |
15879 strcpy(byte_591098, pGlobalTXT_LocalizationStrings[79]);// "Exit" | 15879 strcpy(byte_591098, pGlobalTXT_LocalizationStrings[79]);// "Exit" |
15880 result = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)17, 0, (int)byte_591098); | 15880 result = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)17, 0, (int)byte_591098); |
15881 pDialogueWindow = result; | 15881 pDialogueWindow = result; |
15882 return result; | 15882 return result; |
15948 else | 15948 else |
15949 { | 15949 { |
15950 v6 = v3; | 15950 v6 = v3; |
15951 v5 = pGlobalTXT_LocalizationStrings[128]; // "It will take %d days to travel to %s." | 15951 v5 = pGlobalTXT_LocalizationStrings[128]; // "It will take %d days to travel to %s." |
15952 } | 15952 } |
15953 sprintfex(pTmpBuf, v5, v6, v1->pName); | 15953 sprintf(pTmpBuf, v5, v6, v1->pName); |
15954 strcat(pTmpBuf, "\n \n"); | 15954 strcat(pTmpBuf, "\n \n"); |
15955 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); | 15955 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); |
15956 strcat(pTmpBuf, pTmpBuf2); | 15956 strcat(pTmpBuf, pTmpBuf2); |
15957 v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0); | 15957 v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0); |
15958 v7.DrawText2(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 3u); | 15958 v7.DrawText2(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 3u); |
15959 dword_5B5924 = 1; | 15959 dword_5B5924 = 1; |
15960 } | 15960 } |
16010 memset(GameUI_StatusBar_TimedString, 0, 0xC8u); | 16010 memset(GameUI_StatusBar_TimedString, 0, 0xC8u); |
16011 goto LABEL_16; | 16011 goto LABEL_16; |
16012 } | 16012 } |
16013 if ( pGUIWindow2->ptr_1C == (void *)26 ) | 16013 if ( pGUIWindow2->ptr_1C == (void *)26 ) |
16014 { | 16014 { |
16015 sprintfex(Str, "%s %s", GameUI_StatusBar_TimedString, pKeyActionMap->pPressedKeysBuffer); | 16015 sprintf(Str, "%s %s", GameUI_StatusBar_TimedString, pKeyActionMap->pPressedKeysBuffer); |
16016 v3 = pFontLucida->GetLineWidth(Str); | 16016 v3 = pFontLucida->GetLineWidth(Str); |
16017 pGUIWindow2->DrawText(pFontLucida, 13, 357, 0, Str, 0, 0, 0); | 16017 pGUIWindow2->DrawText(pFontLucida, 13, 357, 0, Str, 0, 0, 0); |
16018 pGUIWindow2->DrawFlashingInputCursor(v3 + 13, 357, pFontLucida); | 16018 pGUIWindow2->DrawFlashingInputCursor(v3 + 13, 357, pFontLucida); |
16019 return; | 16019 return; |
16020 } | 16020 } |
16171 pRenderer->DrawTextureIndexed(_4E5E50_transui_x, _4E5EE0_transui_y, pDialogueNPCPortraits[0]); | 16171 pRenderer->DrawTextureIndexed(_4E5E50_transui_x, _4E5EE0_transui_y, pDialogueNPCPortraits[0]); |
16172 v3 = v0->uProfession; | 16172 v3 = v0->uProfession; |
16173 if ( v3 ) | 16173 if ( v3 ) |
16174 { | 16174 { |
16175 v4 = pTmpBuf; | 16175 v4 = pTmpBuf; |
16176 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v0->pName, aNPCProfessionNames[v3]); | 16176 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v0->pName, aNPCProfessionNames[v3]); |
16177 } | 16177 } |
16178 else | 16178 else |
16179 { | 16179 { |
16180 strcpy(pTmpBuf, v0->pName); | 16180 strcpy(pTmpBuf, v0->pName); |
16181 v4 = pTmpBuf; | 16181 v4 = pTmpBuf; |
16189 v7 = pGlobalTXT_LocalizationStrings[577]; // "Get back in there you wimps:" | 16189 v7 = pGlobalTXT_LocalizationStrings[577]; // "Get back in there you wimps:" |
16190 goto LABEL_37; | 16190 goto LABEL_37; |
16191 } | 16191 } |
16192 if ( uDialogueType == 91 ) | 16192 if ( uDialogueType == 91 ) |
16193 { | 16193 { |
16194 sprintfex(v4, pGlobalTXT_LocalizationStrings[576], dword_F8B1B4);// "Congratulations on your win: here's your stuff: %u gold." | 16194 sprintf(v4, pGlobalTXT_LocalizationStrings[576], dword_F8B1B4);// "Congratulations on your win: here's your stuff: %u gold." |
16195 pInString = v4; | 16195 pInString = v4; |
16196 v8 = 0; | 16196 v8 = 0; |
16197 goto LABEL_39; | 16197 goto LABEL_39; |
16198 } | 16198 } |
16199 if ( uDialogueType == 92 ) | 16199 if ( uDialogueType == 92 ) |
16354 else | 16354 else |
16355 { | 16355 { |
16356 if ( v0->uFlags & 0x80 ) | 16356 if ( v0->uFlags & 0x80 ) |
16357 { | 16357 { |
16358 LABEL_59: | 16358 LABEL_59: |
16359 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[408], v0->pName); | 16359 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[408], v0->pName); |
16360 v24 = pTmpBuf; | 16360 v24 = pTmpBuf; |
16361 goto LABEL_79; | 16361 goto LABEL_79; |
16362 } | 16362 } |
16363 v24 = pGlobalTXT_LocalizationStrings[406]; | 16363 v24 = pGlobalTXT_LocalizationStrings[406]; |
16364 } | 16364 } |
19441 v5 += 80; | 19441 v5 += 80; |
19442 } | 19442 } |
19443 while ( v4 < 200 ); | 19443 while ( v4 < 200 ); |
19444 if ( v4 >= 200 ) | 19444 if ( v4 >= 200 ) |
19445 { | 19445 { |
19446 sprintfex(&Args, "Unable to find Door ID: %i!", uDoorID); | 19446 sprintf(&Args, "Unable to find Door ID: %i!", uDoorID); |
19447 Abortf(&Args); | 19447 Abortf(&Args); |
19448 } | 19448 } |
19449 v6 = &pIndoor->pDoors[v4]; | 19449 v6 = &pIndoor->pDoors[v4]; |
19450 if ( v3 == 2 ) | 19450 if ( v3 == 2 ) |
19451 { | 19451 { |