Index: ARCHITECTURE ================================================================== --- ARCHITECTURE +++ ARCHITECTURE @@ -49,23 +49,28 @@ hash.c,hash.h: A set of functions for computing cryptographic hashes. These functions can be used outside of Free Hero Mesh, too. If you want to add new algorithms, use the multicodec table to assign the numbers. (Currently they are not used for anything, but some planned features may use it in future.) + +imgtofhm.c: A separate program (not compiled into Free Hero Mesh) for +batch importing pictures into Free Hero Mesh. instruc,instruc.h,instruc.js: The "instruc" file contains a list of the keywords and internal operator names used in the class definitions. Some of these are only used internally, although most are available directly as keywords. Many are also opcodes in the compiled P-code, although some are only used as keywords, which are handled during class loading. The instruc.js program generates instruc.h from instruc. keyicons.xbm: Graphics for key icons. These are used to display the replay -list on the left side of the screen. +list on the left side of the screen. Consists of a vertical strip of icons +each of size 16x16, and is compiled into the program. main.c: Contains code for start-up, and for initializing and dealing with -the user cache database. +the user cache database. The code for loading levels and is also here, as +is the code for loading/saving lumps in the level file and solution file. mbtofhm.c: The converter from Hero Mesh to Free Hero Mesh. This is not compiled into Free Hero Mesh; it is a separate program. pcfont.h: Contains the graphics for the PC character set. @@ -83,11 +88,12 @@ smallxrm.c,smallxrm.h: An implementation of the X resource manager. This can be used independently from Free Hero Mesh. sound.c: Implements sound effects. Also deals with loading sound effects, -amplification, MML, etc. +amplification, MML, etc, and the sound test menu. Sounds are automatically +converted and amplified when loading. === Invariants === All game state changes which persist across turns and can affect the Index: class.doc ================================================================== --- class.doc +++ class.doc @@ -81,11 +81,11 @@ Makes further text centred. \dDATA\ Includes inline data in the string. The data is not displayed, but can be read by class codes, or used in level titles to provide data - and delimieters for the auto-generated table of contents. Data items + and delimiters for the auto-generated table of contents. Data items are separated by semicolons; each item can be a underscore to mean a mark, a number (decimal integers only), or a class name with $ at front. (Not fully implemented yet) \iCLASS:NUMBER\ @@ -582,11 +582,12 @@ * String: A string in quotation marks. There are no string manipulation functions; the only thing that can be done with a string is to display it, or to compare if one string matches another. * Sound: A named sound effect. Values of this type cannot be compared with -anything, even other values of the same type. +anything, even other values of the same type. A sound can be either a +built-in sound or user sound. * Mark: There is only one value of this type; it is used to delimit lists of values on the stack. * Array: A reference to an array. You cannot allocate arrays at run time; @@ -593,11 +594,12 @@ the available array memory is fixed at compile time, subject to the global array definitions. * Link: A link to another point in the code of some class or global. Where a link is expected, you can also specify a message to mean that message -block for the Self object. +block for the Self object (this is not quite the same as sending that +message to itself, though). Some things are not their own types, and are other uses of numbers: * Null: A null class or null object is represented as zero. @@ -1247,11 +1249,11 @@ Coordinates are zero-based. Assassinate ( -- ) ** Destroy this object without sending any messages. The object is marked as destroyed, but its variables are still accessible until the garbage - collector runs (during the trigger step for combatible objects, and + collector runs (during the trigger step for compatible objects, and during the cleanup step for all objects). Assassination always succeeds, so there is no result value to indicate success or not. ,Assassinate ( obj -- ) ** Destroy the given object without sending any messages. @@ -1511,11 +1513,11 @@ Self. The result is 1 if shoving or sharpness is successful, or 0 otherwise. This will update Arg3,including at least setting the low three bits; the new value of Arg3 may then be used as the return value from HITBY. It is intended that this instruction is used inside of a HITBY block, in case you want to do some of your own processing. The - Comaptible and VisualOnly flags of this object are not checked. + Compatible and VisualOnly flags of this object are not checked. IgnoreKey ( -- ) There is no effect outside of the input phase. During the input phase, indicates that this input is not part of the solution, so it will not be entered into the replay. It is an error to ignore inputs which do @@ -1640,11 +1642,11 @@ mod ( in1 in2 -- out ) Unsigned divide in1 by in2 producing the remainder. ,mod ( in1 in2 -- out ) - Signed divide in1 by in2 producing the remander. + Signed divide in1 by in2 producing the remainder. Move ( dir -- bool ) ** Move this object in the given direction (which may be absolute or relative to the current direction). The result will be true if the move is successful or false if it failed. See the section about @@ -1765,11 +1767,12 @@ from the specified object. ObjLayerAt ( layers x y -- obj ) Find an object with the given CollisionLayers bits set at that location. If you specify multiple bits, it finds one with any of those bits. (It - is not possible for there to be more than one such object.) + is not possible for there to be more than one such object if you specify + only one bit. If there are multiple, the bottom-most one is returned.) ObjMovingTo ( x y -- ... ) Push on the stack all objects scheduled to move to the specified X and Y coordinates. There may be zero or more such objects; you can add a mark to the stack in order to delimit this list (it won't do so automatically, @@ -1810,11 +1813,11 @@ Resolves a relative direction to an absolute direction. ,Rel ( obj dir -- dir ) Resolves a relative direction to an absolute direction, using the direction of the specified object as the base. If zero is specified - instead of a valid object, thent the result is the same as the input. + instead of a valid object, then the result is the same as the input. ret ( -- ) Exit the current subroutine. If this is a message block, it must either leave the stack as it is, or leave it but with one extra value pushed which will be the return value from the message call. (This is implied @@ -1899,11 +1902,11 @@ Send a message to all objects in the specified rectangle, given its corners. The coordinates are treated as signed, so you can safely make a surrounding rectangle with a specified radius if wanted. If all of the coordinates are out of range and not on opposite sides of the playfield, no messages are sent. The order of sending the messages is starting at - the start coordinates and ending at the end cordinates, regardless of + the start coordinates and ending at the end coordinates, regardless of which are greater than the others; if the order is true then it does vertical movement first and if false then horizontal movement first. SweepEx ( xstart ystart xend yend order msg arg1 arg2 arg3 -- ) Same as Sweep but three message arguments. @@ -1940,11 +1943,11 @@ calling it instead of 0, and Arg2 and Arg3 will be inherited from the current values of those variables. The return value is ignored. Since the trigger is cleared before it is sent, it is safe for objects to call the triggers of objects in a loop. -TriggerAt ( x ymessage -- ) ** +TriggerAt ( x y message -- ) ** Works like Trigger on all objects at the specified location, from the bottom to the top. tuck ( x y -- y x y ) @@ -2730,11 +2733,11 @@ (