home *** CD-ROM | disk | FTP | other *** search
- on xxtest desiredDisc, whichTunnel
- global gAmberPath, gVoid, gCPU, gProjectorPath
- set discInPlace to 0
- set maxCDtries to 3
- set CDtry to 1
- set gAmberPath to gVoid
- repeat while discInPlace = 0
- put "CDtry = " & CDtry
- if gCPU = #PC then
- openXLib("LABELDRV.DLL")
- set ld to labelDrv(mnew)
- put ld(mSetRange, "A", "Z")
- if CDtry <= maxCDtries then
- set cdLetter to ld(mGetDrive, "AMBER_DISC" & desiredDisc)
- put "cdLetter = "
- put cdLetter
- if charToNum(char 1 of cdLetter) <> 0 then
- set gAmberPath to char 1 to 2 of cdLetter & "\"
- put "gAmberPath = "
- put gAmberPath
- set discInPlace to 1
- else
- if stringp(whichTunnel) then
- go(whichTunnel, gProjectorPath & "LIFEBOAT")
- else
- go(1, gProjectorPath & "LIFEBOAT")
- end if
- put "bad string"
- if CDtry < maxCDtries then
- alert("Please insert the " & QUOTE & "AMBER_DISC" & desiredDisc & QUOTE & " CD into any drive")
- else
- alert("Sorry, the CD doesn't seem to be mounted")
- end if
- end if
- end if
- if CDtry = maxCDtries then
- put "xxTest(): gAmberPath (failed to find cd) =" & gAmberPath
- if voidp(gAmberPath) then
- put "final volumeTest = "
- put cdLetter
- put "OK, now I'd really quit.."
- clearGlobals()
- quit()
- end if
- end if
- put ld(mdispose)
- closeXLib("LABELDRV.DLL")
- else
- if the pathName contains "Jumbo" then
- alert("OK, since I'm on Jumbo we'll play from the hard-disk..")
- set gAmberPath to "Jumbo:Desktop Folder:AMBER project:AMBER Disc " & desiredDisc & ":"
- set gSoundPath2 to gAmberPath & "CD_SOUNDS:"
- exit
- else
- if CDtry <= maxCDtries then
- put "ΓÇóΓÇóΓÇótesting for proper disc.."
- set volumeTest to FileIO(mnew, "read", "AMBER Disc " & desiredDisc & ":Read Me")
- if objectp(volumeTest) then
- volumeTest(mdispose)
- set gAmberPath to "AMBER Disc " & desiredDisc & ":"
- set discInPlace to 1
- put "ΓÇóΓÇóΓÇóthe disc is in place!"
- else
- put "ΓÇóΓÇóΓÇóvolumetest = " & volumeTest
- if stringp(whichTunnel) then
- go(whichTunnel, gProjectorPath & "LIFEBOAT")
- else
- go(2, gProjectorPath & "LIFEBOAT")
- end if
- if integerp(volumeTest) then
- put "[!] fileIO error -> " & FileIO(mError, volumeTest)
- if getPos([-35, -120, -43], volumeTest) <> 0 then
- if CDtry < maxCDtries then
- set tempCDobject to AppleCD(mnew)
- tempCDobject(mEject)
- put "<i> Disposing of CD-ejector object: " & tempCDobject(mdispose)
- alert("Please insert the " & QUOTE & "AMBER Disc " & desiredDisc & QUOTE & " CD into any drive")
- else
- alert("Sorry, there is an error in trying to find the CD:" & RETURN & RETURN & " '" & FileIO(mError, volumeTest) & "'")
- end if
- else
- alert("Sorry, there is an error in trying to find the CD:" & RETURN & RETURN & " '" & FileIO(mError, volumeTest) & "'")
- end if
- else
- alert("Sorry, there is an unknown error in trying to find the CD")
- end if
- end if
- end if
- if CDtry = maxCDtries then
- put "xxTest(): gAmberPath =" & gAmberPath
- if voidp(gAmberPath) then
- put "final volumeTest = "
- put volumeTest
- put "OK, now I'd really quit.."
- clearGlobals()
- quit()
- end if
- end if
- end if
- end if
- set CDtry to CDtry + 1
- updateStage()
- end repeat
- if gCPU = #PC then
- set gSoundPath2 to gAmberPath & "CD_DATA\"
- else
- set gSoundPath2 to gAmberPath & "CD_SOUNDS:"
- end if
- put "<i> new gSoundPath2 = '" & gSoundPath2 & "'"
- end
-