From 6ec916bbb82054ee7064892c83611ccf31c0fc02 Mon Sep 17 00:00:00 2001 From: qndel Date: Thu, 7 Nov 2019 22:54:59 +0100 Subject: [PATCH] center speedbook horizontally --- Source/control.cpp | 24 ++++++++++++------------ defs.h | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Source/control.cpp b/Source/control.cpp index b1e4feba5..4ad44838b 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -258,7 +258,7 @@ void DrawSpellList() pSpell = SPL_INVALID; infostr[0] = '\0'; - x = 636; + x = 636 + PANEL_LEFT; y = 495; ClearPanel(); for (i = 0; i < 4; i++) { @@ -362,16 +362,16 @@ void DrawSpellList() } } x -= 56; - if (x == 20) { + if (x == 20 + PANEL_LEFT) { y -= 56; - x = 636; + x = 636 + PANEL_LEFT; } } - if (mask != 0 && x != 636) + if (mask != 0 && x != 636 + PANEL_LEFT) x -= 56; if (x == 20) { y -= 56; - x = 636; + x = 636 + PANEL_LEFT; } } } @@ -804,9 +804,9 @@ void DoSpeedBook() int xo, yo, X, Y, i, j; spselflag = 1; - xo = 636; + xo = 636 + PANEL_LEFT; yo = 495; - X = 600; + X = 600 + PANEL_LEFT; Y = 307; if (plr[myplr]._pRSpell != SPL_INVALID) { for (i = 0; i < 4; i++) { @@ -832,17 +832,17 @@ void DoSpeedBook() Y = yo - 188; } xo -= 56; - if (xo == 20) { - xo = 636; + if (xo == 20 + PANEL_LEFT) { + xo = 636 + PANEL_LEFT; yo -= 56; } } spell <<= (__int64)1; } - if (spells && xo != 636) + if (spells && xo != 636 + PANEL_LEFT) xo -= 56; - if (xo == 20) { - xo = 636; + if (xo == 20 + PANEL_LEFT) { + xo = 636 + PANEL_LEFT; yo -= 56; } } diff --git a/defs.h b/defs.h index 1a134dc5b..4c44b4649 100644 --- a/defs.h +++ b/defs.h @@ -91,8 +91,8 @@ #define PAL16_RED 224 #define PAL16_GRAY 240 -#define SCREEN_WIDTH 640 -#define SCREEN_HEIGHT 480 +#define SCREEN_WIDTH 1280 +#define SCREEN_HEIGHT 960 #define ZOOM_WIDTH 384 #define ZOOM_HEIGHT 224