diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp index a3083e40b3..deedaf34b5 100644 --- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -20,6 +20,11 @@ /** Instantiation of the 32bpp with animation blitter factory. */ static FBlitter_32bppAnim iFBlitter_32bppAnim; +Blitter_32bppAnim::~Blitter_32bppAnim() +{ + free(this->anim_buf); +} + template inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom) { diff --git a/src/blitter/32bpp_anim.hpp b/src/blitter/32bpp_anim.hpp index e707c4437d..a0a022e49f 100644 --- a/src/blitter/32bpp_anim.hpp +++ b/src/blitter/32bpp_anim.hpp @@ -29,6 +29,8 @@ public: anim_buf_height(0) {} + ~Blitter_32bppAnim(); + /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour); diff --git a/src/crashlog.cpp b/src/crashlog.cpp index 7ddc2131f9..4000cfb03e 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -36,6 +36,38 @@ #include +#ifdef WITH_ALLEGRO +# include +#endif /* WITH_ALLEGRO */ +#ifdef WITH_FONTCONFIG +# include +#endif /* WITH_FONTCONFIG */ +#ifdef WITH_PNG + /* pngconf.h, included by png.h doesn't like something in the + * freetype headers. As such it's not alphabetically sorted. */ +# include +#endif /* WITH_PNG */ +#ifdef WITH_FREETYPE +# include +# include FT_FREETYPE_H +#endif /* WITH_FREETYPE */ +#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT) +# include +#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */ +#ifdef WITH_LZMA +# include +#endif +#ifdef WITH_LZO +#include +#endif +#ifdef WITH_SDL +# include "sdl.h" +# include +#endif /* WITH_SDL */ +#ifdef WITH_ZLIB +# include +#endif + #include "safeguards.h" /* static */ const char *CrashLog::message = NULL; @@ -180,39 +212,6 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const return buffer; } -/* Include these here so it's close to where it's actually used. */ -#ifdef WITH_ALLEGRO -# include -#endif /* WITH_ALLEGRO */ -#ifdef WITH_FONTCONFIG -# include -#endif /* WITH_FONTCONFIG */ -#ifdef WITH_PNG - /* pngconf.h, included by png.h doesn't like something in the - * freetype headers. As such it's not alphabetically sorted. */ -# include -#endif /* WITH_PNG */ -#ifdef WITH_FREETYPE -# include -# include FT_FREETYPE_H -#endif /* WITH_FREETYPE */ -#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT) -# include -#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */ -#ifdef WITH_LZMA -# include -#endif -#ifdef WITH_LZO -#include -#endif -#ifdef WITH_SDL -# include "sdl.h" -# include -#endif /* WITH_SDL */ -#ifdef WITH_ZLIB -# include -#endif - /** * Writes information (versions) of the used libraries. * @param buffer The begin where to write at. diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 6c9c614af9..2bc85f9acb 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -399,7 +399,8 @@ static uint32 GetDistanceFromNearbyHouse(uint8 parameter, TileIndex tile, HouseI case 0x66: { TileIndex testtile = GetNearbyTile(parameter, this->tile); if (!IsTileType(testtile, MP_HOUSE)) return 0xFFFFFFFF; - HouseSpec *hs = HouseSpec::Get(GetHouseType(testtile)); + HouseID nearby_house_id = GetHouseType(testtile); + HouseSpec *hs = HouseSpec::Get(nearby_house_id); /* Information about the grf local classid if the house has a class */ uint houseclass = 0; if (hs->class_id != HOUSE_NO_CLASS) { @@ -408,8 +409,8 @@ static uint32 GetDistanceFromNearbyHouse(uint8 parameter, TileIndex tile, HouseI } /* old house type or grf-local houseid */ uint local_houseid = 0; - if (this->house_id < NEW_HOUSE_OFFSET) { - local_houseid = this->house_id; + if (nearby_house_id < NEW_HOUSE_OFFSET) { + local_houseid = nearby_house_id; } else { local_houseid = (hs->grf_prop.grffile == this->ro.grffile ? 1 : 2) << 8; local_houseid |= hs->grf_prop.local_id; diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index bd3c83d139..724bc649bf 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -261,9 +261,10 @@ * 191 26646 * 192 26700 * 193 26802 - * 194 26881 1.5.x + * 194 26881 1.5.x, 1.6.0 + * 195 27572 1.6.x */ -extern const uint16 SAVEGAME_VERSION = 194; ///< Current savegame version of OpenTTD. +extern const uint16 SAVEGAME_VERSION = 195; ///< Current savegame version of OpenTTD. SavegameType _savegame_type; ///< type of savegame we are loading