Index: TODO ================================================================== --- TODO +++ TODO @@ -3,11 +3,10 @@ * Numeric sounds (?) * Game engine features * Multiple connected objects moving as a unit * String data (partially implemented) * A ,PopUp command to use a popup with arguments starting from a mark - * "Goto message" instruction (?) * Returning a class from COLLIDE/COLLIDEBY to transform * Coordinate input (may be suitable for some kind of games) * Possibility to define auto-generation levels mode * Editor * Mouse dragging Index: class.c ================================================================== --- class.c +++ class.c @@ -1535,10 +1535,21 @@ case OP_SUPER: case OP_SUPER_C: if(!ptr || cl->codes[0]!=OP_SUPER) ParseError("Use of Super in a class with no parent class\n"); AddInst(tokenv); break; + case OP_LINK: + AddInst(OP_LINK); + FlowPush(OP_IF); + cl->codes[++ptr]=cla; + peep=++ptr; + break; + case OP_RTN: + AddInst(OP_RET); + FlowPop(OP_IF); + cl->codes[flowptr[flowdepth]]=peep=ptr; + break; default: if(Tokenf(TF_ABNORMAL)) ParseError("Invalid instruction token\n"); if(compat && Tokenf(TF_COMPAT) && Tokenf(TF_EQUAL)) ++tokenv; AddInstF(tokenv,tokent); } Index: class.doc ================================================================== --- class.doc +++ class.doc @@ -581,10 +581,14 @@ 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. + +* Link: A link to another point in the code of some class or global. Where +a link is expected, you can also specify a message to mean that message +block for the Self object. Some things are not their own types, and are other uses of numbers: * Null: A null class or null object is represented as zero. @@ -1391,10 +1395,18 @@ eq2 ( in1 in2 in3 in4 -- bool ) Test if in1 is equal to in3 and in2 is equal to in4. Comparison works the same way as the "eq" instruction. +exec ( link -- ) + Go to a link; does not continue executing from here afterward. If the + link is zero then it will be the same as ret. + +,exec ( link -- ) + Go to a link and then continue executing from here afterward. If the + link is zero then this instruction does nothing. + Finished ( -- number ) Returns the value of an internal flag which tells it that the beginning and ending phases should be skipped. This is a 8-bit number; zero means don't skip them, and any other number means it does. When the game engine sets this automatically, it normally sets it to 1, but "-1 FlushClass" @@ -1775,10 +1787,13 @@ ,rsh ( in shift -- out ) Arithmetic right shift. If the shift amount is out of the range 0-31, then all bits are shifted out; the result will be -1 if the input is negative, or 0 otherwise. +rtn ( -- ) + Same as "ret then". + s? ( any -- bool ) True if the value is a string (which may be either a string in the class codes or a string in the level), or false if it is any other type. Error if it is a sound. @@ -1961,10 +1976,15 @@ if [else ] then ( bool -- ) Takes a boolean value from the stack. If true, then is executed; otherwise it tries the other parts; "else" means always do this if none of the previous parts match. + +link [else ] then ( -- link ) + Skips the body and makes a link to the beginning of the body. If there is + a else block, then it executes that instead but will be skipped if the + link to the first body is executed. mbegin repeat ( -- any ) ( -- ) The "mbegin" instruction is a shortcut for "begin tmark while", and it has the same behaviour. Index: exec.c ================================================================== --- exec.c +++ exec.c @@ -2352,10 +2352,27 @@ } } msgvars.arg3.u=hit|7; return (hit&0x8008)==0x8000?1:0; } + +static Uint32 convert_link(Value v,Uint32 obj,Uint16*code) { + int i; + switch(v.t) { + case TY_NUMBER: + if(v.u) Throw("Type mismatch"); + return 0xFFFF; + case TY_MESSAGE: + i=get_message_ptr(objects[obj]->class,v.u); + return i==0xFFFF?get_message_ptr(0,v.u):(i|(objects[obj]->class<<16)); + case TY_CODE: + i=v.u>>16; + if(i==objects[obj]->class || !i || code==classes[i]->codes) return v.u; + Throw("Link mismatch"); + default: Throw("Type mismatch"); + } +} // 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))) @@ -2530,18 +2547,20 @@ 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_EXEC: StackReq(1,0); t1=Pop(); i=convert_link(t1,obj,code); if(i==0xFFFF) return; code=classes[i>>16]->codes; ptr=i&0xFFFF; break; + case OP_EXEC_C: StackReq(1,0); t1=Pop(); i=convert_link(t1,obj,code); if(i!=0xFFFF) execute_program(classes[i>>16]->codes,i&0xFFFF,obj); 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; - case OP_FORK: execute_program(code,ptr+1,obj); ptr=code[ptr]; break; case OP_FLIP: v_flip(); break; case OP_FLUSHCLASS: NoIgnore(); StackReq(1,0); t1=Pop(); if(t1.t==TY_CLASS) flush_class(t1.u); else if(t1.t==TY_NUMBER && t1.s==-1) flush_all(); else if(t1.t) Throw("Type mismatch"); break; case OP_FLUSHOBJ: NoIgnore(); flush_object(obj); break; case OP_FLUSHOBJ_C: NoIgnore(); StackReq(1,0); i=v_object(Pop()); if(i!=VOIDLINK) flush_object(i); break; case OP_FOR: NoIgnore(); StackReq(3,1); t3=Pop(); t2=Pop(); t1=Pop(); ptr=v_for(code,ptr,t1,t2,t3); break; + case OP_FORK: execute_program(code,ptr+1,obj); ptr=code[ptr]; break; case OP_FROM: StackReq(0,1); Push(OVALUE(msgvars.from)); break; case OP_FUNCTION: execute_program(classes[0]->codes,functions[code[ptr++]],obj); break; case OP_GE: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_unsigned_greater(t2,t1)?0:1)); break; case OP_GE_C: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_signed_greater(t2,t1)?0:1)); break; case OP_GETARRAY: StackReq(3,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); t1=Pop(); Push(v_get_array(t1,t2.u,t3.u)); break; @@ -2597,10 +2616,11 @@ 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; case OP_LOCATEME: locate_me(o->x,o->y); break; case OP_LOCATEME_C: StackReq(1,0); i=v_object(Pop()); if(i!=VOIDLINK) locate_me(objects[i]->x,objects[i]->y); break; Index: function.c ================================================================== --- function.c +++ function.c @@ -228,10 +228,11 @@ [TY_LEVELSTRING]="string", [TY_STRING]="string", [TY_SOUND]="sound", [TY_USOUND]="sound", [TY_MARK]="mark", + [TY_CODE]="link", }; int i; if(sqlite3_value_type(*argv)!=SQLITE_INTEGER) return; i=sqlite3_value_int64(*argv)>>32; sqlite3_result_text(cxt,i<0||i>TY_MAXTYPE?"object":n[i]?:"???",-1,SQLITE_STATIC); Index: instruc ================================================================== --- instruc +++ instruc @@ -93,10 +93,13 @@ ret -case -or -and -fork +-rtn +-link +,exec ; Arithmetic add "+" sub "-" ,mul "*" Index: instruc.h ================================================================== --- instruc.h +++ instruc.h @@ -30,467 +30,471 @@ #define OP_RET 32789 #define OP_CASE 32790 #define OP_OR 32791 #define OP_AND 32792 #define OP_FORK 32793 -#define OP_ADD 32794 -#define OP_SUB 32795 -#define OP_MUL 32796 -#define OP_MUL_C 34844 -#define OP_DIV 32797 -#define OP_DIV_C 34845 -#define OP_MOD 32798 -#define OP_MOD_C 34846 -#define OP_NEG 32799 -#define OP_MIN 32800 -#define OP_MIN_C 34848 -#define OP_MAX 32801 -#define OP_MAX_C 34849 -#define OP_LSH 32802 -#define OP_RSH 32803 -#define OP_RSH_C 34851 -#define OP_BAND 32804 -#define OP_BOR 32805 -#define OP_BXOR 32806 -#define OP_BNOT 32807 -#define OP_BIT 32808 -#define OP_LAND 32809 -#define OP_LOR 32810 -#define OP_LXOR 32811 -#define OP_LNOT 32812 -#define OP_EQ 32813 -#define OP_EQ2 32814 -#define OP_NE 32815 -#define OP_GT 32816 -#define OP_GT_C 34864 -#define OP_LT 32817 -#define OP_LT_C 34865 -#define OP_GE 32818 -#define OP_GE_C 34866 -#define OP_LE 32819 -#define OP_LE_C 34867 -#define OP_IS 32820 -#define OP_QN 32821 -#define OP_QC 32822 -#define OP_QCZ 32823 -#define OP_QM 32824 -#define OP_QS 32825 -#define OP_QO 32826 -#define OP_QOZ 32827 -#define OP_QA 32828 -#define OP_CLASS 32829 -#define OP_CLASS_C 34877 -#define OP_TEMPERATURE 32830 -#define OP_TEMPERATURE_C 34878 -#define OP_TEMPERATURE_E 36926 -#define OP_TEMPERATURE_EC 38974 -#define OP_TEMPERATURE_EC16 38975 -#define OP_TEMPERATURE_E16 36927 -#define OP_SHAPE 32832 -#define OP_SHAPE_C 34880 -#define OP_SHAPE_E 36928 -#define OP_SHAPE_EC 38976 -#define OP_XLOC 32833 -#define OP_XLOC_C 34881 -#define OP_YLOC 32834 -#define OP_YLOC_C 34882 -#define OP_DIR 32835 -#define OP_DIR_C 34883 -#define OP_DIR_E 36931 -#define OP_DIR_EC 38979 -#define OP_IMAGE 32836 -#define OP_IMAGE_C 34884 -#define OP_IMAGE_E 36932 -#define OP_IMAGE_EC 38980 -#define OP_INERTIA 32837 -#define OP_INERTIA_C 34885 -#define OP_INERTIA_E 36933 -#define OP_INERTIA_EC 38981 -#define OP_INERTIA_EC16 38982 -#define OP_INERTIA_E16 36934 -#define OP_DISTANCE 32839 -#define OP_DISTANCE_C 34887 -#define OP_DISTANCE_E 36935 -#define OP_DISTANCE_EC 38983 -#define OP_DISTANCE_EC16 38984 -#define OP_DISTANCE_E16 36936 -#define OP_DENSITY 32841 -#define OP_DENSITY_C 34889 -#define OP_DENSITY_E 36937 -#define OP_DENSITY_EC 38985 -#define OP_DENSITY_EC16 38986 -#define OP_DENSITY_E16 36938 -#define OP_VOLUME 32843 -#define OP_VOLUME_C 34891 -#define OP_VOLUME_E 36939 -#define OP_VOLUME_EC 38987 -#define OP_VOLUME_EC16 38988 -#define OP_VOLUME_E16 36940 -#define OP_WEIGHT 32845 -#define OP_WEIGHT_C 34893 -#define OP_WEIGHT_E 36941 -#define OP_WEIGHT_EC 38989 -#define OP_WEIGHT_EC16 38990 -#define OP_WEIGHT_E16 36942 -#define OP_HEIGHT 32847 -#define OP_HEIGHT_C 34895 -#define OP_HEIGHT_E 36943 -#define OP_HEIGHT_EC 38991 -#define OP_HEIGHT_EC16 38992 -#define OP_HEIGHT_E16 36944 -#define OP_CLIMB 32849 -#define OP_CLIMB_C 34897 -#define OP_CLIMB_E 36945 -#define OP_CLIMB_EC 38993 -#define OP_CLIMB_EC16 38994 -#define OP_CLIMB_E16 36946 -#define OP_STRENGTH 32851 -#define OP_STRENGTH_C 34899 -#define OP_STRENGTH_E 36947 -#define OP_STRENGTH_EC 38995 -#define OP_STRENGTH_EC16 38996 -#define OP_STRENGTH_E16 36948 -#define OP_HARD 32853 -#define OP_HARD_C 34901 -#define OP_HARD_E 36949 -#define OP_HARD_EC 38997 -#define OP_SHARP 32854 -#define OP_SHARP_C 34902 -#define OP_SHARP_E 36950 -#define OP_SHARP_EC 38998 -#define OP_SHAPEDIR 32855 -#define OP_SHAPEDIR_C 34903 -#define OP_SHAPEDIR_E 36951 -#define OP_SHAPEDIR_EC 38999 -#define OP_SHOVABLE 32856 -#define OP_SHOVABLE_C 34904 -#define OP_SHOVABLE_E 36952 -#define OP_SHOVABLE_EC 39000 -#define OP_MISC1 32857 -#define OP_MISC1_C 34905 -#define OP_MISC1_E 36953 -#define OP_MISC1_EC 39001 -#define OP_MISC1_EC16 39002 -#define OP_MISC1_E16 36954 -#define OP_MISC2 32859 -#define OP_MISC2_C 34907 -#define OP_MISC2_E 36955 -#define OP_MISC2_EC 39003 -#define OP_MISC2_EC16 39004 -#define OP_MISC2_E16 36956 -#define OP_MISC3 32861 -#define OP_MISC3_C 34909 -#define OP_MISC3_E 36957 -#define OP_MISC3_EC 39005 -#define OP_MISC3_EC16 39006 -#define OP_MISC3_E16 36958 -#define OP_MISC4 32863 -#define OP_MISC4_C 34911 -#define OP_MISC4_E 36959 -#define OP_MISC4_EC 39007 -#define OP_MISC4_EC16 39008 -#define OP_MISC4_E16 36960 -#define OP_MISC5 32865 -#define OP_MISC5_C 34913 -#define OP_MISC5_E 36961 -#define OP_MISC5_EC 39009 -#define OP_MISC5_EC16 39010 -#define OP_MISC5_E16 36962 -#define OP_MISC6 32867 -#define OP_MISC6_C 34915 -#define OP_MISC6_E 36963 -#define OP_MISC6_EC 39011 -#define OP_MISC6_EC16 39012 -#define OP_MISC6_E16 36964 -#define OP_MISC7 32869 -#define OP_MISC7_C 34917 -#define OP_MISC7_E 36965 -#define OP_MISC7_EC 39013 -#define OP_MISC7_EC16 39014 -#define OP_MISC7_E16 36966 -#define OP_ARRIVED 32871 -#define OP_ARRIVED_C 34919 -#define OP_ARRIVED_E 36967 -#define OP_ARRIVED_EC 39015 -#define OP_DEPARTED 32872 -#define OP_DEPARTED_C 34920 -#define OP_DEPARTED_E 36968 -#define OP_DEPARTED_EC 39016 -#define OP_ARRIVALS 32873 -#define OP_ARRIVALS_C 34921 -#define OP_ARRIVALS_E 36969 -#define OP_ARRIVALS_EC 39017 -#define OP_DEPARTURES 32874 -#define OP_DEPARTURES_C 34922 -#define OP_DEPARTURES_E 36970 -#define OP_DEPARTURES_EC 39018 -#define OP_BUSY 32875 -#define OP_BUSY_C 34923 -#define OP_BUSY_E 36971 -#define OP_BUSY_EC 39019 -#define OP_INVISIBLE 32876 -#define OP_INVISIBLE_C 34924 -#define OP_INVISIBLE_E 36972 -#define OP_INVISIBLE_EC 39020 -#define OP_KEYCLEARED 32877 -#define OP_KEYCLEARED_C 34925 -#define OP_KEYCLEARED_E 36973 -#define OP_KEYCLEARED_EC 39021 -#define OP_USERSIGNAL 32878 -#define OP_USERSIGNAL_C 34926 -#define OP_USERSIGNAL_E 36974 -#define OP_USERSIGNAL_EC 39022 -#define OP_USERSTATE 32879 -#define OP_USERSTATE_C 34927 -#define OP_USERSTATE_E 36975 -#define OP_USERSTATE_EC 39023 -#define OP_VISUALONLY 32880 -#define OP_VISUALONLY_C 34928 -#define OP_VISUALONLY_E 36976 -#define OP_VISUALONLY_EC 39024 -#define OP_STEALTHY 32881 -#define OP_STEALTHY_C 34929 -#define OP_STEALTHY_E 36977 -#define OP_STEALTHY_EC 39025 -#define OP_MOVED 32882 -#define OP_MOVED_C 34930 -#define OP_MOVED_E 36978 -#define OP_MOVED_EC 39026 -#define OP_MOVING 32883 -#define OP_MOVING_C 34931 -#define OP_MOVING_E 36979 -#define OP_MOVING_EC 39027 -#define OP_DONE 32884 -#define OP_DONE_C 34932 -#define OP_DONE_E 36980 -#define OP_DONE_EC 39028 -#define OP_DESTROYED 32885 -#define OP_DESTROYED_C 34933 -#define OP_PLAYER 32886 -#define OP_PLAYER_C 34934 -#define OP_COMPATIBLE 32887 -#define OP_COMPATIBLE_C 34935 -#define OP_COLLISIONLAYERS 32888 -#define OP_COLLISIONLAYERS_C 34936 -#define OP_SELF 32889 -#define OP_MSG 32890 -#define OP_FROM 32891 -#define OP_ARG1 32892 -#define OP_ARG1_E 36988 -#define OP_ARG2 32893 -#define OP_ARG2_E 36989 -#define OP_ARG3 32894 -#define OP_ARG3_E 36990 -#define OP_MOVENUMBER 32895 -#define OP_MOVENUMBER_E 36991 -#define OP_LEVEL 32896 -#define OP_KEY 32897 -#define OP_FINISHED 32898 -#define OP_FINISHED_E 36994 -#define OP_BACKGROUND 32899 -#define OP_CODEPAGE 32900 -#define OP_ORDER 32901 -#define OP_CONTROL 32902 -#define OP_LEVELTABLE 32903 -#define OP_INPUT 32904 -#define OP_QUIZ 32905 -#define OP_INPLACE 32906 -#define OP_DEFAULTIMAGE 32907 -#define OP_HELP 32908 -#define OP_EDITORHELP 32909 -#define OP_OTHERS 32910 -#define OP_SUBS 32911 -#define OP_ANIMATE 32912 -#define OP_ANIMATE_E 37008 -#define OP_ANIMATEDEAD 32913 -#define OP_ANIMATEDEAD_E 37009 -#define OP_ASSASSINATE 32914 -#define OP_ASSASSINATE_C 34962 -#define OP_BROADCAST 32915 -#define OP_BROADCAST_D 41107 -#define OP_BROADCASTAND 32916 -#define OP_BROADCASTANDEX 32917 -#define OP_BROADCASTCLASS 32918 -#define OP_BROADCASTEX 32919 -#define OP_BROADCASTEX_D 41111 -#define OP_BROADCASTLIST 32920 -#define OP_BROADCASTLISTEX 32921 -#define OP_BROADCASTSUM 32922 -#define OP_BROADCASTSUMEX 32923 -#define OP_CHAIN 32924 -#define OP_CHEBYSHEV 32925 -#define OP_CHEBYSHEV_C 34973 -#define OP_COLOC 32926 -#define OP_COLOC_C 34974 -#define OP_CREATE 32927 -#define OP_CREATE_D 41119 -#define OP_DATA 32928 -#define OP_DELINVENTORY 32929 -#define OP_DELTA 32930 -#define OP_DESTROY 32931 -#define OP_DESTROY_C 34979 -#define OP_DESTROY_D 41123 -#define OP_DESTROY_CD 43171 -#define OP_FLUSHCLASS 32932 -#define OP_FLUSHOBJ 32933 -#define OP_FLUSHOBJ_C 34981 -#define OP_GETINVENTORY 32934 -#define OP_HEIGHTAT 32935 -#define OP_HITME 32936 -#define OP_IGNOREKEY 32937 -#define OP_INTMOVE 32938 -#define OP_INTMOVE_C 34986 -#define OP_INTMOVE_D 41130 -#define OP_INTMOVE_CD 43178 -#define OP_JUMPTO 32939 -#define OP_JUMPTO_C 34987 -#define OP_JUMPTO_D 41131 -#define OP_JUMPTO_CD 43179 -#define OP_LOC 32940 -#define OP_LOC_C 34988 -#define OP_LOCATEME 32941 -#define OP_LOCATEME_C 34989 -#define OP_LOSELEVEL 32942 -#define OP_MANHATTAN 32943 -#define OP_MANHATTAN_C 34991 -#define OP_MAXINVENTORY 32944 -#define OP_MOVE 32945 -#define OP_MOVE_C 34993 -#define OP_MOVE_D 41137 -#define OP_MOVE_CD 43185 -#define OP_MOVEPLUS 32946 -#define OP_MOVEPLUS_C 34994 -#define OP_MOVEPLUS_D 41138 -#define OP_MOVEPLUS_CD 43186 -#define OP_MOVETO 32947 -#define OP_MOVETO_C 34995 -#define OP_MOVETO_D 41139 -#define OP_MOVETO_CD 43187 -#define OP_PLUSMOVE 32948 -#define OP_PLUSMOVE_C 34996 -#define OP_PLUSMOVE_D 41140 -#define OP_PLUSMOVE_CD 43188 -#define OP_MINUSMOVE 32949 -#define OP_MINUSMOVE_C 34997 -#define OP_MINUSMOVE_D 41141 -#define OP_MINUSMOVE_CD 43189 -#define OP_NEWX 32950 -#define OP_NEWXY 32951 -#define OP_NEWY 32952 -#define OP_OBJABOVE 32953 -#define OP_OBJABOVE_C 35001 -#define OP_OBJBELOW 32954 -#define OP_OBJBELOW_C 35002 -#define OP_OBJBOTTOMAT 32955 -#define OP_OBJCLASSAT 32956 -#define OP_OBJDIR 32957 -#define OP_OBJDIR_C 35005 -#define OP_OBJLAYERAT 32958 -#define OP_OBJMOVINGTO 32959 -#define OP_OBJTOPAT 32960 -#define OP_POPUP 32961 -#define OP_POPUPARGS 32962 -#define OP_REL 32963 -#define OP_REL_C 35011 -#define OP_SEEK 32964 -#define OP_SEEK_C 35012 -#define OP_SEND 32965 -#define OP_SEND_C 35013 -#define OP_SEND_D 41157 -#define OP_SEND_CD 43205 -#define OP_SENDEX 32966 -#define OP_SENDEX_C 35014 -#define OP_SENDEX_D 41158 -#define OP_SENDEX_CD 43206 -#define OP_SETINVENTORY 32967 -#define OP_SOUND 32968 -#define OP_SWEEP 32969 -#define OP_SWEEPEX 32970 -#define OP_SYNCHRONIZE 32971 -#define OP_TARGET 32972 -#define OP_TARGET_C 35020 -#define OP_TRACE 32973 -#define OP_TRIGGER 32974 -#define OP_TRIGGERAT 32975 -#define OP_VOLUMEAT 32976 -#define OP_WINLEVEL 32977 -#define OP_XDIR 32978 -#define OP_XDIR_C 35026 -#define OP_XYDIR 32979 -#define OP_YDIR 32980 -#define OP_YDIR_C 35028 -#define OP_MARK 32981 -#define OP_TMARK 32982 -#define OP_IN 32983 -#define OP_NIN 32984 -#define OP_MBEGIN 32985 -#define OP_FLIP 32986 -#define OP_COUNT 32987 -#define OP_CLEAR 32988 -#define OP_UNIQ 32989 -#define OP_ARRAY 32990 -#define OP_GETARRAY 32991 -#define OP_INITARRAY 32992 -#define OP_SETARRAY 32993 -#define OP_ARRAYCELL 32994 -#define OP_ARRAYSLICE 32995 -#define OP_COPYARRAY 32996 -#define OP_DOTPRODUCT 32997 -#define OP_PATTERN 32998 -#define OP_PATTERN_C 35046 -#define OP_PATTERN_E 37094 -#define OP_PATTERN_EC 39142 -#define OP_PATTERNS 32999 -#define OP_PATTERNS_C 35047 -#define OP_PATTERNS_E 37095 -#define OP_PATTERNS_EC 39143 -#define OP_ROOK 33000 -#define OP_BISHOP 33001 -#define OP_QUEEN 33002 -#define OP_CUT 33003 -#define OP_BIZARRO 33004 -#define OP_BIZARRO_C 35052 -#define OP_BIZARRO_E 37100 -#define OP_BIZARRO_EC 39148 -#define OP_BIZARROSWAP 33005 -#define OP_BIZARROSWAP_D 41197 -#define OP_SWAPWORLD 33006 -#define OP_ABSTRACT 33007 -#define OP_SUPER 33008 -#define OP_SUPER_C 35056 -#define OP_FUNCTION 33009 -#define OP_LOCAL 33010 -#define OP_LABEL 33011 -#define OP_STRING 33012 -#define OP_INT16 33013 -#define OP_INT32 33014 -#define OP_DISPATCH 33015 -#define OP_USERFLAG 33016 +#define OP_RTN 32794 +#define OP_LINK 32795 +#define OP_EXEC 32796 +#define OP_EXEC_C 34844 +#define OP_ADD 32797 +#define OP_SUB 32798 +#define OP_MUL 32799 +#define OP_MUL_C 34847 +#define OP_DIV 32800 +#define OP_DIV_C 34848 +#define OP_MOD 32801 +#define OP_MOD_C 34849 +#define OP_NEG 32802 +#define OP_MIN 32803 +#define OP_MIN_C 34851 +#define OP_MAX 32804 +#define OP_MAX_C 34852 +#define OP_LSH 32805 +#define OP_RSH 32806 +#define OP_RSH_C 34854 +#define OP_BAND 32807 +#define OP_BOR 32808 +#define OP_BXOR 32809 +#define OP_BNOT 32810 +#define OP_BIT 32811 +#define OP_LAND 32812 +#define OP_LOR 32813 +#define OP_LXOR 32814 +#define OP_LNOT 32815 +#define OP_EQ 32816 +#define OP_EQ2 32817 +#define OP_NE 32818 +#define OP_GT 32819 +#define OP_GT_C 34867 +#define OP_LT 32820 +#define OP_LT_C 34868 +#define OP_GE 32821 +#define OP_GE_C 34869 +#define OP_LE 32822 +#define OP_LE_C 34870 +#define OP_IS 32823 +#define OP_QN 32824 +#define OP_QC 32825 +#define OP_QCZ 32826 +#define OP_QM 32827 +#define OP_QS 32828 +#define OP_QO 32829 +#define OP_QOZ 32830 +#define OP_QA 32831 +#define OP_CLASS 32832 +#define OP_CLASS_C 34880 +#define OP_TEMPERATURE 32833 +#define OP_TEMPERATURE_C 34881 +#define OP_TEMPERATURE_E 36929 +#define OP_TEMPERATURE_EC 38977 +#define OP_TEMPERATURE_EC16 38978 +#define OP_TEMPERATURE_E16 36930 +#define OP_SHAPE 32835 +#define OP_SHAPE_C 34883 +#define OP_SHAPE_E 36931 +#define OP_SHAPE_EC 38979 +#define OP_XLOC 32836 +#define OP_XLOC_C 34884 +#define OP_YLOC 32837 +#define OP_YLOC_C 34885 +#define OP_DIR 32838 +#define OP_DIR_C 34886 +#define OP_DIR_E 36934 +#define OP_DIR_EC 38982 +#define OP_IMAGE 32839 +#define OP_IMAGE_C 34887 +#define OP_IMAGE_E 36935 +#define OP_IMAGE_EC 38983 +#define OP_INERTIA 32840 +#define OP_INERTIA_C 34888 +#define OP_INERTIA_E 36936 +#define OP_INERTIA_EC 38984 +#define OP_INERTIA_EC16 38985 +#define OP_INERTIA_E16 36937 +#define OP_DISTANCE 32842 +#define OP_DISTANCE_C 34890 +#define OP_DISTANCE_E 36938 +#define OP_DISTANCE_EC 38986 +#define OP_DISTANCE_EC16 38987 +#define OP_DISTANCE_E16 36939 +#define OP_DENSITY 32844 +#define OP_DENSITY_C 34892 +#define OP_DENSITY_E 36940 +#define OP_DENSITY_EC 38988 +#define OP_DENSITY_EC16 38989 +#define OP_DENSITY_E16 36941 +#define OP_VOLUME 32846 +#define OP_VOLUME_C 34894 +#define OP_VOLUME_E 36942 +#define OP_VOLUME_EC 38990 +#define OP_VOLUME_EC16 38991 +#define OP_VOLUME_E16 36943 +#define OP_WEIGHT 32848 +#define OP_WEIGHT_C 34896 +#define OP_WEIGHT_E 36944 +#define OP_WEIGHT_EC 38992 +#define OP_WEIGHT_EC16 38993 +#define OP_WEIGHT_E16 36945 +#define OP_HEIGHT 32850 +#define OP_HEIGHT_C 34898 +#define OP_HEIGHT_E 36946 +#define OP_HEIGHT_EC 38994 +#define OP_HEIGHT_EC16 38995 +#define OP_HEIGHT_E16 36947 +#define OP_CLIMB 32852 +#define OP_CLIMB_C 34900 +#define OP_CLIMB_E 36948 +#define OP_CLIMB_EC 38996 +#define OP_CLIMB_EC16 38997 +#define OP_CLIMB_E16 36949 +#define OP_STRENGTH 32854 +#define OP_STRENGTH_C 34902 +#define OP_STRENGTH_E 36950 +#define OP_STRENGTH_EC 38998 +#define OP_STRENGTH_EC16 38999 +#define OP_STRENGTH_E16 36951 +#define OP_HARD 32856 +#define OP_HARD_C 34904 +#define OP_HARD_E 36952 +#define OP_HARD_EC 39000 +#define OP_SHARP 32857 +#define OP_SHARP_C 34905 +#define OP_SHARP_E 36953 +#define OP_SHARP_EC 39001 +#define OP_SHAPEDIR 32858 +#define OP_SHAPEDIR_C 34906 +#define OP_SHAPEDIR_E 36954 +#define OP_SHAPEDIR_EC 39002 +#define OP_SHOVABLE 32859 +#define OP_SHOVABLE_C 34907 +#define OP_SHOVABLE_E 36955 +#define OP_SHOVABLE_EC 39003 +#define OP_MISC1 32860 +#define OP_MISC1_C 34908 +#define OP_MISC1_E 36956 +#define OP_MISC1_EC 39004 +#define OP_MISC1_EC16 39005 +#define OP_MISC1_E16 36957 +#define OP_MISC2 32862 +#define OP_MISC2_C 34910 +#define OP_MISC2_E 36958 +#define OP_MISC2_EC 39006 +#define OP_MISC2_EC16 39007 +#define OP_MISC2_E16 36959 +#define OP_MISC3 32864 +#define OP_MISC3_C 34912 +#define OP_MISC3_E 36960 +#define OP_MISC3_EC 39008 +#define OP_MISC3_EC16 39009 +#define OP_MISC3_E16 36961 +#define OP_MISC4 32866 +#define OP_MISC4_C 34914 +#define OP_MISC4_E 36962 +#define OP_MISC4_EC 39010 +#define OP_MISC4_EC16 39011 +#define OP_MISC4_E16 36963 +#define OP_MISC5 32868 +#define OP_MISC5_C 34916 +#define OP_MISC5_E 36964 +#define OP_MISC5_EC 39012 +#define OP_MISC5_EC16 39013 +#define OP_MISC5_E16 36965 +#define OP_MISC6 32870 +#define OP_MISC6_C 34918 +#define OP_MISC6_E 36966 +#define OP_MISC6_EC 39014 +#define OP_MISC6_EC16 39015 +#define OP_MISC6_E16 36967 +#define OP_MISC7 32872 +#define OP_MISC7_C 34920 +#define OP_MISC7_E 36968 +#define OP_MISC7_EC 39016 +#define OP_MISC7_EC16 39017 +#define OP_MISC7_E16 36969 +#define OP_ARRIVED 32874 +#define OP_ARRIVED_C 34922 +#define OP_ARRIVED_E 36970 +#define OP_ARRIVED_EC 39018 +#define OP_DEPARTED 32875 +#define OP_DEPARTED_C 34923 +#define OP_DEPARTED_E 36971 +#define OP_DEPARTED_EC 39019 +#define OP_ARRIVALS 32876 +#define OP_ARRIVALS_C 34924 +#define OP_ARRIVALS_E 36972 +#define OP_ARRIVALS_EC 39020 +#define OP_DEPARTURES 32877 +#define OP_DEPARTURES_C 34925 +#define OP_DEPARTURES_E 36973 +#define OP_DEPARTURES_EC 39021 +#define OP_BUSY 32878 +#define OP_BUSY_C 34926 +#define OP_BUSY_E 36974 +#define OP_BUSY_EC 39022 +#define OP_INVISIBLE 32879 +#define OP_INVISIBLE_C 34927 +#define OP_INVISIBLE_E 36975 +#define OP_INVISIBLE_EC 39023 +#define OP_KEYCLEARED 32880 +#define OP_KEYCLEARED_C 34928 +#define OP_KEYCLEARED_E 36976 +#define OP_KEYCLEARED_EC 39024 +#define OP_USERSIGNAL 32881 +#define OP_USERSIGNAL_C 34929 +#define OP_USERSIGNAL_E 36977 +#define OP_USERSIGNAL_EC 39025 +#define OP_USERSTATE 32882 +#define OP_USERSTATE_C 34930 +#define OP_USERSTATE_E 36978 +#define OP_USERSTATE_EC 39026 +#define OP_VISUALONLY 32883 +#define OP_VISUALONLY_C 34931 +#define OP_VISUALONLY_E 36979 +#define OP_VISUALONLY_EC 39027 +#define OP_STEALTHY 32884 +#define OP_STEALTHY_C 34932 +#define OP_STEALTHY_E 36980 +#define OP_STEALTHY_EC 39028 +#define OP_MOVED 32885 +#define OP_MOVED_C 34933 +#define OP_MOVED_E 36981 +#define OP_MOVED_EC 39029 +#define OP_MOVING 32886 +#define OP_MOVING_C 34934 +#define OP_MOVING_E 36982 +#define OP_MOVING_EC 39030 +#define OP_DONE 32887 +#define OP_DONE_C 34935 +#define OP_DONE_E 36983 +#define OP_DONE_EC 39031 +#define OP_DESTROYED 32888 +#define OP_DESTROYED_C 34936 +#define OP_PLAYER 32889 +#define OP_PLAYER_C 34937 +#define OP_COMPATIBLE 32890 +#define OP_COMPATIBLE_C 34938 +#define OP_COLLISIONLAYERS 32891 +#define OP_COLLISIONLAYERS_C 34939 +#define OP_SELF 32892 +#define OP_MSG 32893 +#define OP_FROM 32894 +#define OP_ARG1 32895 +#define OP_ARG1_E 36991 +#define OP_ARG2 32896 +#define OP_ARG2_E 36992 +#define OP_ARG3 32897 +#define OP_ARG3_E 36993 +#define OP_MOVENUMBER 32898 +#define OP_MOVENUMBER_E 36994 +#define OP_LEVEL 32899 +#define OP_KEY 32900 +#define OP_FINISHED 32901 +#define OP_FINISHED_E 36997 +#define OP_BACKGROUND 32902 +#define OP_CODEPAGE 32903 +#define OP_ORDER 32904 +#define OP_CONTROL 32905 +#define OP_LEVELTABLE 32906 +#define OP_INPUT 32907 +#define OP_QUIZ 32908 +#define OP_INPLACE 32909 +#define OP_DEFAULTIMAGE 32910 +#define OP_HELP 32911 +#define OP_EDITORHELP 32912 +#define OP_OTHERS 32913 +#define OP_SUBS 32914 +#define OP_ANIMATE 32915 +#define OP_ANIMATE_E 37011 +#define OP_ANIMATEDEAD 32916 +#define OP_ANIMATEDEAD_E 37012 +#define OP_ASSASSINATE 32917 +#define OP_ASSASSINATE_C 34965 +#define OP_BROADCAST 32918 +#define OP_BROADCAST_D 41110 +#define OP_BROADCASTAND 32919 +#define OP_BROADCASTANDEX 32920 +#define OP_BROADCASTCLASS 32921 +#define OP_BROADCASTEX 32922 +#define OP_BROADCASTEX_D 41114 +#define OP_BROADCASTLIST 32923 +#define OP_BROADCASTLISTEX 32924 +#define OP_BROADCASTSUM 32925 +#define OP_BROADCASTSUMEX 32926 +#define OP_CHAIN 32927 +#define OP_CHEBYSHEV 32928 +#define OP_CHEBYSHEV_C 34976 +#define OP_COLOC 32929 +#define OP_COLOC_C 34977 +#define OP_CREATE 32930 +#define OP_CREATE_D 41122 +#define OP_DATA 32931 +#define OP_DELINVENTORY 32932 +#define OP_DELTA 32933 +#define OP_DESTROY 32934 +#define OP_DESTROY_C 34982 +#define OP_DESTROY_D 41126 +#define OP_DESTROY_CD 43174 +#define OP_FLUSHCLASS 32935 +#define OP_FLUSHOBJ 32936 +#define OP_FLUSHOBJ_C 34984 +#define OP_GETINVENTORY 32937 +#define OP_HEIGHTAT 32938 +#define OP_HITME 32939 +#define OP_IGNOREKEY 32940 +#define OP_INTMOVE 32941 +#define OP_INTMOVE_C 34989 +#define OP_INTMOVE_D 41133 +#define OP_INTMOVE_CD 43181 +#define OP_JUMPTO 32942 +#define OP_JUMPTO_C 34990 +#define OP_JUMPTO_D 41134 +#define OP_JUMPTO_CD 43182 +#define OP_LOC 32943 +#define OP_LOC_C 34991 +#define OP_LOCATEME 32944 +#define OP_LOCATEME_C 34992 +#define OP_LOSELEVEL 32945 +#define OP_MANHATTAN 32946 +#define OP_MANHATTAN_C 34994 +#define OP_MAXINVENTORY 32947 +#define OP_MOVE 32948 +#define OP_MOVE_C 34996 +#define OP_MOVE_D 41140 +#define OP_MOVE_CD 43188 +#define OP_MOVEPLUS 32949 +#define OP_MOVEPLUS_C 34997 +#define OP_MOVEPLUS_D 41141 +#define OP_MOVEPLUS_CD 43189 +#define OP_MOVETO 32950 +#define OP_MOVETO_C 34998 +#define OP_MOVETO_D 41142 +#define OP_MOVETO_CD 43190 +#define OP_PLUSMOVE 32951 +#define OP_PLUSMOVE_C 34999 +#define OP_PLUSMOVE_D 41143 +#define OP_PLUSMOVE_CD 43191 +#define OP_MINUSMOVE 32952 +#define OP_MINUSMOVE_C 35000 +#define OP_MINUSMOVE_D 41144 +#define OP_MINUSMOVE_CD 43192 +#define OP_NEWX 32953 +#define OP_NEWXY 32954 +#define OP_NEWY 32955 +#define OP_OBJABOVE 32956 +#define OP_OBJABOVE_C 35004 +#define OP_OBJBELOW 32957 +#define OP_OBJBELOW_C 35005 +#define OP_OBJBOTTOMAT 32958 +#define OP_OBJCLASSAT 32959 +#define OP_OBJDIR 32960 +#define OP_OBJDIR_C 35008 +#define OP_OBJLAYERAT 32961 +#define OP_OBJMOVINGTO 32962 +#define OP_OBJTOPAT 32963 +#define OP_POPUP 32964 +#define OP_POPUPARGS 32965 +#define OP_REL 32966 +#define OP_REL_C 35014 +#define OP_SEEK 32967 +#define OP_SEEK_C 35015 +#define OP_SEND 32968 +#define OP_SEND_C 35016 +#define OP_SEND_D 41160 +#define OP_SEND_CD 43208 +#define OP_SENDEX 32969 +#define OP_SENDEX_C 35017 +#define OP_SENDEX_D 41161 +#define OP_SENDEX_CD 43209 +#define OP_SETINVENTORY 32970 +#define OP_SOUND 32971 +#define OP_SWEEP 32972 +#define OP_SWEEPEX 32973 +#define OP_SYNCHRONIZE 32974 +#define OP_TARGET 32975 +#define OP_TARGET_C 35023 +#define OP_TRACE 32976 +#define OP_TRIGGER 32977 +#define OP_TRIGGERAT 32978 +#define OP_VOLUMEAT 32979 +#define OP_WINLEVEL 32980 +#define OP_XDIR 32981 +#define OP_XDIR_C 35029 +#define OP_XYDIR 32982 +#define OP_YDIR 32983 +#define OP_YDIR_C 35031 +#define OP_MARK 32984 +#define OP_TMARK 32985 +#define OP_IN 32986 +#define OP_NIN 32987 +#define OP_MBEGIN 32988 +#define OP_FLIP 32989 +#define OP_COUNT 32990 +#define OP_CLEAR 32991 +#define OP_UNIQ 32992 +#define OP_ARRAY 32993 +#define OP_GETARRAY 32994 +#define OP_INITARRAY 32995 +#define OP_SETARRAY 32996 +#define OP_ARRAYCELL 32997 +#define OP_ARRAYSLICE 32998 +#define OP_COPYARRAY 32999 +#define OP_DOTPRODUCT 33000 +#define OP_PATTERN 33001 +#define OP_PATTERN_C 35049 +#define OP_PATTERN_E 37097 +#define OP_PATTERN_EC 39145 +#define OP_PATTERNS 33002 +#define OP_PATTERNS_C 35050 +#define OP_PATTERNS_E 37098 +#define OP_PATTERNS_EC 39146 +#define OP_ROOK 33003 +#define OP_BISHOP 33004 +#define OP_QUEEN 33005 +#define OP_CUT 33006 +#define OP_BIZARRO 33007 +#define OP_BIZARRO_C 35055 +#define OP_BIZARRO_E 37103 +#define OP_BIZARRO_EC 39151 +#define OP_BIZARROSWAP 33008 +#define OP_BIZARROSWAP_D 41200 +#define OP_SWAPWORLD 33009 +#define OP_ABSTRACT 33010 +#define OP_SUPER 33011 +#define OP_SUPER_C 35059 +#define OP_FUNCTION 33012 +#define OP_LOCAL 33013 +#define OP_LABEL 33014 +#define OP_STRING 33015 +#define OP_INT16 33016 +#define OP_INT32 33017 +#define OP_DISPATCH 33018 +#define OP_USERFLAG 33019 #ifdef HEROMESH_CLASS static const Op_Names op_names[]={ -{"*",8486940}, -{"+",8421402}, -{"+Move",10584244}, -{"-",8421403}, -{"-Move",10584245}, +{"*",8486943}, +{"+",8421405}, +{"+Move",10584247}, +{"-",8421406}, +{"-Move",10584248}, {"-rot",8421382}, {".",10518528}, -{"/",8486941}, +{"/",8486944}, {"ANHH",8389394}, {"ARRIVED",8389124}, -{"Abstract",8683759}, -{"Animate",8552592}, -{"AnimateDead",8552593}, -{"Arg1",8552572}, -{"Arg2",8552573}, -{"Arg3",8552574}, -{"Array",8683742}, -{"ArrayCell",8421602}, -{"ArraySlice",8421603}, -{"Arrivals",8618089}, -{"Arrived",8618087}, -{"Assassinate",8487058}, +{"Abstract",8683762}, +{"Animate",8552595}, +{"AnimateDead",8552596}, +{"Arg1",8552575}, +{"Arg2",8552576}, +{"Arg3",8552577}, +{"Array",8683745}, +{"ArrayCell",8421605}, +{"ArraySlice",8421606}, +{"Arrivals",8618092}, +{"Arrived",8618090}, +{"Assassinate",8487061}, {"B",9437196}, {"BANG",8389380}, {"BEDOINGNG",8389406}, {"BEEDEEP",8389404}, {"BEGIN_TURN",8389123}, @@ -499,236 +503,236 @@ {"BOUNCE",8389415}, {"BRRREEET",8389396}, {"BRRRT",8389395}, {"BUZZER",8389420}, {"BWEEP",8389397}, -{"Background",8683651}, -{"Bishop",8683753}, -{"Bizarro",8618220}, -{"BizarroSwap",10518765}, -{"Broadcast",10518675}, -{"BroadcastAnd",8421524}, -{"BroadcastAndEx",8421525}, -{"BroadcastEx",10518679}, -{"BroadcastList",8421528}, -{"BroadcastListEx",8421529}, -{"BroadcastSum",8421530}, -{"BroadcastSumEx",8421531}, -{"Busy",8618091}, +{"Background",8683654}, +{"Bishop",8683756}, +{"Bizarro",8618223}, +{"BizarroSwap",10518768}, +{"Broadcast",10518678}, +{"BroadcastAnd",8421527}, +{"BroadcastAndEx",8421528}, +{"BroadcastEx",10518682}, +{"BroadcastList",8421531}, +{"BroadcastListEx",8421532}, +{"BroadcastSum",8421533}, +{"BroadcastSumEx",8421534}, +{"Busy",8618094}, {"CHEEP",8389393}, {"CHYEW",8389392}, {"CLICK",8389388}, {"COLLIDE",8389142}, {"COLLIDEBY",8389141}, {"COLLIDING",8389143}, {"CONFLICT",8389140}, {"CREATE",8389121}, {"CREATED",8389137}, -{"Chebyshev",8487069}, -{"Class",8486973}, -{"Climb",9142353}, -{"CodePage",8683652}, -{"CollisionLayers",8487032}, -{"Coloc",8487070}, -{"Compatible",8487031}, -{"Control",8421510}, -{"CopyArray",8421604}, -{"Create",10518687}, +{"Chebyshev",8487072}, +{"Class",8486976}, +{"Climb",9142356}, +{"CodePage",8683655}, +{"CollisionLayers",8487035}, +{"Coloc",8487073}, +{"Compatible",8487034}, +{"Control",8421513}, +{"CopyArray",8421607}, +{"Create",10518690}, {"DEEP_POP",8389417}, {"DEPARTED",8389125}, {"DESTROY",8389122}, {"DESTROYED",8389136}, {"DINK",8389390}, {"DOOR",8389378}, {"DRLRLRINK",8389398}, {"DYUPE",8389413}, -{"Data",8421536}, -{"DefaultImage",8683659}, -{"DelInventory",8421537}, -{"Delta",8421538}, -{"Density",9142345}, -{"Departed",8618088}, -{"Departures",8618090}, -{"Destroy",10584227}, -{"Destroyed",8487029}, -{"Dir",8618051}, -{"Distance",9142343}, -{"Done",8618100}, -{"DotProduct",8421605}, +{"Data",8421539}, +{"DefaultImage",8683662}, +{"DelInventory",8421540}, +{"Delta",8421541}, +{"Density",9142348}, +{"Departed",8618091}, +{"Departures",8618093}, +{"Destroy",10584230}, +{"Destroyed",8487032}, +{"Dir",8618054}, +{"Distance",9142346}, +{"Done",8618103}, +{"DotProduct",8421608}, {"E",9437184}, {"END_TURN",8389139}, -{"EditorHelp",8683661}, +{"EditorHelp",8683664}, {"F",9437192}, {"FAROUT",8389421}, {"FFFFTT",8389399}, {"FLOATED",8389132}, {"FROG",8389383}, -{"Finished",8552578}, -{"FlushClass",8421540}, -{"FlushObj",8487077}, -{"From",8421499}, +{"Finished",8552581}, +{"FlushClass",8421543}, +{"FlushObj",8487080}, +{"From",8421502}, {"GLASS",8389379}, {"GLISSANT",8389419}, -{"GetArray",8421599}, -{"GetInventory",8421542}, +{"GetArray",8421602}, +{"GetInventory",8421545}, {"HAWK",8389425}, {"HEARTBEAT",8389407}, {"HIT",8389134}, {"HITBY",8389135}, -{"Hard",8618069}, -{"Height",9142351}, -{"HeightAt",8421543}, -{"Help",8683660}, -{"HitMe",8421544}, +{"Hard",8618072}, +{"Height",9142354}, +{"HeightAt",8421546}, +{"Help",8683663}, +{"HitMe",8421547}, {"INIT",8389120}, -{"IgnoreKey",8421545}, -{"Image",8618052}, -{"InPlace",8683658}, -{"Inertia",9142341}, -{"InitArray",8421600}, -{"Input",8683656}, -{"IntMove",10584234}, -{"Invisible",8618092}, +{"IgnoreKey",8421548}, +{"Image",8618055}, +{"InPlace",8683661}, +{"Inertia",9142344}, +{"InitArray",8421603}, +{"Input",8683659}, +{"IntMove",10584237}, +{"Invisible",8618095}, {"JAYAYAYNG",8389416}, {"JUMPED",8389128}, -{"JumpTo",10584235}, +{"JumpTo",10584238}, {"KEWEL",8389422}, {"KEY",8389129}, {"KLECK",8389387}, {"KLINKK",8389385}, -{"Key",8421505}, -{"KeyCleared",8618093}, +{"Key",8421508}, +{"KeyCleared",8618096}, {"L",9437194}, {"LASTIMAGE",8389126}, {"LB",9437195}, {"LF",9437193}, {"LOCK",8389408}, {"LOOP",8388610}, -{"Level",8421504}, -{"LevelTable",8683655}, -{"Loc",8487084}, -{"LocateMe",8487085}, -{"LoseLevel",8421550}, +{"Level",8421507}, +{"LevelTable",8683658}, +{"Loc",8487087}, +{"LocateMe",8487088}, +{"LoseLevel",8421553}, {"MOVED",8389127}, {"MOVING",8389130}, -{"Manhattan",8487087}, -{"MaxInventory",8421552}, -{"Misc1",9142361}, -{"Misc2",9142363}, -{"Misc3",9142365}, -{"Misc4",9142367}, -{"Misc5",9142369}, -{"Misc6",9142371}, -{"Misc7",9142373}, -{"Move",10584241}, -{"Move+",10584242}, -{"MoveNumber",8552575}, -{"MoveTo",10584243}, -{"Moved",8618098}, -{"Moving",8618099}, -{"Msg",8421498}, +{"Manhattan",8487090}, +{"MaxInventory",8421555}, +{"Misc1",9142364}, +{"Misc2",9142366}, +{"Misc3",9142368}, +{"Misc4",9142370}, +{"Misc5",9142372}, +{"Misc6",9142374}, +{"Misc7",9142376}, +{"Move",10584244}, +{"Move+",10584245}, +{"MoveNumber",8552578}, +{"MoveTo",10584246}, +{"Moved",8618101}, +{"Moving",8618102}, +{"Msg",8421501}, {"N",9437186}, {"NE",9437185}, {"NW",9437187}, -{"NewX",8421558}, -{"NewXY",8421559}, -{"NewY",8421560}, +{"NewX",8421561}, +{"NewXY",8421562}, +{"NewY",8421563}, {"OLDPHONE",8389402}, {"ONCE",8388609}, {"OSC",8388616}, {"OSCLOOP",8388618}, -{"ObjAbove",8487097}, -{"ObjBelow",8487098}, -{"ObjBottomAt",8421563}, -{"ObjClassAt",8421564}, -{"ObjDir",8487101}, -{"ObjLayerAt",8421566}, -{"ObjMovingTo",8421567}, -{"ObjTopAt",8421568}, -{"Order",8683653}, -{"Others",8683662}, -{"P",8880358}, -{"P*",8880359}, +{"ObjAbove",8487100}, +{"ObjBelow",8487101}, +{"ObjBottomAt",8421566}, +{"ObjClassAt",8421567}, +{"ObjDir",8487104}, +{"ObjLayerAt",8421569}, +{"ObjMovingTo",8421570}, +{"ObjTopAt",8421571}, +{"Order",8683656}, +{"Others",8683665}, +{"P",8880361}, +{"P*",8880362}, {"PLAYERMOVING",8389133}, {"POSTINIT",8389138}, {"POUR",8389377}, {"POWER",8389386}, -{"Player",8487030}, -{"PopUp",8421569}, -{"Queen",8683754}, -{"Quiz",8683657}, +{"Player",8487033}, +{"PopUp",8421572}, +{"Queen",8683757}, +{"Quiz",8683660}, {"R",9437198}, {"RATCHET1",8389418}, {"RATCHET2",8389412}, {"RATTLE",8389403}, {"RB",9437197}, {"RF",9437199}, -{"Rel",8487107}, -{"Rook",8683752}, +{"Rel",8487110}, +{"Rook",8683755}, {"S",9437190}, {"SE",9437191}, {"SMALL_POP",8389389}, {"SPLASH",8389376}, {"STEAM",8389424}, {"STOP",8388608}, -{"SUBS",8683663}, +{"SUBS",8683666}, {"SUNK",8389131}, {"SW",9437189}, -{"Seek",8487108}, -{"Self",8421497}, -{"Send",10584261}, -{"SendEx",10584262}, -{"SetArray",8421601}, -{"SetInventory",8421575}, -{"Shape",8618048}, -{"ShapeDir",8618071}, -{"Sharp",8618070}, -{"Shovable",8618072}, -{"Sound",8421576}, -{"Stealthy",8618097}, -{"Strength",9142355}, -{"Super",8487152}, -{"SwapWorld",8421614}, -{"Sweep",8421577}, -{"SweepEx",8421578}, -{"Synchronize",8421579}, +{"Seek",8487111}, +{"Self",8421500}, +{"Send",10584264}, +{"SendEx",10584265}, +{"SetArray",8421604}, +{"SetInventory",8421578}, +{"Shape",8618051}, +{"ShapeDir",8618074}, +{"Sharp",8618073}, +{"Shovable",8618075}, +{"Sound",8421579}, +{"Stealthy",8618100}, +{"Strength",9142358}, +{"Super",8487155}, +{"SwapWorld",8421617}, +{"Sweep",8421580}, +{"SweepEx",8421581}, +{"Synchronize",8421582}, {"TAHTASHH",8389409}, {"THMP_thmp",8389405}, {"THWIT",8389384}, {"TICK",8389391}, -{"Target",8487116}, -{"Temperature",9142334}, -{"Trace",8421581}, -{"Trigger",8421582}, -{"TriggerAt",8421583}, +{"Target",8487119}, +{"Temperature",9142337}, +{"Trace",8421584}, +{"Trigger",8421585}, +{"TriggerAt",8421586}, {"UH_OH",8389382}, {"UNCORK",8389414}, {"UNHH",8389381}, -{"UserSignal",8618094}, -{"UserState",8618095}, +{"UserSignal",8618097}, +{"UserState",8618098}, {"VACUUM",8389411}, -{"VisualOnly",8618096}, -{"Volume",9142347}, -{"VolumeAt",8421584}, +{"VisualOnly",8618099}, +{"Volume",9142350}, +{"VolumeAt",8421587}, {"W",9437188}, {"WAHOO",8389400}, {"WHACK",8389423}, -{"Weight",9142349}, -{"WinLevel",8421585}, -{"XDir",8487122}, -{"XYDir",8421587}, -{"Xloc",8486977}, -{"YDir",8487124}, +{"Weight",9142352}, +{"WinLevel",8421588}, +{"XDir",8487125}, +{"XYDir",8421590}, +{"Xloc",8486980}, +{"YDir",8487127}, {"YEEHAW",8389401}, -{"Yloc",8486978}, -{"_",8421589}, -{"a?",8421436}, +{"Yloc",8486981}, +{"_",8421592}, +{"a?",8421439}, {"again",8683533}, {"and",8683544}, -{"band",8421412}, +{"band",8421415}, {"begin",8683532}, -{"bit",8683560}, +{"bit",8683563}, {"bit0",8388609}, {"bit1",8388610}, {"bit10",8423402}, {"bit11",8423403}, {"bit12",8423404}, @@ -757,65 +761,68 @@ {"bit5",8388640}, {"bit6",8388672}, {"bit7",8388736}, {"bit8",8423400}, {"bit9",8423401}, -{"bnot",8421415}, -{"bor",8421413}, -{"bxor",8421414}, -{"c?",8421430}, +{"bnot",8421418}, +{"bor",8421416}, +{"bxor",8421417}, +{"c?",8421433}, {"case",8683542}, -{"chain",8421532}, -{"clear",8421596}, -{"count",8421595}, -{"cut",8683755}, -{"cz?",8421431}, +{"chain",8421535}, +{"clear",8421599}, +{"count",8421598}, +{"cut",8683758}, +{"cz?",8421434}, {"dup",8421377}, {"else",8683530}, -{"eq",8421421}, -{"eq2",8421422}, -{"flip",8421594}, +{"eq",8421424}, +{"eq2",8421425}, +{"exec",8486940}, +{"flip",8421597}, {"for",8683537}, {"fork",8683545}, -{"ge",8486962}, -{"gt",8486960}, +{"ge",8486965}, +{"gt",8486963}, {"if",8683529}, -{"in",8421591}, -{"is",8421428}, -{"land",8421417}, -{"le",8486963}, -{"lnot",8421420}, -{"lor",8421418}, -{"lsh",8421410}, -{"lt",8486961}, -{"lxor",8421419}, -{"m?",8421432}, -{"max",8486945}, -{"mbegin",8683737}, -{"min",8486944}, -{"mod",8486942}, -{"n?",8421429}, -{"ne",8421423}, -{"neg",8421407}, +{"in",8421594}, +{"is",8421431}, +{"land",8421420}, +{"le",8486966}, +{"link",8683547}, +{"lnot",8421423}, +{"lor",8421421}, +{"lsh",8421413}, +{"lt",8486964}, +{"lxor",8421422}, +{"m?",8421435}, +{"max",8486948}, +{"mbegin",8683740}, +{"min",8486947}, +{"mod",8486945}, +{"n?",8421432}, +{"ne",8421426}, +{"neg",8421410}, {"next",8683538}, -{"nin",8421592}, +{"nin",8421595}, {"nip",8421379}, -{"o?",8421434}, +{"o?",8421437}, {"or",8683543}, {"over",8421384}, -{"oz?",8421435}, +{"oz?",8421438}, {"pick",8421383}, {"repeat",8683536}, {"ret",8421397}, {"rot",8421381}, -{"rsh",8486947}, -{"s?",8421433}, +{"rsh",8486950}, +{"rtn",8683546}, +{"s?",8421436}, {"swap",8421378}, {"then",8683531}, -{"tmark",8421590}, +{"tmark",8421593}, {"tuck",8421380}, -{"uniq",8421597}, +{"uniq",8421600}, {"until",8683534}, {"while",8683535}, }; -#define N_OP_NAMES 349 +#define N_OP_NAMES 352 #endif Index: internals.doc ================================================================== --- internals.doc +++ internals.doc @@ -33,12 +33,13 @@ * TY_ARRAY: An array reference. The low 16-bits of u are the starting index of the array (pointed by array_data), the next 10-bits and the high 6-bits indicate the size of the array. -* TY_CODE: Currently only used in case blocks; there are no values of this -type in local or global variables. +* TY_CODE: Used in case blocks to denote a branch to another address. Also +used for link values; the high 16-bits are the class number and the low +16-bits are the address within the class codes for that class. * Numbers more than TY_MAXTYPE (15) means it is a generation number of an object, and u is the index number of that object. In the internal code, VOIDLINK means no object; this is represented in a Value structure as t=0 (TY_NUMBER) and u=0. (Generation numbers are internally used so that