1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
|
n=playfield[i];
while(n!=VOIDLINK) {
o=objects[n];
m=o->up;
if(o->oflags&OF_DESTROYED) {
objtrash(n);
} else if(classes[o->class]->cflags&CF_COMPATIBLE) {
if(o->oflags&OF_MOVED) {
o->oflags&=~OF_MOVED;
send_message(VOIDLINK,n,MSG_MOVED,NVALUE(0),NVALUE(0),NVALUE(turn));
busy=1;
}
if(o->departed) {
send_message(VOIDLINK,n,MSG_DEPARTED,NVALUE(0),NVALUE(0),NVALUE(turn));
o->departed=0;
busy=1;
|
|
|
|
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
|
n=playfield[i];
while(n!=VOIDLINK) {
o=objects[n];
m=o->up;
if(o->oflags&OF_DESTROYED) {
objtrash(n);
} else if(classes[o->class]->cflags&CF_COMPATIBLE) {
if((o->oflags&(OF_MOVED|OF_MOVED2))==OF_MOVED) {
o->oflags=(o->oflags|OF_MOVED2)&~OF_MOVED;
send_message(VOIDLINK,n,MSG_MOVED,NVALUE(0),NVALUE(0),NVALUE(turn));
busy=1;
}
if(o->departed) {
send_message(VOIDLINK,n,MSG_DEPARTED,NVALUE(0),NVALUE(0),NVALUE(turn));
o->departed=0;
busy=1;
|
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
|
n=lastobj;
while(n!=VOIDLINK) {
o=objects[n];
if(!(classes[o->class]->cflags&CF_COMPATIBLE)) {
if(o->oflags&OF_MOVED2) send_message(VOIDLINK,n,MSG_MOVED,NVALUE(0),NVALUE(0),NVALUE(turn)),busy=1;
if(o->departed2) send_message(VOIDLINK,n,MSG_DEPARTED,NVALUE(o->departed2),NVALUE(0),NVALUE(turn)),busy=1;
if(o->arrived2) send_message(VOIDLINK,n,MSG_ARRIVED,NVALUE(o->arrived2),NVALUE(0),NVALUE(turn)),busy=1;
o->oflags&=~OF_MOVED2;
o->arrived2=o->departed2=0;
if(o->anim && (o->anim->status&ANISTAT_LOGICAL)) execute_animation(n);
if(o->oflags&(OF_BUSY|OF_USERSIGNAL)) busy=1;
}
n=o->prev;
}
// Ending phase
if(!busy && !all_flushed) {
n=lastobj;
while(n!=VOIDLINK) {
v=send_message(VOIDLINK,n,MSG_END_TURN,NVALUE(turn),NVALUE(0),NVALUE(0));
|
<
>
|
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
|
n=lastobj;
while(n!=VOIDLINK) {
o=objects[n];
if(!(classes[o->class]->cflags&CF_COMPATIBLE)) {
if(o->oflags&OF_MOVED2) send_message(VOIDLINK,n,MSG_MOVED,NVALUE(0),NVALUE(0),NVALUE(turn)),busy=1;
if(o->departed2) send_message(VOIDLINK,n,MSG_DEPARTED,NVALUE(o->departed2),NVALUE(0),NVALUE(turn)),busy=1;
if(o->arrived2) send_message(VOIDLINK,n,MSG_ARRIVED,NVALUE(o->arrived2),NVALUE(0),NVALUE(turn)),busy=1;
o->arrived2=o->departed2=0;
if(o->anim && (o->anim->status&ANISTAT_LOGICAL)) execute_animation(n);
if(o->oflags&(OF_BUSY|OF_USERSIGNAL)) busy=1;
}
o->oflags&=~OF_MOVED2;
n=o->prev;
}
// Ending phase
if(!busy && !all_flushed) {
n=lastobj;
while(n!=VOIDLINK) {
v=send_message(VOIDLINK,n,MSG_END_TURN,NVALUE(turn),NVALUE(0),NVALUE(0));
|