Free Hero Mesh

Check-in [f731355880]
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:Implement some more array operations.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f731355880dc794bfb83e038b7ae5154ee7cdeeb
User & Date: user on 2021-04-19 22:04:02
Other Links: manifest | tags
Context
2021-04-20
02:32
Add the possibility to specify the level version number when importing (optional) check-in: 2885d776fc user: user tags: trunk
2021-04-19
22:04
Implement some more array operations. check-in: f731355880 user: user tags: trunk
21:12
Display the PC character set in the internal test mode. check-in: 92d021271e user: user tags: trunk
Changes

Modified TODO from [086a399df5] to [06c5cc8fb0].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
* Sound effects
  * Wave sounds
    * Standard sounds
    * User sounds
  * MML sounds
  * Numeric sounds (?)
* Game engine features
  * Multiple connected objects moving as a unit
  * Bizarro world
  * Testing the deferred movement
  * String data (?)
  * Array operations (CopyArray, ArraySlice, DotProduct)
  * A ,PopUp command to use a popup with arguments starting from a mark
  * Operations with marks (duplicate a list, length of a list, etc)
  * "Goto message" instruction
  * Class inheritance (abstract)
  * Case blocks
  * Returning a class from COLLIDE/COLLIDEBY to transform
* Editor











<







1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
* Sound effects
  * Wave sounds
    * Standard sounds
    * User sounds
  * MML sounds
  * Numeric sounds (?)
* Game engine features
  * Multiple connected objects moving as a unit
  * Bizarro world
  * Testing the deferred movement
  * String data (?)

  * A ,PopUp command to use a popup with arguments starting from a mark
  * Operations with marks (duplicate a list, length of a list, etc)
  * "Goto message" instruction
  * Class inheritance (abstract)
  * Case blocks
  * Returning a class from COLLIDE/COLLIDEBY to transform
* Editor

Modified class.doc from [045cee15e0] to [4a0d10f48c].

1067
1068
1069
1070
1071
1072
1073




1074
1075
1076
1077
1078
1079
1080
  allows Arg3 to be used as a mutable local variable.

ArrayCell  ( array row column -- array )
  Make a reference to a single cell of an array. The new reference is
  treated as a reference to a 1x1 array, which aliases the original array.
  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
  during the cleanup step for all objects). Assassination always succeeds,
  so there is no result value to indicate success or not.








>
>
>
>







1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
  allows Arg3 to be used as a mutable local variable.

ArrayCell  ( array row column -- array )
  Make a reference to a single cell of an array. The new reference is
  treated as a reference to a 1x1 array, which aliases the original array.
  Coordinates are zero-based.

ArraySlice  ( array start count -- array )
  Make a slice of an array. The new reference aliases the original array.
  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
  during the cleanup step for all objects). Assassination always succeeds,
  so there is no result value to indicate success or not.

1144
1145
1146
1147
1148
1149
1150



1151
1152
1153
1154
1155
1156
1157
  object is in the bizarro world and the other one isn't.

,Coloc  ( obj1 obj2 -- bool )
  True if the two specified objects are in the same place, or false
  otherwise. Always false if the object is destroyed, or if one object
  is in the bizarro world and the other one isn't.




Create  ( class x y image dir -- obj ) **
  Creates a new object at the specified location, and returns it. The
  result is zero if the class is zero, the coordinates are out of range,
  the object cannot be created due to the CollisionLayers, or if the new
  object is destroyed before its CREATE message returns.

cz?  ( any -- bool )







>
>
>







1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
  object is in the bizarro world and the other one isn't.

,Coloc  ( obj1 obj2 -- bool )
  True if the two specified objects are in the same place, or false
  otherwise. Always false if the object is destroyed, or if one object
  is in the bizarro world and the other one isn't.

CopyArray  ( src dest -- ) **
  Copy one array to another. It is OK if the two references overlap.

