Skip to content

Commit

Permalink
Doc: (fix) remove unused spritesets from roadtype example (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
andythenorth committed Oct 19, 2019
1 parent 62cab41 commit e05d02c
Showing 1 changed file with 6 additions and 24 deletions.
30 changes: 6 additions & 24 deletions examples/roadtype_and_tramtype/example_roadtype_and_tramtype.nml
@@ -1,8 +1,8 @@
/*
* This file is aimed to provide an example on how to code a roadtype in NML.
* This file is aimed to provide an example on how to code roadtypes and tramtypes in NML.
* To keep the code readable, not every property or variable is documented in
* detail, refer to the object-specific reference in the documentation.
*
*/

/**********************************************
* Header, containing some general stuff:
Expand Down Expand Up @@ -51,39 +51,26 @@ template tmpl_underlay_corners() {
ground_tile(150, 40)
ground_tile(225, 40)
}

template tmpl_underlay_slope() {
[300, 40, 64, 39, -31, -8]
[375, 40, 64, 23, -31, 0]
[450, 40, 64, 23, -31, 0]
[525, 40, 64, 39, -31, -8]
}

template tmpl_underlay_half_tiles() {
ground_tile( 0, 80)
ground_tile( 75, 80)
ground_tile(150, 80)
ground_tile(225, 80)
}


template tmpl_underlay_roadtypes() {
tmpl_underlay_straight()
tmpl_underlay_junctions()
tmpl_underlay_corners()
tmpl_underlay_slope()
tmpl_underlay_half_tiles()

/* X-crossing */
ground_tile(0, 120)

/* underlay for crossings w/o tracks */
ground_tile( 0, 80)
ground_tile(225, 80)
ground_tile(150, 80)
ground_tile( 75, 80)
ground_tile(300, 80)
}

/* Spriteset containing all underlays */
spriteset(track_underlays, "gfx/roads_underlay.png") {
tmpl_underlay_roadtypes()
Expand Down Expand Up @@ -231,9 +218,10 @@ spriteset(roadstop_underlay_yellow, "gfx/roads_yellow.png") {
* Roadtype definitions:
**********************************************/

/* Note that roadtypes only show in OpenTTD if compatible vehicles are available.
examples/road_vehicle provides some vehicles for these roadtypes */

item(FEAT_ROADTYPES, red_road, 5) {
/* Set only the most essential properties,
* Few compatible roadtypes are defined as there are no other sets out there yet */
property {
name: string(STR_NAME_RED_ROAD);
label: "REDR";
Expand All @@ -260,8 +248,6 @@ item(FEAT_ROADTYPES, red_road, 5) {
}

item(FEAT_ROADTYPES, blue_road, 6) {
/* Set only the most essential properties,
* Few compatible roadtypes are defined as there are no other sets out there yet */
property {
name: string(STR_NAME_BLUE_ROAD);
label: "BLUE";
Expand All @@ -288,8 +274,6 @@ item(FEAT_ROADTYPES, blue_road, 6) {
}

item(FEAT_ROADTYPES, yellow_road, 7) {
/* Set only the most essential properties,
* Few compatible roadtypes are defined as there are no other sets out there yet */
property {
name: string(STR_NAME_YELLOW_ROAD);
label: "YELL";
Expand Down Expand Up @@ -319,8 +303,6 @@ item(FEAT_ROADTYPES, yellow_road, 7) {
**********************************************/

item(FEAT_TRAMTYPES, green_tram, 9) {
/* Set only the most essential properties,
* Few compatible tramtypes are defined as there are no other sets out there yet */
property {
name: string(STR_NAME_GREEN_TRAM);
label: "GRTR";
Expand Down

0 comments on commit e05d02c

Please sign in to comment.