                           _____  .___ __      __                                                                                  
                          /  _  \ |   /  \    /  \                                  by Drugganator aka JADiS                       
                         /  /_\  \|   \   \/\/____\_____           ___.                      DALnet #aiw-thf                       
                        /    |    |   |\     \__    ____\_ ________\_ |__   ___   http://croydondeluxe.co.uk                      
                        \____|__  |___| \__/\  /|    | |  |  \_  __ | __ \ /  _ \      original game AI Wars                       
                                \/           \/ |    | |  |  /|  | \| \_\ (  <_> )     tacticalneuronics.com                       
                          ___ ___               |____| |____/ |__|__|___  /\____/,    __  .__  by John Reder                       
                         /   |   \ ___.________   ____________/ ____|__|\/___ |  |___/  |_|__| ____   ____                         
                        /    ~    <   |  \____ \_/ __ \_  __ \   __\|  |/ ___\|  |  \   __|  |/    \ / ___\                        
                        \    Y    /\___  |  |_> \  ___/|  | \/|  |  |  / /_/  |   Y  |  | |  |   |  / /_/  >                       
                         \___|_  / / ____|   __/ \___ \|__|   |__|  |__\___  /|___|  |__| |__|___|  \___  /                        
                               \/  \/    |__|        \ |              /_____/      | /            \/_____/                         
                                                      \/  ===::VERSiON 0.1.5::===  \/                                              



COMMAND LINE SWITCHES
	
	-map <filename>					select a map
	-bug <filename> <rank> <medals>			enters a bug medals is bitfield
	-mark <bugnum>					mark selected bug with the red flag
	-teammode <number> :	
							 0 melee	
	 			 			 1 dual
				 			 2 5v5 team mode	
	-iffon						switch iff codes on
	-iffoff						switch iff codes off (brainwashing still works)
	-queengame <bitfield>				queen game flags are:
							 1 battle ends on queen's death
							 2 killing queen wins game	
							 4 queen cannot move
	 						 8 CTF with queens		
							16 Assault (one queen)	
							32 queen is IT	
	-domination <bitfield>				domination game flags are:
	 						 1 Domination scoring
							 2 Domination spawning	
							 4 battle ends when all points taken by one team
							 8 allow spawning in unclaimed points		
							16 use Assault spawnpoints for use in Assault games		
	-dompointsrot <points>				Domination points score rot per second	
	-kingofthehillon				King of the Hill with Strategy Node on
	-kingofthehilloff				King of the Hill with Strategy Node off	
	-itgameon					switch IT tag on
	-itgameoff					switch IT tag off
	-bloodmodeon					switch blood mode on
	-bloodmodeoff					switch blood mode off
	-lastcybugon					switch fuel bonus on
	-lastcybugoff					switch fuel bonus off
	-respawnon					switch respawn on
	-respawnoff					switch respawn off
	-respawnrandomon				switch random respawn points on
	-respawnrandomoff				switch random respawn points off
	-respawntime <seconds>				clicks before respawn
	-respawnpenalty <points>			points loss for respawn
	-repairnodeson					switch repair nodes on
	-repairnodesoff					switch repair nodes off
	-snodeon					switch strategy node on
	-snodeoff					switch strategy node off
	-upgrades <number> :
							 0 no upgrades 	
							 1 upgrades in flags
							 2 buy upgrades at beginning
	-asmon						68k assembler allowed
	-asmoff						BASIC only
	-clicklimit <number>				max clicks before game ends
	-nodiskon					no saving of any file allowed
	-nodiskoff					saving files works
	-supersecreton					saved files only load on this map
	-supersecretoff					saving files is normal	
	-secreton					summary only
	-secretoff					full battle page saved
	-seed <number>					seed random with same number (eg symetric duals)
	-maxrank <number>				biggest (worst) rank on server	
	-confxon					switch console fx on
	-confxoff					switch console fx off
	-superrainbow					the way it should be
	-debugon					switch debug mode on
	-debugff					switch debug mode off	
	-cheatson					IDKFA for testing
	-cheatsoff					switch cheats off	
	-b64encode <infile> <outfile>			handy b64 utility
	-b64decode <infile> <outfile>			handy b64 utility
	-romtotext <infile> <outfile> <password>	for including in your bugs
	-lzwencode <infile> <outfile>			handy lzw utility
	-lzwdecode <infile> <outfile>			handy lzw utility
	-encrypt <infile> <outfile> <password>		encrypt your bugs like this
	-decrypt <infile> <outfile> <password>		decrypt the joke encryption	
	-assemble <infile> <outfile>			assembles a file	
	-help 						displays help	


BASIC

	l
		label
	R#
		ROM number #
	X#
		Memory upgrade number #
	d
		w	word integer
		l	longword integer
		B	byte
		W	word
		L	longword
	m	requires MAP PACK
		0	map layer 0
		1	map layer 1
		2	map layer 2
		3	map layer 3
		4	map layer 4
		5	optimal route
	v#,V#
		user vars. 1024 of them, string or float	
	h#,H#
		hive vars. 1024 of them, string or float

	indexes are allowed

	;
		comment
	name
		name is #####
	clan
		clan is #####
	author
		author is #####

//program flow

	if ##### then
		starts block if ##### is true
	else
		...else do this
	end if
		ends if block

//GOSUB GOTO
	goto rom # line #####
		goto rom number # line #####
	gosub rom # line #####
		gosub rom number # line #####
	goto line #####
		goto line #####
	gosub line #####
		gosub line #####
	goto #####
		goto label #####
	gosub #####
		gosub label #####
	return
		return from a gosub
	jump #
		jump # lines

