diff Actor.cpp @ 515:cb0ad52d6a26

LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people) Some object-related subs moved to SpriteObject.cpp
author Nomad
date Fri, 01 Mar 2013 21:13:12 +0200
parents a3939d5067c4
children 214d9d47cf1f 3b4a24fcd5a0
line wrap: on
line diff
--- a/Actor.cpp	Fri Mar 01 18:23:49 2013 +0200
+++ b/Actor.cpp	Fri Mar 01 21:13:12 2013 +0200
@@ -1,7 +1,7 @@
 #include <assert.h>
 
 #include "Actor.h"
-#include "LayingItem.h"
+#include "SpriteObject.h"
 #include "Math.h"
 #include "Party.h"
 #include "Outdoor.h"
@@ -469,7 +469,7 @@
   float v112; // [sp+3Ch] [bp-94h]@49
   int v113; // [sp+40h] [bp-90h]@41
   int v114; // [sp+48h] [bp-88h]@41
-  LayingItem a1; // [sp+4Ch] [bp-84h]@1
+  SpriteObject a1; // [sp+4Ch] [bp-84h]@1
   int v116; // [sp+BCh] [bp-14h]@49
   AIDirection *v117; // [sp+C0h] [bp-10h]@1
   int v118; // [sp+C4h] [bp-Ch]@29
@@ -561,7 +561,7 @@
               v10 = v105;
 LABEL_29:
               spellnuma = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360;
-              a1.uItemType = stru_4E3ACC[15].field_0;
+              a1.uType = stru_4E3ACC[15].field_0;
               v118 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (v10 - 1);
               v11 = 0;
               if ( (signed int)pObjectList->uNumObjects <= 0 )
@@ -642,7 +642,7 @@
               return;
             }
 LABEL_159:
