Browse Source

center speedbook horizontally

pull/426/head
qndel 6 years ago
parent
commit
6ec916bbb8
  1. 24
      Source/control.cpp
  2. 4
      defs.h

24
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;
}
}

4
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

Loading…
Cancel
Save