Skip to content

Commit

Permalink
Apply more constants
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo committed Oct 28, 2019
1 parent 71adfe5 commit 048429b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Source/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions Source/diablo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
18 changes: 9 additions & 9 deletions Source/scrollrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 048429b

Please sign in to comment.