-            a1.uItemType = stru_4E3ACC[spellnum].field_0;
+            a1.uType = stru_4E3ACC[spellnum].field_0;
             v119 = 0.0;
             if ( (signed int)pObjectList->uNumObjects <= 0 )
             {
@@ -652,7 +652,7 @@
             else
             {
               v66 = (char *)&pObjectList->pObjects->uObjectID;
-              while ( (short)a1.uItemType != *(short *)v66 )
+              while ( (short)a1.uType != *(short *)v66 )
               {
                 ++LODWORD(v119);
                 v66 += 56;
@@ -790,7 +790,7 @@
                 pitch = stru_5C6E00->Atan2(v31, (signed __int64)spellnumc);
               }
               a1.stru_24.Reset();
-              a1.uItemType = stru_4E3ACC[9].field_0;
+              a1.uType = stru_4E3ACC[9].field_0;
               spellnumd = 0;
               if ( (signed int)pObjectList->uNumObjects <= 0 )
               {
@@ -800,7 +800,7 @@
               else
               {
                 v33 = (char *)&pObjectList->pObjects->uObjectID;
-                while ( (short)a1.uItemType != *(short *)v33 )
+                while ( (short)a1.uType != *(short *)v33 )
                 {
                   ++spellnumd;
                   v33 += 56;
@@ -1334,7 +1334,7 @@
   v70 = v108;
 LABEL_179:
   spellnume = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360;
-  a1.uItemType = stru_4E3ACC[SPELL_DARK_SHARPMETAL].field_0;
+  a1.uType = stru_4E3ACC[SPELL_DARK_SHARPMETAL].field_0;
   v116 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (v70 - 1);
   v71 = 0;
   if ( (signed int)pObjectList->uNumObjects <= 0 )
@@ -1482,7 +1482,7 @@
   signed int v11; // ecx@19
   int v12; // eax@19
   int v13; // edx@28
-  //LayingItem a1; // [sp+Ch] [bp-74h]@1
+  //SpriteObject a1; // [sp+Ch] [bp-74h]@1
   unsigned int v15; // [sp+7Ch] [bp-4h]@1
   signed int v16; // [sp+88h] [bp+8h]@14
   signed int v17; // [sp+88h] [bp+8h]@19
@@ -1491,47 +1491,47 @@
   v4 = a2;
   v5 = &pActors[uActorID];
 
-  LayingItem a1; // [sp+Ch] [bp-74h]@1
-  //LayingItem::LayingItem(&a1);
+  SpriteObject a1; // [sp+Ch] [bp-74h]@1
+  //SpriteObject::SpriteObject(&a1);
 
   result = a3 - 1;
   switch ( a3 )
   {
     case 1:
-      a1.uItemType = 545;
+      a1.uType = 545;
       goto LABEL_14;
     case 2:
-      a1.uItemType = 550;
+      a1.uType = 550;
       goto LABEL_14;
     case 3:
-      a1.uItemType = 510;
+      a1.uType = 510;
       goto LABEL_14;
     case 4:
-      a1.uItemType = 500;
+      a1.uType = 500;
       goto LABEL_14;
     case 5:
-      a1.uItemType = 515;
+      a1.uType = 515;
       goto LABEL_14;
     case 6:
-      a1.uItemType = 505;
+      a1.uType = 505;
       goto LABEL_14;
     case 7:
-      a1.uItemType = 530;
+      a1.uType = 530;
       goto LABEL_14;
     case 8:
-      a1.uItemType = 525;
+      a1.uType = 525;
       goto LABEL_14;
     case 9:
-      a1.uItemType = 520;
+      a1.uType = 520;
       goto LABEL_14;
     case 10:
-      a1.uItemType = 535;
+      a1.uType = 535;
       goto LABEL_14;
     case 11:
-      a1.uItemType = 540;
+      a1.uType = 540;
       goto LABEL_14;
     case 13:
-      a1.uItemType = 555;
+      a1.uType = 555;
 LABEL_14:
       v16 = 0;
       if ( (signed int)pObjectList->uNumObjects <= 0 )
@@ -1541,7 +1541,7 @@
     default:
       return result;
   }
-  while ( (short)a1.uItemType != *(short *)v7 )
+  while ( (short)a1.uType != *(short *)v7 )
   {
     ++v16;
     v7 += 56;
@@ -1636,14 +1636,14 @@
   int v5; // ebx@6
   int v6; // ecx@6
   int v7; // eax@6
-  LayingItem a1; // [sp+Ch] [bp-78h]@1
+  SpriteObject a1; // [sp+Ch] [bp-78h]@1
   unsigned int v10; // [sp+7Ch] [bp-8h]@1
   int v11; // [sp+80h] [bp-4h]@6
 
   v10 = uActorID;
   v1 = &pActors[uActorID];
   v2 = 0;
-  a1.uItemType = 600;
+  a1.uType = 600;
   if ( (signed int)pObjectList->uNumObjects <= 0 )
   {
 LABEL_5:
@@ -1692,7 +1692,7 @@
 // //
 // //
 // // object1 & object2 format :  objectType | (objectID << 3)
-// //    objectType == 2 - LayingItem
+// //    objectType == 2 - SpriteObject
 // //    objectType == 3 - Actor
 // //    objectType == 4 - Party
 // //    objectType == 5 - Decoration
@@ -1755,9 +1755,9 @@
   if ( !v5 )
   {
     v19 = v4;
-    outx = pLayingItems[v19].vPosition.x;
-    v13 = pLayingItems[v19].vPosition.y;
-    v14 = pLayingItems[v19].vPosition.z;
+    outx = pSpriteObjects[v19].vPosition.x;
+    v13 = pSpriteObjects[v19].vPosition.y;
+    v14 = pSpriteObjects[v19].vPosition.z;
     goto LABEL_26;
   }
   v7 = v5 - 1;
@@ -1865,9 +1865,9 @@
   if ( v21 == 2 )
   {
     v30 = v22;
-    LODWORD(v45) = pLayingItems[v30].vPosition.x;
-    v27 = pLayingItems[v30].vPosition.y;
-    v28 = pLayingItems[v30].vPosition.z;
+    LODWORD(v45) = pSpriteObjects[v30].vPosition.x;
+    v27 = pSpriteObjects[v30].vPosition.y;
+    v28 = pSpriteObjects[v30].vPosition.z;
     goto LABEL_43;
   }
   if ( v21 == 3 )