	1 * 1	01 04 02 02
	// Purchase list
	1 images/purchaseicons.pcx  19  22 09 51 64 -31 -20 // 042D x
	1 images/purchaseicons.pcx  91  22 09 51 64 -31 -20 // 042E y
	1 images/purchaseicons.pcx 163  22 09 51 64 -31 -20 // 042F x
	1 images/purchaseicons.pcx 235  22 09 51 64 -31 -20 // 0430 y

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

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

	// Purchase list real sprites
	1 * 1	02 04 00 // ID
		85 00 // current date
		00 \wxFFFF
		01
		\wx0001 \w0 \w01/01/1960 // before 1960 - crates
		\wx0002 // containers


	1 * 1	00 04 0A 01 GOODS_STAT
		08 "ISRA"

		// Sprite layout
		1A 0A
			// 00 (x) - container/crate platforms
			44
			\dx000003F4 \wx0000 // ground sprite - track
			\dx8000042D \wx0040 // back platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			04 // value for variable 10
			\dx8000842D \wx0000 // containers/crates back
			00 00 03 // x/y/z offset
			10 04 11 // x/y/z extent
			\dx8000042E \wx0040 // front platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			04 // value for variable 10
			\dx8000842E \wx0000 // containers/crates front
			00 0C 03 // x/y/z offset
			10 04 11 // x/y/z extent

			// 01 (y) - container/crate platforms
			44
			\dx000003F3 \wx0000 // ground sprite - track
			\dx8000042F \wx0040 // back platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			04 // value for variable 10
			\dx8000842F \wx0000 // containers/crates back
			00 00 03 // x/y/z offset
			04 10 11 // x/y/z extent
			\dx80000430 \wx0040 // front platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			04 // value for variable 10
			\dx80008430 \wx0000 // containers/crates front
			0C 00 03 // x/y/z offset
			04 10 11 // x/y/z extent

			// 02 (x) - tower crane platforms
			43
			\dx000003F4 \wx0000 // ground sprite - track
			\dx8000842D \wx0000 // back platform with crane base
			00 00 00 // x/y/z offset
			10 05 10 // x/y/z extent
			\dx80000431 \wx0002 // crane top
			04 00 11 // x/y/z offset
			0A 0A 06 // x/y/z extent
			10 // register
			\dx8000042E \wx0000 // front platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent

			// 03 (y) - tower crane platforms
			43
			\dx000003F3 \wx0000 // ground sprite - track
			\dx8000842F \wx0000 // back platform with crane base
			00 00 00 // x/y/z offset
			05 10 10 // x/y/z extent
			\dx80000438 \wx0002 // crane top
			00 04 11 // x/y/z offset
			0A 0A 06 // x/y/z extent
			10 // register
			\dx80000430 \wx0000 // front platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent

			// 04 (x) - office or shed
			45
			\dx000003F4 \wx0000 // ground sprite - track
			\dx8000042D \wx0040 // back platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			04 // value for variable 10
			\dx80008437 \wx0002 // office
			00 00 03 // x/y/z offset
			10 05 09 // x/y/z extent
			08 // register
			\dx80000449 \wx0003 // office snow
			00 00 80 // x/y/z offset
			03 08 // registers
			\dx8000042E \wx0040 // front platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			04 // value for variable 10
			\dx8000842D \wx0002 // lamp posts and sign
			00 0C 03 // x/y/z offset
			10 04 0D // x/y/z extent
			09 // register

			// 05 (y) - office or shed
			45
			\dx000003F3 \wx0000 // ground sprite - track
			\dx8000042F \wx0040 // back platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			04 // value for variable 10
			\dx80008438 \wx0002 // office
			00 00 03 // x/y/z offset
			05 10 09 // x/y/z extent
			08 // register
			\dx8000044A \wx0003 // office snow
			00 00 80 // x/y/z offset
			03 08 // registers
			\dx80000430 \wx0040 // front platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			04 // value for variable 10
			\dx8000842E \wx0002 // lamp posts and sign
			0C 00 03 // x/y/z offset
			04 10 0D // x/y/z extent
			09 // register

			// 06 (x) - train shed
			44
			\dx000003F4 \wx0000 // ground sprite - track
			\dx80000431 \wx0000 // shed back part
			00 00 00 // x/y/z offset
			10 05 0F // x/y/z extent
			\dx8000842D \wx0002 // shed front
			00 00 00 // x/y/z offset
			10 10 1C // x/y/z extent
			0A // register
			\dx80000435 \wx0001 // shed snow
			00 00 80 // x/y/z offset
			03 // registers
			\dx80000433 \wx0001 // door
			0B 1B 80 // x/y/z offset
			02 // register

			// 07 (y) - train shed
			44
			\dx000003F3 \wx0000 // ground sprite - track
			\dx80000432 \wx0000 // shed back part
			00 00 00 // x/y/z offset
			05 10 0F // x/y/z extent
			\dx8000842E \wx0002 // shed front
			00 00 00 // x/y/z offset
			10 10 1C // x/y/z extent
			0A // register
			\dx80000436 \wx0001 // shed snow
			01 00 80 // x/y/z offset
			03 // registers
			\dx80000434 \wx0001 // door
			2A 1B 80 // x/y/z offset
			02 // 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 \w600 // set little / lots threshold

		14 CC // wires (disable tile types 2 and 6)
		11 33 // pylon placement (tile types 0 and 4)

		12 \dxC0003824 // cargo types for randomisation triggers

		16 \wx0113 // animation info 20 frames looping
		17 04 // animation speed 2^4 ticks per frame
		18 \wx0018 // animation triggers - train enters (0x08), train leaves (0x10)


