diff --git a/Source/DiabloUI/art_draw.cpp b/Source/DiabloUI/art_draw.cpp index 83f140e10..7b2a9dc37 100644 --- a/Source/DiabloUI/art_draw.cpp +++ b/Source/DiabloUI/art_draw.cpp @@ -50,29 +50,6 @@ void DrawArt(Point screenPosition, Art *art, int nFrame, Uint16 srcW, Uint16 src ErrSdl(); } -void DrawArt(const Surface &out, Point position, Art *art, int nFrame, Uint16 srcW, Uint16 srcH) -{ - if (art->surface == nullptr || position.y >= out.h() || position.x >= out.w()) - return; - - SDL_Rect srcRect = MakeSdlRect(0, nFrame * art->h(), art->w(), art->h()); - if (srcW != 0 && srcW < srcRect.w) - srcRect.w = srcW; - if (srcH != 0 && srcH < srcRect.h) - srcRect.h = srcH; - - if (position.x + srcRect.w <= 0 || position.y + srcRect.h <= 0) - return; - - out.Clip(&srcRect, &position); - SDL_Rect dstRect = MakeSdlRect(position.x + out.region.x, position.y + out.region.y, 0, 0); - - UpdatePalette(art, out.surface); - - if (SDL_BlitSurface(art->surface.get(), &srcRect, out.surface, &dstRect) < 0) - ErrSdl(); -} - int GetAnimationFrame(int frames, int fps) { int frame = (SDL_GetTicks() / fps) % frames; diff --git a/Source/DiabloUI/art_draw.h b/Source/DiabloUI/art_draw.h index 138e97867..0602563b9 100644 --- a/Source/DiabloUI/art_draw.h +++ b/Source/DiabloUI/art_draw.h @@ -9,8 +9,6 @@ void UpdatePalette(Art *art, const SDL_Surface *output = nullptr); void DrawArt(Point screenPosition, Art *art, int nFrame = 0, Uint16 srcW = 0, Uint16 srcH = 0); -void DrawArt(const Surface &out, Point position, Art *art, int nFrame = 0, Uint16 srcW = 0, Uint16 srcH = 0); - int GetAnimationFrame(int frames, int fps = 60); } // namespace devilution