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

		// Sprite layout
		1A 02
			// 00 (x)
			43
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000842D \wx0000 // oil storage tank
			00 00 00 // x/y/z offset
			0F 0F 0D // x/y/z extent
			\dx8000042E \wx0001 // snow
			00 00 80 // x/y/z offset
			03 // register

			// 01 (y)
			43
			\dx00000F8D \wx0002 // ground sprite
			10 // register
			\dx8000042D \wx0040 // ground overlay sprite (child)
			00 00 80 // x/y/z offset
			04 // value for variable 10
			\dx8000842D \wx0000 // oil storage tank
			00 00 00 // x/y/z offset
			0F 0F 0D // x/y/z extent
			\dx8000042E \wx0001 // snow
			00 00 80 // x/y/z offset
			03 // register


		0B 02 // use callback to determine layout

		10 \w600 // set little/lots threshold

		12 \dx04000008 // cargo types for randomisation triggers

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

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


	1 * 1	01 04 04 02
	1 images/newoil.pcx    3  88 01  35  45 -21 -12 // 042D empty
	1 images/newoil.pcx    3  88 01   1   1   0   0 // 042E empty - snow
	1 images/newoil.pcx   55  88 01  35  45 -21 -12 // 042D level 1
	1 images/newoil.pcx  211  88 01   4  21  13  13 // 042E level 1 - snow
	1 images/newoil.pcx  107  88 01  35  45 -21 -12 // 042D level 2
	1 images/newoil.pcx  237  88 01   9  33   7   8 // 042E level 2 - snow
	1 images/newoil.pcx  159  88 01  35  45 -21 -12 // 042D level 3
	1 images/newoil.pcx  275  88 01  14  37   5   3 // 042E level 3 - snow

	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

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


	// 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 // oil storage tank sprites

	// No suitable cargo
	// Test variable 10 for real sprites
	1 * 1	02 04 1A // ID
		81 10 // additional information for sprite selection
		00 0F
		01
		\wx00FF 04 04 // ground overlay sprites
		\wx0002 // oil storage tank sprites - empty

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

	1 * 1	02 04 20 // ID
		85
		7E BB // get snow overlay flag
		20 \wx00FF
		\2sto 1A
		20 \wx0003 // store in register - show/hide snow
		\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

	// No suitable cargo
	1 * 1	02 04 22 // ID
		85
		7E BB // get snow overlay flag
		20 \wx00FF
		\2sto 1A
		20 \wx0003 // store in register - show/hide snow
		\2rst
		7E BF // get normal/snow/desert offset
		20 \wx7FFF
		\2sto 1A
		00 \wx0010 // store in register - ground sprite offset
		01
		\wx001A \w0 \w0
		\wx001A

	//Purchase
	1 * 1	02 04 21 // ID
		85
		1A // all bits on
		20 \w0 // val = 0
		\2sto 1A
		20 \wx0003 // store in register - show/hide snow
		\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
		\wx8000 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
		12 // trigger bits 18 and 19
		04
		\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 OIL_STORAGE
		04
		03 \wx0001 // oil
		1A \wx0001 // petrol
		26 \wx0001 // refined products
		FF \wx0005 // purchase
		\wx0003 // no suitable cargo
