tjhancocks / kestrel-development-kit

A Development Kit for the Kestrel Game Engine
MIT License
13 stars 1 forks source link

Add support for rez format #38

Closed andrews05 closed 4 years ago

andrews05 commented 4 years ago

This PR adds support for the Win Nova .rez format. Not sure if there's really much point to this, but here we are :) Note I haven't added any switches to choose the format, it still defaults to standard resource fork.

@tjhancocks the spec I'm working off is based on code from Mission Computer and includes a few unknown values. Let me know if you have any knowledge of any of them.

tjhancocks commented 4 years ago

No worries on the switches for the time being. I dare say there will probably need to be a load of work to clean up the interface once the assemblers are sorted out.

I'll try and dig out my old Rez stuff later. I recall there being a few unknowns, but I'm not sure if they are the same unknowns or not.

Edit: I'll review this properly later when I've had chance to dig out the old code. The old stuff is not fit for use here (it's Objective-C and Cocoa dependant) but it can use it to validate/check the format.

tjhancocks commented 4 years ago

You can find the old Rez parser I mentioned at: https://gist.github.com/tjhancocks/afcc6f0b6de28006df43a74794a8e50f.

It's old code and not really fit/suitable for use here, and it can only read rez files. Scanning through now to see if the formats agree, or if there is any explanation of the unknown values?

tjhancocks commented 4 years ago

Seems to be completely fine. My old code is simply ignoring those unknown values. I suppose the question would be what Nova does when it encounters unexpected values for them. Certainly from the perspective of KDK (and perhaps Kestrel?) it doesn't matter what we write there.

andrews05 commented 4 years ago

Cool, thanks for checking that out.