	1 * 1	00 04 04 01 EMPTY_PLATFORM_LOW
		08 "ISRI"

		// Sprite layout
		1A 04
			// 00 (x)
			41
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset

			// 01 (y)
			41
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset

			// 02 (x) purchase
			41
			\dx000003F4 \wx0000 // ground sprite
			\dx8000042D \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset

			// 03 (y) purchase
			41
			\dx000003F3 \wx0000 // ground sprite
			\dx8000042E \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset


		0B 02 // use callback to determine layout

		11 FF // pylon placement (all)


//@@WARNING DISABLE 100

	1 * 1	02 04 15 // ID
		85
		7E BE // get normal/snow/desert offset
		20 \wx7FFF
		\2+
		7E BD // add monorail/maglev offset
		20 \wx00FF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx00FD \w0 \w0
		\wx00FD

//@@WARNING ENABLE 100


	1 * 1	02 04 00 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0015 // real sprites

	// Purchase
	1 * 1	02 04 02 // ID
		81 0C // callback
		00 FF
		01
		\wx8002 14 14 // sprite layout
		\wx00FD // real sprites

	1 * 1	03 04
		01 EMPTY_PLATFORM_LOW
		01
		FF \wx0002
		\wx0000


	1 * 1	00 04 04 01 EMPTY_PLATFORM_HIGH
		08 "ISRI"

		// Sprite layout
		09 02
			// 00 (x)
			\dx000003F4 // ground sprite
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			\dx0000042D // back platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			\dx0000042E // front platform
			80

			// 01 (y)
			\dx000003F3 // ground sprite
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			\dx0000042F // back platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			\dx00000430 // front platform
			80

		0B 02 // use callback to determine layout

		11 FF // pylon placement (all)


	1 * 1	02 04 00 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx00FC // real sprites

	1 * 1	03 04
		01 EMPTY_PLATFORM_HIGH
		00
		\wx0000


	1 * 1	00 04 04 01 ONE_PLATFORM_BACK
		08 "ISRI"

		// Sprite layout
		1A 04
			// 00 (x)
			42
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			\dx8000042D \wx0040 // back platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			04 // value for variable 10

			// 01 (y)
			42
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			\dx8000042F \wx0040 // back platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			04 // value for variable 10

			// 02 (x) purchase
			42
			\dx000003F4 \wx0000 // ground sprite
			\dx8000042D \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			\dx8000042D \wx0040 // back platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			04 // value for variable 10

			// 03 (y) purchase
			42
			\dx000003F3 \wx0000 // ground sprite
			\dx8000042E \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			\dx8000042F \wx0040 // back platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			04 // value for variable 10

		0B 02 // use callback to determine layout

		11 FF // pylon placement (all)


	// Real sprites
	1 * 1	02 04 23 // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FC 04 04 // platform sprites
		\wx00FD // ground overlay sprites

//@@WARNING DISABLE 100

	1 * 1	02 04 15 // ID
		85
		7E BE // get normal/snow/desert offset
		20 \wx7FFF
		\2+
		7E BD // add monorail/maglev offset
		20 \wx00FF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx0023 \w0 \w0
		\wx0023

//@@WARNING ENABLE 100

	1 * 1	02 04 00 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0015 // real sprites

	// Purchase
	1 * 1	02 04 02 // ID
		81 0C // callback
		00 FF
		01
		\wx8002 14 14 // sprite layout
		\wx0023 // real sprites

	1 * 1	03 04
		01 ONE_PLATFORM_BACK
		01
		FF \wx0002 // purchase
		\wx0000


	1 * 1	00 04 04 01 ONE_PLATFORM_FRONT
		08 "ISRI"

		// Sprite layout
		1A 04
			// 00 (x)
			42
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			\dx8000042E \wx0040 // front platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			04 // value for variable 10

			// 01 (y)
			42
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			\dx80000430 \wx0040 // front platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			04 // value for variable 10

			// 02 (x) purchase
			42
			\dx000003F4 \wx0000 // ground sprite
			\dx8000042D \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			\dx8000042E \wx0040 // front platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			04 // value for variable 10

			// 03 (y) purchase
			42
			\dx000003F3 \wx0000 // ground sprite
			\dx8000042E \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			\dx80000430 \wx0040 // front platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			04 // value for variable 10

		0B 02 // use callback to determine layout

		11 FF // pylon placement (all)


	// Real sprites
	1 * 1	02 04 23 // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FC 04 04 // platform sprites
		\wx00FD // ground overlay sprites

