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 [a24f1b5e8f]:

To Artifact [534ed95552]:


65
66
67
68
69
70
71

72
73
74
75
76
77
78
#define Push(x) (vstack[vstackptr++]=(x))
#define Pop() (vstack[--vstackptr])

// For arrival/departure masks
#define Xbit(a) ((a)%5-2)
#define Ybit(a) (2-(a)/5)


static Value send_message(Uint32 from,Uint32 to,Uint16 msg,Value arg1,Value arg2,Value arg3);
static Uint32 broadcast(Uint32 from,int c,Uint16 msg,Value arg1,Value arg2,Value arg3,Uint8 s);
static Value destroy(Uint32 from,Uint32 to,Uint32 why);

static const Sint8 x_delta[8]={1,1,0,-1,-1,-1,0,1};
static const Sint8 y_delta[8]={0,-1,-1,-1,0,1,1,1};








>







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#define Push(x) (vstack[vstackptr++]=(x))
#define Pop() (vstack[--vstackptr])

// For arrival/departure masks
#define Xbit(a) ((a)%5-2)
#define Ybit(a) (2-(a)/5)

static void execute_program(Uint16*code,int ptr,Uint32 obj);
static Value send_message(Uint32 from,Uint32 to,Uint16 msg,Value arg1,Value arg2,Value arg3);
static Uint32 broadcast(Uint32 from,int c,Uint16 msg,Value arg1,Value arg2,Value arg3,Uint8 s);
static Value destroy(Uint32 from,Uint32 to,Uint32 why);

static const Sint8 x_delta[8]={1,1,0,-1,-1,-1,0,1};
static const Sint8 y_delta[8]={0,-1,-1,-1,0,1,1,1};

1854
1855
1856
1857
1858
1859
1860



















1861
1862
1863
1864
1865
1866
1867
      if(n==VOIDLINK) Throw("No object specified in pattern");
      changed=1;
      objects[n]->dir=d;
      break;
    case OP_ELSE:
      ptr--;
      while(code[ptr]==OP_ELSE) ptr=code[ptr+2];



















      break;
    case OP_HEIGHT:
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)<=objects[obj]->climb) goto fail;
      break;
    case OP_HEIGHT_C:
      g=code[ptr++];
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)<=g) goto fail;







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







1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
      if(n==VOIDLINK) Throw("No object specified in pattern");
      changed=1;
      objects[n]->dir=d;
      break;
    case OP_ELSE:
      ptr--;
      while(code[ptr]==OP_ELSE) ptr=code[ptr+2];
      break;
    case OP_FUNCTION:
      StackReq(0,2);
      Push(OVALUE(n));
      Push(NVALUE(d));
      execute_program(classes[0]->codes,functions[code[ptr++]],obj);
      StackReq(1,0);
      v=Pop();
      if(v.t==TY_NUMBER) {
        d=v.u&7;
      } else if(v.t==TY_MARK) {
        goto fail;
      } else if(v.t>TY_MAXTYPE) {
        n=v_object(v);
        x=objects[n]->x;
        y=objects[n]->y;
      } else {
        Throw("Type mismatch");
      }
      break;
    case OP_HEIGHT:
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)<=objects[obj]->climb) goto fail;
      break;
    case OP_HEIGHT_C:
      g=code[ptr++];
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)<=g) goto fail;