diff --git a/SourceX/DiabloUI/credits.cpp b/SourceX/DiabloUI/credits.cpp index 082e4fad8..bbc9d0449 100644 --- a/SourceX/DiabloUI/credits.cpp +++ b/SourceX/DiabloUI/credits.cpp @@ -523,7 +523,7 @@ void credts_Render() text_surface = TTF_RenderUTF8_Solid(font, the_long_credits[creditLine + i] + offset, color); if (text_surface) { SDL_Rect src_rect = { 0, -y, SCREEN_WIDTH, 251 }; - SDL_Rect dsc_rect = { 64 + x, 160 + 114, SCREEN_WIDTH, SCREEN_HEIGHT }; + SDL_Rect dsc_rect = { 64 + x, SCREEN_Y + 114, SCREEN_WIDTH, SCREEN_HEIGHT }; if (SDL_BlitSurface(text_surface, &src_rect, pal_surface, &dsc_rect) <= -1) { SDL_Log(SDL_GetError()); } diff --git a/SourceX/DiabloUI/diabloui.cpp b/SourceX/DiabloUI/diabloui.cpp index 5611eb6ac..2ce46f7ce 100644 --- a/SourceX/DiabloUI/diabloui.cpp +++ b/SourceX/DiabloUI/diabloui.cpp @@ -524,7 +524,7 @@ BOOL UiCreatePlayerDescription(_uiheroinfo *info, DWORD mode, char *desc) void DrawArt(int screenX, int screenY, Art *art, int nFrame, int drawW) { BYTE *src = (BYTE *)art->data + (art->width * art->height * nFrame); - BYTE *dst = &gpBuffer[screenX + 64 + (screenY + 160) * BUFFER_WIDTH]; + BYTE *dst = &gpBuffer[screenX + 64 + (screenY + SCREEN_Y) * BUFFER_WIDTH]; drawW = drawW ? drawW : art->width; for (int i = 0; i < art->height && i + screenY < SCREEN_HEIGHT; i++, src += art->width, dst += BUFFER_WIDTH) { @@ -696,7 +696,7 @@ void UiFadeIn(int steps) void UiRenderItemDebug(UI_Item item) { item.rect.x += 64; // pal_surface is shifted? - item.rect.y += 160; + item.rect.y += SCREEN_Y; if (SDL_FillRect(pal_surface, &item.rect, random(0, 255)) <= -1) { SDL_Log(SDL_GetError()); } diff --git a/SourceX/DiabloUI/progress.cpp b/SourceX/DiabloUI/progress.cpp index 488f0bc69..86953936a 100644 --- a/SourceX/DiabloUI/progress.cpp +++ b/SourceX/DiabloUI/progress.cpp @@ -63,12 +63,12 @@ void progress_Render(BYTE progress) DrawArt(GetCenterOffset(110), y + 99, &ButImage, 2, 110); if (msgSurface) { - SDL_Rect dsc_rect = { 64 + x + 50, 160 + y + 8, SCREEN_WIDTH, SCREEN_HEIGHT }; + SDL_Rect dsc_rect = { 64 + x + 50, SCREEN_Y + y + 8, SCREEN_WIDTH, SCREEN_HEIGHT }; if (SDL_BlitSurface(msgSurface, NULL, pal_surface, &dsc_rect) <= -1) { SDL_Log(SDL_GetError()); } dsc_rect.x = 64 + GetCenterOffset(textWidth) - 1; - dsc_rect.y = 160 + y + 99 + 4; + dsc_rect.y = SCREEN_Y + y + 99 + 4; if (SDL_BlitSurface(cancleSurface, NULL, pal_surface, &dsc_rect) <= -1) { SDL_Log(SDL_GetError()); }