| 1 |
#charset "us-ascii" |
| 2 |
|
| 3 |
/* |
| 4 |
* Copyright (c) 1999, 2002 by Michael J. Roberts. Permission is |
| 5 |
* granted to anyone to copy and use this file for any purpose. |
| 6 |
* |
| 7 |
* This is a starter TADS 3 source file. This is a complete TADS game |
| 8 |
* that you can compile and run. |
| 9 |
* |
| 10 |
* To compile this game in TADS Workbench, open the "Build" menu and |
| 11 |
* select "Compile for Debugging." To run the game, after compiling it, |
| 12 |
* open the "Debug" menu and select "Go." |
| 13 |
* |
| 14 |
* This is the "advanced" starter game - it has only the minimum set of |
| 15 |
* definitions needed for a working game. If you would like some more |
| 16 |
* examples, create a new game, and choose the "introductory" version |
| 17 |
* when asked for the type of starter game to create. |
| 18 |
*/ |
| 19 |
|
| 20 |
/* |
| 21 |
* Include the main header for the standard TADS 3 adventure library. |
| 22 |
* Note that this does NOT include the entire source code for the |
| 23 |
* library; this merely includes some definitions for our use here. The |
| 24 |
* main library must be "linked" into the finished program by including |
| 25 |
* the file "adv3.tl" in the list of modules specified when compiling. |
| 26 |
* In TADS Workbench, simply include adv3.tl in the "Source Files" |
| 27 |
* section of the project. |
| 28 |
* |
| 29 |
* Also include the US English definitions, since this game is written |
| 30 |
* in English. |
| 31 |
*/ |
| 32 |
#include <adv3.h> |
| 33 |
#include <en_us.h> |
| 34 |
|
| 35 |
/* |
| 36 |
* Our game credits and version information. This object isn't required |
| 37 |
* by the system, but our GameInfo initialization above needs this for |
| 38 |
* some of its information. |
| 39 |
* |
| 40 |
* You'll have to customize some of the text below, as marked: the name |
| 41 |
* of your game, your byline, and so on. |
| 42 |
*/ |
| 43 |
versionInfo: GameID |
| 44 |
IFID = '$IFID$' |
| 45 |
name = '$TITLE$' |
| 46 |
byline = 'by $AUTHOR$' |
| 47 |
htmlByline = 'by <a href="mailto:$EMAIL$"> |
| 48 |
$AUTHOR$</a>' |
| 49 |
version = '1' |
| 50 |
authorEmail = '$AUTHOR$ <$EMAIL$>' |
| 51 |
desc = '$DESC$' |
| 52 |
htmlDesc = '$HTMLDESC$' |
| 53 |
; |
| 54 |
|
| 55 |
/* |
| 56 |
* The "gameMain" object lets us set the initial player character and |
| 57 |
* control the game's startup procedure. Every game must define this |
| 58 |
* object. For convenience, we inherit from the library's GameMainDef |
| 59 |
* class, which defines suitable defaults for most of this object's |
| 60 |
* required methods and properties. |
| 61 |
*/ |
| 62 |
gameMain: GameMainDef |
| 63 |
/* the initial player character is 'me' */ |
| 64 |
initialPlayerChar = me |
| 65 |
; |
| 66 |
|
| 67 |
/* |
| 68 |
* Starting location - we'll use this as the player character's initial |
| 69 |
* location. The name of the starting location isn't important to the |
| 70 |
* library, but note that it has to match up with the initial location |
| 71 |
* for the player character, defined in the "me" object below. |
| 72 |
* |
| 73 |
* Our definition defines two strings. The first string, which must be |
| 74 |
* in single quotes, is the "name" of the room; the name is displayed on |
| 75 |
* the status line and each time the player enters the room. The second |
| 76 |
* string, which must be in double quotes, is the "description" of the |
| 77 |
* room, which is a full description of the room. This is displayed when |
| 78 |
* the player types "look around," when the player first enters the room, |
| 79 |
* and any time the player enters the room when playing in VERBOSE mode. |
| 80 |
* |
| 81 |
* The name "startRoom" isn't special - you can change this any other |
| 82 |
* name you'd prefer. The player character's starting location is simply |
| 83 |
* the location where the "me" actor is initially located. |
| 84 |
*/ |
| 85 |
startRoom: Room 'Start Room' |
| 86 |
"This is the starting room. " |
| 87 |
; |
| 88 |
|
| 89 |
/* |
| 90 |
* Define the player character. The name of this object is not |
| 91 |
* important, but it MUST match the name we use to initialize |
| 92 |
* gameMain.initialPlayerChar above. |
| 93 |
* |
| 94 |
* Note that we aren't required to define any vocabulary or description |
| 95 |
* for this object, because the class Actor, defined in the library, |
| 96 |
* automatically provides the appropriate definitions for an Actor when |
| 97 |
* the Actor is serving as the player character. Note also that we don't |
| 98 |
* have to do anything special in this object definition to make the |
| 99 |
* Actor the player character; any Actor can serve as the player |
| 100 |
* character, and we'll establish this one as the PC in main(), below. |
| 101 |
*/ |
| 102 |
+ me: Actor |
| 103 |
; |
| 104 |
|
| 105 |
|