	1 * 1	01 04 02 02
	// Purchase list
	1 images/purchaseicons.pcx  19 527 09 58 64 -31 -27 // 042D x
	1 images/purchaseicons.pcx  91 527 09 54 64 -31 -23 // 042E y
	1 images/purchaseicons.pcx 163 527 09 62 64 -31 -31 // 042F x
	1 images/purchaseicons.pcx 235 527 09 62 64 -31 -31 // 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_B
		08 "ISRA"

		// Sprite layout
		1A 0E
			// 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
			05 // 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
			05 // 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
			05 // 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
			05 // 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) - platform with forklift
			43
			\dx000003F4 \wx0000 // ground sprite - track
			\dx8000042D \wx0040 // back platform
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			05 // value for variable 10
			\dx8000042E \wx0040 // front platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			05 // value for variable 10
			\dx8000842D \wx0002 // forklift
			05 01 03 // x/y/z offset
			06 02 09 // x/y/z extent
			0D // register

			// 05 (y) - platform with forklift
			43
			\dx000003F3 \wx0000 // ground sprite - track
			\dx8000042F \wx0040 // back platform
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			05 // value for variable 10
			\dx80000430 \wx0040 // front platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			05 // value for variable 10
			\dx8000842F \wx0002 // forklift
			01 05 03 // x/y/z offset
			02 06 09 // x/y/z extent
			0D // register

			// 06 (x) - platform with 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
			05 // value for variable 10
			\dx80008441 \wx0000 // shed
			00 00 03 // x/y/z offset
			10 05 0D // x/y/z extent
			\dx80000453 \wx0001 // shed snow
			00 00 80 // x/y/z offset
			03 // register
			\dx8000042E \wx0040 // front platform
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			05 // value for variable 10
			\dx80000431 \wx0000 // lamp posts
			00 0C 03 // x/y/z offset
			10 04 0B // x/y/z extent

			// 07 (y) - platform with 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
			05 // value for variable 10
			\dx80008442 \wx0000 // shed
			00 00 03 // x/y/z offset
			05 10 0D // x/y/z extent
			\dx80000454 \wx0001 // shed snow
			00 00 80 // x/y/z offset
			03 // register
			\dx80000430 \wx0040 // front platform
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			05 // value for variable 10
			\dx80000432 \wx0000 // lamp posts
			0C 00 03 // x/y/z offset
			04 10 0B // x/y/z extent

			// 08 (x) - crossing with forklift
			42
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0042 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			0A // register
			04 // value for variable 10
			\dx8000842F \wx0003 // forklift
			08 0B 00 // x/y/z offset
			03 05 09 // x/y/z extent
			02 0D // register

			// 09 (y) - crossing with forklift
			42
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0042 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			0A // register
			04 // value for variable 10
			\dx8000842D \wx0003 // forklift
			0B 08 00 // x/y/z offset
			05 03 09 // x/y/z extent
			02 0D // register

			// 0A (x) - ramp
			43
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			06 // value for variable 10
			\dx8000042D \wx0002 // ramp back
			00 00 00 // x/y/z offset
			10 05 03 // x/y/z extent
			0E // register
			\dx8000042D \wx0002 // ramp front
			00 0B 00 // x/y/z offset
			10 05 03 // x/y/z extent
			0E // register

			// 0B (y) - ramp
			43
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			06 // value for variable 10
			\dx8000042F \wx0002 // ramp back
			00 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			0E // register
			\dx8000042F \wx0002 // ramp front
			0B 00 00 // x/y/z offset
			05 10 03 // x/y/z extent
			0E // register

			// 0C (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

			// 0D (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 0C // wires (disable tile type 2)
		11 F3 // pylon placement (tile types 0, 4 and 6)

		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
