:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Tue Jul 17, 2018 6:52 am
All times are UTC + 0
 Forum index » Featured Tools » OS SHP Builder » Bug Reporting
Header can be incorrectly written for TD shape files
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
Author Message
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Fri May 20, 2016 1:10 pm    Post subject:  Header can be incorrectly written for TD shape files Reply with quote

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.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri May 20, 2016 2:01 pm    Post subject: Reply with quote

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?

Back to top
View user's profile Send private message Visit poster's website Skype Account
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Fri May 20, 2016 2:15 pm    Post subject: Reply with quote

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.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri May 20, 2016 2:36 pm    Post subject: Reply with quote

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.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Fri May 20, 2016 2:45 pm    Post subject: Reply with quote

No problem, if you are interested in having a look over the code, you can find it posted at https://forums.cncnet.org/index.php?topic=4403.0

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.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
 Forum index » Featured Tools » OS SHP Builder » Bug Reporting
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only one of the following words: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.1063s ][ Queries: 12 (0.0051s) ][ Debug on ]