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

		// Sprite layout
		1A 04
			// 00 (x) - wood platforms
			43
			\dx000003F4 \wx0002 // ground sprite - track
			10 // register
			\dx8000042D \wx0040 // ground overlay (child) - platforms
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0002 // logs back
			00 00 00 // x/y/z offset
			10 05 0C // x/y/z extent
			11 // register
			\dx8000042E \wx0002 // logs front
			00 0B 00 // x/y/z offset
			10 05 0C // x/y/z extent
			15 // register

			// 01 (y) - wood platforms
			43
			\dx000003F3 \wx0002 // ground sprite - track
			10 // register
			\dx8000042E \wx0040 // ground overlay (child) - platforms
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042F \wx0002 // logs back
			00 00 00 // x/y/z offset
			05 10 0C // x/y/z extent
			11 // register
			\dx80000430 \wx0002 // logs front
			0B 00 00 // x/y/z offset
			05 10 0C // x/y/z extent
			15 // register

			// 02 (x) - wood platforms - purchase
			43
			\dx000003F4 \wx0000 // ground sprite - track
			\dx8000042D \wx0040 // ground overlay (child) - platforms
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0000 // logs back
			00 00 00 // x/y/z offset
			10 05 0C // x/y/z extent
			\dx8000042E \wx0000 // logs front
			00 0B 00 // x/y/z offset
			10 05 0C // x/y/z extent

			// 03 (y) - wood platforms - purchase
			43
			\dx000003F3 \wx0000 // ground sprite - track
			\dx8000042E \wx0040 // ground overlay (child) - platforms
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042F \wx0000 // logs back
			00 00 00 // x/y/z offset
			05 10 0C // x/y/z extent
			\dx80000430 \wx0000 // logs front
			0B 00 00 // x/y/z offset
			05 10 0C // x/y/z extent

		0B 02 // use callback to determine layout

		10 \w400 // set little/lots threshold

		11 FF // pylon placement (all)

		12 \dx00080080 // cargo types for randomisation triggers


// Real sprites
// ------------
	// 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
		\wx00DE // wood sprites

	// Test variable 10 for real sprites - no wood
	1 * 1	02 04 1C // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FD 04 04 // ground overlay sprites
		\wx00DD // wood sprites

	// Select log type front
	1 * 1	02 04 3C // ID
		80
		00 // no more cargo (triggered by random in graphics chain)
		11 // use bit 17
		02
		\wx8000
		\wx8004

	// Select log type back
	1 * 1	02 04 40 // ID
		80
		00 // no more cargo (triggered by random in graphics chain)
		10 // use bit 16
		02
		\wx8000
		\wx8004

//@@WARNING DISABLE 100

	1 * 1	02 04 20 // ID
		85
		7E 40 // get random log type offset
		20 \wx00FF
		\2sto 1A
		20 \wx0011 // store in register
		\2rst
		7E 3C // get random log type offset
		20 \wx00FF
		\2sto 1A
		20 \wx0015 // store in register
		\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
		01
		\wx001B \w0 \w0
		\wx001B

	// Empty
	1 * 1	02 04 21 // ID
		85
		1A // all bits on
		20 \w0 // val = 0
		\2sto 1A
		20 \wx0011 // store in register
		\2sto 1A
		20 \wx0015 // store in register
		\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
		01
		\wx001C \w0 \w0
		\wx001C

//@@WARNING DEFAULT


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

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

//@@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
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021
		\wx0021

//@@WARNING ENABLE 113

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

	1 * 1	03 04
		01 WOOD_TRACK
		03
		07 \wx0001 // wood
		13 \wx0001 // tropic wood
		FF \wx0002 // purchase
		\wx0003 // no suitable cargo


	1 * 1	00 04 08 01 WOOD_NON_TRACK
		08 "ISRR"

		// Sprite layout
		1A 04
			// 00 (x)
			42
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0002 // log pile
			00 00 00 // x/y/z offset
			10 10 0C // x/y/z extent
			11 // register

			// 01 (y)
			42
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0002 // log pile
			00 00 00 // x/y/z offset
			10 10 0C // x/y/z extent
			11 // register

			// 02 (x) purchase
			42
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000042D \wx0000 // log pile
			00 00 00 // x/y/z offset
			10 10 0C // x/y/z extent

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

		0B 02 // use callback to determine layout

		10 \w600 // set little/lots threshold

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

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

		12 \dx00080080 // cargo types for randomisation triggers


	1 * 1	01 04 04 04
