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

To Artifact [4dabc08567]:


158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
void objtrash(Uint32 n) {
  Object*o=objects[n];
  if(!o) return;
  animfree(o->anim);
  if(o->down==VOIDLINK) playfield[o->x+o->y*64-65]=o->up;
  else objects[o->down]->up=o->up;
  if(o->up!=VOIDLINK) objects[o->up]->down=o->down;
  o->down=o->up=VOIDLINK;
  if(!(o->oflags&OF_DESTROYED)) {
    if(firstobj==n) firstobj=o->next;
    if(lastobj==n) lastobj=o->prev;
    if(o->prev!=VOIDLINK) objects[o->prev]->next=o->next;
    if(o->next!=VOIDLINK) objects[o->next]->prev=o->prev;
  }
  free(o);







<







158
159
160
161
162
163
164

165
166
167
168
169
170
171
void objtrash(Uint32 n) {
  Object*o=objects[n];
  if(!o) return;
  animfree(o->anim);
  if(o->down==VOIDLINK) playfield[o->x+o->y*64-65]=o->up;
  else objects[o->down]->up=o->up;
  if(o->up!=VOIDLINK) objects[o->up]->down=o->down;

  if(!(o->oflags&OF_DESTROYED)) {
    if(firstobj==n) firstobj=o->next;
    if(lastobj==n) lastobj=o->prev;
    if(o->prev!=VOIDLINK) objects[o->prev]->next=o->next;
    if(o->next!=VOIDLINK) objects[o->next]->prev=o->prev;
  }
  free(o);
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
  Object*p=objects[y];
  int i=o->x+o->y*64-65;
  Value v;
  p->up=o->up;
  o->down=p->down;
  o->up=y;
  p->down=x;
  if(o->down==VOIDLINK && !(o->oflags&OF_BIZARRO)) playfield[i]=x;
  if(p->down==VOIDLINK && !(p->oflags&OF_BIZARRO)) playfield[i]=y;
  v=send_message(x,y,MSG_FLOATED,NVALUE(0),NVALUE(0),NVALUE(0));
  if(!((o->oflags|p->oflags)&(OF_VISUALONLY|OF_DESTROYED))) send_message(y,x,MSG_SUNK,NVALUE(0),NVALUE(0),v);
}

static void change_density(Uint32 n,Sint32 v) {
  Object*o=objects[n];
  Uint32 i;







|
|







397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
  Object*p=objects[y];
  int i=o->x+o->y*64-65;
  Value v;
  p->up=o->up;
  o->down=p->down;
  o->up=y;
  p->down=x;
  if(o->down==VOIDLINK) playfield[i]=x; else objects[o->down]->up=x;
  if(p->up!=VOIDLINK) objects[p->up]->down=y;
  v=send_message(x,y,MSG_FLOATED,NVALUE(0),NVALUE(0),NVALUE(0));
  if(!((o->oflags|p->oflags)&(OF_VISUALONLY|OF_DESTROYED))) send_message(y,x,MSG_SUNK,NVALUE(0),NVALUE(0),v);
}

static void change_density(Uint32 n,Sint32 v) {
  Object*o=objects[n];
  Uint32 i;