diff 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
line wrap: on
line diff
--- a/GUI/UI/UIPartyCreation.cpp	Mon Mar 07 03:48:40 2016 +0200
+++ b/GUI/UI/UIPartyCreation.cpp	Wed Mar 09 01:39:52 2016 +0200
@@ -16,8 +16,9 @@
 #include "IO/Mouse.h"
 #include "IO/Keyboard.h"
 
+#include "GUI/GUIFont.h"
 #include "GUI/UI/UIPartyCreation.h"
-#include "GUI/GUIFont.h"
+#include "GUI/UI/UIGame.h"
 
 #include "Media/Audio/AudioPlayer.h"
 
@@ -74,11 +75,11 @@
     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);
+      game_ui_player_faces[i][j] = assets->GetImage_16BitColorKey(pTmpBuf.data(), 0x7FF);
     }
 
-  pTexture_PlayerFaceEradicated = pIcons_LOD->LoadTexturePtr("ERADCATE", TEXTURE_16BIT_PALETTE);
-  pTexture_PlayerFaceDead = pIcons_LOD->LoadTexturePtr("DEAD", TEXTURE_16BIT_PALETTE);
+  game_ui_player_face_eradicated = assets->GetImage_16BitColorKey("ERADCATE", 0x7FF);
+  game_ui_player_face_dead = assets->GetImage_16BitColorKey("DEAD", 0x7FF);
   ui_partycreation_face_mask = assets->GetImage_16BitColorKey("FACEMASK", 0x7FF);
 
   if (SoundSetAction[24][0])
@@ -95,7 +96,8 @@
   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);
+    //pIcons_LOD->ReloadTexture(game_ui_player_faces[player_id][i], pTmpBuf.data(), 2);
+    game_ui_player_faces[player_id][i] = assets->GetImage_16BitColorKey(pTmpBuf.data(), 0x7FF);
   }
 }
 
@@ -105,7 +107,7 @@
 void GUIWindow_PartyCreation::Update()
 {
   int pTextCenter; // eax@3
-  IconFrame *pFrame; // eax@3
+  Icon *pFrame; // eax@3
   int pX; // ecx@7
   GUIButton *uPosActiveItem; // edi@12
   int v17; // eax@33
@@ -153,10 +155,10 @@
   pRenderer->DrawTextureAlphaNew(176/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[1].uCurrentFace]);
   pRenderer->DrawTextureAlphaNew(335/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[2].uCurrentFace]);
   pRenderer->DrawTextureAlphaNew(494/640.0f, 35/480.0f, ui_partycreation_portraits[pParty->pPlayers[3].uCurrentFace]);
-  pFrame = pIconsFrameTable->GetFrame(uIconID_CharacterFrame, pEventTimer->uStartTime);
 
   //arrows
-  pRenderer->DrawTextureIndexedAlpha(pX, 29, &pIcons_LOD->pTextures[pFrame->uTextureID]);
+  pFrame = pIconsFrameTable->GetFrame(uIconID_CharacterFrame, pEventTimer->uStartTime);
+  pRenderer->DrawTextureAlphaNew(pX/640.0f, 29/480.0f, pFrame->texture);
   uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->pCurrentPosActiveItem);
   uPlayerCreationUI_ArrowAnim = 18 - (GetTickCount() % 450) / 25;
   pRenderer->DrawTextureAlphaNew((uPosActiveItem->uZ - 4)/640.0f, uPosActiveItem->uY/480.0f, ui_partycreation_arrow_l[uPlayerCreationUI_ArrowAnim + 1]);