annotate GUI/GUIProgressBar.cpp @ 2575:a76d408c5132 tip

DrawTranslucent -> DrawTextureGrayShade Removed old texture drawing stuff
author a.parshin
date Wed, 09 Mar 2016 01:39:52 +0200
parents 0c67be4ec900
children
rev   line source
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
1 #define _CRTDBG_MAP_ALLOC
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
2 #include <stdlib.h>
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
3 #include <crtdbg.h>
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
4
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
5 #define _CRT_SECURE_NO_WARNINGS
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
6 #include "Engine/Engine.h"
2572
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
7 #include "Engine/AssetsManager.h"
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2525
diff changeset
8
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
9 #include "GUIProgressBar.h"
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
10 #include "Engine/LOD.h"
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
11 #include "Engine/Party.h"
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
12 #include "Engine/Graphics/Render.h"
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
13 #include "Engine/Tables/IconFrameTable.h"
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
14
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
15
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
16
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
17
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
18 struct GUIProgressBar *pGameLoadingUI_ProgressBar = new GUIProgressBar;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
19
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
20
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
21
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
22
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
23 //----- (00Initialize) --------------------------------------------------------
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
24 bool GUIProgressBar::Initialize(Type type)
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
25 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
26 //GUIProgressBar *v2; // esi@1
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
27 signed int v4; // eax@7
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
28 int v5; // ecx@8
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
29 //int v6; // edi@8
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
30 int v7; // edx@14
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
31 //const char *v8; // [sp-8h] [bp-84h]@20
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
32 //unsigned int v9; // [sp-4h] [bp-80h]@20
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
33 char Str1[64]; // [sp+4h] [bp-78h]@16
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
34
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
35 switch (type)
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
36 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
37 case TYPE_None:
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
38 return true;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
39
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
40 case TYPE_Box:
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
41 case TYPE_Fullscreen:
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
42 break;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
43
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
44 default:
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
45 Error("Invalid GUIProgressBar type: %u", type);
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
46 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
47
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
48 //v2 = this;
2572
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
49 if (loading_bg)
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
50 return false;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
51
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
52 uType = type;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
53
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
54 v4 = 1;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
55 if (uType == TYPE_Fullscreen)
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
56 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
57 v5 = 0;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
58 //v6 = (int)&field_10;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
59 do
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
60 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
61 if ( field_10[v4] == 1 )
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
62 ++v5;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
63 ++v4;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
64 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
65 while ( v4 <= 5 );
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
66 if ( v5 == 5 )
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
67 memset(field_10, 0, 8);
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
68 v7 = rand() % 5 + 1;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
69 if ( field_10[v7] == 1 )
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
70 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
71 do
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
72 v7 = rand() % 5 + 1;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
73 while ( field_10[v7] == 1 );
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
74 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
75 sprintf(Str1, "loading%d.pcx", v7);
2572
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
76
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
77 wchar_t image_name[1024];
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
78 swprintf(image_name, L"loading%d.pcx", v7);
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
79
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
80 loading_bg = assets->GetImage_PCXFromIconsLOD(image_name);
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
81 //pLoadingBg.Load(Str1, 2);
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
82 uProgressCurrent = 0;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
83 uX = 122;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
84 uY = 151;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
85 uWidth = 449;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
86 uHeight = 56;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
87 uProgressMax = 26;
2575
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
88
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
89 //pIcons_LOD->PlacementLoadTexture(&pLoadingProgress, "loadprog", 2u);
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
90 progressbar_loading = assets->GetImage_16BitColorKey("loadprog", 0x7FF);
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
91 Draw();
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
92 return true;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
93 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
94
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
95 switch (pParty->alignment)
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
96 {
2575
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
97 case PartyAlignment_Good: progressbar_dungeon = assets->GetImage_16BitColorKey("bardata-b", 0x7FF); break;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
98 case PartyAlignment_Neutral: progressbar_dungeon = assets->GetImage_16BitColorKey("bardata", 0x7FF); break;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
99 case PartyAlignment_Evil: progressbar_dungeon = assets->GetImage_16BitColorKey("bardata-c", 0x7FF); break;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
100 //case PartyAlignment_Good: pIcons_LOD->PlacementLoadTexture(&pBardata, "bardata-b", 2); break;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
101 //case PartyAlignment_Neutral: pIcons_LOD->PlacementLoadTexture(&pBardata, "bardata", 2); break;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
102 //case PartyAlignment_Evil: pIcons_LOD->PlacementLoadTexture(&pBardata, "bardata-c", 2); break;
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
103 default: Error("Invalid alignment type: %u", pParty->alignment);
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
104 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
105
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
106 uProgressCurrent = 0;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
107 uProgressMax = 26;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
108 Draw();
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
109 return true;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
110 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
111
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
112 //----- (004435BB) --------------------------------------------------------
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
113 void GUIProgressBar::Reset(unsigned __int8 uMaxProgress)
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
114 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
115 field_9 = 0;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
116 uProgressCurrent = 0;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
117 uProgressMax = uMaxProgress;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
118 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
119
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
120 //----- (004435CD) --------------------------------------------------------
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
121 void GUIProgressBar::Progress()
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
122 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
123 ++this->uProgressCurrent;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
124 if ( this->uProgressCurrent > this->uProgressMax )
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
125 this->uProgressCurrent = this->uProgressMax;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
126 Draw();
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
127 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
128
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
129 //----- (004435E2) --------------------------------------------------------
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
130 void GUIProgressBar::Release()
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
131 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
132 int v3; // edi@7
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
133
2572
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
134 if (loading_bg)
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
135 {
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
136 loading_bg->Release();
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
137 loading_bg = nullptr;
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
138 }
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
139
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
140 if ( this->uType == 1 )
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
141 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
142 if ( this->uProgressCurrent != this->uProgressMax )
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
143 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
144 this->uProgressCurrent = this->uProgressMax - 1;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
145 Progress();
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
146 }
2575
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
147
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
148 if (progressbar_loading)
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
149 {
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
150 progressbar_loading->Release();
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
151 progressbar_loading = nullptr;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
152 }
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
153 //v3 = (int)&this->pLoadingProgress.paletted_pixels;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
154 //free(this->pLoadingProgress.paletted_pixels);
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
155 //free(this->pLoadingProgress.pPalette16);
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
156 //this->pLoadingProgress.pPalette16 = 0;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
157 //*(int *)v3 = 0;
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
158 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
159 else
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
160 {
2575
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
161 //if ( !this->pBardata.paletted_pixels)
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
162 // return;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
163 //free(this->pBardata.paletted_pixels);
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
164 //v3 = (int)&this->pBardata.pPalette16;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
165 //free(this->pBardata.pPalette16);
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
166 //this->pBardata.paletted_pixels = 0;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
167 //*(int *)v3 = 0;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
168 if (progressbar_dungeon)
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
169 {
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
170 progressbar_dungeon->Release();
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
171 progressbar_dungeon = nullptr;
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
172 }
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
173 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
174 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
175
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
176 //----- (00443670) --------------------------------------------------------
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
177 void GUIProgressBar::Draw()
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
178 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
179 pRenderer->BeginScene();
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
180 if (uType != TYPE_Fullscreen)
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
181 {
2575
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
182 //if (pBardata.paletted_pixels)
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
183 {
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
184 pRenderer->Sub01();
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
185
2575
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
186 pRenderer->DrawTextureAlphaNew(80/640.0f, 122/480.0f, progressbar_dungeon);
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
187 pRenderer->DrawTextureAlphaNew(100/640.0f, 146/480.0f, pIconsFrameTable->GetFrame(uIconID_TurnHour, 0)->texture);
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
188 //pRenderer->FillRectFast(174, 164, floorf(((double)(113 * uProgressCurrent) / (double)uProgressMax) + 0.5f),//COERCE_UNSIGNED_INT64(v4 + 6.7553994e15),
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
189 //16, pRenderer->uTargetRMask);
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
190 pRenderer->FillRectFast(174, 164, floorf(((double)(113 * uProgressCurrent) / (double)uProgressMax) + 0.5f),//COERCE_UNSIGNED_INT64(v4 + 6.7553994e15),
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
191 16, 0xF800);
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
192 pRenderer->EndScene();
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
193 pRenderer->Present();
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
194 return;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
195 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
196 pRenderer->EndScene();
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
197 return;
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
198 }
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
199
2572
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
200 //if (!pLoadingBg.pPixels)
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
201 if (!loading_bg)
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
202 {
2572
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
203 pRenderer->EndScene();
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
204 }
2572
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
205 else
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
206 {
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
207 pRenderer->DrawTextureNew(0, 0, loading_bg);
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
208 //pRenderer->SetRasterClipRect(0, 0, 639, 479);
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
209 pRenderer->SetUIClipRect(172, 459, 15 * (signed int)(signed __int64)((double)(300 * uProgressCurrent) / (double)uProgressMax) / 15 + 172, 471);
2575
a76d408c5132 DrawTranslucent -> DrawTextureGrayShade
a.parshin
parents: 2573
diff changeset
210 pRenderer->DrawTextureAlphaNew(172/640.0f, 459/480.0f, progressbar_loading);
2572
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
211 pRenderer->ResetUIClipRect();
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
212 pRenderer->EndScene();
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
213 pRenderer->Present();
d87bfbd3bb3b Step towards unification of Texture and RGBTexture (class Image)
a.parshin
parents: 2541
diff changeset
214 }
2502
a77c34acdbc9 Media folder
Ritor1
parents:
diff changeset
215 }