Free Hero Mesh

Check-in [1114ae75d5]
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 LastR, NextR, ThisR; this is not tested and not fully complete; it will be used in future to implement replacing objects with new ones in COLLIDE and COLLIDEBY messages.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1114ae75d54a3f365cc5816689769bbd7b8e56ee
User & Date: user on 2022-10-05 23:26:45
Other Links: manifest | tags
Context
2022-10-19
22:28
Implement returning classes/objects from COLLIDEBY message to transform objects. (Not fully tested yet) check-in: 60b09ee8e4 user: user tags: trunk
2022-10-05
23:26
Implement LastR, NextR, ThisR; this is not tested and not fully complete; it will be used in future to implement replacing objects with new ones in COLLIDE and COLLIDEBY messages. check-in: 1114ae75d5 user: user tags: trunk
2022-09-14
23:14
Do not hard code number of pictures per row in the internal representation; use macros instead. This number is increased from 16 to 128 in order to avoid coordinate overflows for puzzle sets with large number of pictures if a large picture size is selected. check-in: 0a234d4210 user: user tags: trunk
Changes

Modified class.doc from [b11e8f2620] to [8db1014969].

1068
1069
1070
1071
1072
1073
1074







1075
1076
1077
1078
1079
1080
1081
  move or to not trigger even though it did move.

Moving : bool
  This flag indicates that a deferred movement is scheduled for this
  object. The direction of movement is specified by the Dir variable.
  This flag is also used for connected movement, for a different purpose.








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]







>
>
>
>
>
>
>







1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
  move or to not trigger even though it did move.

Moving : bool
  This flag indicates that a deferred movement is scheduled for this
  object. The direction of movement is specified by the Dir variable.
  This flag is also used for connected movement, for a different purpose.

NextR : any
  This variable is normally zero, but when there is a collision by the
  CollisionLayers, it can be programmed to destroy an object and create
  another one which represents the combination of the two. In this case,
  the NextR variable of the destroyed object points to the new one. (Note:
  This feature is not yet fully implemented.)

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]
1118
1119
1120
1121
1122
1123
1124







1125
1126
1127
1128
1129
1130
1131
  When this object's code tries to move this or other objects by the use
  of the Move instruction, the Strength must be greater than or equal to
  the total Weight of all objects being moved, or else it won't move.

Temperature : int16/int32 [c]
  The game engine does not use this variable; use it for your own use.








UserSignal : bool
  This variable has the same effect as Busy; see Busy for details. It is
  still a separate variable though.

UserState : bool [c]
  The game engine does not use this variable; use it for your own use.








>
>
>
>
>
>
>







1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
  When this object's code tries to move this or other objects by the use
  of the Move instruction, the Strength must be greater than or equal to
  the total Weight of all objects being moved, or else it won't move.

Temperature : int16/int32 [c]
  The game engine does not use this variable; use it for your own use.

ThisR : any
  This variable is related to NextR, and setting either variable will also
  affect the other one. If NextR is zero, then this variable points to the
  object itself, and setting this variable to point to itself will cause
  NextR to be set to zero. (They are actually the same variable, but are
  just different ways to access it.)

UserSignal : bool
  This variable has the same effect as Busy; see Busy for details. It is
  still a separate variable though.

UserState : bool [c]
  The game engine does not use this variable; use it for your own use.

1637
1638
1639
1640
1641
1642
1643







1644
1645
1646
1647
1648
1649
1650
,Key  ( -- number true | false )
  If the key (as for Key command) is '1 to '9 or 'A to 'Z then it will be
  the corresponding array index (as for %Q) and true, otherwise false.

land  ( in1 in2 -- out )
  Logical AND.








le  ( in1 in2 -- bool )
  Test if first input is less or equal to second input (unsigned).

,le  ( in1 in2 -- bool )
  Test if first input is less or equal to second input (signed).

Level  ( -- number )







>
>
>
>
>
>
>







1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
,Key  ( -- number true | false )
  If the key (as for Key command) is '1 to '9 or 'A to 'Z then it will be
  the corresponding array index (as for %Q) and true, otherwise false.

land  ( in1 in2 -- out )
  Logical AND.

LastR  ( -- obj )
  Follows the NextR chain of this object to other objects, and the result
  is the last object of the chain.

,LastR  ( obj -- obj )
  Similar to LastR but for a specified object instead of this one.

le  ( in1 in2 -- bool )
  Test if first input is less or equal to second input (unsigned).

,le  ( in1 in2 -- bool )
  Test if first input is less or equal to second input (signed).

Level  ( -- number )

Modified exec.c from [70385a14e1] to [e8eae091e5].

2943
2944
2945
2946
2947
2948
2949












2950
2951
2952
2953
2954
2955
2956
  if(v.t==TY_CLASS) {
    return NVALUE(classes[v.u]->collisionLayers);
  } else {
    i=v_object(v);
    if(i==VOIDLINK) return NVALUE(0); else return NVALUE(classes[objects[i]->class]->collisionLayers);
  }
}













// Here is where the execution of a Free Hero Mesh bytecode subroutine is executed.
#define NoIgnore() do{ changed=1; }while(0)
#define GetVariableOf(a,b) (i=v_object(Pop()),i==VOIDLINK?NVALUE(0):b(objects[i]->a))
#define GetVariableOrAttributeOf(a,b) (t2=Pop(),t2.t==TY_CLASS?NVALUE(classes[t2.u]->a):(i=v_object(t2),i==VOIDLINK?NVALUE(0):b(objects[i]->a)))
#define Numeric(a) do{ if((a).t!=TY_NUMBER) Throw("Type mismatch"); }while(0)
#define DivideBy(a) do{ Numeric(a); if(!(a).u) Throw("Division by zero"); }while(0)







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







2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
  if(v.t==TY_CLASS) {
    return NVALUE(classes[v.u]->collisionLayers);
  } else {
    i=v_object(v);
    if(i==VOIDLINK) return NVALUE(0); else return NVALUE(classes[objects[i]->class]->collisionLayers);
  }
}

static Value v_lastr(Uint32 n) {
  Uint32 m;
  Uint32 x=0;
  if(n==VOIDLINK) return NVALUE(0);
  while(x++<nobjects) {
    m=v_object(objects[n]->replacement);
    if(m==VOIDLINK || m==n) return OVALUE(n);
    n=m;
  }
  Throw("Circular reference in LastR");
}

// Here is where the execution of a Free Hero Mesh bytecode subroutine is executed.
#define NoIgnore() do{ changed=1; }while(0)
#define GetVariableOf(a,b) (i=v_object(Pop()),i==VOIDLINK?NVALUE(0):b(objects[i]->a))
#define GetVariableOrAttributeOf(a,b) (t2=Pop(),t2.t==TY_CLASS?NVALUE(classes[t2.u]->a):(i=v_object(t2),i==VOIDLINK?NVALUE(0):b(objects[i]->a)))
#define Numeric(a) do{ if((a).t!=TY_NUMBER) Throw("Type mismatch"); }while(0)
#define DivideBy(a) do{ Numeric(a); if(!(a).u) Throw("Division by zero"); }while(0)
3206
3207
3208
3209
3210
3211
3212


