home *** CD-ROM | disk | FTP | other *** search
Wrap
on setUpGame global oStoryteller, oPuppeteer, domainIsReady, ForwardToRight, ForwardToLeft, ForwardToBrowse, ForwardToExamine, BrowseToRight, BrowseToLeft, BrowseToExamine, RightToLeft, RightToExamine, ExamineToLeft, RightToForward, LeftToForward, BrowseToForward, ExamineToForward, RightToBrowse, LeftToBrowse, ExamineToBrowse, LeftToRight, ExamineToRight, LeftToExamine, YugoCursors, castCursorList, cursorOffset, maxCursor, lastCursor, thisCursor, building, lastScoreSprite, gCPU, oBackdrop, oUtility, oFixPal, oMemory, colorcrsr, gAmberPath, gProjectorPath, gSoundPath, gSoundPath2, gHDsounds, gOldSndLevel, gCurrentPalette, gDeferredTransit, gClickLoc set gDeferredTransit to #None if gCPU = #PC then set the exitLock to 1 set gSoundPath to gProjectorPath & "GAMEDATA\" set gSoundPath2 to gAmberPath & "CD_DATA\" else set gSoundPath to gProjectorPath & "sounds etc.:" set gSoundPath2 to gAmberPath & "CD_SOUNDS:" end if set gHDsounds to listHDsounds(gSoundPath) set gOldSndLevel to the soundLevel put "ΓÇóthe searchPath =" put the searchPath set gCurrentPalette to 0 set gClickLoc to #None if gCPU = #PC then openXLib(gProjectorPath & "MOVUTILS.DLL") openXLib(gProjectorPath & "MEMORY.DLL") openXLib(gProjectorPath & "MISC_X.DLL") openXLib(gProjectorPath & "ScrnUtil.x32") else openXLib(gProjectorPath & "AMBER resources") openResFile(gProjectorPath & "AMBER resources") end if set the searchCurrentFolder to 0 if gCPU = #PC then set oUtility to MOVUTILS(mnew) else set oUtility to MovieUtilities(mnew) end if put "oUtility = " & oUtility if gCPU <> #PC then set oFixPal to FixPalette(mnew, the stageLeft, the stageTop, the stageRight, the stageTop) put "oFixPal = " & oFixPal set colorcrsr to colorcursor(mnew) put "colorcrsr = " & colorcrsr end if if gCPU = #PC then if the colorDepth < 16 then alert("Sorry, AMBER: Journeys Beyond requires 'High Color' (16-bit color) on this display. Please set your Display control panel to 16-bit color and restart Windows.") put "Quitting now..." quit() end if if the quickTimePresent = 0 then alert("Sorry, AMBER: Journeys Beyond requires QuickTime to run properly. Please install QuickTime for Windows 2.1 or higher.") put "Quitting now..." quit() end if else gammaFade(#down) setColor(8) setColor(16) gammaFade(#up) end if if objectp(oMemory) then oMemory(mdispose) end if set oMemory to memory(mnew) if not objectp(oMemory) then alert("Memory XObject could not initialize.") exit end if if gCPU <> #PC then if not objectp(oBackdrop) then set oBackdrop to RearWindow(mnew, "S") end if set howHigh to oBackdrop(mGetScreenBottom) - oBackdrop(mGetScreenTop) set howWide to oBackdrop(mGetScreenRight) - oBackdrop(mGetScreenLeft) if (howHigh > 480) or (howWide > 640) then put "using RearWindow:" && oBackdrop oBackdrop(mPatToWindow, -5) else put "small monitor; dumping RearWindow:" && oBackdrop(mdispose) end if end if set domainIsReady to 0 set YugoCursors to [#browse: 6018, #left: 6012, #right: 6006, #forward: 6001, #back: 3003, #examine: 6024, #up: 6111, #down: 6112, #pointer: 6100, #noCursor: 128, #weedkiller: 6102, #ScanDevice: 6103, #Oscillator: 6108, #Headgear: 6107, #BedroomKey: 6106, #Crowbar: 6105, #Videotape: 6104, #None: 6100, #PeekUnit: 6100, #nextPage: 6110, #rotateRight: 6109, #rotateLeft: 6119] set lastCursor to #None set thisCursor to #pointer set lastScoreSprite to 12 set ForwardToRight to [6001, 6002, 6003, 6004, 6005, 6006] set ForwardToLeft to [6007, 6008, 6009, 6010, 6011, 6012] set ForwardToBrowse to [6013, 6014, 6015, 6016, 6017, 6018] set ForwardToExamine to [6019, 6020, 6021, 6022, 6023, 6024] set BrowseToRight to [6025, 6026, 6027, 6028, 6029, 6030] set BrowseToLeft to [6031, 6032, 6033, 6034, 6035, 6036] set BrowseToExamine to [6037, 6038, 6039, 6040, 6041, 6042] set RightToLeft to [6043, 6044, 6045, 6046, 6047, 6048] set RightToExamine to [6049, 6050, 6051, 6052, 6053, 6054] set ExamineToLeft to [6055, 6056, 6057, 6058, 6059, 6060] set RightToForward to [6006, 6005, 6004, 6003, 6002, 6001] set LeftToForward to [6012, 6011, 6010, 6009, 6008, 6007] set BrowseToForward to [6018, 6017, 6016, 6015, 6014, 6013] set ExamineToForward to [6024, 6023, 6022, 6021, 6020, 6019] set RightToBrowse to [6030, 6029, 6028, 6027, 6026, 6025] set LeftToBrowse to [6036, 6035, 6034, 6033, 6032, 6031] set ExamineToBrowse to [6042, 6041, 6040, 6039, 6038, 6037] set LeftToRight to [6048, 6047, 6046, 6045, 6044, 6043] set ExamineToRight to [6054, 6053, 6052, 6051, 6050, 6049] set LeftToExamine to [6060, 6059, 6058, 6057, 6056, 6055] set oStoryteller to birth(script "cStoryteller") set oPuppeteer to birth(script "cPuppeteer") set the exitLock to 1 updateStage() end on listHDsounds sndPath set HDsounds to [] repeat with filenumber = 1 to 1000 set fName to getNthFileNameInFolder(sndPath, filenumber) if fName = EMPTY then exit repeat next repeat end if add(HDsounds, fName) end repeat sort(HDsounds) sort(HDsounds) return HDsounds end on zzzzputAwayGame global oStoryteller, oPuppeteer, oBackdrop, oUtility, oFixPal, oMemory, colorcrsr put "executing 'putAwayGame'..." if objectp(oBackdrop) then put "disposing of oBackdrop: " & RearWindow(mError, oBackdrop(mdispose)) end if if objectp(the currentGameFile of oStoryteller) then put "yup, currentGameFile is an object" set oFile to the currentGameFile of oStoryteller put "oFile = " & oFile put "disposing of oFile: " & FileIO(mError, oFile(mdispose)) end if if objectp(oUtility) then put "yup, oUtility is an object" put "oUtility = " & oUtility put "disposing of oUtility: " & MovieUtilities(mError, oUtility(mdispose)) end if if objectp(oFixPal) then put "yup, oFixPal is an object" put "oFixPal = " & oFixPal put "disposing of oFixPal: " & FixPalette(mError, oFixPal(mdispose)) end if if objectp(colorcrsr) then put "yup, colorcrsr is an object" put "colorcrsr = " & colorcrsr put "disposing of colorcrsr: " & colorcursor(mError, colorcrsr(mdispose)) end if if objectp(oMemory) then put "yup, oMemory is an object" put "disposing of oMemory: " & oMemory(mdispose) end if set oStoryteller to 0 set oPuppeteer to 0 closeXLib() closeResFile() put "THAT'S ALL, FOLKS!" quit() end