Well NightMoon, as a progammer involved in a (Mac) plug-in editor, I wish you the best of luck in this project. The stuff posted by Mehrunes is indeed the most solid information we have on the .rez format, and it allowed EVNEW and two .rez-to-Mac plug-in convertors. As it happens the source code for the .rez-to-Mac converter is available at http://www.burgerbec...lib.html#evnova but I don't know how much is hidden in BurgerLib and how much is in the availble source.
Also, you might wish to check, for inspiration, the Mac resource file format, it's obvious rez is inspired from it.
Now that only covers the .rez wrapper format, what is the format of the individual resources, for instance, what is the format of shďp, chär or röid? It is the same as on the Mac. So the better way to know the format is to get the ResEdit templates (in the Mac Nova distribution, by using Stuffit you can get it) and interpret them; the format of the templates, in turn, is a stream of:
- pascal string (a length byte followed by the characters, as many chars as is indicated in the length byte) containing the field label for edition
- a four-char-code indicating which kind of data, they are documented in ResEdit Reference, or Rezilla documentation if you don't feel like downloading the pdf; for instance DWRD means a 2-byte (16 bits) value (usualy referred to as a short) represented as a signed decimal integer (it is the single most often used field format in Nova resources).
Repeat for the number fo times necessary to parse the chole TMPL resource.
Notice the Bible, when referring to the various fields, uses the template labels, so by using the Bible and the templates together you have full documentation of the Nova-specific resources.
Lastly, you might wish to know the format of some resources, say 'STR ', 'STR#', 'PICT' (better let QuickTime handle that one), 'snd ', but also, it could be useful, 'ppat', 'cicn', 'DITL', etc... These are still the same as on the Mac, and they are not specific to Nova so they are not covered by the Bible/Nova templates. Most of them are documented in Apple's old developer documentation (nowadays in the OSX era, and especially as we've entered the Intel era, they tend to hide it since it is pre-Carbon documentation, but you can find it if you look hard enough in develooper.apple.com). 'rlë8' and 'rlëD' are not Apple resources but they are not Nova-specific either (they come from SpriteWorld), and what is know about them, with sample code, can be found in this topic (the latest version of ViewRLE code can be found with the app at the add-on files); you'd better use Bryce's code for decoding rles as mine is optimised to death and is less readable, save you should fix the bug towards the end with kSingleColorToken and rlëD, where the count is the count of bytes and not pixels. Of course you can also check out the EVNEW source code (which also handles encoding rles) at http://www.geocities.com/aprosenf/.
I think that's most of the stuff you need to make an editor. Now good luck!
This post has been edited by Zacha Pedro : 19 April 2006 - 04:14 PM