//@@WARNING DISABLE 100

	1 * 1	02 04 15 // ID
		85
		7E BE // get normal/snow/desert offset
		20 \wx7FFF
		\2+
		7E BD // add monorail/maglev offset
		20 \wx00FF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx0023 \w0 \w0
		\wx0023

//@@WARNING ENABLE 100

	1 * 1	02 04 00 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0015 // real sprites

	// Purchase
	1 * 1	02 04 02 // ID
		81 0C // callback
		00 FF
		01
		\wx8002 14 14 // sprite layout
		\wx0023 // real sprites

	1 * 1	03 04
		01 ONE_PLATFORM_FRONT
		01
		FF \wx0002 // purchase
		\wx0000


	1 * 1	00 04 05 01 RAMP_NORTH
		08 "ISRI"

		// Sprite layout
		1A 04
			// 00 (x)
			43
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042E \wx0000 // platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			\dx8000042E \wx0000 // platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent

			// 01 (y)
			43
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80000430 \wx0000 // platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			\dx80000430 \wx0000 // platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent

			// 02 (x) purchase
			43
			\dx000003F4 \wx0000 // ground sprite
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042E \wx0000 // platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			\dx8000042E \wx0000 // platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent

			// 03 (y) purchase
			43
			\dx000003F3 \wx0000 // ground sprite
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80000430 \wx0000 // platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			\dx80000430 \wx0000 // platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent


		0B 02 // use callback to determine layout

		0D FE // only allow a length of 1

		11 FF // pylon placement (all)


	// Test variable 10 for real sprites
	1 * 1	02 04 1B // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FD 04 04 // ground overlay sprites
		\wx00F7 // ramp sprites

//@@WARNING DISABLE 100

	1 * 1	02 04 15 // ID
		85
		7E BE // get normal/snow/desert offset
		20 \wx7FFF
		\2+
		7E BD // add monorail/maglev offset
		20 \wx00FF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

//@@WARNING ENABLE 100

	1 * 1	02 04 04 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0015 // real sprites

	// Purchase
	1 * 1	02 04 05 // ID
		81 0C // callback
		00 FF
		01
		\wx8002 14 14 // sprite layout
		\wx001B // real sprites

	1 * 1	03 04
		01 RAMP_NORTH
		01
		FF \wx0005
		\wx0004


	1 * 1	00 04 05 01 RAMP_SOUTH
		08 "ISRI"

		// Sprite layout
		1A 04
			// 00 (x)
			43
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0000 // platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			\dx8000042D \wx0000 // platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent

			// 01 (y)
			43
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042F \wx0000 // platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			\dx8000042F \wx0000 // platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent

			// 02 (x) purchase
			43
			\dx000003F4 \wx0000 // ground sprite
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0000 // platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			\dx8000042D \wx0000 // platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent

			// 03 (y) purchase
			43
			\dx000003F3 \wx0000 // ground sprite
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042F \wx0000 // platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			\dx8000042F \wx0000 // platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent

		0B 02 // use callback to determine layout

		0D FE // only allow a length of 1

		11 FF // pylon placement (all)


	// Test variable 10 for real sprites
	1 * 1	02 04 1B // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FD 04 04 // ground overlay sprites
		\wx00F7 // else

