Posted: Fri May 20, 2016 1:10 pm Post subject:
Header can be incorrectly written for TD shape files
The header description for TD shape files is wrong, UnknownC is actually two words, MaxFrameSize and Flags.
If Flags is set to any odd number (such as if a large single frame file were created that wrote a value larger than a word can hold to UnknownC), then the game will assume that the shape has an internal palette and all reads within the file will be offset by 768 bytes.
Flags should always be set to 0 for TD shapes as none of the games support using the possible internal palette and MaxFrameSize should be set to the size of the largest frame in the file (as written to disk) though the games don't actually use it. UnknownA and B are X and Y positions, but are unused by the game and the values they hold in WW produced files are left over from the tool that made them and where the image was cropped from in a larger canvas. QUICK_EDIT
Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Fri May 20, 2016 2:01 pm Post subject:
Ok, I've changed the latest revision with your data, although I have one doubt about the MaxFrameSize. Is it the size of the encoded frame or just width*height? QUICK_EDIT
Its the size of the encoded frame as written to disk IIRC. If it was just Width*Height then you wouldn't need the MaxFrameSize.
I think this field is left over from the WSA header as the TD shp format appears to have evolved from it. It is used in the WSA header and the fact its format wasn't properly understood is one of the reasons that there are hardly any working WSA encoders.
If you and interested in improving TD shp format support have working XORDelta and LCW generation code to allow handling delta frames. The LCW code produces slightly smaller files than the current OS Shp Builder format80 encoder. Its in C++ however so it would need porting. QUICK_EDIT
Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Fri May 20, 2016 2:36 pm Post subject:
Ok, then. I guess that the latest revision should be correct then.
Regarding the LCW generation code for handling delta frames, I'm interested. But I won't be that fast to implement it, since I'm having some strict deadlines regarding my PhD thesis, which is why PPM's news are a bit quiet recently. QUICK_EDIT
It would be nice to get a user friendly program able to produce fully compressed TD shp files, shapeset will do the job but it only handles pcx files and is command line only. QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum