| AutoMine v1.60
|  Musus Umbra, 1995-8

| Set up the paths and filetype etc.
|
set AutoMine$Dir <obey$dir>
set AutoMine$Path <AutoMine$Dir>.
set file$type_c4f AutoMine
set alias$@runtype_c4f "/<AutoMine$Dir> "

| Iconsprites
|
set __osv$ 300
rmensure UtilityModule 3.00 set __osv$ 200
if "<__osv$>" = "300" THEN iconsprites <AutoMine$Dir>.!Sprites ELSE /<Automine$Dir>.Resources.SmartIcons <obey$dir>.!Sprites
unset __osv$

| Make sure we have the necesary support modules:
rmensure utilitymodule 3.00 if "<system$path>" = "" then error Please locate a copy of !System and try again
rmensure SharedCLibrary 0.00 rmload system:modules.Clib
rmensure FPEmulator     2.70 rmload system:modules.FPEmulator
rmensure ColourTrans    0.00 rmload system:modules.Colours


| The game can load in less than 64K, but really needs at least 168K
| to have a hope of initialising and running
|
| Versions from 1.59 use a Dynamic Area for sprites (if possible)
| so need ~76K less WimpSlot to run
wimpslot -min 176K -max 176K
wimpslot -min 100K -max 100K
rmensure UtilityModule 3.50 wimpslot -min 176 -max 176K


| This line removed - it seems that (probably due to new code), the game
| needs to grab at least another 4K page at some time when running.
| (hence the 176 even though only 168 is needed at startup).
| wimpslot -min 64K -max 64K

| Run the main program passing any saved game as an argument
|
AutoMine:!RunImage %*0