//@@WARNING DISABLE 100

	1 * 1	02 04 15 // ID
		85
		7E BE // get normal/snow/desert offset
		20 \wx7FFF
		\2+
		7E BD // add monorail/maglev offset
		20 \wx00FF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

//@@WARNING ENABLE 100

	1 * 1	02 04 04 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0015 // real sprites

	// Purchase
	1 * 1	02 04 05 // ID
		81 0C // callback
		00 FF
		01
		\wx8002 14 14 // sprite layout
		\wx001B // real sprites

	1 * 1	03 04
		01 RAMP_SOUTH
		01
		FF \wx0005
		\wx0004


	1 * 1	00 04 05 01 ONE_RAMP_NORTH
		08 "ISRI"

		// Sprite layout
		1A 04
			// 00 (x)
			45
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042E \wx0001 // back ramp
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			02 // register
			\dx8000042D \wx0041 // back platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			04 // register
			05 // value for variable 10
			\dx8000042E \wx0001 // front ramp
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			03 // register
			\dx8000042E \wx0041 // front platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			05 // register
			05 // value for variable 10

			// 01 (y)
			45
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80000430 \wx0001 // back ramp
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			02 // register
			\dx8000042F \wx0041 // back platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			04 // register
			05 // value for variable 10
			\dx80000430 \wx0001 // front ramp
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			03 // register
			\dx80000430 \wx0041 // front platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			05 // register
			05 // value for variable 10

			// 02 (x) purchase
			42
			\dx000003F4 \wx0000 // ground sprite
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042E \wx0000 // back ramp
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent

			// 03 (y) purchase
			42
			\dx000003F3 \wx0000 // ground sprite
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80000430 \wx0000 // back ramp
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent

		0B 02 // use callback to determine layout

		0D FE // only allow a length of 1

		11 FF // pylon placement (all)


	// Real sprites
	1 * 1	02 04 1B // ID
		81 10 // additional information for sprite selection
		00 0F
		02
		\wx00FD 04 04 // ground overlay sprites
		\wx00FC 05 05 // platform sprites
		\wx00F7 // ramp sprites

// Ramp/platform show/hide bits
//   bit 0 - back ramp
//   bit 1 - front ramp
//   bit 2 - back platform
//   bit 3 - front platform

	// When there is no single sided platform to south, this ramp is a transition between a
	// normal high platform (to south) and a single sided platform (to north).
	// If tile to north has a single sided platform, show a platform on that side and a ramp on the other side
	1 * 1	02 04 18 // ID
		85 68 0F // station info: check tile along platform to N
		00 \wx0FFF // mask 12 bits for tile ID, type and direction
		02
		\wx8006 ONE_PLATFORM_BACK 05 ONE_PLATFORM_BACK 05 // back platform to N, show back platform (0110)
		\wx8009 ONE_PLATFORM_FRONT 05 ONE_PLATFORM_FRONT 05 // front platform to N, show front platform (1001)
		\wx8003 // show both ramps (0011)

	// If tile to south has a single sided platform, only show a ramp on that side only
	1 * 1	02 04 17 // ID
		85 68 01 // station info: check tile along platform to S
		00 \wx0FFF // mask 12 bits for tile ID, type and direction
		02
		\wx8001 ONE_PLATFORM_BACK 05 ONE_PLATFORM_BACK 05 // back platform to S, hide front ramp (0001)
		\wx8002 ONE_PLATFORM_FRONT 05 ONE_PLATFORM_FRONT 05 // front platform to S, hide back ramp (0010)
		\wx0018

