diff --git a/bin/data/openttdd.grf b/bin/data/openttdd.grf index c60a079008..3eba7ae5dc 100644 Binary files a/bin/data/openttdd.grf and b/bin/data/openttdd.grf differ diff --git a/bin/data/openttdw.grf b/bin/data/openttdw.grf index fa0924c7e3..18ba7b9fd5 100644 Binary files a/bin/data/openttdw.grf and b/bin/data/openttdw.grf differ diff --git a/bin/data/orig_dos.obg b/bin/data/orig_dos.obg index c46289cc73..e7bbd0ea2b 100644 --- a/bin/data/orig_dos.obg +++ b/bin/data/orig_dos.obg @@ -24,7 +24,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8 TRGC.GRF = ed446637e034104c5559b32c18afe78d TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9 TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6 -OPENTTDD.GRF = c886c7d5b38a93f2cb1cdc0d33472eb8 +OPENTTDD.GRF = 2e1f3667175e8eeb013ea35881ecffb7 [origin] default = You can find it on your Transport Tycoon Deluxe CD-ROM. diff --git a/bin/data/orig_dos_de.obg b/bin/data/orig_dos_de.obg index 897f767fa9..1938eb75a7 100644 --- a/bin/data/orig_dos_de.obg +++ b/bin/data/orig_dos_de.obg @@ -24,7 +24,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8 TRGC.GRF = ed446637e034104c5559b32c18afe78d TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9 TRGT.GRF = fcde1d7e8a74197d72a62695884b909e -OPENTTDD.GRF = c886c7d5b38a93f2cb1cdc0d33472eb8 +OPENTTDD.GRF = 2e1f3667175e8eeb013ea35881ecffb7 [origin] default = You can find it on your Transport Tycoon Deluxe CD-ROM. diff --git a/bin/data/orig_win.obg b/bin/data/orig_win.obg index 344a49e047..09cdaa3b86 100644 --- a/bin/data/orig_win.obg +++ b/bin/data/orig_win.obg @@ -24,7 +24,7 @@ TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32 TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1 TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8 -OPENTTDW.GRF = b6689105405fa3ea34cb8a5543633d29 +OPENTTDW.GRF = a73ff4dce8936fadc02dea183afad638 [origin] default = You can find it on your Transport Tycoon Deluxe CD-ROM. diff --git a/src/gfx.cpp b/src/gfx.cpp index a56c9f20c4..93fc857775 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -64,7 +64,7 @@ static ReusableBuffer _cursor_backup; */ static Rect _invalid_rect; static const byte *_colour_remap_ptr; -static byte _string_colourremap[3]; +static byte _string_colourremap[3]; ///< Recoloursprite for stringdrawing. The grf loader ensures, that ST_FONT sprites only use colours 0 to 2. enum { DIRTY_BLOCK_HEIGHT = 8, diff --git a/src/music_gui.cpp b/src/music_gui.cpp index 44dde7e0b3..3e32019c86 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -29,15 +29,15 @@ static byte _playlist_all[] = { }; static byte _playlist_old_style[] = { - 1, 8, 2, 9, 14, 15, 19, 13, 0 + 2, 9, 3, 10, 15, 16, 20, 14, 0 }; static byte _playlist_new_style[] = { - 6, 11, 10, 17, 21, 18, 5, 0 + 7, 12, 11, 18, 22, 19, 6, 0 }; static byte _playlist_ezy_street[] = { - 12, 7, 16, 3, 20, 4, 0 + 13, 8, 17, 4, 21, 5, 0 }; static byte * const _playlists[] = { diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 81874af7d5..3b7f5c2773 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1094,9 +1094,8 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 return CMD_ERROR; /* Trucks can't share orders with busses (and visa versa) */ - if (src->type == VEH_ROAD) { - if (src->cargo_type != dst->cargo_type && (IsCargoInClass(src->cargo_type, CC_PASSENGERS) || IsCargoInClass(dst->cargo_type, CC_PASSENGERS))) - return CMD_ERROR; + if (src->type == VEH_ROAD && IsCargoInClass(src->cargo_type, CC_PASSENGERS) != IsCargoInClass(dst->cargo_type, CC_PASSENGERS)) { + return CMD_ERROR; } /* Is the vehicle already in the shared list? */ diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp index 1fc641d381..3bdc6f706d 100644 --- a/src/saveload/misc_sl.cpp +++ b/src/saveload/misc_sl.cpp @@ -46,7 +46,7 @@ void ResetViewportAfterLoadGame() w->viewport->dest_scrollpos_y = _saved_scrollpos_y; ViewPort *vp = w->viewport; - vp->zoom = min(_saved_scrollpos_zoom, ZOOM_LVL_MAX); + vp->zoom = (ZoomLevel)min(_saved_scrollpos_zoom, ZOOM_LVL_MAX); vp->virtual_width = ScaleByZoom(vp->width, vp->zoom); vp->virtual_height = ScaleByZoom(vp->height, vp->zoom); diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp index cd034ee735..0ddc1b5853 100644 --- a/src/spriteloader/grf.cpp +++ b/src/spriteloader/grf.cpp @@ -121,7 +121,11 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, } for (int x = 0; x < length; x++) { - data->m = ((sprite_type == ST_NORMAL && _palette_remap_grf[file_slot]) ? _palette_remap[*dest] : *dest); + switch (sprite_type) { + case ST_NORMAL: data->m = _palette_remap_grf[file_slot] ? _palette_remap[*dest] : *dest; break; + case ST_FONT: data->m = min(*dest, 2u); break; + default: data->m = *dest; break; + } dest++; data++; } @@ -142,7 +146,11 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, dest = dest_orig; for (int i = 0; i < sprite->width * sprite->height; i++) { - sprite->data[i].m = ((sprite_type == ST_NORMAL && _palette_remap_grf[file_slot]) ? _palette_remap[dest[i]] : dest[i]); + switch (sprite_type) { + case ST_NORMAL: sprite->data[i].m = _palette_remap_grf[file_slot] ? _palette_remap[dest[i]] : dest[i]; break; + case ST_FONT: sprite->data[i].m = min(dest[i], 2u); break; + default: sprite->data[i].m = dest[i]; break; + } } } diff --git a/src/table/industry_land.h b/src/table/industry_land.h index 3dea6dbff1..5df8f257f4 100644 --- a/src/table/industry_land.h +++ b/src/table/industry_land.h @@ -684,17 +684,17 @@ static const DrawBuildingsTileStruct _industry_draw_tile_data[NEW_INDUSTRYTILEOF M( 0x1244, PAL_NONE, 0x1282 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x1285 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1243, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), - M( 0x1243, PAL_NONE, 0x1287, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0), - M( 0x1243, PAL_NONE, 0x1287, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0), - M( 0x1243, PAL_NONE, 0x1287, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0), + M( 0x1243, PAL_NONE, 0x1287 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0), + M( 0x1243, PAL_NONE, 0x1287 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0), + M( 0x1243, PAL_NONE, 0x1287 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), - M( 0x1244, PAL_NONE, 0x1288, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0), - M( 0x1244, PAL_NONE, 0x1288, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0), - M( 0x1244, PAL_NONE, 0x1288, PALETTE_TO_RED, 0, 0, 16, 16, 50, 0), + M( 0x1244, PAL_NONE, 0x1288 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0), + M( 0x1244, PAL_NONE, 0x1288 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0), + M( 0x1244, PAL_NONE, 0x1288 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1243, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), - M( 0x1243, PAL_NONE, 0x1289, PALETTE_TO_RED, 0, 0, 16, 16, 50, 3), - M( 0x1243, PAL_NONE, 0x1289, PALETTE_TO_RED, 0, 0, 16, 16, 50, 3), - M( 0x1243, PAL_NONE, 0x1289, PALETTE_TO_RED, 0, 0, 16, 16, 50, 3), + M( 0x1243, PAL_NONE, 0x1289 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 3), + M( 0x1243, PAL_NONE, 0x1289 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 3), + M( 0x1243, PAL_NONE, 0x1289 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 0, 16, 16, 50, 3), M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0), M( 0x1244, PAL_NONE, 0x0, PAL_NONE, 0, 0, 16, 16, 50, 0),