// ~v0 math etc
	~#
		run command stored in #
	assign ## #
		assigns # to ##. ~# will use the VALUE of #, not the variable itself
	iff code
		sets the iff code of a bug
	map iff
		take the map iff, only works on map bugs
	saverom #####
		saves current rom as #####
	loadrom # #####
		loads rom ##### into slot #
	commo #####
		write a new message
	ikon #####
		choose a sprite number between 1 and 8
	green plasma please
		turn on alternate sprites
	green plasma off
		turn off the alternate sprites
	skinny blackbox
		turn on skinny blackboxes. only variables will be saved
	full blackbox
		turn off skinny blackboxes
	generate random
		generate random number
	cmath ##### = EXPRESSION
		evaluate expression and stick into #. brackets most certainly allowed!!!
		abs - ignore the sign
		atn - the arctangent
		cos - the cosine
		exp - exponential
		int - the floor of a floating point number
		fix - the ceiling of a floating point number
		rnd - random number. a seed may be given
		sgn - the sign of the number
		sin - the sine
		sqr - the square
		tan - tangent
		imp - logical IMPLICATION
		equ - logical EQUIVALENCE
		xor - nlogical XOR
		or  - logical OR
		and - logical AND
		mod - modulo operator
		not - logical NOT
		lb2 - log 2
		str - convert to string
		chr - gegt character from ascii value
		asc - get ascii value
		reg - perform regular expression match
		end - take # characters from end of a string
		stt - take # characters from start of a string
		hex - convert to hex


//scans
	long range scan
		scan as far as the bug can see, forward
	scan forward
		scan five spaces forward
	wide scan
		scans in a shotgun pattern forward
	scan left
		scans left five spaces
	scan right
		scans right five spaces
	scan position #####
		scan a certain position on bug's perimeter
	scan relative #####
		scans a certain postition relative to bug's current heading
	gps scan x ##### y #####
		scans a certain position
	cross scan
		scans front, back, left, right
	corner scan
		scans the corners
	scan perimeter
		scans the perimeter
	
//actions

	move forward
		moves forward
	nitro
		move an extra space. requires NITRO BOOST upgrade
	move backward
		moves backward
	sidestep left
		sidesteps left. requires SUPERARTICULATED LEGS upgrade
	sidestep right
		sidesteps right. requires SUPERARTICLULATED LEGS upgrade
	turn left
		turns left
	turn right
		turns right
	raise shield
		turns on shield
	lower shield
		turns off shield
	lower dozer
		turns on the dozer blade. requires DOZER upgrade
	raise dozer
		raises the dozer blade. requires DOZER upgrade
	cloak on
		turns on cloak
	cloak off
		turns off cloak
	attempt repairs
		attempts to repair bug at a risk of damaging engine, increasing burn
	repair engine
		attempts to repair engine to reduce burn	
	extinguish fire
		extinguishes fire if bug is on fire
	convert ammo to fuel
		convert 4 ammo to 50 fuel. requires FUEL TO AMMO CONVERTER upgrade
	convert fuel to ammo
		convert 100 fuel to an ammo point. requires FUEL TO AMMO CONVERTER upgrade	
	repair forward
		repairs the bug in front	
	duke on x ##### y #####
		turns on the holoduke at # #. requires HOLODUKE upgrade
	duke off
		turns off holoduke. requires HOLODUKE upgrade
	set scent type #####
		changes scent type to #
	scent off
		turns off scent laying
	fire stinkray t ##### x ##### y #####
		fires the stinkray with scent t# at x# y#. requires STINKRAY upgrade
	buy upgrade #####
		buys the upgrade number #
	queen
		makes bug into the team's queen
	fire weapon
		fires primary weapon
	launch missile
		launches a missile
	launch drunk missile
		launches ONE drunk missile. requires DRUNK MISSILES upgrade
	launch grenade
		launches a grenade
	launch slow grenade
		launches a slow grenade
	set grenade fuse #####
		sets grenade fuse to #
	lay mines on
		turns on laying mines
	lay mines off
		turns off laying mines	
	lay bombs on
		turns on laying timebombs
	lay bombs off
		turns off laying timebombs
	set bomb fuse #####
		set timebomb fuse in ticks
	detonate remote bombs
		detonates all remote bombs. requires REMOTE BOMBS upgrade
	detonate remote bomb x ##### y #####
		detonate remote bomb at # #. requires REMOTE BOMBS upgrade
	discharge energy
		discharge energy
	discharge hard
		discharge energy hard
	discharge light
		discharge energy light	
	discharge emp
		discharges EMP
	data link resource fuel #####
		takes ##### fuel arse-to-arse with another bug
	data link resource ammo #####
		takes ##### ammo arse-to-arse with another bug	
	data link command ######
		inserts a command arse-to-arse with another bug	
	flamethrower on
		turns flamethrower on. requires FLAMETHROWER upgrade
	flamethrower off
		turns flamethrower off. requires FLAMETHROWER upgrade
	lower chainsaw
		turns chainsaw on, requires CHAINSAW upgrade
	raise chainsaw
		turns chainsaw off. requires CHAINSAW upgrade
	ready supersledge
		redies the super sledgehammer. requires SUPER SLEDGEHAMMER upgrade
	fire supersledge
		fires super sledgehammer. requires SUPER SLEDGEHAMMER upgrade
	fire supershotgun
		fires supershotgun. requires SUPERSHOTGUN upgrade
	charge railgun
		charges railgun. requires RAILGUN upgrade
	fire railgun
		fires railgun. requires RAILGUN upgrade
	lightning on x ##### y #####
		turns on lightning. requires LIGHTNING upgrade
	lightning off
		turns off lightning
	bolt thrower x ##### y #####
		fires bolt thrower. requires BOLT THROWER upgrade
	fire plasmagun
		fires plasmagun. requires PLASMAGUN upgrade
	sonic boom
		fire sonic boom. requires BASS MACHINE upgrade
	fire airfist
		fires airfist. requires AIRFIST upgrade				
	self destruct
		self destruct
	debug on
		turn on debug	
	debug off
		turn boff debug		
	IDKFA
		very happy ammo added!
		
//deprecated
	math ##### = EXPRESSION
		+, -, *, /
		use cmath instead
	a bunch of "if facing north then" etc



