Free Hero Mesh

Diff
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Differences From Artifact [1c5b1a0868]:

To Artifact [3a9f5e183b]:


412
413
414
415
416
417
418


419
420
421
422
423
424
425
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427







+
+







* Object: A reference to an object. There are no literals of this type.

* 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.

* 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.

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

* Null: A null class or null object is represented as zero.

* Boolean: When a boolean is required as input to some instruction, zero
is false, and most other values (of any type) are true, except for sounds
910
911
912
913
914
915
916



917
918
919
920
921
922
923
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928







+
+
+








/  ( in1 in2 -- out )
  Unsigned divide in1 by in2 producing the quotient.

,/  ( in1 in2 -- out )
  Signed divide in1 by in2 producing the quotient.

_  ( -- mark )
  Add a mark to the stack.

Animate  ( flag start end delay -- ) **
  Start or stop an animation for this object. This also sets the Image
  variable equal to the start value. The flag can be STOP to stop an
  animation, ONCE to play the animation once (and to queue a LASTIMAGE
  event if the animation isn't changed before that happens; note that
  the message is sent even before the animation is actually visible),
  LOOP to play it in a loop, or OSCLOOP for an oscillating loop. The
1074
1075
1076
1077
1078
1079
1080




1081
1082
1083
1084
1085
1086
1087
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096







+
+
+
+







  be entered into the replay. It is an error to ignore inputs which do
  cause state changes. Pop-up messages are still allowed, and unlike in
  EKS Hero Mesh they will not break replayability; the key to dismiss a
  non-quiz popup is not entered into the replay list, and the key to
  dismiss a quiz popup will be treated as a non-quiz input. IgnoreKey
  also causes the rest of the turn after the input phase to be skipped.

in  ( x mark ... - bool )
  Check if x is equal to any of the values above the mark; equality is
  tested the same as the "eq" instruction.

IntMove  ( dir -- bool ) **
  Similar to Move but do not initialize Inertia at all; use the current
  value of Inertia instead.

,IntMove  ( obj dir -- bool ) **
  Similar to ,Move but do not initialize Inertia at all; use the current
  value of Inertia instead.
1218
1219
1220
1221
1222
1223
1224




1225
1226
1227
1228
1229
1230
1231
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244







+
+
+
+








NewXY  ( oldx oldy dir -- newx newy )
  NewX and NewY together.

NewY  ( oldy dir -- newy )
  Advance the number in the direction as though it is a Y coordinate.

nin  ( x mark ... - bool )
  Check if x is unequal to any of the values above the mark; this is the
  same as "in lnot".

nip  ( x y -- y )

o?  ( any -- bool )
  True if the value is an object (whether or not it has been garbage
  collected), or false for any other type. Error if it is a sound.

ObjAbove  ( -- obj )
1358
1359
1360
1361
1362
1363
1364




1365
1366
1367
1368
1369
1370
1371
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388







+
+
+
+







swap  ( x y -- y x )

Synchronize  ( slot startimage -- ) **
  Start a synchronized animation. Give the slot number of the animation,
  and the starting image number. The length and speed are defined in a
  global definition, and the animation is always a non-oscillating loop.

tmark  ( any -- any true | false )
  If the input is a mark, then it is removed and the result is false.
  Otherwise, the value remains and true is added above it on the stack.

Trace  ( obj arg1 arg2 -- )
  If tracing is enabled, sends the three values and some other information
  on stdout. If tracing is disabled, does nothing. This is intended to be
  used for debugging class codes.

tuck  ( x y -- y x y )

1424
1425
1426
1427
1428
1429
1430




1431
1432
1433
1434
1435
1436
1437
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458







+
+
+
+







  Once "next" is reached, it finds the next object and goes back.

if <truepart> [el <cond> if <truepart> ...] [else <falsepart>] then  ( bool -- )
  Takes a boolean value from the stack. If true, then <truepart> is executed;
  otherwise it tries the other parts; "el" means to execute <cond> and take
  another boolean, and continue; "else" means always do this if none of the
  previous parts match.

mbegin <body> repeat  ( -- any ) ( -- )
  The "mbegin" instruction is a shortcut for "begin tmark while", and it has
  the same behaviour.


=== Substitution codes ===

%c
  Display a single character whose code is the low 8-bits of the value.