Browse Source

Cleanup ObjSetMini (#664)

pull/41/head
galaxyhaxz 7 years ago committed by Robin Eklind
parent
commit
2c51f65d14
  1. 66
      Source/objects.cpp

66
Source/objects.cpp

@ -2629,34 +2629,44 @@ void __fastcall objects_set_door_piece(int x, int y)
void __fastcall ObjSetMini(int x, int y, int v) void __fastcall ObjSetMini(int x, int y, int v)
{ {
unsigned short *v3; // esi int xx, yy;
unsigned short v4; // ax long v1, v2, v3, v4;
int v5; // eax
int pn; // ST1C_4 #if (_MSC_VER >= 800) && (_MSC_VER <= 1200)
int v7; // ST18_4 __asm {
int v8; // ST14_4 mov esi, pMegaTiles
int v9; // ST10_4 xor eax, eax
int v10; // esi mov ax, word ptr v
int v11; // edi dec eax
shl eax, 3
v3 = (unsigned short *)((char *)pMegaTiles + 8 * ((unsigned short)v - 1)); add esi, eax
v4 = *v3; xor eax, eax
++v3; lodsw
v5 = v4 + 1; inc eax
pn = v5; mov v1, eax
_LOWORD(v5) = *v3; lodsw
++v3; inc eax
v7 = ++v5; mov v2, eax
_LOWORD(v5) = *v3; lodsw
v8 = ++v5; inc eax
_LOWORD(v5) = v3[1]; mov v3, eax
v9 = v5 + 1; lodsw
v10 = 2 * x + 16; inc eax
v11 = 2 * y + 16; mov v4, eax
ObjSetMicro(v10, v11, pn); }
ObjSetMicro(v10 + 1, v11++, v7); #else
ObjSetMicro(v10, v11, v8); v1 = *((WORD *)&pMegaTiles[((WORD)v-1)*8])+1;
ObjSetMicro(v10 + 1, v11, v9); v2 = *((WORD *)&pMegaTiles[((WORD)v-1)*8]+1)+1;
v3 = *((WORD *)&pMegaTiles[((WORD)v-1)*8]+2)+1;
v4 = *((WORD *)&pMegaTiles[((WORD)v-1)*8]+3)+1;
#endif
xx = 2 * x + 16;
yy = 2 * y + 16;
ObjSetMicro(xx, yy, v1);
ObjSetMicro(xx + 1, yy, v2);
ObjSetMicro(xx, yy + 1, v3);
ObjSetMicro(xx + 1, yy + 1, v4);
} }
void __fastcall ObjL1Special(int x1, int y1, int x2, int y2) void __fastcall ObjL1Special(int x1, int y1, int x2, int y2)

Loading…
Cancel
Save