home *** CD-ROM | disk | FTP | other *** search
- on enterFrame
- global gAmberPath, gSavePath, gProjectorPath, fastLocationData, gCPU, gCDtry, testData, gMaxCDtries, killMe
- if killMe = 1 then
- exit
- end if
- set gMaxCDtries to 4
- if voidp(gCDtry) then
- set gCDtry to 1
- end if
- if gCPU = #PC then
- openXLib("FileIO.x32")
- set buildTest to new(xtra("FileIO"))
- if not objectp(buildTest) then
- alert("Sorry, couldn't create FileIO object (Has the game program been moved from its folder?)")
- quit()
- end if
- openFile(buildTest, the pathName & "building.txt", 1)
- if 1 then
- set buildTest to 0
- set gAmberPath to the pathName
- else
- set buildTest to 0
- if gCDtry <= gMaxCDtries then
- set cdLetter to GetCDletter("amber_jb.", 1)
- if stringp(cdLetter) then
- set gAmberPath to char 1 to 2 of cdLetter & "\"
- put "gAmberPath = "
- put gAmberPath
- else
- put cdLetter
- if gCDtry < gMaxCDtries then
- alert("Please insert the " & QUOTE & "AMBER: Journeys Beyond, Disc B" & QUOTE & " CD into any drive")
- else
- alert("Sorry, the CD doesn't seem to be mounted")
- end if
- end if
- end if
- if gCDtry = gMaxCDtries then
- put "gAmberPath =" & gAmberPath
- if voidp(gAmberPath) then
- put "<#PC> OK, now I'd really quit.."
- delay(120)
- put "quitting now?"
- quit()
- set killMe to 1
- put "Hm.. should've quit by now.."
- end if
- end if
- end if
- else
- end if
- set gCDtry to gCDtry + 1
- set gProjectorPath to the pathName
- if stringp(gAmberPath) then
- set oldDelim to the itemDelimiter
- if gCPU = #Mac then
- set the itemDelimiter to ":"
- end if
- if gCPU = #PC then
- set the itemDelimiter to "\"
- end if
- set buildFlag to 0
- if gCPU = #PC then
- set buildTest to new(xtra("FileIO"))
- if not objectp(buildTest) then
- alert("Sorry, couldn't create FileIO object (Has the game program been moved from its folder?)")
- quit()
- end if
- openFile(buildTest, the pathName & "building.txt", 1)
- if error(buildTest, status(buildTest)) = "OK" then
- closefile(buildTest)
- set buildFlag to 1
- end if
- set buildTest to 0
- else
- if item 1 of gProjectorPath <> "Jumbo" then
- set buildFlag to 1
- end if
- end if
- if buildFlag = 0 then
- if item 1 of gProjectorPath = item 1 of gAmberPath then
- end if
- end if
- set the itemDelimiter to oldDelim
- end if
- if gCPU = #PC then
- set gSavePath to the pathName & "SAVEDATA\"
- else
- set gSavePath to the pathName & "saved games:"
- end if
- put "gSavePath = " & gSavePath
- set fastLocationData to 1
- end
-
- on exitFrame
- global gAmberPath, gMaxCDtries, gCDtry, gCPU, gProjectorPath
- if voidp(gAmberPath) then
- if gCDtry <= gMaxCDtries then
- if integerp(gCDtry) then
- go(the frame)
- end if
- return
- put "ΓÇó You shouldn't see this!"
- else
- exit
- end if
- end if
- put "old searchPath = "
- put the searchPath
- append(the searchPath, gAmberPath)
- if gCPU = #PC then
- set tempSoundPath to gProjectorPath & "GAMEDATA\"
- set logoPath to gAmberPath & "ROXY\MOVIES\"
- else
- set tempSoundPath to gProjectorPath & "sounds etc.:"
- set logoPath to gAmberPath & "ROXY:movies:"
- end if
- append(the searchPath, tempSoundPath)
- append(the searchPath, logoPath)
- put "new searchPath (going to HUB) = "
- put the searchPath
- go(1, "AMBERHUB")
- end
-