3213
3214
3215
3216
3217
3218
3219
    case OP_KEY: StackReq(0,1); Push(NVALUE(current_key)); break;
    case OP_KEY_C: StackReq(0,2); i=current_key; if((i>='1' && i<='9') || (i>='A' && i<='Z')) Push(NVALUE(i&64?i+9-'A':i-'1')),Push(NVALUE(1)); else Push(NVALUE(0)); break;
    case OP_KEYCLEARED: StackReq(0,1); if(o->oflags&OF_KEYCLEARED) Push(NVALUE(1)); else Push(NVALUE(0)); break;
    case OP_KEYCLEARED_C: StackReq(1,1); GetFlagOf(OF_KEYCLEARED); break;
    case OP_KEYCLEARED_E: StackReq(1,0); if(v_bool(Pop())) o->oflags|=OF_KEYCLEARED; else o->oflags&=~OF_KEYCLEARED; break;
    case OP_KEYCLEARED_EC: StackReq(2,0); SetFlagOf(OF_KEYCLEARED); break;
    case OP_LAND: StackReq(2,1); t1=Pop(); t2=Pop(); if(v_bool(t1) && v_bool(t2)) Push(NVALUE(1)); else Push(NVALUE(0)); break;


    case OP_LE: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_unsigned_greater(t1,t2)?0:1)); break;
    case OP_LE_C: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_signed_greater(t1,t2)?0:1)); break;
    case OP_LEVEL: StackReq(0,1); Push(NVALUE(level_code)); break;
    case OP_LINK: StackReq(0,1); Push(UVALUE((ptr+2)|(code[ptr+1]<<16),TY_CODE)); ptr=code[ptr]; break;
    case OP_LNOT: StackReq(1,1); if(v_bool(Pop())) Push(NVALUE(0)); else Push(NVALUE(1)); break;
    case OP_LOC: StackReq(0,2); Push(NVALUE(o->x)); Push(NVALUE(o->y)); break;
    case OP_LOC_C: StackReq(1,2); i=v_object(Pop()); Push(NVALUE(i==VOIDLINK?0:objects[i]->x)); Push(NVALUE(i==VOIDLINK?0:objects[i]->y)); break;







>
>







3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
    case OP_KEY: StackReq(0,1); Push(NVALUE(current_key)); break;
    case OP_KEY_C: StackReq(0,2); i=current_key; if((i>='1' && i<='9') || (i>='A' && i<='Z')) Push(NVALUE(i&64?i+9-'A':i-'1')),Push(NVALUE(1)); else Push(NVALUE(0)); break;
    case OP_KEYCLEARED: StackReq(0,1); if(o->oflags&OF_KEYCLEARED) Push(NVALUE(1)); else Push(NVALUE(0)); break;
    case OP_KEYCLEARED_C: StackReq(1,1); GetFlagOf(OF_KEYCLEARED); break;
    case OP_KEYCLEARED_E: StackReq(1,0); if(v_bool(Pop())) o->oflags|=OF_KEYCLEARED; else o->oflags&=~OF_KEYCLEARED; break;
    case OP_KEYCLEARED_EC: StackReq(2,0); SetFlagOf(OF_KEYCLEARED); break;
    case OP_LAND: StackReq(2,1); t1=Pop(); t2=Pop(); if(v_bool(t1) && v_bool(t2)) Push(NVALUE(1)); else Push(NVALUE(0)); break;
    case OP_LASTR: StackReq(0,1); t1=v_lastr(obj); Push(t1); break;
    case OP_LASTR_C: StackReq(1,1); i=v_object(Pop()); t1=v_lastr(i); Push(t1); break;
    case OP_LE: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_unsigned_greater(t1,t2)?0:1)); break;
    case OP_LE_C: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_signed_greater(t1,t2)?0:1)); break;
    case OP_LEVEL: StackReq(0,1); Push(NVALUE(level_code)); break;
    case OP_LINK: StackReq(0,1); Push(UVALUE((ptr+2)|(code[ptr+1]<<16),TY_CODE)); ptr=code[ptr]; break;
    case OP_LNOT: StackReq(1,1); if(v_bool(Pop())) Push(NVALUE(0)); else Push(NVALUE(1)); break;
    case OP_LOC: StackReq(0,2); Push(NVALUE(o->x)); Push(NVALUE(o->y)); break;
    case OP_LOC_C: StackReq(1,2); i=v_object(Pop()); Push(NVALUE(i==VOIDLINK?0:objects[i]->x)); Push(NVALUE(i==VOIDLINK?0:objects[i]->y)); break;
3268
3269
3270
3271
3272
3273
3274




3275
3276
3277
3278
3279
3280
3281
    case OP_MUL_C: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.s*t2.s)); break;
    case OP_NE: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_equal(t1,t2)?0:1)); break;
    case OP_NEG: StackReq(1,1); t1=Pop(); Numeric(t1); t1.s=-t1.s; Push(t1); break;
    case OP_NEWX: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(new_x(t1.u,t2.u))); break;
    case OP_NEWXY: StackReq(3,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(new_x(t1.u,t3.u))); Push(NVALUE(new_y(t2.u,t3.u))); break;
    case OP_NEWY: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(new_y(t1.u,t2.u))); break;
    case OP_NEXT: StackReq(0,1); ptr=v_next(code,ptr); break;




    case OP_NIN: StackReq(2,1); i=v_in(); Push(NVALUE(i?0:1)); break;
    case OP_NIP: StackReq(2,1); t1=Pop(); Pop(); Push(t1); break;
    case OP_OBJABOVE: StackReq(0,1); i=obj_above(obj); Push(OVALUE(i)); break;
    case OP_OBJABOVE_C: StackReq(1,1); i=obj_above(v_object(Pop())); Push(OVALUE(i)); break;
    case OP_OBJBELOW: StackReq(0,1); i=obj_below(obj); Push(OVALUE(i)); break;
    case OP_OBJBELOW_C: StackReq(1,1); i=obj_below(v_object(Pop())); Push(OVALUE(i)); break;
    case OP_OBJBOTTOMAT: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); i=obj_bottom_at(t1.u,t2.u); Push(OVALUE(i)); break;







>
>
>
>







3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
    case OP_MUL_C: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.s*t2.s)); break;
    case OP_NE: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_equal(t1,t2)?0:1)); break;
    case OP_NEG: StackReq(1,1); t1=Pop(); Numeric(t1); t1.s=-t1.s; Push(t1); break;
    case OP_NEWX: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(new_x(t1.u,t2.u))); break;
    case OP_NEWXY: StackReq(3,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(new_x(t1.u,t3.u))); Push(NVALUE(new_y(t2.u,t3.u))); break;
    case OP_NEWY: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(new_y(t1.u,t2.u))); break;
    case OP_NEXT: StackReq(0,1); ptr=v_next(code,ptr); break;
    case OP_NEXTR: StackReq(0,1); Push(o->replacement); break;
    case OP_NEXTR_C: StackReq(1,1); i=v_object(Pop()); if(i!=VOIDLINK) Push(objects[i]->replacement); else Push(NVALUE(0)); break;
    case OP_NEXTR_E: StackReq(1,0); o->replacement=Pop(); break;
    case OP_NEXTR_EC: StackReq(2,1); t1=Pop(); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->replacement=t1; break;
    case OP_NIN: StackReq(2,1); i=v_in(); Push(NVALUE(i?0:1)); break;
    case OP_NIP: StackReq(2,1); t1=Pop(); Pop(); Push(t1); break;
    case OP_OBJABOVE: StackReq(0,1); i=obj_above(obj); Push(OVALUE(i)); break;
    case OP_OBJABOVE_C: StackReq(1,1); i=obj_above(v_object(Pop())); Push(OVALUE(i)); break;
    case OP_OBJBELOW: StackReq(0,1); i=obj_below(obj); Push(OVALUE(i)); break;
    case OP_OBJBELOW_C: StackReq(1,1); i=obj_below(v_object(Pop())); Push(OVALUE(i)); break;
    case OP_OBJBOTTOMAT: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); i=obj_bottom_at(t1.u,t2.u); Push(OVALUE(i)); break;
3378
3379
3380
3381
3382
3383
3384




