Help me 4-ch! I need your mad programming skillz.
I've spent a few weeks trying to reverse engineer the PolygonLove2 "PL2" file compression system. I know it's LZ77, I know it's distance:length is encoded as 12:4+3, I know the escape sequence, but I cannot figure out how the offset is decoded.
Theres some framework code at http://code.google.com/p/open-pl2/ in SVN trunk. The code you want to modify is in libpl2/pak.c, function pl2Pak_unpackID. And you can use the unpl2 tool for testing. You'll obviously need (compressed) pl2 files from polygonlove2 too!
Hopefully somebody can figure out the offset to window position relation!
Oh, and the winrar will get many internets as a reward, lolz.
SECOND POST
>>2
ONLY POST
I came across your project looking for more info on the format, since I was writing something similar. I'd actually reversed the compression some time ago, it's the animation/skinning that I'm having trouble with.
Here's the compression code: http://open-pl2.googlecode.com/issues/attachment?aid=-2333878378191024939&name=pl2PackageDecompressFile.c
Any chance I can take a look at your animation code? :)
> Any chance I can take a look at your animation code? :)
i'm not >>1, but http://code.google.com/p/open-pl2/ says:
> The viewer at the moment supports loading and displaying of TMB model files using the format library. There is no animation support yet.
I think he might be dead. Or just too busy for the project.
No, the code in the repository doesn't have animation support, but there's mention - with a screenshot - that it has since been added. Never mind, anyway, I figured it out. So far I've got package loading, models, animations, and even camera paths working. Not fully decoded, but renderable. Next on the list is the script format. (Which is awful, by the way; even NScripter is better than this mess. I'm replacing it with Lua or Python ASAP.)
If you ever do read this, LightDark, thanks for the very helpful documentation on the formats. :)