|
@@ -470,49 +470,49 @@ static inline byte RemapTTOColour(byte t
|
|
|
{
|
|
|
/** Lossy remapping of TTO colours to TTD colours. SVXConverter uses the same conversion. */
|
|
|
static const byte tto_colour_remap[] = {
|
|
|
COLOUR_DARK_BLUE, COLOUR_GREY, COLOUR_YELLOW, COLOUR_RED,
|
|
|
COLOUR_PURPLE, COLOUR_DARK_GREEN, COLOUR_ORANGE, COLOUR_PALE_GREEN,
|
|
|
COLOUR_BLUE, COLOUR_GREEN, COLOUR_CREAM, COLOUR_BROWN,
|
|
|
COLOUR_WHITE, COLOUR_LIGHT_BLUE, COLOUR_MAUVE, COLOUR_PINK
|
|
|
};
|
|
|
|
|
|
if ((size_t)tto >= lengthof(tto_colour_remap)) return COLOUR_GREY; // this shouldn't happen
|
|
|
|
|
|
return tto_colour_remap[tto];
|
|
|
}
|
|
|
|
|
|
static inline uint RemapTownIndex(uint x)
|
|
|
{
|
|
|
return _savegame_type == SGT_TTO ? (x - 0x264) / 78 : (x - 0x264) / 94;
|
|
|
}
|
|
|
|
|
|
static inline uint RemapOrderIndex(uint x)
|
|
|
{
|
|
|
return _savegame_type == SGT_TTO ? (x - 0x1AC4) / 2 : (x - 0x1C18) / 2;
|
|
|
}
|
|
|
|
|
|
extern SmallVector<TileIndex, 256> _animated_tiles;
|
|
|
extern std::vector<TileIndex> _animated_tiles;
|
|
|
extern char *_old_name_array;
|
|
|
|
|
|
static uint32 _old_town_index;
|
|
|
static uint16 _old_string_id;
|
|
|
static uint16 _old_string_id_2;
|
|
|
|
|
|
static void ReadTTDPatchFlags()
|
|
|
{
|
|
|
if (_read_ttdpatch_flags) return;
|
|
|
|
|
|
_read_ttdpatch_flags = true;
|
|
|
|
|
|
/* Set default values */
|
|
|
_old_vehicle_multiplier = 1;
|
|
|
_ttdp_version = 0;
|
|
|
_old_extra_chunk_nums = 0;
|
|
|
_bump_assert_value = 0;
|
|
|
|
|
|
if (_savegame_type == SGT_TTO) return;
|
|
|
|
|
|
/* TTDPatch misuses _old_map3 for flags.. read them! */
|
|
|
_old_vehicle_multiplier = _old_map3[0];
|
|
|
/* Somehow.... there was an error in some savegames, so 0 becomes 1
|
|
|
* and 1 becomes 2. The rest of the values are okay */
|