Mapster32: artdump command is broken
When using the artdump console command, all tiles end up being dumped into the ART file as a distorted mess.
Here's how it looks when viewed with BAFed:
Bisection indicates this problem was introduced with 4c1d40cc . (lol, this feature barely lasted 5 revisions without being broken, rip)
The problem is as follows:
typedef struct {
uint8_t num; // animate number
int8_t xofs, yofs;
uint8_t sf; // anim. speed and flags
+ uint8_t tileflags; // tile-specific flags, such as true non-power-of-2 drawing.
} picanm_t;
In the revision above, the tileflags element was added. Artdump does the following:
// picanm
for (uint32_t i = 0; i < numtiles; ++i)
{
picanm_t p = picanm[i];
// undo picanm reorder...
p.num &= ~192;
p.num |= p.sf & 192;
p.sf &= 0x0F;
Bfwrite(&p, sizeof(picanm_t), 1, f);
}
i.e. it writes the picanm_t struct to the file, but this format is not expected by editors such as BAFed. Hence the resulting ART file will be unreadable.
Edited by Dino Bollinger