Index: edit.c ================================================================== --- edit.c +++ edit.c @@ -902,14 +902,14 @@ while(*p==' ' || *p=='\t') p++; return p; } static char*import_value(char*p,Value*v) { - int i; - int n=strcspn(p," \t"); + int i,n; if(!p) return 0; while(*p==' ' || *p=='\t') p++; + n=strcspn(p," \t"); if(*p>='0' && *p<='9') { v->t=TY_NUMBER; v->u=strtol(p,&p,10)&0xFFFF; } else if(*p=='$') { v->t=TY_CLASS; @@ -1076,10 +1076,23 @@ } d=1; annihilate(); pfwidth=x; pfheight=y; + break; + case 'F': + if(!d) goto missd; + v.t=0; + p=import_value(p+1,&v); + if(v.t!=TY_CLASS) goto bad; + for(y=1;y<=pfheight;y++) for(x=1;x<=pfwidth;x++) { + v.t=objalloc(v.u); + if(v.t==VOIDLINK) goto bad; + objects[v.t]->x=x; + objects[v.t]->y=y; + pflink(v.t); + } break; case 'V': p=import_numbers(p+1,&x,0); if(!p || *p) goto bad; level_version=x; Index: export.doc ================================================================== --- export.doc +++ export.doc @@ -34,10 +34,16 @@ D width height The play field dimensions. The width and height must be 1 to 64. This line must come before any objects are listed, and is mandatory. +F $class + This command never occurs in levels exported from Free Hero Mesh, + although it can optionally occur in imported levels. This command fills + the entire playfield with the specified class; the image number and + other parameters are always zero. + V version This command never occurs in levels exported from Free Hero Mesh, although it can optionally occur in imported levels. If it is specified, then it sets the level version number.