Loading

trolleybi

  1. // Thanks to Andy for letting me steal a chunk of his NRT NML, and thanks to Wolf and Frosch as well for their work on making NRT happen.
  2. // ISR, CHIPS, various New Object sets, have tried to approximate visually interesting industrial yards, harbours, and similar areas where vehicles move about doing work rather than travelling from A to B
  3. // In this set I aim to provide a proof of concept of how NRT might bring these constructions to life
  4.  
  5. grf {
  6.     grfid: "DE\06\01";
  7.     name: string(STR_GRF_NAME);
  8.     desc: string(STR_GRF_DESCRIPTION);
  9.     version: 0;
  10.     min_compatible_version: 0;
  11. }
  12.  
  13.  
  14. // Type Tables
  15. // -----------
  16.  
  17. roadtypetable {
  18.     DIRT, GRAV, EGRV, ROAD, ESTN, ASPT, ELRD, HWAY,
  19.  }
  20.  
  21. // tram is light rail so copy existing railtype labels where appropriate (for ease, no new thinking required)
  22. // as per https://newgrf-specs.tt-wiki.net/wiki/RailtypeLabels
  23. tramtypetable {
  24.     RLOW, ELOW, RAIL, ELRL, MLRL, EMLR,
  25.  }
  26.  
  27.  
  28. // Type Definitions
  29. // ----------------
  30.  
  31. //roadtypes
  32.  
  33. item(FEAT_ROADTYPES, dirt_road, 0) {
  34.     property {
  35.         name: string(STR_NAME_DIRT);
  36.         label: "DIRT";
  37.     speed_limit: 50 km/h;
  38.     introduction_date: date(0000,01,01);
  39.     construction_cost: 4;
  40.     maintenance_cost: 6;
  41.         powered_roadtype_list: ["GRAV", "EGRV", "ROAD", "ESTN", "ASPT", "ELRD", "HWAY"];
  42.         toolbar_caption: string(STR_TOOLBAR_CAPTION_DIRT);
  43.         menu_text: string(STR_MENU_TEXT_DIRT);
  44.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_DIRT);
  45.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_DIRT);
  46.         new_engine_text: string(STR_NEW_ENGINE_TEXT_DIRT);
  47.     }
  48.     graphics {
  49.         underlay: dirt_road_underlay;
  50.         track_overlay: dirt_road_overlay;
  51.         depots: dirt_road_depots;
  52.         bridge_surfaces: dirt_road_bridge_surfaces;
  53.         roadstops: dirt_road_roadstops;
  54.     }
  55. }
  56.  
  57. item(FEAT_ROADTYPES, gravel_road, 1) {
  58.     property {
  59.         name: string(STR_NAME_GRAV);
  60.         label: "GRAV";
  61.     speed_limit: 70 km/h;
  62.     introduction_date: date(1800,01,01);
  63.     construction_cost: 8;
  64.     maintenance_cost: 12;
  65.         powered_roadtype_list: ["DIRT", "EGRV", "ROAD", "ESTN", "ASPT", "ELRD", "HWAY"];
  66.         toolbar_caption: string(STR_TOOLBAR_CAPTION_GRAV);
  67.         menu_text: string(STR_MENU_TEXT_GRAV);
  68.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_GRAV);
  69.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_GRAV);
  70.         new_engine_text: string(STR_NEW_ENGINE_TEXT_GRAV);
  71.     }
  72.     graphics {
  73.         underlay: gravel_road_underlay;
  74.         track_overlay: gravel_road_overlay;
  75.         depots: gravel_road_depots;
  76.         bridge_surfaces: gravel_road_bridge_surfaces;
  77.         roadstops: gravel_road_roadstops;
  78.     }
  79. }
  80.  
  81. item(FEAT_ROADTYPES, electric_gravel_road, 2) {
  82.     property {
  83.         name: string(STR_NAME_EGRV);
  84.         label: "EGRV";
  85.     speed_limit: 70 km/h;
  86.     introduction_date:
  87.     construction_cost: 14;
  88.     maintenance_cost: 18;
  89.         powered_roadtype_list: ["ELRD", "ESTN"];
  90.         toolbar_caption: string(STR_TOOLBAR_CAPTION_EGRV);
  91.         menu_text: string(STR_MENU_TEXT_EGRV);
  92.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_EGRV);
  93.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_EGRV);
  94.         new_engine_text: string(STR_NEW_ENGINE_TEXT_EGRV);
  95.     }
  96.     graphics {
  97.         underlay: gravel_road_underlay;
  98.         track_overlay: gravel_road_overlay;
  99.         depots: gravel_road_depots;
  100.         bridge_surfaces: gravel_road_bridge_surfaces;
  101.         roadstops: gravel_road_roadstops;
  102.     catenary_back: rear_bus_wood;
  103.     catenary_front: front_bus_wood;
  104.     }
  105. }
  106.  
  107. item(FEAT_ROADTYPES, stone_road, 3) {
  108.     property {
  109.         name: string(STR_NAME_ROAD);
  110.         label: "ROAD";
  111.     speed_limit: 80 km/h;
  112.     introduction_date: date(0000,01,01);
  113.     construction_cost: 20;
  114.     maintenance_cost: 24;
  115.         powered_roadtype_list: ["DIRT", "EGRV", "ROAD", "ESTN", "ASPT", "ELRD", "HWAY"];
  116.         toolbar_caption: string(STR_TOOLBAR_CAPTION_ROAD);
  117.         menu_text: string(STR_MENU_TEXT_ROAD);
  118.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_ROAD);
  119.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_ROAD);
  120.         new_engine_text: string(STR_NEW_ENGINE_TEXT_ROAD);
  121.     }
  122.     graphics {
  123.         underlay: stone_road_underlay;
  124.         track_overlay: stone_road_overlay;
  125.         depots: stone_road_depots;
  126.         bridge_surfaces: stone_road_bridge_surfaces;
  127.         roadstops: stone_road_roadstops;
  128.     }
  129. }
  130.  
  131. item(FEAT_ROADTYPES, electric_stone_road, 4) {
  132.     property {
  133.         name: string(STR_NAME_ESTN);
  134.         label: "ESTN";
  135.     speed_limit: 80 km/h;
  136.     construction_cost: 26;
  137.     maintenance_cost: 30;
  138.         powered_roadtype_list: ["ELRD", "EGRV"];
  139.         toolbar_caption: string(STR_TOOLBAR_CAPTION_ESTN);
  140.         menu_text: string(STR_MENU_TEXT_ESTN);
  141.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_ESTN);
  142.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_ESTN);
  143.         new_engine_text: string(STR_NEW_ENGINE_TEXT_ESTN);
  144.     }
  145.     graphics {
  146.         underlay: stone_road_underlay;
  147.         track_overlay: stone_road_overlay;
  148.         depots: stone_road_depots;
  149.         bridge_surfaces: stone_road_bridge_surfaces;
  150.         roadstops: stone_road_roadstops;
  151.     catenary_back: rear_bus_galv;
  152.     catenary_front: front_bus_galv;
  153.     }
  154. }
  155.  
  156. item(FEAT_ROADTYPES, asphalt_road, 5) {
  157.     property {
  158.         name: string(STR_NAME_ASPT);
  159.         label: "ROAD";
  160.     speed_limit: 100 km/h;
  161.     introduction_date: date(1910,01,01);
  162.     construction_cost: 16;
  163.     maintenance_cost: 24;
  164.         powered_roadtype_list: ["DIRT", "GRAV", "EGRV", "ROAD", "ESTN", "ELRD", "HWAY"];
  165.         toolbar_caption: string(STR_TOOLBAR_CAPTION_ASPT);
  166.         menu_text: string(STR_MENU_TEXT_ASPT);
  167.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_ASPT);
  168.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_ASPT);
  169.         new_engine_text: string(STR_NEW_ENGINE_TEXT_ASPT);
  170.     }
  171.     graphics {
  172.         underlay: asphalt_road_underlay;
  173.         track_overlay: asphalt_road_overlay;
  174.         depots: asphalt_road_depots;
  175.         bridge_surfaces: asphalt_road_bridge_surfaces;
  176.         roadstops: asphalt_road_roadstops;
  177.     }
  178. }
  179.  
  180. item(FEAT_ROADTYPES, electric_asphalt_road, 6) {
  181.     property {
  182.         name: string(STR_NAME_ELRD);
  183.         label: "ELRD";
  184.     speed_limit: 100 km/h;
  185.     construction_cost: 24;
  186.     maintenance_cost: 30;
  187.         powered_roadtype_list: ["EGRV", "ESTN"];
  188.         toolbar_caption: string(STR_TOOLBAR_CAPTION_ELRD);
  189.         menu_text: string(STR_MENU_TEXT_ELRD);
  190.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_ELRD);
  191.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_ELRD);
  192.         new_engine_text: string(STR_NEW_ENGINE_TEXT_ELRD);
  193.     }
  194.     graphics {
  195.         underlay: asphalt_road_underlay;
  196.         track_overlay: asphalt_road_overlay;
  197.         depots: asphalt_road_depots;
  198.         bridge_surfaces: asphalt_road_bridge_surfaces;
  199.         roadstops: asphalt_road_roadstops;
  200.     catenary_back: rear_bus_galv;
  201.     catenary_front: front_bus_galv;
  202.     }
  203. }
  204.  
  205. item(FEAT_ROADTYPES, highway_road, 7) {
  206.     property {
  207.         name: string(STR_NAME_HWAY);
  208.         label: "HWAY";
  209.     introduction_date: date(1950,01,01);
  210.     construction_cost: 40;
  211.     maintenance_cost: 40;
  212.         powered_roadtype_list: ["DIRT", "GRAV", "EGRV", "ROAD", "ESTN", "ASPT", "ELRD"];
  213.         toolbar_caption: string(STR_TOOLBAR_CAPTION_HWAY);
  214.         menu_text: string(STR_MENU_TEXT_HWAY);
  215.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_HWAY);
  216.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_HWAY);
  217.         new_engine_text: string(STR_NEW_ENGINE_TEXT_HWAY);
  218.     }
  219.     graphics {
  220.         underlay: highway_road_underlay;
  221.         track_overlay: highway_road_overlay;
  222.         depots: highway_road_depots;
  223.         bridge_surfaces: highway_road_bridge_surfaces;
  224.         roadstops: highway_road_roadstops;
  225.     }
  226. }
  227.  
  228. //tramtypes
  229.  
  230. item(FEAT_TRAMTYPES, rough_tramway, 0) {
  231.     property {
  232.         name: string(STR_NAME_RLOW);
  233.         label: "RLOW";
  234.     construction_cost: 8;
  235.     maintenance_cost: 10;
  236.     speed_limit: 50 km/h;
  237.         powered_tramtype_list: ["ELOW", "RAIL", "ELRL", "MLRL", "EMLR"];
  238.         toolbar_caption: string(STR_TOOLBAR_CAPTION_RLOW);
  239.         menu_text: string(STR_MENU_TEXT_RLOW);
  240.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_RLOW);
  241.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_RLOW);
  242.         new_engine_text: string(STR_NEW_ENGINE_TEXT_RLOW);
  243.     }
  244.     graphics {
  245.         underlay: rough_tram_underlay;
  246.         track_overlay: univ_tram_overlay;
  247.         depots: rough_tram_depots;
  248.         bridge_surfaces: rough_tram_bridge_surfaces;
  249.  
  250.        
  251.     }
  252. }
  253.  
  254.  
  255.  
  256.  
  257. item(FEAT_TRAMTYPES, electric_rough_tramway, 1) {
  258.     property {
  259.         name: string(STR_NAME_ELOW);
  260.         label: "ELOW";
  261.     introduction_date: date(1870,01,01);
  262.     construction_cost: 14;
  263.     maintenance_cost: 16;
  264.     speed_limit: 50 km/h;
  265.         powered_tramtype_list: ["ELRL", "EMLR"];
  266.         toolbar_caption: string(STR_TOOLBAR_CAPTION_ELOW);
  267.         menu_text: string(STR_MENU_TEXT_ELOW);
  268.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_ELOW);
  269.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_ELOW);
  270.         new_engine_text: string(STR_NEW_ENGINE_TEXT_ELOW);
  271.         tramtype_flags: bitmask(TRAMTYPE_FLAG_CATENARY);
  272.     }
  273.     graphics {
  274.         underlay: rough_tram_underlay;
  275.         track_overlay: univ_tram_overlay;
  276.         depots: rough_tram_depots;
  277.         bridge_surfaces: rough_tram_bridge_surfaces;
  278.     catenary_back: rear_tram_wood;
  279.     catenary_front: front_tram_wood;
  280.        
  281.     }
  282. }
  283.  
  284. item(FEAT_TRAMTYPES, basic_tramway, 2) {
  285.     property {
  286.         name: string(STR_NAME_RAIL);
  287.         label: "RAIL";
  288.     speed_limit: 80 km/h;
  289.     introduction_date: date(1880,01,01);
  290.     construction_cost: 14;
  291.     maintenance_cost: 22;
  292.         powered_tramtype_list: ["RLOW", "ELOW", "ELRL", "MLRL", "EMLR"];
  293.         toolbar_caption: string(STR_TOOLBAR_CAPTION_RAIL);
  294.         menu_text: string(STR_MENU_TEXT_RAIL);
  295.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_RAIL);
  296.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_RAIL);
  297.         new_engine_text: string(STR_NEW_ENGINE_TEXT_RAIL);
  298.     }
  299.     graphics {
  300.         underlay: basic_tram_underlay;
  301.         track_overlay: univ_tram_overlay;
  302.         depots: basic_tram_depots;
  303.         bridge_surfaces: basic_tram_bridge_surfaces;
  304.  
  305.        
  306.     }
  307. }
  308.  
  309. item(FEAT_TRAMTYPES, electric_basic_tramway, 3) {
  310.     property {
  311.         name: string(STR_NAME_ELRL);
  312.         label: "ELRL";
  313.     speed_limit: 80 km/h;
  314.     introduction_date: date(1880,01,01);
  315.     construction_cost: 24;
  316.     maintenance_cost: 28;
  317.         powered_tramtype_list: ["ELOW", "EMLR"];
  318.         toolbar_caption: string(STR_TOOLBAR_CAPTION_ELRL);
  319.         menu_text: string(STR_MENU_TEXT_ELRL);
  320.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_ELRL);
  321.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_ELRL);
  322.         new_engine_text: string(STR_NEW_ENGINE_TEXT_ELRL);
  323.         tramtype_flags: bitmask(TRAMTYPE_FLAG_CATENARY);
  324.     }
  325.     graphics {
  326.         underlay: basic_tram_underlay;
  327.         track_overlay: univ_tram_overlay;
  328.         depots: basic_tram_depots;
  329.         bridge_surfaces: basic_tram_bridge_surfaces;
  330.     catenary_back: rear_tram_wood;
  331.     catenary_front: front_tram_wood;
  332.        
  333.     }
  334. }
  335.  
  336. item(FEAT_TRAMTYPES, modern_tramway, 4) {
  337.     property {
  338.         name: string(STR_NAME_MLRL);
  339.         label: "MLRL";
  340.     introduction_date: date(1980,01,01);
  341.     construction_cost: 30;
  342.     maintenance_cost: 28;
  343.         powered_tramtype_list: ["RLOW", "ELOW", "RAIL", "ELRL", "EMLR"];
  344.         toolbar_caption: string(STR_TOOLBAR_CAPTION_MLRL);
  345.         menu_text: string(STR_MENU_TEXT_MLRL);
  346.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_MLRL);
  347.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_MLRL);
  348.         new_engine_text: string(STR_NEW_ENGINE_TEXT_MLRL);
  349.     }
  350.     graphics {
  351.         underlay: modern_tram_underlay;
  352.         track_overlay: univ_tram_overlay;
  353.         depots: modern_tram_depots;
  354.         bridge_surfaces: modern_tram_bridge_surfaces;
  355.  
  356.        
  357.     }
  358. }
  359.  
  360. item(FEAT_TRAMTYPES, electric_modern_tramway, 5) {
  361.     property {
  362.         name: string(STR_NAME_EMLR);
  363.         label: "EMLR";
  364.     introduction_date: date(1980,01,01);
  365.     construction_cost: 30;
  366.     maintenance_cost: 34;
  367.         powered_tramtype_list: ["ELOW", "ELRL"];
  368.         toolbar_caption: string(STR_TOOLBAR_CAPTION_EMLR);
  369.         menu_text: string(STR_MENU_TEXT_EMLR);
  370.         build_window_caption: string(STR_BUILD_WINDOW_CAPTION_EMLR);
  371.         autoreplace_text: string(STR_AUTOREPLACE_TEXT_EMLR);
  372.         new_engine_text: string(STR_NEW_ENGINE_TEXT_EMLR);
  373.         tramtype_flags: bitmask(TRAMTYPE_FLAG_CATENARY);
  374.     }
  375.     graphics {
  376.         underlay: modern_tram_underlay;
  377.         track_overlay: univ_tram_overlay;
  378.         depots: modern_tram_depots;
  379.         bridge_surfaces: modern_tram_bridge_surfaces;
  380.     catenary_back: rear_tram_wood;
  381.     catenary_front: front_tram_wood;
  382.        
  383.     }
  384. }
  385.  
  386.  
  387. // Sprites
  388. // -------
  389.  
  390. /*
  391.  
  392. // Default ground tile template (re-use as needed)
  393. template ground_tile(x, y) { [x, y, 64, 31, -31, 0] }
  394.  
  395. // Template for underlays; 2x straight road, 5x junctions, 4x corners, 4x slope, 4x half-tile road
  396. // Used for bridge surfaces also, therefore the template is split
  397.  
  398. template tmpl_underlay_straight() {
  399.     ground_tile( 10, 10)
  400.     ground_tile( 80, 10)
  401. }
  402. template tmpl_underlay_junctions() {
  403.     ground_tile(150, 10)
  404.     ground_tile(220, 10)
  405.     ground_tile(290, 10)
  406.     ground_tile(360, 10)
  407.     ground_tile( 10, 50)
  408. }
  409. template tmpl_underlay_corners() {
  410.     ground_tile( 80, 50)
  411.     ground_tile(150, 50)
  412.     ground_tile(220, 50)
  413.     ground_tile(290, 50)
  414. }
  415.  
  416. template tmpl_underlay_slope() {
  417.     [150, 170, 64, 39, -31, -8]
  418.     [220, 170, 64, 23, -31, 0]
  419.     [290, 170, 64, 23, -31, 0]
  420.     [360, 170, 64, 39, -31, -8]
  421. }
  422.  
  423. template tmpl_underlay_half_tiles() {
  424.     ground_tile(360, 50)
  425.     ground_tile( 10, 90)
  426.     ground_tile( 80, 90)
  427.     ground_tile(150, 90)
  428. }
  429.  
  430.  
  431. template tmpl_underlay_roadtypes() {
  432.     tmpl_underlay_straight()
  433.     tmpl_underlay_junctions()
  434.     tmpl_underlay_corners()
  435.     tmpl_underlay_slope()
  436.     tmpl_underlay_half_tiles()
  437.  
  438.     /* X-crossing */
  439.     ground_tile(0, 120)
  440.  
  441.     /* underlay for crossings w/o tracks */
  442.     ground_tile(  0, 130)
  443.     ground_tile(225, 130)
  444.     ground_tile(150, 130)
  445.     ground_tile( 75, 130)
  446. }
  447.  
  448. spriteset(dirt_road_underlay, "gfx/road_dirt_over.png") {
  449.     tmpl_underlay_roadtypes()
  450. }
  451.  
  452. spriteset(gravel_road_underlay, "gfx/road_gravel_over.png") {
  453.     tmpl_underlay_roadtypes()
  454. }
  455. spriteset(stone_road_underlay, "gfx/road_stone_over.png") {
  456.     tmpl_underlay_roadtypes()
  457. }
  458.  
  459. spriteset(asphalt_road_underlay, "gfx/road_asphalt_over.png") {
  460.     tmpl_underlay_roadtypes()
  461. }
  462. spriteset(highway_road_underlay, "gfx/road_hway_over.png") {
  463.     tmpl_underlay_roadtypes()
  464. }
  465.  
  466. spriteset(rough_tram_underlay, "gfx/tram_rough_under.png") {
  467.     tmpl_underlay_roadtypes()
  468. }
  469.  
  470. spriteset(basic_tram_underlay, "gfx/tram_basic_under.png") {
  471.     tmpl_underlay_roadtypes()
  472. }
  473.  
  474. spriteset(modern_tram_underlay, "gfx/tram_modern_under.png") {
  475.     tmpl_underlay_roadtypes()
  476. }
  477.  
  478. // overlays
  479. template tmpl_overlay_roadtypes() {
  480.     [ 10, 10, 64, 31, -31, 0]
  481.     [ 80, 10, 64, 31, -31, 0]
  482.  
  483.     [150, 10, 64, 31, -31, 0]
  484.     [220, 10, 64, 31, -31, 0]
  485.     [290, 10, 64, 31, -31, 0]
  486.     [360, 10, 64, 31, -31, 0]
  487.     [ 10, 50, 64, 31, -31, 0]
  488.  
  489.     [ 80, 50, 64, 31, -31, 0]
  490.     [150, 50, 64, 31, -31, 0]
  491.     [220, 50, 64, 31, -31, 0]
  492.     [290, 50, 64, 31, -31, 0]
  493.  
  494.     [150, 170, 64, 39, -31, -8]
  495.     [220, 170, 64, 21, -31, 0]
  496.     [290, 170, 64, 21, -31, 0]
  497.     [360, 170, 64, 39, -31, -8]
  498.  
  499.     [360, 50, 64, 31, -31, 0]
  500.     [ 10, 90, 64, 31, -31, 0]
  501.     [ 80, 90, 64, 31, -31, 0]
  502.     [150, 90, 64, 31, -31, 0]
  503. }
  504.  
  505. spriteset(dirt_road_overlay, "gfx/road_dirt_over.png") {
  506.     tmpl_overlay_roadtypes()
  507. }
  508.  
  509. spriteset(gravel_road_overlay, "gfx/road_gravel_over.png") {
  510.     tmpl_overlay_roadtypes()
  511. }
  512. spriteset(stone_road_overlay, "gfx/road_stone_over.png") {
  513.     tmpl_overlay_roadtypes()
  514. }
  515.  
  516. spriteset(asphalt_road_overlay, "gfx/road_asphalt_over.png") {
  517.     tmpl_overlay_roadtypes()
  518. }
  519. spriteset(highway_road_overlay, "gfx/road_hway_over.png") {
  520.     tmpl_overlay_roadtypes()
  521. }
  522.  
  523. spriteset(rough_tram_overlay, "gfx/tram_rough_over.png") {
  524.     tmpl_overlay_roadtypes()
  525. }
  526.  
  527. spriteset(basic_tram_overlay, "gfx/tram_basic_over.png") {
  528.     tmpl_overlay_roadtypes()
  529. }
  530.  
  531. spriteset(modern_tram_overlay, "gfx/tram_modern_over.png") {
  532.     tmpl_overlay_roadtypes()
  533. }
  534.  
  535.  
  536.  
  537. // Template for depot sprites
  538. template tmpl_depot() {
  539.     [150, 218, 64, 61, -31, -30]
  540.     [220, 218, 64, 61, -1, -45]
  541.     [ 10, 218, 64, 61, -31, -30]
  542.     [ 80, 218, 64, 61, -61, -45]
  543.     [290, 218, 64, 61, -61, -45]
  544.     [360, 218, 64, 61, -1, -45]
  545. }
  546.  
  547.  
  548. spriteset(dirt_road_depots, "gfx/road_dirt_over.png") {
  549.     tmpl_depot()
  550. }
  551.  
  552. spriteset(gravel_road_depots, "gfx/road_gravel_over.png") {
  553.     tmpl_depot()
  554. }
  555. spriteset(stone_road_depots, "gfx/road_stone_over.png") {
  556.     tmpl_depot()
  557. }
  558.  
  559. spriteset(asphalt_road_depots, "gfx/road_asphalt_over.png") {
  560.     tmpl_depot()
  561. }
  562. spriteset(highway_road_depots, "gfx/road_hway_over.png") {
  563.     tmpl_depot()
  564. }
  565.  
  566. spriteset(rough_tram_depots, "gfx/tram_rough_over.png") {
  567.     tmpl_depot()
  568. }
  569.  
  570. spriteset(basic_tram_depots, "gfx/tram_basic_over.png") {
  571.     tmpl_depot()
  572. }
  573.  
  574. spriteset(modern_tram_depots, "gfx/tram_modern_over.png") {
  575.     tmpl_depot()
  576. }
  577.  
  578. // Bridge surface, uses the same sprites as track underlays, but in a different order
  579.  
  580.  
  581. template tmpl_bridge_straight() {
  582.     ground_tile( 10, 288)
  583.     ground_tile( 80, 288)
  584. }
  585. template tmpl_bridge_slope() {
  586.     [150, 288, 64, 39, -31, -8]
  587.     [220, 288, 64, 23, -31, 0]
  588.     [290, 288, 64, 23, -31, 0]
  589.     [360, 288, 64, 39, -31, -8]
  590. }
  591.  
  592. template tmpl_bridge_surfaces() {
  593.     tmpl_bridge_straight()
  594.     tmpl_bridge_slope()
  595.    
  596. }
  597.  
  598.  
  599.  
  600.  
  601. spriteset(dirt_road_bridge_surfaces, "gfx/road_dirt_over.png") {
  602.     tmpl_bridge_surfaces()
  603. }
  604.  
  605. spriteset(gravel_road_bridge_surfaces, "gfx/road_gravel_over.png") {
  606.     tmpl_bridge_surfaces()
  607. }
  608. spriteset(stone_road_bridge_surfaces, "gfx/road_stone_over.png") {
  609.     tmpl_bridge_surfaces()
  610. }
  611.  
  612. spriteset(asphalt_road_bridge_surfaces, "gfx/road_asphalt_over.png") {
  613.     tmpl_bridge_surfaces()
  614. }
  615. spriteset(highway_road_bridge_surfaces, "gfx/road_hway_over.png") {
  616.     tmpl_bridge_surfaces()
  617. }
  618.  
  619. spriteset(rough_tram_bridge_surfaces, "gfx/tram_rough_over.png") {
  620.     tmpl_bridge_surfaces()
  621. }
  622.  
  623. spriteset(basic_tram_bridge_surfaces, "gfx/tram_basic_over.png") {
  624.     tmpl_bridge_surfaces()
  625. }
  626.  
  627. spriteset(modern_tram_bridge_surfaces, "gfx/tram_modern_over.png") {
  628.     tmpl_bridge_surfaces()
  629. }
  630.  
  631. // Roadstop sprites:
  632. template tmpl_underlay_roadstop() {
  633.     ground_tile(220, 90)
  634.     ground_tile(290, 90)
  635.     ground_tile(360, 90)
  636.     ground_tile(10, 130)
  637. }
  638. spriteset(mud_road_roadstops, "gfx/Chips_Mud_Road.png") {
  639.     tmpl_underlay_roadstop()
  640. }
  641.  
  642. spriteset(dirt_road_roadstops, "gfx/road_dirt_over.png") {
  643.     tmpl_underlay_roadstop()
  644. }
  645.  
  646. spriteset(gravel_road_roadstops, "gfx/road_gravel_over.png") {
  647.     tmpl_underlay_roadstop()
  648. }
  649. spriteset(stone_road_roadstops, "gfx/road_stone_over.png") {
  650.     tmpl_underlay_roadstop()
  651. }
  652.  
  653. spriteset(asphalt_road_roadstops, "gfx/road_asphalt_over.png") {
  654.     tmpl_underlay_roadstop()
  655. }
  656. spriteset(highway_road_roadstops, "gfx/road_hway_over.png") {
  657.     tmpl_underlay_roadstop()
  658. }
  659.  
  660. */
  661.  
  662. //Trolley Wires
  663.    
  664. template tmpl_wire_roadtypes() {
  665.     [ 10, 10, 64, 31, -31, 0]
  666.     [ 80, 10, 64, 31, -31, 0]
  667.  
  668.     [150, 10, 64, 31, -31, 0]
  669.     [220, 10, 64, 31, -31, 0]
  670.     [290, 10, 64, 31, -31, 0]
  671.     [360, 10, 64, 31, -31, 0]
  672.     [ 10, 50, 64, 31, -31, 0]
  673.  
  674.     [ 80, 50, 64, 31, -31, 0]
  675.     [150, 50, 64, 31, -31, 0]
  676.     [220, 50, 64, 31, -31, 0]
  677.     [290, 50, 64, 31, -31, 0]
  678.  
  679.     [150, 170, 64, 39, -31, -8]
  680.     [220, 170, 64, 21, -31, 0]
  681.     [290, 170, 64, 21, -31, 0]
  682.     [360, 170, 64, 39, -31, -8]
  683.  
  684.     [360, 50, 64, 31, -31, 0]
  685.     [ 10, 90, 64, 31, -31, 0]
  686.     [ 80, 90, 64, 31, -31, 0]
  687.     [150, 90, 64, 31, -31, 0]
  688. }
  689.  
  690. spriteset(rear_bus_wood, "gfx/wires/rear_wood.png") {
  691.     tmpl_wire_roadtypes()
  692. }
  693.  
  694. spriteset(rear_bus_galv, "gfx/wires/rear_galv.png") {
  695.     tmpl_wire_roadtypes()
  696. }
  697.  
  698. spriteset(rear_bus_cat, "gfx/wires/rear_cat.png") {
  699.     tmpl_wire_roadtypes()
  700. }
  701.  
  702. spriteset(front_bus_wood, "gfx/wires/front_bus_wood.png") {
  703.     tmpl_wire_roadtypes()
  704. }
  705.  
  706. spriteset(front_bus_galv, "gfx/wires/front_bus_galv.png") {
  707.     tmpl_wire_roadtypes()
  708. }
  709.  
  710. spriteset(front_bus_cat, "gfx/wires/front_bus_cat.png") {
  711.     tmpl_wire_roadtypes()
  712. }
  713.  
  714. spriteset(rear_tram_wood, "gfx/wires/rear_wood.png") {
  715.     tmpl_wire_roadtypes()
  716. }
  717.  
  718. spriteset(rear_tram_galv, "gfx/wires/rear_galv.png") {
  719.     tmpl_wire_roadtypes()
  720. }
  721.  
  722. spriteset(rear_tram_cat, "gfx/wires/rear_cat.png") {
  723.     tmpl_wire_roadtypes()
  724. }
  725.  
  726. spriteset(front_tram_wood, "gfx/wires/front_tram_wood.png") {
  727.     tmpl_wire_roadtypes()
  728. }
  729.  
  730. spriteset(front_tram_galv, "gfx/wires/front_tram_galv.png") {
  731.     tmpl_wire_roadtypes()
  732. }
  733.  
  734. spriteset(front_tram_cat, "gfx/wires/front_tram_cat.png") {
  735.     tmpl_wire_roadtypes()
  736. }

Comments