Mercurial > might-and-magic-trilogy
comparison GUIWindow.cpp @ 83:2d5d13376e91
Merge
author | Nomad |
---|---|
date | Mon, 29 Oct 2012 00:49:33 +0200 |
parents | f9a33f75bae3 a84fb3752681 |
children | b39bdc150e90 |
comparison
equal
deleted
inserted
replaced
82:f9a33f75bae3 | 83:2d5d13376e91 |
---|---|
1115 do | 1115 do |
1116 { | 1116 { |
1117 *(&pTexture_pagemask + v0) = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( | 1117 *(&pTexture_pagemask + v0) = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( |
1118 (const char *)pLloydsBeacons_SomeYs[v0 + 4], | 1118 (const char *)pLloydsBeacons_SomeYs[v0 + 4], |
1119 TEXTURE_16BIT_PALETTE)]; | 1119 TEXTURE_16BIT_PALETTE)]; |
1120 sprintfex(pTmpBuf, "tab%da", v0); | 1120 sprintf(pTmpBuf, "tab%da", v0); |
1121 *(v1 - 1) = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)]; | 1121 *(v1 - 1) = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)]; |
1122 sprintfex(pTmpBuf, "tab%db", v0++); | 1122 sprintf(pTmpBuf, "tab%db", v0++); |
1123 *v1 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)]; | 1123 *v1 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)]; |
1124 v1 += 2; | 1124 v1 += 2; |
1125 } | 1125 } |
1126 while ( (signed int)v1 <= (signed int)&unk_506494 ); | 1126 while ( (signed int)v1 <= (signed int)&unk_506494 ); |
1127 } | 1127 } |
1152 unsigned int v7; // [sp+4Ch] [bp-4h]@1 | 1152 unsigned int v7; // [sp+4Ch] [bp-4h]@1 |
1153 | 1153 |
1154 v2 = uSlot; | 1154 v2 = uSlot; |
1155 v7 = uPlayer; | 1155 v7 = uPlayer; |
1156 v3 = uSlot + 1; | 1156 v3 = uSlot + 1; |
1157 sprintfex(pContainerName, "data\\lloyd%d%d.pcx", uPlayer, uSlot + 1); | 1157 sprintf(pContainerName, "data\\lloyd%d%d.pcx", uPlayer, uSlot + 1); |
1158 v4 = fopen(pContainerName, "rb"); | 1158 v4 = fopen(pContainerName, "rb"); |
1159 if ( v4 ) | 1159 if ( v4 ) |
1160 { | 1160 { |
1161 pSavegameThumbnails[v2].LoadFromFILE(v4, 0, 1u); | 1161 pSavegameThumbnails[v2].LoadFromFILE(v4, 0, 1u); |
1162 fclose(v4); | 1162 fclose(v4); |
1163 } | 1163 } |
1164 else | 1164 else |
1165 { | 1165 { |
1166 sprintfex(pContainerName, "lloyd%d%d.pcx", v7, v3); | 1166 sprintf(pContainerName, "lloyd%d%d.pcx", v7, v3); |
1167 v5 = pNew_LOD->FindContainer(pContainerName, 1); | 1167 v5 = pNew_LOD->FindContainer(pContainerName, 1); |
1168 if ( v5 ) | 1168 if ( v5 ) |
1169 pSavegameThumbnails[v2].LoadFromFILE(v5, 0, 0); | 1169 pSavegameThumbnails[v2].LoadFromFILE(v5, 0, 0); |
1170 else | 1170 else |
1171 *((int *)&pSavegameThumbnails->pPixels + 10 * v2) = 0; | 1171 *((int *)&pSavegameThumbnails->pPixels + 10 * v2) = 0; |
1434 { | 1434 { |
1435 sub_4B2A74(); | 1435 sub_4B2A74(); |
1436 } | 1436 } |
1437 else | 1437 else |
1438 { | 1438 { |
1439 sprintfex( | 1439 sprintf( |
1440 pTmpBuf, | 1440 pTmpBuf, |
1441 pGlobalTXT_LocalizationStrings[429], | 1441 pGlobalTXT_LocalizationStrings[429], |
1442 //p2DEvents_minus1_::08[13 * (unsigned int)ptr_507BC0->ptr_1C], | 1442 //p2DEvents_minus1_::08[13 * (unsigned int)ptr_507BC0->ptr_1C], |
1443 p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pProprieterName, | 1443 p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pProprieterName, |
1444 //p2DEvents_minus1__10[13 * (unsigned int)ptr_507BC0->ptr_1C]); | 1444 //p2DEvents_minus1__10[13 * (unsigned int)ptr_507BC0->ptr_1C]); |
1566 if ( (unsigned int)v6 / 0x18 ) | 1566 if ( (unsigned int)v6 / 0x18 ) |
1567 { | 1567 { |
1568 v8 = pGlobalTXT_LocalizationStrings[57]; | 1568 v8 = pGlobalTXT_LocalizationStrings[57]; |
1569 if ( v18 <= 1 ) | 1569 if ( v18 <= 1 ) |
1570 v8 = pGlobalTXT_LocalizationStrings[56]; | 1570 v8 = pGlobalTXT_LocalizationStrings[56]; |
1571 sprintfex(pTmpBuf2, "%d %s ", v18, v8); | 1571 sprintf(pTmpBuf2, "%d %s ", v18, v8); |
1572 strcat(pTmpBuf, pTmpBuf2); | 1572 strcat(pTmpBuf, pTmpBuf2); |
1573 } | 1573 } |
1574 if ( v7 ) | 1574 if ( v7 ) |
1575 { | 1575 { |
1576 if ( v7 <= 1 ) | 1576 if ( v7 <= 1 ) |
1577 v9 = pGlobalTXT_LocalizationStrings[109]; | 1577 v9 = pGlobalTXT_LocalizationStrings[109]; |
1578 else | 1578 else |
1579 v9 = pGlobalTXT_LocalizationStrings[110]; | 1579 v9 = pGlobalTXT_LocalizationStrings[110]; |
1580 sprintfex(pTmpBuf2, "%d %s ", v7, v9); | 1580 sprintf(pTmpBuf2, "%d %s ", v7, v9); |
1581 strcat(pTmpBuf, pTmpBuf2); | 1581 strcat(pTmpBuf, pTmpBuf2); |
1582 } | 1582 } |
1583 if ( v16 && !v18 ) | 1583 if ( v16 && !v18 ) |
1584 { | 1584 { |
1585 if ( v16 <= 1 ) | 1585 if ( v16 <= 1 ) |
1586 v10 = pGlobalTXT_LocalizationStrings[437]; | 1586 v10 = pGlobalTXT_LocalizationStrings[437]; |
1587 else | 1587 else |
1588 v10 = pGlobalTXT_LocalizationStrings[436]; | 1588 v10 = pGlobalTXT_LocalizationStrings[436]; |
1589 sprintfex(pTmpBuf2, "%d %s ", v16, v10); | 1589 sprintf(pTmpBuf2, "%d %s ", v16, v10); |
1590 strcat(pTmpBuf, pTmpBuf2); | 1590 strcat(pTmpBuf, pTmpBuf2); |
1591 } | 1591 } |
1592 if ( v17 && !v7 ) | 1592 if ( v17 && !v7 ) |
1593 { | 1593 { |
1594 if ( v17 <= 1 ) | 1594 if ( v17 <= 1 ) |
1595 v11 = pGlobalTXT_LocalizationStrings[439]; | 1595 v11 = pGlobalTXT_LocalizationStrings[439]; |
1596 else | 1596 else |
1597 v11 = pGlobalTXT_LocalizationStrings[438]; | 1597 v11 = pGlobalTXT_LocalizationStrings[438]; |
1598 sprintfex(pTmpBuf2, "%d %s ", v17, v11); | 1598 sprintf(pTmpBuf2, "%d %s ", v17, v11); |
1599 strcat(pTmpBuf, pTmpBuf2); | 1599 strcat(pTmpBuf, pTmpBuf2); |
1600 } | 1600 } |
1601 v12 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); | 1601 v12 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); |
1602 v13 = pFontArrus->CalcTextHeight(pTmpBuf, v15, 0, 0); | 1602 v13 = pFontArrus->CalcTextHeight(pTmpBuf, v15, 0, 0); |
1603 return v15->DrawText2(pFontArrus, 0, (212 - v13) / 2 + 101, v12, pTmpBuf, 3u); | 1603 return v15->DrawText2(pFontArrus, 0, (212 - v13) / 2 + 101, v12, pTmpBuf, 3u); |
2303 0, | 2303 0, |
2304 pGlobalTXT_LocalizationStrings[407], | 2304 pGlobalTXT_LocalizationStrings[407], |
2305 0); | 2305 0); |
2306 if ( v12->uFlags & 0x80 ) | 2306 if ( v12->uFlags & 0x80 ) |
2307 { | 2307 { |
2308 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[408], v12->pName); | 2308 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[408], v12->pName); |
2309 pWindow->CreateButton(0x1E0u, v11 + 130, 0x8Cu, v11, 1, 0, 0x88u, 0x4Cu, 0, pTmpBuf, 0); | 2309 pWindow->CreateButton(0x1E0u, v11 + 130, 0x8Cu, v11, 1, 0, 0x88u, 0x4Cu, 0, pTmpBuf, 0); |
2310 } | 2310 } |
2311 else | 2311 else |
2312 { | 2312 { |
2313 pWindow->CreateButton( | 2313 pWindow->CreateButton( |
2430 //v27 = (char *)p2DEvents_minus1_::08[13 * a4]; | 2430 //v27 = (char *)p2DEvents_minus1_::08[13 * a4]; |
2431 v27 = (char *)p2DEvents[a4 - 1].pProprieterName; | 2431 v27 = (char *)p2DEvents[a4 - 1].pProprieterName; |
2432 v30 = v27; | 2432 v30 = v27; |
2433 v29 = pGlobalTXT_LocalizationStrings[435]; | 2433 v29 = pGlobalTXT_LocalizationStrings[435]; |
2434 } | 2434 } |
2435 sprintfex(&byte_591180[100 * v26], v29, v30); | 2435 sprintf(&byte_591180[100 * v26], v29, v30); |
2436 array_5913D8[v26 + 7] = (NPCData *)pWindow->CreateButton( | 2436 array_5913D8[v26 + 7] = (NPCData *)pWindow->CreateButton( |
2437 *(&_4E5E50_transui_x + v26 + 6 * uNumDialogueNPCPortraits - 6), | 2437 *(&_4E5E50_transui_x + v26 + 6 * uNumDialogueNPCPortraits - 6), |
2438 *(&_4E5EE0_transui_y + v26 + 6 * uNumDialogueNPCPortraits - 6), | 2438 *(&_4E5EE0_transui_y + v26 + 6 * uNumDialogueNPCPortraits - 6), |
2439 0x3Fu, | 2439 0x3Fu, |
2440 0x49u, | 2440 0x49u, |