Mercurial > mm7
comparison GUI/UI/UIPartyCreation.cpp @ 2575:a76d408c5132 tip
DrawTranslucent -> DrawTextureGrayShade
Removed old texture drawing stuff
author | a.parshin |
---|---|
date | Wed, 09 Mar 2016 01:39:52 +0200 |
parents | dd36326a9994 |
children |
comparison
equal
deleted
inserted
replaced
2574:dd36326a9994 | 2575:a76d408c5132 |
---|---|
14 #include "Engine/Tables/IconFrameTable.h" | 14 #include "Engine/Tables/IconFrameTable.h" |
15 | 15 |
16 #include "IO/Mouse.h" | 16 #include "IO/Mouse.h" |
17 #include "IO/Keyboard.h" | 17 #include "IO/Keyboard.h" |
18 | 18 |
19 #include "GUI/GUIFont.h" | |
19 #include "GUI/UI/UIPartyCreation.h" | 20 #include "GUI/UI/UIPartyCreation.h" |
20 #include "GUI/GUIFont.h" | 21 #include "GUI/UI/UIGame.h" |
21 | 22 |
22 #include "Media/Audio/AudioPlayer.h" | 23 #include "Media/Audio/AudioPlayer.h" |
23 | 24 |
24 #include "Game/Game.h" | 25 #include "Game/Game.h" |
25 #include "Game/MainMenu.h" | 26 #include "Game/MainMenu.h" |
72 | 73 |
73 for (uint i = 0; i < 4; ++i) | 74 for (uint i = 0; i < 4; ++i) |
74 for (uint j = 0; j < 56; ++j) | 75 for (uint j = 0; j < 56; ++j) |
75 { | 76 { |
76 sprintf(pTmpBuf.data(), "%s%02d", pPlayerPortraitsNames[pParty->pPlayers[i].uCurrentFace], j + 1); | 77 sprintf(pTmpBuf.data(), "%s%02d", pPlayerPortraitsNames[pParty->pPlayers[i].uCurrentFace], j + 1); |
77 pTextures_PlayerFaces[i][j] = pIcons_LOD->LoadTexturePtr(pTmpBuf.data(), TEXTURE_16BIT_PALETTE); | 78 game_ui_player_faces[i][j] = assets->GetImage_16BitColorKey(pTmpBuf.data(), 0x7FF); |
78 } | 79 } |
79 | 80 |
80 pTexture_PlayerFaceEradicated = pIcons_LOD->LoadTexturePtr("ERADCATE", TEXTURE_16BIT_PALETTE); | 81 game_ui_player_face_eradicated = assets->GetImage_16BitColorKey("ERADCATE", 0x7FF); |
81 pTexture_PlayerFaceDead = pIcons_LOD->LoadTexturePtr("DEAD", TEXTURE_16BIT_PALETTE); | 82 game_ui_player_face_dead = assets->GetImage_16BitColorKey("DEAD", 0x7FF); |
82 ui_partycreation_face_mask = assets->GetImage_16BitColorKey("FACEMASK", 0x7FF); | 83 ui_partycreation_face_mask = assets->GetImage_16BitColorKey("FACEMASK", 0x7FF); |
83 | 84 |
84 if (SoundSetAction[24][0]) | 85 if (SoundSetAction[24][0]) |
85 for (uint i = 0; i < 4; ++i) | 86 for (uint i = 0; i < 4; ++i) |
86 { | 87 { |
93 void ReloadPlayerPortraits(int player_id, int face_id)//the transition from the zombies in the normal state | 94 void ReloadPlayerPortraits(int player_id, int face_id)//the transition from the zombies in the normal state |
94 { | 95 { |
95 for ( uint i = 0; i <= 55; ++i ) | 96 for ( uint i = 0; i <= 55; ++i ) |
96 { | 97 { |
97 sprintf(pTmpBuf.data(), "%s%02d", pPlayerPortraitsNames[face_id], i + 1); | 98 sprintf(pTmpBuf.data(), "%s%02d", pPlayerPortraitsNames[face_id], i + 1); |
98 pIcons_LOD->ReloadTexture(pTextures_PlayerFaces[player_id][i], pTmpBuf.data(), 2); | 99 //pIcons_LOD->ReloadTexture(game_ui_player_faces[player_id][i], pTmpBuf.data(), 2); |
100 game_ui_player_faces[player_id][i] = assets->GetImage_16BitColorKey(pTmpBuf.data(), 0x7FF); | |
99 } | 101 } |
100 } | 102 } |
101 | 103 |
102 | 104 |
103 //----- (00495B39) -------------------------------------------------------- | 105 //----- (00495B39) -------------------------------------------------------- |
104 //void PlayerCreationUI_Draw() | 106 //void PlayerCreationUI_Draw() |
105 void GUIWindow_PartyCreation::Update() | 107 void GUIWindow_PartyCreation::Update() |
106 { | 108 { |
107 int pTextCenter; // eax@3 | 109 int pTextCenter; // eax@3 |
108 IconFrame *pFrame; // eax@3 | 110 Icon *pFrame; // eax@3 |
109 int pX; // ecx@7 | 111 int pX; // ecx@7 |
110 GUIButton *uPosActiveItem; // edi@12 | 112 GUIButton *uPosActiveItem; // edi@12 |
111 int v17; // eax@33 | 113 int v17; // eax@33 |
112 int uStatLevel; // eax@44 | 114 int uStatLevel; // eax@44 |
113 unsigned int pStatColor; // eax@44 | 115 unsigned int pStatColor; // eax@44 |
151 pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0);// CREATE PARTY / Ñ Î Ç Ä À Ò Ü Î Ò Ð ß Ä | 153 pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0);// CREATE PARTY / Ñ Î Ç Ä À Ò Ü Î Ò Ð ß Ä |
152 pRenderer->DrawTextureAlphaNew(17/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[0].uCurrentFace]); | 154 pRenderer->DrawTextureAlphaNew(17/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[0].uCurrentFace]); |
153 pRenderer->DrawTextureAlphaNew(176/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[1].uCurrentFace]); | 155 pRenderer->DrawTextureAlphaNew(176/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[1].uCurrentFace]); |
154 pRenderer->DrawTextureAlphaNew(335/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[2].uCurrentFace]); | 156 pRenderer->DrawTextureAlphaNew(335/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[2].uCurrentFace]); |
155 pRenderer->DrawTextureAlphaNew(494/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[3].uCurrentFace]); | 157 pRenderer->DrawTextureAlphaNew(494/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[3].uCurrentFace]); |
158 | |
159 //arrows | |
156 pFrame = pIconsFrameTable->GetFrame(uIconID_CharacterFrame, pEventTimer->uStartTime); | 160 pFrame = pIconsFrameTable->GetFrame(uIconID_CharacterFrame, pEventTimer->uStartTime); |
157 | 161 pRenderer->DrawTextureAlphaNew(pX/640.0f, 29/480.0f, pFrame->texture); |
158 //arrows | |
159 pRenderer->DrawTextureIndexedAlpha(pX, 29, &pIcons_LOD->pTextures[pFrame->uTextureID]); | |
160 uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->pCurrentPosActiveItem); | 162 uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->pCurrentPosActiveItem); |
161 uPlayerCreationUI_ArrowAnim = 18 - (GetTickCount() % 450) / 25; | 163 uPlayerCreationUI_ArrowAnim = 18 - (GetTickCount() % 450) / 25; |
162 pRenderer->DrawTextureAlphaNew((uPosActiveItem->uZ - 4)/640.0f, uPosActiveItem->uY/480.0f, ui_partycreation_arrow_l[uPlayerCreationUI_ArrowAnim + 1]); | 164 pRenderer->DrawTextureAlphaNew((uPosActiveItem->uZ - 4)/640.0f, uPosActiveItem->uY/480.0f, ui_partycreation_arrow_l[uPlayerCreationUI_ArrowAnim + 1]); |
163 pRenderer->DrawTextureAlphaNew((uPosActiveItem->uX - 12)/640.0f, uPosActiveItem->uY/480.0f, ui_partycreation_arrow_r[uPlayerCreationUI_ArrowAnim + 1]); | 165 pRenderer->DrawTextureAlphaNew((uPosActiveItem->uX - 12)/640.0f, uPosActiveItem->uY/480.0f, ui_partycreation_arrow_r[uPlayerCreationUI_ArrowAnim + 1]); |
164 | 166 |