summaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-25 22:07:40 +0000
committerrubidium <rubidium@openttd.org>2007-05-25 22:07:40 +0000
commit17390241e651cb9d5ef60aceb56e14fd50a16199 (patch)
treeb86593b9aea7311014688cdbe56f3789049c2dfb /src/table
parent9e7798c42e14bc3a40f7f9f0357caa45667ace2a (diff)
downloadopenttd-17390241e651cb9d5ef60aceb56e14fd50a16199.tar.xz
(svn r9923) -Add: support for Action 0 Road vehicles, property 1C, bit 0.
Diffstat (limited to 'src/table')
-rw-r--r--src/table/files.h1
-rw-r--r--src/table/road_land.h35
-rw-r--r--src/table/roadveh.h385
-rw-r--r--src/table/sprites.h22
4 files changed, 442 insertions, 1 deletions
diff --git a/src/table/files.h b/src/table/files.h
index 79522ab34..bd7b0a439 100644
--- a/src/table/files.h
+++ b/src/table/files.h
@@ -63,4 +63,5 @@ static MD5File files_openttd[] = {
{ "trkfoundw.grf", { 0x12, 0x33, 0x3f, 0xa3, 0xd1, 0x86, 0x8b, 0x04, 0x53, 0x18, 0x9c, 0xee, 0xf9, 0x2d, 0xf5, 0x95 } },
{ "roadstops.grf", { 0x8c, 0xd9, 0x45, 0x21, 0x28, 0x82, 0x96, 0x45, 0x33, 0x22, 0x7a, 0xb9, 0x0d, 0xf3, 0x67, 0x4a } },
{ "group.grf", { 0xe8, 0x52, 0x5f, 0x1c, 0x3e, 0xf9, 0x91, 0x9d, 0x0f, 0x70, 0x8c, 0x8a, 0x21, 0xa4, 0xc7, 0x02 } },
+ { "tramtrkw.grf", { 0x83, 0x0a, 0xf4, 0x9f, 0x29, 0x10, 0x48, 0xfd, 0x76, 0xe9, 0xda, 0xac, 0x5d, 0xa2, 0x30, 0x45 } },
};
diff --git a/src/table/road_land.h b/src/table/road_land.h
index 9e40b54bc..bf3f61693 100644
--- a/src/table/road_land.h
+++ b/src/table/road_land.h
@@ -32,6 +32,35 @@ static const DrawTileSprites _road_depot[] = {
{ 0xA4A, PAL_NONE, _road_depot_NW }
};
+static const DrawTileSeqStruct _tram_depot_NE[] = {
+ TILE_SEQ_LINE(SPR_TRAMWAY_BASE + 0x35 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 15, 16, 1)
+ TILE_SEQ_END()
+};
+
+static const DrawTileSeqStruct _tram_depot_SE[] = {
+ TILE_SEQ_LINE(SPR_TRAMWAY_BASE + 0x31, PAL_NONE, 0, 0, 1, 16)
+ TILE_SEQ_LINE(SPR_TRAMWAY_BASE + 0x32 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 15, 0, 1, 16)
+ TILE_SEQ_END()
+};
+
+static const DrawTileSeqStruct _tram_depot_SW[] = {
+ TILE_SEQ_LINE(SPR_TRAMWAY_BASE + 0x33, PAL_NONE, 0, 0, 16, 1)
+ TILE_SEQ_LINE(SPR_TRAMWAY_BASE + 0x34 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 15, 16, 1)
+ TILE_SEQ_END()
+};
+
+static const DrawTileSeqStruct _tram_depot_NW[] = {
+ TILE_SEQ_LINE(SPR_TRAMWAY_BASE + 0x36 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 15, 0, 1, 16)
+ TILE_SEQ_END()
+};
+
+static const DrawTileSprites _tram_depot[] = {
+ { 0xA4A, PAL_NONE, _tram_depot_NE },
+ { 0xA4A, PAL_NONE, _tram_depot_SE },
+ { 0xA4A, PAL_NONE, _tram_depot_SW },
+ { 0xA4A, PAL_NONE, _tram_depot_NW }
+};
+
#undef TILE_SEQ_BEGIN
#undef TILE_SEQ_LINE
#undef TILE_SEQ_END
@@ -42,7 +71,13 @@ static const SpriteID _road_tile_sprites_1[16] = {
0x543, 0x53C, 0x535, 0x538, 0x53D, 0x537, 0x53A, 0x536
};
+static const SpriteID _road_frontwire_sprites_1[16] = {
+ 0, 0x37, 0x37, 0x3F, 0x37, 0x37, 0x43, 0x37, 0x37, 0x3F, 0x37, 0x37, 0x3F, 0x37, 0x37, 0x37
+};
+static const SpriteID _road_backpole_sprites_1[16] = {
+ 0, 0x38, 0x39, 0x40, 0x38, 0x38, 0x43, 0x3E, 0x39, 0x41, 0x39, 0x3C, 0x42, 0x3B, 0x3D, 0x3A
+};
#define MAKELINE(a, b, c) { a, b, c },
#define ENDLINE { 0, 0, 0 }
diff --git a/src/table/roadveh.h b/src/table/roadveh.h
index 8f051e876..59ffe344a 100644
--- a/src/table/roadveh.h
+++ b/src/table/roadveh.h
@@ -1011,7 +1011,7 @@ static const RoadDriveEntry _roadveh_drive_data_59[] = {
{RDE_NEXT_TILE | DIAGDIR_SE, 0}
};
-static const RoadDriveEntry * const _road_drive_data[] = {
+static const RoadDriveEntry * const _road_road_drive_data[] = {
_roadveh_drive_data_0,
_roadveh_drive_data_1,
_roadveh_drive_data_2,
@@ -1077,3 +1077,386 @@ static const RoadDriveEntry * const _road_drive_data[] = {
NULL,
NULL,
};
+
+static const RoadDriveEntry _roadveh_tram_turn_ne_0[] = {
+ {15, 5},
+ {14, 5},
+ {13, 5},
+ {12, 5},
+ {11, 5},
+ {10, 5},
+ { 9, 5},
+ { 8, 5},
+ { 7, 5},
+ { 6, 5},
+ { 5, 5},
+ { 4, 5},
+ { 3, 5},
+ { 2, 5},
+ { 1, 5},
+ { 0, 5},
+ { 0, 6},
+ { 0, 7},
+ { 0, 8},
+ { 0, 9},
+ { 1, 9},
+ { 2, 9},
+ { 3, 9},
+ { 4, 9},
+ { 5, 9},
+ { 6, 9},
+ { 7, 9},
+ { 8, 9},
+ { 9, 9},
+ {10, 9},
+ {11, 9},
+ {12, 9},
+ {13, 9},
+ {14, 9},
+ {15, 9},
+ {RDE_NEXT_TILE | DIAGDIR_SW, 0}
+};
+
+static const RoadDriveEntry _roadveh_tram_turn_ne_1[] = {
+ {15, 9},
+ {14, 9},
+ {13, 9},
+ {12, 9},
+ {11, 9},
+ {10, 9},
+ { 9, 9},
+ { 8, 9},
+ { 7, 9},
+ { 6, 9},
+ { 5, 9},
+ { 4, 9},
+ { 3, 9},
+ { 2, 9},
+ { 1, 9},
+ { 0, 9},
+ { 0, 8},
+ { 0, 7},
+ { 0, 6},
+ { 0, 5},
+ { 1, 5},
+ { 2, 5},
+ { 3, 5},
+ { 4, 5},
+ { 5, 5},
+ { 6, 5},
+ { 7, 5},
+ { 8, 5},
+ { 9, 5},
+ {10, 5},
+ {11, 5},
+ {12, 5},
+ {13, 5},
+ {14, 5},
+ {15, 5},
+ {RDE_NEXT_TILE | DIAGDIR_SW, 0}
+};
+
+static const RoadDriveEntry _roadveh_tram_turn_se_0[] = {
+ {5, 0},
+ {5, 1},
+ {5, 2},
+ {5, 3},
+ {5, 4},
+ {5, 5},
+ {5, 6},
+ {5, 7},
+ {5, 8},
+ {5, 9},
+ {5, 10},
+ {5, 11},
+ {5, 12},
+ {5, 13},
+ {5, 14},
+ {5, 15},
+ {6, 15},
+ {7, 15},
+ {8, 15},
+ {9, 15},
+ {9, 14},
+ {9, 13},
+ {9, 12},
+ {9, 11},
+ {9, 10},
+ {9, 9},
+ {9, 8},
+ {9, 7},
+ {9, 6},
+ {9, 5},
+ {9, 4},
+ {9, 3},
+ {9, 2},
+ {9, 1},
+ {9, 0},
+ {RDE_TURNED | DIAGDIR_NW, 0}
+};
+
+static const RoadDriveEntry _roadveh_tram_turn_se_1[] = {
+ {9, 0},
+ {9, 1},
+ {9, 2},
+ {9, 3},
+ {9, 4},
+ {9, 5},
+ {9, 6},
+ {9, 7},
+ {9, 8},
+ {9, 9},
+ {9, 10},
+ {9, 11},
+ {9, 12},
+ {9, 13},
+ {9, 14},
+ {9, 15},
+ {8, 15},
+ {7, 15},
+ {6, 15},
+ {5, 15},
+ {5, 14},
+ {5, 13},
+ {5, 12},
+ {5, 11},
+ {5, 10},
+ {5, 9},
+ {5, 8},
+ {5, 7},
+ {5, 6},
+ {5, 5},
+ {5, 4},
+ {5, 3},
+ {5, 2},
+ {5, 1},
+ {5, 0},
+ {RDE_NEXT_TILE | DIAGDIR_NW, 0}
+};
+
+static const RoadDriveEntry _roadveh_tram_turn_sw_0[] = {
+ { 0, 9},
+ { 1, 9},
+ { 2, 9},
+ { 3, 9},
+ { 4, 9},
+ { 5, 9},
+ { 6, 9},
+ { 7, 9},
+ { 8, 9},
+ { 9, 9},
+ {10, 9},
+ {11, 9},
+ {12, 9},
+ {13, 9},
+ {14, 9},
+ {15, 9},
+ {15, 8},
+ {15, 7},
+ {15, 6},
+ {15, 5},
+ {14, 5},
+ {13, 5},
+ {12, 5},
+ {11, 5},
+ {10, 5},
+ { 9, 5},
+ { 8, 5},
+ { 7, 5},
+ { 6, 5},
+ { 5, 5},
+ { 4, 5},
+ { 3, 5},
+ { 2, 5},
+ { 1, 5},
+ { 0, 5},
+ {RDE_NEXT_TILE | DIAGDIR_NE, 0}
+};
+static const RoadDriveEntry _roadveh_tram_turn_sw_1[] = {
+ { 0, 5},
+ { 1, 5},
+ { 2, 5},
+ { 3, 5},
+ { 4, 5},
+ { 5, 5},
+ { 6, 5},
+ { 7, 5},
+ { 8, 5},
+ { 9, 5},
+ {10, 5},
+ {11, 5},
+ {12, 5},
+ {13, 5},
+ {14, 5},
+ {15, 5},
+ {15, 6},
+ {15, 7},
+ {15, 8},
+ {15, 9},
+ {14, 9},
+ {13, 9},
+ {12, 9},
+ {11, 9},
+ {10, 9},
+ { 9, 9},
+ { 8, 9},
+ { 7, 9},
+ { 6, 9},
+ { 5, 9},
+ { 4, 9},
+ { 3, 9},
+ { 2, 9},
+ { 1, 9},
+ { 0, 9},
+ {RDE_NEXT_TILE | DIAGDIR_NE, 0}
+};
+
+static const RoadDriveEntry _roadveh_tram_turn_nw_0[] = {
+ {9, 15},
+ {9, 14},
+ {9, 13},
+ {9, 12},
+ {9, 11},
+ {9, 10},
+ {9, 9},
+ {9, 8},
+ {9, 7},
+ {9, 6},
+ {9, 5},
+ {9, 4},
+ {9, 3},
+ {9, 2},
+ {9, 1},
+ {9, 0},
+ {8, 0},
+ {7, 0},
+ {6, 0},
+ {5, 0},
+ {5, 1},
+ {5, 2},
+ {5, 3},
+ {5, 4},
+ {5, 5},
+ {5, 6},
+ {5, 7},
+ {5, 8},
+ {5, 9},
+ {5, 10},
+ {5, 11},
+ {5, 12},
+ {5, 13},
+ {5, 14},
+ {5, 15},
+ {RDE_NEXT_TILE | DIAGDIR_SE, 0}
+};
+static const RoadDriveEntry _roadveh_tram_turn_nw_1[] = {
+ {5, 15},
+ {5, 14},
+ {5, 13},
+ {5, 12},
+ {5, 11},
+ {5, 10},
+ {5, 9},
+ {5, 8},
+ {5, 7},
+ {5, 6},
+ {5, 5},
+ {5, 4},
+ {5, 3},
+ {5, 2},
+ {5, 1},
+ {5, 0},
+ {6, 0},
+ {7, 0},
+ {8, 0},
+ {9, 0},
+ {9, 1},
+ {9, 2},
+ {9, 3},
+ {9, 4},
+ {9, 5},
+ {9, 6},
+ {9, 7},
+ {9, 8},
+ {9, 9},
+ {9, 10},
+ {9, 11},
+ {9, 12},
+ {9, 13},
+ {9, 14},
+ {9, 15},
+ {RDE_NEXT_TILE | DIAGDIR_SE, 0}
+};
+
+static const RoadDriveEntry * const _road_tram_drive_data[] = {
+ _roadveh_drive_data_0,
+ _roadveh_drive_data_1,
+ _roadveh_drive_data_2,
+ _roadveh_drive_data_3,
+ _roadveh_drive_data_4,
+ _roadveh_drive_data_5,
+ _roadveh_tram_turn_ne_0,
+ _roadveh_tram_turn_se_0,
+ _roadveh_drive_data_8,
+ _roadveh_drive_data_9,
+ _roadveh_drive_data_10,
+ _roadveh_drive_data_11,
+ _roadveh_drive_data_12,
+ _roadveh_drive_data_13,
+ _roadveh_tram_turn_sw_0,
+ _roadveh_tram_turn_nw_0,
+ _roadveh_drive_data_16,
+ _roadveh_drive_data_17,
+ _roadveh_drive_data_18,
+ _roadveh_drive_data_19,
+ _roadveh_drive_data_20,
+ _roadveh_drive_data_21,
+ _roadveh_tram_turn_ne_1,
+ _roadveh_tram_turn_se_1,
+ _roadveh_drive_data_24,
+ _roadveh_drive_data_25,
+ _roadveh_drive_data_26,
+ _roadveh_drive_data_27,
+ _roadveh_drive_data_28,
+ _roadveh_drive_data_29,
+ _roadveh_tram_turn_sw_1,
+ _roadveh_tram_turn_nw_1,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+};
+
+static const RoadDriveEntry * const * const _road_drive_data[2] = {
+ _road_road_drive_data,
+ _road_tram_drive_data,
+};
diff --git a/src/table/sprites.h b/src/table/sprites.h
index 83d8e9377..75274205a 100644
--- a/src/table/sprites.h
+++ b/src/table/sprites.h
@@ -150,6 +150,24 @@ enum Sprites {
SPR_GROUP_REPLACE_OFF_SHIP = SPR_GROUP_BASE + 18,
SPR_GROUP_REPLACE_OFF_AIRCRAFT = SPR_GROUP_BASE + 19,
+ /* Tramway sprites */
+ SPR_TRAMWAY_BASE = SPR_GROUP_BASE + 20,
+ SPR_TRAMWAY_OVERLAY = SPR_TRAMWAY_BASE + 4,
+ SPR_TRAMWAY_TRAM = SPR_TRAMWAY_BASE + 27,
+ SPR_TRAMWAY_SLOPED_OFFSET = 11,
+ SPR_TRAMWAY_BUS_STOP_DT_Y_W = SPR_TRAMWAY_BASE + 25,
+ SPR_TRAMWAY_BUS_STOP_DT_Y_E = SPR_TRAMWAY_BASE + 23,
+ SPR_TRAMWAY_BUS_STOP_DT_X_W = SPR_TRAMWAY_BASE + 24,
+ SPR_TRAMWAY_BUS_STOP_DT_X_E = SPR_TRAMWAY_BASE + 26,
+ SPR_TRAMWAY_PAVED_STRAIGHT_Y = SPR_TRAMWAY_BASE + 46,
+ SPR_TRAMWAY_PAVED_STRAIGHT_X = SPR_TRAMWAY_BASE + 47,
+ SPR_TRAMWAY_BACK_WIRES_STRAIGHT = SPR_TRAMWAY_BASE + 55,
+ SPR_TRAMWAY_FRONT_WIRES_STRAIGHT = SPR_TRAMWAY_BASE + 56,
+ SPR_TRAMWAY_BACK_WIRES_SLOPED = SPR_TRAMWAY_BASE + 72,
+ SPR_TRAMWAY_FRONT_WIRES_SLOPED = SPR_TRAMWAY_BASE + 68,
+ SPR_TRAMWAY_TUNNEL_WIRES = SPR_TRAMWAY_BASE + 80,
+ SPR_TRAMWAY_BRIDGE = SPR_TRAMWAY_BASE + 107,
+
/* Manager face sprites */
SPR_GRADIENT = 874, // background gradient behind manager face
@@ -1178,6 +1196,8 @@ enum Sprites {
SPR_IMG_BRIDGE = 2594,
SPR_IMG_ROAD_TUNNEL = 2429,
SPR_IMG_REMOVE = 714,
+ SPR_IMG_TRAMWAY_NW = SPR_TRAMWAY_BASE + 0,
+ SPR_IMG_TRAMWAY_NE = SPR_TRAMWAY_BASE + 1,
/* rail_gui.c */
SPR_IMG_RAIL_NS = 1251,
@@ -1294,6 +1314,8 @@ enum CursorSprite {
/* road cursors */
SPR_CURSOR_ROAD_NESW = 1311,
SPR_CURSOR_ROAD_NWSE = 1312,
+ SPR_CURSOR_TRAMWAY_NESW = SPR_TRAMWAY_BASE + 2,
+ SPR_CURSOR_TRAMWAY_NWSE = SPR_TRAMWAY_BASE + 3,
SPR_CURSOR_ROAD_DEPOT = 1297,
SPR_CURSOR_BUS_STATION = 2725,