home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 8 / amigaformatcd08.iso / screenplay / utilities / scott / source / source.lha / SCOTT.H < prev   
C/C++ Source or Header  |  1996-10-14  |  3KB  |  112 lines

  1. /*
  2.  *  SCOTT FREE
  3.  *
  4.  *  A free Scott Adams style adventure interpreter
  5.  *
  6.  *  Copyright:
  7.  *      This software is placed under the GNU license.
  8.  *
  9.  *  Statement:
  10.  *      Everything in this program has been deduced or obtained solely
  11.  *  from published material. No game interpreter code has been
  12.  *  disassembled, only published BASIC sources (PC-SIG, and Byte Dec
  13.  *  1980) have been used.
  14.  *
  15.  *  ===================================================================
  16.  *
  17.  *  Version History AMIGA:
  18.  *  Ver ,     Date,         Author, Comment
  19.  *  -------------------------------------------------------------------
  20.  *  1.0 , 28/07/96, Andreas Aumayr, First public release
  21.  *  ___________________________________________________________________
  22.  */
  23.  
  24.   
  25. #define LIGHT_SOURCE    9       /* Always 9 how odd */
  26. #define CARRIED         255     /* Carried */
  27. #define DESTROYED       0       /* Destroyed */
  28. #define DARKBIT         15
  29. #define LIGHTOUTBIT     16      /* Light gone out */
  30.  
  31. typedef struct
  32. {
  33.     short Unknown;
  34.     short NumItems;
  35.     short NumActions;
  36.     short NumWords;     /* Smaller of verb/noun is padded to same size */
  37.     short NumRooms;
  38.     short MaxCarry;
  39.     short PlayerRoom;
  40.     short Treasures;
  41.     short WordLength;
  42.     short LightTime;
  43.     short NumMessages;
  44.     short TreasureRoom;
  45. } Header;
  46.  
  47. typedef struct
  48. {
  49.     unsigned short Vocab;
  50.     unsigned short Condition[5];
  51.     unsigned short Action[2];
  52. } Action;
  53.  
  54. typedef struct
  55. {
  56.     char *Text;
  57.     short Exits[6];
  58. } Room;
  59.  
  60. typedef struct
  61. {
  62.     char *Text;
  63.     /* PORTABILITY WARNING: THESE TWO MUST BE 8 BIT VALUES. */
  64.     unsigned char Location;
  65.     unsigned char InitialLoc;
  66.     char *AutoGet;
  67. } Item;
  68.  
  69. typedef struct
  70. {
  71.     short Version;
  72.     short AdventureNumber;
  73.     short Unknown;
  74. } Tail;
  75.  
  76. #define YOUARE      1   /* You are not I am */
  77. #define SCOTTLIGHT  2   /* Authentic Scott Adams light messages */
  78. #define DEBUGGING   4   /* Info from database load */
  79. #define TRS80_STYLE 8   /* Display in style used on TRS-80 */
  80. #define PREHISTORIC_LAMP 16 /* Destroy the lamp (very old databases) */
  81.  
  82. #define TRUE  1
  83. #define FALSE 0
  84.  
  85.  
  86. Header GameHeader;
  87. Tail GameTail;
  88. Item *Items;
  89. Room *Rooms;
  90. char **Verbs;
  91. char **Nouns;
  92. char **Messages;
  93. Action *Actions;
  94. int LightRefill;
  95. char NounText[16];
  96. int Counters[16];   /* Range unknown */
  97. int CurrentCounter;
  98. int SavedRoom;
  99. int RoomSaved[16];  /* Range unknown */
  100. int DisplayUp;      /* Curses up */
  101. void *Top,*Bottom;
  102. int Redraw;     /* Update item window */
  103. int Options;        /* Option flags set */
  104. int Width = 0;      /* Terminal width */
  105. int TopHeight;      /* Height of top window */
  106. int BottomHeight;   /* Height of bottom window */
  107. long BitFlags=0;    /* Might be >32 flags - I haven't seen >32 yet */
  108.  
  109. #define MyLoc   (GameHeader.PlayerRoom)
  110. #define TRS80_LINE "\n\n<------------------------------------------------------------->"
  111.  
  112.