-- <<<- ------------------------------------------------------------------------ ------------------------------------------------------------------------ -- Compiling this file returns the following function: (tc -> ( -- fork a thread theDreamTitleContainer := tc if (theContainerDir == undefined) do ( theContainerDir := tc.directory if (theContainerDir == undefined) do ( -- TODO: Look around harder, put in error checking. theContainerDir := spawn theStartDir "dream" ) ) theSmallMode := (systemQuery @osName) != "Macintosh" local splash := undefined local oldScale -- Initialilze globals if (theWindow == undefined) do ( -- Make a nice window. theWindow := new FullScreenWindow \ fill: blackBrush \ borderFill: blackBrush \ title: tc hide tc.systemmenubar theWindow.name := "DreamScape" splash := new TwoDShape boundary: tc[@splash] splash.x := round ((theWindow.width - splash.width) / 2) splash.y := round ((theWindow.height - splash.height) / 2) prepend theWindow splash -- oldScale := theWindow.clock.scale oldScale := 10 theWindow.clock.scale := 1 show theWindow threadYield() if (theTrackService == undefined) do ( theTrackService := new TrackService ) theDefaultFont := new PlatformFont name: "Times" theNavigator := new Navigator theConductor := new ActionConductor theWarehouse := new Warehouse if (theRooms == undefined) do ( theRooms := #(:) ) -- Setup so animations are imported as AnimatedProducts into theWindow. setupAnimationImporter AnimatedProduct theWindow ) -- if -- Enter the lobby. local rm := findRoomNamed theNavigator @lobby enterRoom theNavigator rm -- Remove splash screen. if (splash != undefined) do ( deleteOne theWindow splash makePurgeable splash.boundary splash := undefined ) theWindow.clock.scale := oldScale theWindow.clock.rate := 1 show theWindow -- Add rooms. (scanRooms theNavigator) & threadYield() ) -- & ) ------------------------------------------------------------------------ -- >>>