//@@WARNING DISABLE 100

	1 * 1	02 04 15 // ID
		85
		7E 17 // get show/hide bits
		20 \wx000F
		\2sto 1A
		20 \wx0020 // store in register
		\2rst
		7D 20 // read register for show/hide bits
		20 \wx0001 // shift and mask for bit 0
		\2sto 1A
		20 \wx0002 // store in register - back ramp show/hide
		\2rst
		7D 20 // read register for show/hide bits
		21 \wx0001 // shift and mask for bit 1
		\2sto 1A
		20 \wx0003 // store in register - front ramp show/hide
		\2rst
		7D 20 // read register for show/hide bits
		22 \wx0001 // shift and mask for bit 2
		\2sto 1A
		20 \wx0004 // store in register - back platform show/hide
		\2rst
		7D 20 // read register for show/hide bits
		23 \wx0001 // shift and mask for bit 3
		\2sto 1A
		20 \wx0005 // store in register - front platform show/hide
		\2rst
		7E BE // get normal/snow/desert offset
		20 \wx7FFF
		\2+
		7E BD // add monorail/maglev offset
		20 \wx00FF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

//@@WARNING ENABLE 100

	1 * 1	02 04 04 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0015 // real sprites

	// Purchase
	1 * 1	02 04 05 // ID
		81 0C // callback
		00 FF
		01
		\wx8002 14 14 // sprite layout
		\wx001B // real sprites

	1 * 1	03 04
		01 ONE_RAMP_NORTH
		01
		FF \wx0005 // purchase
		\wx0004


	1 * 1	00 04 05 01 ONE_RAMP_SOUTH
		08 "ISRI"

		// Sprite layout
		1A 04
			// 00 (x)
			45
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0001 // back ramp
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			02 // register
			\dx8000042D \wx0041 // back platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			04 // register
			05 // value for variable 10
			\dx8000042D \wx0001 // front ramp
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			03 // register
			\dx8000042E \wx0041 // front platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			05 // register
			05 // value for variable 10

			// 01 (y)
			45
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042F \wx0001 // back ramp
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			02 // register
			\dx8000042F \wx0041 // back platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			04 // register
			05 // value for variable 10
			\dx8000042F \wx0001 // front ramp
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			03 // register
			\dx80000430 \wx0041 // front platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			05 // register
			05 // value for variable 10

			// 02 (x) purchase
			42
			\dx000003F4 \wx0000 // ground sprite
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0000 // back ramp
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent

			// 03 (y) purchase
			42
			\dx000003F3 \wx0000 // ground sprite
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042F \wx0000 // back ramp
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent

		0B 02 // use callback to determine layout

		0D FE // only allow a length of 1

		11 FF // pylon placement (all)


	// Real sprites
	1 * 1	02 04 1B // ID
		81 10 // additional information for sprite selection
		00 0F
		02
		\wx00FD 04 04 // ground overlay sprites
		\wx00FC 05 05 // platform sprites
		\wx00F7 // ramp sprites

	// When there is no single sided platform to north, this ramp is a transition between a
	// normal high platform (to north) and a single sided platform (to south).
	// If tile to south has a single sided platform, show a platform on that side and a ramp on the other side
	1 * 1	02 04 18 // ID
		85 68 01 // station info: check tile along platform to S
		00 \wx0FFF // mask 12 bits for tile ID, type and direction
		02
		\wx8006 ONE_PLATFORM_BACK 05 ONE_PLATFORM_BACK 05 // back platform to S, show back platform (0110)
		\wx8009 ONE_PLATFORM_FRONT 05 ONE_PLATFORM_FRONT 05 // front platform to S, show front platform (1001)
		\wx8003 // show both ramps (0011)

	// If tile to north has a single sided platform, only show a ramp on that side only
	1 * 1	02 04 17 // ID
		85 68 0F // station info: check tile along platform to N
		00 \wx0FFF // mask 12 bits for tile ID, type and direction
		02
		\wx8001 ONE_PLATFORM_BACK 05 ONE_PLATFORM_BACK 05 // back platform to N, hide front ramp (0001)
		\wx8002 ONE_PLATFORM_FRONT 05 ONE_PLATFORM_FRONT 05 // front platform to N, hide back ramp (0010)
		\wx0018

