diff stru6.cpp @ 1390:613c77e51e38

Messed with spell effects drawing a bit.
author Nomad
date Thu, 18 Jul 2013 04:08:20 +0200
parents 0aeac0b9ca30
children 5930342f092b
line wrap: on
line diff
--- a/stru6.cpp	Wed Jul 17 00:40:15 2013 +0200
+++ b/stru6.cpp	Thu Jul 18 04:08:20 2013 +0200
@@ -61,40 +61,28 @@
 }
 
 //----- (0047829F) --------------------------------------------------------
-void stru6_stru1_indoor_sw_billboard::_47829F_fireball_collision(float arg0, float a3, float a4, float a5, int a2)
+void stru6_stru1_indoor_sw_billboard::_47829F_sphere_particle(float x_offset, float y_offset, float z_offset, float scale, int diffuse)
 {
-  stru6_stru1_indoor_sw_billboard *v6; // esi@1
-  int v7; // edi@1
-  char *v8; // eax@2
-  signed int v9; // ecx@2
-  int v10; // edx@3
-  signed int i; // [sp+8h] [bp-4h]@1
+  int v7 = 0;
 
-  auto a1 = this;
-
-  v6 = a1;
-  v7 = 0;
-  for ( i = 0; i < (signed int)v6->uNumVec3sInArray2; ++i )
+  for (unsigned int i = 0; i < uNumVec3sInArray2; ++i)
   {
-    v8 = (char *)&v6->field_14[1];
-    v9 = 3;
-    do
+    for (unsigned int j = 0; j < 3; ++j)
     {
-      *((float *)v8 - 1) = a5 * *(&v6->pArray1->field_0 + 4 * *(int *)((char *)&v6->pArray2->field_0 + v7)) + arg0;
-      *(float *)v8 = a5 * *(&v6->pArray1->field_4 + 4 * *(int *)((char *)&v6->pArray2->field_0 + v7)) + a3;
-      v8 += 16;
-      *((float *)v8 - 3) = a5 * *(&v6->pArray1->field_8 + 4 * *(int *)((char *)&v6->pArray2->field_0 + v7)) + a4;
-      v10 = *(int *)((char *)&v6->pArray2->field_0 + v7);
+      field_14[j].x = x_offset + scale * *(&pArray1->field_0 + 4 * *(int *)((char *)&pArray2->field_0 + v7));
+      field_14[j].y = y_offset + scale * *(&pArray1->field_4 + 4 * *(int *)((char *)&pArray2->field_0 + v7));
+      field_14[j].z = z_offset + scale * *(&pArray1->field_8 + 4 * *(int *)((char *)&pArray2->field_0 + v7));
+      int v10 = *(int *)((char *)&pArray2->field_0 + v7);
+
+      field_14[j].diffuse = *((int *)&pArray1[1].field_0 + 4 * v10);
       v7 += 4;
-      --v9;
-      *((int *)v8 - 2) = *((int *)&v6->pArray1[1].field_0 + 4 * v10);
     }
-    while ( v9 );
-    v6->field_10 = 3;
-    if ( v6->sub_477C61() && v6->sub_477F63() )
+
+    uNumVertices = 3;
+    if ( sub_477C61() && sub_477F63() )
     {
-      if ( v6->sub_47802A() )
-        pRenderer->_4A4CC9(v6, a2);
+      if ( sub_47802A() )
+        pRenderer->_4A4CC9_AddSomeBillboard(this, diffuse);
     }
   }
 }
@@ -192,9 +180,9 @@
     local_0.x = x + 4.0;
     local_0.y = v8;
     local_0.z = v9;
-    local_0.flt_10 = 0.0;
-    local_0.flt_14 = 0.0;
-    local_0.flt_18 = 0.0;
+    local_0.r = 0.0;
+    local_0.g = 0.0;
+    local_0.b = 0.0;
     local_0.timeToLive = (rand() & 0x40) + 96;
     local_0.uTextureID = uTextureID;
     local_0.flt_28 = 1.0;
