	1 * 1	00 04 06 01 MINERAL_PLATFORM
		08 "ISRR"

		// 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
			\dx8000842D \wx0006 // back mineral pile
			00 00 00 // x/y/z offset
			10 05 0A // x/y/z extent
			05 12 // register
			\dx8000842D \wx0006 // front mineral pile
			00 0B 00 // x/y/z offset
			10 05 0A // x/y/z extent
			06 12 // register

			// 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
			\dx8000842F \wx0006 // back mineral pile
			00 00 00 // x/y/z offset
			05 10 0A // x/y/z extent
			05 12 // register
			\dx8000842F \wx0006 // front mineral pile
			0B 00 00 // x/y/z offset
			05 10 0A // x/y/z extent
			06 12 // register

			// 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
			\dx8000842D \wx0004 // back mineral pile
			00 00 00 // x/y/z offset
			10 05 0A // x/y/z extent
			12 // register
			\dx8000842E \wx0004 // front mineral pile
			00 0B 00 // x/y/z offset
			10 05 0A // x/y/z extent
			12 // register

			// 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
			\dx8000842F \wx0004 // back mineral pile
			00 00 00 // x/y/z offset
			05 10 0A // x/y/z extent
			12 // register
			\dx80008430 \wx0004 // front mineral pile
			0B 00 00 // x/y/z offset
			05 10 0A // x/y/z extent
			12 // register

		0B 02 // use callback to determine layout

		10 \w400 // little/lots threshold

		11 FF // Pylon placement (all)

		12 \dx03C04102 // cargo types for randomisation triggers


	// 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
		\wx00E6 // mineral pile sprites

	// Test variable 10 for real sprites - empty
	1 * 1	02 04 1C // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FD 04 04 // ground overlay sprites
		\wx00E5 // mineral pile sprites - empty

// Random offset for mineral pile variety - back
	1 * 1	02 04 25 // ID
		80
		00 // no more cargo (triggered by random in graphics chain)
		10 // use bit 16
		02
		\wx8000
		\wx8001

