| !Run for Vanilla Conquer: Tiberian Dawn
Set VanillaTD$Dir <Obey$Dir>
IconSprites <VanillaTD$Dir>.!Sprites
| Low resolution: 1 always runs the game at 320x200 (the DOS version's size). 0 uses
| the size chosen from Screen size on the icon bar menu, which has 320x200 too.
Set VanillaTD$LowRes 0
| SharedUnixLibrary is normally in !System; fall back to the copy shipped here.
RMEnsure SharedUnixLibrary 1.16 IfThere System:Modules.SharedULib Then RMLoad System:Modules.SharedULib
RMEnsure SharedUnixLibrary 1.16 RMLoad <VanillaTD$Dir>.Modules.SharedULib
RMEnsure SharedUnixLibrary 1.16 Error Vanilla Conquer needs SharedUnixLibrary 1.16 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.vcprep
| 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
| gamedata.MIX.CONQUER is. A problem goes in VanillaTD$DataProblem, and then a click on the icon
| says how to install the data instead of starting the game. VanillaTD$NoDataCheck skips the
| check.
WimpSlot -min 1000K -max 1000K
Set VanillaTD$Checker 0
IfThere <VanillaTD$Dir>.Utils.vcprep Then Set VanillaTD$Checker 1
Set VanillaTD$DataProblem MIX.CONQUER is missing
If <VanillaTD$Checker>=1 Then Run <VanillaTD$Dir>.Utils.vcprep -check td -app <VanillaTD$Dir>
If <VanillaTD$Checker>=0 Then IfThere <VanillaTD$Dir>.gamedata.MIX.CONQUER Then Unset VanillaTD$DataProblem
Unset VanillaTD$Checker
If "<VanillaTD$NoDataCheck>"<>"" Then Unset VanillaTD$DataProblem
| DigitalRenderer plays the sound (via SDL). Without it the game runs silently.
RMEnsure DigitalRenderer 0.56 IfThere System:Modules.DRenderer Then RMLoad System:Modules.DRenderer
RMEnsure DigitalRenderer 0.56 RMLoad <VanillaTD$Dir>.Modules.DRenderer
| Sound: SharedSoundBuffer mixes the game's sound with other programs' sound, if SharedSound,
| StreamManager and SharedSoundBuffer are in !System (not included here; StreamManager and
| SharedSoundBuffer are in ssb.zip on the RDPClient page). Without them, or with
| DigitalRenderer here, DigitalRenderer plays it.
Set VanillaTD$Sound DigitalRenderer
If "<VanillaTD$Sound>"="SharedSoundBuffer" Then RMEnsure SharedSound 1.07 IfThere System:Modules.SSound Then RMLoad System:Modules.SSound
If "<VanillaTD$Sound>"="SharedSoundBuffer" Then RMEnsure StreamManager 0.03 IfThere System:Modules.StreamMan Then RMLoad System:Modules.StreamMan
If "<VanillaTD$Sound>"="SharedSoundBuffer" Then RMEnsure SharedSoundBuffer 0.07 IfThere System:Modules.SSBuffer Then RMLoad System:Modules.SSBuffer
WimpSlot -min 4000K -max 4000K
Run <VanillaTD$Dir>.!RunImage %*0 >/<VanillaTD$Dir>/stdout 2>/<VanillaTD$Dir>/stderr