@@ -223,9 +211,9 @@
     local_0.x = v10 + 4.0;
     local_0.y = (double)a2->vPosition.y;
     local_0.z = (double)a2->vPosition.z;
-    local_0.flt_10 = 0.0;
-    local_0.flt_14 = 0.0;
-    local_0.flt_18 = 0.0;
+    local_0.r = 0.0;
+    local_0.g = 0.0;
+    local_0.b = 0.0;
     local_0.flt_28 = 1.0;
     local_0.timeToLive = (rand() & 0x7F) + 128;
     local_0.uTextureID = uTextureID;
@@ -255,9 +243,9 @@
   local_0.flt_28 = 1.0;
   do
   {
-    local_0.flt_10 = (double)(rand() & 0x1FF) - 255.0;
-    local_0.flt_14 = (double)(rand() & 0x1FF) - 255.0;
-    local_0.flt_18 = (double)(rand() & 0x1FF) - 255.0;
+    local_0.r = (double)(rand() & 0x1FF) - 255.0;
+    local_0.g = (double)(rand() & 0x1FF) - 255.0;
+    local_0.b = (double)(rand() & 0x1FF) - 255.0;
     pGame->pParticleEngine->AddParticle(&local_0);
     --v5;
   }
@@ -267,98 +255,76 @@
 //----- (004A7688) --------------------------------------------------------
 void stru6::_4A7688_fireball_collision_particle(SpriteObject *a2)
 {
-  SpriteObject *v2; // esi@1
   double v3; // st7@1
   double v4; // st7@2
-  double v5; // st7@4
   int v6; // eax@6
   float v7; // ST0C_4@6
   float v8; // ST08_4@6
   float v9; // ST04_4@6
   float v10; // ST00_4@6
   Particle_sw local_0; // [sp+1Ch] [bp-7Ch]@1
-  stru6 *v12; // [sp+84h] [bp-14h]@1
   float v13; // [sp+88h] [bp-10h]@1
-  double v14; // [sp+8Ch] [bp-Ch]@5
-  float v15; // [sp+94h] [bp-4h]@4
-  signed int i; // [sp+A0h] [bp+8h]@4
-  signed int a2b; // [sp+A0h] [bp+8h]@6
 
-  v12 = this;
   memset(&local_0, 0, 0x68u);
-  v2 = a2;
+
   v3 = (double)a2->uSpriteFrameID / (double)pObjectList->pObjects[a2->uObjectDescID].uLifetime;
   v13 = 512.0 * v3;
   if ( v3 >= 0.75 )
     v4 = (1.0 - v3) * 4.0;
   else
     v4 = v3 * 1.333333333333333;
-  v15 = v4;
-  v5 = (double)a2->vPosition.x;
+
   local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
   local_0.uDiffuse = 0xFF3C1E;
-  local_0.x = v5;
+  local_0.x = (double)a2->vPosition.x;
   local_0.y = (double)a2->vPosition.y;
   local_0.z = (double)a2->vPosition.z;
   local_0.timeToLive = (rand() & 0x7F) + 128;
   local_0.uTextureID = pBitmaps_LOD->LoadTexture("effpar01", TEXTURE_DEFAULT);
-  i = 10;
   local_0.flt_28 = 1.0;
-  do
+
+  // 10 fireball sparks 
+  for (unsigned int i = 0; i < 10; ++i)
   {
-    HIDWORD(v14) = rand() & 0x1FF;
-    local_0.flt_10 = (double)SHIDWORD(v14) - 255.0;
-    HIDWORD(v14) = rand() & 0x1FF;
-    local_0.flt_14 = (double)SHIDWORD(v14) - 255.0;
-    WORD2(v14) = rand() & 0x1FF;
-    HIDWORD(v14) = WORD2(v14);
-    local_0.flt_18 = (double)WORD2(v14) - 255.0;
+    local_0.r = (rand() & 0x1FF) - 255;
+    local_0.g = (rand() & 0x1FF) - 255;
+    local_0.b = (rand() & 0x1FF) - 255;
     pGame->pParticleEngine->AddParticle(&local_0);
-    --i;
   }
-  while ( i );
-  v14 = v13 + 6.7553994e15;
-  a2b = LODWORD(v14);
-  v6 = sub_4A7063(0xFF3C1Eu, v15);
-  v7 = (double)a2b;
-  v8 = (double)v2->vPosition.z;
-  v9 = (double)v2->vPosition.y;
-  v10 = (double)v2->vPosition.x;
-  v12->pStru1->_47829F_fireball_collision(v10, v9, v8, v7, v6);
+
+  v6 = ModulateColor(0xFF3C1E, v4);
+  v7 = (double)floorf(0.5f + v13);
+  v8 = (double)a2->vPosition.z;
+  v9 = (double)a2->vPosition.y;
+  v10 = (double)a2->vPosition.x;
+  pStru1->_47829F_sphere_particle(v10, v9, v8, v7, v6);
 }
 
 //----- (004A77FD) --------------------------------------------------------
