comparison mm7_5.cpp @ 1545:c4ab816fcc5e

assert, Abortf, AbortWithError -> Assert, Error refactors here and there
author Nomad
date Sat, 07 Sep 2013 20:05:20 +0200
parents d023247ae118
children 9a6567c6c76c
comparison
equal deleted inserted replaced
1544:499761153844 1545:c4ab816fcc5e
1 #ifdef _MSC_VER 1 #ifdef _MSC_VER
2 #define _CRT_SECURE_NO_WARNINGS 2 #define _CRT_SECURE_NO_WARNINGS
3 #endif 3 #endif
4
5 #include <assert.h>
6 4
7 #include "Texture.h" 5 #include "Texture.h"
8 #include "mm7_data.h" 6 #include "mm7_data.h"
9 #include "VideoPlayer.h" 7 #include "VideoPlayer.h"
10 #include "Sprites.h" 8 #include "Sprites.h"
4672 int v19; // eax@17 4670 int v19; // eax@17
4673 signed int v20; // ebx@18 4671 signed int v20; // ebx@18
4674 int v21; // edi@20 4672 int v21; // edi@20
4675 signed int v22; // eax@22 4673 signed int v22; // eax@22
4676 signed __int64 v23; // qtt@22 4674 signed __int64 v23; // qtt@22
4677 bool result; // eax@25 4675 //bool result; // eax@25
4678 int v25; // [sp+14h] [bp-8h]@14 4676 //int v25; // [sp+14h] [bp-8h]@14
4679 int a4a; // [sp+28h] [bp+Ch]@2 4677 int a4a; // [sp+28h] [bp+Ch]@2
4680 signed int a5a; // [sp+2Ch] [bp+10h]@14 4678 signed int a5a; // [sp+2Ch] [bp+10h]@14
4681 4679
4682 __debugbreak(); 4680 __debugbreak();
4683 4681
4723 break; 4721 break;
4724 if ( dword_4F5B24_ys[i + 1] >= a3 ^ (dword_4F5B24_ys[i + 2] >= a3) ) 4722 if ( dword_4F5B24_ys[i + 1] >= a3 ^ (dword_4F5B24_ys[i + 2] >= a3) )
4725 { 4723 {
4726 if( dword_4F5BF4_xs[i + 2] >= a4a || dword_4F5BF4_xs[i] >= a4a) 4724 if( dword_4F5BF4_xs[i + 2] >= a4a || dword_4F5BF4_xs[i] >= a4a)
4727 { 4725 {
4728 if ( (dword_4F5BF4_xs[i + 2] >= a4a && dword_4F5BF4_xs[i + 1] >= a4a) 4726 if (dword_4F5BF4_xs[i + 2] >= a4a && dword_4F5BF4_xs[i + 1] >= a4a)
4729 || (v25 = dword_4F5BF4_xs[i + 2] - dword_4F5BF4_xs[i + 1], 4727 ++a5a;
4730 LODWORD(v23) = v25 << 16, 4728 else
4731 HIDWORD(v23) = v25 >> 16, 4729 {
4732 dword_4F5BF4_xs[i + 1] 4730 v23 = (__int64)(dword_4F5BF4_xs[i + 2] - dword_4F5BF4_xs[i + 1]) << 16;
4733 + ((signed int)(((unsigned __int64)(v23 4731 __int64 _a = dword_4F5B24_ys[i + 2] - dword_4F5B24_ys[i + 1];
4734 / (dword_4F5B24_ys[i + 2] - dword_4F5B24_ys[i + 1]) 4732 __int64 _b = (__int64)(a3 - dword_4F5B24_ys[i + 1]) << 16;
4735 * ((a3 - dword_4F5B24_ys[i + 1]) << 16)) >> 16) 4733
4736 + 32768) >> 16) >= a4a) ) 4734 if (dword_4F5BF4_xs[i + 1] + ((((v23 / _a * _b) >> 16) + 32768) >> 16) >= a4a)
4737 ++a5a; 4735 ++a5a;
4736 }
4738 } 4737 }
4739 } 4738 }
4740 } 4739 }
4741 result = 1; 4740
4742 if ( a5a != 1 ) 4741 if ( a5a != 1 )
4743 result = 0; 4742 return false;
4744 return result; 4743 return true;
4745 4744
4746 } 4745 }
4747 4746
4748 //----- (004088E9) -------------------------------------------------------- 4747 //----- (004088E9) --------------------------------------------------------
4749 int __fastcall sub_4088E9(int x1, int y1, int x2, int y2, int x3, int y3) 4748 int __fastcall sub_4088E9(int x1, int y1, int x2, int y2, int x3, int y3)