Free Hero Mesh

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

Differences From Artifact [074e5c782f]:

To Artifact [41dc73e188]:


2213
2214
2215
2216
2217
2218
2219
2220
2221


2222
2223
2224
2225
2226
2227
2228
  Uint8 x=objects[obj]->x;
  Uint8 y=objects[obj]->y;
  Uint8 d=objects[obj]->dir;
  Uint32 n=VOIDLINK;
  Uint32 m;
  Uint16 g;
  Value v;
  static ChoicePoint cp[MAXCHOICE];
  Uint8 cpi=0;


  if(!x) return VOIDLINK;
  cp->depth=vstackptr;
  again: switch(code[ptr++]) {
    case 0 ... 7:
      n=VOIDLINK;
      x+=x_delta[code[ptr-1]];
      y+=y_delta[code[ptr-1]];







|

>
>







2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
  Uint8 x=objects[obj]->x;
  Uint8 y=objects[obj]->y;
  Uint8 d=objects[obj]->dir;
  Uint32 n=VOIDLINK;
  Uint32 m;
  Uint16 g;
  Value v;
  ChoicePoint cp[MAXCHOICE];
  Uint8 cpi=0;
  Uint16 ccl=objects[obj]->class;
  Uint8 cim=objects[obj]->image;
  if(!x) return VOIDLINK;
  cp->depth=vstackptr;
  again: switch(code[ptr++]) {
    case 0 ... 7:
      n=VOIDLINK;
      x+=x_delta[code[ptr-1]];
      y+=y_delta[code[ptr-1]];
2371
2372
2373
2374
2375
2376
2377














2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396

2397
2398
2399
2400

2401
2402
2403

2404
2405
2406

2407
2408
2409
2410
2411
2412
2413
      cpi++;
      cp[cpi].x=x;
      cp[cpi].y=y;
      cp[cpi].dir=d;
      cp[cpi].depth=vstackptr;
      cp[cpi].ptr=code[ptr++];
      break;














    case OP_LOC:
      if(vstackptr>=VSTACKSIZE-2) Throw("Stack overflow");
      Push(NVALUE(x));
      Push(NVALUE(y));
      break;
    case OP_MARK:
      if(vstackptr>=VSTACKSIZE-1) Throw("Stack overflow");
      Push(UVALUE(0,TY_MARK));
      break;
    case OP_MUL:
      cp[cpi].x=x;
      cp[cpi].y=y;
      cp[cpi].dir=d;
      break;
    case OP_NEXT:
      goto fail;
    case OP_OBJABOVE:
      if(n==VOIDLINK) Throw("No object specified in pattern");
      n=obj_above(n);

      break;
    case OP_OBJBELOW:
      if(n==VOIDLINK) Throw("No object specified in pattern");
      n=obj_below(n);

      break;
    case OP_OBJBOTTOMAT:
      n=obj_bottom_at(x,y);

      break;
    case OP_OBJTOPAT:
      n=obj_top_at(x,y);

      break;
    case OP_QUEEN:
      if(cpi>=MAXCHOICE-8) Throw("Choice overflow");
      d=0;
      cpi+=7;
      cp[cpi].x=x;
      cp[cpi].y=y;







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



















>




>



>



>







2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
      cpi++;
      cp[cpi].x=x;
      cp[cpi].y=y;
      cp[cpi].dir=d;
      cp[cpi].depth=vstackptr;
      cp[cpi].ptr=code[ptr++];
      break;
    case OP_IMAGE:
      if(n!=VOIDLINK && ccl==objects[n]->class && cim==objects[n]->image) break;
      n=playfield[x+y*64-65];
      while(n!=VOIDLINK) {
        if(objects[n]->class==ccl && objects[n]->image==cim && !(objects[n]->oflags&OF_DESTROYED)) break;
        m=objects[n]->up;
      }
      if(n==VOIDLINK) goto fail;
      break;
    case OP_IMAGE_C:
      if(n==VOIDLINK) Throw("No object specified in pattern");
      ccl=objects[n]->class;
      cim=objects[n]->image;
      break;
    case OP_LOC:
      if(vstackptr>=VSTACKSIZE-2) Throw("Stack overflow");
      Push(NVALUE(x));
      Push(NVALUE(y));
      break;
    case OP_MARK:
      if(vstackptr>=VSTACKSIZE-1) Throw("Stack overflow");
      Push(UVALUE(0,TY_MARK));
      break;
    case OP_MUL:
      cp[cpi].x=x;
      cp[cpi].y=y;
      cp[cpi].dir=d;
      break;
    case OP_NEXT:
      goto fail;
    case OP_OBJABOVE:
      if(n==VOIDLINK) Throw("No object specified in pattern");
      n=obj_above(n);
      if(n==VOIDLINK) goto fail;
      break;
    case OP_OBJBELOW:
      if(n==VOIDLINK) Throw("No object specified in pattern");
      n=obj_below(n);
      if(n==VOIDLINK) goto fail;
      break;
    case OP_OBJBOTTOMAT:
      n=obj_bottom_at(x,y);
      if(n==VOIDLINK) goto fail;
      break;
    case OP_OBJTOPAT:
      n=obj_top_at(x,y);
      if(n==VOIDLINK) goto fail;
      break;
    case OP_QUEEN:
      if(cpi>=MAXCHOICE-8) Throw("Choice overflow");
      d=0;
      cpi+=7;
      cp[cpi].x=x;
      cp[cpi].y=y;