Free Hero Mesh

Check-in [536bbdfe8a]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:Some improvements to documentation
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 536bbdfe8a84b6e04616a5dd388109e28e6fb1fd
User & Date: user on 2021-04-02 23:39:43
Other Links: manifest | tags
Context
2021-04-03
00:21
Mention sound.c in the ARCHITECTURE file. check-in: a1420da63c user: user tags: trunk
2021-04-02
23:39
Some improvements to documentation check-in: 536bbdfe8a user: user tags: trunk
19:32
Implement diagonal shoving. check-in: 57d6d9a4f7 user: user tags: trunk
Changes

Modified class.doc from [3525425cc1] to [13fb9f1df8].

289
290
291
292
293
294
295
296


297
298
299
300
301
302
303
  Define the Climb variable for this class.

(CollisionLayers <numbers...>)
  Define the CollisionLayers variable for this class. The format is the
  same as for Misc4 (see below), but only the low 8-bits are usable.

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 <list...>)
  Each entry is either a number of an image in this class, or two







|
>
>







289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
  Define the Climb variable for this class.

(CollisionLayers <numbers...>)
  Define the CollisionLayers variable for this class. The format is the
  same as for Misc4 (see below), but only the low 8-bits are usable.

Compatible
  Sets the Compatible flag for this class. This changes some features for
  compatibility with Hero Mesh, and would not normally be used for new
  puzzle sets made with Free Hero Mesh.

,Compatible
  Sets the Compatible flag for this class, but removes the restriction of
  some variables limited to 16-bits.

(DefaultImage <list...>)
  Each entry is either a number of an image in this class, or two
355
356
357
358
359
360
361


362
363
364
365
366
367
368

Invisible
  Set the Invisible flag for this class.

(Misc4 <numbers...>)
  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 <numbers...>)
  Define the Misc5 variable for this class; see Misc4 above for details.

(Misc6 <numbers...>)
  Define the Misc6 variable for this class; see Misc4 above for details.








>
>







357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372

Invisible
  Set the Invisible flag for this class.

(Misc4 <numbers...>)
  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.
  Although this variable may have any value at run time, the definition in
  a class is limited to numbers.

(Misc5 <numbers...>)
  Define the Misc5 variable for this class; see Misc4 above for details.

(Misc6 <numbers...>)
  Define the Misc6 variable for this class; see Misc4 above for details.

462
463
464
465
466
467
468
469

470
471
472
473
474
475
476
* 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.

* Mark: There is only one value of this type.


* Array: A reference to an array. You cannot allocate arrays at run time;
the available array memory is fixed at compile time, subject to the global
array definitions.

Some things are not their own types, and are other uses of numbers:








|
>







466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
* 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.

* 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;
the available array memory is fixed at compile time, subject to the global
array definitions.

Some things are not their own types, and are other uses of numbers:

724
725
726
727
728
729
730
731

732
733
734
735
736
737
738
  sign at first. User variables are initialized to zero, and need not be
  declared anywhere.

^xyz : bool [c]
  A user-defined flag, which is one bit in Misc4, Misc5, Misc6, Misc7, or
  CollisionLayers. If it is CollisionLayers, then it is read-only; other
  flags are read/write. User defined flags must be defined first (globally)
  before they can be used.


Arrivals : int32
  Only the low 25-bits are used. Each bit which is set indicates that it
  cares if other objects arrive around it at that relative location, where
  bit0 is two paces northeast, bit1 is to the west of that, etc, and then
  bit4 two paces northwest of this object, and bit5 starts on the next
  row to the south, etc, and bit12 is this object's location.







|
>







729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
  sign at first. User variables are initialized to zero, and need not be
  declared anywhere.

^xyz : bool [c]
  A user-defined flag, which is one bit in Misc4, Misc5, Misc6, Misc7, or
  CollisionLayers. If it is CollisionLayers, then it is read-only; other
  flags are read/write. User defined flags must be defined first (globally)
  before they can be used. Unlike user-defined variables, you can access
  user-defined flags on any object.

Arrivals : int32
  Only the low 25-bits are used. Each bit which is set indicates that it
  cares if other objects arrive around it at that relative location, where
  bit0 is two paces northeast, bit1 is to the west of that, etc, and then
  bit4 two paces northwest of this object, and bit5 starts on the next
  row to the south, etc, and bit12 is this object's location.
841
842
843
844
845
846
847
848




849
850
851
852
853
854
855
  object will do.

KeyCleared : bool
  The game engine does nothing with this except to automatically clear it
  between turns, so that you need not do by yourself.

Misc1 : int16/any
  The game engine does not use this variable; use it for your own use.





Misc2 : int16/any
  The game engine does not use this variable; use it for your own use.

Misc3 : int16/any
  The game engine does not use this variable; use it for your own use.








|
>
>
>
>







847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
  object will do.

KeyCleared : bool
  The game engine does nothing with this except to automatically clear it
  between turns, so that you need not do by yourself.

Misc1 : int16/any
  The game engine does not use this variable; use it for your own use. The
  Misc1-Misc3 variables can be defined for each individual object in the
  level editor; normally they are zero. In the level editor, they can only
  be defined as a 16-bit number, a class, a message, or a string; at run
  time they can be set to any value.

