ref: 4498e5d71adf77caa8d456fd1f9183a6ac37559a
parent: 1b09256c40aad4e19dcb820c43c43b34459e8fbf
author: cuckydev <cuckydev@users.noreply.github.com>
date: Thu Feb 7 15:52:16 EST 2019
i tried
--- a/src/CommonDefines.h
+++ b/src/CommonDefines.h
@@ -1,5 +1,5 @@
#pragma once
#define PATH_LENGTH 260 //Pixel had the path size locked to 260 (dangerously low), if you tried to open the executable in a path with more than around 220 characters, it'd crash.
-#define WINDOW_WIDTH 320
+#define WINDOW_WIDTH 426
#define WINDOW_HEIGHT 240
--- a/src/Frame.cpp
+++ b/src/Frame.cpp
@@ -22,12 +22,15 @@
const int num_x = ((WINDOW_WIDTH + 0xF) >> 4) + 1;
const int num_y = ((WINDOW_HEIGHT + 0xF) >> 4) + 1;
- if (map_w >= num_x)
+ if (map_w >= num_x || g_GameFlags & 8)
{
if (gFrame.x <= -0x200)
gFrame.x = 0;
- if (gFrame.x > ((((map_w - 1) << 4) - WINDOW_WIDTH)) << 9)
- gFrame.x = (((map_w - 1) << 4) - WINDOW_WIDTH) << 9;
+ if (gFrame.x > ((((map_w - 1) << 4) - ((g_GameFlags & 8) ? 320 : WINDOW_WIDTH))) << 9)
+ gFrame.x = (((map_w - 1) << 4) - ((g_GameFlags & 8) ? 320 : WINDOW_WIDTH)) << 9;
+
+ if (g_GameFlags & 8)
+ gFrame.x -= ((WINDOW_WIDTH - 320) / 2) << 9;
}
else
{
@@ -34,12 +37,15 @@
gFrame.x = (((map_w - 1) << 4) - WINDOW_WIDTH) << 8;
}
- if (map_l >= num_y)
+ if (map_l >= num_y || g_GameFlags & 8)
{
if (gFrame.y <= -0x200)
gFrame.y = 0;
- if (gFrame.y > ((((map_l - 1) << 4) - WINDOW_HEIGHT)) << 9)
- gFrame.y = (((map_l - 1) << 4) - WINDOW_HEIGHT) << 9;
+ if (gFrame.y > ((((map_l - 1) << 4) - ((g_GameFlags & 8) ? 240 : WINDOW_HEIGHT))) << 9)
+ gFrame.y = (((map_l - 1) << 4) - ((g_GameFlags & 8) ? 240 : WINDOW_HEIGHT)) << 9;
+
+ if (g_GameFlags & 8)
+ gFrame.y += ((WINDOW_HEIGHT - 240) / 2) << 9;
}
else
{