3385
3386
3387
3388
3389
3390
3391
    case OP_TARGET_C: StackReq(1,1); i=v_object(Pop()); Push(NVALUE(v_target(i)?1:0)); break;
    case OP_TEMPERATURE: StackReq(0,1); Push(NVALUE(o->temperature)); break;
    case OP_TEMPERATURE_C: StackReq(1,1); Push(GetVariableOrAttributeOf(temperature,NVALUE)); break;
    case OP_TEMPERATURE_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->temperature=t1.u; break;
    case OP_TEMPERATURE_E16: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->temperature=t1.u&0xFFFF; break;
    case OP_TEMPERATURE_EC: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->temperature=t1.u; break;
    case OP_TEMPERATURE_EC16: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->temperature=t1.u&0xFFFF; break;




    case OP_TMARK: StackReq(1,2); t1=Pop(); if(t1.t==TY_MARK) { Push(NVALUE(0)); } else { Push(t1); Push(NVALUE(1)); } break;
    case OP_TRACE: StackReq(3,0); trace_stack(obj); break;
    case OP_TRACESTACK: trace_stack_list(vstackptr); break;
    case OP_TRACESTACK_C: StackReq(1,0); t1=Pop(); Numeric(t1); trace_stack_list(t1.u); break;
    case OP_TRIGGER: NoIgnore(); StackReq(2,0); t1=Pop(); i=v_object(Pop()); if(i!=VOIDLINK) v_trigger(obj,i,t1); break;
    case OP_TRIGGERAT: NoIgnore(); StackReq(3,0); t3=Pop(); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); v_trigger_at(obj,t1.u,t2.u,t3); break;
    case OP_TUCK: StackReq(2,3); t2=Pop(); t1=Pop(); Push(t2); Push(t1); Push(t2); break;







>
>
>
>







3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
    case OP_TARGET_C: StackReq(1,1); i=v_object(Pop()); Push(NVALUE(v_target(i)?1:0)); break;
    case OP_TEMPERATURE: StackReq(0,1); Push(NVALUE(o->temperature)); break;
    case OP_TEMPERATURE_C: StackReq(1,1); Push(GetVariableOrAttributeOf(temperature,NVALUE)); break;
    case OP_TEMPERATURE_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->temperature=t1.u; break;
    case OP_TEMPERATURE_E16: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->temperature=t1.u&0xFFFF; break;
    case OP_TEMPERATURE_EC: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->temperature=t1.u; break;
    case OP_TEMPERATURE_EC16: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->temperature=t1.u&0xFFFF; break;
    case OP_THISR: StackReq(0,1); t1=o->replacement; if(v_bool(t1)) Push(t1); else Push(OVALUE(obj)); break;
    case OP_THISR_C: StackReq(1,1); t2=Pop(); i=v_object(t2); if(i!=VOIDLINK) t1=objects[i]->replacement; else t1=NVALUE(0); if(!v_bool(t1)) t1=t2; Push(t2); break;
    case OP_THISR_E: StackReq(1,0); t1=Pop(); if(t1.u==obj && t1.t==o->generation) t1=NVALUE(0); o->replacement=t1; break;
    case OP_THISR_EC: StackReq(2,1); t1=Pop(); t2=Pop(); i=v_object(t2); if(i!=VOIDLINK) { if(t1.t==t2.t && t1.u==t2.u) t1=NVALUE(0); objects[i]->replacement=t1; } break;
    case OP_TMARK: StackReq(1,2); t1=Pop(); if(t1.t==TY_MARK) { Push(NVALUE(0)); } else { Push(t1); Push(NVALUE(1)); } break;
    case OP_TRACE: StackReq(3,0); trace_stack(obj); break;
    case OP_TRACESTACK: trace_stack_list(vstackptr); break;
    case OP_TRACESTACK_C: StackReq(1,0); t1=Pop(); Numeric(t1); trace_stack_list(t1.u); break;
    case OP_TRIGGER: NoIgnore(); StackReq(2,0); t1=Pop(); i=v_object(Pop()); if(i!=VOIDLINK) v_trigger(obj,i,t1); break;
    case OP_TRIGGERAT: NoIgnore(); StackReq(3,0); t3=Pop(); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); v_trigger_at(obj,t1.u,t2.u,t3); break;
    case OP_TUCK: StackReq(2,3); t2=Pop(); t1=Pop(); Push(t2); Push(t1); Push(t2); break;

Modified game.c from [c6efffb6bc] to [522c906303].

618
619
620
621
622
623
624

625
626
627
628
629
630
631
632
633
634
  exam_value("Departures:",20,NVALUE(o->departures));
  exam_value("Shape:",21,NVALUE(o->shape));
  exam_value("Shovable:",22,NVALUE(o->shovable));
  exam_value("Distance:",23,NVALUE(o->distance));
  exam_value("Inertia:",24,NVALUE(o->inertia));
  exam_hardsharp("Hardness:",25,o->hard);
  exam_hardsharp("Sharpness:",26,o->sharp);

  while(sqlite3_step(st)==SQLITE_ROW) {
    i=sqlite3_column_int(st,1);
    exam_value(sqlite3_column_text(st,0),i+28,o->uservars[i]);
  }
  quiz:
  sqlite3_reset(st);
  SDL_UnlockSurface(screen);
  SDL_Flip(screen);
  while(SDL_WaitEvent(&ev)) switch(ev.type) {
    case SDL_KEYDOWN:







>


|







618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
  exam_value("Departures:",20,NVALUE(o->departures));
  exam_value("Shape:",21,NVALUE(o->shape));
  exam_value("Shovable:",22,NVALUE(o->shovable));
  exam_value("Distance:",23,NVALUE(o->distance));
  exam_value("Inertia:",24,NVALUE(o->inertia));
  exam_hardsharp("Hardness:",25,o->hard);
  exam_hardsharp("Sharpness:",26,o->sharp);
  exam_value("NextR:",27,o->replacement);
  while(sqlite3_step(st)==SQLITE_ROW) {
    i=sqlite3_column_int(st,1);
    exam_value(sqlite3_column_text(st,0),i+29,o->uservars[i]);
  }
  quiz:
  sqlite3_reset(st);
  SDL_UnlockSurface(screen);
  SDL_Flip(screen);
  while(SDL_WaitEvent(&ev)) switch(ev.type) {
    case SDL_KEYDOWN:

Modified heromesh.h from [f41b1c99d8] to [3c737c4009].

285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
  Uint32 arrived,departed,arrived2,departed2,generation;
  Uint32 up,down,prev,next; // links to other objects
  Uint16 class,oflags,distance,shape,shovable,image;
  Uint16 sharp[4];
  Uint16 hard[4];
  Uint8 x,y,dir;
  Animation*anim;
  Value misc1,misc2,misc3,misc4,misc5,misc6,misc7;
  Value uservars[0];
} Object;

typedef struct {
  Uint16 class,value;
  Uint8 image;
} Inventory;







|







285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
  Uint32 arrived,departed,arrived2,departed2,generation;
  Uint32 up,down,prev,next; // links to other objects
  Uint16 class,oflags,distance,shape,shovable,image;
  Uint16 sharp[4];
  Uint16 hard[4];
  Uint8 x,y,dir;
  Animation*anim;
  Value misc1,misc2,misc3,misc4,misc5,misc6,misc7,replacement;
  Value uservars[0];
} Object;

typedef struct {
  Uint16 class,value;
  Uint8 image;
} Inventory;

Modified instruc from [ea8898a518] to [ff5a0f1f93].

200
201
202
203
204
205
206





207
208
209
210
211
212
213
=Arg1
=Arg2
=Arg3
=MoveNumber
Level
,Key
=Finished