// Real sprites
// ------------
	// Office real sprites
	1 * 1	02 04 23 // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FC 04 04 // platform sprites
		\wx00EE // office sprites

	// Cargo platform real sprites
	1 * 1	02 04 21 // ID
		85 FA
		00 \wxFFFF
		01
		\wx00DA \w0 \w01/01/1960 // before 1960 - crate sprites
		\wx00DC // container sprites

	// Cargo platform real sprites - empty
	1 * 1	02 04 22 // ID
		85 FA
		00 \wxFFFF
		01
		\wx00D9 \w0 \w01/01/1960 // before 1960 - crate sprites
		\wx00DB // container sprites

	1 * 1	02 04 1D // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FC 04 04 // platform sprites
		\wx0021

	//Empty
	1 * 1	02 04 10 // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FC 04 04 // platform sprites
		\wx0022


	// Office or shed
	1 * 1	02 04 1C // ID
		80
		00 // don't re-randomise
		10 // use bit 16
		02
		\wx8000
		\wx800A

	// Office or shed front platform
	1 * 1	02 04 1B // ID
		80
		00 // don't re-randomise
		10 // use bit 16
		02
		\wx8000
		\wx8004

	// Train shed
	1 * 1	02 04 0D // ID
		80
		00 // don't re-randomise
		10 // use bit 16
		02
		\wx8000
		\wx8002

//@@WARNING DISABLE 100

// Tower crane platform
	1 * 1	02 04 16 // ID
		85
		7E B8 // get crane animation offset
		20 \wx00FF
		\2sto 1A
		00 \wx0010 // store in register
		01
		\wx00EF \w0 \w0
		\wx00EF

// Office/shed platform
	1 * 1	02 04 17 // ID
		85
		7E 1C // get office/shed 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 1B // get front platform offset
		20 \wx00FF
		\2sto 1A
		00 \wx0009 // store in register
		01
		\wx0023 \w0 \w0
		\wx0023

// Train shed
	1 * 1	02 04 18 // ID
		85
		7E 0D // get train shed variety offset
		20 \wx00FF
		\2sto 1A
		20 \wx000A // store in register
		\2rst
		7E BB // get snow overlay flag
		20 \wx00FF
		\2sto 1A
		20 \wx0003 // store in register - show/hide snow
		\2rst
		7E BC // get door show/hide flag
		20 \wx00FF
		\2sto 1A
		00 \wx0002 // store in register
		01
		\wx00EC \w0 \w0
		\wx00EC

//@@WARNING ENABLE 100

	// Test tile at current position
	1 * 1	02 04 1A // ID
		81 68 00 // station info param 0/0; check this tile
		0A 0F
		03
		\wx001D 01 01 // part 00/01 - cargo platforms
		\wx0016 05 05 // part 02/03 - tower crane
		\wx0017 09 09 // part 04/05 - office
		\wx0018 // part 06/07 - train shed

	// Test tile at current position - empty
	1 * 1	02 04 1E // ID
		81 68 00 // station info param 0/0; check this tile
		0A 0F
		03
		\wx0010 01 01 // part 00/01 - cargo platforms - empty
		\wx0016 05 05 // part 02/03 - tower crane
		\wx0017 09 09 // part 04/05 - office
		\wx0018 // part 06/07 - train shed


