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 [0b49747d29]:

To Artifact [6e356ea1be]:


36
37
38
39
40
41
42

43
44
45
46
47
48
49
Uint32 ninventory;
unsigned char**levelstrings;
Uint16 nlevelstrings;
Value*array_data;
Uint16 ndeadanim;
DeadAnimation*deadanim;
Uint8 no_dead_anim;


typedef struct {
  Uint16 msg;
  Uint32 from;
  Value arg1,arg2,arg3;
} MessageVars;








>







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Uint32 ninventory;
unsigned char**levelstrings;
Uint16 nlevelstrings;
Value*array_data;
Uint16 ndeadanim;
DeadAnimation*deadanim;
Uint8 no_dead_anim;
Uint32 max_trigger;

typedef struct {
  Uint16 msg;
  Uint32 from;
  Value arg1,arg2,arg3;
} MessageVars;

1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
      if(a->step[a->lstep].start>a->step[a->lstep].end) --o->image; else ++o->image;
    }
  }
}

const char*execute_turn(int key) {
  Uint8 busy,clock,x,y;
  Uint32 m,n,turn;
  Object*o;
  Value v;
  int i;
  if(!key) {
    // This is part of initialization; if anything triggered, it must be executed now
    all_flushed=1;
    goto trig;







|







1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
      if(a->step[a->lstep].start>a->step[a->lstep].end) --o->image; else ++o->image;
    }
  }
}

const char*execute_turn(int key) {
  Uint8 busy,clock,x,y;
  Uint32 m,n,turn,tc;
  Object*o;
  Value v;
  int i;
  if(!key) {
    // This is part of initialization; if anything triggered, it must be executed now
    all_flushed=1;
    goto trig;
1955
1956
1957
1958
1959
1960
1961

1962
1963
1964
1965
1966
1967
1968
  }
  changed=0;
  key_ignored=0;
  all_flushed=0;
  lastimage_processing=0;
  vstackptr=0;
  current_key=key;

  for(n=0;n<nobjects;n++) if(o=objects[n]) {
    o->distance=0;
    o->oflags&=~(OF_KEYCLEARED|OF_DONE);
    if(o->anim) {
      o->anim->count=0;
      if(o->anim->status==ANISTAT_VISUAL) o->anim->status=0;
    }







>







1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
  }
  changed=0;
  key_ignored=0;
  all_flushed=0;
  lastimage_processing=0;
  vstackptr=0;
  current_key=key;
  tc=0;
  for(n=0;n<nobjects;n++) if(o=objects[n]) {
    o->distance=0;
    o->oflags&=~(OF_KEYCLEARED|OF_DONE);
    if(o->anim) {
      o->anim->count=0;
      if(o->anim->status==ANISTAT_VISUAL) o->anim->status=0;
    }
1995
1996
1997
1998
1999
2000
2001



2002
2003
2004
2005
2006
2007
2008
  if(!all_flushed) {
    if(m==VOIDLINK) x=0,y=0; else x=objects[m]->x,y=objects[m]->y;
    broadcast(m,0,MSG_BEGIN_TURN,NVALUE(x),NVALUE(y),v,0);
  }
  turn=0;
  // Trigger phase
  trig:



  busy=0;
  clock=255;
  for(i=0;i<64*pfheight;i++) {
    n=playfield[i];
    while(n!=VOIDLINK) {
      o=objects[n];
      m=o->up;







>
>
>







1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
  if(!all_flushed) {
    if(m==VOIDLINK) x=0,y=0; else x=objects[m]->x,y=objects[m]->y;
    broadcast(m,0,MSG_BEGIN_TURN,NVALUE(x),NVALUE(y),v,0);
  }
  turn=0;
  // Trigger phase
  trig:
  if(max_trigger) {
    if(tc++>=max_trigger) return "Turn looped too many times";
  }
  busy=0;
  clock=255;
  for(i=0;i<64*pfheight;i++) {
    n=playfield[i];
    while(n!=VOIDLINK) {
      o=objects[n];
      m=o->up;