; Top level definitions
-Background
-CodePage
-Order
Control
-LevelTable







>
>
>
>
>







200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
=Arg1
=Arg2
=Arg3
=MoveNumber
Level
,Key
=Finished

; Standard variables related to object replacements
,=ThisR
,=NextR
,LastR

; Top level definitions
-Background
-CodePage
-Order
Control
-LevelTable

Modified instruc.h from [62a01ab909] to [ee33348f38].

299
300
301
302
303
304
305










306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324


325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
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
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
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
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654

655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685

686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751

752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
#define OP_MOVENUMBER 32903
#define OP_MOVENUMBER_E 36999
#define OP_LEVEL 32904
#define OP_KEY 32905
#define OP_KEY_C 34953
#define OP_FINISHED 32906
#define OP_FINISHED_E 37002










#define OP_BACKGROUND 32907
#define OP_CODEPAGE 32908
#define OP_ORDER 32909
#define OP_CONTROL 32910
#define OP_LEVELTABLE 32911
#define OP_INPUTXY 32912
#define OP_INPUT 32913
#define OP_QUIZ 32914
#define OP_QUIZ_C 34962
#define OP_INPLACE 32915
#define OP_DEFAULTIMAGE 32916
#define OP_HELP 32917
#define OP_EDITORHELP 32918
#define OP_OTHERS 32919
#define OP_SUBS 32920
#define OP_ANIMATE 32921
#define OP_ANIMATE_E 37017
#define OP_ANIMATEDEAD 32922
#define OP_ANIMATEDEAD_E 37018


