	1 * 1	00 04 04 01 GRAIN_SILO
		08 "ISRA"

		// Sprite layout
		1A 06
			// 00 (x) - back
			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 \wx0002 // silo back
			00 0B 00 // x/y/z offset
			10 05 32 // x/y/z extent
			05 // register
			\dx80000437 \wx0003 // silo back snow
			00 00 80 // x/y/z offset
			02 05 // registers

			// 01 (y) - back
			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
			\dx80008432 \wx0002 // silo back
			0B 00 00 // x/y/z offset
			05 10 32 // x/y/z extent
			05 // register
			\dx8000043C \wx0003 // silo back snow
			00 00 80 // x/y/z offset
			02 05 // registers

			// 02 (x) - front
			45
			\dx000003F4 \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000842E \wx0002 // silo front
			00 00 00 // x/y/z offset
			10 05 32 // x/y/z extent
			05 // register
			\dx80000438 \wx0003 // silo front snow
			00 00 80 // x/y/z offset
			02 05 // registers
			\dx80000431 \wx0001 // bay
			00 0B 00 // x/y/z offset
			10 05 22 // x/y/z extent
			03 // register
			\dx8000043B \wx0001 // bay snow
			00 16 80 // x/y/z offset
			02 // registers

			// 03 (y) - front
			45
			\dx000003F3 \wx0002 // ground sprite
			10 // register
			\dx8000042E \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx80008433 \wx0002 // silo front
			00 00 00 // x/y/z offset
			05 10 32 // x/y/z extent
			05 // register
			\dx8000043D \wx0003 // silo front snow
			00 00 80 // x/y/z offset
			02 05 // registers
			\dx80000436 \wx0001 // bay
			0B 00 00 // x/y/z offset
			05 10 22 // x/y/z extent
			03 // register
			\dx80000440 \wx0001 // bay snow
			00 16 80 // x/y/z offset
			02 // registers

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

			// 05 (y) - purchase
			41
			\dx000003F3 \wx0000 // ground sprite
			\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
		11 FF // pylon placement (all)


	1 * 1	01 04 01 14
	1 images/newfarm2.pcx    5  462 09  61  33 -29 -41 // 042D x, silo back south end
	1 images/newfarm2.pcx   44  462 09  68  41 -31 -48 // 042E x, silo front south end
	1 images/newfarm2.pcx   91  462 09  59  34 -28 -42 // 042F x, silo back
	1 images/newfarm2.pcx  131  462 09  67  42 -32 -48 // 0430 x, silo front
	1 images/newfarm2.pcx  180  462 09  54  27 -27 -46 // 0431 x, loading bay

	1 images/newfarm2.pcx    5  544 09  61  33  -2 -41 // 0432 y, silo back south end
	1 images/newfarm2.pcx   44  544 09  68  41  -8 -48 // 0433 y, silo front south end
	1 images/newfarm2.pcx   91  544 09  59  34  -4 -42 // 0434 y, silo back
	1 images/newfarm2.pcx  131  544 09  67  42  -8 -48 // 0435 y, silo front
	1 images/newfarm2.pcx  180  544 09  54  27   2 -46 // 0436 y, loading bay

	1 images/newfarm2.pcx    5  618 01  12  33   0   0 // 0437 x, silo back south end snow
	1 images/newfarm2.pcx   44  618 01  19  41   0   0 // 0438 x, silo front south end snow
	1 images/newfarm2.pcx   91  618 01  19  34   0   0 // 0439 x, silo back snow
	1 images/newfarm2.pcx  131  618 01  27  42   0   0 // 043A x, silo front snow
	1 images/newfarm2.pcx  179  618 01  19  27   0   0 // 043B x, loading bay snow

	1 images/newfarm2.pcx    5  650 01  12  33   0   0 // 043C y, silo back south end snow
	1 images/newfarm2.pcx   44  650 01  19  41   0   0 // 043D y, silo front south end snow
	1 images/newfarm2.pcx   91  650 01  19  34   0   0 // 043E y, silo back snow
	1 images/newfarm2.pcx  131  650 01  27  42   0   0 // 043F y, silo front snow
	1 images/newfarm2.pcx  179  650 01  19  27   0   0 // 0440 y, loading bay snow

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

	1 * 1	01 04 01 02
	// Purchase list
	1 images/purchaseicons.pcx 163 151 09 62 64 -31 -31 // 042D x
	1 images/purchaseicons.pcx 235 151 09 62 64 -31 -31 // 042E y

	1 * 1	02 04 07 // 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
		\wx00FD 04 04 // ground overlay sprites
		\wx0000 // building sprites

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

	// For platform length 4 and greater
	1 * 1	02 04 16 // ID
		81 47 // platform info and relative position
		00 0F // position along platform from centre
		01
		\wx8001 0F 0F // 1 tile north of centre
		\wx0010

	// For platform length 3
	1 * 1	02 04 17 // ID
		81 41 // platform info and relative position
		00 0F // position along platform from north
		01
		\wx8001 01 01 // 2nd tile from north
		\wx0010

	// Determine build of loading bay
	1 * 1	02 04 19 // ID
		81 41 // platform info and relative position
		10 0F // platform length
		02
		\wx8001 02 02 // length of 2
		\wx0017 03 03 // length of 3
		\wx0016 // length > 3

	// No loading bay on south tile
	1 * 1	02 04 18 // ID
		81 41 // platform info and relative position
		04 0F // position along platform from south
		01
		\wx8000 00 00 // south tile
		\wx0019

	// Sprite offset for buildings
	1 * 1	02 04 03 // ID
		81 41 // platform info and relative position
		04 0F // position along platform from south
		01
		\wx8000 00 00 // south tile
		\wx8002

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

	1 * 1	02 04 15 // ID
		85
		7E 03 // get sprite offset
		20 \wx7FFF
		\2sto 1A
		20 \wx0005 // store in register - layout sprite offset
		\2rst
		7E 18 // get random bays
		20 \wx7FFF
		\2sto 1A
		20 \wx0003 // store in register - show/hide bay
		\2rst
		7E BB // get snow overlay flag
		20 \wx00FF
		\2sto 1A
		20 \wx0002 // 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 - ground sprite offset
		01
		\wx001B \w0 \w0
		\wx001B

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


// Callback 14
// -----------

	1 * 1	02 04 11 // ID
		81 41 // platform info and relative position
		0C 01 // platform number from south mod 2
		01
		\wx8002 00 00 // even number platform
		\wx8000


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

	// For purchase list
	1 * 1	02 04 06 // ID
		81 0C // callback
		00 FF
		01
		\wx8004 14 14 // sprite layout
		\wx0007 // real sprites

	1 * 1	03 04
		01 GRAIN_SILO
		01
		FF \wx0006 // purchase
		\wx0005