-void stru6::_4A77FD_some_stuff_d3d(SpriteObject *a1)
+void stru6::_4A77FD_implosion_particle(SpriteObject *a1)
 {
-  SpriteObject *v2; // esi@1
-  stru6 *v3; // edi@1
   double v4; // st7@1
   double v5; // st7@2
-  double v6; // ST1C_8@4
   int v7; // eax@4
   float v8; // ST0C_4@4
   float v9; // ST08_4@4
   float v10; // ST04_4@4
   float v11; // ST00_4@4
   float v12; // [sp+28h] [bp-4h]@1
-  float a1a; // [sp+34h] [bp+8h]@4
 
-  v2 = a1;
-  v3 = this;
   v4 = (double)a1->uSpriteFrameID / (double)pObjectList->pObjects[a1->uObjectDescID].uLifetime;
   v12 = 512.0 - v4 * 512.0;
   if ( v4 >= 0.75 )
     v5 = v4 * 4.0;
   else
     v5 = v4 * 1.333333333333333;
-  a1a = v5;
-  v6 = v12 + 6.7553994e15;
-  v7 = sub_4A7063(0x7E7E7Eu, a1a);
-  v8 = (double)SLODWORD(v6);
-  v9 = (double)v2->vPosition.z;
-  v10 = (double)v2->vPosition.y;
-  v11 = (double)v2->vPosition.x;
-  v3->pStru1->_47829F_fireball_collision(v11, v10, v9, v8, v7);
+
+  v7 = ModulateColor(0x7E7E7E, v5);
+  v8 = (double)floorf(0.5f + v12);
+  v9 = (double)a1->vPosition.z;
+  v10 = (double)a1->vPosition.y;
+  v11 = (double)a1->vPosition.x;
+  pStru1->_47829F_sphere_particle(v11, v10, v9, v8, v7);
 }
 
 //----- (004A78AE) --------------------------------------------------------
@@ -379,9 +345,9 @@
   local_0.timeToLive = 1;
   local_0.y = v4;
   local_0.z = (double)a1->vPosition.z;
-  local_0.flt_10 = 0.0;
-  local_0.flt_14 = 0.0;
-  local_0.flt_18 = 0.0;
+  local_0.r = 0.0;
+  local_0.g = 0.0;
+  local_0.b = 0.0;
   local_0.uTextureID = pSpriteFrameTable->GetFrame(v2->uSpriteID, v3)->pHwSpriteIDs[0];
   LODWORD(local_0.flt_28) = 0x40000000u;
   pGame->pParticleEngine->AddParticle(&local_0);