//@@WARNING DISABLE 100

	1 * 1	02 04 15 // ID
		85
		7E 17 // get show/hide bits
		20 \wx000F
		\2sto 1A
		20 \wx0020 // store in register
		\2rst
		7D 20 // read register for show/hide bits
		20 \wx0001 // shift and mask for bit 0
		\2sto 1A
		20 \wx0002 // store in register - back ramp show/hide
		\2rst
		7D 20 // read register for show/hide bits
		21 \wx0001 // shift and mask for bit 1
		\2sto 1A
		20 \wx0003 // store in register - front ramp show/hide
		\2rst
		7D 20 // read register for show/hide bits
		22 \wx0001 // shift and mask for bit 2
		\2sto 1A
		20 \wx0004 // store in register - back platform show/hide
		\2rst
		7D 20 // read register for show/hide bits
		23 \wx0001 // shift and mask for bit 3
		\2sto 1A
		20 \wx0005 // store in register - front platform show/hide
		\2rst
		7E BE // get normal/snow/desert offset
		20 \wx7FFF
		\2+
		7E BD // add monorail/maglev offset
		20 \wx00FF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

//@@WARNING ENABLE 100

	1 * 1	02 04 04 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0015 // real sprites

	// Purchase
	1 * 1	02 04 05 // ID
		81 0C // callback
		00 FF
		01
		\wx8002 14 14 // sprite layout
		\wx001B // real sprites

	1 * 1	03 04
		01 ONE_RAMP_SOUTH
		01
		FF \wx0005 // purchase
		\wx0004


	1 * 1	00 04 07 01 RAMP_NORTH_NT
		08 "ISRI"

		// Sprite layout
		1A 02
			// 00 (x)
			42
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0000 // ramp
			00 00 00 // x/y/z offset
			10 10 03 // x/y/z extent

			// 01 (y)
			42
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042E \wx0000 // ramp
			00 00 00 // x/y/z offset
			10 10 03 // x/y/z extent


		0B 02 // use callback to determine layout

		0D FE // only allow a length of 1

		11 00 // no pylons
		14 FF // no wires

		15 FF // prevent trains entering the tile from any direction


	1 * 1	01 04 01 02
	1 images/newfixtures2.pcx   18  112  01  28  56 -31   3 // 042D x, ramp non-track N
	1 images/newfixtures2.pcx   80  112  01  28  56 -23   3 // 042E y, ramp non-track N

	1 * 1	02 04 00 // ID
		00 01
		\w0

	// Test variable 10 for real sprites
	1 * 1	02 04 1B // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FF 04 04 // ground overlay sprites
		\wx0000 // ramp sprites

//@@WARNING DISABLE 100
//@@WARNING DISABLE 170

	1 * 1	02 04 15 // ID
		85
		7E BF // get normal/snow/desert offset
		20 \wx7FFF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

	// Purchase
	1 * 1	02 04 16 // ID
		85
		1A // all bits on
		20 \w0 // val = 0
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

//@@WARNING ENABLE 170
//@@WARNING ENABLE 100

	1 * 1	02 04 01 // ID
		81 0C // check callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0015 // real sprites

	// For purchase list
	1 * 1	02 04 02 // ID
		81 0C // check callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0016 // real sprites

	1 * 1	03 04
		01 RAMP_NORTH_NT
		01
		FF \wx0002 // purchase
		\wx0001


	1 * 1	00 04 07 01 RAMP_SOUTH_NT
		08 "ISRI"

		0A RAMP_NORTH_NT // copy sprite layout

		0B 02 // use callback to determine layout

		0D FE // only allow a length of 1

		11 00 // no pylons
		14 FF // no wires

		15 FF // prevent trains entering the tile from any direction


	1 * 1	01 04 01 02
	1 images/newfixtures2.pcx  142  112  01  32  57 -24  -3 // 042D x, ramp non-track S
	1 images/newfixtures2.pcx  205  112  01  32  58 -31  -3 // 042E y, ramp non-track S

	1 * 1	02 04 00 // ID
		00 01
		\w0


	// Test variable 10 for real sprites
	1 * 1	02 04 1B // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FF 04 04 // ground overlay sprites
		\wx0000 // ramp sprites

