mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 05:15:21 +00:00
(svn r10244) -Fix: make sure to let 32bpp-anim report the increased buffer-size it needs
This commit is contained in:
parent
edf68a04b0
commit
e8f9332af9
@ -244,6 +244,11 @@ void Blitter_32bppAnim::ScrollBuffer(void *video, int &left, int &top, int &widt
|
||||
Blitter_32bppBase::ScrollBuffer(video, left, top, width, height, scroll_x, scroll_y);
|
||||
}
|
||||
|
||||
int Blitter_32bppAnim::BufferSize(int width, int height)
|
||||
{
|
||||
return width * height * (sizeof(uint32) + sizeof(uint8));
|
||||
}
|
||||
|
||||
void Blitter_32bppAnim::PaletteAnimate(uint start, uint count)
|
||||
{
|
||||
uint8 *anim = this->anim_buf;
|
||||
|
@ -29,6 +29,7 @@ public:
|
||||
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
|
||||
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
|
||||
/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
|
||||
/* virtual */ int BufferSize(int width, int height);
|
||||
/* virtual */ void PaletteAnimate(uint start, uint count);
|
||||
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
|
||||
};
|
||||
|
@ -55,7 +55,7 @@ static bool _textmessage_visible = false;
|
||||
/* The chatbox grows from the bottom so the coordinates are pixels from
|
||||
* the left and pixels from the bottom. The height is the maximum height */
|
||||
static const Oblong _textmsg_box = {10, 30, 500, 150};
|
||||
static uint8 _textmessage_backup[150 * 500 * 5]; // (height * width)
|
||||
static uint8 _textmessage_backup[150 * 500 * 6]; // (height * width)
|
||||
|
||||
static inline uint GetTextMessageCount()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user