Create  ( class x y image dir -- obj ) **
  Creates a new object at the specified location, and returns it. The
  result is zero if the class is zero, the coordinates are out of range,
  the object cannot be created due to the CollisionLayers, or if the new
  object is destroyed before its CREATE message returns.

cz?  ( any -- bool )
1168
1169
1170
1171
1172
1173
1174









1175
1176
1177
1178
1179
1180
1181
  Destroy this object. The variables can still be accessed after it is
  destroyed until it is garbage collected. This calls the DESTROY message;
  the return value will be the result of this instruction, and if it is
  false then it is destroyed, and if true then the destruction fails.

,Destroy  ( object -- value ) **
  Destroy the specified object (as Destroy but for any object).










dup  ( x -- x x )

eq  ( in1 in2 -- bool )
  Test if they are equal. Sounds cannot be compared, but you can compare
  values of any other type. Strings compare as equal if they contain the
  same text. Object references are only equal if they refer to the same







>
>
>
>
>
>
>
>
>







1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
  Destroy this object. The variables can still be accessed after it is
  destroyed until it is garbage collected. This calls the DESTROY message;
  the return value will be the result of this instruction, and if it is
  false then it is destroyed, and if true then the destruction fails.

,Destroy  ( object -- value ) **
  Destroy the specified object (as Destroy but for any object).

DotProduct  ( array array -- any )
  Compute the dot product of two arrays. Any nonzero number times a class,
  message, or object will shortcut and return that class, message, or
  object; zero can multiply by any value of any type to make zero; a class
  by an object will return that object if the class is correct; an object
  by a message will send that message to that object, and add the return
  value to the running total, or stop and return that value if the return
  value isn't a number.

dup  ( x -- x x )

eq  ( in1 in2 -- bool )
  Test if they are equal. Sounds cannot be compared, but you can compare
  values of any other type. Strings compare as equal if they contain the
  same text. Object references are only equal if they refer to the same

Modified exec.c from [76a4545f4a] to [bb04a03311].

1279
1280
1281
1282
1283
1284
1285
























































1286
1287
1288
1289
1290
1291
1292
  Uint32 s;
  if(ar.t!=TY_ARRAY) Throw("Type mismatch");
  s=ar.u&0xFFFF;
  if(y>((ar.u>>16)&0x3FF) || x>((ar.u>>26)&0x3F)) Throw("Array index out of bounds");
  s+=x+y+((ar.u>>26)&0x3F)*y;
  return UVALUE(s,TY_ARRAY);
}

























































static void v_set_popup(Uint32 from,int argc) {
  const unsigned char*t;
  const unsigned char*u;
  sqlite3_str*s;
  Value v;
  int argi=1;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
  Uint32 s;
  if(ar.t!=TY_ARRAY) Throw("Type mismatch");
  s=ar.u&0xFFFF;
  if(y>((ar.u>>16)&0x3FF) || x>((ar.u>>26)&0x3F)) Throw("Array index out of bounds");
  s+=x+y+((ar.u>>26)&0x3F)*y;
  return UVALUE(s,TY_ARRAY);
}

static Value v_array_slice(Value ar,Uint32 x,Uint32 y) {
  // Is this correct? I am not sure.
  if(ar.t!=TY_ARRAY) Throw("Type mismatch");
  if((x|y)&~0xFFFF) Throw("Slice out of range");
  if(x+y>((ar.u>>16)&0x3FF)-1) Throw("Slice out of range");
  ar.u+=((ar.u>>26)&0x3F)*x-((x+y)<<16);
  return ar;
}

static void v_copy_array(Value a1,Value a2) {
  Uint32 n;
  if(!a2.t && !a2.u) return;
  if(a1.t!=TY_ARRAY || a2.t!=TY_ARRAY) Throw("Type mismatch");
  if(a1.u==a2.u) return;
  if((a1.u^a2.u)>>16) Throw("Dimension mismatch");
  n=((a1.u>>16)&0x3FF)+1;
  n*=((a1.u>>26)&0x3F)+1;
  memmove(array_data+(a2.u&0xFFFF),array_data+(a1.u&0xFFFF),n*sizeof(Value));
}

