| !Run for Vanilla Conquer: Red Alert
Set VanillaRA$Dir <Obey$Dir>
IconSprites <VanillaRA$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 VanillaRA$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 <VanillaRA$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.REDALERT is. A problem goes in VanillaRA$DataProblem, and then a click on the icon
| says how to install the data instead of starting the game. VanillaRA$NoDataCheck skips the
| check.
WimpSlot -min 1000K -max 1000K
Set VanillaRA$Checker 0
IfThere <VanillaRA$Dir>.Utils.vcprep Then Set VanillaRA$Checker 1
Set VanillaRA$DataProblem MIX.REDALERT is missing
If <VanillaRA$Checker>=1 Then Run <VanillaRA$Dir>.Utils.vcprep -check ra -raapp <VanillaRA$Dir>
If <VanillaRA$Checker>=0 Then IfThere <VanillaRA$Dir>.gamedata.MIX.REDALERT Then Unset VanillaRA$DataProblem
Unset VanillaRA$Checker
If "<VanillaRA$NoDataCheck>"<>"" Then Unset VanillaRA$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 <VanillaRA$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 VanillaRA$Sound DigitalRenderer
If "<VanillaRA$Sound>"="SharedSoundBuffer" Then RMEnsure SharedSound 1.07 IfThere System:Modules.SSound Then RMLoad System:Modules.SSound
If "<VanillaRA$Sound>"="SharedSoundBuffer" Then RMEnsure StreamManager 0.03 IfThere System:Modules.StreamMan Then RMLoad System:Modules.StreamMan
If "<VanillaRA$Sound>"="SharedSoundBuffer" Then RMEnsure SharedSoundBuffer 0.07 IfThere System:Modules.SSBuffer Then RMLoad System:Modules.SSBuffer
| The heap is in a dynamic area of its own (see redalert/startup.cpp).
WimpSlot -min 6000K -max 6000K
Run <VanillaRA$Dir>.!RunImage %*0 >/<VanillaRA$Dir>/stdout 2>/<VanillaRA$Dir>/stderr
