Browse Source

Use SCREEN_Y (dX part)

pull/127/head
Manuel K 7 years ago committed by Anders Jenbo
parent
commit
32b0e99e90
  1. 2
      SourceX/DiabloUI/credits.cpp
  2. 4
      SourceX/DiabloUI/diabloui.cpp
  3. 4
      SourceX/DiabloUI/progress.cpp

2
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());
}

4
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());
}

4
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());
}

Loading…
Cancel
Save