// ------------
	// Cargo platform real sprites
	1 * 1	02 04 23 // 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 24 // ID
		85 FA
		00 \wxFFFF
		01
		\wx00D9 \w0 \w01/01/1960 // before 1960 - crate sprites
		\wx00DB // container sprites

	// Test variable 10 for real sprites - cargo
	1 * 1	02 04 1D // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FC 05 05 // high platform sprites
		\wx0023

	// Test variable 10 for real sprites - cargo empty
	1 * 1	02 04 1E // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FC 05 05 // high platform sprites
		\wx0024

	// Test variable 10 for real sprites - forklift
	1 * 1	02 04 2C // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FC 05 05 // high platform sprites
		\wx00D1 // forklift sprites

	// Test variable 10 for real sprites - shed
	1 * 1	02 04 2D // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FC 05 05 // high platform sprites
		\wx00EE // shed sprites

	// Test variable 10 for real sprites - crossing
	1 * 1	02 04 2E // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00F6 04 04 // crossing overlay sprites
		\wx00D1 // forklift sprites

	// Test variable 10 for real sprites - ramp
	1 * 1	02 04 2F // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FD 06 06 // low platform overlay sprites
		\wx00F7 // ramp sprites


// Crossing
	// Maybe forklift
	1 * 1	02 04 3D // ID
		80
		00 // don't re-randomise
		10 // use bits 16 and 17
		04
		\wx8000
		\wx8001
		\wx8000
		\wx8000

	// Offset for forklift type
	1 * 1	02 04 3E // ID
		80
		00 // don't re-randomise
		12 // use bit 18
		02
		\wx8000
		\wx8001

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

// Platform with forklift
	1 * 1	02 04 1A // ID
		85
		7E 3E // get forklift variety offset
		20 \wx00FF
		\2sto 1A
		00 \wx000D // store in register
		01
		\wx002C \w0 \w0
		\wx002C

// Shed
	1 * 1	02 04 1B // ID
		85
		7E BB // get snow overlay flag
		20 \wx00FF
		\2sto 1A
		00 \wx0003 // store in register - show/hide snow
		01
		\wx002D \w0 \w0
		\wx002D

// Crossing
	1 * 1	02 04 17 // ID
		85
		7E BA // get crossing overlay offset
		20 \wx00FF
		\2sto 1A
		20 \wx000A // store in register
		\2rst
		7E 3D // get random forklift flag
		20 \wx00FF
		\2sto 1A
		20 \wx0002 // store in register
		\2rst
		7E 3E // get forklift variety offset
		20 \wx00FF
		\2sto 1A
		20 \wx000D // 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
		\wx002E \w0 \w0
		\wx002E

// Ramp N
	1 * 1	02 04 18 // ID
		85
		1A
		20 \wx0001 // offset 1 - N ramp
		\2sto 1A
		20 \wx000E // 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
		\wx002F \w0 \w0
		\wx002F

// Ramp S
	1 * 1	02 04 19 // ID
		85
		1A
		20 \wx0000 // offset 0 - S ramp
		\2sto 1A
		20 \wx000E // 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
		\wx002F \w0 \w0
		\wx002F

//@@WARNING ENABLE 100

	// Ramp/crossing
	// Test tile to south for crossing
	1 * 1	02 04 33 // ID
		85 68 01 // station info param 0/+1; check tile to S
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx0017 GOODS_STAT_B 35 GOODS_STAT_B 35 // crossing
		\wx0018 // ramp N

	// Test tile to north for crossing
	1 * 1	02 04 34 // ID
		85 68 0F // station info param 0/-1; check tile to N
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx0033 GOODS_STAT_B 35 GOODS_STAT_B 35 // crossing
		\wx0019 // ramp S

	// Shed/forklift
	1 * 1	02 04 32 // ID
		80
		00 // don't re-randomise
		10 // use bit 16
		02
		\wx001A // platform with forklift
		\wx001B // shed

	// Test tile at current position
	1 * 1	02 04 35 // 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
		\wx0032 09 09 // part 04/05 - shed or forklift
		\wx0034 // part 06/07 - crossing or ramp

	// Test tile at current position - empty
	1 * 1	02 04 31 // ID
		81 68 00 // station info param 0/0; check this tile
		0A 0F
		03
		\wx001E 01 01 // part 00/01 - cargo platforms - empty
		\wx0016 05 05 // part 02/03 - tower crane
		\wx0032 09 09 // part 04/05 - shed or forklift
		\wx0034 // part 06/07 - crossing or ramp


