Index: class.doc ================================================================== --- class.doc +++ class.doc @@ -216,10 +216,174 @@ ( ) Defines a default message code for all classes which do not specify their own code for this message. + +=== Class definitions === + +Within a class definition, the following definitions can be used. See also +the section about variables; many of these definitions are used to specify +the initial value for variables of objects of this class. + +Outside of code blocks, named constants are not normally interchangeable +with the numbers having the same value. + +Abstract + (Not implemented yet.) + +(Arrivals InPlace) + This is an abbreviation for (Arrivals 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 + 0 0 0 0 0 0 0 0). + +(Arrivals ) + Define the Arrivals variable for this class. This is twenty-five numbers + each of which is either zero or one. They are meant to be on five lines + of five numbers each, making a 5x5 matrix, where the centre means this + object's location. + +(Climb ) + Define the Climb variable for this class. + +Compatible + Sets the Compatible flag for this class. + +,Compatible + Sets the Compatible flag for this class, but removes the restriction of + some variables limited to 16-bits. + +(DefaultImage ) + Each entry is either a number of an image in this class, or two + numbers in parentheses giving a range of images, or () to indicate + that there are no default images. This specifies which images can + be used in objects of this class which are initially present on + the level (placed in the editor). If () is used, then this class + is not available in the editor. If there is no (DefaultImage) block, + all images are available. The (Image) block must come before this one. + +(Density ) + Define the Density variable for this class. If you want the Density to + be different in the editor, specify the value to use in the editor here, + and then change the Density value in the INIT block. + +(Departures InPlace) + This is an abbreviation for (Departures 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0). + +(Departures ) + Define the Departures variable for this class. The format is the same as + for the Arrivals variable; see above. + +(EditorHelp ) + A help message to display in the level editor; normally, this would + explain what values are expected for Misc1, Misc2, Misc3, and Dir. + Each string is one line of text. + +(Hard ) + Define the hardness of this object on all four sides. + +(Hard ) + Define the hardness per direction. Each pair is in parentheses, and is + a direction (E, N, W, or S) followed by a 16-bit number. If any + direction is not specified, then the hardness is zero in that direction. + +(Height ) + Define the Height variable for this class. + +(Help ) + A help message for the game player, which would normally explain what + this object does. Each string is one line of text. + +(Image ) + Specify strings with the names of images. The first string is the + name of the image numbered 0, next for the image numbered 1, etc. + +Input + Set the Input flag for this class. + +Invisible + Set the Invisible flag for this class. + +(Misc4 ) + Specify any combination of numbers and/or bit constants. Defines the + Misc4 variable of this class to be the bitwise OR of the listed numbers. + +(Misc5 ) + Define the Misc5 variable for this class; see Misc4 above for details. + +(Misc6 ) + Define the Misc6 variable for this class; see Misc4 above for details. + +(Misc7 ) + Define the Misc7 variable for this class; see Misc4 above for details. + +Player + Set the Player flag for this class. + +Quiz + If specified, the internal variables of objects of this class cannot + normally be examined by the player. However, the player can override + this definition at run time; you cannot rely on it. Class codes cannot + read the value of this flag. + +(Shape ) + Define the shape of this object on all four sides, where 0 means flat, + 1 means slanted to left, 2 means slanted to right, and 3 means slanted + both left and right. + +(Shape ) + Define the shape of this object per side, similar to the (Hard) block. + +(Sharp ) + Define the sharpness of this object on all four sides. + +(Sharp ) + Define sharpness per direction, as for the (Hard) block. + +Shovable + Set the Shovable variable for this class to 0x55 (meaning it is shovable + in all four directions). + +(Shovable ) + Set this object to be shovable in the specified directions, which can be + E, N, W, or S (diagonals are not allowed). + +(Shovable ) + Set the Shovable variable to the specified 8-bit number. (You cannot set + the initial value of any other bits; they are always clear.) + +Stealthy + Set the Stealthy flag for this class. + +(Strength ) + Define the Strength variable for this class. + +(SUBS ) + Make a code block with no entry point. This isn't very useful, but it + is provided for compatibility with Hero Mesh. + +(Temperature ) + Define the Temperature variable for this class. + +VisualOnly + Set the VisualOnly flag for this class. + +(Volume ) + Define the Volume variable for this class. + +(Weight ) + Define the Weight variable for this class. + +(