shithub: cstory

Download patch

ref: e4a20a983e43757948b339adf110fc9e843009dc
parent: ed97e374f85b78243fa711c3b695a49b284eb66a
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Feb 20 10:59:04 EST 2020

Similar fixes

--- a/src/Frame.cpp
+++ b/src/Frame.cpp
@@ -145,7 +145,7 @@
 	else
 	{
 		// Widescreen/tallscreen-safe behaviour
-		if (map_w * 16 < WINDOW_WIDTH)
+		if ((map_w - 1) * 16 < WINDOW_WIDTH)
 		{
 			gFrame.x = -(((WINDOW_WIDTH - ((map_w - 1) * 16)) * 0x200) / 2);
 		}
@@ -158,7 +158,7 @@
 				gFrame.x = (((map_w - 1) * 16) - WINDOW_WIDTH) * 0x200;
 		}
 
-		if (map_l * 16 < WINDOW_HEIGHT)
+		if ((map_l - 1) * 16 < WINDOW_HEIGHT)
 		{
 			gFrame.y = -(((WINDOW_HEIGHT - ((map_l - 1) * 16)) * 0x200) / 2);
 		}
@@ -219,7 +219,7 @@
 	else
 	{
 		// Widescreen/tallscreen-safe behaviour
-		if (map_w * 16 < WINDOW_WIDTH)
+		if ((map_w - 1) * 16 < WINDOW_WIDTH)
 		{
 			gFrame.x = -(((WINDOW_WIDTH - ((map_w - 1) * 16)) * 0x200) / 2);
 		}
@@ -232,7 +232,7 @@
 				gFrame.x = (((map_w - 1) * 16) - WINDOW_WIDTH) * 0x200;
 		}
 
-		if (map_l * 16 < WINDOW_HEIGHT)
+		if ((map_l - 1) * 16 < WINDOW_HEIGHT)
 		{
 			gFrame.y = -(((WINDOW_HEIGHT - ((map_l - 1) * 16)) * 0x200) / 2);
 		}