| !Run for OpenTS. The game data (the MIX files) goes in the gamedata directory here.
Set OpenTS$Dir <Obey$Dir>
IconSprites <OpenTS$Dir>.!Sprites
RMEnsure SharedUnixLibrary 1.16 IfThere System:Modules.SharedULib Then RMLoad System:Modules.SharedULib
RMEnsure SharedUnixLibrary 1.16 Error OpenTS needs SharedUnixLibrary 1.16 or later
RMEnsure ARMEABISupport 1.03 IfThere System:Modules.ARMEABISupport Then RMLoad System:Modules.ARMEABISupport
RMEnsure ARMEABISupport 1.03 Error OpenTS needs ARMEABISupport 1.03 or later
| The game data comes from the freeware CD images (ISO files), dragged onto the icon bar
| icon, and goes in the gamedata directory here (deleting it uninstalls it). Utils.tsprep
| moves data an earlier version installed straight into this directory into gamedata, then
| checks that every file is there at its size (no checksums, so it's quick); without it,
| that TIBSUN/MIX is. A problem goes in OpenTS$DataProblem, and then a click on the icon
| says how to install the data instead of starting the game. OpenTS$NoDataCheck skips the
| check.
WimpSlot -min 2000K -max 2000K
Set OpenTS$Checker 0
IfThere <OpenTS$Dir>.Utils.tsprep Then Set OpenTS$Checker 1
Set OpenTS$DataProblem TIBSUN/MIX is missing
If <OpenTS$Checker>=1 Then Run <OpenTS$Dir>.Utils.tsprep -check -dest <OpenTS$Dir>.gamedata -old <OpenTS$Dir>
If <OpenTS$Checker>=0 Then IfThere <OpenTS$Dir>.gamedata.TIBSUN/MIX Then Unset OpenTS$DataProblem
Unset OpenTS$Checker
If "<OpenTS$NoDataCheck>"<>"" Then Unset OpenTS$DataProblem
| DigitalRenderer plays the sound (through UnixLib's /dev/dsp). Without it the game is silent.
RMEnsure DigitalRenderer 0.55 IfThere System:Modules.DRenderer Then RMLoad System:Modules.DRenderer
| On the Pi the display stretches the game's frames through an overlay (VideoOverlay, in !System).
RMEnsure VideoOverlay 0.00 IfThere System:Modules.VideoOverlay Then RMLoad System:Modules.VideoOverlay
| The heap goes in a dynamic area, so the slot only holds the program.
Set OpenTS$Heap ""
WimpSlot -min 32000K -max 32000K
Dir <OpenTS$Dir>
Run <OpenTS$Dir>.!RunImage %*0 >/<OpenTS$Dir>/stdout 2>/<OpenTS$Dir>/stderr
