	// Purchase list
	1 * 1	01 04 01 02
	1 images/purchaseicons.pcx  19 597 09 62 64 -31 -31 // 042D x
	1 images/purchaseicons.pcx  91 597 09 62 64 -31 -31 // 042E y

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


	1 * 1	00 04 06 01 LIVESTOCK_STAT
		08 "ISRA"

		// Sprite layout
		1A 0A
			// 00 (x) Pig yard
			42
			\dx000003F4 \wx0000 // ground sprite
			\dx8000042D \wx0002 // back platform
			00 00 00 // x/y/z offset
			10 05 07 // x/y/z extent
			06 // register
			\dx8000042E \wx0002 // front platform
			00 0B 00 // x/y/z offset
			10 05 07 // x/y/z extent
			06 // register

			// 01 (y) Pig yard
			42
			\dx000003F3 \wx0000 // ground sprite
			\dx8000042F \wx0002 // back platform
			00 00 00 // x/y/z offset
			05 10 07 // x/y/z extent
			06 // register
			\dx80000430 \wx0002 // front platform
			0B 00 00 // x/y/z offset
			05 10 07 // x/y/z extent
			06 // register

			// 02 (x) Cattle docks
			42
			\dx000003F4 \wx0000 // ground sprite
			\dx8000042D \wx0002 // back platform
			00 00 00 // x/y/z offset
			10 05 07 // x/y/z extent
			06 // register
			\dx8000042D \wx0002 // front platform
			00 0B 00 // x/y/z offset
			10 05 07 // x/y/z extent
			07 // register

			// 03 (y) Cattle docks
			42
			\dx000003F3 \wx0000 // ground sprite
			\dx8000042E \wx0002 // back platform
			00 00 00 // x/y/z offset
			05 10 07 // x/y/z extent
			06 // register
			\dx8000042E \wx0002 // front platform
			0B 00 00 // x/y/z offset
			05 10 07 // x/y/z extent
			07 // register

			// 04 (x) Office
			44
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000843B \wx0002 // back platform office
			00 00 00 // x/y/z offset
			10 05 11 // x/y/z extent
			08 // register
			\dx8000044D \wx0003 // office snow
			00 00 80 // x/y/z offset
			03 08 // registers
			\dx8000842F \wx0000 // front platform fence
			03 0D 00 // x/y/z offset
			0A 01 05 // x/y/z extent

			// 05 (y) Office
			44
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000843C \wx0002 // back platform office
			00 00 00 // x/y/z offset
			05 10 11 // x/y/z extent
			08 // register
			\dx8000044E \wx0003 // office snow
			00 00 80 // x/y/z offset
			03 08 // registers
			\dx80008430 \wx0000 // front platform fence
			0D 03 00 // x/y/z offset
			01 0A 05 // x/y/z extent

			// 06 (x) Empty platform
			42
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // low platform overlay (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80008431 \wx0001 // hay
			00 00 00 // x/y/z offset
			10 05 0F // x/y/z extent
			03 // register

			// 07 (y) Empty platform
			42
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // low platform overlay (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80008432 \wx0001 // hay
			00 00 00 // x/y/z offset
			05 10 0F // x/y/z extent
			03 // register

			// 08 (x) Purchase
			41
			\dx000003F4 \wx0000 // ground sprite - track
			\dx8000842D \wx0000 // purchase list sprite
			00 00 00 // x/y/z offset
			10 10 20 // x/y/z extent

			// 09 (y) Purchase
			41
			\dx000003F3 \wx0000 // ground sprite - track
			\dx8000842E \wx0000 // purchase list sprite
			00 00 00 // x/y/z offset
			10 10 20 // x/y/z extent


		0B 02 // use callback to determine layout

		10 \w400 // little / lots threshold

		11 FF // pylon placement (all)

		12 \dx00000010 // 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
		\wx00E7 // forklift sprites

	1 * 1	02 04 1C // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FD 04 04 // ground overlay sprites
		\wx00EE // building sprites


	// Pig yard
	// Test tile along platform to south for pig yard
	1 * 1	02 04 30 // ID
		85 68 01 // station info param 0/1; check tile along platform to S
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx800C LIVESTOCK_STAT 15 LIVESTOCK_STAT 15 // part 02/03 - pig yard
		\wx8008 // south end

	// Test tile along platform to south for pig yard
	1 * 1	02 04 31 // ID
		85 68 01 // station info param 0/1; check tile along platform to S
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx8004 LIVESTOCK_STAT 15 LIVESTOCK_STAT 15 // part 02/03 - pig yard
		\wx8000 // single tile

	// Test tile along platform to north for pig yard
	1 * 1	02 04 32 // ID
		85 68 0F // station info param 0/-1; check tile along platform to N
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx0030 LIVESTOCK_STAT 15 LIVESTOCK_STAT 15 // part 02/03 - pig yard
		\wx0031

	// Cattle docks
	// Test tile along platform to south for cattle docks
	1 * 1	02 04 2B // ID
		85 68 01 // station info param 0/1; check tile along platform to S
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx8000 LIVESTOCK_STAT 05 LIVESTOCK_STAT 05 // part 00/01 - cattle docks
		\wx8002 // south end

	// Test tile along platform to north for cattle docks
	1 * 1	02 04 2D // ID
		85 68 0F // station info param 0/-1; check tile along platform to N
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx8008 LIVESTOCK_STAT 05 LIVESTOCK_STAT 05 // part 00/01 - cattle docks
		\wx8000 // north end

	// Test tile on platform to north for cattle docks
	1 * 1	02 04 29 // ID
		85 68 F0 // station info param -1/0; check tile on next platform to N
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx8004 LIVESTOCK_STAT 05 LIVESTOCK_STAT 05 // part 00/01 - cattle docks
		\wx8000

	// Front platform
	// Test tile on platform to south for cattle docks
	1 * 1	02 04 2A // ID
		85 68 10 // station info param 1/0; check tile on next platform to S
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx8000 LIVESTOCK_STAT 05 LIVESTOCK_STAT 05 // part 00/01 - cattle docks
		\wx002B

	// Random platform objects
	1 * 1	02 04 34 // ID
		80
		00 // don't re-randomise
		10 // use bits 16 and 17
		04
		\wx8000
		\wx8000
		\wx8000
		\wx8001

	// Random office variety
	1 * 1	02 04 35 // ID
		80
		00 // don't re-randomise
		10 // use bit 16
		02
		\wx8000
		\wx8002


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

	// Pig yard sprites
	1 * 1	02 04 15 // ID
		85
		7E 32 // get sprite offset
		20 \wx00FF
		\2sto 1A
		00 \wx0006 // store in register
		01
		\wx00D8 \w0 \w0
		\wx00D8

	// Pig yard sprites - empty
	1 * 1	02 04 19 // ID
		85
		7E 32 // get sprite offset
		20 \wx00FF
		\2sto 1A
		00 \wx0006 // store in register
		01
		\wx00D7 \w0 \w0
		\wx00D7

	// Cattle docks sprites
	1 * 1	02 04 16 // ID
		85
		7E 2B // get S end sprite offset
		20 \wx00FF
		\2+
		7E 2D // get N end sprite offset
		20 \wx00FF
		\2+
		7E 29 // get platform to N sprite offset
		20 \wx00FF
		\2sto 1A
		20 \wx0006 // store in register
		\2rst
		7E 2A // get tile type sprite offset
		20 \wx00FF
		\2+
		7E 2D // get N end sprite offset
		20 \wx00FF
		\2sto 1A
		00 \wx0007 // store in register
		01
		\wx00D6 \w0 \w0
		\wx00D6

	// Cattle docks sprites - empty
	1 * 1	02 04 1A // ID
		85
		7E 2B // get S end sprite offset
		20 \wx00FF
		\2+
		7E 2D // get N end sprite offset
		20 \wx00FF
		\2+
		7E 29 // get platform to N sprite offset
		20 \wx00FF
		\2sto 1A
		20 \wx0006 // store in register
		\2rst
		7E 2A // get tile type sprite offset
		20 \wx00FF
		\2+
		7E 2D // get N end sprite offset
		20 \wx00FF
		\2sto 1A
		00 \wx0007 // store in register
		01
		\wx00D5 \w0 \w0
		\wx00D5