@@ -413,9 +379,9 @@
   Dst.timeToLive = (v5 & 0x7F) + 128;
   do
   {
-    Dst.flt_10 = (double)(rand() & 0x1FF) - 255.0;
-    Dst.flt_14 = (double)(rand() & 0x1FF) - 255.0;
-    Dst.flt_18 = (double)(rand() & 0x1FF) - 255.0;
+    Dst.r = (double)(rand() & 0x1FF) - 255.0;
+    Dst.g = (double)(rand() & 0x1FF) - 255.0;
+    Dst.b = (double)(rand() & 0x1FF) - 255.0;
     pGame->pParticleEngine->AddParticle(&Dst);
     --v6;
   }
@@ -466,43 +432,43 @@
   local_0.timeToLive = (v6 & 0x7F) + 128;
   local_0.uTextureID = uTextureID;
   a1a = v7;
-  local_0.flt_10 = v7;
-  local_0.flt_14 = a4;
-  local_0.flt_18 = a4;
+  local_0.r = v7;
+  local_0.g = a4;
+  local_0.b = a4;
   pGame->pParticleEngine->AddParticle(&local_0);
   v8 = 0.70710677 * a4;
   uDiffusea = v8;
-  local_0.flt_10 = v8;
-  local_0.flt_14 = v8;
-  local_0.flt_18 = a4;
+  local_0.r = v8;
+  local_0.g = v8;
+  local_0.b = a4;
   pGame->pParticleEngine->AddParticle(&local_0);
-  local_0.flt_14 = a1a;
-  local_0.flt_10 = a4;
-  local_0.flt_18 = a4;
+  local_0.g = a1a;
+  local_0.r = a4;
+  local_0.b = a4;
   pGame->pParticleEngine->AddParticle(&local_0);
-  local_0.flt_10 = uDiffusea;
-  local_0.flt_18 = a4;
+  local_0.r = uDiffusea;
+  local_0.b = a4;
   v9 = -uDiffusea;
   uTextureIDa = v9;
-  local_0.flt_14 = v9;
+  local_0.g = v9;
   pGame->pParticleEngine->AddParticle(&local_0);
   v10 = -1.0 * a4;
-  local_0.flt_10 = a1a;
+  local_0.r = a1a;
   v12 = v10;
-  local_0.flt_14 = v10;
-  local_0.flt_18 = a4;
+  local_0.g = v10;
+  local_0.b = a4;
   pGame->pParticleEngine->AddParticle(&local_0);
-  local_0.flt_18 = a4;
-  local_0.flt_10 = uTextureIDa;
-  local_0.flt_14 = uTextureIDa;
+  local_0.b = a4;
+  local_0.r = uTextureIDa;
+  local_0.g = uTextureIDa;
   pGame->pParticleEngine->AddParticle(&local_0);
-  local_0.flt_10 = v12;
-  local_0.flt_14 = a1a;
-  local_0.flt_18 = a4;
+  local_0.r = v12;
+  local_0.g = a1a;
+  local_0.b = a4;
   pGame->pParticleEngine->AddParticle(&local_0);
-  local_0.flt_10 = uTextureIDa;
-  local_0.flt_14 = uDiffusea;
-  local_0.flt_18 = a4;
+  local_0.r = uTextureIDa;
+  local_0.g = uDiffusea;
+  local_0.b = a4;
   pGame->pParticleEngine->AddParticle(&local_0);
 }
 
@@ -540,9 +506,9 @@
     local_0.x = v7;
     local_0.z = a2a;
     local_0.y = v8;
-    local_0.flt_10 = 0.0;
-    local_0.flt_14 = 0.0;
-    local_0.flt_18 = 0.0;
+    local_0.r = 0.0;
+    local_0.g = 0.0;
+    local_0.b = 0.0;
     v10 = rand();
     LODWORD(local_0.flt_28) = 0x40400000u;
     local_0.timeToLive = (v10 & 0x3F) + 64;
@@ -572,9 +538,9 @@
     local_0.x = v12;
     local_0.y = (double)a2->vPosition.y;
     local_0.z = (double)a2->vPosition.z;
