This commit is contained in:
cuckydev 2019-02-07 20:52:16 -05:00
parent 1b09256c40
commit 4498e5d71a
2 changed files with 13 additions and 7 deletions

View file

@ -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

View file

@ -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
{