/*read a patch def. Return FALSE if could not find '*' */ Bool TXTreadPatchDef(struct TXTFILE *TXT,char name[8],Int16 *ofsx,Int16 *ofsy) { if(TXTok!=TRUE) Bug("TR81", "TxtRpd"); if(TXTskipComment(TXT)==FALSE) return FALSE; if(TXTcheckStartPatch(TXT)!=TRUE) return FALSE; /*not a patch line*/ if(TXTread(TXT,name,NAME|NUMBER)!=TRUE) ProgError("TR83", "%s(%ld): expecting identifier", fname (TXT->pathname), (long) TXT->Lines); Normalise(name,name); *ofsx=TXTreadShort(TXT); *ofsy=TXTreadShort(TXT); return TRUE; }
/*read a patch def. Return false if could not find '*' */ bool TXTreadPatchDef(struct TXTFILE * TXT, char name[8], int16_t * ofsx, int16_t * ofsy) { if (!TXTok) Bug("TR81", "TxtRpd"); if (!TXTskipComment(TXT)) return false; if (!TXTcheckStartPatch(TXT)) return false; /*not a patch line */ if (!TXTread(TXT, name, NAME | NUMBER)) ProgError("TR83", "%s(%ld): expecting identifier", fname(TXT->pathname), (long) TXT->Lines); Normalise(name, name); *ofsx = TXTreadShort(TXT); *ofsy = TXTreadShort(TXT); return true; }