List of global variables available in custom C code

===================================================



You are free to access the variables described here, but be aware that changing

some of them manually could crash your adventure, or cause subtle side-effects.

 

------------------------------------------------------------------------------



Text - these will always be decrypted by the time you get to them - 

except in @FIRST processing. End of list can be identified by an empty element

  (strlen(a[x])==0).



  char *msg[]		Message texts

  

  char *olng[]		Object long descriptions

  

  char *osht[]		Object short descriptions

  

  char *rml[]		Room long descriptions

  

  char *rms[]		Room short descriptions

  

------------------------------------------------------------------------------



  char *strp[]          String texts

  

  i.e. strp[S_MY_STRING] 

			accesses the string called MY_STRING.



  End of list can be determined by (strp[x]==NULL)

  

  DO NOT ACCESS STRINGS IN @FIRST PROCESSING.

  

------------------------------------------------------------------------------



Object definitions. End of list can be identified by 'odet[x][0] == -1'



Note: Most of the time, you will find a CAT logic token to do what you require

      - you should use CAT logic wherever possible in preference to accessing

      the arrays directly.

      

  int odet[][23] - with elements containing...

  

     0 - Basic weight of object, OR NON_MOVABLE

    

     1 - Value of object

     

     2 - Room that the object is in (could be R_NOWHERE)

     

     3 - The in room of the object, or R_NOWHERE

     

     4 - Is the object a player? PLAYER/NON_PLAYER

     

     5 - Is the object wearable, worn? NON_WEARABLE/WEARABLE/WORN

     

     6 - If object edible -> strength adjustment - OR NON_EDIBLE

     

     7 - Strength 

     

     8 - Lock type of object - OPEN/CLOSED/LOCKED/NO_LOCK

     

     9 - Is object a lightsource / alight? LIGHT_SOURCE/NON_LIGHT_SOURCE/LIT

     

    10 - If readable, message number of read msg, OR NON_READABLE

    

    11 - Object points

    

    12 - Object key - object number OR NO_KEY

    

    13 - Weight carried (calculated automatically by CAT)

    

    14 - If a door, number of 1st room. If not, R_NOWHERE

    

    15 - If a door, number of 2nd room. If not, R_NOWHERE

    

    16 - If a portal, number of portal room. If not, R_NOWHERE

    

    17 - Is object hidden? HIDDEN/NOT_HIDDEN

    

    18 - If object drinkable -> strength adjustment - OR NON_DRINKABLE

     

    19 - Is object commandable? COMMANDABLE/NO_COMMANDS

    

    20 - Is object active? ACTIVE/NON_ACTIVE

    

    21 - Reserved

    

    22 - Reserved



------------------------------------------------------------------------------



Room details. End of list can be identified by 'rmd[x][0] == -1'



  int rmd[][4] - with elements containing...

  

    0 - Is room light? LIGHT/DARK

    

    1 - Has room been visited? VISITED/NOT_VISITED

    

    2 - Room points - reset to zero after room has been visited.

  

    3 - Reserved

      

------------------------------------------------------------------------------



Other miscellaneous variables:



  int cnt[500]		- array of counters   



  int player            - object number of current player

  

  int cplr              - object number of commanding player

  

  int score             - Current score

  

  int turns             - turns taken so far

  

  BOOLEAN wgt_c		- Weight change - if set to TRUE, CAT will

                          recalculate compound object weights after this 

                          turn

                          

  BOOLEAN dead          - If set to TRUE, the game will end  



  BOOLEAN script	- If TRUE, we are in script mode

  

  BOOLEAN verbose	- If TRUE, we are in verbose mode



------------------------------------------------------------------------------



One last thing... please be aware that the value 32767 has special meanings

to CAT, and the meanings change in different contexts. Please avoid using

the value 32767!



------------------------------------------------------------------------------





