Mercurial > mm7
comparison mm7_1.cpp @ 255:0a37a56e9f02
sprintfex & classes enum
author | Nomad |
---|---|
date | Mon, 18 Feb 2013 09:14:26 +0200 |
parents | 37dcbe8f3cca |
children | 8cf4fe6b4941 96bc024a5fed |
comparison
equal
deleted
inserted
replaced
254:d1af3319bc44 | 255:0a37a56e9f02 |
---|---|
609 } | 609 } |
610 | 610 |
611 //----- (0041A000) -------------------------------------------------------- | 611 //----- (0041A000) -------------------------------------------------------- |
612 unsigned int __fastcall CharacterUI_AwardsTab_Draw(unsigned int uPlayerID) | 612 unsigned int __fastcall CharacterUI_AwardsTab_Draw(unsigned int uPlayerID) |
613 { | 613 { |
614 unsigned int v1; // esi@1 | 614 //unsigned int v1; // esi@1 |
615 unsigned int v2; // ebx@1 | 615 unsigned int v2; // ebx@1 |
616 unsigned int v3; // eax@1 | 616 unsigned int v3; // eax@1 |
617 unsigned int result; // eax@1 | 617 unsigned int result; // eax@1 |
618 int v5; // eax@15 | 618 int v5; // eax@15 |
619 char *v6; // ebx@15 | 619 char *v6; // ebx@15 |
632 GUIWindow a1; // [sp+70h] [bp-60h]@1 | 632 GUIWindow a1; // [sp+70h] [bp-60h]@1 |
633 unsigned int v20; // [sp+C4h] [bp-Ch]@15 | 633 unsigned int v20; // [sp+C4h] [bp-Ch]@15 |
634 int v21; // [sp+C8h] [bp-8h]@14 | 634 int v21; // [sp+C8h] [bp-8h]@14 |
635 int v22; // [sp+CCh] [bp-4h]@40 | 635 int v22; // [sp+CCh] [bp-4h]@40 |
636 | 636 |
637 v1 = uPlayerID; | 637 auto player = pParty->pPlayers + uPlayerID - 1; |
638 //v1 = uPlayerID; | |
638 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); | 639 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); |
639 v3 = pIcons_LOD->LoadTexture("fr_award", TEXTURE_16BIT_PALETTE); | 640 v3 = pIcons_LOD->LoadTexture("fr_award", TEXTURE_16BIT_PALETTE); |
640 pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? (int)&pIcons_LOD->pTextures[v3] : 0)); | 641 pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? &pIcons_LOD->pTextures[v3] : 0)); |
641 sprintf(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[23], v2);// TODO check args | 642 sprintfex(pTmpBuf, "%s\xC" "%05d", pGlobalTXT_LocalizationStrings[23], v2); |
642 sprintf(Source, | 643 sprintfex(Source, pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]); |
643 pGlobalTXT_LocalizationStrings[429], | |
644 &pParty->pPlayers[v1-1].pName, | |
645 pClassNames[pParty->pPlayers[v1-1].classType]); | |
646 strcat(pTmpBuf, Source); | 644 strcat(pTmpBuf, Source); |
647 strcat(pTmpBuf, "\xC" "00000"); | 645 strcat(pTmpBuf, "\xC" "00000"); |
648 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0); | 646 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0); |
649 result = dword_506528; | 647 result = dword_506528; |
650 a1.uFrameX = 12; | 648 a1.uFrameX = 12; |
1055 v0 = 0; | 1053 v0 = 0; |
1056 v47 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); | 1054 v47 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); |
1057 v49 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0); | 1055 v49 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0); |
1058 v46 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); | 1056 v46 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); |
1059 v1 = pIcons_LOD->LoadTexture("quikref", TEXTURE_16BIT_PALETTE); | 1057 v1 = pIcons_LOD->LoadTexture("quikref", TEXTURE_16BIT_PALETTE); |
1060 pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v1 != -1 ? (int)&pIcons_LOD->pTextures[v1] : 0)); | 1058 pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v1 != -1 ? &pIcons_LOD->pTextures[v1] : 0)); |
1061 v43 = 0; | 1059 v43 = 0; |
1062 v45 = LOBYTE(pFontArrus->uFontHeight) + 1; | 1060 v45 = LOBYTE(pFontArrus->uFontHeight) + 1; |
1063 do | 1061 do |
1064 { | 1062 { |
1065 pPlayer = &pParty->pPlayers[v43]; | 1063 pPlayer = &pParty->pPlayers[v43]; |
3708 { | 3706 { |
3709 ++v0; | 3707 ++v0; |
3710 if ( v0 > &pParty->pPlayers[3] ) | 3708 if ( v0 > &pParty->pPlayers[3] ) |
3711 break; | 3709 break; |
3712 } | 3710 } |
3713 if(v0->classType == PLAYER_CLASS_31) | 3711 if(v0->classType == PLAYER_CLASS_WARLOCK) |
3714 ++uRestUI_FoodRequiredToRest; | 3712 ++uRestUI_FoodRequiredToRest; |
3715 } | 3713 } |
3716 if ( CheckHiredNPCSpeciality(0x1Du) ) | 3714 if ( CheckHiredNPCSpeciality(0x1Du) ) |
3717 --uRestUI_FoodRequiredToRest; | 3715 --uRestUI_FoodRequiredToRest; |
3718 if ( CheckHiredNPCSpeciality(0x1Eu) ) | 3716 if ( CheckHiredNPCSpeciality(0x1Eu) ) |