//@@WARNING DISABLE 100
//@@WARNING DISABLE 170

	1 * 1	02 04 15 // ID
		85
		7E BF // get normal/snow/desert offset
		20 \wx7FFF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

	// Purchase
	1 * 1	02 04 16 // ID
		85
		1A // all bits on
		20 \w0 // val = 0
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

//@@WARNING ENABLE 170
//@@WARNING ENABLE 100

	1 * 1	02 04 01 // ID
		81 0C // check callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0015 // real sprites

	// For purchase list
	1 * 1	02 04 02 // ID
		81 0C // check callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0016 // real sprites

	1 * 1	03 04
		01 RAMP_SOUTH_NT
		01
		FF \wx0002 // purchase
		\wx0001


	1 * 1	00 04 07 01 BUFFER_LOW
		08 "ISRI"

		// Sprite layout
		1A 08
			// 00 (x) north
			42
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0000 // buffer
			00 05 00 // x/y/z offset
			08 06 04 // x/y/z extent

			// 01 (y) north
			42
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042E \wx0000 // buffer
			05 00 00 // x/y/z offset
			06 08 04 // x/y/z extent

			// 02 (x) south
			42
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042F \wx0000 // buffer
			08 05 00 // x/y/z offset
			08 06 04 // x/y/z extent

			// 03 (y) south
			42
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80000430 \wx0000 // buffer
			05 08 00 // x/y/z offset
			06 08 04 // x/y/z extent

			// 04 (x) double
			42
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80000431 \wx0000 // buffer
			00 05 00 // x/y/z offset
			10 06 04 // x/y/z extent

			// 05 (y) double
			42
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80000432 \wx0000 // buffer
			05 00 00 // x/y/z offset
			06 10 04 // x/y/z extent

			// 06 (x) purchase (north)
			42
			\dx000003F4 \wx0000 // ground sprite
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0000 // buffer
			00 05 00 // x/y/z offset
			08 06 04 // x/y/z extent

			// 07 (y) purchase (north)
			42
			\dx000003F3 \wx0000 // ground sprite
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042E \wx0000 // buffer
			05 00 00 // x/y/z offset
			06 08 04 // x/y/z extent


		0B 02 // use callback to determine layout

		0D FE // only allow a length of 1

		// Wire and pylon placement
		11 00 // no pylons
		14 FF // no wires

		15 FF // prevent trains entering the tile from any direction


	// Test variable 10 for real sprites
	1 * 1	02 04 1B // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FD 04 04 // ground overlay sprites
		\wx00F4 // else

//@@WARNING DISABLE 100

	1 * 1	02 04 15 // ID
		85
		7E BE // get normal/snow/desert offset
		20 \wx7FFF
		\2+
		7E BD // add monorail/maglev offset
		20 \wx00FF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