// Callback 14
// -----------
	// Test tile at current position for sprite layout
	1 * 1	02 04 20 // ID
		81 68 00 // station info param 0/0; check this tile
		0A 0F
		03
		\wx8000 01 01 // part 00/01 - cargo platforms
		\wx8002 05 05 // part 02/03 - tower crane
		\wx8004 09 09 // part 04/05 - office
		\wx8006 // part 06/07 - train shed


// Callback 140 - Animation control
// --------------------------------
	// Tower crane
	// Animation start/stop control
	1 * 1	02 04 26 // ID
		81 18 // extra callback info - reason for call
		00 FF
		02
		\wx80FE 03 03 // vehicle enters station - start
		\wx80FF 04 04 // vehicle leaves station - stop
		\wx80FD // do nothing

	// Test tile at current position for animated tile
	1 * 1	02 04 1B // ID
		81 68 00 // station info param 0/0; check this tile
		0A 0F
		01
		\wx0026 05 05 // part 02/03 - tower crane
		\wx80FD // do nothing


// Callback 24
// -----------
	// Platform 0
	1 * 1	02 04 05 // ID
		81 10 // platform info and relative position
		00 07 // position along platform from N mod 8
		02
		\wx8002 01 01 // tower crane
		\wx8006 03 06 // train shed
		\wx8000 // cargo platforms

	// Platform 1
	1 * 1	02 04 06 // ID
		81 10 // platform info and relative position
		00 07 // position along platform from N mod 8
		03
		\wx8004 00 00 // office
		\wx8002 04 04 // tower crane
		\wx8004 06 06 // office
		\wx8000 // cargo platforms

	// Platform 2
	1 * 1	02 04 07 // ID
		81 10 // platform info and relative position
		00 07 // position along platform from N mod 8
		01
		\wx8006 03 06 // train shed
		\wx8000 // cargo platforms

	// Platform 3
	1 * 1	02 04 08 // ID
		81 10 // platform info and relative position
		00 07 // position along platform from N mod 8
		04
		\wx8004 00 00 // office
		\wx8002 02 02 // tower crane
		\wx8004 04 04 // office
		\wx8002 05 05 // tower crane
		\wx8000 // cargo platforms

	1 * 1	02 04 09 // ID
		81 10 // platform info and relative position
		08 03 // platform number from N mod 4
		03
		\wx0005 00 00
		\wx0006 01 01
		\wx0007 02 02
		\wx0008

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

	1 * 1	02 04 02 // ID
		85 0C // callback
		00 FF FF
		02
		\wx0020 \wx0014 \wx0014 // sprite layout
		\wx001B \wx0140 \wx0140 // animation control
		\wx001A // real sprites

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

//@@WARNING DISABLE 113

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

//@@WARNING ENABLE 113

	// Only re-randomise cargo platforms
	1 * 1	02 04 0A // ID
		81 68 00 // station info param 0/0 - check this tile
		0A 0F
		01
		\wx000B 01 01 // part 0/1 - cargo platforms
		\wx001E // else

	// No suitable cargo
	1 * 1	02 04 04 // ID
		85 0C // callback
		00 FF FF
		02
		\wx0020 \wx0014 \wx0014 // sprite layout
		\wx001B \wx0140 \wx0140 // animation control
		\wx000A // real sprites

	1 * 1	03 04
		01 GOODS_STAT
		15
		02 \wx0002 // mail
		05 \wx0002 // goods
		0B \wx0002 // paper
		0C \wx0002 // food
		0D \wx0002 // fruit
		1E \wx0002 // fish
		1F \wx0002 // wool
		20 \wx0002 // glass
		21 \wx0002 // ceramics
		22 \wx0002 // bricks
		23 \wx0002 // vehicles
		2A \wx0002 // building materials
		2B \wx0002 // engineering supplies
		2D \wx0002 // farm supplies
		30 \wx0002 // manufacturing supplies
		31 \wx0002 // recyclables
		32 \wx0002 // scrap metal
		37 \wx0002 // sugar
		38 \wx0002 // coffee
		3B \wx0002 // vehicle parts
		FF \wx0003 // purchase list
		\wx0004 // no suitable cargo