// Callback 14
// -----------
	// Ramp/crossing
	// Test tile to south for crossing
	1 * 1	02 04 43 // ID
		85 68 01 // station info param 0/+1; check tile to S
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx8008 GOODS_STAT_B 35 GOODS_STAT_B 35 // crossing
		\wx800A // ramp N

	// Test tile to north for crossing
	1 * 1	02 04 44 // ID
		85 68 0F // station info param 0/-1; check tile to N
		00 \wx3FFF // mask 14 bits for tile ID, type, direction and part
		01
		\wx0043 GOODS_STAT_B 35 GOODS_STAT_B 35 // crossing
		\wx800A // ramp S

	// Shed/forklift
	1 * 1	02 04 42 // ID
		80
		00 // don't re-randomise
		10 // use bit 16
		02
		\wx8004 // platform with forklift
		\wx8006 // shed

	// Test tile at current position for sprite layout
	1 * 1	02 04 45 // 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
		\wx0042 09 09 // part 04/05 - shed or forklift
		\wx0044 // part 06/07 - crossing or ramp


// Callback 140 - Animation control
// --------------------------------
	// Tower crane
	// Animation start/stop control
	1 * 1	02 04 36 // 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 37 // ID
		81 68 00 // station info param 0/0; check this tile
		0A 0F
		01
		\wx0036 05 05 // part 02/03 - tower crane
		\wx80FD // do nothing


// Callback 24
// -----------
	// First crossing tile
	1 * 1	02 04 0B // ID
		81 10 // platform info and relative position
		04 0F // position along platform from S
		01
		\wx8000 00 01 // cargo platforms
		\wx8006 // crossing

	// Second crossing tile
	1 * 1	02 04 0C // ID
		81 10 // platform info and relative position
		04 0F // position along platform from S
		01
		\wx8000 00 00 // cargo platforms
		\wx8006 // crossing

	// First crossing tile platform 2
	1 * 1	02 04 0D // ID
		81 10 // platform info and relative position
		04 0F // position along platform from S
		02
		\wx8000 00 00 // cargo platforms
		\wx8002 01 01 // tower crane
		\wx8006 // crossing

	// Platform 0
	1 * 1	02 04 05 // ID
		81 10 // platform info and relative position
		00 07 // position along platform from N mod 8
		05
		\wx8004 01 01 // shed or forklift
		\wx000D 03 03 // maybe crossing
		\wx000C 04 04 // maybe crossing
		\wx8006 05 05 // crossing
		\wx8002 06 06 // tower crane
		\wx0000 // 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
		05
		\wx8002 02 02 // tower crane
		\wx000B 03 03 // maybe crossing
		\wx000C 04 04 // maybe crossing
		\wx8006 05 05 // crossing
		\wx8004 06 06 // shed or forklift
		\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
		05
		\wx8004 00 00 // shed or forklift
		\wx000D 03 03 // maybe crossing
		\wx000C 04 04 // maybe crossing
		\wx8006 05 05 // crossing
		\wx8002 06 06 // tower crane
		\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
		05
		\wx8002 01 01 // tower crane
		\wx000B 03 03 // maybe crossing
		\wx000C 04 04 // maybe crossing
		\wx8006 05 05 // crossing
		\wx8002 07 07 // 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 \wxFFFF
		02
		\wx0045 \wx0014 \wx0014 // sprite layout
		\wx0037 \wx0140 \wx0140 // animation control
		\wx0035 // real sprites

	// Purchase list
	1 * 1	02 04 0A // ID
		81 0C // callback
		00 FF
		02
		\wx800C 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
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031
		\wx0031

//@@WARNING ENABLE 113

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

	// No suitable cargo
	1 * 1	02 04 04 // ID
		85 0C // callback
		00 \wxFFFF
		02
		\wx0045 \wx0014 \wx0014 // sprite layout
		\wx0037 \wx0140 \wx0140 // animation control
		\wx000C // real sprites

	1 * 1	03 04
		01 GOODS_STAT_B
		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 \wx000A // purchase list
		\wx0004 // no suitable cargo