//@@WARNING ENABLE 100

	1 * 1	02 04 06 // ID
		81 45 // rail continuation info
		00 01 // get bit 0 - south
		01
		\wx8004 01 01 // connecting rail to S - double buffer
		\wx8002 // else - south buffer

	1 * 1	02 04 07 // ID
		81 45 // rail continuation info
		01 01 // get bit 1 - north
		01
		\wx0006 01 01 // connecting rail to N
		\wx8000 // else - north buffer

	1 * 1	02 04 04 // ID
		81 0C // callback
		00 FF
		01
		\wx0007 14 14 // sprite layout
		\wx0015 // real sprites

	// For purchase list
	1 * 1	02 04 05 // ID
		81 0C //callback
		00 FF
		01
		\wx8006 14 14 // sprite layout
		\wx001B // real sprites

	1 * 1	03 04
		01 BUFFER_LOW
		01
		FF \wx0005
		\wx0004


	1 * 1	00 04 07 01 BUFFER_HIGH
		08 "ISRI"

		// Sprite layout
		09 02
			// 00 (x)
			\dx000003F4 // ground sprite
			00 00 00 // x/y/z offset
			10 10 03 // x/y/z extent
			\dx0000042D // buffer
			80

			// 01 (y)
			\dx000003F3 // ground sprite
			00 00 00 // x/y/z offset
			10 10 03 // x/y/z extent
			\dx0000042E // buffer
			80

		0B 02 // use callback to determine layout

		0D FE // only allow a length of 1

		// Wire and pylon placement
		11 00 // no pylons
		14 FF // no wires

		15 FF // prevent trains entering the tile from any direction

	// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
	1 * 1	01 04 03 02
	1 images/newfixtures2.pcx    18   72  01   34  64  -31  -3 // x N
	1 images/newfixtures2.pcx    90   73  01   34  64  -31  -3 // y N

	1 images/newfixtures2.pcx   161   73  01   34  64  -31  -3 // x S
	1 images/newfixtures2.pcx   230   73  01   34  64  -31  -3 // y S

	1 images/newfixtures2.pcx   300   73  01   34  64  -31  -3 // x double
	1 images/newfixtures2.pcx   371   73  01   34  64  -31  -3 // y double

	1 * 1	02 04 00 // ID
		00 01
		\w0

	1 * 1	02 04 01 // ID
		00 01
		\w1

	1 * 1	02 04 02 // ID
		00 01
		\w2

	1 * 1	02 04 06 // ID
		81 45 // rail continuation info
		00 01 // get bit number 0 south
		01
		\wx0002 01 01 // connecting rail to S - double buffer
		\wx0001 // south buffer

	1 * 1	02 04 07 // ID
		81 45 // rail continuation info
		01 01 // get bit number 1 north
		01
		\wx0006 01 01 // connecting rail to N
		\wx0000 // north buffer

	1 * 1	02 04 04 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0007 // real sprites

	// Purchase list
	1 * 1	02 04 05 // ID
		81 0C //callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0000 // real sprites

	1 * 1	03 04
		01 BUFFER_HIGH
		01
		FF \wx0005
		\wx0004


	1 * 1	00 04 06 01 EMPTY_TILE_LOW
		08 "ISRI"

		// Sprite layout
		1A 02
			// 00 (x)
			41
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset

			// 01 (y)
			41
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset


		0B 02 // use callback to determine layout

		// Wire and pylon placement
		11 00 // no pylons
		14 FF // no wires

		15 FF // prevent trains entering the tile from any direction


//@@WARNING DISABLE 100

	1 * 1	02 04 01 // ID
		85
		7E BF // get normal/snow/desert offset
		20 \wx7FFF
		\2sto 1A
		00 \wx0010 // store in register
		01
		\wx00FF \w0 \w0
		\wx00FF

