From a4cebede7478f832a4f79eb5d40476c4571f5db8 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Sun, 24 Feb 2019 03:13:36 +0000 Subject: [PATCH] Made Flash.cpp actually ASM-accurate --- src/Flash.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Flash.cpp b/src/Flash.cpp index 28d4e5f7..a98c1ecb 100644 --- a/src/Flash.cpp +++ b/src/Flash.cpp @@ -45,35 +45,35 @@ void ActFlash_Explosion(int flx, int fly) flash.cnt += 0x200; flash.width += flash.cnt; - right = (flash.x - flx - flash.width) / 0x200; - left = (flash.y - fly - flash.width) / 0x200; - top = (flash.x - flx + flash.width) / 0x200; + left = (flash.x - flx - flash.width) / 0x200; + top = (flash.y - fly - flash.width) / 0x200; + right = (flash.x - flx + flash.width) / 0x200; bottom = (flash.y - fly + flash.width) / 0x200; - if (right < 0) - right = 0; if (left < 0) left = 0; - if (top > WINDOW_WIDTH) - top = WINDOW_WIDTH; + if (top < 0) + top = 0; + if (right > WINDOW_WIDTH) + right = WINDOW_WIDTH; if (bottom > WINDOW_HEIGHT) bottom = WINDOW_HEIGHT; - flash.rect1.left = right; - flash.rect1.right = top; + flash.rect1.left = left; + flash.rect1.right = right; flash.rect1.top = 0; flash.rect1.bottom = WINDOW_HEIGHT; flash.rect2.left = 0; flash.rect2.right = WINDOW_WIDTH; - flash.rect2.top = left; + flash.rect2.top = top; flash.rect2.bottom = bottom; - if (flash.width > (WINDOW_WIDTH << 11)) + if (flash.width > (WINDOW_WIDTH * 0x200 * 4)) { flash.act_no = 1; flash.cnt = 0; - flash.width = (WINDOW_HEIGHT << 9); + flash.width = (WINDOW_HEIGHT * 0x200); } break;