Browse Source

Use SCREEN_Y

pull/127/head
Manuel K 7 years ago committed by Anders Jenbo
parent
commit
df1d049ae3
  1. 2
      Source/asm_trans_rect.inc
  2. 2
      Source/automap.cpp
  3. 6
      Source/control.cpp
  4. 4
      Source/engine.cpp
  5. 2
      Source/interfac.cpp
  6. 2
      Source/town.cpp

2
Source/asm_trans_rect.inc

@ -15,7 +15,7 @@
__asm {
mov edi, gpBuffer
; origin is at 64,160
add edi, (160 + TRANS_RECT_Y + TRANS_RECT_HEIGHT - 1) * BUFFER_WIDTH + 64 + TRANS_RECT_X
add edi, (SCREEN_Y + TRANS_RECT_Y + TRANS_RECT_HEIGHT - 1) * BUFFER_WIDTH + 64 + TRANS_RECT_X
xor eax, eax
mov edx, TRANS_RECT_HEIGHT >> 1
yloop:

2
Source/automap.cpp

@ -173,7 +173,7 @@ void DrawAutomap()
return;
}
gpBufEnd = (unsigned char *)&gpBuffer[(VIEWPORT_HEIGHT + 160) * 768];
gpBufEnd = (unsigned char *)&gpBuffer[(VIEWPORT_HEIGHT + SCREEN_Y) * 768];
MapX = (ViewX - 16) >> 1;
while (MapX + AutoMapXOfs < 0)

6
Source/control.cpp

@ -1652,7 +1652,7 @@ void PrintGameStr(int x, int y, char *str, int color)
{
BYTE c;
int off;
off = PitchTbl[y + 160] + x + 64;
off = PitchTbl[y + SCREEN_Y] + x + 64;
while (*str) {
c = gbFontTransTbl[(BYTE)*str++];
c = fontframe[c];
@ -1874,7 +1874,7 @@ void ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col)
char *tmp;
int nOffset, screen_x, line, widthOffset;
nOffset = x + PitchTbl[y + 160] + 64;
nOffset = x + PitchTbl[y + SCREEN_Y] + 64;
widthOffset = width - x + 1;
line = 0;
screen_x = 0;
@ -1904,7 +1904,7 @@ void MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, int base)
char *tmp;
int nOffset, screen_x, line, widthOffset;
nOffset = x + PitchTbl[y + 160] + 64;
nOffset = x + PitchTbl[y + SCREEN_Y] + 64;
widthOffset = width - x + 1;
line = 0;
screen_x = 0;

4
Source/engine.cpp

@ -2123,10 +2123,10 @@ void DrawLine(int x0, int y0, int x1, int y1, BYTE col)
if (x1 < 0 + 64 || x1 >= 640 + 64) {
gbNotInView = TRUE;
}
if (y0 < 0 + 160 || y0 >= VIEWPORT_HEIGHT + 160) {
if (y0 < 0 + SCREEN_Y || y0 >= VIEWPORT_HEIGHT + SCREEN_Y) {
gbNotInView = TRUE;
}
if (y1 < 0 + 160 || y1 >= VIEWPORT_HEIGHT + 160) {
if (y1 < 0 + SCREEN_Y || y1 >= VIEWPORT_HEIGHT + SCREEN_Y) {
gbNotInView = TRUE;
}

2
Source/interfac.cpp

@ -41,7 +41,7 @@ void DrawCutscene()
for (i = 0; i < sgdwProgress; i++) {
DrawProgress(
progress_bar_screen_pos[progress_id][0] + i + 64,
progress_bar_screen_pos[progress_id][1] + 160,
progress_bar_screen_pos[progress_id][1] + SCREEN_Y,
progress_id);
}

2
Source/town.cpp

@ -1004,7 +1004,7 @@ void T_DrawGame(int x, int y)
}
/// ASSERT: assert(gpBuffer);
gpBufEnd = &gpBuffer[PitchTbl[160]];
gpBufEnd = &gpBuffer[PitchTbl[SCREEN_Y]];
for (i = 0; i < 7; i++) {
town_draw_upper(x, y, sx, sy, chunks, i, 0);
y++;

Loading…
Cancel
Save