Mercurial > mm7
diff UI/UIPartyCreation.cpp @ 1677:a699ecd7aeb3
PlayerCreationUI_Draw()
author | Ritor1 |
---|---|
date | Fri, 20 Sep 2013 14:31:42 +0600 |
parents | 75fafd8ced59 |
children | 6faacde46271 |
line wrap: on
line diff
--- a/UI/UIPartyCreation.cpp Thu Sep 19 17:58:56 2013 +0600 +++ b/UI/UIPartyCreation.cpp Fri Sep 20 14:31:42 2013 +0600 @@ -21,91 +21,57 @@ //----- (004908DE) -------------------------------------------------------- -int PlayerCreation_Choose4Skills() - { - Player *v0; // esi@1 - signed int v1; // edx@2 - unsigned short *v2; // eax@2 - signed int v3; // ecx@2 +bool PlayerCreation_Choose4Skills() +{ + signed int skills_count; // edx@2 - v0 = pParty->pPlayers;//[0].pActiveSkills; - while ( 1 ) - { - v1 = 0; - v2 = v0->pActiveSkills; - v3 = 37; - do - { - if ( *v2 ) - ++v1; - ++v2; - --v3; - } - while ( v3 ); - if ( v1 < 4 ) - break; - ++v0; - if ( v0 > &pParty->pPlayers[3] ) - return 1; - } - return 0; + for ( uint j = 0; j < 4; ++j ) + { + skills_count = 0; + for ( uint i = 0; i < 37; ++i ) + { + if ( pParty->pPlayers[j].pActiveSkills[i] ) + ++skills_count; } - - - + if ( skills_count < 4 ) + return false; + } + return true; +} //----- (00491CB5) -------------------------------------------------------- void LoadPlayerPortraintsAndVoices() - { - //Texture **v0; // ebx@1 - //int v1; // eax@2 - //int v2; // edi@3 - char *v3; // esi@5 - char *v4; // [sp+10h] [bp-4h]@1 - - pIcons_LOD->pFacesLock = pIcons_LOD->uNumLoadedFiles; +{ + pIcons_LOD->pFacesLock = pIcons_LOD->uNumLoadedFiles; - for (uint i = 0; i < 4; ++i) - for (uint j = 0; j < 56; ++j) - { - sprintf(pTmpBuf.data(), "%s%02d", pPlayerPortraitsNames[pParty->pPlayers[i].uCurrentFace], j + 1); - pTextures_PlayerFaces[i][j] = pIcons_LOD->LoadTexturePtr(pTmpBuf.data(), TEXTURE_16BIT_PALETTE); - } - - pTexture_PlayerFaceEradicated = pIcons_LOD->LoadTexturePtr("ERADCATE", TEXTURE_16BIT_PALETTE); - pTexture_PlayerFaceDead = pIcons_LOD->LoadTexturePtr("DEAD", TEXTURE_16BIT_PALETTE); - pTexture_PlayerFaceMask = pIcons_LOD->LoadTexturePtr("FACEMASK", TEXTURE_16BIT_PALETTE); - - if (SoundSetAction[24][0]) - for (uint i = 0; i < 4; ++i) - { - pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4998, 0); - pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4999, 0); - } + for (uint i = 0; i < 4; ++i) + for (uint j = 0; j < 56; ++j) + { + sprintf(pTmpBuf.data(), "%s%02d", pPlayerPortraitsNames[pParty->pPlayers[i].uCurrentFace], j + 1); + pTextures_PlayerFaces[i][j] = pIcons_LOD->LoadTexturePtr(pTmpBuf.data(), TEXTURE_16BIT_PALETTE); } -//----- (00491DE7) -------------------------------------------------------- -int __fastcall ReloadPlayerPortraits(int a1, int a2) - { - int result; // eax@1 - const char **v3; // ebp@1 - Texture **v4; // ebx@1 - int v5; // esi@2 + pTexture_PlayerFaceEradicated = pIcons_LOD->LoadTexturePtr("ERADCATE", TEXTURE_16BIT_PALETTE); + pTexture_PlayerFaceDead = pIcons_LOD->LoadTexturePtr("DEAD", TEXTURE_16BIT_PALETTE); + pTexture_PlayerFaceMask = pIcons_LOD->LoadTexturePtr("FACEMASK", TEXTURE_16BIT_PALETTE); - result = 0; - v3 = &pPlayerPortraitsNames[a2]; - v4 = pTextures_PlayerFaces[a1].data(); - do - { - v5 = result + 1; - sprintf(pTmpBuf.data(), "%s%02d", *v3, result + 1); - pIcons_LOD->ReloadTexture(*v4, pTmpBuf.data(), 2); - result = v5; - ++v4; - } - while ( v5 < 56 ); - return result; + if (SoundSetAction[24][0]) + for (uint i = 0; i < 4; ++i) + { + pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4998, 0); + pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4999, 0); } +} + +//----- (00491DE7) -------------------------------------------------------- +void ReloadPlayerPortraits(int player_id, int face_id)//the transition from the zombies in the normal state +{ + for ( uint i = 0; i <= 55; ++i ) + { + sprintf(pTmpBuf.data(), "%s%02d", pPlayerPortraitsNames[face_id], i + 1); + pIcons_LOD->ReloadTexture(pTextures_PlayerFaces[player_id][i], pTmpBuf.data(), 2); + } +} //----- (00495B39) -------------------------------------------------------- void PlayerCreationUI_Draw() { @@ -113,18 +79,10 @@ IconFrame *pFrame; // eax@3 int pX; // ecx@7 GUIButton *uPosActiveItem; // edi@12 - int uNumLet; // eax@14 - char v8; // al@17 - int v9; // ecx@17 - char v10; // sf@17 - size_t v16; // eax@28 int v17; // eax@33 int uStatLevel; // eax@44 unsigned int pStatColor; // eax@44 PLAYER_SKILL_TYPE pSkillsType; // eax@44 - int v51; // eax@49 - char *v52; // edi@52 - char v53; // al@52 PLAYER_CLASS_TYPE uClassType; // edi@53 int pColorText; // eax@53 PLAYER_SKILL_TYPE pSkillId; // edi@72 @@ -134,26 +92,15 @@ signed int pBonusNum; // edi@82 const char *uRaceName; // [sp+0h] [bp-170h]@39 char pText[200]; // [sp+10h] [bp-160h]@14 - GUIWindow pWindow; // [sp+D8h] [bp-98h]@83 - size_t v120; // [sp+130h] [bp-40h]@25 - int uColor1; // [sp+144h] [bp-2Ch]@1 + GUIWindow message_window; // [sp+D8h] [bp-98h]@83 int v126; // [sp+148h] [bp-28h]@25 - int uColorGreen; // [sp+14Ch] [bp-24h]@1 int pIntervalY; // [sp+150h] [bp-20h]@14 int pX_Numbers; // [sp+154h] [bp-1Ch]@18 - int uColorTeal; // [sp+158h] [bp-18h]@1 - int uColorWhite; // [sp+15Ch] [bp-14h]@1 int uX; // [sp+160h] [bp-10h]@18 - unsigned int v133; // [sp+164h] [bp-Ch]@25 - int pOrder; // [sp+168h] [bp-8h]@14 int pIntervalX; int pCorrective; - const char *pSkillName; - uColor1 = TargetColor(0xD1, 0xBB, 0x61); - uColorTeal = TargetColor(0, 0xF7, 0xF7); - uColorGreen = TargetColor(0, 0xFF, 0); - uColorWhite = TargetColor(0xFF, 0xFF, 0xFF); + //move sky pRenderer->BeginScene(); pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX); uPlayerCreationUI_SkySliderPos = (GetTickCount() % 12800) / 20; @@ -173,7 +120,7 @@ } pTextCenter = pFontCChar->AlignText_Center(640, pGlobalTXT_LocalizationStrings[51]); - pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0);//Ñ Î Ç Ä À Ò Ü Î Ò Ð ß Ä pRenderer->DrawTextureTransparent(17, 35, pPlayerPortraits[pParty->pPlayers[0].uCurrentFace]); pRenderer->DrawTextureTransparent(176, 35, pPlayerPortraits[pParty->pPlayers[1].uCurrentFace]); pRenderer->DrawTextureTransparent(335, 35, pPlayerPortraits[pParty->pPlayers[2].uCurrentFace]); @@ -189,34 +136,18 @@ memset(pText, 0, 200); strcpy(pText, pGlobalTXT_LocalizationStrings[205]);// "Skills" - uNumLet = strlen(pText) - 1; - pOrder = uNumLet; - if ( uNumLet >= 0 ) - { - while ( 1 ) - { - v8 = toupper((unsigned __int8)pText[uNumLet]); - v9 = pOrder; - v10 = pOrder-- - 1 < 0; - pText[v9] = v8; - if ( v10 ) - break; - uNumLet = pOrder; - } - } + for ( int i = strlen(pText) - 1; i >= 0; i-- )//??? + pText[i] = toupper((unsigned __int8)pText[i]); pIntervalX = 18; pIntervalY = pFontCreate->uFontHeight - 2; - //v124 = 0; uX = 32; pX_Numbers = 493; for (int i = 0; i < 4; ++i) { - auto player = pParty->pPlayers + i; - - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pIntervalX + 73, 100, 0, pClassNames[player->classType], 0, 0, 0); - pRenderer->DrawTextureTransparent(pIntervalX + 77, 50, pTexture_IC_KNIGHT[player->classType / 4]); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pIntervalX + 73, 100, 0, pClassNames[pParty->pPlayers[i].classType], 0, 0, 0); + pRenderer->DrawTextureTransparent(pIntervalX + 77, 50, pTexture_IC_KNIGHT[pParty->pPlayers[i].classType / 4]); if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 != WINDOW_INPUT_NONE && pGUIWindow_CurrentMenu->ptr_1C == (void *)i ) { @@ -228,38 +159,30 @@ break; case WINDOW_INPUT_CONFIRMED: // press enter pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; - v120 = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); v126 = 0; - v133 = 0; - if ( strlen((const char *)pKeyActionMap->pPressedKeysBuffer) )//edit name + for ( int i = 0; i < strlen((const char *)pKeyActionMap->pPressedKeysBuffer); ++i )//edit name { - do - { - if ( pKeyActionMap->pPressedKeysBuffer[v133] == ' ' ) - ++v126; - ++v133; - v16 = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); - } - while ( v133 < v16 ); + if ( pKeyActionMap->pPressedKeysBuffer[i] == ' ' ) + ++v126; } - if ( v120 && v126 != v120 ) - strcpy(player->pName, (const char *)pKeyActionMap->pPressedKeysBuffer); - pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, player->pName, 130, 0); - *(short *)&player->field_1988[27] = 1; + if ( strlen((const char *)pKeyActionMap->pPressedKeysBuffer) && v126 != strlen((const char *)pKeyActionMap->pPressedKeysBuffer) ) + strcpy(pParty->pPlayers[i].pName, (const char *)pKeyActionMap->pPressedKeysBuffer); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, pParty->pPlayers[i].pName, 130, 0); + pParty->pPlayers[i].field_1988[27] = 1; break; case WINDOW_INPUT_CANCELLED: // press escape pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; - pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, player->pName, 130, 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, pParty->pPlayers[i].pName, 130, 0); SetCurrentMenuID(MENU_NAMEPANELESC); break; } } else { - pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, player->pName, 130, 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, pParty->pPlayers[i].pName, 130, 0); } - switch (player->GetRace()) + switch (pParty->pPlayers[i].GetRace()) { case 0: uRaceName = pGlobalTXT_LocalizationStrings[99]; break; // "Human" case 1: uRaceName = pGlobalTXT_LocalizationStrings[103]; break; // "Dwarf" @@ -270,152 +193,139 @@ pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX + 72, pIntervalY + 12, 0, pTmpBuf.data(), 130, 0);//Race Name pTextCenter = pFontCreate->AlignText_Center(150, pText); - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + uX - 24, 291, uColor1, pText, 0, 0, 0); // Skills + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + uX - 24, 291, TargetColor(0xD1, 0xBB, 0x61), pText, 0, 0, 0); // Skills - uStatLevel = player->GetActualMight(); + uStatLevel = pParty->pPlayers[i].GetActualMight(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[144], pX_Numbers, uStatLevel);// "Might" - pStatColor = player->GetStatColor(0); + pStatColor = pParty->pPlayers[i].GetStatColor(0); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualIntelligence(); + uStatLevel = pParty->pPlayers[i].GetActualIntelligence(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[116], pX_Numbers, uStatLevel);// "Intellect" - pStatColor = player->GetStatColor(1); + pStatColor = pParty->pPlayers[i].GetStatColor(1); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualWillpower(); + uStatLevel = pParty->pPlayers[i].GetActualWillpower(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[163], pX_Numbers, uStatLevel);// "Personality" - pStatColor = player->GetStatColor(2); + pStatColor = pParty->pPlayers[i].GetStatColor(2); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 2 * pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualEndurance(); + uStatLevel = pParty->pPlayers[i].GetActualEndurance(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[75], pX_Numbers, uStatLevel);// "Endurance" - pStatColor = player->GetStatColor(3); + pStatColor = pParty->pPlayers[i].GetStatColor(3); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 3 * pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualAccuracy(); + uStatLevel = pParty->pPlayers[i].GetActualAccuracy(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[1], pX_Numbers, uStatLevel);// "Accuracy" - pStatColor = player->GetStatColor(4); + pStatColor = pParty->pPlayers[i].GetStatColor(4); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 4 * pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualSpeed(); + uStatLevel = pParty->pPlayers[i].GetActualSpeed(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[211], pX_Numbers, uStatLevel);// "Speed" - pStatColor = player->GetStatColor(5); + pStatColor = pParty->pPlayers[i].GetStatColor(5); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 5 * pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - uStatLevel = player->GetActualLuck(); + uStatLevel = pParty->pPlayers[i].GetActualLuck(); sprintf(pTmpBuf.data(), "%s\r%03d%d", pGlobalTXT_LocalizationStrings[136], pX_Numbers, uStatLevel);// "Luck" - pStatColor = player->GetStatColor(6); + pStatColor = pParty->pPlayers[i].GetStatColor(6); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 6 * pIntervalY + 169, pStatColor, pTmpBuf.data(), 0, 0, 0); - pSkillsType = player->GetSkillIdxByOrder(0); + pSkillsType = pParty->pPlayers[i].GetSkillIdxByOrder(0); pTextCenter = pFontCreate->AlignText_Center(150, pSkillNames[pSkillsType]); sprintf(pTmpBuf.data(), "\t%03u%s", pTextCenter, pSkillNames[pSkillsType]); - pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 311, uColorWhite, pTmpBuf.data(), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 311, TargetColor(0xFF, 0xFF, 0xFF), pTmpBuf.data(), 0, 0, 0); - pSkillsType = player->GetSkillIdxByOrder(1); + pSkillsType = pParty->pPlayers[i].GetSkillIdxByOrder(1); pTextCenter = pFontCreate->AlignText_Center(150, pSkillNames[pSkillsType]); sprintf(pTmpBuf.data(), "\t%03u%s", pTextCenter, pSkillNames[pSkillsType]); - pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, pIntervalY + 311, uColorWhite, pTmpBuf.data(), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, pIntervalY + 311, TargetColor(0xFF, 0xFF, 0xFF), pTmpBuf.data(), 0, 0, 0); - pSkillsType = player->GetSkillIdxByOrder(2); + pSkillsType = pParty->pPlayers[i].GetSkillIdxByOrder(2); pTextCenter = pFontCreate->AlignText_Center(150, pSkillNames[pSkillsType]); sprintf(pTmpBuf.data(), "\t%03u%s", pTextCenter, pSkillNames[pSkillsType]); - pColorText = uColorGreen; + pColorText = TargetColor(0, 0xFF, 0); if ( (signed int)pSkillsType >= 37 ) - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 2 * pIntervalY + 311, pColorText, pTmpBuf.data(), 0, 0, 0); - pSkillsType = player->GetSkillIdxByOrder(3); + pSkillsType = pParty->pPlayers[i].GetSkillIdxByOrder(3); pTextCenter = pFontCreate->AlignText_Center(150, pSkillNames[pSkillsType]); sprintf(pTmpBuf.data(), "\t%03u%s", pTextCenter, pSkillNames[pSkillsType]); - pColorText = uColorGreen; + pColorText = TargetColor(0, 0xFF, 0); if ( (signed int)pSkillsType >= 37 ) - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 3 * pIntervalY + 311, pColorText, pTmpBuf.data(), 0, 0, 0); - //v124 = (char *)v124 + 1; pIntervalX += 159; pX_Numbers -= 158; uX += 158; } strcpy(pText, pGlobalTXT_LocalizationStrings[41]);// "Class" - v51 = strlen(pText) - 1; - pOrder = v51; - if ( v51 >= 0 ) - { - while ( 1 ) - { - v52 = &pText[v51]; - v53 = toupper((unsigned __int8)pText[v51]); - v10 = pOrder-- - 1 < 0; - *v52 = v53; - if ( v10 ) - break; - v51 = pOrder; - } - } + for ( int i = strlen(pText) - 1; i >= 0; i-- ) + pText[i] = toupper((unsigned __int8)pText[i]); + uClassType = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].classType; pTextCenter = pFontCreate->AlignText_Center(193, pText); - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 324, 395, uColor1, pText, 0, 0, 0);//Classes + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 324, 395, TargetColor(0xD1, 0xBB, 0x61), pText, 0, 0, 0);//Classes - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[0]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 323, 417, pColorText, pClassNames[0], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_PALADIN ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[12]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 323, pIntervalY + 417, pColorText, pClassNames[12], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_DRUID ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[20]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 323, 2 * pIntervalY + 417, pColorText, pClassNames[20], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_CLERIC ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[24]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, 417, pColorText, pClassNames[24], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_DRUID) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[28]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, pIntervalY + 417, pColorText, pClassNames[28], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_SORCERER ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[32]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, 2 * pIntervalY + 417, pColorText, pClassNames[32], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_ARCHER ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[16]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 453, 417, pColorText, pClassNames[16], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_MONK ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[8]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 453, pIntervalY + 417, pColorText, pClassNames[8], 0, 0, 0); - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( uClassType != PLAYER_CLASS_THEIF ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[4]); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 453, 2 * pIntervalY + 417, pColorText, pClassNames[4], 0, 0, 0); pTextCenter = pFontCreate->AlignText_Center(236, pGlobalTXT_LocalizationStrings[20]); // "Available Skills" - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 37, 395, uColor1, pGlobalTXT_LocalizationStrings[20], 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 37, 395, TargetColor(0xD1, 0xBB, 0x61), pGlobalTXT_LocalizationStrings[20], 0, 0, 0); for (uint i = 0; i < 9; ++i) { pSkillId = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(i + 4); @@ -441,31 +351,31 @@ pCorrective = -10;//-5 if ( (signed int)pLenText < 8 )//if ( (signed int)v124 > 2 ) pCorrective = 0; - pColorText = uColorTeal; + pColorText = TargetColor(0, 0xF7, 0xF7); if ( !pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].pActiveSkills[pSkillId] ) - pColorText = uColorWhite; + pColorText = TargetColor(0xFF, 0xFF, 0xFF); pTextCenter = pFontCreate->AlignText_Center(100, pText); pGUIWindow_CurrentMenu->DrawText(pFontCreate, 100 * (i / 3) + pTextCenter + pCorrective + 17, pIntervalY * (i % 3) + 417, pColorText, pText, 0, 0, 0); } pTextCenter = pFontCreate->AlignText_Center(0x5C, pGlobalTXT_LocalizationStrings[30]);// "Bonus" - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 533, 394, uColor1, pGlobalTXT_LocalizationStrings[30], 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 533, 394, TargetColor(0xD1, 0xBB, 0x61), pGlobalTXT_LocalizationStrings[30], 0, 0, 0); pBonusNum = PlayerCreation_GetUnspentAttributePointCount(); sprintf(pTmpBuf.data(), "%d", pBonusNum); pTextCenter = pFontCreate->AlignText_Center(84, pTmpBuf.data()); - pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 530, 410, uColorWhite, pTmpBuf.data(), 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 530, 410, TargetColor(0xFF, 0xFF, 0xFF), pTmpBuf.data(), 0, 0, 0); if ( GameUI_Footer_TimeLeft > GetTickCount() ) { - pWindow.Hint = pGlobalTXT_LocalizationStrings[412];// "Create Party cannot be completed unless you have assigned all characters 2 extra skills and have spent all of your bonus points." + message_window.Hint = pGlobalTXT_LocalizationStrings[412];// "Create Party cannot be completed unless you have assigned all characters 2 extra skills and have spent all of your bonus points." if ( pBonusNum < 0 ) - pWindow.Hint = pGlobalTXT_LocalizationStrings[413];// "You can't spend more than 50 points." - pWindow.uFrameWidth = 300; - pWindow.uFrameHeight = 100; - pWindow.uFrameX = 170; - pWindow.uFrameY = 140; - pWindow.uFrameZ = 469; - pWindow.uFrameW = 239; - pWindow.DrawMessageBox(0); + message_window.Hint = pGlobalTXT_LocalizationStrings[413];// "You can't spend more than 50 points." + message_window.uFrameWidth = 300; + message_window.uFrameHeight = 100; + message_window.uFrameX = 170; + message_window.uFrameY = 140; + message_window.uFrameZ = 469; + message_window.uFrameW = 239; + message_window.DrawMessageBox(0); } pRenderer->EndScene(); }