Merge branch 'master' into jgrpp
# Conflicts: # src/blitter/32bpp_anim.cpp # src/blitter/32bpp_anim.hpp # src/blitter/32bpp_anim_sse2.cpp # src/blitter/32bpp_base.cpp # src/blitter/32bpp_base.hpp # src/ground_vehicle.cpp # src/linkgraph/linkgraph_gui.h # src/main_gui.cpp # src/newgrf_house.cpp # src/newgrf_house.h # src/town_cmd.cpp # src/vehicle_base.h # src/viewport_gui.cppp
This commit is contained in:
@@ -318,9 +318,7 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height,
|
||||
}
|
||||
|
||||
Colour *udst = (Colour *)dst;
|
||||
uint16 *anim;
|
||||
|
||||
anim = this->anim_buf + this->ScreenToAnimOffset((uint32 *)dst);
|
||||
uint16 *anim = this->anim_buf + this->ScreenToAnimOffset((uint32 *)dst);
|
||||
|
||||
if (pal == PALETTE_TO_TRANSPARENT) {
|
||||
do {
|
||||
@@ -432,9 +430,7 @@ void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colou
|
||||
}
|
||||
|
||||
Colour colour32 = LookupColourInPalette(colour);
|
||||
uint16 *anim_line;
|
||||
|
||||
anim_line = this->ScreenToAnimOffset((uint32 *)video) + this->anim_buf;
|
||||
uint16 *anim_line = this->ScreenToAnimOffset((uint32 *)video) + this->anim_buf;
|
||||
|
||||
do {
|
||||
Colour *dst = (Colour *)video;
|
||||
@@ -616,8 +612,8 @@ void Blitter_32bppAnim::PostResize()
|
||||
if (_screen.width != this->anim_buf_width || _screen.height != this->anim_buf_height) {
|
||||
/* The size of the screen changed; we can assume we can wipe all data from our buffer */
|
||||
free(this->anim_alloc);
|
||||
this->anim_buf_height = _screen.height;
|
||||
this->anim_buf_width = _screen.width;
|
||||
this->anim_buf_height = _screen.height;
|
||||
this->anim_buf_pitch = (_screen.width + 7) & ~7;
|
||||
this->anim_alloc = CallocT<uint16>(this->anim_buf_pitch * this->anim_buf_height + 8);
|
||||
|
||||
|
||||
@@ -195,10 +195,10 @@ Colour Blitter_32bppBase::ReallyAdjustBrightness(Colour colour, uint8 brightness
|
||||
/* Reduce overbright strength */
|
||||
ob /= 2;
|
||||
return Colour(
|
||||
r >= 255 ? 255 : min(r + ob * (255 - r) / 256, 255),
|
||||
g >= 255 ? 255 : min(g + ob * (255 - g) / 256, 255),
|
||||
b >= 255 ? 255 : min(b + ob * (255 - b) / 256, 255),
|
||||
colour.a);
|
||||
r >= 255 ? 255 : min(r + ob * (255 - r) / 256, 255),
|
||||
g >= 255 ? 255 : min(g + ob * (255 - g) / 256, 255),
|
||||
b >= 255 ? 255 : min(b + ob * (255 - b) / 256, 255),
|
||||
colour.a);
|
||||
}
|
||||
|
||||
Blitter::PaletteAnimation Blitter_32bppBase::UsePaletteAnimation()
|
||||
|
||||
Reference in New Issue
Block a user