// Office sprites
	1 * 1	02 04 17 // ID
		85
		7E 35 // get random office variety offset
		20 \wx00FF
		\2sto 1A
		20 \wx0008 // store in register
		\2rst
		7E BB // get snow overlay flag
		20 \wx00FF
		\2sto 1A
		20 \wx0003 // store in register - show/hide snow
		\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

// Platform sprites
	1 * 1	02 04 18 // ID
		85
		7E 34 // get show/hide flag
		20 \wx00FF
		\2sto 1A
		20 \wx0003 // 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

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

	// Test tile at current posn.
	1 * 1	02 04 2A // ID
		81 68 00 // station info param 0/0; check this tile
		0A 0F
		03
		\wx0016 01 01 // part 00/01 - cattle docks
		\wx0015 05 05 // part 02/03 - pig yard
		\wx0017 09 09 // part 04/05 - building
		\wx0018 // part 06/07 - platform

	// Empty
	// Test tile at current posn.
	1 * 1	02 04 29 // ID
		81 68 00 // station info param 0/0; check this tile
		0A 0F
		03
		\wx001A 01 01 // part 00/01 - cattle docks
		\wx0019 05 05 // part 02/03 - pig yard
		\wx0017 09 09 // part 04/05 - building
		\wx0018 // part 06/07 - platform


