Merge branch 'master' into jgrpp
# Conflicts: # src/blitter/32bpp_anim.hpp # src/blitter/32bpp_base.hpp # src/blitter/8bpp_base.hpp # src/blitter/null.hpp # src/cheat_gui.cpp # src/gfx.cpp # src/linkgraph/linkgraph.cpp # src/spriteloader/grf.cpp # src/station_cmd.cpp
This commit is contained in:
@@ -31,9 +31,10 @@ void Blitter_40bppAnim::SetPixel(void *video, int x, int y, uint8 colour)
|
||||
if (_screen_disable_anim) {
|
||||
Blitter_32bppOptimized::SetPixel(video, x, y, colour);
|
||||
} else {
|
||||
*((Colour *)video + x + y * _screen.pitch) = _black_colour;
|
||||
size_t y_offset = static_cast<size_t>(y) * _screen.pitch;
|
||||
*((Colour *)video + x + y_offset) = _black_colour;
|
||||
|
||||
VideoDriver::GetInstance()->GetAnimBuffer()[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * _screen.pitch] = colour;
|
||||
VideoDriver::GetInstance()->GetAnimBuffer()[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y_offset] = colour;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -571,9 +572,9 @@ void Blitter_40bppAnim::ScrollBuffer(void *video, int left, int top, int width,
|
||||
Blitter_32bppBase::ScrollBuffer(video, left, top, width, height, scroll_x, scroll_y);
|
||||
}
|
||||
|
||||
int Blitter_40bppAnim::BufferSize(int width, int height)
|
||||
size_t Blitter_40bppAnim::BufferSize(uint width, uint height)
|
||||
{
|
||||
return width * height * (sizeof(uint32) + sizeof(uint8));
|
||||
return (sizeof(uint32) + sizeof(uint8)) * width * height;
|
||||
}
|
||||
|
||||
Blitter::PaletteAnimation Blitter_40bppAnim::UsePaletteAnimation()
|
||||
|
Reference in New Issue
Block a user