Merge branch 'accurate' into portable

This commit is contained in:
Clownacy 2020-02-25 17:56:17 +00:00
commit 934054806e

View file

@ -37,7 +37,7 @@ void MoveFrame3(void)
else else
{ {
// Widescreen/tallscreen-safe behaviour // 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); gFrame.x = -(((WINDOW_WIDTH - ((map_w - 1) * 16)) * 0x200) / 2);
} }
@ -52,7 +52,7 @@ void MoveFrame3(void)
gFrame.x = (((map_w - 1) * 16) - WINDOW_WIDTH) * 0x200; 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); gFrame.y = -(((WINDOW_HEIGHT - ((map_l - 1) * 16)) * 0x200) / 2);
} }
@ -145,7 +145,7 @@ void SetFramePosition(int fx, int fy)
else else
{ {
// Widescreen/tallscreen-safe behaviour // 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); gFrame.x = -(((WINDOW_WIDTH - ((map_w - 1) * 16)) * 0x200) / 2);
} }
@ -158,7 +158,7 @@ void SetFramePosition(int fx, int fy)
gFrame.x = (((map_w - 1) * 16) - WINDOW_WIDTH) * 0x200; 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); gFrame.y = -(((WINDOW_HEIGHT - ((map_l - 1) * 16)) * 0x200) / 2);
} }
@ -219,7 +219,7 @@ void SetFrameMyChar(void)
else else
{ {
// Widescreen/tallscreen-safe behaviour // 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); gFrame.x = -(((WINDOW_WIDTH - ((map_w - 1) * 16)) * 0x200) / 2);
} }
@ -232,7 +232,7 @@ void SetFrameMyChar(void)
gFrame.x = (((map_w - 1) * 16) - WINDOW_WIDTH) * 0x200; 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); gFrame.y = -(((WINDOW_HEIGHT - ((map_l - 1) * 16)) * 0x200) / 2);
} }