-    local_0.flt_10 = 0.0;
-    local_0.flt_14 = 0.0;
-    local_0.flt_18 = 0.0;
+    local_0.r = 0.0;
+    local_0.g = 0.0;
+    local_0.b = 0.0;
     local_0.timeToLive = (rand() & 0x3F) + 64;
     local_0.uTextureID = pSpriteFrameTable->GetFrame(v5->uSpriteID, a2->uSpriteFrameID)->pHwSpriteIDs[0];
     pGame->pParticleEngine->AddParticle(&local_0);
@@ -584,32 +550,22 @@
 //----- (004A7E05) --------------------------------------------------------
 void stru6::AddProjectile(SpriteObject *a2, int a3, unsigned int uTextureID)
 {
-  int v4; // edx@1
-  float v5; // ST14_4@2
-  float v6; // ST10_4@2
-  float v7; // ST0C_4@2
-
-  v4 = a2->field_54;
-  if ( v4 )
+  if (a2->field_54)
   {
-    v5 = (double)a2->vPosition.z;
-    v6 = (double)a2->vPosition.y;
-    v7 = (double)a2->vPosition.x;
-    DoAddProjectile(
-      this->array_4[v4 & 0x1F].flt_0_x,
-      this->array_4[v4 & 0x1F].flt_4_y,
-      this->array_4[v4 & 0x1F].flt_8_z,
-      v7,
-      v6,
-      v5,
-      uTextureID);
+    DoAddProjectile(array_4[a2->field_54 & 0x1F].flt_0_x,
+                    array_4[a2->field_54 & 0x1F].flt_4_y,
+                    array_4[a2->field_54 & 0x1F].flt_8_z,
+                    a2->vPosition.x,
+                    a2->vPosition.y,
+                    a2->vPosition.z,
+                    uTextureID);
   }
   else
   {
-    a2->field_54 = this->field_0++;
-    this->array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x;
-    this->array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y;
-    this->array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z;
+    a2->field_54 = field_0++;
+    array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x;
+    array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y;
+    array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z;
   }
 }
 
@@ -687,9 +643,9 @@
     z1 = (double)z;
     local_0.z = z1;
     local_0.y = v9 * 40.0 - 20.0 + v11;
-    local_0.flt_10 = pRnd->GetRandom() * 400.0 - 200.0;
-    local_0.flt_14 = pRnd->GetRandom() * 400.0 - 200.0;
-    local_0.flt_18 = pRnd->GetRandom() * 150.0 + 50.0;
+    local_0.r = pRnd->GetRandom() * 400.0 - 200.0;
+    local_0.g = pRnd->GetRandom() * 400.0 - 200.0;
+    local_0.b = pRnd->GetRandom() * 150.0 + 50.0;
     pGame->pParticleEngine->AddParticle(&local_0);
     --v6;
   }
@@ -731,16 +687,14 @@
 //----- (004A80DC) --------------------------------------------------------
 void stru6::_4A80DC_some_stuff_sw(SpriteObject *a2)
 {
-  stru6 *v2; // esi@1
   signed int v3; // ebx@1
   Particle_sw local_0; // [sp+Ch] [bp-68h]@1
 
-  v2 = this;
   memset(&local_0, 0, 0x68u);
   local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
   local_0.uDiffuse = 0x7E7E7E;
   local_0.timeToLive = (rand() & 0x7F) + 128;
-  local_0.uTextureID = v2->uTextureID_effpar1;
+  local_0.uTextureID = uTextureID_effpar1;
   v3 = 8;
   local_0.flt_28 = 1.0;
   do
@@ -748,9 +702,9 @@
     local_0.x = pRnd->GetRandom() * 40.0 + (double)a2->vPosition.x - 20.0;
     local_0.y = pRnd->GetRandom() * 40.0 + (double)a2->vPosition.y - 20.0;
     local_0.z = (double)a2->vPosition.z;
-    local_0.flt_10 = pRnd->GetRandom() * 800.0 - 400.0;
-    local_0.flt_14 = pRnd->GetRandom() * 800.0 - 400.0;
-    local_0.flt_18 = pRnd->GetRandom() * 350.0 + 50.0;
+    local_0.r = pRnd->GetRandom() * 800.0 - 400.0;
+    local_0.g = pRnd->GetRandom() * 800.0 - 400.0;
+    local_0.b = pRnd->GetRandom() * 350.0 + 50.0;
     pGame->pParticleEngine->AddParticle(&local_0);
     --v3;
   }