//@@WARNING ENABLE 100

	1 * 1	02 04 00 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0001 // real sprites

	1 * 1	03 04
		01 EMPTY_TILE_LOW
		00
		\wx0000


	1 * 1	00 04 06 01 FENCE_TILE_LOW
		08 "ISRI"

		// Sprite layout
		1A 02
			// 00 (x)
			45
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			\dx8000842D \wx0041 // fence NW
			00 00 00 // x/y/z offset
			10 01 08 // x/y/z extent
			01 // register
			05 // value for variable 10
			\dx8000842E \wx0041 // fence NE
			00 00 00 // x/y/z offset
			01 10 08 // x/y/z extent
			02 // register
			05 // value for variable 10
			\dx8000842F \wx0041 // fence SE
			00 0F 00 // x/y/z offset
			10 01 08 // x/y/z extent
			03 // register
			05 // value for variable 10
			\dx80008430 \wx0041 // fence SW
			0F 00 00 // x/y/z offset
			01 10 08 // x/y/z extent
			04 // register
			05 // value for variable 10

			// 01 (y)
			45
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0000 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			\dx8000842D \wx0041 // fence NW
			00 00 00 // x/y/z offset
			10 01 08 // x/y/z extent
			02 // register
			05 // value for variable 10
			\dx8000842E \wx0041 // fence NE
			00 00 00 // x/y/z offset
			01 10 08 // x/y/z extent
			01 // register
			05 // value for variable 10
			\dx8000842F \wx0041 // fence SE
			00 0F 00 // x/y/z offset
			10 01 08 // x/y/z extent
			04 // register
			05 // value for variable 10
			\dx80008430 \wx0041 // fence SW
			0F 00 00 // x/y/z offset
			01 10 08 // x/y/z extent
			03 // register
			05 // value for variable 10

		0B 02 // use callback to determine layout

		11 00 // no pylons
		14 FF // no wires

		15 FF // prevent trains entering the tile from any direction


	// Test variable 10 for real sprites
	1 * 1	02 04 1B // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00D2 05 05 // fence
		\wx00FF // ground overlay sprites

//@@WARNING DISABLE 100
//@@WARNING DISABLE 170

	1 * 1	02 04 15 // ID
		85 
		7E B7 // get fence to NW
		20 \wx7FFF
		\2sto 1A
		20 \wx0001 // store in register
		\2rst
		7E B6 // get fence to NE
		20 \wx7FFF
		\2sto 1A
		20 \wx0002 // store in register
		\2rst
		7E B5 // get fence to SE
		20 \wx7FFF
		\2sto 1A
		20 \wx0003 // store in register
		\2rst
		7E B4 // get fence to SW
		20 \wx7FFF
		\2sto 1A
		20 \wx0004 // store in register
		\2rst
		7E BF // get normal/snow/desert offset
		20 \wx7FFF
		\2sto 1A
		00 \wx0010 // store in register
		01
		\wx001B \w0 \w0
		\wx001B

	// Purchase
	1 * 1	02 04 16 // ID
		85 
		1A // all bits on
		20 \wx0001 // val = 1
		\2sto 1A
		20 \wx0001 // store in register - fence to NW
		\2sto 1A
		20 \wx0002 // store in register - fence to NE
		\2rst
		1A // all bits on
		20 \wx0000 // val = 0
		\2sto 1A
		20 \wx0003 // store in register - fence to SE
		\2sto 1A
		20 \wx0004 // store in register - fence to SW
		\2sto 1A
		00 \wx0010 // store in register - normal/snow/desert offset
		01
		\wx001B \w0 \w0
		\wx001B

//@@WARNING ENABLE 100
//@@WARNING ENABLE 170

	1 * 1	02 04 01 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0015 // real sprites

	// For purchase list
	1 * 1	02 04 02 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0016 // real sprites

	1 * 1	03 04
		01 FENCE_TILE_LOW
		01
		FF \wx0002 // purchase
		\wx0001


	1 * 1	00 04 06 01 EMPTY_TILE_HIGH
		08 "ISRI"

		// Sprite layout
		09 02
			// 00 (x)
			\dx000003F4 // ground sprite
			00 00 00 // x/y/z offset
			10 10 03 // x/y/z extent
			\dx0000042D
			80

			// 01 (y)
			\dx000003F3 // ground sprite
			00 00 00 // x/y/z offset
			10 10 03 // x/y/z extent
			\dx0000042D
			80

		0B 02 // use callback to determine layout

		// Wire and pylon placement
		11 00 // no pylons
		14 FF // no wires

		15 FF // prevent trains entering the tile from any direction

	1 * 1	02 04 00 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx00FE // real sprites

	1 * 1	03 04
		01 EMPTY_TILE_HIGH
		00
		\wx0000