static Value v_dot_product(Value a1,Value a2) {
  Uint32 r=0;
  Uint32 s1,s2,n;
  Value v1,v2;
  if(a1.t!=TY_ARRAY || a2.t!=TY_ARRAY) Throw("Type mismatch");
  if((a1.u^a2.u)>>16) Throw("Dimension mismatch");
  s1=a1.u&0xFFFF;
  s2=a2.u&0xFFFF;
  n=((a1.u>>16)&0x3FF)+1;
  n*=((a1.u>>26)&0x3F)+1;
  while(n--) {
    v1=array_data[s1++];
    v2=array_data[s2++];
    if((v1.t==TY_NUMBER && !v1.u) || (v2.t==TY_NUMBER && !v2.u)) continue;
    if(v1.t==TY_NUMBER && v2.t==TY_NUMBER) {
      r+=v1.u*v2.u;
    } else if(v1.t==TY_NUMBER && (v2.t==TY_CLASS || v2.t==TY_MESSAGE || v2.t>TY_MAXTYPE)) {
      return v2;
    } else if(v2.t==TY_NUMBER && (v1.t==TY_CLASS || v1.t==TY_MESSAGE || v1.t>TY_MAXTYPE)) {
      return v1;
    } else if(v1.t==TY_MESSAGE && v2.t>TY_MAXTYPE) {
      v1=send_message(VOIDLINK,v_object(v2),v1.u,NVALUE(0),NVALUE(0),NVALUE(0));
      mess:
      if(v1.t==TY_SOUND || v1.t==TY_USOUND) Throw("Type mismatch");
      if(v1.t!=TY_NUMBER) return v1;
      r+=v1.u;
    } else if(v2.t==TY_MESSAGE && v1.t>TY_MAXTYPE) {
      v1=send_message(VOIDLINK,v_object(v1),v2.u,NVALUE(0),NVALUE(0),NVALUE(0));
      goto mess;
    } else {
      Throw("Type mismatch");
    }
  }
  return NVALUE(r);
}

