comparison mm7_6.cpp @ 1459:2ca62c9e7b3c

Function names
author Nomad
date Wed, 21 Aug 2013 16:06:50 +0200
parents 934074e7fcc1
children c3da3c2985b8
comparison
equal deleted inserted replaced
1458:934074e7fcc1 1459:2ca62c9e7b3c
42 #include "mm7_data.h" 42 #include "mm7_data.h"
43 43
44 44
45 45
46 //----- (00424EE0) -------------------------------------------------------- 46 //----- (00424EE0) --------------------------------------------------------
47 signed int __fastcall sr_424EE0_MakeFanFromTriangle(unsigned int uVertexID) 47 int __fastcall sr_424EE0_MakeFanFromTriangle(unsigned int uVertexID)
48 { 48 {
49 unsigned int v1; // edx@1 49 unsigned int v1; // edx@1
50 double v2; // st7@1 50 double v2; // st7@1
51 signed int v3; // edi@1 51 signed int v3; // edi@1
52 char *v4; // esi@4 52 char *v4; // esi@4
207 if ( v22 < 3 ) 207 if ( v22 < 3 )
208 return 0; 208 return 0;
209 return result; 209 return result;
210 } 210 }
211 211
212 //----- (0042620A) --------------------------------------------------------
213 bool sr_42620A(RenderVertexSoft *p)
214 {
215 __int16 v1; // fps@1
216 unsigned __int8 v2; // c0@2
217 char v3; // c2@2
218 unsigned __int8 v4; // c3@2
219 bool result; // eax@2
220 unsigned __int8 v6; // c0@4
221 char v7; // c2@4
222 unsigned __int8 v8; // c3@4
223 unsigned __int8 v9; // c0@6
224 char v10; // c2@6
225 unsigned __int8 v11; // c3@6
226 double v12; // st6@7
227 float v13; // ST04_4@7
228 float v14; // ST00_4@7
229 double v15; // st7@7
230 double v16; // st6@8
231 float v17; // ST04_4@8
232 float v18; // ST00_4@8
233 double v19; // st7@8
234
235 //UNDEF(v1);
236 if ( p->vWorldViewPosition.x < 300.0
237 || (v2 = 300.0 < p[1].vWorldViewPosition.x,
238 v3 = 0,
239 v4 = 300.0 == p[1].vWorldViewPosition.x,
240 //BYTE1(result) = HIBYTE(v1),
241 !(v2 | v4)) )
242 {
243 if ( p->vWorldViewPosition.x < 300.0 )
244 {
245 v6 = 300.0 < p[1].vWorldViewPosition.x;
246 v7 = 0;
247 v8 = 300.0 == p[1].vWorldViewPosition.x;
248 //BYTE1(result) = HIBYTE(v1);
249 if ( !(v6 | v8) )
250 {
251 //LOBYTE(result) = 0;
252 return false;
253 }
254 }
255 v9 = 300.0 < p->vWorldViewPosition.x;
256 v10 = 0;
257 v11 = 300.0 == p->vWorldViewPosition.x;
258 //BYTE1(result) = HIBYTE(v1);
259 if ( v9 | v11 )
260 {
261 v16 = 1.0 / (p->vWorldViewPosition.x - p[1].vWorldViewPosition.x);
262 v17 = (p->vWorldViewPosition.y - p[1].vWorldViewPosition.y) * v16;
263 v18 = (p->vWorldViewPosition.z - p[1].vWorldViewPosition.z) * v16;
264 v19 = 300.0 - p[1].vWorldViewPosition.x;
265 p[1].vWorldViewPosition.x = v19 + p[1].vWorldViewPosition.x;
266 p[1].vWorldViewPosition.y = v17 * v19 + p[1].vWorldViewPosition.y;
267 p[1].vWorldViewPosition.z = v19 * v18 + p[1].vWorldViewPosition.z;
268 }
269 else
270 {
271 v12 = 1.0 / (p[1].vWorldViewPosition.x - p->vWorldViewPosition.x);
272 v13 = (p[1].vWorldViewPosition.y - p->vWorldViewPosition.y) * v12;
273 v14 = (p[1].vWorldViewPosition.z - p->vWorldViewPosition.z) * v12;
274 v15 = 300.0 - p->vWorldViewPosition.x;
275 p->vWorldViewPosition.x = v15 + p->vWorldViewPosition.x;
276 p->vWorldViewPosition.y = v13 * v15 + p->vWorldViewPosition.y;
277 p->vWorldViewPosition.z = v15 * v14 + p->vWorldViewPosition.z;
278 }
279 }
280 //LOBYTE(result) = 1;
281 return true;
282 }
283
284 //----- (004268E3) -------------------------------------------------------- 212 //----- (004268E3) --------------------------------------------------------
285 int __fastcall _4268E3_smthn_to_a1r5g5b5(unsigned int uColor) 213 int __fastcall _4268E3_smthn_to_a1r5g5b5(unsigned int uColor)
286 { 214 {
287 unsigned int v1; // eax@1 215 unsigned int v1; // eax@1
288 unsigned int v2; // edx@1 216 unsigned int v2; // edx@1
311 v2 = a1 >> 5; 239 v2 = a1 >> 5;
312 LOWORD(v1) = (a1 >> 8) & 0xF800; 240 LOWORD(v1) = (a1 >> 8) & 0xF800;
313 LOWORD(v2) = (a1 >> 5) & 0x7E0; 241 LOWORD(v2) = (a1 >> 5) & 0x7E0;
314 return ((unsigned __int8)a1 >> 3) | v2 | v1; 242 return ((unsigned __int8)a1 >> 3) | v2 | v1;
315 } 243 }
316 //----- (00426947) --------------------------------------------------------
317 void sub_426947()
318 {
319 stru_50C198.field_0 = 0;
320 dword_50C994 = 0;
321 dword_50C998_turnbased_icon_1A = 0;
322 }
323 // 50C968: using guessed type int dword_50C968;
324 // 50C994: using guessed type int dword_50C994;
325 // 50C998: using guessed type int dword_50C998_turnbased_icon_1A;
326 244
327 //----- (00426A5A) -------------------------------------------------------- 245 //----- (00426A5A) --------------------------------------------------------
328 void stru319::LootActor(Actor *pActor) 246 void stru319::LootActor(Actor *pActor)
329 { 247 {
330 signed int v2; // edi@1 248 signed int v2; // edi@1
1135 pMessages[uNumMessages].param = param; 1053 pMessages[uNumMessages].param = param;
1136 pMessages[uNumMessages++].field_8 = a4; 1054 pMessages[uNumMessages++].field_8 = a4;
1137 } 1055 }
1138 } 1056 }
1139 1057
1140 //----- (0042EBBE) --------------------------------------------------------
1141 int __fastcall sub_42EBBE(int a1, int a2)
1142 {
1143 return (unsigned __int64)(a2 * (signed __int64)a1) >> 16;
1144 }
1145 // 42EBBE: using guessed type int __fastcall sub_42EBBE(int, int);
1146 1058
1147 //----- (0042EBDB) -------------------------------------------------------- 1059 //----- (0042EBDB) --------------------------------------------------------
1148 int stru193_math::Sin(int angle) 1060 int stru193_math::Sin(int angle)
1149 { 1061 {
1150 return Cos(angle - this->uIntegerHalfPi); 1062 return Cos(angle - this->uIntegerHalfPi);