@@ -1048,7 +1002,7 @@
               if ( result <= 2081 )
               {
                 if ( pRenderer->pRenderD3D )
-                  _4A77FD_some_stuff_d3d(a2);
+                  _4A77FD_implosion_particle(a2);
                 else
                   _4A80DC_some_stuff_sw(a2);
                 return false;
@@ -1399,14 +1353,8 @@
 //----- (004A8BFC) --------------------------------------------------------
 int stru6::_4A8BFC()
 {
-  stru6 *v1; // esi@1
-  int result; // eax@1
-
-  v1 = this;
-  result = 8
-         * pSpriteFrameTable->pSpriteSFrames[pSpriteFrameTable->FastFindSprite("spell84")].uAnimLength;
-  v1->uAnimLength = result;
-  return result;
+  uAnimLength = 8 * pSpriteFrameTable->pSpriteSFrames[pSpriteFrameTable->FastFindSprite("spell84")].uAnimLength;
+  return uAnimLength;
 }
 
 //----- (004A8C27) --------------------------------------------------------
@@ -1580,162 +1528,60 @@
 //----- (004A90A0) --------------------------------------------------------
 void stru6::LoadAnimations()
 {
-  stru6 *v1; // esi@1
-  unsigned int v2; // eax@1
-  unsigned int v3; // eax@1
-  unsigned int v4; // eax@1
-  unsigned int v5; // eax@1
-  unsigned int v6; // eax@1
-  unsigned int v7; // eax@1
-  unsigned int v8; // eax@1
-  unsigned int v9; // eax@1
-  unsigned int v10; // eax@1
-  unsigned int v11; // eax@1
-  unsigned int v12; // eax@1
-  unsigned int v13; // eax@1
-  unsigned int v14; // eax@1
-  unsigned int v15; // eax@1
-  unsigned int v16; // eax@1
-  unsigned int v17; // eax@1
-  unsigned int v18; // eax@1
-  unsigned int v19; // eax@1
-  unsigned int v20; // eax@1
-  unsigned int v21; // eax@1
-  unsigned int v22; // eax@1
-  unsigned int v23; // eax@1
-  unsigned int v24; // eax@1
-  unsigned int v25; // eax@1
-  unsigned int v26; // eax@1
-  unsigned int v27; // eax@1
-  unsigned int v28; // eax@1
-  unsigned int v29; // eax@1
-  unsigned int v30; // eax@1
-  unsigned int v31; // eax@1
-  unsigned int v32; // eax@1
-  unsigned int v33; // eax@1
-  unsigned int v34; // eax@1
-  unsigned int v35; // eax@1
-  unsigned int v36; // eax@1
-  unsigned int v37; // eax@1
-  unsigned int v38; // eax@1
-  unsigned int v39; // eax@1
-  unsigned int v40; // eax@1
-  unsigned int v41; // eax@1
-  unsigned int v42; // eax@1
-  unsigned int v43; // eax@1
-  unsigned int v44; // eax@1
-  unsigned int v45; // eax@1
-  unsigned int v46; // eax@1
-  unsigned int v47; // eax@1
-  unsigned int v48; // eax@1
-  unsigned int v49; // eax@1
-  unsigned int v50; // eax@1
-  unsigned int v51; // eax@1
-
-  v1 = this;
   uTextureID_effpar1 = pBitmaps_LOD->LoadTexture("effpar01", TEXTURE_DEFAULT);
   uTextureID_effpar2 = pBitmaps_LOD->LoadTexture("effpar02", TEXTURE_DEFAULT);
   uTextureID_effpar3 = pBitmaps_LOD->LoadTexture("effpar03", TEXTURE_DEFAULT);
   uSpriteID_sp57c = pSprites_LOD->LoadSprite("sp57c", 6);
-  v2 = pIconsFrameTable->FindIcon("zapp");
-  pIconsFrameTable->InitializeAnimation(v2);
-  v3 = pIconsFrameTable->FindIcon("spheal1");
-  pIconsFrameTable->InitializeAnimation(v3);
-  v4 = pIconsFrameTable->FindIcon("spheal2");
-  pIconsFrameTable->InitializeAnimation(v4);
-  v5 = pIconsFrameTable->FindIcon("spheal3");
-  pIconsFrameTable->InitializeAnimation(v5);
-  v6 = pIconsFrameTable->FindIcon("spboost1");
-  pIconsFrameTable->InitializeAnimation(v6);
-  v7 = pIconsFrameTable->FindIcon("spboost2");
-  pIconsFrameTable->InitializeAnimation(v7);
-  v8 = pIconsFrameTable->FindIcon("spboost3");
-  pIconsFrameTable->InitializeAnimation(v8);
-  v9 = pIconsFrameTable->FindIcon("spell03");
-  pIconsFrameTable->InitializeAnimation(v9);
-  v10 = pIconsFrameTable->FindIcon("spell05");
-  pIconsFrameTable->InitializeAnimation(v10);
-  v11 = pIconsFrameTable->FindIcon("spell14");
-  pIconsFrameTable->InitializeAnimation(v11);
-  v12 = pIconsFrameTable->FindIcon("spell17");
-  pIconsFrameTable->InitializeAnimation(v12);
-  v13 = pIconsFrameTable->FindIcon("spell21");
-  pIconsFrameTable->InitializeAnimation(v13);
-  v14 = pIconsFrameTable->FindIcon("spell25");
-  pIconsFrameTable->InitializeAnimation(v14);
-  v15 = pIconsFrameTable->FindIcon("spell27");
-  pIconsFrameTable->InitializeAnimation(v15);
-  v16 = pIconsFrameTable->FindIcon("spell36");
-  pIconsFrameTable->InitializeAnimation(v16);
-  v17 = pIconsFrameTable->FindIcon("spell38");
-  pIconsFrameTable->InitializeAnimation(v17);
-  v18 = pIconsFrameTable->FindIcon("spell46");
-  pIconsFrameTable->InitializeAnimation(v18);
-  v19 = pIconsFrameTable->FindIcon("spell51");
-  pIconsFrameTable->InitializeAnimation(v19);
-  v20 = pIconsFrameTable->FindIcon("spell55");
-  pIconsFrameTable->InitializeAnimation(v20);
-  v21 = pIconsFrameTable->FindIcon("spell58");
-  pIconsFrameTable->InitializeAnimation(v21);
-  v22 = pIconsFrameTable->FindIcon("spell69");
-  pIconsFrameTable->InitializeAnimation(v22);
-  v23 = pIconsFrameTable->FindIcon("spell71");
-  pIconsFrameTable->InitializeAnimation(v23);
-  v24 = pIconsFrameTable->FindIcon("spell73");
-  pIconsFrameTable->InitializeAnimation(v24);
-  v25 = pIconsFrameTable->FindIcon("spell75");
-  pIconsFrameTable->InitializeAnimation(v25);
-  v26 = pIconsFrameTable->FindIcon("spell96");
-  pIconsFrameTable->InitializeAnimation(v26);
+
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("zapp"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spheal1"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spheal2"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spheal3"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spboost1"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spboost2"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spboost3"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell03"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell05"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell14"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell17"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell21"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell25"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell27"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell36"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell38"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell46"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell51"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell55"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell58"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell69"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell71"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell73"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell75"));
+  pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell96"));
 
-  v27 = pSpriteFrameTable->FastFindSprite("spell01");
-  pSpriteFrameTable->InitializeSprite(v27);
-  v28 = pSpriteFrameTable->FastFindSprite("spell02");
-  pSpriteFrameTable->InitializeSprite(v28);
-  v29 = pSpriteFrameTable->FastFindSprite("spell03");
-  pSpriteFrameTable->InitializeSprite(v29);
-  v30 = pSpriteFrameTable->FastFindSprite("spell09");
-  pSpriteFrameTable->InitializeSprite(v30);
-  v31 = pSpriteFrameTable->FastFindSprite("spell11");
-  pSpriteFrameTable->InitializeSprite(v31);
-  v32 = pSpriteFrameTable->FastFindSprite("spell18");
-  pSpriteFrameTable->InitializeSprite(v32);
-  v33 = pSpriteFrameTable->FastFindSprite("spell22");
-  pSpriteFrameTable->InitializeSprite(v33);
-  v34 = pSpriteFrameTable->FastFindSprite("spell26");
-  pSpriteFrameTable->InitializeSprite(v34);
-  v35 = pSpriteFrameTable->FastFindSprite("spell29");
-  pSpriteFrameTable->InitializeSprite(v35);
-  v36 = pSpriteFrameTable->FastFindSprite("spell39");
-  pSpriteFrameTable->InitializeSprite(v36);
-  v37 = pSpriteFrameTable->FastFindSprite("spell39c");
-  pSpriteFrameTable->InitializeSprite(v37);
-  v38 = pSpriteFrameTable->FastFindSprite("spell41");
-  pSpriteFrameTable->InitializeSprite(v38);
-  v39 = pSpriteFrameTable->FastFindSprite("spell57c");
-  pSpriteFrameTable->InitializeSprite(v39);
-  v40 = pSpriteFrameTable->FastFindSprite("spell62");
-  pSpriteFrameTable->InitializeSprite(v40);
-  v41 = pSpriteFrameTable->FastFindSprite("spell65");
-  pSpriteFrameTable->InitializeSprite(v41);
-  v42 = pSpriteFrameTable->FastFindSprite("spell66");
-  pSpriteFrameTable->InitializeSprite(v42);
-  v43 = pSpriteFrameTable->FastFindSprite("spell70");
-  pSpriteFrameTable->InitializeSprite(v43);
-  v44 = pSpriteFrameTable->FastFindSprite("spell76");
-  pSpriteFrameTable->InitializeSprite(v44);
-  v45 = pSpriteFrameTable->FastFindSprite("spell84");
-  pSpriteFrameTable->InitializeSprite(v45);
-  v46 = pSpriteFrameTable->FastFindSprite("spell90");
-  pSpriteFrameTable->InitializeSprite(v46);
-  v47 = pSpriteFrameTable->FastFindSprite("spell92");
-  pSpriteFrameTable->InitializeSprite(v47);
-  v48 = pSpriteFrameTable->FastFindSprite("spell93");
-  pSpriteFrameTable->InitializeSprite(v48);
-  v49 = pSpriteFrameTable->FastFindSprite("spell97");
-  pSpriteFrameTable->InitializeSprite(v49);
-  v50 = pSpriteFrameTable->FastFindSprite("spell97c");
-  pSpriteFrameTable->InitializeSprite(v50);
-  v51 = pSpriteFrameTable->FastFindSprite("spell97c");
-  pSpriteFrameTable->InitializeSprite(v51);
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell01"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell02"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell03"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell09"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell11"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell18"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell22"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell26"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell29"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell39"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell39c"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell41"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell57c"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell62"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell65"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell66"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell70"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell76"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell84"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell90"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell92"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell93"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell97"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell97c"));
+  pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell97c"));
 }