static void v_set_popup(Uint32 from,int argc) {
  const unsigned char*t;
  const unsigned char*u;
  sqlite3_str*s;
  Value v;
  int argi=1;
1827
1828
1829
1830
1831
1832
1833

1834
1835
1836
1837
1838
1839
1840
    case OP_ARG1: StackReq(0,1); Push(msgvars.arg1); break;
    case OP_ARG1_E: StackReq(1,0); msgvars.arg1=Pop(); break;
    case OP_ARG2: StackReq(0,1); Push(msgvars.arg2); break;
    case OP_ARG2_E: StackReq(1,0); msgvars.arg2=Pop(); break;
    case OP_ARG3: StackReq(0,1); Push(msgvars.arg3); break;
    case OP_ARG3_E: StackReq(1,0); msgvars.arg3=Pop(); break;
    case OP_ARRAYCELL: StackReq(3,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); t1=Pop(); Push(v_array_cell(t1,t2.u,t3.u)); break;

    case OP_ARRIVALS: StackReq(0,1); Push(NVALUE(o->arrivals&0x1FFFFFF)); break;
    case OP_ARRIVALS_C: StackReq(1,1); Push(GetVariableOrAttributeOf(arrivals&0x1FFFFFF,NVALUE)); break;
    case OP_ARRIVALS_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->arrivals=t1.u; break;
    case OP_ARRIVALS_EC: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->arrivals=t1.u; break;
    case OP_ARRIVED: StackReq(0,1); Push(NVALUE(o->arrived&0x1FFFFFF)); break;
    case OP_ARRIVED_C: StackReq(1,1); Push(GetVariableOf(arrived&0x1FFFFFF,NVALUE)); break;
    case OP_ARRIVED_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->arrived=t1.u; break;







>







1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
    case OP_ARG1: StackReq(0,1); Push(msgvars.arg1); break;
    case OP_ARG1_E: StackReq(1,0); msgvars.arg1=Pop(); break;
    case OP_ARG2: StackReq(0,1); Push(msgvars.arg2); break;
    case OP_ARG2_E: StackReq(1,0); msgvars.arg2=Pop(); break;
    case OP_ARG3: StackReq(0,1); Push(msgvars.arg3); break;
    case OP_ARG3_E: StackReq(1,0); msgvars.arg3=Pop(); break;
    case OP_ARRAYCELL: StackReq(3,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); t1=Pop(); Push(v_array_cell(t1,t2.u,t3.u)); break;
    case OP_ARRAYSLICE: StackReq(3,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); t1=Pop(); Push(v_array_slice(t1,t2.u,t3.u)); break;
    case OP_ARRIVALS: StackReq(0,1); Push(NVALUE(o->arrivals&0x1FFFFFF)); break;
    case OP_ARRIVALS_C: StackReq(1,1); Push(GetVariableOrAttributeOf(arrivals&0x1FFFFFF,NVALUE)); break;
    case OP_ARRIVALS_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->arrivals=t1.u; break;
    case OP_ARRIVALS_EC: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->arrivals=t1.u; break;
    case OP_ARRIVED: StackReq(0,1); Push(NVALUE(o->arrived&0x1FFFFFF)); break;
    case OP_ARRIVED_C: StackReq(1,1); Push(GetVariableOf(arrived&0x1FFFFFF,NVALUE)); break;
    case OP_ARRIVED_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->arrived=t1.u; break;
1870
1871
1872
1873
1874
1875
1876

1877
1878
1879
1880
1881
1882
1883
    case OP_CLIMB_EC16: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) o->climb=t1.u&0xFFFF; break;
    case OP_COLLISIONLAYERS: StackReq(0,1); Push(NVALUE(classes[o->class]->collisionLayers)); break;
    case OP_COLLISIONLAYERS_C: StackReq(1,1); i=v_object(Pop()); if(i==VOIDLINK) Push(NVALUE(0)); else Push(NVALUE(classes[objects[i]->class]->collisionLayers)); break;
    case OP_COLOC: StackReq(1,1); t1=Pop(); i=colocation(obj,v_object(t1)); Push(NVALUE(i)); break;
    case OP_COLOC_C: StackReq(2,1); t1=Pop(); t2=Pop(); i=colocation(v_object(t1),v_object(t2)); Push(NVALUE(i)); break;
    case OP_COMPATIBLE: StackReq(0,1); if(classes[o->class]->cflags&CF_COMPATIBLE) Push(NVALUE(1)); else Push(NVALUE(0)); break;
    case OP_COMPATIBLE_C: StackReq(1,1); GetClassFlagOf(CF_COMPATIBLE); break;

    case OP_CREATE: NoIgnore(); StackReq(5,1); t5=Pop(); t4=Pop(); t3=Pop(); t2=Pop(); t1=Pop(); Push(v_create(obj,t1,t2,t3,t4,t5)); break;
    case OP_CREATE_D: NoIgnore(); StackReq(5,0); t5=Pop(); t4=Pop(); t3=Pop(); t2=Pop(); t1=Pop(); v_create(obj,t1,t2,t3,t4,t5); break;
    case OP_DELINVENTORY: StackReq(2,0); t2=Pop(); t1=Pop(); v_delete_inventory(t1,t2); break;
    case OP_DELTA: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.u>t2.u?t1.u-t2.u:t2.u-t1.u)); break;
    case OP_DENSITY: StackReq(0,1); Push(NVALUE(o->density)); break;
    case OP_DENSITY_C: StackReq(1,1); Push(GetVariableOrAttributeOf(density,NVALUE)); break;
    case OP_DENSITY_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); change_density(obj,t1.s); break;







