comparison stru6.cpp @ 619:574cc56e05e9

ParticleEngine crash in temple
author Nomad
date Fri, 08 Mar 2013 17:08:08 +0200
parents f51373466911
children e0a1fccc89b1
comparison
equal deleted inserted replaced
618:5cfb5dadf330 619:574cc56e05e9
153 int v6; // eax@1 153 int v6; // eax@1
154 stru6_stru2 *v7; // eax@2 154 stru6_stru2 *v7; // eax@2
155 double v8; // st7@2 155 double v8; // st7@2
156 double v9; // st6@2 156 double v9; // st6@2
157 double v10; // st7@3 157 double v10; // st7@3
158 Particle_ local_0; // [sp+8h] [bp-68h]@1 158 Particle_sw local_0; // [sp+8h] [bp-68h]@1
159 float x; // [sp+78h] [bp+8h]@2 159 float x; // [sp+78h] [bp+8h]@2
160 160
161 v4 = this; 161 v4 = this;
162 memset(&local_0, 0, 0x68u); 162 memset(&local_0, 0, 0x68u);
163 v5 = a2; 163 v5 = a2;
166 { 166 {
167 v7 = &v4->array_4[v6 & 0x1F]; 167 v7 = &v4->array_4[v6 & 0x1F];
168 x = ((double)a2->vPosition.x - v7->flt_0_x) * 0.5 + v7->flt_0_x; 168 x = ((double)a2->vPosition.x - v7->flt_0_x) * 0.5 + v7->flt_0_x;
169 v8 = ((double)v5->vPosition.y - v7->flt_4_y) * 0.5 + v7->flt_4_y; 169 v8 = ((double)v5->vPosition.y - v7->flt_4_y) * 0.5 + v7->flt_4_y;
170 v9 = ((double)v5->vPosition.z - v7->flt_8_z) * 0.5 + v7->flt_8_z; 170 v9 = ((double)v5->vPosition.z - v7->flt_8_z) * 0.5 + v7->flt_8_z;
171 local_0.bFree = 1036; 171 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_8;
172 local_0.uDiffuse = uDiffuse; 172 local_0.uDiffuse = uDiffuse;
173 local_0.x = x + 4.0; 173 local_0.x = x + 4.0;
174 local_0.y = v8; 174 local_0.y = v8;
175 local_0.z = v9; 175 local_0.z = v9;
176 local_0.flt_10 = 0.0; 176 local_0.flt_10 = 0.0;
197 a2->field_54 = v4->field_0++; 197 a2->field_54 = v4->field_0++;
198 v4->array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x; 198 v4->array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x;
199 v4->array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y; 199 v4->array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y;
200 v4->array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z; 200 v4->array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z;
201 v10 = (double)a2->vPosition.x; 201 v10 = (double)a2->vPosition.x;
202 local_0.bFree = 1036; 202 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_8;
203 local_0.uDiffuse = uDiffuse; 203 local_0.uDiffuse = uDiffuse;
204 local_0.x = v10 + 4.0; 204 local_0.x = v10 + 4.0;
205 local_0.y = (double)a2->vPosition.y; 205 local_0.y = (double)a2->vPosition.y;
206 local_0.z = (double)a2->vPosition.z; 206 local_0.z = (double)a2->vPosition.z;
207 local_0.flt_10 = 0.0; 207 local_0.flt_10 = 0.0;
219 //----- (004A75CC) -------------------------------------------------------- 219 //----- (004A75CC) --------------------------------------------------------
220 void stru6::_4A75CC_single_spell_collision_particle(SpriteObject *a1, unsigned int uDiffuse, unsigned int uTextureID) 220 void stru6::_4A75CC_single_spell_collision_particle(SpriteObject *a1, unsigned int uDiffuse, unsigned int uTextureID)
221 { 221 {
222 double v4; // st7@1 222 double v4; // st7@1
223 signed int v5; // edi@1 223 signed int v5; // edi@1
224 Particle_ local_0; // [sp+8h] [bp-68h]@1 224 Particle_sw local_0; // [sp+8h] [bp-68h]@1
225 225
226 memset(&local_0, 0, 0x68u); 226 memset(&local_0, 0, 0x68u);
227 local_0.bFree = 1029; 227 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
228 local_0.x = (double)a1->vPosition.x; 228 local_0.x = (double)a1->vPosition.x;
229 local_0.y = (double)a1->vPosition.y; 229 local_0.y = (double)a1->vPosition.y;
230 v4 = (double)a1->vPosition.z; 230 v4 = (double)a1->vPosition.z;
231 local_0.uDiffuse = uDiffuse; 231 local_0.uDiffuse = uDiffuse;
232 local_0.z = v4; 232 local_0.z = v4;
255 int v6; // eax@6 255 int v6; // eax@6
256 float v7; // ST0C_4@6 256 float v7; // ST0C_4@6
257 float v8; // ST08_4@6 257 float v8; // ST08_4@6
258 float v9; // ST04_4@6 258 float v9; // ST04_4@6
259 float v10; // ST00_4@6 259 float v10; // ST00_4@6
260 Particle_ local_0; // [sp+1Ch] [bp-7Ch]@1 260 Particle_sw local_0; // [sp+1Ch] [bp-7Ch]@1
261 stru6 *v12; // [sp+84h] [bp-14h]@1 261 stru6 *v12; // [sp+84h] [bp-14h]@1
262 float v13; // [sp+88h] [bp-10h]@1 262 float v13; // [sp+88h] [bp-10h]@1
263 double v14; // [sp+8Ch] [bp-Ch]@5 263 double v14; // [sp+8Ch] [bp-Ch]@5
264 float v15; // [sp+94h] [bp-4h]@4 264 float v15; // [sp+94h] [bp-4h]@4
265 signed int i; // [sp+A0h] [bp+8h]@4 265 signed int i; // [sp+A0h] [bp+8h]@4
274 v4 = (1.0 - v3) * 4.0; 274 v4 = (1.0 - v3) * 4.0;
275 else 275 else
276 v4 = v3 * 1.333333333333333; 276 v4 = v3 * 1.333333333333333;
277 v15 = v4; 277 v15 = v4;
278 v5 = (double)a2->vPosition.x; 278 v5 = (double)a2->vPosition.x;
279 local_0.bFree = 1029; 279 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
280 local_0.uDiffuse = 0xFF3C1Eu; 280 local_0.uDiffuse = 0xFF3C1E;
281 local_0.x = v5; 281 local_0.x = v5;
282 local_0.y = (double)a2->vPosition.y; 282 local_0.y = (double)a2->vPosition.y;
283 local_0.z = (double)a2->vPosition.z; 283 local_0.z = (double)a2->vPosition.z;
284 local_0.timeToLive = (rand() & 0x7F) + 128; 284 local_0.timeToLive = (rand() & 0x7F) + 128;
285 local_0.uTextureID = pBitmaps_LOD->LoadTexture("effpar01", TEXTURE_DEFAULT); 285 local_0.uTextureID = pBitmaps_LOD->LoadTexture("effpar01", TEXTURE_DEFAULT);
346 void stru6::_4A78AE_sparks_spell(SpriteObject *a1) 346 void stru6::_4A78AE_sparks_spell(SpriteObject *a1)
347 { 347 {
348 ObjectDesc *v2; // esi@1 348 ObjectDesc *v2; // esi@1
349 unsigned int v3; // eax@1 349 unsigned int v3; // eax@1
350 double v4; // st7@1 350 double v4; // st7@1
351 Particle_ local_0; // [sp+8h] [bp-68h]@1 351 Particle_sw local_0; // [sp+8h] [bp-68h]@1
352 352
353 v2 = &pObjectList->pObjects[a1->uObjectDescID]; 353 v2 = &pObjectList->pObjects[a1->uObjectDescID];
354 memset(&local_0, 0, 0x68u); 354 memset(&local_0, 0, 0x68u);
355 v3 = a1->uSpriteFrameID; 355 v3 = a1->uSpriteFrameID;
356 local_0.x = (double)a1->vPosition.x; 356 local_0.x = (double)a1->vPosition.x;
357 v4 = (double)a1->vPosition.y; 357 v4 = (double)a1->vPosition.y;
358 local_0.bFree = 2048; 358 local_0.type = ParticleType_Sprite;
359 local_0.uDiffuse = 0x7F7F7Fu; 359 local_0.uDiffuse = 0x7F7F7F;
360 local_0.timeToLive = 1; 360 local_0.timeToLive = 1;
361 local_0.y = v4; 361 local_0.y = v4;
362 local_0.z = (double)a1->vPosition.z; 362 local_0.z = (double)a1->vPosition.z;
363 local_0.flt_10 = 0.0; 363 local_0.flt_10 = 0.0;
364 local_0.flt_14 = 0.0; 364 local_0.flt_14 = 0.0;
374 ObjectDesc *v2; // esi@1 374 ObjectDesc *v2; // esi@1
375 unsigned int v3; // eax@1 375 unsigned int v3; // eax@1
376 double v4; // st7@1 376 double v4; // st7@1
377 char v5; // al@1 377 char v5; // al@1
378 signed int v6; // edi@1 378 signed int v6; // edi@1
379 Particle_ Dst; // [sp+8h] [bp-68h]@1 379 Particle_sw Dst; // [sp+8h] [bp-68h]@1
380 380
381 v2 = &pObjectList->pObjects[a1->uObjectDescID]; 381 v2 = &pObjectList->pObjects[a1->uObjectDescID];
382 memset(&Dst, 0, 0x68u); 382 memset(&Dst, 0, 0x68u);
383 v3 = a1->uSpriteFrameID; 383 v3 = a1->uSpriteFrameID;
384 Dst.x = (double)a1->vPosition.x; 384 Dst.x = (double)a1->vPosition.x;
385 v4 = (double)a1->vPosition.y; 385 v4 = (double)a1->vPosition.y;
386 Dst.bFree = 2053; 386 Dst.type = ParticleType_Sprite | ParticleType_Rotating | ParticleType_1;
387 Dst.uDiffuse = 0x7F7F7Fu; 387 Dst.uDiffuse = 0x7F7F7F;
388 Dst.y = v4; 388 Dst.y = v4;
389 Dst.z = (double)a1->vPosition.z; 389 Dst.z = (double)a1->vPosition.z;
390 Dst.uTextureID = pSpriteFrameTable->GetFrame(v2->uSpriteID, v3)->pHwSpriteIDs[0]; 390 Dst.uTextureID = pSpriteFrameTable->GetFrame(v2->uSpriteID, v3)->pHwSpriteIDs[0];
391 v5 = rand(); 391 v5 = rand();
392 v6 = 10; 392 v6 = 10;
426 char v6; // al@1 426 char v6; // al@1
427 double v7; // st6@1 427 double v7; // st6@1
428 double v8; // st6@1 428 double v8; // st6@1
429 double v9; // st7@1 429 double v9; // st7@1
430 double v10; // st6@1 430 double v10; // st6@1
431 Particle_ local_0; // [sp+0h] [bp-6Ch]@1 431 Particle_sw local_0; // [sp+0h] [bp-6Ch]@1
432 float v12; // [sp+68h] [bp-4h]@1 432 float v12; // [sp+68h] [bp-4h]@1
433 float a1a; // [sp+74h] [bp+8h]@1 433 float a1a; // [sp+74h] [bp+8h]@1
434 float uDiffusea; // [sp+78h] [bp+Ch]@1 434 float uDiffusea; // [sp+78h] [bp+Ch]@1
435 float uTextureIDa; // [sp+7Ch] [bp+10h]@1 435 float uTextureIDa; // [sp+7Ch] [bp+10h]@1
436 436
437 memset(&local_0, 0, 0x68u); 437 memset(&local_0, 0, 0x68u);
438 local_0.bFree = 1029; 438 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
439 local_0.x = (double)a1->vPosition.x; 439 local_0.x = (double)a1->vPosition.x;
440 v5 = a1->vPosition.z; 440 v5 = a1->vPosition.z;
441 local_0.y = (double)a1->vPosition.y; 441 local_0.y = (double)a1->vPosition.y;
442 local_0.uDiffuse = uDiffuse; 442 local_0.uDiffuse = uDiffuse;
443 local_0.z = (double)(v5 + 32); 443 local_0.z = (double)(v5 + 32);
499 double v8; // st5@2 499 double v8; // st5@2
500 double v9; // st4@2 500 double v9; // st4@2
501 char v10; // al@2 501 char v10; // al@2
502 double v11; // st7@2 502 double v11; // st7@2
503 double v12; // st7@3 503 double v12; // st7@3
504 Particle_ local_0; // [sp+Ch] [bp-68h]@1 504 Particle_sw local_0; // [sp+Ch] [bp-68h]@1
505 float a2a; // [sp+7Ch] [bp+8h]@2 505 float a2a; // [sp+7Ch] [bp+8h]@2
506 506
507 v2 = this; 507 v2 = this;
508 memset(&local_0, 0, 0x68u); 508 memset(&local_0, 0, 0x68u);
509 v3 = a2; 509 v3 = a2;
513 { 513 {
514 v6 = &v2->array_4[v4 & 0x1F]; 514 v6 = &v2->array_4[v4 & 0x1F];
515 v7 = ((double)a2->vPosition.x - v6->flt_0_x) * 0.5 + v6->flt_0_x; 515 v7 = ((double)a2->vPosition.x - v6->flt_0_x) * 0.5 + v6->flt_0_x;
516 v8 = ((double)a2->vPosition.y - v6->flt_4_y) * 0.5 + v6->flt_4_y; 516 v8 = ((double)a2->vPosition.y - v6->flt_4_y) * 0.5 + v6->flt_4_y;
517 v9 = ((double)a2->vPosition.z - v6->flt_8_z) * 0.5 + v6->flt_8_z; 517 v9 = ((double)a2->vPosition.z - v6->flt_8_z) * 0.5 + v6->flt_8_z;
518 local_0.bFree = 2048; 518 local_0.type = ParticleType_Sprite;
519 local_0.uDiffuse = 0xFFFFFFu; 519 local_0.uDiffuse = 0xFFFFFF;
520 a2a = v9; 520 a2a = v9;
521 local_0.x = v7; 521 local_0.x = v7;
522 local_0.z = a2a; 522 local_0.z = a2a;
523 local_0.y = v8; 523 local_0.y = v8;
524 local_0.flt_10 = 0.0; 524 local_0.flt_10 = 0.0;
545 a2->field_54 = v2->field_0++; 545 a2->field_54 = v2->field_0++;
546 v2->array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x; 546 v2->array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x;
547 v2->array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y; 547 v2->array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y;
548 v2->array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z; 548 v2->array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z;
549 v12 = (double)a2->vPosition.x; 549 v12 = (double)a2->vPosition.x;
550 local_0.bFree = 2048; 550 local_0.type = ParticleType_Sprite;
551 local_0.uDiffuse = 0xFFFFFFu; 551 local_0.uDiffuse = 0xFFFFFF;
552 LODWORD(local_0.flt_28) = 0x40000000u; 552 LODWORD(local_0.flt_28) = 0x40000000u;
553 local_0.x = v12; 553 local_0.x = v12;
554 local_0.y = (double)a2->vPosition.y; 554 local_0.y = (double)a2->vPosition.y;
555 local_0.z = (double)a2->vPosition.z; 555 local_0.z = (double)a2->vPosition.z;
556 local_0.flt_10 = 0.0; 556 local_0.flt_10 = 0.0;
598 void stru6::_4A7E89_sparkles_on_actor_after_it_casts_buff(Actor *pActor, unsigned int uDiffuse) 598 void stru6::_4A7E89_sparkles_on_actor_after_it_casts_buff(Actor *pActor, unsigned int uDiffuse)
599 { 599 {
600 Actor *v3; // edi@1 600 Actor *v3; // edi@1
601 int v4; // ebx@3 601 int v4; // ebx@3
602 //int result; // eax@5 602 //int result; // eax@5
603 Particle_ Dst; // [sp+Ch] [bp-6Ch]@1 603 Particle_sw Dst; // [sp+Ch] [bp-6Ch]@1
604 int v7; // [sp+74h] [bp-4h]@2 604 int v7; // [sp+74h] [bp-4h]@2
605 signed int pActora; // [sp+80h] [bp+8h]@1 605 signed int pActora; // [sp+80h] [bp+8h]@1
606 606
607 memset(&Dst, 0, 0x68u); 607 memset(&Dst, 0, 0x68u);
608 Dst.bFree = 1036; 608 Dst.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_8;
609 Dst.timeToLive = (rand() & 0x7F) + 128; 609 Dst.timeToLive = (rand() & 0x7F) + 128;
610 v3 = pActor; 610 v3 = pActor;
611 Dst.uTextureID = pBitmaps_LOD->LoadTexture("effpar02", TEXTURE_DEFAULT); 611 Dst.uTextureID = pBitmaps_LOD->LoadTexture("effpar02", TEXTURE_DEFAULT);
612 pActora = 50; 612 pActora = 50;
613 Dst.flt_28 = 1.0; 613 Dst.flt_28 = 1.0;
641 char v5; // al@1 641 char v5; // al@1
642 signed int v6; // edi@1 642 signed int v6; // edi@1
643 unsigned int v7; // eax@1 643 unsigned int v7; // eax@1
644 double v8; // st7@2 644 double v8; // st7@2
645 double v9; // st7@2 645 double v9; // st7@2
646 Particle_ local_0; // [sp+8h] [bp-78h]@1 646 Particle_sw local_0; // [sp+8h] [bp-78h]@1
647 double v11; // [sp+70h] [bp-10h]@1 647 double v11; // [sp+70h] [bp-10h]@1
648 double v12; // [sp+78h] [bp-8h]@1 648 double v12; // [sp+78h] [bp-8h]@1
649 float z1; // [sp+88h] [bp+8h]@2 649 float z1; // [sp+88h] [bp+8h]@2
650 650
651 v4 = this; 651 v4 = this;
652 memset(&local_0, 0, 0x68u); 652 memset(&local_0, 0, 0x68u);
653 local_0.bFree = 1029; 653 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
654 local_0.uDiffuse = 0x7E7E7Eu; 654 local_0.uDiffuse = 0x7E7E7E;
655 v5 = rand(); 655 v5 = rand();
656 local_0.flt_28 = 1.0; 656 local_0.flt_28 = 1.0;
657 v6 = 8; 657 v6 = 8;
658 local_0.timeToLive = (v5 & 0x7F) + 128; 658 local_0.timeToLive = (v5 & 0x7F) + 128;
659 v7 = v4->uTextureID_effpar1; 659 v7 = v4->uTextureID_effpar1;
712 //----- (004A80DC) -------------------------------------------------------- 712 //----- (004A80DC) --------------------------------------------------------
713 void stru6::_4A80DC_some_stuff_sw(SpriteObject *a2) 713 void stru6::_4A80DC_some_stuff_sw(SpriteObject *a2)
714 { 714 {
715 stru6 *v2; // esi@1 715 stru6 *v2; // esi@1
716 signed int v3; // ebx@1 716 signed int v3; // ebx@1
717 Particle_ local_0; // [sp+Ch] [bp-68h]@1 717 Particle_sw local_0; // [sp+Ch] [bp-68h]@1
718 718
719 v2 = this; 719 v2 = this;
720 memset(&local_0, 0, 0x68u); 720 memset(&local_0, 0, 0x68u);
721 local_0.bFree = 1029; 721 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
722 local_0.uDiffuse = 0x7E7E7Eu; 722 local_0.uDiffuse = 0x7E7E7E;
723 local_0.timeToLive = (rand() & 0x7F) + 128; 723 local_0.timeToLive = (rand() & 0x7F) + 128;
724 local_0.uTextureID = v2->uTextureID_effpar1; 724 local_0.uTextureID = v2->uTextureID_effpar1;
725 v3 = 8; 725 v3 = 8;
726 local_0.flt_28 = 1.0; 726 local_0.flt_28 = 1.0;
727 do 727 do