// Random offset for mineral pile variety - front
	1 * 1	02 04 26 // ID
		80
		00 // no more cargo (triggered by random in graphics chain)
		11 // use bit 17
		02
		\wx8000
		\wx8001


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

	1 * 1	02 04 10 // ID
		85
		7F 10 // read parameter for recolour sprite base
		20 \wx7FFF
		\2+
		1A // all bits on
		20 \w6 // add offset of recolour sprite for coal
		\2sto 1A
		20 \wx0012 // store in register - recolour offset
		\2rst
		7E 25 // get random variety offset - back
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - mineral pile sprite offset
		\2rst
		7E 26 // get random variety offset - front
		20 \wx7FFF
		\2sto 1A
		20 \wx0006 // store in register - mineral pile sprite offset
		\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

	1 * 1	02 04 11 // ID
		85
		1A // all bits on
		20 \wx0000 // no recolour needed for iron ore
		\2sto 1A
		20 \wx0012 // store in register - recolour offset
		\2rst
		7E 25 // get random variety offset - back
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - mineral pile sprite offset
		\2rst
		7E 26 // get random variety offset - front
		20 \wx7FFF
		\2sto 1A
		20 \wx0006 // store in register - mineral pile sprite offset
		\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

	1 * 1	02 04 12 // ID
		85
		7F 10 // read parameter for recolour sprite base
		20 \wx7FFF
		\2+
		1A // all bits on
		20 \w7 // add offset of recolour sprite for copper ore
		\2sto 1A
		20 \wx0012 // store in register - recolour offset
		\2rst
		7E 25 // get random variety offset - back
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - mineral pile sprite offset
		\2rst
		7E 26 // get random variety offset - front
		20 \wx7FFF
		\2sto 1A
		20 \wx0006 // store in register - mineral pile sprite offset
		\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

	1 * 1	02 04 13 // ID
		85
		7F 10 // read parameter for recolour sprite base
		20 \wx7FFF
		\2+
		1A // all bits on
		20 \w8 // add offset of recolour sprite for clay
		\2sto 1A
		20 \wx0012 // store in register - recolour offset
		\2rst
		7E 25 // get random variety offset - back
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - mineral pile sprite offset
		\2rst
		7E 26 // get random variety offset - front
		20 \wx7FFF
		\2sto 1A
		20 \wx0006 // store in register - mineral pile sprite offset
		\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

	1 * 1	02 04 14 // ID
		85
		7F 10 // read parameter for recolour sprite base
		20 \wx7FFF
		\2+
		1A // all bits on
		20 \w9 // add offset of recolour sprite for gravel
		\2sto 1A
		20 \wx0012 // store in register - recolour offset
		\2rst
		7E 25 // get random variety offset - back
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - mineral pile sprite offset
		\2rst
		7E 26 // get random variety offset - front
		20 \wx7FFF
		\2sto 1A
		20 \wx0006 // store in register - mineral pile sprite offset
		\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

	1 * 1	02 04 15 // ID
		85
		7F 10 // read parameter for recolour sprite base
		20 \wx7FFF
		\2+
		1A // all bits on
		20 \w10 // add offset of recolour sprite for limestone
		\2sto 1A
		20 \wx0012 // store in register - recolour offset
		\2rst
		7E 25 // get random variety offset - back
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - mineral pile sprite offset
		\2rst
		7E 26 // get random variety offset - front
		20 \wx7FFF
		\2sto 1A
		20 \wx0006 // store in register - mineral pile sprite offset
		\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

	1 * 1	02 04 16 // ID
		85
		7F 10 // read parameter for recolour sprite base
		20 \wx7FFF
		\2+
		1A // all bits on
		20 \w11 // add offset of recolour sprite for sand
		\2sto 1A
		20 \wx0012 // store in register - recolour offset
		\2rst
		7E 25 // get random variety offset - back
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - mineral pile sprite offset
		\2rst
		7E 26 // get random variety offset - front
		20 \wx7FFF
		\2sto 1A
		20 \wx0006 // store in register - mineral pile sprite offset
		\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

	1 * 1	02 04 17 // ID
		85
		7F 10 // read parameter for recolour sprite base
		20 \wx7FFF
		\2+
		1A // all bits on
		20 \w12 // add offset of recolour sprite for bauxite
		\2sto 1A
		20 \wx0012 // store in register - recolour offset
		\2rst
		7E 25 // get random variety offset - back
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - mineral pile sprite offset
		\2rst
		7E 26 // get random variety offset - front
		20 \wx7FFF
		\2sto 1A
		20 \wx0006 // store in register - mineral pile sprite offset
		\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

	1 * 1	02 04 18 // ID
		85
		7F 10 // read parameter for recolour sprite base
		20 \wx7FFF
		\2+
		1A // all bits on
		20 \w13 // add offset of recolour sprite for nitrates
		\2sto 1A
		20 \wx0012 // store in register - recolour offset
		\2rst
		7E 25 // get random variety offset - back
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - mineral pile sprite offset
		\2rst
		7E 26 // get random variety offset - front
		20 \wx7FFF
		\2sto 1A
		20 \wx0006 // store in register - mineral pile sprite offset
		\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

// Empty
	1 * 1	02 04 2D // ID
		85
		1A // all bits on
		20 \wx0000 // no recolour needed
		\2sto 1A
		20 \wx0012 // store in register - recolour offset
		\2rst
		1A // all bits on
		20 \wx0000 // val = 0
		\2sto 1A
		20 \wx0005 // store in register - mineral pile sprite offset
		\2rst
		1A // all bits on
		20 \wx0000 // val = 0
		\2sto 1A
		20 \wx0006 // store in register - mineral pile sprite offset
		\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
		\wx001C \w0 \w0
		\wx001C

	// Purchase
	1 * 1	02 04 2E // ID
		85
		7F 10 // read parameter for recolour sprite base
		20 \wx7FFF
		\2+
		1A // all bits on
		20 \w6 // add offset of recolour sprite for coal
		\2sto 1A
		00 \wx0012 // store in register - recolour offset
		01
		\wx001B \w0 \w0
		\wx001B

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

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

	1 * 1	02 04 31 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0011 // real sprites - iron ore

	1 * 1	02 04 32 // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0012 // real sprites - copper ore

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

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

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

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

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

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

	// Purchase
	1 * 1	02 04 3F // ID
		81 0C // callback
		00 FF
		01
		\wx8002 14 14 // sprite layout
		\wx002E // real sprites - show coal

