ref: 461c28a0a8499cdfe41d7ae3bcd2b6ffe4c67d75
parent: c0f29fac7b7d9e34a48152f288c702ac4ad04fbd
parent: 57f4729ba2da3f992d3d29ff5b840b7f6ace0457
author: Clownacy <[email protected]>
date: Thu Feb 7 17:48:45 EST 2019
Merge branch 'master' of https://github.com/cuckydev/Cave-Story-Engine-2
binary files /dev/null b/build/Profile - Copy.dat differ
--- a/src/Back.cpp
+++ b/src/Back.cpp
@@ -167,12 +167,18 @@
{
const bool fromFocus = (gStageNo == 31); //Get if we should only draw around a 320x240 area of the focus point
+ //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);
+
//Get borders
- const int barLeft = fromFocus ? (*gFrame.tgt_x - (320 << 8)) : -0x1000;
- const int barTop = fromFocus ? (*gFrame.tgt_y - (240 << 8)) : -0x1000;
+ const int barLeft = fromFocus ? focusX : -0x1000;
+ const int barTop = fromFocus ? focusY : -0x1000;
- 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;
+ const int barRight = fromFocus ? focusR : (gMap.width << 13) - 0x1000;
+ const int barBottom = fromFocus ? focusB : (gMap.length << 13) - 0x1000;
//Draw bars
RECT barRect;
--- a/src/Frame.cpp
+++ b/src/Frame.cpp
@@ -43,7 +43,6 @@
}
else
{
-
gFrame.y = (((map_l - 1) << 4) - WINDOW_HEIGHT) << 8;
}