>







1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
    case OP_CLIMB_EC16: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) o->climb=t1.u&0xFFFF; break;
    case OP_COLLISIONLAYERS: StackReq(0,1); Push(NVALUE(classes[o->class]->collisionLayers)); break;
    case OP_COLLISIONLAYERS_C: StackReq(1,1); i=v_object(Pop()); if(i==VOIDLINK) Push(NVALUE(0)); else Push(NVALUE(classes[objects[i]->class]->collisionLayers)); break;
    case OP_COLOC: StackReq(1,1); t1=Pop(); i=colocation(obj,v_object(t1)); Push(NVALUE(i)); break;
    case OP_COLOC_C: StackReq(2,1); t1=Pop(); t2=Pop(); i=colocation(v_object(t1),v_object(t2)); Push(NVALUE(i)); break;
    case OP_COMPATIBLE: StackReq(0,1); if(classes[o->class]->cflags&CF_COMPATIBLE) Push(NVALUE(1)); else Push(NVALUE(0)); break;
    case OP_COMPATIBLE_C: StackReq(1,1); GetClassFlagOf(CF_COMPATIBLE); break;
    case OP_COPYARRAY: NoIgnore(); StackReq(2,0); t2=Pop(); t1=Pop(); v_copy_array(t1,t2); break;
    case OP_CREATE: NoIgnore(); StackReq(5,1); t5=Pop(); t4=Pop(); t3=Pop(); t2=Pop(); t1=Pop(); Push(v_create(obj,t1,t2,t3,t4,t5)); break;
    case OP_CREATE_D: NoIgnore(); StackReq(5,0); t5=Pop(); t4=Pop(); t3=Pop(); t2=Pop(); t1=Pop(); v_create(obj,t1,t2,t3,t4,t5); break;
    case OP_DELINVENTORY: StackReq(2,0); t2=Pop(); t1=Pop(); v_delete_inventory(t1,t2); break;
    case OP_DELTA: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.u>t2.u?t1.u-t2.u:t2.u-t1.u)); break;
    case OP_DENSITY: StackReq(0,1); Push(NVALUE(o->density)); break;
    case OP_DENSITY_C: StackReq(1,1); Push(GetVariableOrAttributeOf(density,NVALUE)); break;
    case OP_DENSITY_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); change_density(obj,t1.s); break;
1909
1910
1911
1912
1913
1914
1915

1916
1917
1918
1919
1920
1921
1922
    case OP_DISTANCE_EC: StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->distance=t1.u; break;
    case OP_DIV: StackReq(2,1); t2=Pop(); DivideBy(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.u/t2.u)); break;
    case OP_DIV_C: StackReq(2,1); t2=Pop(); DivideBy(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.s/t2.s)); break;
    case OP_DONE: StackReq(0,1); if(o->oflags&OF_DONE) Push(NVALUE(1)); else Push(NVALUE(0)); break;
    case OP_DONE_C: StackReq(1,1); GetFlagOf(OF_DONE); break;
    case OP_DONE_E: StackReq(1,0); if(v_bool(Pop())) o->oflags|=OF_DONE; else o->oflags&=~OF_DONE; break;
    case OP_DONE_EC: StackReq(2,0); SetFlagOf(OF_DONE); break;

    case OP_DROP: StackReq(1,0); Pop(); break;
    case OP_DROP_D: StackReq(2,0); Pop(); Pop(); break;
    case OP_DUP: StackReq(1,2); t1=Pop(); Push(t1); Push(t1); break;
    case OP_EQ: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_equal(t1,t2)?1:0)); break;
    case OP_EQ2: StackReq(4,1); t4=Pop(); t3=Pop(); t2=Pop(); t1=Pop(); Push(NVALUE(v_equal(t1,t3)?(v_equal(t2,t4)?1:0):0)); break;
    case OP_FINISHED: StackReq(0,1); Push(NVALUE(all_flushed)); break;
    case OP_FINISHED_E: StackReq(1,0); t1=Pop(); Numeric(t1); all_flushed=t1.u; break;







