misc.tfile | source file |
Classes Summary | Objects Summary | Functions Summary Details |
TADS 3 Library - miscellaneous definitions
This module contains miscellaneous definitions that don't have a natural grouping with any larger modules, and which aren't complex enough to justify modules of their own.
CyclicEventList
EventList
ExternalEventList
FinishOption
FinishType
GameMainDef
RandomEventList
RandomFiringScript
Script
ShuffledEventList
ShuffledIntegerList
ShuffledList
StopEventList
SyncEventList
adv3LibInit
adv3LibPreinit
finishOptionAmusing
finishOptionCredits
finishOptionFullScore
finishOptionQuit
finishOptionRestart
finishOptionRestore
finishOptionScore
finishOptionUndo
ftDeath
ftFailure
ftGameOver
ftVictory
libGlobal
restoreOptionRestoreAnother
restoreOptionStartOver
settingsUI
verboseModeSettingsItem
cls
failedRestoreOptions
finishGame
finishGameMsg
isListSubset
main
mainCommon
mainRestore
nilToList
overrides
partitionList
processOptions
runGame
cls ( ) | misc.t[550] |
First, we flush the transcript to ensure that no left-over reports that were displayed before we cleared the screen will show up on the new screen. Second, we call the low-level clearScreen() function to actually clear the display window. Finally, we re-display any <ABOUTBOX> tag, to ensure that the about-box will still be around; this is necessary because any existing <ABOUTBOX> tag is lost after the screen is cleared.
failedRestoreOptions ( ) | misc.t[1992] |
finishGame (extra) | misc.t[1981] |
finishGameMsg (msg, extra) | misc.t[1903] |
We'll show a message defined by 'msg', using a standard format. The format depends on the language, but in English, it's usually the message surrounded by asterisks: "*** You have won! ***". 'msg' can be:
- nil, in which case we display nothing
- a string, which we'll display as the message
- a FinishType object, from which we'll get the message
After showing the message (if any), we'll prompt the user with options for how to proceed. We'll always show the QUIT, RESTART, and RESTORE options; other options can be offered by listing one or more FinishOption objects in the 'extra' parameter, which is given as a list of FinishOption objects. The library defines a few non-default finish options, such as finishOptionUndo and finishOptionCredits; in addition, the game can subclass FinishOption to create its own custom options, as desired.
isListSubset (a, b) | misc.t[2469] |
main (args) | misc.t[599] |
mainCommon (prop, [args]) | misc.t[624] |
mainRestore (args, restoreFile) | misc.t[614] |
nilToList (val) | misc.t[2438] |
overrides (obj, base, prop) | misc.t[678] |
partitionList (lst, fn) | misc.t[2457] |
The return value is a list with two elements. The first element is a list giving the elements of the original list for which 'fn' returns true, the second element is a list giving the elements for which 'fn' returns nil.
(Contributed by Tommy Nordgren.)
processOptions (lst) | misc.t[2003] |
runGame (look) | misc.t[577] |
This routine doesn't return until the game ends.
Before calling this routine, the caller should already have set the global variable gPlayerChar to the player character actor.
'look' is a flag indicating whether or not to look around; if this is true, we'll show a full description of the player character's initial location, as though the player were to type "look around" as the first command.