Overview
Comment: | Correct some mistakes in pattern matching |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d402558420590e0e8bccb7985ab5ba09 |
User & Date: | user on 2021-04-18 09:45:48 |
Other Links: | manifest | tags |
Context
2021-04-18
| ||
22:20 | Correct a mistake in importing level titles check-in: ce10815b30 user: user tags: trunk | |
09:45 | Correct some mistakes in pattern matching check-in: d402558420 user: user tags: trunk | |
09:25 | Remove an incorrect "Lump size of dependent picture is too short" message check-in: 9ee1615bef user: user tags: trunk | |
Changes
Modified exec.c from [a3197ac138] to [101251ce79].
︙ | ︙ | |||
1510 1511 1512 1513 1514 1515 1516 | if(a==VOIDLINK || b==VOIDLINK) return 0; if((objects[a]->oflags|objects[b]->oflags)&OF_DESTROYED) return 0; if((objects[a]->oflags^objects[b]->oflags)&OF_BIZARRO) return 0; return (objects[a]->x==objects[b]->x && objects[a]->y==objects[b]->y); } static Uint32 pat_find_at(int xy,Uint32 m4,Uint32 m5,Uint32 m6,Uint32 m7,Uint8 cl) { | | | 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 | if(a==VOIDLINK || b==VOIDLINK) return 0; if((objects[a]->oflags|objects[b]->oflags)&OF_DESTROYED) return 0; if((objects[a]->oflags^objects[b]->oflags)&OF_BIZARRO) return 0; return (objects[a]->x==objects[b]->x && objects[a]->y==objects[b]->y); } static Uint32 pat_find_at(int xy,Uint32 m4,Uint32 m5,Uint32 m6,Uint32 m7,Uint8 cl) { Uint32 n=playfield[xy]; Object*o; while(n!=VOIDLINK) { o=objects[n]; if(!(o->oflags&(OF_DESTROYED|OF_VISUALONLY))) { if(o->misc4.t==TY_SOUND || o->misc4.t==TY_USOUND) Throw("Cannot convert sound to type"); if(o->misc5.t==TY_SOUND || o->misc5.t==TY_USOUND) Throw("Cannot convert sound to type"); if(o->misc6.t==TY_SOUND || o->misc6.t==TY_USOUND) Throw("Cannot convert sound to type"); |
︙ | ︙ | |||
1563 1564 1565 1566 1567 1568 1569 | x+=x_delta[(code[ptr-1]+objects[obj]->dir)&7]; y+=y_delta[(code[ptr-1]+objects[obj]->dir)&7]; if(x<1 || x>pfwidth || y<1 || y>pfheight) goto fail; break; case 0x0200 ... 0x02FF: g=code[ptr-1]&255; goto message; | | | | | | | > > > > | > | 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 | x+=x_delta[(code[ptr-1]+objects[obj]->dir)&7]; y+=y_delta[(code[ptr-1]+objects[obj]->dir)&7]; if(x<1 || x>pfwidth || y<1 || y>pfheight) goto fail; break; case 0x0200 ... 0x02FF: g=code[ptr-1]&255; goto message; case 0x1000 ... 0x11FF: g=code[ptr-1]&255; if(g<0x20) m=pat_find_at(x+y*64-65,1UL<<(g&31),0,0,0,0); else if(g<0x40) m=pat_find_at(x+y*64-65,0,1UL<<(g&31),0,0,0); else if(g<0x60) m=pat_find_at(x+y*64-65,0,0,1UL<<(g&31),0,0); else if(g<0x80) m=pat_find_at(x+y*64-65,0,0,0,1UL<<(g&31),0); else m=pat_find_at(x+y*64-65,0,0,0,0,1U<<(g&7)); if(code[ptr-1]&0x0100) { if(m!=VOIDLINK) goto fail; } else { n=m; if(n==VOIDLINK) goto fail; } break; case 0x4000 ... 0x7FFF: n=obj_class_at(code[ptr-1]&0x3FFF,x,y); if(n==VOIDLINK) goto fail; break; case 0xC000 ... 0xFFFF: g=(code[ptr-1]&0x3FFF)+256; |
︙ | ︙ |