From f1de846ccbdd87bb91e96481e584a6ad2c033252 Mon Sep 17 00:00:00 2001 From: qndel Date: Thu, 7 Nov 2019 21:42:46 +0100 Subject: [PATCH 1/7] clicking on the sides of main panel and below side panels --- Source/cursor.cpp | 2 +- Source/player.cpp | 4 ++-- defs.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/cursor.cpp b/Source/cursor.cpp index 827315e0f..69655c4dc 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -292,7 +292,7 @@ void CheckCursMove() if (sbookflag && MouseX > RIGHT_PANEL && MouseY <= SPANEL_HEIGHT) { return; } - if ((chrflag || questlog) && MouseX < RIGHT_PANEL) { + if ((chrflag || questlog) && MouseX < 320 && MouseY <= SPANEL_HEIGHT) { return; } diff --git a/Source/player.cpp b/Source/player.cpp index d172c6154..74d332eb8 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -3688,8 +3688,8 @@ void CheckPlrSpell() } if (pcurs != CURSOR_HAND - || MouseY >= PANEL_TOP - || (chrflag && MouseX < 320 || invflag && MouseX > RIGHT_PANEL) + || (MouseY >= PANEL_TOP && MouseX >= PANEL_LEFT && MouseX <= RIGHT_PANEL) // allows casting spells through the sides of the main panel if it doesn't cover the whole screen + || ((chrflag || questlog) && MouseX < 320 && MouseY < SPANEL_HEIGHT) || (invflag && MouseX > RIGHT_PANEL && MouseY < SPANEL_HEIGHT) && rspell != SPL_HEAL && rspell != SPL_IDENTIFY && rspell != SPL_REPAIR 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 From d864e3beb774fd0a1a45a585686a42c31ace3097 Mon Sep 17 00:00:00 2001 From: qndel Date: Thu, 7 Nov 2019 21:44:26 +0100 Subject: [PATCH 2/7] comment --- Source/player.cpp | 2 +- defs.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/player.cpp b/Source/player.cpp index 74d332eb8..4cdd25750 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -3689,7 +3689,7 @@ void CheckPlrSpell() if (pcurs != CURSOR_HAND || (MouseY >= PANEL_TOP && MouseX >= PANEL_LEFT && MouseX <= RIGHT_PANEL) // allows casting spells through the sides of the main panel if it doesn't cover the whole screen - || ((chrflag || questlog) && MouseX < 320 && MouseY < SPANEL_HEIGHT) || (invflag && MouseX > RIGHT_PANEL && MouseY < SPANEL_HEIGHT) + || ((chrflag || questlog) && MouseX < 320 && MouseY < SPANEL_HEIGHT) || (invflag && MouseX > RIGHT_PANEL && MouseY < SPANEL_HEIGHT) // allows casting spells below the side panels && rspell != SPL_HEAL && rspell != SPL_IDENTIFY && rspell != SPL_REPAIR diff --git a/defs.h b/defs.h index 4c44b4649..1a134dc5b 100644 --- a/defs.h +++ b/defs.h @@ -91,8 +91,8 @@ #define PAL16_RED 224 #define PAL16_GRAY 240 -#define SCREEN_WIDTH 1280 -#define SCREEN_HEIGHT 960 +#define SCREEN_WIDTH 640 +#define SCREEN_HEIGHT 480 #define ZOOM_WIDTH 384 #define ZOOM_HEIGHT 224 From 6ec916bbb82054ee7064892c83611ccf31c0fc02 Mon Sep 17 00:00:00 2001 From: qndel Date: Thu, 7 Nov 2019 22:54:59 +0100 Subject: [PATCH 3/7] 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 From 0e0d2d3c342ffb2c8ff0d0bb832d5cb363760e1a Mon Sep 17 00:00:00 2001 From: qndel Date: Thu, 7 Nov 2019 22:56:09 +0100 Subject: [PATCH 4/7] small fix --- Source/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/control.cpp b/Source/control.cpp index 4ad44838b..c5d95cf3e 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -369,7 +369,7 @@ void DrawSpellList() } if (mask != 0 && x != 636 + PANEL_LEFT) x -= 56; - if (x == 20) { + if (x == 20 + PANEL_LEFT) { y -= 56; x = 636 + PANEL_LEFT; } From 80ee63a856b997857669986fe88d5e5c19d2cb84 Mon Sep 17 00:00:00 2001 From: qndel Date: Thu, 7 Nov 2019 23:01:52 +0100 Subject: [PATCH 5/7] restore original resolution --- defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/defs.h b/defs.h index 4c44b4649..1a134dc5b 100644 --- a/defs.h +++ b/defs.h @@ -91,8 +91,8 @@ #define PAL16_RED 224 #define PAL16_GRAY 240 -#define SCREEN_WIDTH 1280 -#define SCREEN_HEIGHT 960 +#define SCREEN_WIDTH 640 +#define SCREEN_HEIGHT 480 #define ZOOM_WIDTH 384 #define ZOOM_HEIGHT 224 From 692a58d324b245e8e7771cd0a8c21171b6cf0676 Mon Sep 17 00:00:00 2001 From: qndel Date: Fri, 8 Nov 2019 01:21:07 +0100 Subject: [PATCH 6/7] move speedbook above main panel --- Source/control.cpp | 6 +++--- defs.h | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/control.cpp b/Source/control.cpp index c5d95cf3e..ec2b5659b 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -259,7 +259,7 @@ void DrawSpellList() pSpell = SPL_INVALID; infostr[0] = '\0'; x = 636 + PANEL_LEFT; - y = 495; + y = 495 + HEIGHT_DIFF; ClearPanel(); for (i = 0; i < 4; i++) { switch ((spell_type)i) { @@ -805,9 +805,9 @@ void DoSpeedBook() spselflag = 1; xo = 636 + PANEL_LEFT; - yo = 495; + yo = 495 + HEIGHT_DIFF; X = 600 + PANEL_LEFT; - Y = 307; + Y = 307 + HEIGHT_DIFF; if (plr[myplr]._pRSpell != SPL_INVALID) { for (i = 0; i < 4; i++) { switch (i) { diff --git a/defs.h b/defs.h index 1a134dc5b..62c2adb4b 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 @@ -113,6 +113,7 @@ #define SCREEN_X BORDER_LEFT #define SCREEN_Y BORDER_TOP +#define HEIGHT_DIFF (SCREEN_HEIGHT - 480) #define BUFFER_WIDTH (BORDER_LEFT + SCREEN_WIDTH + BORDER_RIGHT) #define BUFFER_HEIGHT (BORDER_TOP + SCREEN_HEIGHT + BORDER_BOTTOM) From 8e419e6971d9f9f25344ab085958b66ee30cc264 Mon Sep 17 00:00:00 2001 From: qndel Date: Fri, 8 Nov 2019 03:13:16 +0100 Subject: [PATCH 7/7] restore resolution --- defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/defs.h b/defs.h index 62c2adb4b..cf81411bc 100644 --- a/defs.h +++ b/defs.h @@ -91,8 +91,8 @@ #define PAL16_RED 224 #define PAL16_GRAY 240 -#define SCREEN_WIDTH 1280 -#define SCREEN_HEIGHT 960 +#define SCREEN_WIDTH 640 +#define SCREEN_HEIGHT 480 #define ZOOM_WIDTH 384 #define ZOOM_HEIGHT 224