UPGRADES


	Map Pack #1 COST 2000
		Automap of the map. Accessable via ~m[x][y].
	Super Scanner #2 COST 2000
		A load of new variables become accessable
	High Voltage Discharge Booster #3 COST 500
		Discharges hurt more
	Internal Discharge Shielding #4 COST 500
		Discharges hurt you less
	Shield Cooling System #5 COST 1000
		Shields cannot overheat
	20mm Armour Piercing Rounds #6 COST 350
		Increased damage for primary weapon
	Hyperalloy Combat Chassis #7 COST 4000
		Increase of life from 10 to 20
	Shield Upgrade #8 COST 1500
		Shield repels more damage
	Cloak Upgrade #9 COST 800
		Cloak costs less ammo
	High Explosive Mine Layerer #10 COST 200
		Your mines do more damage
	Napalm Launcher #11 COST 500
		Your missiles and grenades set people on fire
	Engine Snoorkel #12 COST 500
		You can swim in water
	Rocket Launcher #13 COST 900
		Fire missiles faster
	Fuel/Ammo Converter #14 COST 300
		Convert between ammo and fuel
	Holoduke #15 COST 300
		Get a hologram of yourself
	Supercharger #16 COST 900
		Move twice as fast
	Dozer Blade #17 COST 400
		A cool dozer blade, extra front armour plus you can push things around. Remember to raise it when you shoot
	Military Scanner #18 COST 1500
		Faster scans
	Soviet Engine #19 COST 1500
		Engine is indestructable and stuck on 5 burn
	Nuclear Engine #20 COST 4000
		Engine is indestructable and stuck on 1 burn. You blow up when you die		
	Rad Shield #21 COST 200
		Protection from radiation
	Chemical Warheads #22 COST 600
		Your rockets and grenades leave a chemical puddle
	Ceramic Plates #23 COST 500
		Protection from lightning
	Asbestos Armour (oh so itchy) #24 COST 300
		Protection from fire
	Flamethrower #25 COST 800
		New weapon. Light people on fire
	Chainsaw!! (doesn't suck) The Saw is The Law #26 COST 200
		Chop people up at close range
	Super Sledgehammer #27 COST 1500
		You can kill in on blow with this
	Super Shotgun #28 COST 350
		Fires in a shotgun pattern
	Railgun #29 COST 2000
		You have to charge it, but you can shoot through walls
	Lightning Gun #30 COST 2000
		New weapon. Targettable
	EMP #31 COST 900
		Good close range attack
	Phased Plasma Rifle (40kW Range) #32 COST 900
		Fast firing projejctile weapon
	5000 Watt Bass Machine #33 COST 150
		Fire a sonic boom, cheap weak projectile
	Ram Plate #34 COST 150
		Take a good run up and ram your opponent
	Smelloscope #35 COST 50
		Detect scent from afar
	Airfist #36 COST 400
		Repel projectiles
	Chaingun #37 COST 400
		Make your primary weapon rapid fire
	Combat Repair Module #38 COST 1500
		Repairing works better
	Stink Ray #39 COST 50
		Make scent from afar
	Bolt Thrower #40 COST 2000
		Fire a directed bolt
	Chamelion Paint #41 COST 3000
		Stay still to become invisible to scans
	Armour Upgrade #42 COST 1500
		Better armour
	Armour Busting Rockets #43 COST 600
		Rockets penetrate armour
	High Frag Rounds #44 COST 700
		More weapon splash damage
	Memory Upgrade #45 COST 4000
		Double ROM slots
	CPU Upgrade #46 COST 5000
		CPU things are faster
	Remote Detonating Bombs #47 COST 200
		Your bombs can be remotely detonated
	Prox Bombs #48 COST 500
		Your bombs go off when someone is next to them
	Drunk Missile #49 COST 5000
		Oh these are cool. Best fired in a burst
	Nitro Boost #50 COST 400
		Move an extra square
	Quick Shields #51 COST 700
		Turn your shields on and off faster
	Sniper Rifle #52 COST 700
		Primary weapon increased range
	Missile Rack #53 COST 1000
		Fire rockets cheaper
	Optics Array #54 COST 300
		A few things including Line of Sight lookups
	Superarticulated Legs #55 COST 3000
		Allows you to sidestep
	Extra Fuel Tank #56 COST 250
		Carry more fuel
	Ammo Belt #57 COST 500
		Carry more ammo
	Bunker Busting Rockets #58 COST 400
		Rocket explosions penetrate walls
	Fuckin' Magnets #59 COST 3000
		Immune to conveyor belts






BUG FILE FORMATTING

	;GFX64
		start the Base64 encoded .gif youyr bug uses as sprites
	;ENDGFX64
		end the Base64 encoded .gif your bug uses as sprites
	;SMAP64
		start the Base64 encoded secret signature map for your bug
	;ENDSMAP64
		end the Base64 encoded secret signature map for your bug
	;MAP64
		start the Base64 encoded signature map for your bug
	;ENDMAP64
		end the Base64 encoded signature map for your bug
	;VARNUM #
		Set variable number to #
	;VARS
		Start variable block
	;ENDVARS
		End variable block
	;ASM
		Start assembly language block
	;ENDASM
		End assembly language block
	;DATABLOCK64
		Start raw data Base64 encoded
	;ENDDATA64
		End raw data Base64 encoded
	;DATABLOCK
		Start data block
	;ENDDATA
		End data block
	;ORG
		Start your bug running here
	;ROM #####
		Start ROM file #####
	;ENDROM
		End a ROM file

	name #####
		the name of your bug
	clan #####
		the clan of you bug
	password #####
		password if encrypted
	debug on
		debug mode
	asm on
		ASM mode
	public
		make bug downloadable
	clan password #####
		need it to be associated with da clan!!!
	author #####
		the author of the bug
	crip #####
		name if crips
	blood #####
		name if blood




















MAP 2 FORMAT

	Switches -
 		SIGNATURE
			only a signature map for a bug
		SECRET
			map is secret
		SUPERSECRET
			map is supersecret
		NODISK
			no type of saving is allowed, except for scores
		BASICONLY
			all bugs must run basic
		NO DEBUG
			debug mode not allowed
		NO CHEATS
			cheating is not allowed (IDKFA)

		###MAP NAME###
		###MAP DESCRIPTION###

		GRID -
			46x32, seperated by newline
			character pairs
			
		00 04		domination spawn point for domination point 1
		00 07		domination spawn point for domination point 2
		00 10		domination spawn point for domination point 3
		00 13		domination spawn point for domination point 4
		00 16		domination spawn point for domination point 5

		01 01		strategy node. there can be only one strategy node. if not set, it is random
		01 04		domination point 1 / assault point 1
		01 07		domination point 2 / assault point 2
		01 10		domination point 3 / assault point 3
		01 13		domination point 4 / assault point 4
		01 16		domination point 5 / assault point 5
		01 19		repair node. there can be many of these

		02 04		domination spawn point for domination point 1, crips only
		02 07		domination spawn point for domination point 2, crips only
		02 10		domination spawn point for domination point 3, crips only
		02 13		domination spawn point for domination point 4, crips only
		02 16		domination spawn point for domination point 5, crips only

		02 05		domination spawn point for domination point 1, bloods only
		02 08		domination spawn point for domination point 2, bloods only
		02 11		domination spawn point for domination point 3, bloods only
		02 14		domination spawn point for domination point 4, bloods only
		02 17		domination spawn point for domination point 5, bloods only

		04 XX		wall
		14 XX		wall
		-- XX	to
		34 XX		wall

		37 XX		tree

		06 01		flag
		06 02		mine
		06 03		upgraded mine
		06 04		fuel dump
		06 05		ammo depot

		07 XX		water
		08 XX		water
		09 XX		water

		10 XX		nukage
		11 XX		nukage
		12 XX		nukage

		36 0-24		craters
	
		38 00		conveyor
		38 01		conveyor
		38 02		conveyor
		38 03		conveyor
		38 10		barrel
		38 11		nukage barrel
		38 12		barrel
		38 21		napalm barrel

		37 22		door x part 1
		37 24		door x part 2
		37 26		door y part 1
		37 28		door y part 2
		37 30		door x part 1
		37 32		door x part 2
		37 34		door y part 1
		37 36		door y part 2

		38 13		spinblade
		38 16		spinblade
		38 19		spinblade

		42 ##		teleporter ##
		43 ##		teletarget ##
		44 ##		teletarget ## reverses direction

		46 00		converyor with rotater
		46 07		converyor with copper death
		46 08 		converyor with brass death (permanent no respawn)
		46 10		converyor with crusher
		46 11		converyor with crusher
		46 12		converyor with crusher
		46 13		converyor with crusher
		46 14		converyor with crusher
		46 15		converyor with crusher
		46 16		converyor with crusher
		46 17		converyor with crusher
		46 18		converyor with crusher
		46 33		converyor with teledest 3
		46 34		converyor with teledest 2
		46 35		converyor with teledest 1
		46 59		converyor with teleporter 3
		46 60		converyor with teleporter 2
		46 61		converyor with teleporter 1

		47 00		converyor with rotater
		47 07		converyor with copper death
		47 08 		converyor with brass death (permanent no respawn)
		47 10		converyor with crusher
		47 11		converyor with crusher
		47 12		converyor with crusher
		47 13		converyor with crusher
		47 14		converyor with crusher
		47 15		converyor with crusher
		47 16		converyor with crusher
		47 17		converyor with crusher
		47 18		converyor with crusher
		47 33		converyor with teledest 3
		47 34		converyor with teledest 2
		47 35		converyor with teledest 1
		47 59		converyor with teleporter 3
		47 60		converyor with teleporter 2
		47 61		converyor with teleporter 1

		48 00		converyor with rotater
		48 07		converyor with copper death
		48 08 		converyor with brass death (permanent no respawn)
		48 10		converyor with crusher
		48 11		converyor with crusher
		48 12		converyor with crusher
		48 13		converyor with crusher
		48 14		converyor with crusher
		48 15		converyor with crusher
		48 16		converyor with crusher
		48 17		converyor with crusher
		48 18		converyor with crusher
		48 33		converyor with teledest 3
		48 34		converyor with teledest 2
		48 35		converyor with teledest 1
		48 59		converyor with teleporter 3
		48 60		converyor with teleporter 2
		48 61		converyor with teleporter 1

		49 00		converyor with rotater
		49 07		converyor with copper death
		49 08 		converyor with brass death (permanent no respawn)
		49 10		converyor with crusher
		49 11		converyor with crusher
		49 12		converyor with crusher
		49 13		converyor with crusher
		49 14		converyor with crusher
		49 15		converyor with crusher
		49 16		converyor with crusher
		49 17		converyor with crusher
		49 18		converyor with crusher
		49 33		converyor with teledest 3
		49 34		converyor with teledest 2
		49 35		converyor with teledest 1
		49 59		converyor with teleporter 3
		49 60		converyor with teleporter 2
		49 61		converyor with teleporter 1

		57 00		rotate anticlockwise with rotater
		57 07		rotate anticlockwise with copper death
		57 08 		rotate anticlockwise with brass death (permanent no respawn)
		57 10		rotate anticlockwise with crusher
		57 11		rotate anticlockwise with crusher
		57 12		rotate anticlockwise with crusher
		57 13		rotate anticlockwise with crusher
		57 14		rotate anticlockwise with crusher
		57 15		rotate anticlockwise with crusher
		57 16		rotate anticlockwise with crusher
		57 17		rotate anticlockwise with crusher
		57 18		rotate anticlockwise with crusher
		57 33		rotate anticlockwise with teledest 3
		57 34		rotate anticlockwise with teledest 2
		57 35		rotate anticlockwise with teledest 1
		57 59		rotate anticlockwise with teleporter 3
		57 60		rotate anticlockwise with teleporter 2
		57 61		rotate anticlockwise with teleporter 1

		58 00		rotate clockwise with rotater
		58 07		rotate clockwise with copper death
		58 08 		rotate clockwise with brass death (permanent no respawn)
		58 10		rotate clockwise with crusher
		58 11		rotate clockwise with crusher
		58 12		rotate clockwise with crusher
		58 13		rotate clockwise with crusher
		58 14		rotate clockwise with crusher
		58 15		rotate clockwise with crusher
		58 16		rotate clockwise with crusher
		58 17		rotate clockwise with crusher
		58 18		rotate clockwise with crusher
		58 33		rotate clockwise with teledest 3
		58 34		rotate clockwise with teledest 2
		58 35		rotate clockwise with teledest 1
		58 59		rotate clockwise with teleporter 3
		58 60		rotate clockwise with teleporter 2
		58 61		rotate clockwise with teleporter 1

		59 05		no craters just goo
		59 06		uncraterable
		59 07		copper death
		59 08		brass death no respawn
		59 09		desert/mud
		59 10		crusher
		59 11		crusher
		59 12		crusher
		59 13		crusher
		59 14		crusher
		59 15		crusher
		59 16		crusher
		59 17		crusher
		59 18		crusher
		59 19		flamer
		59 20		flamer
		59 21		flamer
		59 22		cliff
		59 23		cliff
		59 24		cliff
		59 25		cliff
		59 26		spiker
		59 27		spiker
		59 28		spiker
		59 29		mortar
		59 30		chemical mortar
		59 31		napalm mortar
		59 32		mortar on dirt
		59 33		napalm mortar on dirt

		126 44		map bug 1 spawn
		126 45		map bug 2 spawn
		126 46		map bug 3 spawn
		126 47		map bug 4 spawn
		126 48		map bug 5 spawn
		126 49		map bug 6 spawn
		126 61		random spawn point

		127 44		bug 1 spawn point
		127 45		bug 2 spawn point
		127 46		bug 3 spawn point
		127 47		bug 4 spawn point
		127 48		bug 5 spawn point
		127 49		bug 6 spawn point
		127 50		bug 7 spawn point
		127 51		bug 8 spawn point
		127 52		bug 9 spawn point
		127 53		bug 10 spawn point
		127 41		flag
		127 09		mine
		127 43		wall
		127 57		wall
		127 01		wall
		127 02		wall
		127 03		wall
		127 04		wall
		127 05		wall
		127 06		wall
		127 07		wall
		127 08		wall



		;GFX64
			.gif file for custom graphics, base64 encoded
		;ENDGFX64
			end custom Base64 graphics (.gif)
		;BG64
			.png file for background, base64 encoded and animated
		;ENDBG64
			end custom Base64 background graphics (.png)
		;BUG64
			one of up to 6 map bugs, base64 encoded
		;ENDBUG64
			end map bug Base64 encoded



ASSEMBLY
		this is 68k assembly


MACRO PREPROCESSOR
		;PREPROCESSORON
		;PREPROCESSOROFF
		;IF ###
		;ENDIF
		;REPT 
		;ENDR
		;ASSIGN
		;DEFINE
		;@
		expressions -
				abs - ignore the sign
				atn - the arctangent
				cos - the cosine
				exp - exponential
				int - the floor of a floating point number
				fix - the ceiling of a floating point number
				rnd - random number. a seed may be given
				sgn - the sign of the number
				sin - the sine
				sqr - the square
				tan - tangent
				imp - logical IMPLICATION
				equ - logical EQUIVALENCE
				xor - nlogical XOR
				or  - logical OR
				and - logical AND
				mod - modulo operator
				not - logical NOT
				lb2 - log 2
				str - convert to string
				chr - gegt character from ascii value
				asc - get ascii value
				reg - perform regular expression match
				end - take # characters from end of a string
				stt - take # characters from start of a string
				hex - convert to hex

BASIC BUILTIN VARIABLES

		#firstunread_body
			first unread message
		#firstunread_bug
			first unread sender
		#firstunread_time
			first unread message sent time
		#lastunread_body
			last unread message
		#lastunread_bug
			last unread sender
		#lastunread_time
			last unread message sent time
		#lastread_body
			last read message
		#lastread_bug
			last read sender
		#lastread_time
			last read message sent time
		#cur_fuel
			current fuel
		#max_fuel
			max fuel
		#cur_ammo
			current ammo
		#set_ammo
			starting ammo
		#cur_score
			current score
		#cur_head
			current heading
		#random
			random number
		#scan
			scan return
		#scan2
			scan return 2
		#scand2
			scan return d 2
		#scan3
			scan return 3
		#scand3
			scan return d 3
		#shield
			shield on
		#burn
			current burn rate
		#x_pos
			x position
		#y_pos
			y position
		#cur_life
			current life
		#max_life
			maximum life
		#rank
			current rank
		#max_rank
			maximum rank
		#medals
			medals bitfield
		#maphash
			map hash
		#romfailed
			if rom failed to save/load
		#mapiff
			map iff
		#bug1hash
			bug 1s hash
		...
		#bug16hash
			bug 16s hash
		#enemy_hash
			enemy hash
		#enemy_rank
			enemy rank
		#enemy_medals
			enemy medals bitfield
		#enemy_x
			enemy x
		#enemy_y
			enemy y
		#enemy_h
			enemy heading
		#enemy_d
			enemy damage
		#enemy_upg2
			enemy upgrades second half 32 bit bitfield
		#enemy_upg2
			enemy upgrades first half 32 bit bitfield
		#it_x
			IT x
		#it_y	
			IT y
		#it_h
			IT heading
		#it_d
			IT damage
		#friend_x
			friend x
		#friend_y
			friend y
		#friend_h
			friend heading
		#friend_d
			friend damage
		#stratx
			strategy node x
		#straty
			strategy node y
		#heat
			current heat
		#alive
			num of bugs alive
		#bugnum
			bug number
		#signature
			is signature map
		#secret
			is secret map
		#supersecret
			is supersecret map
		#virgin
			is virgin map
		#inbound_x
			inbound x
		#inbound_y
			inbound y
		#inbound
			inbound
		#repairnode_x
			nearest repair node x
		#repairnode_y
			nearest repair node y
		#cloakstatus
			cloak on or off
		#overheatset
			overheat setting
		#overheaton
			overheat on or off
		#snodeoff
			if strategy node is off
		#smartclickoff
			if smartclicks are off
		#basiconly
			if battle is basic only
		#bloodmodeon
			blood mode on or off
		#lastcybugon
			last cybug fuel to points bonus
		#click
			the click num
		#miliclick
			miliclick
		#damset1
			damage setting 1
		...
		#damset22
			damage setting 22
		#itgame
			IT game settings
		#numlines
			number of lines of basic
		#upgradeson
			if upgrades are on
		#onfire
			if on fire
		#bump
			if bumped barrier
		#isqueen
			if is queen
		#queengame
			bitfield - queen game
		#sonar
			distance scanned
		#skinnyblackbox
			if saving skinny blackboxes
		#skinnyloaded
			if skinny blackbox has been loaded
		#upgrades2
			bitfield 32 bit second half of upgrades
		#upgrades
			bitfield 32 bit first half of upgrades
		#teamflag_x
			your team's flag x
		#teamflag_y
			your team's flag y
		#enemyflag_x
			your enemy's flag x
		#enemyflag_y
			your enemy's flag y
		#geiger
			geiger counter
		#geigerfront
			geiger at front
		#dominationx_1
			domination point 1 x
		#dominationy_1
			domination point 1 y
		#dominationf_1
			domination point 1 held by friend
		#dominatione_1
			domination point 1 held by enemy
		...
		#dominationx_5
			domination point 5 x
		#dominationy_5
			domination point 5 y
		#dominationf_5
			domination point 5 held by friend
		#dominatione_5
			domination point 5 held by enemy
		#scent1
			scent type 1 at front
		...
		#scent8
			scent type 8 at front
		#bug1scent
			bug 1 scent at front
		...
		#bug16scent
			bug 16 scent at front
		#smelloscentTYPExXyY
			smelloscope type TYPE x X y Y REQUIRES SMELLOSCOPE
		#smellobugBUGxXyY
			smelloscope bug BUG x X y Y REQUIRES SMELLOSCOPE
		#ssbugx_1
			bug 1 x REQUIRES SUPERSCANNER
		#ssbugy_1
			bug 1 y REQUIRES SUPERSCANNER
		#ssbugh_1
			bug 1 heading REQUIRES SUPERSCANNER
		#ssbugd_1
			bug 1 damage REQUIRES SUPERSCANNER
		#ssbugf_1
			bug 1 is friend REQUIRES SUPERSCANNER
		#ssbughash_1
			bug 1 hash REQUIRES SUPERSCANNER
		...
		#ssbugx_16
			bug 16 x REQUIRES SUPERSCANNER
		#ssbugy_16
			bug 16 y REQUIRES SUPERSCANNER
		#ssbugh_16
			bug 16 heading REQUIRES SUPERSCANNER
		#ssbugd_16
			bug 16 damage REQUIRES SUPERSCANNER
		#ssbugf_16
			bug 16 is friend REQUIRES SUPERSCANNER
		#ssbughash_16
			bug 16 hash REQUIRES SUPERSCANNER
		#ssflag_x
			nearest flag x REQUIRES SUPERSCANNER
		#ssflag_y
			nearest flag y REQUIRES SUPERSCANNER
		#ssattackerf_x
			attacker x REQUIRES SUPERSCANNER
		#ssattacker_y
			attacker y REQUIRES SUPERSCANNER
		#ssattacker_h
			attacker heading REQUIRES SUPERSCANNER
		#ssattacker_d
			attacker damage REQUIRES SUPERSCANNER
		#ssattacker
			attacker bug num REQUIRES SUPERSCANNER
		#los X Y
			line of sight X Y REQUIRES OPTICS ARRAY



ASM MEMORY ADDRESSES

	0xF1000000 r
		map pack, requires MAP PACK
	0xF2000000 r
		route, requires MAP PACK
	0xFA000000 rw
		user variables, in blocks of 1024
	0xFB000000 rw
		user variables as ints
	0xFC000000 rw
		hive variables in blocks of 1024
	0xFD000000 rw
		hive variables as ints
	0xFE000000 r
		map pack as ints REQUIRES MAP PACK

	MOVEMENT 
	0xFFFFEF00 w
		byte that sets movement
		0 no movement
		1 move forward
		2 move backward
		3 turn left
		4 turn right
		5 sidestep left (requires SUPERARTICULATED LEGS)
		6 sidestep right (requires SUPERARTICULATED LEGS)
		255 nitro (requires NITRO BOOST)		
	0xFFFFEF01 rw
		move data 1
	0xFFFFEF02 rw
		move data 2
	0xFFFFEF03 r
		move busy
	0xFFFFEF04 r
		bump
	0xFFFFEF05 r
		current heading
	0xFFFFEF06 r
		x position
	0xFFFFEF07 r
		y position
	0xFFFFEF08 r
		current fuel
	0xFFFFEF09 r
		current fuel byte 2
	0xFFFFEF0A r
		max fuel
	0xFFFFEF0B r
		max fuel byte 2

	SCANNER
	0xFFFFEE00 r
		scan report
	0xFFFFEE01 rw
		scan data 1
	0xFFFFEE02 rw
		scan data 2
	0xFFFFEE03 r
		scanner busy
	0xFFFFEE04 rw
		scan mask (4 BYTES)
	0xFFFFEE08 w
		byte that sets scan
		0 no scan
		1 long range scan
		2 scan perimeter
		3 scan forward
		4 scan left
		5 scan right
		6 wide scan
		7 scan position (SCAN DATA 1)
		8 scan relative (SCAN DATA 1)
		9 gps scan x (SCAN DATA 1) y (SCAN DATA 2)
		10 cross scan
		11 corner scan
	0xFFFFEE09 r
		sonar
	0xFFFFEE0A r
		scan 2
	0xFFFFEE0B r
		scan d 2
	0xFFFFEE0C r
		scan 3
	0xFFFFEE0D r
		scan d 3
	0xFFFFEE0E w
		los x
	0xFFFFEE0F w
		los y
	0xFFFFEE10 r
		los (requires OPTICS ARRAY)
	0xFFFFEE11 r
		geiger counter
	0xFFFFEE12 r
		read geiger counter on front position

	WEAPONS
	0xFFFFED00 w
		set byte to fire weapon
		0 - don't fire
		1 - fire primary weapon
		2 - launch missile
		3 - launch grenade
		4 - launch slow grenade
		5 - fire plasmagun (requires PLASMAGUN)
		6 - fire railgun (requires RAILGUN)
		7 - fire supershotgun (requires SUPERSHOTGUN)
		8 - flamethrower on (requires FLAMETHROWER)
		9 - flamethrower off (requires FLAMETHROWER)
		A - launch drunk missile (requires DRUNK MISSILES)
		64 - lower chainsaw (requires CHAINSAW)
		65 - raise chainsaw (requires CHAINSAW)
		66 - fire super sledgehammer (requires SUPER SLEDGEHAMMER)
		C8 - lightning on x WEAPON DATA 1 y WEAPON DATA 2 (requires LIGHTNING)
		C9 - lightning off (requires LIGHTNING)
		CA - fire bolt x WEAPON DATA 1 y WEAPON DATA 2 (requires BOLT THROWER)
		E6 - detonate remote bombs (requires REMOTE BOMBS)
		E7 - detonate remote bomb x WEAPON DATA 1 y WEAPON DATA 2 (requires REMOTE BOMBS)
		F0 - lay bombs on
		F1 - lay bombs off
		F2 - lay mines on
		F3 - lay mines off
		FB - ready super sledgehammer (requires SUPER SLEDGEHAMMER)
		FC - charge railgun (requires RAILGUN)
		FD - sonic boom (requires 5000 WATT BASS MACHINE)
 		FE - set bomb fuse WEAPON DATA 1
		FF - set grenade fuse WEAPON DATA 1
	0xFFFFED01 w
		weapon data 1
	0xFFFFED02 w
		weapon data 2
	0xFFFFED03 r
		weapon busy
	0xFFFFED04 r
		current ammo
	0xFFFFED05 r
		max ammo
	0xFFFFED06 r
		damage setting 1
	...
	0xFFFFED1B r
		damage setting 21
	0xFFFFED1C r
		damage setting 22


	ENEMY
	0xFFFFEC00 r
		enemy x
	0xFFFFEC01 r
		enemy y
	0xFFFFEC02 r
		enemy damage
	0xFFFFEC03 r
		enemy heading
	0xFFFFEC04 r
		enemy server rank (2 BYTES)
	0xFFFFEC06 r
		enemy server medals (4 BYTES)
	0xFFFFEC08 r
		enemy upgrades second longword (4 BYTES)
	0xFFFFEC0C r
		enemy upgrades first longword (4 BYTES)
	0xFFFFEC10 r
		enemy hash (32 BYTES)

	DEFENCE
	0xFFFFEB00 w
		set byte to do defence stuff
		0 - no defence stuff
		1 - raise shield
		2 - lower shield
		3 - cloak on
		4 - cloak off
		5 - raise dozer (requires DOZER BLADE)
		6 - lower dozer (requires DOZER BLADE) 
		7 - duke on x DEFENCE DATA 1 y DEFENCE DATA 2 (requires HOLODUKE)(
		8 - duke off (requires HOLODUKE)
		C8 - data link insert command MESSAGE
		C9 - data link take ammo DEFENCE DATA 1
		CA - data link take fuel DEFENCE DATA 1
		FF - fire airfist (requires AIRFIST)
	0xFFFFEB01 w
		defence data 1
	0xFFFFEB02 w
		defence data 2
	0xFFFFEB03 r
		defence busy
	0xFFFFEB04 r
		shield on
	0xFFFFEB05 r
		shield heat
	0xFFFFEB06 r
		heat setting
	0xFFFFEB07 r
		overheat on
	0xFFFFEB08 r
		cloak status
	0xFFFFEB09 r
		inbound
	0xFFFFEB0A r
		inbound x
	0xFFFFEB0B r
		inbound y

	REPAIRS
	0xFFFFEA00 w
		byte for repairs
		0 - don't repair
		1 - attempt repairs
		2 - repair forward
		3 - repair engine
		4 - extinguish fire
		64 - convert ammo to fuel
		65 - convert fuel to ammo
		FB - discharge emp (requires EMP)
		FC - discharge light
		FD - discharge energy
		FE - discharge hard
		FF - self destruct
	0xFFFFEA01 w
		repair data 1
	0xFFFFEA02 w
		repair data 2
	0xFFFFEA03 r
		repair busy
	0xFFFFEA04 r
		current life
	0xFFFFEA05 r
		max life
	0xFFFFEA06 r
		burn rate
	0xFFFFEA07 r
		on fire
	0xFFFFEA08 r
		upgrades second longword (4 BYTES)
	0xFFFFEA0C r
		upgrades first longword (4 BYTES)

	MISSION CONTROL
	0xFFFFE800 w
		set byte
		0 - no mission control
		1 - set IFF code
		2 - take map IFF code
		3 - queen
		4 - buy upgrade MISSION DATA 1
		5 - name MESSAGE
		6 - clan MESSAGE
		7 - author MESSAGE
		64 - save ROM name MESSAGE
		65 - load ROM slot MISSION DATA 1 name MESSAGE
		66 - assign IFFCODE to MESSAGE
		C8 - green plasma on
		C9 - green plasma off
		CA - change sprite to MISSION DATA 1
		FC - debug on
		FD - debug off
		FE - IDKFA cheat
		FF - IFFCODE [MISSION DATA 2] = MISSION DATA 1
	0xFFFFE801 w
		MISSION DATA 1
	0xFFFFE802 w
		MISSION DATA 2
	0xFFFFE803 r
		mission control busy
	0xFFFFE804 r
		is queen
	0xFFFFE805 r
		queen game bitfield
	0xFFFFE806 r
		domination game bitfield
	0xFFFFE808 r
		current score (2 BYTES)
	0xFFFFE80A r
		rank (2 BYTES)
	0xFFFFE80C r
		max rank (2 BYTES)
	0xFFFFE80E r
		strategy node off
	0xFFFFE810 r
		strategy node x
	0xFFFFE811 r
		strategy node y
	0xFFFFE812 r
		number of bugs alive
	0xFFFFE813 r
		bug number
	0xFFFFE814 r
		is signature map
	0xFFFFE815 r
		is secret map
	0xFFFFE816 r
		is supersecret map
	0xFFFFE817 r
		is virgin map
	0xFFFFE818 r
		medals (2 BYTES)
	0xFFFFE81A r
		map hash (32 BYTES)
	0xFFFFE83A r
		map iff  (32 BYTES)
	0xFFFFE85A r
		IT x
	0xFFFFE85B r
		IT y
	0xFFFFE85C r
		IT heading
	0xFFFFE85D r
		IT damage
	0xFFFFE85E r
		friend x
	0xFFFFE85F r
		friend y
	0xFFFFE860 r
		friend damage
	0xFFFFE861 r
		friend heading
	0xFFFFE862 r
		nearest repair node x
	0xFFFFE863 r
		nearest repair node y
	0xFFFFE864 r
		blood mode on
	0xFFFFE865 r
		last cybug bonus on
	0xFFFFE866 r
		IT game bitfield
	0xFFFFE867 r
		upgrades on mode
	0xFFFFE868 r
		team flag x
	0xFFFFE869 r
		team flag y
	0xFFFFE86A r
		enemy flag x
	0xFFFFE86B r
		enemy flag y
	0xFFFFE86C r
		domination point 1 x
	0xFFFFE86D r
		domination point 1 y
	0xFFFFE86E r
		domination point 1 is held by friendly
	0xFFFFE86F r
		domination point 1 is held by enemy
	...
	0xFFFFE87C r
		domination point 5 x
	0xFFFFE87D r
		domination point 5 y
	0xFFFFE87E r
		domination point 5 is held by friendly
	0xFFFFE87F r
		domination point 5 is held by enemy


	COMMOS
	0xFFFFE700 rw
		new message position (2 BYTES)
	0xFFFFE702 w
		new message character MESSAGE
	0xFFFFE703 w
		new message send
	0xFFFFE704 r
		last unread message time (2 BYTES)
	0xFFFFE706 r
		last unread message length (2 BYTES)
	0xFFFFE708 rw
		last unread message position (2 BYTES)
	0xFFFFE70A r
		last unread message character at position
	0xFFFFE70B w
		last unread message mark as read
	0xFFFFE70C r
		last unread message bug
	0xFFFFE70E r
		first unread message time (2 BYTES)
	0xFFFFE710 r
		first unread message length (2 BYTES)
	0xFFFFE712 rw
		first unread message position (2 BYTES)
	0xFFFFE714 r
		first unread message character at position
	0xFFFFE715 w
		first unread message mark as read
	0xFFFFE716 r
		first unread message bug
	0xFFFFE718 r
		last read message time (2 BYTES)
	0xFFFFE71A r
		last read message length (2 BYTES)
	0xFFFFE71C rw
		last read message position (2 BYTES)
	0xFFFFE71E r
		last read message character at position
	0xFFFFE71F r
		last read message bug

	CODE STUFF
	0xFFFFE600 r
		random number
	0xFFFFE601 r
		rom failed
	0xFFFFE602 r
		click (4 BYTES)
	0xFFFFE606 r
		miliclick (4 BYTES)
	0xFFFFE60A r
		smartclicks off
	0xFFFFE60B r
		BASIC only
	0xFFFFE60C r
		number of lines in rom (2 BYTES)
	0xFFFFE60E rw
		skinny blackboxes
	0xFFFFE60F r
		skinny blackbox loaded

	HASHES
	0xFFFFE400 r
		Bug 1 Hash (32 bytes)
	...
	0xFFFFE5E0 r
		Bug 16 Hash (32 bytes)

	SCENTS
	0xFFFFE200 r
		scent 1
	...
	0xFFFFE207 r
		scent 8
	0xFFFFE208 r
		bug 1 scent
	...
	0xFFFFE217 r
		bug 16 scent
	0xFFFFE218 w
		smell gadgets
		0 - don't do anything
		1 - set scent type SCENT DATA
		2 - turn scent off
		65 - smelloscope type SCENT DATA x SCENT X y SCENT y (requires SMELLOSCOPE)
		66 - smelloscope by bug bug SCENT DATA x SCENT X y SCENT y (requires SMELLOSCOPE)
		67 - stinkray type SCENT DATA x SCENT X y SCENT y (requires STINKRAY)
	0xFFFFE219 w
		scent x
	0xFFFFE21A w
		scent y
	0xFFFFE21B w
		scent data
	0xFFFFE21C r
		scent ready
	0xFFFFE21D r
		smelloscope out (requires SMELLOSCOPE)

	SUPERSCANNER
	0xFFFFE000 r
		bug 1 x (requires SUPER SCANNER)
	0xFFFFE001 r
		bug 1 y (requires SUPER SCANNER)
	0xFFFFE002 r
		bug 1 heading (requires SUPER SCANNER)
	0xFFFFE003 r
		bug 1 damage (requires SUPER SCANNER)
	0xFFFFE004 r
		bug 1 is friend (requires SUPER SCANNER)
	0xFFFFE008 r
		bug 2 x (requires SUPER SCANNER)
	...
	0xFFFFE078 r
		bug 16 x (requires SUPER SCANNER)
	0xFFFFE079 r
		bug 16 y (requires SUPER SCANNER)
	0xFFFFE07A r
		bug 16 heading (requires SUPER SCANNER)
	0xFFFFE07B r
		bug 16 damage (requires SUPER SCANNER)
	0xFFFFE07C r
		bug 16 is friend (requires SUPER SCANNER)
	0xFFFFE080 r
		closest flag x (requires SUPER SCANNER)
	0xFFFFE081 r
		closest flag y (requires SUPER SCANNER)
	0xFFFFE082 r
		attacker x (requires SUPER SCANNER)
	0xFFFFE083 r
		attacker y (requires SUPER SCANNER)
	0xFFFFE084 r
		attacker heading (requires SUPER SCANNER)
	0xFFFFE085 r
		attacker damage (requires SUPER SCANNER)
	0xFFFFE086 r
		attacker number (requires SUPER SCANNER)




DAMSET VARIABLES
	1	5	mine damage
	2	9	missile/mortar/barrel direct hit unshielded
	3	7	missile/mortar/barrel splash damage unshielded
	4	5	primary weapon point blank, unshielded
	5	4	primary weapon range 1, unshielded
	6	3	primary weapon range 2, unshielded
	7	5	flag on full health damage
	8	2	discharge damage
	9	1	discharge damage to self
	10	6	missile/mortar/barrel direct hit shielded
	11	4	missile/mortar/barrel splash damage shielded
	12	2	primary weapon point blank, shielded
	13	1	primary weapon range 1, shielded
	14	0	primary weapon range 2, shielded
	15	2	primary weapon range 3, unshielded
	16	0	primary weapon range 3, shielded
	17	1	primary weapon range 4, unshielded
	18 	0	primary weapon range 4, shielded
	19	4	grenade/bomb direct hit, shielded
	20	7	grenade/bomb direct hit, unshielded
	21	2	grenade/bomb splash damage, shielded
	22	5	grenade/bomb splash damage, unshielded

	
