Mercurial > mm7
diff mm7_1.cpp @ 255:0a37a56e9f02
sprintfex & classes enum
author | Nomad |
---|---|
date | Mon, 18 Feb 2013 09:14:26 +0200 |
parents | 37dcbe8f3cca |
children | 8cf4fe6b4941 96bc024a5fed |
line wrap: on
line diff
--- a/mm7_1.cpp Mon Feb 18 08:48:23 2013 +0200 +++ b/mm7_1.cpp Mon Feb 18 09:14:26 2013 +0200 @@ -611,7 +611,7 @@ //----- (0041A000) -------------------------------------------------------- unsigned int __fastcall CharacterUI_AwardsTab_Draw(unsigned int uPlayerID) { - unsigned int v1; // esi@1 + //unsigned int v1; // esi@1 unsigned int v2; // ebx@1 unsigned int v3; // eax@1 unsigned int result; // eax@1 @@ -634,15 +634,13 @@ int v21; // [sp+C8h] [bp-8h]@14 int v22; // [sp+CCh] [bp-4h]@40 - v1 = uPlayerID; + auto player = pParty->pPlayers + uPlayerID - 1; + //v1 = uPlayerID; v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); v3 = pIcons_LOD->LoadTexture("fr_award", TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? (int)&pIcons_LOD->pTextures[v3] : 0)); - sprintf(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[23], v2);// TODO check args - sprintf(Source, - pGlobalTXT_LocalizationStrings[429], - &pParty->pPlayers[v1-1].pName, - pClassNames[pParty->pPlayers[v1-1].classType]); + pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? &pIcons_LOD->pTextures[v3] : 0)); + sprintfex(pTmpBuf, "%s\xC" "%05d", pGlobalTXT_LocalizationStrings[23], v2); + sprintfex(Source, pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]); strcat(pTmpBuf, Source); strcat(pTmpBuf, "\xC" "00000"); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0); @@ -1057,7 +1055,7 @@ v49 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0); v46 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); v1 = pIcons_LOD->LoadTexture("quikref", TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v1 != -1 ? (int)&pIcons_LOD->pTextures[v1] : 0)); + pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v1 != -1 ? &pIcons_LOD->pTextures[v1] : 0)); v43 = 0; v45 = LOBYTE(pFontArrus->uFontHeight) + 1; do @@ -3710,7 +3708,7 @@ if ( v0 > &pParty->pPlayers[3] ) break; } - if(v0->classType == PLAYER_CLASS_31) + if(v0->classType == PLAYER_CLASS_WARLOCK) ++uRestUI_FoodRequiredToRest; } if ( CheckHiredNPCSpeciality(0x1Du) )