From 57f4729ba2da3f992d3d29ff5b840b7f6ace0457 Mon Sep 17 00:00:00 2001 From: cuckydev Date: Thu, 7 Feb 2019 16:36:53 -0500 Subject: [PATCH] fixed artery bars --- build/Profile - Copy.dat | Bin 0 -> 1540 bytes src/Back.cpp | 16 +++++++++++----- src/Frame.cpp | 1 - 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 build/Profile - Copy.dat diff --git a/build/Profile - Copy.dat b/build/Profile - Copy.dat new file mode 100644 index 0000000000000000000000000000000000000000..ba3c4778c42888fc4833ddc6e69fe4d8aa3fa50b GIT binary patch literal 1540 zcmeH^y=nqc6olvc!x}AI$;M3;1wpitjo1ns5Ywbiy+t6UnAD2kOIZ3Gg0T1mK8lT% z7MYQ~y@DD92R`n(%VFo7xxGQqd2P3Y766}=CkC^IL5g*g)QQzgQhYBQWLT$3o_r;! zHY7{D1oa5rtsYqD|3&-Z0;lHFEb?)PJT+gA$hSluiRRK?Pvo4E_mF|g|A(hC_*K9+ zqW;I*yLPbJq!_1*)#2{!w?0#h;$0e%!4d((_7DQkm}un?V^o0}+z?&3aRr&RIlKdd k*i6~t0-snbmw7z0Ca0cyi_@% literal 0 HcmV?d00001 diff --git a/src/Back.cpp b/src/Back.cpp index d2e0be4d..8c980d2e 100644 --- a/src/Back.cpp +++ b/src/Back.cpp @@ -167,12 +167,18 @@ void PutFront(int fx, int fy) { const bool fromFocus = (gStageNo == 31); //Get if we should only draw around a 320x240 area of the focus point - //Get borders - const int barLeft = fromFocus ? (*gFrame.tgt_x - (320 << 8)) : -0x1000; - const int barTop = fromFocus ? (*gFrame.tgt_y - (240 << 8)) : -0x1000; + //Get focus rect + int focusX = gFrame.x + (WINDOW_WIDTH << 8) - (320 << 8); + int focusY = gFrame.y + (WINDOW_HEIGHT << 8) - (240 << 8); + int focusR = focusX + (320 << 9); + int focusB = focusY + (240 << 9); - const int barRight = fromFocus ? (*gFrame.tgt_x + (320 << 8)) : (gMap.width << 13) - 0x1000; - const int barBottom = fromFocus ? (*gFrame.tgt_y + (240 << 8)) : (gMap.length << 13) - 0x1000; + //Get borders + const int barLeft = fromFocus ? focusX : -0x1000; + const int barTop = fromFocus ? focusY : -0x1000; + + const int barRight = fromFocus ? focusR : (gMap.width << 13) - 0x1000; + const int barBottom = fromFocus ? focusB : (gMap.length << 13) - 0x1000; //Draw bars RECT barRect; diff --git a/src/Frame.cpp b/src/Frame.cpp index 24242a1c..bad365a3 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -43,7 +43,6 @@ void MoveFrame3() } else { - gFrame.y = (((map_l - 1) << 4) - WINDOW_HEIGHT) << 8; }