diff --git a/Source/control.cpp b/Source/control.cpp index e79722164..630ed66e3 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -971,8 +971,8 @@ void DrawPanelBox(int x, int y, int w, int h, int sx, int sy) * @param pCelBuff Buffer of the empty flask cel. * @param min Top of the flask cel section to draw. * @param max Bottom of the flask cel section to draw. - * @param c X Backbuffer coordinate - * @param r Y Backbuffer coordinate + * @param sx X Backbuffer coordinate + * @param sy Y Backbuffer coordinate */ void SetFlaskHeight(BYTE *pCelBuff, int min, int max, int sx, int sy) { diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 203824312..474365ceb 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -951,8 +951,8 @@ void RightMouseDown() } else if (!stextflag) { if (spselflag) { SetSpell(); - } else if (MouseY >= PANEL_TOP - || (!sbookflag || MouseX <= 320) + } else if (MouseY >= SPANEL_HEIGHT + || (!sbookflag || MouseX <= RIGHT_PANEL) && !TryIconCurs() && (pcursinvitem == -1 || !UseInvItem(myplr, pcursinvitem))) { if (pcurs == 1) { diff --git a/Source/scrollrt.cpp b/Source/scrollrt.cpp index 75d9b2b62..b94a3bd89 100644 --- a/Source/scrollrt.cpp +++ b/Source/scrollrt.cpp @@ -2753,24 +2753,24 @@ static void DrawMain(int dwHgt, BOOL draw_desc, BOOL draw_hp, BOOL draw_mana, BO } if (ysize < SCREEN_HEIGHT) { if (draw_sbar) { - DoBlitScreen(204, 357, 232, 28); + DoBlitScreen(PANEL_LEFT + 204, PANEL_TOP + 5, 232, 28); } if (draw_desc) { - DoBlitScreen(176, 398, 288, 60); + DoBlitScreen(PANEL_LEFT + 176, PANEL_TOP + 46, 288, 60); } if (draw_mana) { - DoBlitScreen(460, 352, 88, 72); - DoBlitScreen(564, 416, 56, 56); + DoBlitScreen(PANEL_LEFT + 460, PANEL_TOP, 88, 72); + DoBlitScreen(PANEL_LEFT + 564, PANEL_TOP + 64, 56, 56); } if (draw_hp) { - DoBlitScreen(96, 352, 88, 72); + DoBlitScreen(PANEL_LEFT + 96, PANEL_TOP, 88, 72); } if (draw_btn) { - DoBlitScreen(8, 357, 72, 119); - DoBlitScreen(556, 357, 72, 48); + DoBlitScreen(PANEL_LEFT + 8, PANEL_TOP + 5, 72, 119); + DoBlitScreen(PANEL_LEFT + 556, PANEL_TOP + 5, 72, 48); if (gbMaxPlayers > 1) { - DoBlitScreen(84, 443, 36, 32); - DoBlitScreen(524, 443, 36, 32); + DoBlitScreen(PANEL_LEFT + 84, PANEL_TOP + 91, 36, 32); + DoBlitScreen(PANEL_LEFT + 524, PANEL_TOP + 91, 36, 32); } } if (sgdwCursWdtOld != 0) { diff --git a/defs.h b/defs.h index 10161dbf8..5a0e555f5 100644 --- a/defs.h +++ b/defs.h @@ -125,6 +125,8 @@ #define PANEL_X (SCREEN_X + PANEL_LEFT) #define PANEL_Y (SCREEN_Y + PANEL_TOP) +#define SPANEL_HEIGHT 352 + #define RIGHT_PANEL (SCREEN_WIDTH - 320) #define RIGHT_PANEL_X (SCREEN_X + RIGHT_PANEL)