//@@WARNING DISABLE 113

	// Random action 2 outside callback triggers re-randomisation
	1 * 1	02 04 07 // ID
		80
		02 // no more cargo
		10 // trigger bits 16 to 19
		10
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D
		\wx002D

//@@WARNING ENABLE 113

	// No suitable cargo
	1 * 1	02 04 3E // ID
		81 0C // callback
		00 FF
		01
		\wx8000 14 14 // sprite layout
		\wx0007 // real sprites - empty

	1 * 1	03 04
		01 MINERAL_PLATFORM
		0A
		01 \wx0030 // coal
		08 \wx0031 // iron ore
		0E \wx0032 // copper ore
		16 \wx0033 // clay
		17 \wx0034 // gravel
		18 \wx0035 // limestone
		19 \wx0036 // sand
		28 \wx0037 // bauxite
		3A \wx0038 // nitrates
		FF \wx003F // purchase
		\wx003E // no suitable cargo


	1 * 1	00 04 06 01 TIPPLE
		08 "ISRR"

		// 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
			\dx8000842D \wx0000 // back
			00 00 00 // x/y/z offset
			10 05 16 // x/y/z extent
			\dx8000842E \wx0000 // front
			00 0B 00 // x/y/z offset
			10 05 24 // 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
			\dx8000842F \wx0000 // back
			00 00 00 // x/y/z offset
			05 10 18 // x/y/z extent
			\dx80008430 \wx0000 // front
			0B 00 00 // x/y/z offset
			05 10 24 // 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
			\dx8000842D \wx0000 // back
			00 00 00 // x/y/z offset
			10 05 16 // x/y/z extent
			\dx8000842E \wx0000 // front
			00 0B 00 // x/y/z offset
			10 05 24 // 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
			\dx8000842F \wx0000 // back
			00 00 00 // x/y/z offset
			05 10 18 // x/y/z extent
			\dx80008430 \wx0000 // front
			0B 00 00 // x/y/z offset
			05 10 24 // 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

	1 * 1	01 04 01 04
	1 images/newmines7.pcx   7    8 01  22   4 -16  -5 // x, back
	1 images/newmines7.pcx  17    8 01  43  33 -37 -30 // x, front
	1 images/newmines7.pcx  56    8 01  24   4  14  -7 // y, back
	1 images/newmines7.pcx  66    8 01  43  33   6 -30 // y, front

	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
		\wx00FD 04 04 // ground overlay sprites
		\wx0000 // loading chute sprites

