|
| !Run file for AMPlayCfg v2  
|
Set AMPlayCfg$Dir <Obey$Dir>
Iconsprites <AMPlayCfg$Dir>.!Sprites

| Uncomment one of these to select the executable type to run.
| This will need changing for production releases.
Set AMPlayCfg$Type Unlinked
|Set AMPlayCfg$Type Linked
|Set AMPlayCfg$Type Crunched
|Set AMPlayCfg$Type Compiled


| Filetype handling:
| Our own file type first - always set this.
Set File$Type_1B2 AMPlayCf
Set Alias$@RunType_1B2 Run <AMPlayCfg$Dir>.!Run %%*0


| Ensure ABCLib is loaded.
| (only needed for compiled runimage)
RMEnsure ABCLibrary 4.15 RMLoad System:Modules.ABClib
Set AMPlayCfg%ABC 1
RMEnsure ABCLibrary 0.00 Set AMPlayCfg%ABC 0
IF AMPlayCfg%ABC = 0 THEN RMEnsure ABClibrary 4.15 IfThere System:Modules.ABCLib Then RMLoad System:Modules.ABClib
IF AMPlayCfg%ABC = 0 THEN RMEnsure ABCLibrary 4.15 Error AMPlayCfg requires ABCLib 4.15 or later. A copy of this, with instructions, should have been included in the AMPlay distribution. 
IF AMPlayCfg%ABC = 1 THEN RMEnsure ABCLibrary 4.15 Error AMPlayCfg requires ABCLib 4.15 or later. You are running an old version of ABCLib. Please update ABCLib to 4.15 or later.
Unset AMPlayCfg%ABC

| Use Resfind to work out where to load messages and templates from.
Run <AMPlayCfg$Dir>.Internal.ResFind AMPlayCfg

| Set wimpslot.
If "<AMPlayCfg$Type>" = "Unlinked" Then WimpSlot -min 1024k -max 1024k
If "<AMPlayCfg$Type>" = "Linked" Then WimpSlot -min 512k -max 512k
If "<AMPlayCfg$Type>" = "Crunched" Then WimpSlot -min 256k -max 256k
If "<AMPlayCfg$Type>" = "Compiled" Then WimpSlot -min 480k -max 480k

| Run AMPlayCfg
If "<AMPlayCfg$Type>" = "Unlinked" Then Run <AMPlayCfg$Dir>.!RunImage %*0
If "<AMPlayCfg$Type>" = "Linked" Then Run <AMPlayCfg$Dir>.!RunImageL %*0
If "<AMPlayCfg$Type>" = "Crunched" Then Run <AMPlayCfg$Dir>.!RunImageC %*0
If "<AMPlayCfg$Type>" = "Compiled" Then Run <AMPlayCfg$Dir>.!RunImageO %*0
