comparison UIPopup.cpp @ 948:5a2dbb00c399

Code cleaning.
author Nomad
date Wed, 01 May 2013 17:31:10 +0200
parents 9be9afdbeac3
children c0d0656aa662
comparison
equal deleted inserted replaced
947:99aa9c8464cf 948:5a2dbb00c399
70 70
71 v4 = uY; 71 v4 = uY;
72 a2a = uX; 72 a2a = uX;
73 a4 = uX + uWidth; 73 a4 = uX + uWidth;
74 pRenderer->SetTextureClipRect(uX, v4, uX + uWidth, v4 + uHeight); 74 pRenderer->SetTextureClipRect(uX, v4, uX + uWidth, v4 + uHeight);
75 v5 = (Texture *)(uTextureID_Parchment != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Parchment] : 0); 75 v5 = pIcons_LOD->GetTexture(uTextureID_Parchment);
76 uTileWidth = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24); 76 uTileWidth = v5->uTextureWidth;
77 v13 = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24); 77 v13 = v5->uTextureWidth;
78 uTileHeight = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26); 78 uTileHeight = v5->uTextureHeight;
79 if ( (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24) 79 if ( v5->uTextureWidth && v5->uTextureHeight)
80 && (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26) ) 80 {
81 {
82 uNumXTiles = (signed int)uWidth / uTileWidth; 81 uNumXTiles = (signed int)uWidth / uTileWidth;
83 if ( (signed int)uWidth % uTileWidth ) 82 if ( (signed int)uWidth % uTileWidth )
84 ++uNumXTiles; 83 ++uNumXTiles;
85 a5 = 0; 84 a5 = 0;
86 v21 = v4; 85 v21 = v4;
104 v21 += uTileHeight; 103 v21 += uTileHeight;
105 v8 = a5++; 104 v8 = a5++;
106 } 105 }
107 while ( v8 < (signed int)uHeight / uTileHeight ); 106 while ( v8 < (signed int)uHeight / uTileHeight );
108 a5a = v4 + uHeight - 32; 107 a5a = v4 + uHeight - 32;
109 pRenderer->DrawTextureTransparent( 108 pRenderer->DrawTextureTransparent(a2a, v4, pIcons_LOD->GetTexture(uTextureID_5076AC));
110 a2a, 109 pRenderer->DrawTextureTransparent(a2a, a5a, pIcons_LOD->GetTexture(uTextureID_5076B4));
111 v4, 110 pRenderer->DrawTextureTransparent(a4 - 32, v4, pIcons_LOD->GetTexture(uTextureID_5076A8));
112 (Texture *)(uTextureID_5076AC != -1 ? &pIcons_LOD->pTextures[uTextureID_5076AC] : 0)); 111 pRenderer->DrawTextureTransparent(a4 - 32, a5a, pIcons_LOD->GetTexture(uTextureID_5076B0));
113 pRenderer->DrawTextureTransparent(
114 a2a,
115 a5a,
116 (Texture *)(uTextureID_5076B4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076B4] : 0));
117 pRenderer->DrawTextureTransparent(
118 a4 - 32,
119 v4,
120 (Texture *)(uTextureID_5076A8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A8] : 0));
121 pRenderer->DrawTextureTransparent(
122 a4 - 32,
123 a5a,
124 (Texture *)(uTextureID_5076B0 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_5076B0] : 0));
125 uNumXTilesb = a2a + 32; 112 uNumXTilesb = a2a + 32;
126 v22 = v4 + uHeight - 10; 113 v22 = v4 + uHeight - 10;
127 if ( (signed int)uWidth > 64 ) 114 if ( (signed int)uWidth > 64 )
128 { 115 {
129 pRenderer->SetTextureClipRect(a2a + 32, v4, a4 - 32, v4 + uHeight); 116 pRenderer->SetTextureClipRect(a2a + 32, v4, a4 - 32, v4 + uHeight);
130 pRenderer->DrawTextureTransparent( 117 pRenderer->DrawTextureTransparent(uNumXTilesb, v4, pIcons_LOD->GetTexture(uTextureID_507698));
131 uNumXTilesb, 118 pRenderer->DrawTextureTransparent(uNumXTilesb, v22, pIcons_LOD->GetTexture(uTextureID_5076A4));
132 v4,
133 (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0));
134 pRenderer->DrawTextureTransparent(
135 uNumXTilesb,
136 v22,
137 (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0));
138 if ( (signed int)uWidth > 512 ) 119 if ( (signed int)uWidth > 512 )
139 { 120 {
140 pRenderer->DrawTextureTransparent( 121 pRenderer->DrawTextureTransparent(a2a + 544, v4, pIcons_LOD->GetTexture(uTextureID_507698));
141 a2a + 544, 122 pRenderer->DrawTextureTransparent(a2a + 544, v22, pIcons_LOD->GetTexture(uTextureID_5076A4));
142 v4,
143 (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0));
144 pRenderer->DrawTextureTransparent(
145 a2a + 544,
146 v22,
147 (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0));
148 } 123 }
149 } 124 }
150 v9 = v4 + 32; 125 v9 = v4 + 32;
151 if ( (signed int)uHeight > 64 ) 126 if ( (signed int)uHeight > 64 )
152 { 127 {
153 pRenderer->SetTextureClipRect(a2a, v9, a4, a5a); 128 pRenderer->SetTextureClipRect(a2a, v9, a4, a5a);
154 pRenderer->DrawTextureTransparent( 129 pRenderer->DrawTextureTransparent(a2a, v9, pIcons_LOD->GetTexture(uTextureID_5076A0));
155 a2a, 130 pRenderer->DrawTextureTransparent(a4 - 10, v9, pIcons_LOD->GetTexture(uTextureID_50769C));
156 v9,
157 (Texture *)(uTextureID_5076A0 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A0] : 0));
158 pRenderer->DrawTextureTransparent(
159 a4 - 10,
160 v9,
161 (Texture *)(uTextureID_50769C != -1 ? &pIcons_LOD->pTextures[uTextureID_50769C] : 0));
162 } 131 }
163 pRenderer->ResetTextureClipRect(); 132 pRenderer->ResetTextureClipRect();
164 } 133 }
165 } 134 }
166 135