Overview
Comment: | Implement ^x and also some , and = variants of a few instructions. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
0d3bc1253d7d1ef02a09732aa8311d22 |
User & Date: | user on 2021-10-28 02:37:01 |
Other Links: | manifest | tags |
Context
2021-10-29
| ||
21:05 | Add CONTRIBUTING file (please tell me if I missed anything) check-in: ac69cddf8d user: user tags: trunk | |
2021-10-28
| ||
02:37 | Implement ^x and also some , and = variants of a few instructions. check-in: 0d3bc1253d user: user tags: trunk | |
2021-10-24
| ||
07:41 | Disallow inserting/deleting moves during the solution replay check-in: 730d600d55 user: user tags: trunk | |
Changes
Modified bindings.doc from [aede3478d9] to [ab94da47f8].
︙ | ︙ | |||
100 101 102 103 104 105 106 107 108 109 110 111 112 113 | '^p' Start or stop slow replay. Any move input also interrupts slow replay. '^s' Toggle solution replay. 'lo' <location> Flash the specified location briefly. 'mi' <command> Import a move list. The argument is a operating system command, that when executed will write the move list to stdout, with one byte per move (the Hero Mesh key codes). | > > > | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | '^p' Start or stop slow replay. Any move input also interrupts slow replay. '^s' Toggle solution replay. '^x' Cancel dead animation. 'lo' <location> Flash the specified location briefly. 'mi' <command> Import a move list. The argument is a operating system command, that when executed will write the move list to stdout, with one byte per move (the Hero Mesh key codes). |
︙ | ︙ |
Modified class.doc from [22956477d6] to [42a517bb3c].
︙ | ︙ | |||
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 | animation, ONCE to play the animation once (and to queue a LASTIMAGE event if the animation isn't changed before that happens; note that the message is sent even before the animation is actually visible), LOOP to play it in a loop, or OSCLOOP for an oscillating loop. The delay between frames is in centiseconds; the start and end are the image numbers in this class, and may be ascending or descending. AnimateDead ( x y class start end delay -- ) Create a dead animation, at the specified coordinates. Give the class to use the pictures of, and the start and end image number, and the delay between frames in centiseconds. This will draw the animation on the screen without being associated with any object; this animation is purely visual and does not affect the game state. The animation will play once and then it will disappear. Arg1 ( -- value ) The first message argument. =Arg1 ( value -- ) Allows setting the first message argument. This will last until the current message returns, and does not affect further messages sent; it allows Arg1 to be used as a mutable local variable. | > > > > > > > > > > > > > > | 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 | animation, ONCE to play the animation once (and to queue a LASTIMAGE event if the animation isn't changed before that happens; note that the message is sent even before the animation is actually visible), LOOP to play it in a loop, or OSCLOOP for an oscillating loop. The delay between frames is in centiseconds; the start and end are the image numbers in this class, and may be ascending or descending. =Animate ( mode start end delay -- ) ** Set animation for this object, in a similar but different way than Animate does. There is no animation limit if this command is used, and this does not set Image. The mode can be: 0=stop, 1=logical once, 2=logical/visual once, 3=visual once, 4=visual looped, 5=visual looped oscillating, 6=visual synchronized (the delay is now the slot number instead), 7=logical once (also set Image). You can add 8 to set the initial visible image to the Image variable instead of the start image, and you can add 16 to start at half phase. AnimateDead ( x y class start end delay -- ) Create a dead animation, at the specified coordinates. Give the class to use the pictures of, and the start and end image number, and the delay between frames in centiseconds. This will draw the animation on the screen without being associated with any object; this animation is purely visual and does not affect the game state. The animation will play once and then it will disappear. =AnimateDead ( delay -- ) Define the delay (in centiseconds) for the most recent dead animation. If there isn't one, then this command does nothing. Arg1 ( -- value ) The first message argument. =Arg1 ( value -- ) Allows setting the first message argument. This will last until the current message returns, and does not affect further messages sent; it allows Arg1 to be used as a mutable local variable. |
︙ | ︙ | |||
1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 | swap ,Yloc" (but more efficient). LocateMe ( -- ) Makes the current object especially visible. This is meant to help the player to notice where the "Hero" object is more easily, but you can use it to make other objects noticeable too if that is appropriate. lor ( in1 in2 -- out ) Logical OR. LoseLevel ( -- ) Ends all execution and results in loss of game. lsh ( in shift -- out ) | > > > | 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 | swap ,Yloc" (but more efficient). LocateMe ( -- ) Makes the current object especially visible. This is meant to help the player to notice where the "Hero" object is more easily, but you can use it to make other objects noticeable too if that is appropriate. ,LocateMe ( obj -- ) Is like LocateMe but for a specified object instead of this one. lor ( in1 in2 -- out ) Logical OR. LoseLevel ( -- ) Ends all execution and results in loss of game. lsh ( in shift -- out ) |
︙ | ︙ | |||
1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 | ,-Move ( obj dir -- bool ) ** As -Move but for a specified object rather than necessarily this one. MoveNumber ( -- number ) The current move number. This is initially zero, and is advanced after each input phase (before the beginning phase). MoveTo ( x y -- bool ) ** Teleports this object to the specified coordinates; the MOVING message (and PLAYERMOVING if applicable) are sent to check if it is allowed. This also updates the Distance variable, and will deal with arrivals and departures, and send FLOATED and SUNK messages as appropriate. ,MoveTo ( obj x y -- bool ) ** | > > > | 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 | ,-Move ( obj dir -- bool ) ** As -Move but for a specified object rather than necessarily this one. MoveNumber ( -- number ) The current move number. This is initially zero, and is advanced after each input phase (before the beginning phase). =MoveNumber ( number -- ) ** Allows changing the MoveNumber value. MoveTo ( x y -- bool ) ** Teleports this object to the specified coordinates; the MOVING message (and PLAYERMOVING if applicable) are sent to check if it is allowed. This also updates the Distance variable, and will deal with arrivals and departures, and send FLOATED and SUNK messages as appropriate. ,MoveTo ( obj x y -- bool ) ** |
︙ | ︙ |
Modified default.heromeshrc from [030154443a] to [9cfd006fc7].
︙ | ︙ | |||
127 128 129 130 131 132 133 134 135 136 137 138 139 140 | ?.gameKey.f7: ^> ?.gameKey.f8: ^s ?.gameKey.shift.f8: select 'ml',solution_move_list(1); ?.gameKey.f9: select 'lo',xy(o.x,o.y) from objects o,classes c on(o.class=c.id) where c.player; ?.gameKey.tab: ^I ?.gameKey.alt.G: ^g ?.gameKey.alt.P: ^p ?.gameKey.alt.leftbracket: select 'rs',-5; ?.gameKey.alt.rightbracket: select 'rs',+5; ?.gameKey.delete: ^- ?.gameKey.insert: ^+ ! Editor key bindings ?.editKey.1: select 'mr',0; | > | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | ?.gameKey.f7: ^> ?.gameKey.f8: ^s ?.gameKey.shift.f8: select 'ml',solution_move_list(1); ?.gameKey.f9: select 'lo',xy(o.x,o.y) from objects o,classes c on(o.class=c.id) where c.player; ?.gameKey.tab: ^I ?.gameKey.alt.G: ^g ?.gameKey.alt.P: ^p ?.gameKey.alt.X: ^x ?.gameKey.alt.leftbracket: select 'rs',-5; ?.gameKey.alt.rightbracket: select 'rs',+5; ?.gameKey.delete: ^- ?.gameKey.insert: ^+ ! Editor key bindings ?.editKey.1: select 'mr',0; |
︙ | ︙ |
Modified exec.c from [c5fcde1ccc] to [3f70f573a7].
︙ | ︙ | |||
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | d=deadanim+ndeadanim++; d->class=o->class; d->x=o->x; d->y=o->y; d->s=o->anim->step[o->anim->vstep]; d->vtime=o->anim->vtime; d->vimage=o->anim->vimage; } static void v_animate_dead(Value x,Value y,Value c,Value s,Value e,Value z) { DeadAnimation*d; if(no_dead_anim || ndeadanim>=0x1000) return; if(x.t || y.t || s.t || e.t || z.t || c.t!=TY_CLASS) return; if(!z.u || (z.u&~255) || x.u<1 || x.u>pfwidth || y.u<1 || y.u>pfheight) return; if(!classes[c.u] || !classes[c.u]->nimages || (classes[c.u]->cflags&(CF_GROUP|CF_NOCLASS2))) return; deadanim=realloc(deadanim,(ndeadanim+1)*sizeof(DeadAnimation)); if(!deadanim) fatal("Allocation failed\n"); d=deadanim+ndeadanim++; d->class=c.u; d->x=x.u; d->y=y.u; d->s.flag=ANI_ONCE; d->s.start=s.u; d->s.end=e.u; d->s.speed=z.u; d->vtime=0; d->vimage=s.u; } void objtrash(Uint32 n) { Object*o=objects[n]; if(!o) return; if(!main_options['e']) { if(n==traced_obj.u && o->generation==traced_obj.t && main_options['t']) { | > > | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | d=deadanim+ndeadanim++; d->class=o->class; d->x=o->x; d->y=o->y; d->s=o->anim->step[o->anim->vstep]; d->vtime=o->anim->vtime; d->vimage=o->anim->vimage; d->delay=0; } static void v_animate_dead(Value x,Value y,Value c,Value s,Value e,Value z) { DeadAnimation*d; if(no_dead_anim || ndeadanim>=0x1000) return; if(x.t || y.t || s.t || e.t || z.t || c.t!=TY_CLASS) return; if(!z.u || (z.u&~255) || x.u<1 || x.u>pfwidth || y.u<1 || y.u>pfheight) return; if(!classes[c.u] || !classes[c.u]->nimages || (classes[c.u]->cflags&(CF_GROUP|CF_NOCLASS2))) return; deadanim=realloc(deadanim,(ndeadanim+1)*sizeof(DeadAnimation)); if(!deadanim) fatal("Allocation failed\n"); d=deadanim+ndeadanim++; d->class=c.u; d->x=x.u; d->y=y.u; d->s.flag=ANI_ONCE; d->s.start=s.u; d->s.end=e.u; d->s.speed=z.u; d->vtime=0; d->vimage=s.u; d->delay=0; } void objtrash(Uint32 n) { Object*o=objects[n]; if(!o) return; if(!main_options['e']) { if(n==traced_obj.u && o->generation==traced_obj.t && main_options['t']) { |
︙ | ︙ | |||
324 325 326 327 328 329 330 331 332 333 334 335 336 337 | } else if(an->lstep==an->vstep) { if(an->status&ANISTAT_LOGICAL) an->status=0; } else if(an->status&ANISTAT_LOGICAL) { an->lstep=(an->lstep?:max_animation)-1; an->status&=~ANISTAT_LOGICAL; } } static void animate_sync(Uint32 n,Uint32 sl,Uint32 a0) { Animation*an=objects[n]->anim; objects[n]->image=a0; sl&=7; if(!an) an=objects[n]->anim=animalloc(); an->status=ANISTAT_VISUAL|ANISTAT_SYNCHRONIZED; | > > > > > > > > > > > > > > > > > > > > > > | 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 | } else if(an->lstep==an->vstep) { if(an->status&ANISTAT_LOGICAL) an->status=0; } else if(an->status&ANISTAT_LOGICAL) { an->lstep=(an->lstep?:max_animation)-1; an->status&=~ANISTAT_LOGICAL; } } static void animate_ext(Uint32 n,Uint32 f,Uint32 a0,Uint32 a1,Uint32 t) { Animation*an=objects[n]->anim; objects[n]->image=a0; if(!an) an=objects[n]->anim=animalloc(); an->lstep=an->vstep=an->count=an->ltime=an->vtime=an->status=0; an->step->start=a0; an->step->end=a1; an->step->speed=t; an->vimage=(f&0x08?objects[n]->image:a0); if(f&0x10) an->ltime=an->vtime=t/2; switch(f&0x07) { case 0: an->status=0; an->step->flag=0; break; case 1: an->status=ANISTAT_LOGICAL; an->step->flag=ANI_ONCE; break; case 2: an->status=ANISTAT_VISUAL|ANISTAT_LOGICAL; an->step->flag=ANI_ONCE; break; case 3: an->status=ANISTAT_VISUAL; an->step->flag=ANI_ONCE; break; case 4: an->status=ANISTAT_VISUAL; an->step->flag=ANI_LOOP; break; case 5: an->status=ANISTAT_VISUAL; an->step->flag=ANI_LOOP|ANI_OSC; break; case 6: an->status=ANISTAT_VISUAL|ANISTAT_SYNCHRONIZED; an->step->flag=ANI_LOOP|ANI_SYNC; an->step->slot=t&7; break; case 7: an->status=ANISTAT_LOGICAL; an->step->flag=ANI_ONCE; objects[n]->image=a0; break; } } static void animate_sync(Uint32 n,Uint32 sl,Uint32 a0) { Animation*an=objects[n]->anim; objects[n]->image=a0; sl&=7; if(!an) an=objects[n]->anim=animalloc(); an->status=ANISTAT_VISUAL|ANISTAT_SYNCHRONIZED; |
︙ | ︙ | |||
2376 2377 2378 2379 2380 2381 2382 | case 0x3000 ... 0x37FF: NoIgnore(); StackReq(1,0); o->uservars[code[ptr-1]&0x7FF]=Pop(); break; case 0x3800 ... 0x38FF: NoIgnore(); StackReq(1,0); globals[code[ptr-1]&0x7FF]=Pop(); break; case 0x4000 ... 0x7FFF: StackReq(0,1); Push(CVALUE(code[ptr-1]-0x4000)); break; case 0x87E8 ... 0x87FF: StackReq(0,1); Push(NVALUE(1UL<<(code[ptr-1]&31))); break; case 0xC000 ... 0xFFFF: StackReq(0,1); Push(MVALUE((code[ptr-1]&0x3FFF)+256)); break; case OP_ADD: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.u+t2.u)); break; case OP_AND: StackReq(1,0); t1=Pop(); if(!v_bool(t1)) { Push(t1); ptr=code[ptr]; } else { ptr++; } break; | | > > | 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 | case 0x3000 ... 0x37FF: NoIgnore(); StackReq(1,0); o->uservars[code[ptr-1]&0x7FF]=Pop(); break; case 0x3800 ... 0x38FF: NoIgnore(); StackReq(1,0); globals[code[ptr-1]&0x7FF]=Pop(); break; case 0x4000 ... 0x7FFF: StackReq(0,1); Push(CVALUE(code[ptr-1]-0x4000)); break; case 0x87E8 ... 0x87FF: StackReq(0,1); Push(NVALUE(1UL<<(code[ptr-1]&31))); break; case 0xC000 ... 0xFFFF: StackReq(0,1); Push(MVALUE((code[ptr-1]&0x3FFF)+256)); break; case OP_ADD: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.u+t2.u)); break; case OP_AND: StackReq(1,0); t1=Pop(); if(!v_bool(t1)) { Push(t1); ptr=code[ptr]; } else { ptr++; } break; case OP_ANIMATE: NoIgnore(); StackReq(4,0); t4=Pop(); Numeric(t4); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); animate(obj,t1.u,t2.u,t3.u,t4.u); break; case OP_ANIMATE_E: NoIgnore(); StackReq(4,0); t4=Pop(); Numeric(t4); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); animate_ext(obj,t1.u,t2.u,t3.u,t4.u); break; case OP_ANIMATEDEAD: StackReq(6,0); t6=Pop(); t5=Pop(); t4=Pop(); t3=Pop(); t2=Pop(); t1=Pop(); v_animate_dead(t1,t2,t3,t4,t5,t6); break; case OP_ANIMATEDEAD_E: StackReq(1,0); t1=Pop(); if(ndeadanim && !t1.t) deadanim[ndeadanim-1].delay=t1.u; break; case OP_ARG1: StackReq(0,1); Push(msgvars.arg1); break; case OP_ARG1_E: StackReq(1,0); msgvars.arg1=Pop(); break; case OP_ARG2: StackReq(0,1); Push(msgvars.arg2); break; case OP_ARG2_E: StackReq(1,0); msgvars.arg2=Pop(); break; case OP_ARG3: StackReq(0,1); Push(msgvars.arg3); break; case OP_ARG3_E: StackReq(1,0); msgvars.arg3=Pop(); break; case OP_ARRAYCELL: StackReq(3,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); t1=Pop(); Push(v_array_cell(t1,t2.u,t3.u)); break; |
︙ | ︙ | |||
2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 | 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_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_LOR: StackReq(2,1); t1=Pop(); t2=Pop(); if(v_bool(t1) || v_bool(t2)) Push(NVALUE(1)); else Push(NVALUE(0)); break; case OP_LOSELEVEL: gameover=-1; Throw(0); break; case OP_LSH: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t2.u&~31?0:t1.u<<t2.u)); break; case OP_LT: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_unsigned_greater(t2,t1)?1:0)); break; case OP_LT_C: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_signed_greater(t2,t1)?1:0)); break; case OP_LXOR: StackReq(2,1); t1=Pop(); t2=Pop(); if(v_bool(t1)?!v_bool(t2):v_bool(t2)) Push(NVALUE(1)); else Push(NVALUE(0)); break; case OP_MANHATTAN: StackReq(1,1); t1=Pop(); i=manhattan(obj,v_object(t1)); Push(NVALUE(i)); break; | > | 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 | 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_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; case OP_LOR: StackReq(2,1); t1=Pop(); t2=Pop(); if(v_bool(t1) || v_bool(t2)) Push(NVALUE(1)); else Push(NVALUE(0)); break; case OP_LOSELEVEL: gameover=-1; Throw(0); break; case OP_LSH: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t2.u&~31?0:t1.u<<t2.u)); break; case OP_LT: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_unsigned_greater(t2,t1)?1:0)); break; case OP_LT_C: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_signed_greater(t2,t1)?1:0)); break; case OP_LXOR: StackReq(2,1); t1=Pop(); t2=Pop(); if(v_bool(t1)?!v_bool(t2):v_bool(t2)) Push(NVALUE(1)); else Push(NVALUE(0)); break; case OP_MANHATTAN: StackReq(1,1); t1=Pop(); i=manhattan(obj,v_object(t1)); Push(NVALUE(i)); break; |
︙ | ︙ | |||
2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 | case OP_MOVE_D: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->inertia=o->strength; move_dir(obj,obj,t1.u); break; case OP_MOVE_CD: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) { objects[i]->inertia=o->strength; move_dir(obj,i,t1.u); } break; case OP_MOVED: StackReq(0,1); if(o->oflags&OF_MOVED) Push(NVALUE(1)); else Push(NVALUE(0)); break; case OP_MOVED_C: StackReq(1,1); GetFlagOf(OF_MOVED); break; case OP_MOVED_E: NoIgnore(); StackReq(1,0); if(v_bool(Pop())) o->oflags|=OF_MOVED; else o->oflags&=~OF_MOVED; break; case OP_MOVED_EC: NoIgnore(); StackReq(2,0); SetFlagOf(OF_MOVED); break; case OP_MOVENUMBER: StackReq(0,1); Push(NVALUE(move_number)); break; case OP_MOVEPLUS: NoIgnore(); StackReq(1,1); t1=Pop(); Numeric(t1); o->inertia+=o->strength; Push(NVALUE(move_dir(obj,obj,t1.u))); break; case OP_MOVEPLUS_C: NoIgnore(); StackReq(2,1); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i==VOIDLINK) Push(NVALUE(0)); else {objects[i]->inertia+=o->strength;Push(NVALUE(move_dir(obj,i,t1.u)));} break; case OP_MOVEPLUS_D: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->inertia+=o->strength; move_dir(obj,obj,t1.u); break; case OP_MOVEPLUS_CD: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) { objects[i]->inertia+=o->strength; move_dir(obj,i,t1.u); } break; case OP_MOVETO: NoIgnore(); StackReq(2,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); Push(NVALUE(move_to(obj,obj,t2.u,t3.u))); break; case OP_MOVETO_C: NoIgnore(); StackReq(3,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); i=v_object(Pop()); Push(NVALUE(move_to(obj,i,t2.u,t3.u))); break; case OP_MOVETO_D: NoIgnore(); StackReq(2,0); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); move_to(obj,obj,t2.u,t3.u); break; | > | 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 | case OP_MOVE_D: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->inertia=o->strength; move_dir(obj,obj,t1.u); break; case OP_MOVE_CD: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) { objects[i]->inertia=o->strength; move_dir(obj,i,t1.u); } break; case OP_MOVED: StackReq(0,1); if(o->oflags&OF_MOVED) Push(NVALUE(1)); else Push(NVALUE(0)); break; case OP_MOVED_C: StackReq(1,1); GetFlagOf(OF_MOVED); break; case OP_MOVED_E: NoIgnore(); StackReq(1,0); if(v_bool(Pop())) o->oflags|=OF_MOVED; else o->oflags&=~OF_MOVED; break; case OP_MOVED_EC: NoIgnore(); StackReq(2,0); SetFlagOf(OF_MOVED); break; case OP_MOVENUMBER: StackReq(0,1); Push(NVALUE(move_number)); break; case OP_MOVENUMBER_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); move_number=t1.u; break; case OP_MOVEPLUS: NoIgnore(); StackReq(1,1); t1=Pop(); Numeric(t1); o->inertia+=o->strength; Push(NVALUE(move_dir(obj,obj,t1.u))); break; case OP_MOVEPLUS_C: NoIgnore(); StackReq(2,1); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i==VOIDLINK) Push(NVALUE(0)); else {objects[i]->inertia+=o->strength;Push(NVALUE(move_dir(obj,i,t1.u)));} break; case OP_MOVEPLUS_D: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->inertia+=o->strength; move_dir(obj,obj,t1.u); break; case OP_MOVEPLUS_CD: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) { objects[i]->inertia+=o->strength; move_dir(obj,i,t1.u); } break; case OP_MOVETO: NoIgnore(); StackReq(2,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); Push(NVALUE(move_to(obj,obj,t2.u,t3.u))); break; case OP_MOVETO_C: NoIgnore(); StackReq(3,1); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); i=v_object(Pop()); Push(NVALUE(move_to(obj,i,t2.u,t3.u))); break; case OP_MOVETO_D: NoIgnore(); StackReq(2,0); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); move_to(obj,obj,t2.u,t3.u); break; |
︙ | ︙ |
Modified game.c from [f49e5e6f35] to [17a420d135].
︙ | ︙ | |||
194 195 196 197 198 199 200 201 202 203 204 205 206 207 | n=o->next; } if(ndeadanim) { for(i=0;i<ndeadanim;i++) { d=deadanim+i; draw_cell(d->x,d->y); if(!d->s.flag) continue; if(d->vimage<classes[d->class]->nimages) draw_picture((d->x-1)*picture_size+left_margin,(d->y-1)*picture_size,classes[d->class]->images[d->vimage]&0x7FFF); if(++d->vtime>=d->s.speed) { if(d->vimage==d->s.end) d->s.flag=0; if(d->s.end>=d->s.start) ++d->vimage; else --d->vimage; d->vtime=0; } | > > > > | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | n=o->next; } if(ndeadanim) { for(i=0;i<ndeadanim;i++) { d=deadanim+i; draw_cell(d->x,d->y); if(!d->s.flag) continue; if(d->delay) { --d->delay; continue; } if(d->vimage<classes[d->class]->nimages) draw_picture((d->x-1)*picture_size+left_margin,(d->y-1)*picture_size,classes[d->class]->images[d->vimage]&0x7FFF); if(++d->vtime>=d->s.speed) { if(d->vimage==d->s.end) d->s.flag=0; if(d->s.end>=d->s.start) ++d->vimage; else --d->vimage; d->vtime=0; } |
︙ | ︙ | |||
782 783 784 785 786 787 788 789 790 791 792 793 794 795 | return 0; case '^s': // Toggle solution replay inserting=0; if(replay_count) save_replay(); solution_replay^=1; if(replay_count) replay_count=0,begin_level(level_id); else load_replay(); return 1; case 'go': // Select level begin_level(number); return 1; case 'lo': // Locate me locate_me(number&63?:64,number/64?:64); return prev; case 'mi': // Move list import | > > > | 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 | return 0; case '^s': // Toggle solution replay inserting=0; if(replay_count) save_replay(); solution_replay^=1; if(replay_count) replay_count=0,begin_level(level_id); else load_replay(); return 1; case '^x': // Cancel dead animation ndeadanim=0; return prev; case 'go': // Select level begin_level(number); return 1; case 'lo': // Locate me locate_me(number&63?:64,number/64?:64); return prev; case 'mi': // Move list import |
︙ | ︙ |
Modified heromesh.h from [9e46039699] to [ed576c77f1].
︙ | ︙ | |||
217 218 219 220 221 222 223 | Uint8 speed; // unsynchronized Uint8 slot; // synchronized }; } AnimationStep; typedef struct { Uint8 x,y,vtime,vimage; | | | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | Uint8 speed; // unsynchronized Uint8 slot; // synchronized }; } AnimationStep; typedef struct { Uint8 x,y,vtime,vimage; Uint16 class,delay; AnimationStep s; } DeadAnimation; #define ANISTAT_LOGICAL 0x01 #define ANISTAT_VISUAL 0x02 #define ANISTAT_SYNCHRONIZED 0x80 |
︙ | ︙ |
Modified instruc from [4bab268f41] to [aaa45a4cee].
︙ | ︙ | |||
187 188 189 190 191 192 193 | ,CollisionLayers Self Msg From =Arg1 =Arg2 =Arg3 | | | | | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | ,CollisionLayers Self Msg From =Arg1 =Arg2 =Arg3 =MoveNumber Level Key =Finished ; Class definitions -Background ; used at top level only; not in a class -CodePage ; used at top level only; not in a class -Order ; used at top level only; not in a class -Input -Quiz -InPlace -DefaultImage -Help -EditorHelp -Others -SUBS ; Main operations / miscellaneous =Animate =AnimateDead ,Assassinate ; destroy without sending any messages .Broadcast BroadcastAnd ; Broadcast, but result is AND of return values BroadcastAndEx *BroadcastClass ; for (Broadcast [class]) .BroadcastEx ; broadcast with three arguments BroadcastList ; Broadcast, pushing results to stack |
︙ | ︙ | |||
235 236 237 238 239 240 241 | GetInventory HeightAt HitMe IgnoreKey .,IntMove ; move without initializing Inertia .,JumpTo ,Loc ; same as: Xloc Yloc | | | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | GetInventory HeightAt HitMe IgnoreKey .,IntMove ; move without initializing Inertia .,JumpTo ,Loc ; same as: Xloc Yloc ,LocateMe LoseLevel ,Manhattan MaxInventory ; error if more than that many slots in inventory .,Move .,MovePlus "Move+" ; obj.Inertia+=Strength instead of obj.Inertia=Strength .,MoveTo ; the internal MoveTo() function .,PlusMove "+Move" |
︙ | ︙ |
Modified instruc.h from [bb8a1a3c80] to [fc65209686].
︙ | ︙ | |||
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | #define OP_ARG1 32891 #define OP_ARG1_E 36987 #define OP_ARG2 32892 #define OP_ARG2_E 36988 #define OP_ARG3 32893 #define OP_ARG3_E 36989 #define OP_MOVENUMBER 32894 #define OP_LEVEL 32895 #define OP_KEY 32896 #define OP_FINISHED 32897 #define OP_FINISHED_E 36993 #define OP_BACKGROUND 32898 #define OP_CODEPAGE 32899 #define OP_ORDER 32900 #define OP_INPUT 32901 #define OP_QUIZ 32902 #define OP_INPLACE 32903 #define OP_DEFAULTIMAGE 32904 #define OP_HELP 32905 #define OP_EDITORHELP 32906 #define OP_OTHERS 32907 #define OP_SUBS 32908 #define OP_ANIMATE 32909 #define OP_ANIMATEDEAD 32910 #define OP_ASSASSINATE 32911 #define OP_ASSASSINATE_C 34959 #define OP_BROADCAST 32912 #define OP_BROADCAST_D 41104 #define OP_BROADCASTAND 32913 #define OP_BROADCASTANDEX 32914 #define OP_BROADCASTCLASS 32915 | > > > | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | #define OP_ARG1 32891 #define OP_ARG1_E 36987 #define OP_ARG2 32892 #define OP_ARG2_E 36988 #define OP_ARG3 32893 #define OP_ARG3_E 36989 #define OP_MOVENUMBER 32894 #define OP_MOVENUMBER_E 36990 #define OP_LEVEL 32895 #define OP_KEY 32896 #define OP_FINISHED 32897 #define OP_FINISHED_E 36993 #define OP_BACKGROUND 32898 #define OP_CODEPAGE 32899 #define OP_ORDER 32900 #define OP_INPUT 32901 #define OP_QUIZ 32902 #define OP_INPLACE 32903 #define OP_DEFAULTIMAGE 32904 #define OP_HELP 32905 #define OP_EDITORHELP 32906 #define OP_OTHERS 32907 #define OP_SUBS 32908 #define OP_ANIMATE 32909 #define OP_ANIMATE_E 37005 #define OP_ANIMATEDEAD 32910 #define OP_ANIMATEDEAD_E 37006 #define OP_ASSASSINATE 32911 #define OP_ASSASSINATE_C 34959 #define OP_BROADCAST 32912 #define OP_BROADCAST_D 41104 #define OP_BROADCASTAND 32913 #define OP_BROADCASTANDEX 32914 #define OP_BROADCASTCLASS 32915 |
︙ | ︙ | |||
338 339 340 341 342 343 344 345 346 347 348 349 350 351 | #define OP_JUMPTO 32936 #define OP_JUMPTO_C 34984 #define OP_JUMPTO_D 41128 #define OP_JUMPTO_CD 43176 #define OP_LOC 32937 #define OP_LOC_C 34985 #define OP_LOCATEME 32938 #define OP_LOSELEVEL 32939 #define OP_MANHATTAN 32940 #define OP_MANHATTAN_C 34988 #define OP_MAXINVENTORY 32941 #define OP_MOVE 32942 #define OP_MOVE_C 34990 #define OP_MOVE_D 41134 | > | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | #define OP_JUMPTO 32936 #define OP_JUMPTO_C 34984 #define OP_JUMPTO_D 41128 #define OP_JUMPTO_CD 43176 #define OP_LOC 32937 #define OP_LOC_C 34985 #define OP_LOCATEME 32938 #define OP_LOCATEME_C 34986 #define OP_LOSELEVEL 32939 #define OP_MANHATTAN 32940 #define OP_MANHATTAN_C 34988 #define OP_MAXINVENTORY 32941 #define OP_MOVE 32942 #define OP_MOVE_C 34990 #define OP_MOVE_D 41134 |
︙ | ︙ | |||
467 468 469 470 471 472 473 | {"-Move",10584242}, {"-rot",8421382}, {".",10518528}, {"/",8486940}, {"ANHH",8389394}, {"ARRIVED",8389124}, {"Abstract",8683756}, | | | | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | {"-Move",10584242}, {"-rot",8421382}, {".",10518528}, {"/",8486940}, {"ANHH",8389394}, {"ARRIVED",8389124}, {"Abstract",8683756}, {"Animate",8552589}, {"AnimateDead",8552590}, {"Arg1",8552571}, {"Arg2",8552572}, {"Arg3",8552573}, {"Array",8683739}, {"ArrayCell",8421599}, {"ArraySlice",8421600}, {"Arrivals",8618088}, |
︙ | ︙ | |||
593 594 595 596 597 598 599 | {"LASTIMAGE",8389126}, {"LB",9437195}, {"LF",9437193}, {"LOCK",8389408}, {"LOOP",8388610}, {"Level",8421503}, {"Loc",8487081}, | | | | 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 | {"LASTIMAGE",8389126}, {"LB",9437195}, {"LF",9437193}, {"LOCK",8389408}, {"LOOP",8388610}, {"Level",8421503}, {"Loc",8487081}, {"LocateMe",8487082}, {"LoseLevel",8421547}, {"MOVED",8389127}, {"MOVING",8389130}, {"Manhattan",8487084}, {"MaxInventory",8421549}, {"Misc1",9142360}, {"Misc2",9142362}, {"Misc3",9142364}, {"Misc4",9142366}, {"Misc5",9142368}, {"Misc6",9142370}, {"Misc7",9142372}, {"Move",10584238}, {"Move+",10584239}, {"MoveNumber",8552574}, {"MoveTo",10584240}, {"Moved",8618097}, {"Moving",8618098}, {"Msg",8421497}, {"N",9437186}, {"NE",9437185}, {"NW",9437187}, |
︙ | ︙ |