Misc2 : int16/any
  The game engine does not use this variable; use it for your own use.

Misc3 : int16/any
  The game engine does not use this variable; use it for your own use.

872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
  yourself if you want to cause it to trigger even though it didn't
  move or to not trigger even though it did move.

Player : bool [c] [ro]
  If this object is the player. This is used implicitly as the From of
  some messages sent by the game engine, and has a few other purposes.
  (Normally, a level should have exactly one object of such a class,
  although this is not mandatory.)

Shape : int16 [c]
  Defines the shape of the object, which is used when one object tries to
  move into another one that it can't climb over. The low 2-bits are for
  east, next 2-bits for north, next 2-bits for west, and finally the high
  2-bits are for south. Each of these 2-bit values can be 0 for flat (no
  sliding), 1 for slanted to the left, 2 for slanted to the right, and 3







|







882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
  yourself if you want to cause it to trigger even though it didn't
  move or to not trigger even though it did move.

Player : bool [c] [ro]
  If this object is the player. This is used implicitly as the From of
  some messages sent by the game engine, and has a few other purposes.
  (Normally, a level should have exactly one object of such a class,
  although this is not mandatory; any number (including zero) is allowed.)

Shape : int16 [c]
  Defines the shape of the object, which is used when one object tries to
  move into another one that it can't climb over. The low 2-bits are for
  east, next 2-bits for north, next 2-bits for west, and finally the high
  2-bits are for south. Each of these 2-bit values can be 0 for flat (no
  sliding), 1 for slanted to the left, 2 for slanted to the right, and 3
894
895
896
897
898
899
900
901


902
903
904
905
906
907
908
  When one object tries to move into another object, the Hard and Sharp
  values for the sides that are touching will be compared. If the Sharp
  value for one is greater than the Hard of the other, then the object
  with insufficient Hardness is destroyed.

Shovable : int16 [c]
  Defines what directions the object may be shoved, where bit0 means east,
  bit2 means north, bit4 means west, and bit6 means south.



Stealthy : bool [c]
  If this flag is set, then the Arrived and Departed variables of other
  objects are not automatically set when this object moves.

Strength : int16/int32 [c]
  When this object's code tries to move this or other objects by the use







|
>
>







904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
  When one object tries to move into another object, the Hard and Sharp
  values for the sides that are touching will be compared. If the Sharp
  value for one is greater than the Hard of the other, then the object
  with insufficient Hardness is destroyed.

Shovable : int16 [c]
  Defines what directions the object may be shoved, where bit0 means east,
  bit2 means north, bit4 means west, and bit6 means south. Bit1, bit3,
  bit5, and bit7 can be used for diagonal shoving; the high 8-bits are
  currently unused but may be used in future.

Stealthy : bool [c]
  If this flag is set, then the Arrived and Departed variables of other
  objects are not automatically set when this object moves.

Strength : int16/int32 [c]
  When this object's code tries to move this or other objects by the use
932
933
934
935
936
937
938
939


940
941
942
943
944
945
946
  documentation about moving objects for further details.

Weight : int16/int32 [c]
  Determines how much Inertia is required to move this object (and is used
  up once it has moved, or if it failed to move it). See Strength.

Xloc : int8 [ro]
  The 1-based X coordinate of this object.



Yloc : int8 [ro]
  The 1-based Y coordinate of this object (1 is at the top of the screen).


=== Instructions ===








|
>
>







944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
  documentation about moving objects for further details.

Weight : int16/int32 [c]
  Determines how much Inertia is required to move this object (and is used
  up once it has moved, or if it failed to move it). See Strength.

Xloc : int8 [ro]
  The 1-based X coordinate of this object. To move the object, use any of
  the instructions for movement; it cannot be moved by directly assigning
  the new coordinates to these variables.

Yloc : int8 [ro]
  The 1-based Y coordinate of this object (1 is at the top of the screen).


=== Instructions ===

1760
1761
1762
1763
1764
1765
1766


1767
1768
1769
1770
1771
1772
1773
  new hit value.

HITBY
  Indicates that this object was hit by another object that was trying to
  move, where From is the object trying to move, Arg1 and Arg2 are the X
  and Y coordinates of that object, and Arg3 is the current hit value, and
  the return value is ORed with the hit value to make the new hit value.



INIT
  Sent to all objects when the level is initialized. Objects which are
  created during this time will not receive INIT messages, but they will
  receive POSTINIT messages.

JUMPED







>
>







1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
  new hit value.

HITBY
  Indicates that this object was hit by another object that was trying to
  move, where From is the object trying to move, Arg1 and Arg2 are the X
  and Y coordinates of that object, and Arg3 is the current hit value, and
  the return value is ORed with the hit value to make the new hit value.
  The return value may also be an object in order to warp; see the section
  about hit values below, which also explains warping.

INIT
  Sent to all objects when the level is initialized. Objects which are
  created during this time will not receive INIT messages, but they will
  receive POSTINIT messages.

JUMPED