>







1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
    case OP_DISTANCE_EC: StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->distance=t1.u; break;
    case OP_DIV: StackReq(2,1); t2=Pop(); DivideBy(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.u/t2.u)); break;
    case OP_DIV_C: StackReq(2,1); t2=Pop(); DivideBy(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.s/t2.s)); break;
    case OP_DONE: StackReq(0,1); if(o->oflags&OF_DONE) Push(NVALUE(1)); else Push(NVALUE(0)); break;
    case OP_DONE_C: StackReq(1,1); GetFlagOf(OF_DONE); break;
    case OP_DONE_E: StackReq(1,0); if(v_bool(Pop())) o->oflags|=OF_DONE; else o->oflags&=~OF_DONE; break;
    case OP_DONE_EC: StackReq(2,0); SetFlagOf(OF_DONE); break;
    case OP_DOTPRODUCT: StackReq(2,1); t2=Pop(); t1=Pop(); Push(v_dot_product(t1,t2)); break;
    case OP_DROP: StackReq(1,0); Pop(); break;
    case OP_DROP_D: StackReq(2,0); Pop(); Pop(); break;
    case OP_DUP: StackReq(1,2); t1=Pop(); Push(t1); Push(t1); break;
    case OP_EQ: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_equal(t1,t2)?1:0)); break;
    case OP_EQ2: StackReq(4,1); t4=Pop(); t3=Pop(); t2=Pop(); t1=Pop(); Push(NVALUE(v_equal(t1,t3)?(v_equal(t2,t4)?1:0):0)); break;
    case OP_FINISHED: StackReq(0,1); Push(NVALUE(all_flushed)); break;
    case OP_FINISHED_E: StackReq(1,0); t1=Pop(); Numeric(t1); all_flushed=t1.u; break;

Modified instruc from [43ddd4ce2c] to [69544eab48].

275
276
277
278
279
280
281



282
283
284
285
286
287
288

; Arrays
-Array
GetArray
InitArray
SetArray
ArrayCell




; Pattern matching
-,=Pattern "P"
-,=PatternS "P*"
-Four
-Eight
-cut







>
>
>







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291

; Arrays
-Array
GetArray
InitArray
SetArray
ArrayCell
ArraySlice
CopyArray
DotProduct

; Pattern matching
-,=Pattern "P"
-,=PatternS "P*"
-Four
-Eight
-cut

Modified instruc.h from [e4917d9dd6] to [e02ef5707d].

403
404
405
406
407
408
409



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447

448
449
450
451
452
453
454
#define OP_MBEGIN 32967
#define OP_FLIP 32968
#define OP_ARRAY 32969
#define OP_GETARRAY 32970
#define OP_INITARRAY 32971
#define OP_SETARRAY 32972
#define OP_ARRAYCELL 32973



