home *** CD-ROM | disk | FTP | other *** search
- on ancestorTest me
- put "<!> Here I am; ancestor functioning nicely, without a birth() handler!!"
- end
-
- on ensureProperCD me, destination, lastOuterDomain
- global domainIsReady, gAmberPath, gSoundPath2, gCPU, gVoid, gProjectorPath, gIdleNow, gCDswapStash, gCDtry
- set desiredDisc to 1
- if (destination = "roxy") and (count(the lsStateData of me) > 0) then
- set ghostRoster to getaProp(the lsStateData of me, #ghostsRemaining)
- if voidp(ghostRoster) then
- set roxyState to getProp(the lsStateData of me, #StateOnIce)
- set ghostRoster to getProp(roxyState, #ghostsRemaining)
- end if
- if count(ghostRoster) < 1 then
- set desiredDisc to 2
- set whichTunnel to lastOuterDomain
- end if
- end if
- addProp(gCDswapStash, #desiredDisc, desiredDisc)
- put "<i> gCDswapStash = " & gCDswapStash
- put "<i> looking for DISC " & desiredDisc
- 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, gProjectorPath & "building.txt", 1)
- if 1 then
- set buildTest to 0
- set gAmberPath to the pathName
- set gSoundPath2 to gAmberPath & "CD_DATA\"
- else
- set buildTest to 0
- put "ensureProperCD(): going to GetCDletter() for disc " & desiredDisc
- set cdLetter to GetCDletter("amber_jb.", desiredDisc)
- put "cdLetter = "
- put cdLetter
- if stringp(cdLetter) then
- put "cdLetter = " & cdLetter
- set gAmberPath to char 1 to 2 of cdLetter & "\"
- put "ensureProperCD(): gAmberPath ( based on GetCDLetter() ) = "
- put gAmberPath
- return
- else
- put "ΓÇóΓÇóΓÇówrong disc, proceeding to LIFEBOAT.."
- set gCDtry to 1
- if stringp(whichTunnel) then
- go(whichTunnel, gProjectorPath & "LIFEBOAT")
- else
- go(1, gProjectorPath & "LIFEBOAT")
- end if
- end if
- abort()
- end if
- 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
- set volumeTest to FileIO(mnew, "read", "AMBER Disc " & desiredDisc & ":Read Me")
- if objectp(volumeTest) then
- volumeTest(mdispose)
- set gAmberPath to "AMBER Disc " & desiredDisc & ":"
- put "gAmberPath = "
- put gAmberPath
- return
- else
- put "ΓÇóΓÇóΓÇóvolumetest = " & volumeTest
- put "ΓÇóΓÇóΓÇówrong disc, proceeding to LIFEBOAT.."
- set gCDtry to 1
- if stringp(whichTunnel) then
- go(whichTunnel, gProjectorPath & "LIFEBOAT")
- else
- go(2, gProjectorPath & "LIFEBOAT")
- end if
- abort()
- end if
- end if
- end if
- put "<!> ensureProperCD(): You shouldn't be able to see this.."
- end
-
- on quitGame me
- global oPuppeteer, gCPU, gAmberPath, gOldSndLevel, oBackdrop, oUtility, oMemory, colorcrsr, gSavePath, domainIsReady, testData
- puppetTransition(1)
- installMenu(0)
- updateStage()
- if objectp(oBackdrop) then
- oBackdrop(mPatToWindow, -5)
- end if
- if objectp(colorcrsr) then
- colorcrsr(mGetSetCursor, getProp(YugoCursors, #noCursor))
- else
- cursor(200)
- end if
- set gCursorSwitch to #off
- fadeOutTransit()
- go("quit", gAmberPath & "AMBERHUB")
- wait(240)
- writePrefsFile(oPuppeteer)
- if integerp(gOldSndLevel) then
- set the soundLevel to gOldSndLevel
- end if
- set the traceLogFile to EMPTY
- if objectp(testData) then
- testData(mdispose)
- end if
- put "quitGame: into object disposal"
- if objectp(oBackdrop) then
- put "disposing of oBackdrop: " & oBackdrop(mdispose)
- end if
- if objectp(oUtility) then
- put "disposing of oUtility: " & oUtility(mdispose)
- end if
- if objectp(colorcrsr) then
- put "colorcrsr = " & colorcrsr
- put "disposing of colorcrsr: " & colorcrsr(mdispose)
- end if
- if objectp(oMemory) then
- put "disposing of oMemory: " & oMemory(mdispose)
- end if
- set oStoryteller to 0
- put "oStoryteller: Hm, back from the grave.."
- set oPuppeteer to 0
- closeXLib()
- closeResFile()
- quit()
- abort()
- end
-