//@@WARNING DISABLE 170
//@@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 170
//@@WARNING ENABLE 100

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

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

	1 * 1	03 04
		01 TIPPLE
		01
		FF \wx0003 // purchase
		\wx0001


	1 * 1	00 04 0B 01 CONVEYOR_BELT
		08 "ISRR"

		// Sprite layout
		1A 02
			// 00 (x)
			45
			\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 // sprite
			00 00 00 // x/y/z offset
			10 10 20 // x/y/z extent
			\dx80000439 \wx0001 // snow
			00 01 80 // x/y/z offset
			03 // register
			\dx8000042E \wx0003 // conveyor overlay (child)
			27 00 80 // x/y/z offset
			01 05 // registers
			\dx8000042E \wx0041 // bulldozer (child)
			07 1B 80 // x/y/z offset
			07 // register
			05 // value for variable 10

			// 01 (y)
			45
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80000433 \wx0000 // sprite
			00 00 00 // x/y/z offset
			10 10 20 // x/y/z extent
			\dx8000043A \wx0001 // snow
			16 01 80 // x/y/z offset
			03 // register
			\dx80000434 \wx0003 // conveyor overlay (child)
			02 00 80 // x/y/z offset
			01 05 // registers
			\dx8000042D \wx0041 // bulldozer (child)
			28 1B 80 // x/y/z offset
			07 // register
			05 // value for variable 10


		0B 02 // use callback to determine layout

		// Only allow a 1 x 1 layout
		0C FE
		0D FE

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

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

		16 \wx0104 // animation info 5 frames looping
		17 03 // animation speed 2^3 ticks per frame
		18 \wx0006 // animation triggers - cargo arrives (2), cargo removed (4)


	1 * 1	01 04 01 0E
	1 images/newmines7.pcx    7  68 41 35 49 -17  -9 // 042D x, conveyor and building
	1 images/newmines7.pcx   74  68 01  6  8   0   0 // 043E x, frame 0
	1 images/newmines7.pcx   85  68 01  6  8   0   0 // 042F x, frame 1
	1 images/newmines7.pcx   96  68 01  6  8   0   0 // 0420 x, frame 2
	1 images/newmines7.pcx  107  68 01  6  8   0   0 // 0431 x, frame 3
	1 images/newmines7.pcx  118  68 01  6  8   0   0 // 0432 x, frame 4

	1 images/newmines7.pcx  131  68 41 35 49 -30  -9 // 0433 y, conveyor and building
	1 images/newmines7.pcx  198  68 01  6  8   0   0 // 0434 y, frame 0
	1 images/newmines7.pcx  209  68 01  6  8   0   0 // 0435 y, frame 1
	1 images/newmines7.pcx  220  68 01  6  8   0   0 // 0436 y, frame 2
	1 images/newmines7.pcx  231  68 01  6  8   0   0 // 0437 y, frame 3
	1 images/newmines7.pcx  242  68 01  6  8   0   0 // 0438 y, frame 4

	1 images/newmines7.pcx    7 130 01 16 27   0   0 // 0439 x, snow
	1 images/newmines7.pcx   39 130 01 16 27   0   0 // 043A y, snow

	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
		02
		\wx00FF 04 04 // ground overlay sprites
		\wx00CE 05 05 // bulldozer
		\wx0000 // conveyor sprites

	// Conveyor belt show/hide flag
	1 * 1	02 04 05 // ID
		81 4A // animation frame
		00 FF
		01
		\wx8001 00 04
		\wx8000 // hide for last frame

	// Random bulldozer
	1 * 1	02 04 06 // ID
		80
		00 // don't re-randomise
		10 // use bit 16
		02
		\wx8000
		\wx8001

	// Animation control start/stop
	1 * 1	02 04 21 // ID
		81 18 // extra callback info - reason for call
		00 FF
		02
		\wx80FE 01 01 // cargo arrives - start
		\wx80FF 02 02 // cargo completely taken - stop
		\wx80FD // do nothing

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

	1 * 1	02 04 12 // ID
		85
		4A // animation frame
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - conveyor overlay offset
		\2rst
		7E 05 // get hide/show flag
		20 \wx7FFF
		\2sto 1A
		20 \wx0001 // store in register - show conveyor overlay flag
		\2rst
		7E 06 // get bulldozer visibility flag
		20 \wx7FFF
		\2sto 1A
		20 \wx0007 // store in register - show/hide bulldozer
		\2rst
		7E BB // get snow overlay flag
		20 \wx00FF
		\2sto 1A
		20 \wx0003 // store in register - show/hide snow
		\2rst
		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 13 // ID
		85
		1A // all bits on
		20 \wx0000 // val = 0
		\2sto 1A
		20 \wx0005 // store in register - conveyor overlay offset
		\2sto 1A
		20 \wx0001 // store in register - show conveyor overlay flag
		\2rst
		1A // all bits on
		20 \wx0001 // val = 1
		\2sto 1A
		20 \wx0007 // store in register - show/hide bulldozer
		\2rst
		1A // all bits on
		20 \wx0000 // val = 0
		\2sto 1A
		20 \wx0003 // store in register - show/hide snow
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

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

	// Callback handler
	1 * 1	02 04 07 // ID
		85 0C // callback
		00 \wxFFFF
		02
		\wx8000 \wx0014 \wx0014 // sprite layout
		\wx0021 \wx0140 \wx0140 // animation control - called by event (cargo arrives)
		\wx0012 // real sprites

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

	1 * 1	03 04
		01 CONVEYOR_BELT
		01
		FF \wx0008 // purchase
		\wx0007


	1 * 1	00 04 0B 01 CONVEYOR_BELT_S
		08 "ISRR"

		// Sprite layout
		1A 02
			// 00 (x)
			45
			\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 // sprite
			00 00 00 // x/y/z offset
			10 10 2A // x/y/z extent
			\dx80000439 \wx0001 // snow
			10 1C 80 // x/y/z offset
			03 // register
			\dx8000042E \wx0003 // conveyor overlay (child)
			06 02 80 // x/y/z offset
			01 05 // registers
			\dx80000430 \wx0041 // bulldozer (child)
			14 33 80 // x/y/z offset
			07 // register
			05 // value for variable 10

			// 01 (y)
			45
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80000433 \wx0000 // sprite
			00 00 00 // x/y/z offset
			10 10 2A // x/y/z extent
			\dx8000043A \wx0001 // snow
			00 1C 80 // x/y/z offset
			03 // register
			\dx80000434 \wx0003 // conveyor overlay (child)
			16 02 80 // x/y/z offset
			01 05 // registers
			\dx8000042F \wx0041 // bulldozer (child)
			18 33 80 // x/y/z offset
			07 // register
			05 // value for variable 10

		0B 02 // use callback to determine layout

		// Only allow a 1 x 1 layout
		0C FE
		0D FE

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

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

		16 \wx0104 // animation info 5 frames looping
		17 03 // animation speed 2^3 ticks per frame
		18 \wx0006 // animation triggers - cargo arrives (2), cargo removed (4)


	1 * 1	01 04 01 0E
	1 images/newmines7.pcx  424  68 41 59 45 -27 -30 // 042D x, conveyor and building
	1 images/newmines7.pcx  491  68 01 28 17   0   0 // 043E x, frame 0
	1 images/newmines7.pcx  511  68 01 28 17   0   0 // 042F x, frame 1
	1 images/newmines7.pcx  531  68 01 28 17   0   0 // 0420 x, frame 2
	1 images/newmines7.pcx  551  68 01 28 17   0   0 // 0431 x, frame 3
	1 images/newmines7.pcx  571  68 01 28 17   0   0 // 0432 x, frame 4

	1 images/newmines7.pcx  255  68 41 59 45 -16 -30 // 0433 y, conveyor and building
	1 images/newmines7.pcx  322  68 01 28 17   0   0 // 0434 y, frame 0
	1 images/newmines7.pcx  342  68 01 28 17   0   0 // 0435 y, frame 1
	1 images/newmines7.pcx  362  68 01 28 17   0   0 // 0436 y, frame 2
	1 images/newmines7.pcx  382  68 01 28 17   0   0 // 0437 y, frame 3
	1 images/newmines7.pcx  402  68 01 28 17   0   0 // 0438 y, frame 4

	1 images/newmines7.pcx  105 130 01 16 29   0   0 // 0439 x, snow
	1 images/newmines7.pcx   71 130 01 16 29   0   0 // 043A y, snow

	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
		02
		\wx00FF 04 04 // ground overlay sprites
		\wx00CE 05 05 // bulldozer
		\wx0000 // conveyor sprites

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

	1 * 1	02 04 12 // ID
		85
		4A // animation frame
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - conveyor overlay offset
		\2rst
		7E 05 // get hide/show flag
		20 \wx7FFF
		\2sto 1A
		20 \wx0001 // store in register - show conveyor overlay flag
		\2rst
		7E 06 // get bulldozer visibility flag
		20 \wx7FFF
		\2sto 1A
		20 \wx0007 // store in register - show/hide bulldozer
		\2rst
		7E BB // get snow overlay flag
		20 \wx00FF
		\2sto 1A
		20 \wx0003 // store in register - show/hide snow
		\2rst
		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 13 // ID
		85
		1A // all bits on
		20 \wx0000 // val = 0
		\2sto 1A
		20 \wx0005 // store in register - conveyor overlay offset
		\2sto 1A
		20 \wx0001 // store in register - show conveyor overlay flag
		\2rst
		1A // all bits on
		20 \wx0001 // val = 1
		\2sto 1A
		20 \wx0007 // store in register - show/hide bulldozer
		\2rst
		1A // all bits on
		20 \wx0000 // val = 0
		\2sto 1A
		20 \wx0003 // store in register - show/hide snow
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

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

	// Callback handler
	1 * 1	02 04 07 // ID
		85 0C // callback
		00 FF FF
		02
		\wx8000 \wx0014 \wx0014 // sprite layout
		\wx0021 \wx0140 \wx0140 // animation control - called by event (cargo arrives)
		\wx0012 // real sprites

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

	1 * 1	03 04
		01 CONVEYOR_BELT_S
		01
		FF \wx0008 // purchase
		\wx0007