#define OP_PATTERN 32974
#define OP_PATTERN_C 35022
#define OP_PATTERN_E 37070
#define OP_PATTERN_EC 39118
#define OP_PATTERNS 32975
#define OP_PATTERNS_C 35023
#define OP_PATTERNS_E 37071
#define OP_PATTERNS_EC 39119
#define OP_FOUR 32976
#define OP_EIGHT 32977
#define OP_CUT 32978
#define OP_FUNCTION 32979
#define OP_LOCAL 32980
#define OP_LABEL 32981
#define OP_STRING 32982
#define OP_INT16 32983
#define OP_INT32 32984
#define OP_DISPATCH 32985
#define OP_USERFLAG 32986
#ifdef HEROMESH_CLASS
static const Op_Names op_names[]={
{"*",8486937},
{"+",8421399},
{"+Move",10584230},
{"-",8421400},
{"-Move",10584231},
{"-rot",8421382},
{".",10518528},
{"/",8486938},
{"ANHH",8389394},
{"ARRIVED",8389124},
{"Animate",8421512},
{"AnimateDead",8421513},
{"Arg1",8552569},
{"Arg2",8552570},
{"Arg3",8552571},
{"Array",8683721},
{"ArrayCell",8421581},

{"Arrivals",8618086},
{"Arrived",8618084},
{"Assassinate",8487050},
{"B",9437196},
{"BANG",8389380},
{"BEDOINGNG",8389406},
{"BEEDEEP",8389404},







>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|



















>







403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
#define OP_MBEGIN 32967
#define OP_FLIP 32968
#define OP_ARRAY 32969
#define OP_GETARRAY 32970
#define OP_INITARRAY 32971
#define OP_SETARRAY 32972
#define OP_ARRAYCELL 32973
#define OP_ARRAYSLICE 32974
#define OP_COPYARRAY 32975
#define OP_DOTPRODUCT 32976
#define OP_PATTERN 32977
#define OP_PATTERN_C 35025
#define OP_PATTERN_E 37073
#define OP_PATTERN_EC 39121
#define OP_PATTERNS 32978
#define OP_PATTERNS_C 35026
#define OP_PATTERNS_E 37074
#define OP_PATTERNS_EC 39122
#define OP_FOUR 32979
#define OP_EIGHT 32980
#define OP_CUT 32981
#define OP_FUNCTION 32982
#define OP_LOCAL 32983
#define OP_LABEL 32984
#define OP_STRING 32985
#define OP_INT16 32986
#define OP_INT32 32987
#define OP_DISPATCH 32988
#define OP_USERFLAG 32989
#ifdef HEROMESH_CLASS
static const Op_Names op_names[]={
{"*",8486937},
{"+",8421399},
{"+Move",10584230},
{"-",8421400},
{"-Move",10584231},
{"-rot",8421382},
{".",10518528},
{"/",8486938},
{"ANHH",8389394},
{"ARRIVED",8389124},
{"Animate",8421512},
{"AnimateDead",8421513},
{"Arg1",8552569},
{"Arg2",8552570},
{"Arg3",8552571},
{"Array",8683721},
{"ArrayCell",8421581},
{"ArraySlice",8421582},
{"Arrivals",8618086},
{"Arrived",8618084},
{"Assassinate",8487050},
{"B",9437196},
{"BANG",8389380},
{"BEDOINGNG",8389406},
{"BEEDEEP",8389404},
477
478
479
480
481
482
483

484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503

504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
{"CREATED",8389137},
{"Chebyshev",8487057},
{"Class",8486970},
{"Climb",9142350},
{"CollisionLayers",8487029},
{"Coloc",8487058},
{"Compatible",8487028},

{"Create",10518675},
{"DEEP_POP",8389417},
{"DEPARTED",8389125},
{"DESTROY",8389122},
{"DESTROYED",8389136},
{"DINK",8389390},
{"DOOR",8389378},
{"DRLRLRINK",8389398},
{"DYUPE",8389413},
{"DefaultImage",8683652},
{"DelInventory",8421524},
{"Delta",8421525},
{"Density",9142342},
{"Departed",8618085},
{"Departures",8618087},
{"Destroy",10584214},
{"Destroyed",8487026},
{"Dir",8618048},
{"Distance",9142340},
{"Done",8618097},

{"E",9437184},
{"END_TURN",8389139},
{"EditorHelp",8683654},
{"Eight",8683729},
{"F",9437192},
{"FAROUT",8389421},
{"FFFFTT",8389399},
{"FLOATED",8389132},
{"FROG",8389383},
{"Finished",8552575},
{"FlushClass",8421527},
{"FlushObj",8487064},
{"Four",8683728},
{"From",8421496},
{"GLASS",8389379},
{"GLISSANT",8389419},
{"GetArray",8421578},
{"GetInventory",8421529},
{"HAWK",8389425},
{"HEARTBEAT",8389407},







>




















>



|








|







481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
{"CREATED",8389137},
{"Chebyshev",8487057},
{"Class",8486970},
{"Climb",9142350},
{"CollisionLayers",8487029},
{"Coloc",8487058},
{"Compatible",8487028},
{"CopyArray",8421583},
{"Create",10518675},
{"DEEP_POP",8389417},
{"DEPARTED",8389125},
{"DESTROY",8389122},
{"DESTROYED",8389136},
{"DINK",8389390},
{"DOOR",8389378},
{"DRLRLRINK",8389398},
{"DYUPE",8389413},
{"DefaultImage",8683652},
{"DelInventory",8421524},
{"Delta",8421525},
{"Density",9142342},
{"Departed",8618085},
{"Departures",8618087},
{"Destroy",10584214},
{"Destroyed",8487026},
{"Dir",8618048},
{"Distance",9142340},
{"Done",8618097},
{"DotProduct",8421584},
{"E",9437184},
{"END_TURN",8389139},
{"EditorHelp",8683654},
{"Eight",8683732},
{"F",9437192},
{"FAROUT",8389421},
{"FFFFTT",8389399},
{"FLOATED",8389132},
{"FROG",8389383},
{"Finished",8552575},
{"FlushClass",8421527},
{"FlushObj",8487064},
{"Four",8683731},
{"From",8421496},
{"GLASS",8389379},
{"GLISSANT",8389419},
{"GetArray",8421578},
{"GetInventory",8421529},
{"HAWK",8389425},
{"HEARTBEAT",8389407},
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
{"ObjBelow",8487084},
{"ObjBottomAt",8421549},
{"ObjClassAt",8421550},
{"ObjDir",8487087},
{"ObjLayerAt",8421552},
{"ObjMovingTo",8421553},
{"ObjTopAt",8421554},
{"P",8880334},
{"P*",8880335},
{"PLAYERMOVING",8389133},
{"POSTINIT",8389138},
{"POUR",8389377},
{"POWER",8389386},
{"Player",8487027},
{"PopUp",8421555},
{"Quiz",8683650},







|
|







593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
{"ObjBelow",8487084},
{"ObjBottomAt",8421549},
{"ObjClassAt",8421550},
{"ObjDir",8487087},
{"ObjLayerAt",8421552},
{"ObjMovingTo",8421553},
{"ObjTopAt",8421554},
{"P",8880337},
{"P*",8880338},
{"PLAYERMOVING",8389133},
{"POSTINIT",8389138},
{"POUR",8389377},
{"POWER",8389386},
{"Player",8487027},
{"PopUp",8421555},
{"Quiz",8683650},
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
{"bit8",8423400},
{"bit9",8423401},
{"bnot",8421412},
{"bor",8421410},
{"bxor",8421411},
{"c?",8421427},
{"chain",8421520},
{"cut",8683730},
{"cz?",8421428},
{"dup",8421377},
{"el",8683532},
{"else",8683530},
{"eq",8421418},
{"eq2",8421419},
{"flip",8421576},







|







702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
{"bit8",8423400},
{"bit9",8423401},
{"bnot",8421412},
{"bor",8421410},
{"bxor",8421411},
{"c?",8421427},
{"chain",8421520},
{"cut",8683733},
{"cz?",8421428},
{"dup",8421377},
{"el",8683532},
{"else",8683530},
{"eq",8421418},
{"eq2",8421419},
{"flip",8421576},
744
745
746
747
748
749
750
751
752
{"swap",8421378},
{"then",8683531},
{"tmark",8421572},
{"tuck",8421380},
{"until",8683535},
{"while",8683536},
};
#define N_OP_NAMES 319
#endif







|

750
751
752
753
754
755
756
757
758
{"swap",8421378},
{"then",8683531},
{"tmark",8421572},
{"tuck",8421380},
{"until",8683535},
{"while",8683536},
};
#define N_OP_NAMES 322
#endif