comparison LOD.cpp @ 1439:468f434a8d8a

Слияние
author Ritor1
date Mon, 22 Jul 2013 18:00:58 +0600
parents c0b273d33338
children 934074e7fcc1
comparison
equal deleted inserted replaced
1438:bc99e1a48bea 1439:468f434a8d8a
72 field_ECA4 = uNumLoadedSprites; 72 field_ECA4 = uNumLoadedSprites;
73 if (field_ECA0 < uNumLoadedSprites) 73 if (field_ECA0 < uNumLoadedSprites)
74 field_ECA0 = uNumLoadedSprites; 74 field_ECA0 = uNumLoadedSprites;
75 } 75 }
76 76
77
78
79 //----- (004355F7) -------------------------------------------------------- 77 //----- (004355F7) --------------------------------------------------------
80 void LODFile_IconsBitmaps::_4355F7() 78 void LODFile_IconsBitmaps::RemoveTexturesFromTextureList()
81 { 79 {
82 LODFile_IconsBitmaps *v1; // esi@1
83 int v2; // edi@2
84 Texture *v3; // ebp@3
85 struct IDirect3DTexture2 **v4; // eax@4
86 struct IDirect3DTexture2 *v5; // eax@5
87 struct IDirectDrawSurface **v6; // eax@7
88 struct IDirectDrawSurface *v7; // eax@8
89 int v8; // eax@11
90
91 v1 = this;
92 if ( this->uTexturePacksCount ) 80 if ( this->uTexturePacksCount )
93 { 81 {
94 v2 = this->uNumLoadedFiles - 1; 82 if ( (this->uNumLoadedFiles - 1) >= this->uNumPrevLoadedFiles )
95 if ( v2 >= this->uNumPrevLoadedFiles ) 83 {
96 { 84 for ( uint i = this->uNumLoadedFiles - 1; i >= this->uNumPrevLoadedFiles; --i )
97 v3 = &this->pTextures[v2]; 85 {
98 do 86 this->pTextures[i].Release();
99 { 87 if ( this->pHardwareTextures )
100 v3->Release(); 88 {
101 v4 = v1->pHardwareTextures; 89 if ( this->pHardwareTextures[i] )
102 if ( v4 )
103 {
104 v5 = v4[v2];
105 if ( v5 )
106 { 90 {
107 v5->Release(); 91 this->pHardwareTextures[i]->Release();
108 v1->pHardwareTextures[v2] = 0; 92 this->pHardwareTextures[i] = 0;
109 } 93 }
110 } 94 }
111 v6 = v1->pHardwareSurfaces; 95 if ( this->pHardwareSurfaces )
112 if ( v6 ) 96 {
113 { 97 if ( this->pHardwareSurfaces[i] )
114 v7 = v6[v2];
115 if ( v7 )
116 { 98 {
117 v7->Release(); 99 this->pHardwareSurfaces[i]->Release();
118 v1->pHardwareSurfaces[v2] = 0; 100 this->pHardwareSurfaces[i] = 0;
119 } 101 }
120 } 102 }
121 --v2; 103 }
122 --v3; 104 }
123 } 105 this->uNumLoadedFiles = this->uNumPrevLoadedFiles;
124 while ( v2 >= v1->uNumPrevLoadedFiles ); 106 this->uNumPrevLoadedFiles = 0;
125 } 107 this->uTexturePacksCount = 0;
126 v8 = v1->uNumPrevLoadedFiles;
127 v1->uNumPrevLoadedFiles = 0;
128 v1->uNumLoadedFiles = v8;
129 v1->uTexturePacksCount = 0;
130 } 108 }
131 } 109 }
132 110
133 //----- (004114F2) -------------------------------------------------------- 111 //----- (004114F2) --------------------------------------------------------
134 void LODFile_IconsBitmaps::_4114F2() 112 void LODFile_IconsBitmaps::RemoveTexturesPackFromTextureList()
135 { 113 {
136 LODFile_IconsBitmaps *v1; // esi@1 114 if ( this->uTexturePacksCount )
137 int *pTexturePacksCount; // eax@1 115 {
138 int v3; // ecx@1 116 this->uTexturePacksCount--;
139 int v4; // ecx@2 117 if ( !this->uTexturePacksCount )
140 int v5; // edi@3 118 {
141 Texture *v6; // ebx@4 119 if ( (this->uNumLoadedFiles - 1) >= this->uNumPrevLoadedFiles )
142 struct IDirect3DTexture2 **v7; // eax@5 120 {
143 struct IDirect3DTexture2 *v8; // eax@6 121 for ( uint i = this->uNumLoadedFiles - 1; i >= this->uNumPrevLoadedFiles; --i )
144 struct IDirectDrawSurface **v9; // eax@8 122 {
145 struct IDirectDrawSurface *v10; // eax@9 123 this->pTextures[i].Release();
146 int v11; // eax@12 124 if ( this->pHardwareTextures )
147
148 v1 = this;
149 pTexturePacksCount = &this->uTexturePacksCount;
150 v3 = this->uTexturePacksCount;
151 if ( v3 )
152 {
153 v4 = v3 - 1;
154 *pTexturePacksCount = v4;
155 if ( !v4 )
156 {
157 v5 = v1->uNumLoadedFiles - 1;
158 if ( v5 >= v1->uNumPrevLoadedFiles )
159 {
160 v6 = &v1->pTextures[v5];
161 do
162 {
163 v6->Release();
164 v7 = v1->pHardwareTextures;
165 if ( v7 )
166 { 125 {
167 v8 = v7[v5]; 126 if ( this->pHardwareTextures[i] )
168 if ( v8 )
169 { 127 {
170 v8->Release(); 128 this->pHardwareTextures[i]->Release();
171 v1->pHardwareTextures[v5] = 0; 129 this->pHardwareTextures[i] = 0;
172 } 130 }
173 } 131 }
174 v9 = v1->pHardwareSurfaces; 132 if ( this->pHardwareSurfaces )
175 if ( v9 )
176 { 133 {
177 v10 = v9[v5]; 134 if ( this->pHardwareSurfaces[i] )
178 if ( v10 )
179 { 135 {
180 v10->Release(); 136 this->pHardwareSurfaces[i]->Release();
181 v1->pHardwareSurfaces[v5] = 0; 137 this->pHardwareSurfaces[i] = 0;
182 } 138 }
183 } 139 }
184 --v5; 140 }
185 --v6; 141 }
186 } 142 this->uNumLoadedFiles = this->uNumPrevLoadedFiles;
187 while ( v5 >= v1->uNumPrevLoadedFiles ); 143 this->uNumPrevLoadedFiles = 0;
188 }
189 v11 = v1->uNumPrevLoadedFiles;
190 v1->uNumPrevLoadedFiles = 0;
191 v1->uNumLoadedFiles = v11;
192 } 144 }
193 } 145 }
194 } 146 }
195 147
196 //----- (004AC67E) -------------------------------------------------------- 148 //----- (004AC67E) --------------------------------------------------------