home *** CD-ROM | disk | FTP | other *** search
- [==========================================================================
- START.ACE
- ---------
-
- The application entry point.
- ==========================================================================]
-
- Set the window title to "KnowledgeLand".
-
- If platform is alphabetically equal to "Mac",
- If the volume "KnowledgeLand" is mounted,
- Do nothing.
- Otherwise,
- Make scr. Set it to a screen.
- In it,
- Make a stringbox of "Please insert the KnowledgeLand CD and try again." from 200,100 to 440,380.
- When keyed,
- End this program.
- When downclicked,
- End this program.
- Display it.
-
- If platform is alphabetically equal to "Mac",
- Set the sound channel mode to mono.
- Otherwise,
- Set the sound channel mode to mono.
- Set the sound channel mode to stereo.
-
- [==========================================================================
- FRAMEWRK.ACE
- ------------
-
- This file activates a general application framework that facilitates
- synchronous event handling, dynamic and persistent handling of user
- interface controls, and a modularized code placement scheme.
- ==========================================================================]
-
- Refer to LIB\FRAMEWRK.ACE.
-
- // INI file initialization
- Initialize with section "land".
-
- If platform is "Mac",
- // Mac initialization
- Set CD root to volume currentInisection's cdRoot.
-
- Make ah. Set it to fooCDRoot.
- Append "\\DEMO" to ah.
- Set currentIniSection's alternateHome to ah.
-
- // Prepare directory preloading
- Don't preload the $ProductCDRoot\FMAV0011 directory.
- Don't preload the $ProductCDRoot\FMR01ENG\AMBIENCE directory.
- Don't preload the $ProductCDRoot\FMR01ENG\NARRATE directory.
- Don't preload the $ProductCDRoot\FMR01ENG\CARDS\LARGE directory.
- Don't preload the $ProductCDRoot\FMR01ENG\CARDS\MEDIUM directory.
- Don't preload the $ProductCDRoot\FMR01ENG\CARDS\TEXT directory.
- Don't preload the $ProductCDRoot\FMR01ENG\COMMON directory.
- Don't preload the $ProductCDRoot\FMR01ENG\DIALOG directory.
- Don't preload the $ProductCDRoot\FMR01ENG\MOVIE directory.
-
- // Initialize text-to-speech
- In system,
- Make TTS. Set it to currentInisection's TTS.
- If TTS is "yes",
- Record that system is TTSEnabled.
- Record that system is TTS.
- Initialize the text to speech code.
- Otherwise,
- Record that system is not TTSEnabled.
- Record that system is not TTS.
-
- If system is TTS,
- Record that system is not ambience.
- Otherwise,
- Record that system is ambience.
-
- If currentInisection's voiceOver is "yes",
- Record that system is voiceActive.
- Otherwise,
- Record that system is not voiceActive.
-
- // Inititalize the spellchecker
- Refer to COM\SPELL.ACE.
- Initialize spellcheck.
-
- // Initialize run-time resource path
- Change CD resource bale to "R01".
-
- // Initialize run-time data path
- Change HD data bale to "D01".
- Record that system is ReadingDataFromHD.
-
- // Set default cursor
- Set cursorBitmap to the CD resource "CMP\\C_NW.CMP".
-
- // Set up the application screen
- Refer to COM\FMSCREEN.ACE.
- Set mainScreen to a fatmanScreen.
- Put up mainScreen.
-
- // Set a default state.
- Record that system is not loggedIn.
-
- // Create global object to represent the user
- Refer to COM\USER.ACE.
- In system,
- Make TheUser.
-
- If currentIniSection's firstTime is "no",
- Record that system is not firstTime.
- Otherwise,
- Record that system is firstTime.
- Set currentInisection's firstTime to "no".
-
- // DUMMY
- // Create a dummy user for testing
- If FirstModule != "intro" AND FirstModule != "login",
- Set system's TheUser to a UserData of "DUMMYUSR.DAT".
-
- //
- // Set up the master kCard deck(s)
- //
- In system,
- Make masterDeck. Set it to an array of the data "CARD0000.DAT".
-
- [==========================================================================
- Code related to module switching.
- ==========================================================================]
- // Set up module stack
- In system,
- Make ModuleStack.
-
- // Module entry/exit functions
- To enter module a string 's' from module a string 't',
- Add t to ModuleStack.
- Enter module s.
-
- To return to previous module,
- Make n. Set it to the number of strings in moduleStack.
- If n > 0,
- Make m. Set it to moduleStack's string # n.
- Detach moduleStack's string # n.
- Enter module m.
-
- To clear module stack,
- While the number of strings in moduleStack > 0,
- Detach moduleStack's string.
-
- To show mempool use,
- If currentinisection's foo is "yes",
- Make s. Set it to "Mempool used: ".
- Print the number of mempool bytes used to s.
- Append " Mempool unused: " to s.
- Print the number of unused mempool bytes to s.
- Print s.
-
- Record that system is not tracing.
- To begin trace,
- If currentIniSection's trace is "yes",
- Record that system is tracing.
- Turn tracing on.
-
- To end trace,
- If currentIniSection's trace is "yes",
- Record that system is not tracing.
- Turn tracing off.
-
- To pause trace,
- If system is tracing,
- Turn tracing off.
-
- To resume trace,
- If system is tracing,
- turn tracing on.
-
-
- To clean up after modules,
- Make t0. Set it to now.
- While the number of modules in mainScreen > 0,
- If keyfocus exists in mainScreen's module,
- Set mainScreen's module's keyfocus to 0.
- If clientlink exists in mainscreen's module,
- Set mainScreen's module's clientlink to 0.
- If selectedcontrol exists in system,
- Set system's selectedcontrol to 0.
- Set linkscleaned to 0.
- Clean links in mainScreen's module in mainScreen's module.
- //print linkscleaned.
- //Clean links in rooms in mainScreen's module.
- //print linkscleaned.
- //Clean links in system.
- //print linkscleaned.
- Deep detach [with debugging] mainScreen's module.
- // print now - t0.
-
- // Module switcher,
- To enter module a string 's',
-
- Stop voiceLoop.
- Stop mediaPlayer.
-
- For each module 'm' in mainScreen,
- hide m.
-
- clean up after modules.
-
- If system is indemo,
- Fade mainScreen from black in 1 second.
-
- If s is "hand",
- Activate hand construction interface.
- Do nothing.
- Otherwise if s is "trade",
- Activate trade negotiation interface.
- Do nothing.
- Otherwise if s is "scrapbook",
- Activate scrapbook interface.
- Do nothing.
- Otherwise if s is "login",
- Activate login interface.
- Start voiceLoop.
- Do nothing.
- Otherwise if s is "avatar",
- Activate avatar selector interface.
- Start voiceLoop.
- Do nothing.
- Otherwise if s is "profile",
- Activate profile interface.
- Start voiceLoop.
- Do nothing.
- Otherwise if s is "profiledisplay",
- Activate profile display interface.
- Start voiceLoop.
- Do nothing.
- Otherwise if s is "empty",
- Activate empty screen.
- Otherwise if s is "intro",
- Fade in.
- Enter introduction screen.
- Otherwise if s is "demopk",
- Activate slideShow of "pkslide.dat".
- Otherwise if s is "demo3g",
- Activate slideShow of "3gslide.dat".
- Otherwise if s is "demo4g",
- Activate slideShow of "4gslide.dat".
- Otherwise if s is "twdemo",
- Activate toddler demo.
- Do nothing.
- Otherwise if s is "psdemo",
- Activate preschool demo.
- Do nothing.
- Otherwise if s is "avatarViewer",
- Display avatar viewer with avatar theUser's playerAvatar.
- Otherwise if s is "credits",
- Activate slideShow of "credits.dat".
- Otherwise if s is "map",
- Activate map module.
- Otherwise,
- Activate main navigation interface. // Default!
-
-
- //Fade in.
- // ...
-
- Record that system is not black.
- [
- // Fade stuffs
- To fade out,
- Wait until the next cycle.
-
- //pause trace.
- If system is not black,
- Record that system is black.
- //Hide for fade in mainScreen.
- Fade mainScreen to black in 1 second.
- Wait until the next cycle.
- //resume trace.
-
- To fade in,
- //pause trace.
- If system is black,
- Fade mainscreen from black in 1 second.
- Record that system is not black.
- Wait until the next cycle.
- //resume trace.
- ]
-
- // Exit with cleanup
- To exit this program,
- If system is not demoing,
- If system is connected,
- Disconnect from server.
- Record that system is not connected.
- Terminate spellCheck.
- If ttslib exists in system,
- Shutdown the text to speech code.
- End this program.
-
- // ?
- In system,
- Make program. Set it to "".
-
- To activate empty screen,
-
- In mainScreen,
- Make a module.
- In it,
- Make a rectangle from 0,0 to 640,480.
- In it,
- When downclicked,
- Return to previous module.
- Wait until the next cycle.
- Launch "aner.exe ltest.pac".
-
-
-
- [==========================================================================
- CONTROLS used in the application.
- ==========================================================================]
- Refer to LIB\CPANEL.ACE.
- Refer to LIB\CSTRING.ACE.
- Refer to LIB\CPICTURE.ACE.
- Refer to LIB\CVIEW.ACE.
- Refer to LIB\CVALUE.ACE.
- Refer to LIB\CSLIDER.ACE.
- Refer to LIB\CSCROLL.ACE.
- Refer to LIB\CLISTBOX.ACE.
- Refer to LIB\CEDIT.ACE.
- Refer to LIB\CDIALOG.ACE.
- Refer to LIB\CPASSWD.ACE.
- Refer to LIB\CNET.ACE.
-
- // Modules
- // -------
-
- [==========================================================================
- To compile a specific module, comment out all the other modules and any
- irrelevant controls. Also, set the 'FIRSTMODULE' field of the KA.INI
- file to point to that module.
- ==========================================================================]
- Refer to MOD\INTRO\INTRO.ACE.
- Refer to MOD\MAIN\MAIN.ACE.
- Refer to MOD\MAIN\MAP.ACE.
- Refer to MOD\LOGIN\LOGIN.ACE.
- Refer to MOD\AVATAR\AVTSEL.ACE.
- Refer to MOD\PROFILE\PROFILE.ACE.
- Refer to MOD\HAND\HAND.ACE. // Hand construction interface
- Refer to MOD\TRADE\TRADE.ACE. // Trade negotiation interface
- Refer to MOD\SCRAP\SCRAP.ACE. // Scrapbook browsing interface
-
- [==========================================================================
- Demos
- ==========================================================================]
- Refer to DEMOS\KG\KG.ACE.
- Refer to DEMOS\1G\1G.ACE.
- Refer to DEMOS\2G\2G.ACE.
- Refer to DEMOS\PSDEMO\PS.ACE.
- Refer to DEMOS\TWDEMO\TW.ACE.
- Refer to SLIDESHO\SLIDESHO.ACE.
-
- Record that system is not demorelative.
- Record that system is not indemo.
-
- To execute demo a number 'n',
- Kill ambience sound.
- //Fade in.
- If system is connected,
- Send "X" to IP Connection.
- Fade out.
- Make d. Set it to the current directory.
- If d is a string,
- If n = 1,
- Launch kindergarden.
- If n = 2,
- Launch firstgrade.
- If n = 3,
- Launch secondgrade.
- If n = 4,
- Launch preschool.
- If n = 5,
- Launch toddlers.
- Otherwise,
- Log "Error getting current directory.".
- Wait for 5 seconds.
- Fade in.
- Show things hidden for fade in mainScreen's module.
-
- In system,
- Make voiceloop. Set it to a player of the script:
- Make t0. Set it to now.
- Make t1.
- Repeat:
- Wait until the next cycle.
- If mediaPlayer is running,
- stop mediaPlayer.
- If mediaShield exists in mainScreen,
- Detach mainScreen's mediaShield.
-
- Set t1 to now.
- If t1 - t0 >= 30 seconds,
- If mediaplayer is not running,
- If mainScreen's module is a loginModule,
- play voice over "NARRATE\\SIEXIT.SND".
- Otherwise,
- if MainScreen's module is an avatarModule,
- play voice over "NARRATE\\ASINACT.SND".
- Wait until mediaplayer is not running.
- play voice over "NARRATE\\ASCHOO.SND".
- Wait until mediaplayer is not running.
- play voice over "NARRATE\\ASDONE.SND".
- Otherwise,
- If MainScreen's module is a profileEntryModule,
- Play voice over "NARRATE\\IDINACT.SND".
- Set t0 to now.
- .
-
- Make helpfile. Set it to fooCDRoot.
- Append "\\KLAND.HLP" to helpfile.
- Set the help file to helpfile.
-
- Record that system is black.
- //
- // Enter main navigation module
- //
- Enter module FirstModule.
-
- // $Log: START.ACE $
- // Revision 1.54 1996/10/07 03:15:31 Quoc
- // Revision 1.53 1996/10/02 13:56:26 Quoc
- // Revision 1.51 1996/09/29 04:45:39 Quoc
- // Revision 1.49 1996/09/27 09:41:05 Quoc
- // Revision 1.48 1996/09/26 12:05:31 Quoc
- // Revision 1.47 1996/09/25 01:38:27 Quoc
- // Revision 1.46 1996/09/24 17:58:54 Quoc
- // Revision 1.45 1996/09/23 05:55:54 Quoc
- // Revision 1.44 1996/09/20 08:08:05 Quoc
- // Revision 1.43 1996/09/16 11:21:19 Quoc
- // Revision 1.42 1996/09/16 09:31:57 Quoc
- // Revision 1.41 1996/09/15 23:29:25 SCOTTR
- // integrated ace demos for preschool and toddler
- // Revision 1.40 1996/09/15 17:03:30 Quoc
- // Revision 1.39 1996/09/13 20:50:14 Quoc
- // Revision 1.38 1996/09/11 19:05:11 Quoc
- // Revision 1.36 1996/09/04 16:10:25 SCOTTR
- // Add launch points for SlideShow demos
- // Revision 1.35 1996/09/04 19:13:02 Quoc
- // Revision 1.34 1996/08/31 14:28:09 Quoc
- // Revision 1.33 1996/08/26 09:27:37 Quoc
- // Revision 1.32 1996/08/25 20:14:49 Quoc
- // Revision 1.31 1996/08/20 21:35:42 SCOTTR
- // Sync MasterDeck usage with new kCard format
- // Revision 1.30 1996/08/20 22:38:32 Quoc
- // Revision 1.29 1996/08/15 15:31:21 Quoc
- // Revision 1.28 1996/08/12 13:56:26 Quoc
- // Revision 1.27 1996/08/05 18:10:58 Quoc
- // Revision 1.26 1996/08/02 20:55:25 Quoc
- // Revision 1.25 1996/07/26 18:59:51 Quoc
- // Revision 1.24 1996/07/22 22:39:53 Quoc
- // Revision 1.23 1996/07/22 08:29:42 Quoc
- // Revision 1.22 1996/07/22 01:17:03 Quoc
- // Revision 1.21 1996/07/20 01:49:59 Quoc
- // Revision 1.20 1996/07/20 01:34:08 Quoc
- // Revision 1.19 1996/07/19 23:23:51 Quoc
- // Revision 1.18 1996/07/08 10:12:16 Quoc
- // Profile sent to server
- // Revision 1.17 1996/07/08 02:54:04 Quoc
- // Revision 1.16 1996/07/06 05:14:59 Quoc
- // Revision 1.15 1996/07/06 00:42:00 Quoc
- // Revision 1.14 1996/07/01 16:01:13 Quoc
- // Alpha
- // Revision 1.13 1996/06/30 19:11:44 SCOTTR
- // Another Alpha.
- // Set up user environment on login. Fix various bugs exposed by that.
- // Revision 1.12 1996/07/01 02:10:07 Quoc
- // Revision 1.11 1996/06/24 23:05:05 Quoc
- // Revision 1.10 1996/06/22 04:35:54 Quoc
- // Pre-pre alpha2
- // Revision 1.9 1996/06/12 23:47:25 SCOTTR
- // Changes to use named members in control definition arrays.
- // Revision 1.8 1996/06/12 14:57:26 Quoc
- // Named member data
- // Revision 1.7 1996/06/10 16:03:10 SCOTTR
- // Add lines to create TheUser object and load it from DAT file
- // Revision 1.6 1996/06/06 00:34:35 SCOTTR
- // Add Refers and module switches for Trade and Scrapbook
- // Revision 1.5 1996/05/31 23:52:55 Quoc
- // Revision 1.4 1996/05/30 21:44:28 Quoc
- // New module switcher with default to main.
- // Revision 1.3 1996/05/30 21:37:31 Quoc
- // New, string-based module switcher with first module settable in ini
- // file.
- // Revision 1.2 1996/05/23 20:40:58 Quoc
- // First incorporation of run-time path resolution for data and
- // resources.
- // Revision 1.1 1996/05/23 19:27:27 Quoc