The bounds checks were performed against the global screen dimensions instead of the output buffer dimensions. Also includes some minor cleanup of DrawArt. Fixes #3388
18 lines
510 B
C++
18 lines
510 B
C++
#pragma once
|
|
|
|
#include "DiabloUI/art.h"
|
|
#include "engine.h"
|
|
|
|
namespace devilution {
|
|
|
|
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);
|
|
|
|
void DrawAnimatedArt(Art *art, Point screenPosition);
|
|
|
|
int GetAnimationFrame(int frames, int fps = 60);
|
|
|
|
} // namespace devilution
|