// Empty
	1 images/newwood4.pcx    3 180 09  1  1   0   0  // 042D x, logs (dummy)
	1 images/newwood4.pcx    3 180 09  1  1   0   0  // 042E y, logs (dummy)
	1 images/newwood4.pcx    3 180 09  1  1   0   0  // 042F y, logs (dummy)
	1 images/newwood4.pcx    3 180 09  1  1   0   0  // 0430 x, logs (dummy)
// Small amount
	1 images/newwood4.pcx    3 180 09 27 53 -29  -3  // 042D x, logs type 1
	1 images/newwood4.pcx    3 233 09 31 50 -29  -1  // 042E y, logs type 1
	1 images/newwood4.pcx  196 180 09 23 33  -6  -3  // 042F x, logs type 2
	1 images/newwood4.pcx  196 233 09 25 52 -24  -6  // 0430 y, logs type 2
// Medium amount
	1 images/newwood4.pcx   61 180 09 40 61 -29 -12  // 042D x, logs type 1
	1 images/newwood4.pcx   61 233 09 39 52 -29  -9  // 042E y, logs type 1
	1 images/newwood4.pcx  254 180 09 31 45 -14  -9  // 042F x, logs type 2
	1 images/newwood4.pcx  254 233 09 31 52 -24  -6  // 0430 y, logs type 2
// Large amount
	1 images/newwood4.pcx  128 180 09 40 61 -29 -12  // 042D x, logs type 1
	1 images/newwood4.pcx  128 233 09 39 56 -29  -9  // 042E y, logs type 1
	1 images/newwood4.pcx  312 180 09 39 58 -27  -9  // 042F x, logs type 2
	1 images/newwood4.pcx  312 233 09 31 56 -28  -6  // 0430 y, logs type 2

	1 * 1	02 04 10 // ID
		0E 01
		\w0 \w1 \w1 \w1 \w1 \w1 \w2 \w2 \w2 \w2 \w2 \w3 \w3 \w3
		\w3

	1 * 1	02 04 11 // ID
		0E 01
		\w0 \w0 \w1 \w1 \w1 \w1 \w1 \w2 \w2 \w2 \w2 \w2 \w3 \w3
		\w3

	1 * 1	02 04 12 // ID
		0E 01
		\w0 \w0 \w0 \w1 \w1 \w1 \w1 \w1 \w2 \w2 \w2 \w2 \w2 \w3
		\w3

	1 * 1	02 04 13 // ID
		0E 01
		\w0 \w0 \w0 \w0 \w1 \w1 \w1 \w1 \w1 \w2 \w2 \w2 \w2 \w2
		\w3

	1 * 1	02 04 00 // ID
		80
		00 // no more cargo (triggered by random in graphics chain)
		12 // use bits 18 and 19
		04
		\wx0010
		\wx0011
		\wx0012
		\wx0013

	// No suitable cargo - use empty tile
	1 * 1	02 04 02 // ID
		00 01
		\w0


// Real sprites
// ------------
	// 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 // logs sprites

	// Test variable 10 for real sprites - no wood
	1 * 1	02 04 1C // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FF 04 04 // ground overlay sprites
		\wx0002 // logs sprites - empty

	1 * 1	02 04 11 // ID
		80
		00 // no more cargo (triggered by random in graphics chain)
		10 // use bits 16 and 17
		04
		\wx8000
		\wx8001
		\wx8002
		\wx8003

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

	1 * 1	02 04 20 // ID
		85
		7E 11 // get random log type offset
		20 \wx7FFF
		\2sto 1A
		20 \wx0011 // store in register
		\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

	// Empty
	1 * 1	02 04 22 // ID
		85
		1A // all bits on
		20 \w0 // val = 0
		\2sto 1A
		20 \wx0011 // store in register
		\2rst
		7E BF // get normal/snow/desert offset
		20 \wx7FFF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001C \w0 \w0
		\wx001C

	//Purchase
	1 * 1	02 04 21 // 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 100
//@@WARNING ENABLE 170

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

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

//@@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
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022
		\wx0022

//@@WARNING ENABLE 113

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

	1 * 1	03 04
		01 WOOD_NON_TRACK
		03
		07 \wx0001 // wood
		13 \wx0001 // tropic wood
		FF \wx0005 // purchase
		\wx0003 // no suitable cargo
