diff --git a/src/gfx.c b/src/gfx.c index 022b35e1a2..1e8dc86f84 100644 --- a/src/gfx.c +++ b/src/gfx.c @@ -154,6 +154,33 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short ri void gfx_draw_sprite(rct_drawpixelinfo *dpi, int image_id, int x, int y) { RCT2_CALLPROC_X(0x0067A28E, 0, image_id, x, y, 0, dpi, 0); + + int eax = 0, ebx = image_id, ecx = x, edx = y, esi = 0, edi = dpi, ebp = 0; + eax = image_id; + eax >>= 26; + RCT2_GLOBAL(0x00EDF81C, uint32) = ebx; + eax &= 0x7; + eax = RCT2_GLOBAL(0x009E3CE4 + 4 * eax, uint32); + RCT2_GLOBAL(0x009E3CDC, uint32) = eax; + if (!(RCT2_GLOBAL(0x00EDF81C, uint32) & 0xE0000000)){ + if (!(ebx & 0x80000000)) + { + if (!(ebx & 0x20000000)){ + eax = ebx; + RCT2_GLOBAL(0x9E3CDC, uint32) = 0; + eax >>= 13; + eax &= 0x1f; + eax = RCT2_GLOBAL(eax * 4 + 0x91FCBC, uint32); + eax <<= 4; + eax = RCT2_GLOBAL(eax + 0x9EBD28, uint32); + ebp = *((uint32*)eax + 0xF3); + esi = *((uint32*)eax + 0xF7); + RCT2_GLOBAL(0x9ABEFF, uint32) = ebp; + RCT2_GLOBAL(0x9ABF03, uint32) = esi; + ebp = *((uint32*)eax + 0xFB); + }//0x67a361 + }//0x67a445 + }//0x67a46e } /**