#define OP_ASSASSINATE 32923
#define OP_ASSASSINATE_C 34971
#define OP_BROADCAST 32924
#define OP_BROADCAST_D 41116
#define OP_BROADCASTAND 32925
#define OP_BROADCASTANDEX 32926
#define OP_BROADCASTCLASS 32927
#define OP_BROADCASTEX 32928
#define OP_BROADCASTEX_D 41120
#define OP_BROADCASTLIST 32929
#define OP_BROADCASTLISTEX 32930
#define OP_BROADCASTSUM 32931
#define OP_BROADCASTSUMEX 32932
#define OP_CHAIN 32933
#define OP_CHEBYSHEV 32934
#define OP_CHEBYSHEV_C 34982
#define OP_COLOC 32935
#define OP_COLOC_C 34983
#define OP_CONNECT 32936
#define OP_CONNECT_C 34984
#define OP_CREATE 32937
#define OP_CREATE_D 41129
#define OP_DATA 32938
#define OP_DELINVENTORY 32939
#define OP_DELTA 32940
#define OP_DESTROY 32941
#define OP_DESTROY_C 34989
#define OP_DESTROY_D 41133
#define OP_DESTROY_CD 43181
#define OP_FAKEMOVE 32942
#define OP_FAKEMOVE_C 34990
#define OP_FINDCONNECTION 32943
#define OP_FINDCONNECTION_C 34991
#define OP_FLUSHCLASS 32944
#define OP_FLUSHOBJ 32945
#define OP_FLUSHOBJ_C 34993
#define OP_GETINVENTORY 32946
#define OP_HEIGHTAT 32947
#define OP_HITME 32948
#define OP_IGNOREKEY 32949
#define OP_INTMOVE 32950
#define OP_INTMOVE_C 34998
#define OP_INTMOVE_D 41142
#define OP_INTMOVE_CD 43190
#define OP_JUMPTO 32951
#define OP_JUMPTO_C 34999
#define OP_JUMPTO_D 41143
#define OP_JUMPTO_CD 43191
#define OP_LOC 32952
#define OP_LOC_C 35000
#define OP_LOCATEME 32953
#define OP_LOCATEME_C 35001
#define OP_LOSELEVEL 32954
#define OP_MANHATTAN 32955
#define OP_MANHATTAN_C 35003
#define OP_MAXINVENTORY 32956
#define OP_MORTON 32957
#define OP_MORTON_C 35005
#define OP_MOVE 32958
#define OP_MOVE_C 35006
#define OP_MOVE_D 41150
#define OP_MOVE_CD 43198
#define OP_MOVEPLUS 32959
#define OP_MOVEPLUS_C 35007
#define OP_MOVEPLUS_D 41151
#define OP_MOVEPLUS_CD 43199
#define OP_MOVETO 32960
#define OP_MOVETO_C 35008
#define OP_MOVETO_D 41152
#define OP_MOVETO_CD 43200
#define OP_PLUSMOVE 32961
#define OP_PLUSMOVE_C 35009
#define OP_PLUSMOVE_D 41153
#define OP_PLUSMOVE_CD 43201
#define OP_MINUSMOVE 32962
#define OP_MINUSMOVE_C 35010
#define OP_MINUSMOVE_D 41154
#define OP_MINUSMOVE_CD 43202
#define OP_NEWX 32963
#define OP_NEWXY 32964
#define OP_NEWY 32965
#define OP_OBJABOVE 32966
#define OP_OBJABOVE_C 35014
#define OP_OBJBELOW 32967
#define OP_OBJBELOW_C 35015
#define OP_OBJBOTTOMAT 32968
#define OP_OBJCLASSAT 32969
#define OP_OBJDIR 32970
#define OP_OBJDIR_C 35018
#define OP_OBJLAYERAT 32971
#define OP_OBJMOVINGTO 32972
#define OP_OBJTOPAT 32973
#define OP_POPUP 32974
#define OP_POPUPARGS 32975
#define OP_REL 32976
#define OP_REL_C 35024
#define OP_REPLACE 32977
#define OP_REPLACE_D 41169
#define OP_SEEK 32978
#define OP_SEEK_C 35026
#define OP_SEND 32979
#define OP_SEND_C 35027
#define OP_SEND_D 41171
#define OP_SEND_CD 43219
#define OP_SENDEX 32980
#define OP_SENDEX_C 35028
#define OP_SENDEX_D 41172
#define OP_SENDEX_CD 43220
#define OP_SETINVENTORY 32981
#define OP_SOUND 32982
#define OP_SWEEP 32983
#define OP_SWEEPEX 32984
#define OP_SYNCHRONIZE 32985
#define OP_TARGET 32986
#define OP_TARGET_C 35034
#define OP_TRACE 32987
#define OP_TRACESTACK 32988
#define OP_TRACESTACK_C 35036
#define OP_TRIGGER 32989
#define OP_TRIGGERAT 32990
#define OP_VOLUMEAT 32991
#define OP_WALKABLE 32992
#define OP_WALKABLE_C 35040
#define OP_WINLEVEL 32993
#define OP_WINLEVEL_C 35041
#define OP_XDIR 32994
#define OP_XDIR_C 35042
#define OP_XSTEP 32995
#define OP_XSTEP_C 35043
#define OP_XYDIR 32996
#define OP_YDIR 32997
#define OP_YDIR_C 35045
#define OP_YSTEP 32998
#define OP_YSTEP_C 35046
#define OP_MARK 32999
#define OP_TMARK 33000
#define OP_IN 33001
#define OP_NIN 33002
#define OP_MBEGIN 33003
#define OP_FLIP 33004
#define OP_COUNT 33005
#define OP_CLEAR 33006
#define OP_UNIQ 33007
#define OP_ARRAY 33008
#define OP_GETARRAY 33009
#define OP_GETARRAY_C 35057
#define OP_INITARRAY 33010
#define OP_SETARRAY 33011
#define OP_SETARRAY_C 35059
#define OP_ARRAYCELL 33012
#define OP_ARRAYCELL_C 35060
#define OP_ARRAYSLICE 33013
#define OP_COPYARRAY 33014
#define OP_DOTPRODUCT 33015
#define OP_PATTERN 33016
#define OP_PATTERN_C 35064
#define OP_PATTERN_E 37112
#define OP_PATTERN_EC 39160
#define OP_PATTERNS 33017
#define OP_PATTERNS_C 35065
#define OP_PATTERNS_E 37113
#define OP_PATTERNS_EC 39161
#define OP_ROOK 33018
#define OP_BISHOP 33019
#define OP_QUEEN 33020
#define OP_CUT 33021
#define OP_BIZARRO 33022
#define OP_BIZARRO_C 35070
#define OP_BIZARRO_E 37118
#define OP_BIZARRO_EC 39166
#define OP_BIZARROSWAP 33023
#define OP_BIZARROSWAP_D 41215
#define OP_SWAPWORLD 33024
#define OP_ABSTRACT 33025
#define OP_SUPER 33026
#define OP_SUPER_C 35074
#define OP_FUNCTION 33027
#define OP_LOCAL 33028
#define OP_LABEL 33029
#define OP_STRING 33030
#define OP_INT16 33031
#define OP_INT32 33032
#define OP_DISPATCH 33033
#define OP_USERFLAG 33034
#ifdef HEROMESH_CLASS
static const Op_Names op_names[]={
{"*",8486945},
{"+",8421407},
{"+Move",10584257},
{"-",8421408},
{"-Move",10584258},
{"-rot",8421382},
{".",10518528},
{"/",8486946},
{"/mod",8486948},
{"ANHH",8389393},
{"ARRIVED",8389124},
{"Abstract",8683777},
{"Animate",8552601},
{"AnimateDead",8552602},
{"Arg1",8552580},
{"Arg2",8552581},
{"Arg3",8552582},
{"Array",8683760},
{"ArrayCell",8487156},
{"ArraySlice",8421621},
{"Arrivals",8618095},
{"Arrived",8618093},
{"Assassinate",8487067},
{"B",9437196},
{"BANG",8389380},
{"BEDOINGNG",8389405},
{"BEEDEEP",8389403},
{"BEGIN_TURN",8389123},
{"BLOCKED",8389144},
{"BOOOM",8389409},
{"BOUNCE",8389414},
{"BRRREEET",8389395},
{"BRRRT",8389394},
{"BUZZER",8389419},
{"BWEEP",8389396},
{"Background",8683659},
{"Bishop",8683771},
{"Bizarro",8618238},
{"BizarroSwap",10518783},
{"Broadcast",10518684},
{"BroadcastAnd",8421533},
{"BroadcastAndEx",8421534},
{"BroadcastEx",10518688},
{"BroadcastList",8421537},
{"BroadcastListEx",8421538},
{"BroadcastSum",8421539},
{"BroadcastSumEx",8421540},
{"Busy",8618097},
{"CHEEP",8389392},
{"CHYEW",8389391},
{"CLICK",8389147},
{"COLLIDE",8389142},
{"COLLIDEBY",8389141},
{"COLLIDING",8389143},
{"CONFLICT",8389140},
{"CONNECT",8389145},
{"CREATE",8389121},
{"CREATED",8389137},
{"Chebyshev",8487078},
{"Class",8486979},
{"Climb",9142359},
{"CodePage",8683660},
{"CollisionLayers",8487039},
{"Coloc",8487079},
{"Compatible",8487038},
{"Connect",8487080},
{"Connection",8618107},
{"Control",8421518},
{"CopyArray",8421622},
{"Create",10518697},
{"Crush",8618112},
{"DEEP_POP",8389416},
{"DEPARTED",8389125},
{"DESTROY",8389122},
{"DESTROYED",8389136},
{"DINK",8389389},
{"DOOR",8389378},
{"DRLRLRINK",8389397},
{"DYUPE",8389412},
{"Data",8421546},
{"DefaultImage",8683668},
{"DelInventory",8421547},
{"Delta",8421548},
{"Density",9142351},
{"Departed",8618094},
{"Departures",8618096},
{"Destroy",10584237},
{"Destroyed",8487036},
{"Dir",8618057},
{"Distance",9142349},
{"Done",8618106},
{"DotProduct",8421623},
{"E",9437184},
{"END_TURN",8389139},
{"EditorHelp",8683670},
{"F",9437192},
{"FAROUT",8389420},
{"FFFFTT",8389398},
{"FLOATED",8389132},
{"FROG",8389383},
{"FakeMove",8487086},
{"FindConnection",8487087},
{"Finished",8552586},
{"FlushClass",8421552},
{"FlushObj",8487089},
{"From",8421507},
{"GLASS",8389379},
{"GLISSANT",8389418},
{"GetArray",8487153},
{"GetInventory",8421554},
{"HAWK",8389424},
{"HEARTBEAT",8389406},
{"HIT",8389134},
{"HITBY",8389135},
{"Hard",8618075},
{"Height",9142357},
{"HeightAt",8421555},
{"Help",8683669},
{"HitMe",8421556},
{"INIT",8389120},
{"IgnoreKey",8421557},
{"Image",8618058},
{"InPlace",8683667},
{"Inertia",9142347},
{"InitArray",8421618},
{"Input",8683665},
{"InputXY",8683664},
{"IntMove",10584246},
{"Invisible",8618098},
{"JAYAYAYNG",8389415},
{"JUMPED",8389128},
{"JumpTo",10584247},
{"KEWEL",8389421},
{"KEY",8389129},
{"KLECK",8389387},
{"KLINKK",8389385},
{"Key",8487049},
{"KeyCleared",8618099},
{"L",9437194},
{"LASTIMAGE",8389126},
{"LB",9437195},
{"LF",9437193},
{"LOCK",8389407},
{"LOOP",8388610},

{"Level",8421512},
{"LevelTable",8683663},
{"Loc",8487096},
{"LocateMe",8487097},
{"LoseLevel",8421562},
{"MOVED",8389127},
{"MOVING",8389130},
{"Manhattan",8487099},
{"MaxInventory",8421564},
{"Misc1",9142367},
{"Misc2",9142369},
{"Misc3",9142371},
{"Misc4",9142373},
{"Misc5",9142375},
{"Misc6",9142377},
{"Misc7",9142379},
{"Morton",8487101},
{"Move",10584254},
{"Move+",10584255},
{"MoveNumber",8552583},
{"MoveTo",10584256},
{"Moved",8618104},
{"Moving",8618105},
{"Msg",8421506},
{"N",9437186},
{"NE",9437185},
{"NEXTWARP",8389146},
{"NW",9437187},
{"NewX",8421571},
{"NewXY",8421572},
{"NewY",8421573},

{"OLDPHONE",8389401},
{"ONCE",8388609},
{"OSC",8388616},
{"OSCLOOP",8388618},
{"ObjAbove",8487110},
{"ObjBelow",8487111},
{"ObjBottomAt",8421576},
{"ObjClassAt",8421577},
{"ObjDir",8487114},
{"ObjLayerAt",8421579},
{"ObjMovingTo",8421580},
{"ObjTopAt",8421581},
{"Order",8683661},
{"Others",8683671},
{"P",8880376},
{"P*",8880377},
{"PLAYERMOVING",8389133},
{"POSTINIT",8389138},
{"POUR",8389377},
{"POWER",8389386},
{"Player",8487037},
{"PopUp",8421582},
{"Queen",8683772},
{"Quiz",8487058},
{"R",9437198},
{"RATCHET1",8389417},
{"RATCHET2",8389411},
{"RATTLE",8389402},
{"RB",9437197},
{"RF",9437199},
{"Rel",8487120},
{"Replace",10518737},
{"Rook",8683770},
{"S",9437190},
{"SE",9437191},
{"SMALL_POP",8389388},
{"SPLASH",8389376},
{"STEAM",8389423},
{"STOP",8388608},
{"SUBS",8683672},
{"SUNK",8389131},
{"SW",9437189},
{"Seek",8487122},
{"Self",8421505},
{"Send",10584275},
{"SendEx",10584276},
{"SetArray",8487155},
{"SetInventory",8421589},
{"Shape",8618054},
{"ShapeDir",8618077},
{"Sharp",8618076},
{"Shovable",8618078},
{"Sound",8421590},
{"Stealthy",8618103},
{"Strength",9142361},
{"Super",8487170},
{"SwapWorld",8421632},
{"Sweep",8421591},
{"SweepEx",8421592},
{"Synchronize",8421593},
{"TAHTASHH",8389408},
{"THMP_thmp",8389404},
{"THWIT",8389384},
{"TICK",8389390},
{"Target",8487130},
{"Temperature",9142340},

{"Trace",8421595},
{"TraceStack",8487132},
{"Trigger",8421597},
{"TriggerAt",8421598},
{"UH_OH",8389382},
{"UNCORK",8389413},
{"UNHH",8389381},
{"UserSignal",8618100},
{"UserState",8618101},
{"VACUUM",8389410},
{"VisualOnly",8618102},
{"Volume",9142353},
{"VolumeAt",8421599},
{"W",9437188},
{"WAHOO",8389399},
{"WHACK",8389422},
{"Walkable",8487136},
{"Weight",9142355},
{"WinLevel",8487137},
{"XDir",8487138},
{"XStep",8487139},
{"XYDir",8421604},
{"Xloc",8486983},
{"YDir",8487141},
{"YEEHAW",8389400},
{"YStep",8487142},
{"Yloc",8486984},
{"_",8421607},
{"a?",8421442},
{"again",8683533},
{"and",8683546},
{"band",8421418},
{"begin",8683532},
{"bit",8683566},
{"bit0",8388609},







>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
|
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|




|

|






|
|
|



|
|
|


|












|
|
|
|
|
|
|
|
|
|
|
|











|


|

|

|

|
|
|









|
|
|
|



|




|


|





|
|

|
|



|
|






|
|
|

|

|

|
|
|
|



|












>

|
|
|
|


|
|







|
|
|

|







|
|
|
>




|
|
|
|
|
|
|
|
|
|
|
|





|
|
|






|
|
|






|


|

|
|
|
|




|


|
|
|
|
|




|

>
|
|
|
|








|



|

|
|
|
|

|

|

|







299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331


332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
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
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
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
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
#define OP_MOVENUMBER 32903
#define OP_MOVENUMBER_E 36999
#define OP_LEVEL 32904
#define OP_KEY 32905
#define OP_KEY_C 34953
#define OP_FINISHED 32906
#define OP_FINISHED_E 37002
#define OP_THISR 32907
#define OP_THISR_C 34955
#define OP_THISR_E 37003
#define OP_THISR_EC 39051
#define OP_NEXTR 32908
#define OP_NEXTR_C 34956
#define OP_NEXTR_E 37004
#define OP_NEXTR_EC 39052
#define OP_LASTR 32909
#define OP_LASTR_C 34957
#define OP_BACKGROUND 32910
#define OP_CODEPAGE 32911
#define OP_ORDER 32912
#define OP_CONTROL 32913
#define OP_LEVELTABLE 32914
#define OP_INPUTXY 32915
#define OP_INPUT 32916
#define OP_QUIZ 32917
#define OP_QUIZ_C 34965
#define OP_INPLACE 32918
#define OP_DEFAULTIMAGE 32919
#define OP_HELP 32920
#define OP_EDITORHELP 32921
#define OP_OTHERS 32922
#define OP_SUBS 32923
#define OP_ANIMATE 32924


#define OP_ANIMATE_E 37020
#define OP_ANIMATEDEAD 32925
#define OP_ANIMATEDEAD_E 37021
#define OP_ASSASSINATE 32926
#define OP_ASSASSINATE_C 34974
#define OP_BROADCAST 32927
#define OP_BROADCAST_D 41119
#define OP_BROADCASTAND 32928
#define OP_BROADCASTANDEX 32929
#define OP_BROADCASTCLASS 32930
#define OP_BROADCASTEX 32931
#define OP_BROADCASTEX_D 41123
#define OP_BROADCASTLIST 32932
#define OP_BROADCASTLISTEX 32933
#define OP_BROADCASTSUM 32934
#define OP_BROADCASTSUMEX 32935
#define OP_CHAIN 32936
#define OP_CHEBYSHEV 32937
#define OP_CHEBYSHEV_C 34985
#define OP_COLOC 32938
#define OP_COLOC_C 34986
#define OP_CONNECT 32939
#define OP_CONNECT_C 34987
#define OP_CREATE 32940
#define OP_CREATE_D 41132
#define OP_DATA 32941
#define OP_DELINVENTORY 32942
#define OP_DELTA 32943
#define OP_DESTROY 32944
#define OP_DESTROY_C 34992
#define OP_DESTROY_D 41136
#define OP_DESTROY_CD 43184
#define OP_FAKEMOVE 32945
#define OP_FAKEMOVE_C 34993
#define OP_FINDCONNECTION 32946
#define OP_FINDCONNECTION_C 34994
#define OP_FLUSHCLASS 32947
#define OP_FLUSHOBJ 32948
#define OP_FLUSHOBJ_C 34996
#define OP_GETINVENTORY 32949
#define OP_HEIGHTAT 32950
#define OP_HITME 32951
#define OP_IGNOREKEY 32952
#define OP_INTMOVE 32953
#define OP_INTMOVE_C 35001
#define OP_INTMOVE_D 41145
#define OP_INTMOVE_CD 43193
#define OP_JUMPTO 32954
#define OP_JUMPTO_C 35002
#define OP_JUMPTO_D 41146
#define OP_JUMPTO_CD 43194
#define OP_LOC 32955
#define OP_LOC_C 35003
#define OP_LOCATEME 32956
#define OP_LOCATEME_C 35004
#define OP_LOSELEVEL 32957
#define OP_MANHATTAN 32958
#define OP_MANHATTAN_C 35006
#define OP_MAXINVENTORY 32959
#define OP_MORTON 32960
#define OP_MORTON_C 35008
#define OP_MOVE 32961
#define OP_MOVE_C 35009
#define OP_MOVE_D 41153
#define OP_MOVE_CD 43201
#define OP_MOVEPLUS 32962
#define OP_MOVEPLUS_C 35010
#define OP_MOVEPLUS_D 41154
#define OP_MOVEPLUS_CD 43202
#define OP_MOVETO 32963
#define OP_MOVETO_C 35011
#define OP_MOVETO_D 41155
#define OP_MOVETO_CD 43203
#define OP_PLUSMOVE 32964
#define OP_PLUSMOVE_C 35012
#define OP_PLUSMOVE_D 41156
#define OP_PLUSMOVE_CD 43204
#define OP_MINUSMOVE 32965
#define OP_MINUSMOVE_C 35013
#define OP_MINUSMOVE_D 41157
#define OP_MINUSMOVE_CD 43205
#define OP_NEWX 32966
#define OP_NEWXY 32967
#define OP_NEWY 32968
#define OP_OBJABOVE 32969
#define OP_OBJABOVE_C 35017
#define OP_OBJBELOW 32970
#define OP_OBJBELOW_C 35018
#define OP_OBJBOTTOMAT 32971
#define OP_OBJCLASSAT 32972
#define OP_OBJDIR 32973
#define OP_OBJDIR_C 35021
#define OP_OBJLAYERAT 32974
#define OP_OBJMOVINGTO 32975
#define OP_OBJTOPAT 32976
#define OP_POPUP 32977
#define OP_POPUPARGS 32978
#define OP_REL 32979
#define OP_REL_C 35027
#define OP_REPLACE 32980
#define OP_REPLACE_D 41172
#define OP_SEEK 32981
#define OP_SEEK_C 35029
#define OP_SEND 32982
#define OP_SEND_C 35030
#define OP_SEND_D 41174
#define OP_SEND_CD 43222
#define OP_SENDEX 32983
#define OP_SENDEX_C 35031
#define OP_SENDEX_D 41175
#define OP_SENDEX_CD 43223
#define OP_SETINVENTORY 32984
#define OP_SOUND 32985
#define OP_SWEEP 32986
#define OP_SWEEPEX 32987
#define OP_SYNCHRONIZE 32988
#define OP_TARGET 32989
#define OP_TARGET_C 35037
#define OP_TRACE 32990
#define OP_TRACESTACK 32991
#define OP_TRACESTACK_C 35039
#define OP_TRIGGER 32992
#define OP_TRIGGERAT 32993
#define OP_VOLUMEAT 32994
#define OP_WALKABLE 32995
#define OP_WALKABLE_C 35043
#define OP_WINLEVEL 32996
#define OP_WINLEVEL_C 35044
#define OP_XDIR 32997
#define OP_XDIR_C 35045
#define OP_XSTEP 32998
#define OP_XSTEP_C 35046
#define OP_XYDIR 32999
#define OP_YDIR 33000
#define OP_YDIR_C 35048
#define OP_YSTEP 33001
#define OP_YSTEP_C 35049
#define OP_MARK 33002
#define OP_TMARK 33003
#define OP_IN 33004
#define OP_NIN 33005
#define OP_MBEGIN 33006
#define OP_FLIP 33007
#define OP_COUNT 33008
#define OP_CLEAR 33009
#define OP_UNIQ 33010
#define OP_ARRAY 33011
#define OP_GETARRAY 33012
#define OP_GETARRAY_C 35060
#define OP_INITARRAY 33013
#define OP_SETARRAY 33014
#define OP_SETARRAY_C 35062
#define OP_ARRAYCELL 33015
#define OP_ARRAYCELL_C 35063
#define OP_ARRAYSLICE 33016
#define OP_COPYARRAY 33017
#define OP_DOTPRODUCT 33018
#define OP_PATTERN 33019
#define OP_PATTERN_C 35067
#define OP_PATTERN_E 37115
#define OP_PATTERN_EC 39163
#define OP_PATTERNS 33020
#define OP_PATTERNS_C 35068
#define OP_PATTERNS_E 37116
#define OP_PATTERNS_EC 39164
#define OP_ROOK 33021
#define OP_BISHOP 33022
#define OP_QUEEN 33023
#define OP_CUT 33024
#define OP_BIZARRO 33025
#define OP_BIZARRO_C 35073
#define OP_BIZARRO_E 37121
#define OP_BIZARRO_EC 39169
#define OP_BIZARROSWAP 33026
#define OP_BIZARROSWAP_D 41218
#define OP_SWAPWORLD 33027
#define OP_ABSTRACT 33028
#define OP_SUPER 33029
#define OP_SUPER_C 35077
#define OP_FUNCTION 33030
#define OP_LOCAL 33031
#define OP_LABEL 33032
#define OP_STRING 33033
#define OP_INT16 33034
#define OP_INT32 33035
#define OP_DISPATCH 33036
#define OP_USERFLAG 33037
#ifdef HEROMESH_CLASS
static const Op_Names op_names[]={
{"*",8486945},
{"+",8421407},
{"+Move",10584260},
{"-",8421408},
{"-Move",10584261},
{"-rot",8421382},
{".",10518528},
{"/",8486946},
{"/mod",8486948},
{"ANHH",8389393},
{"ARRIVED",8389124},
{"Abstract",8683780},
{"Animate",8552604},
{"AnimateDead",8552605},
{"Arg1",8552580},
{"Arg2",8552581},
{"Arg3",8552582},
{"Array",8683763},
{"ArrayCell",8487159},
{"ArraySlice",8421624},
{"Arrivals",8618095},
{"Arrived",8618093},
{"Assassinate",8487070},
{"B",9437196},
{"BANG",8389380},
{"BEDOINGNG",8389405},
{"BEEDEEP",8389403},
{"BEGIN_TURN",8389123},
{"BLOCKED",8389144},
{"BOOOM",8389409},
{"BOUNCE",8389414},
{"BRRREEET",8389395},
{"BRRRT",8389394},
{"BUZZER",8389419},
{"BWEEP",8389396},
{"Background",8683662},
{"Bishop",8683774},
{"Bizarro",8618241},
{"BizarroSwap",10518786},
{"Broadcast",10518687},
{"BroadcastAnd",8421536},
{"BroadcastAndEx",8421537},
{"BroadcastEx",10518691},
{"BroadcastList",8421540},
{"BroadcastListEx",8421541},
{"BroadcastSum",8421542},
{"BroadcastSumEx",8421543},
{"Busy",8618097},
{"CHEEP",8389392},
{"CHYEW",8389391},
{"CLICK",8389147},
{"COLLIDE",8389142},
{"COLLIDEBY",8389141},
{"COLLIDING",8389143},
{"CONFLICT",8389140},
{"CONNECT",8389145},
{"CREATE",8389121},
{"CREATED",8389137},
{"Chebyshev",8487081},
{"Class",8486979},
{"Climb",9142359},
{"CodePage",8683663},
{"CollisionLayers",8487039},
{"Coloc",8487082},
{"Compatible",8487038},
{"Connect",8487083},
{"Connection",8618107},
{"Control",8421521},
{"CopyArray",8421625},
{"Create",10518700},
{"Crush",8618112},
{"DEEP_POP",8389416},
{"DEPARTED",8389125},
{"DESTROY",8389122},
{"DESTROYED",8389136},
{"DINK",8389389},
{"DOOR",8389378},
{"DRLRLRINK",8389397},
{"DYUPE",8389412},
{"Data",8421549},
{"DefaultImage",8683671},
{"DelInventory",8421550},
{"Delta",8421551},
{"Density",9142351},
{"Departed",8618094},
{"Departures",8618096},
{"Destroy",10584240},
{"Destroyed",8487036},
{"Dir",8618057},
{"Distance",9142349},
{"Done",8618106},
{"DotProduct",8421626},
{"E",9437184},
{"END_TURN",8389139},
{"EditorHelp",8683673},
{"F",9437192},
{"FAROUT",8389420},
{"FFFFTT",8389398},
{"FLOATED",8389132},
{"FROG",8389383},
{"FakeMove",8487089},
{"FindConnection",8487090},
{"Finished",8552586},
{"FlushClass",8421555},
{"FlushObj",8487092},
{"From",8421507},
{"GLASS",8389379},
{"GLISSANT",8389418},
{"GetArray",8487156},
{"GetInventory",8421557},
{"HAWK",8389424},
{"HEARTBEAT",8389406},
{"HIT",8389134},
{"HITBY",8389135},
{"Hard",8618075},
{"Height",9142357},
{"HeightAt",8421558},
{"Help",8683672},
{"HitMe",8421559},
{"INIT",8389120},
{"IgnoreKey",8421560},
{"Image",8618058},
{"InPlace",8683670},
{"Inertia",9142347},
{"InitArray",8421621},
{"Input",8683668},
{"InputXY",8683667},
{"IntMove",10584249},
{"Invisible",8618098},
{"JAYAYAYNG",8389415},
{"JUMPED",8389128},
{"JumpTo",10584250},
{"KEWEL",8389421},
{"KEY",8389129},
{"KLECK",8389387},
{"KLINKK",8389385},
{"Key",8487049},
{"KeyCleared",8618099},
{"L",9437194},
{"LASTIMAGE",8389126},
{"LB",9437195},
{"LF",9437193},
{"LOCK",8389407},
{"LOOP",8388610},
{"LastR",8487053},
{"Level",8421512},
{"LevelTable",8683666},
{"Loc",8487099},
{"LocateMe",8487100},
{"LoseLevel",8421565},
{"MOVED",8389127},
{"MOVING",8389130},
{"Manhattan",8487102},
{"MaxInventory",8421567},
{"Misc1",9142367},
{"Misc2",9142369},
{"Misc3",9142371},
{"Misc4",9142373},
{"Misc5",9142375},
{"Misc6",9142377},
{"Misc7",9142379},
{"Morton",8487104},
{"Move",10584257},
{"Move+",10584258},
{"MoveNumber",8552583},
{"MoveTo",10584259},
{"Moved",8618104},
{"Moving",8618105},
{"Msg",8421506},
{"N",9437186},
{"NE",9437185},
{"NEXTWARP",8389146},
{"NW",9437187},
{"NewX",8421574},
{"NewXY",8421575},
{"NewY",8421576},
{"NextR",8618124},
{"OLDPHONE",8389401},
{"ONCE",8388609},
{"OSC",8388616},
{"OSCLOOP",8388618},
{"ObjAbove",8487113},
{"ObjBelow",8487114},
{"ObjBottomAt",8421579},
{"ObjClassAt",8421580},
{"ObjDir",8487117},
{"ObjLayerAt",8421582},
{"ObjMovingTo",8421583},
{"ObjTopAt",8421584},
{"Order",8683664},
{"Others",8683674},
{"P",8880379},
{"P*",8880380},
{"PLAYERMOVING",8389133},
{"POSTINIT",8389138},
{"POUR",8389377},
{"POWER",8389386},
{"Player",8487037},
{"PopUp",8421585},
{"Queen",8683775},
{"Quiz",8487061},
{"R",9437198},
{"RATCHET1",8389417},
{"RATCHET2",8389411},
{"RATTLE",8389402},
{"RB",9437197},
{"RF",9437199},
{"Rel",8487123},
{"Replace",10518740},
{"Rook",8683773},
{"S",9437190},
{"SE",9437191},
{"SMALL_POP",8389388},
{"SPLASH",8389376},
{"STEAM",8389423},
{"STOP",8388608},
{"SUBS",8683675},
{"SUNK",8389131},
{"SW",9437189},
{"Seek",8487125},
{"Self",8421505},
{"Send",10584278},
{"SendEx",10584279},
{"SetArray",8487158},
{"SetInventory",8421592},
{"Shape",8618054},
{"ShapeDir",8618077},
{"Sharp",8618076},
{"Shovable",8618078},
{"Sound",8421593},
{"Stealthy",8618103},
{"Strength",9142361},
{"Super",8487173},
{"SwapWorld",8421635},
{"Sweep",8421594},
{"SweepEx",8421595},
{"Synchronize",8421596},
{"TAHTASHH",8389408},
{"THMP_thmp",8389404},
{"THWIT",8389384},
{"TICK",8389390},
{"Target",8487133},
{"Temperature",9142340},
{"ThisR",8618123},
{"Trace",8421598},
{"TraceStack",8487135},
{"Trigger",8421600},
{"TriggerAt",8421601},
{"UH_OH",8389382},
{"UNCORK",8389413},
{"UNHH",8389381},
{"UserSignal",8618100},
{"UserState",8618101},
{"VACUUM",8389410},
{"VisualOnly",8618102},
{"Volume",9142353},
{"VolumeAt",8421602},
{"W",9437188},
{"WAHOO",8389399},
{"WHACK",8389422},
{"Walkable",8487139},
{"Weight",9142355},
{"WinLevel",8487140},
{"XDir",8487141},
{"XStep",8487142},
{"XYDir",8421607},
{"Xloc",8486983},
{"YDir",8487144},
{"YEEHAW",8389400},
{"YStep",8487145},
{"Yloc",8486984},
{"_",8421610},
{"a?",8421442},
{"again",8683533},
{"and",8683546},
{"band",8421418},
{"begin",8683532},
{"bit",8683566},
{"bit0",8388609},
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
{"bit8",8423400},
{"bit9",8423401},
{"bnot",8421421},
{"bor",8421419},
{"bxor",8421420},
{"c?",8421436},
{"case",8683544},
{"chain",8421541},
{"clear",8421614},
{"count",8421613},
{"cut",8683773},
{"cz?",8421437},
{"dup",8421377},
{"else",8683530},
{"eq",8421427},
{"eq2",8421428},
{"exec",8486942},
{"flip",8421612},
{"for",8683537},
{"fork",8683547},
{"ge",8486968},
{"gt",8486966},
{"if",8683529},
{"in",8421609},
{"is",8421434},
{"land",8421423},
{"le",8486969},
{"link",8683549},
{"lnot",8421426},
{"lor",8421424},
{"lsh",8421416},
{"lt",8486967},
{"lxor",8421425},
{"m?",8421438},
{"max",8486951},
{"mbegin",8683755},
{"min",8486950},
{"mod",8486947},
{"n?",8421435},
{"ne",8421429},
{"neg",8421413},
{"next",8683538},
{"nin",8421610},
{"nip",8421379},
{"o?",8421440},
{"or",8683545},
{"over",8421384},
{"oz?",8421441},
{"pick",8421383},
{"repeat",8683536},
{"ret",8421397},
{"retnz",8421398},
{"retz",8421399},
{"rot",8421381},
{"rsh",8486953},
{"rtn",8683548},
{"s?",8421439},
{"swap",8421378},
{"then",8683531},
{"tmark",8421608},
{"tuck",8421380},
{"uniq",8421615},
{"until",8683534},
{"while",8683535},
};
#define N_OP_NAMES 369
#endif







|
|
|
|






|





|











|






|
















|

|



|

829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
{"bit8",8423400},
{"bit9",8423401},
{"bnot",8421421},
{"bor",8421419},
{"bxor",8421420},
{"c?",8421436},
{"case",8683544},
{"chain",8421544},
{"clear",8421617},
{"count",8421616},
{"cut",8683776},
{"cz?",8421437},
{"dup",8421377},
{"else",8683530},
{"eq",8421427},
{"eq2",8421428},
{"exec",8486942},
{"flip",8421615},
{"for",8683537},
{"fork",8683547},
{"ge",8486968},
{"gt",8486966},
{"if",8683529},
{"in",8421612},
{"is",8421434},
{"land",8421423},
{"le",8486969},
{"link",8683549},
{"lnot",8421426},
{"lor",8421424},
{"lsh",8421416},
{"lt",8486967},
{"lxor",8421425},
{"m?",8421438},
{"max",8486951},
{"mbegin",8683758},
{"min",8486950},
{"mod",8486947},
{"n?",8421435},
{"ne",8421429},
{"neg",8421413},
{"next",8683538},
{"nin",8421613},
{"nip",8421379},
{"o?",8421440},
{"or",8683545},
{"over",8421384},
{"oz?",8421441},
{"pick",8421383},
{"repeat",8683536},
{"ret",8421397},
{"retnz",8421398},
{"retz",8421399},
{"rot",8421381},
{"rsh",8486953},
{"rtn",8683548},
{"s?",8421439},
{"swap",8421378},
{"then",8683531},
{"tmark",8421611},
{"tuck",8421380},
{"uniq",8421618},
{"until",8683534},
{"while",8683535},
};
#define N_OP_NAMES 372
#endif