// Callback 14
// -----------
	// Test tile at current posn. for sprite layout
	1 * 1	02 04 10 // ID
		81 68 00 // station info param 0/0; check this tile
		0A 0F
		03
		\wx8002 01 01 // part 00/01 - cattle docks
		\wx8000 05 05 // part 02/03 - pig yard
		\wx8004 09 09 // part 04/05 - building
		\wx8006 // part 06/07 - platform


// Callback 24
// -----------
	// Platform 0
	1 * 1	02 04 01 // ID
		81 10 // platform info and relative position
		00 07 // position along platform from N mod 8
		04
		\wx8002 00 01 // pig yard
		\wx8004 02 02 // building
		\wx8006 03 03 // platform
		\wx8006 07 07 // platform
		\wx8000  // cattle docks

	// Platform 1
	1 * 1	02 04 02 // ID
		81 10 // platform info and relative position
		00 07 // position along platform from N mod 8
		03
		\wx8002 00 02 // pig yard
		\wx8006 03 03 // platform
		\wx8006 06 07 // platform
		\wx8000 // cattle docks

	// Platform 2
	1 * 1	02 04 03 // ID
		81 10 // platform info and relative position
		00 07 // position along platform from N mod 8
		03
		\wx8000 01 03 // cattle docks
		\wx8004 04 04 // building
		\wx8000 06 07 // cattle docks
		\wx8006 // platform

	// Platform 3
	1 * 1	02 04 04 // ID
		81 10 // platform info and relative position
		00 07 // position along platform from N mod 8
		02
		\wx8002 00 02 // pig yard
		\wx8002 05 07 // pig yard
		\wx8006 // platform

	1 * 1	02 04 05 // ID
		81 10 // platform info and relative position
		08 03 // platform number from N mod 4
		03
		\wx0001 00 00
		\wx0002 01 01
		\wx0003 02 02
		\wx0004

// -----------------------------

	1 * 1	02 04 06 // ID
		81 0C // callback
		00 FF
		01
		\wx0010 14 14 // sprite layout
		\wx002A // real sprites

	// Purchase list
	1 * 1	02 04 08 // ID
		81 0C // callback
		00 FF
		02
		\wx8008 14 14 // sprite layout
		\wx0005 24 24 // station layout
		\wx0000 // real sprites

//@@WARNING DISABLE 113

	// Random action 2 outside callback triggers re-randomisation
	1 * 1	02 04 09 // ID
		80
		02 // no more cargo
		12 // trigger bits 18 and 19 (16 and 17 are used by buildings etc)
		04
		\wx0029
		\wx0029
		\wx0029
		\wx0029

//@@WARNING ENABLE 113

	// No suitable cargo
	1 * 1	02 04 07 // ID
		81 0C // callback
		00 FF
		01
		\wx0010 14 14 // sprite layout
		\wx0009 // real sprites

	1 * 1	03 04
		01 LIVESTOCK_STAT
		02
		04 \wx0006 // livestock
		FF \wx0008 // purchase
		\wx0007 // no suitable cargo
