| !Start file for the MacroMedia Shockwave "Plugin" for RISC OS version 1.4 (d24)

| Start up file to launch the Shockwave, this is executed from the
| movie directories, by their !Run file.

If "<Shockwave$IsRunning>"="Yes" Then Error 0 The Shockwave Plugin is already running

Set Shockwave$Resource$Dir <Shockwave$Dir>

| Ensure any of our system extensions

RMEnsure AtomManager 1.01 RMLoad <Shockwave$Dir>.Modules.Atom
RMEnsure AtomManager 1.01 Error AtomManager 1.00 needed
RMReInit AtomManager

RMEnsure SoundWave 0.12 RMLoad <Shockwave$Dir>.Modules.SoundWave
RMEnsure SoundWave 0.12 Error SoundWave module 0.12 needed

RMEnsure CDSupport 0.12 RMLoad <Shockwave$Dir>.Modules.CDSupport
RMEnsure CDSupport 0.12 Error CDSupport module 0.12 needed

| Check if we are running on any NC
Set NC True
RMEnsure OSVersion 0.01 Set NC False

IF "<NC>"="True"  Then RMEnsure UtilityModule 4.52 RMEnsure CallASWI 0.01 RMLoad <Shockwave$Dir>.Modules.CallASWI 

IF "<NC>"="False" Then RMEnsure UtilityModule 3.70 RMEnsure CallASWI 0.01 RMLoad <Shockwave$Dir>.Modules.CallASWI

If "<STB$Type>" <> "" Then RMEnsure CallASWI 0.01 RMLoad <Shockwave$Dir>.Modules.CallASWI

| Check player version.  1024 for STB1 or RISC PC.  1025 for STB2
Set Shockwave$MachineType 1025
RMEnsure UtilityModule 3.61 Set Shockwave$MachineType 1024

| Check Wimp version. 1=> nested wimp

Set Shockwave$WimpVersion 1
RMEnsure WindowManager 3.82 Set Shockwave$WimpVersion 0

| Ensure our slot, and then start the kick of the Shockwave executable

WimpSlot -min 1000K -max 1000k

Set Shockwave$HeapSize 4M

Set Shockwave$IsRunning Yes

Run <Shockwave$Dir>.Plugin -S -W10 %*0

If "<Navigator$Dir>" <> "" Then <Navigator$Dir>.Library.SetLims

UnSet Shockwave$IsRunning

