diff Sprites.cpp @ 1554:e303d8a9bcdc

Merge
author Grumpy7
date Sat, 07 Sep 2013 21:14:48 +0200
parents 9a6567c6c76c
children 75fafd8ced59
line wrap: on
line diff
--- a/Sprites.cpp	Sat Sep 07 21:00:02 2013 +0200
+++ b/Sprites.cpp	Sat Sep 07 21:14:48 2013 +0200
@@ -351,7 +351,7 @@
   v2 = fopen("data\\dsft.bin", "wb");
   v3 = v2;
   if ( !v2 )
-    Abortf("Unable to save dsft.bin!");
+    Error("Unable to save dsft.bin!");
   fwrite(v1, 4u, 1u, v2);
   fwrite(&v1->uNumEFrames, 4u, 1u, v3);
   fwrite(v1->pSpriteSFrames, 0x3Cu, v1->uNumSpriteFrames, v3);
@@ -405,8 +405,7 @@
     pSpriteSFrames[num_mm7_frames + i].uAnimLength = 0;
   }
   memcpy(pSpriteEFrames + num_mm7_frames, (char *)data_mm6 + 8 + mm6_frames_size, 2 * num_mm6_eframes);
-  
-  if (data_mm8) __debugbreak();
+
   auto mm8_frames_size = num_mm8_frames * sizeof(SpriteFrame);
   memcpy(pSpriteSFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 8, mm8_frames_size);
   memcpy(pSpriteEFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 8 + mm8_frames_size, 2 * num_mm8_eframes);
@@ -479,7 +478,8 @@
   v3 = fopen(Args, "r");
   File = v3;
   if ( !v3 )
-    Abortf("CSpriteFrameTable::load - Unable to open file: %s.", Args);
+    Error("CSpriteFrameTable::load - Unable to open file: %s.", Args);
+
   v4 = 0;
   Argsa = 0;
   if ( fgets(Buf, 490, v3) )
@@ -779,16 +779,16 @@
                                 v12 = v8 - stru_721530.normal.x;
                                 v19 = v9 - stru_721530.normal.y;
                                 v13 = stru_721530.prolly_normal_d + v7;
-                                v21 = ((v8 - stru_721530.normal.x) * stru_721530.field_58.y
-                                     - (v9 - stru_721530.normal.y) * stru_721530.field_58.x) >> 16;
+                                v21 = ((v8 - stru_721530.normal.x) * stru_721530.direction.y
+                                     - (v9 - stru_721530.normal.y) * stru_721530.direction.x) >> 16;
                                 if ( abs(v21) <= stru_721530.prolly_normal_d + v7 )
                                 {
-                                  v14 = (v12 * stru_721530.field_58.x + v19 * stru_721530.field_58.y) >> 16;
+                                  v14 = (v12 * stru_721530.direction.x + v19 * stru_721530.direction.y) >> 16;
                                   if ( v14 > 0 )
                                   {
                                     v15 = v5->vPosition.z;
                                     v16 = stru_721530.normal.z
-                                        + ((unsigned __int64)(stru_721530.field_58.z * (signed __int64)v14) >> 16);
+                                        + ((unsigned __int64)(stru_721530.direction.z * (signed __int64)v14) >> 16);
                                     if ( v16 >= v15 )
                                     {
                                       if ( v16 <= v22 + v15 )