diff --git a/src/CommonDefines.h b/src/CommonDefines.h index 2a135b90..996cbcf9 100644 --- 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 diff --git a/src/Frame.cpp b/src/Frame.cpp index bad365a3..6e879a61 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -22,24 +22,30 @@ void MoveFrame3() 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 { 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 {