Mercurial > mm7
diff Sprites.cpp @ 1588:e6ac4919b22c
Слияние
author | Ritor1 |
---|---|
date | Mon, 09 Sep 2013 09:13:40 +0600 |
parents | 9a6567c6c76c |
children | 75fafd8ced59 |
line wrap: on
line diff
--- a/Sprites.cpp Mon Sep 09 09:13:23 2013 +0600 +++ b/Sprites.cpp Mon Sep 09 09:13:40 2013 +0600 @@ -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 )