diff Actor.cpp @ 29:e62134245ab0

On BLV loading.
author Nomad
date Thu, 18 Oct 2012 03:18:04 +0200
parents 93bf1d5f6a6d
children f4450ff595fe
line wrap: on
line diff
--- a/Actor.cpp	Tue Oct 16 19:31:34 2012 +0200
+++ b/Actor.cpp	Thu Oct 18 03:18:04 2012 +0200
@@ -3099,7 +3099,7 @@
   if ( v4->pMonsterInfo.uHostilityType != 4 )
   {
     v4->uAttributes &= 0xFFFFFFFBu;
-    v4->pMonsterInfo.uHostilityType = 4;
+    v4->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long;
   }
   if ( (signed __int64)v4->pActorBuffs[1].uExpireTime > 0 )
     v4->pActorBuffs[1].Reset();
@@ -4046,41 +4046,42 @@
 //----- (0045959A) --------------------------------------------------------
 void Actor::PrepareSprites(char load_sounds_if_bit1_set)
 {
-  Actor *v2; // edi@1
+  //Actor *v2; // edi@1
   MonsterDesc *v3; // esi@1
-  __int16 v4; // ax@2
+  //__int16 v4; // ax@2
   unsigned __int16 *v5; // ecx@4
   unsigned __int16 *v6; // eax@4
   signed int v7; // edx@4
-  char pSpriteName; // [sp+Ch] [bp-88h]@2
+  //char pSpriteName[120]; // [sp+Ch] [bp-88h]@2
   MonsterInfo *v9; // [sp+84h] [bp-10h]@1
-  int v10; // [sp+88h] [bp-Ch]@1
-  char *Source; // [sp+8Ch] [bp-8h]@1
-  unsigned __int16 *v12; // [sp+90h] [bp-4h]@1
+  //int v10; // [sp+88h] [bp-Ch]@1
+  //char *Source; // [sp+8Ch] [bp-8h]@1
+  //unsigned __int16 *v12; // [sp+90h] [bp-4h]@1
 
-  v2 = this;
-  v10 = 8;
-  v3 = &pMonsterList->pMonsters[this->pMonsterInfo.uID - 1];
-  v9 = &pMonsterStats->pInfos[this->pMonsterInfo.uID - 1 + 1];
-  v12 = this->pSpriteIDs;
-  Source = (char *)v3->pSpriteNames;
-  do
+  //v2 = this;
+  //v10 = 8;
+  v3 = &pMonsterList->pMonsters[pMonsterInfo.uID - 1];
+  v9 = &pMonsterStats->pInfos[pMonsterInfo.uID - 1 + 1];
+  //v12 = pSpriteIDs;
+  //Source = (char *)v3->pSpriteNames;
+  //do
+  for (uint i = 0; i < 8; ++i)
   {
-    strcpy(&pSpriteName, Source);
-    v4 = pSpriteFrameTable->FastFindSprite(&pSpriteName);
-    *v12 = v4;
-    pSpriteFrameTable->InitializeSprite(v4);
-    ++v12;
-    Source += 10;
-    --v10;
+    //strcpy(pSpriteName, v3->pSpriteNames[i]);
+    pSpriteIDs[i] = pSpriteFrameTable->FastFindSprite(v3->pSpriteNames[i]);
+    //*v12 = v4;
+    pSpriteFrameTable->InitializeSprite(pSpriteIDs[i]);
+    //++v12;
+    //Source += 10;
+    //--v10;
   }
-  while ( v10 );
-  v2->uActorHeight = v3->uMonsterHeight;
-  v2->uActorRadius = v3->uMonsterRadius;
-  v2->uMovementSpeed = LOWORD(v9->uBaseSpeed);
+  //while ( v10 );
+  uActorHeight = v3->uMonsterHeight;
+  uActorRadius = v3->uMonsterRadius;
+  uMovementSpeed = LOWORD(v9->uBaseSpeed);
   if ( !(load_sounds_if_bit1_set & 1) )
   {
-    v5 = v2->pSoundSampleIDs;
+    v5 = pSoundSampleIDs;
     v6 = v3->pSoundSampleIDs;
     v7 = 4;
     do
@@ -4199,7 +4200,7 @@
   v8->uSectorID = v16;
   v8->PrepareSprites(0);
   v18 = v30;
-  v8->pMonsterInfo.uHostilityType = 0;
+  v8->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
   LODWORD(v19) = v18->uAlly;
   if ( !(uint)v19 )
   {