Page 1 of 1

there is a way to extract pop2 resource??

Posted: July 6th, 2017, 6:08 am
by Kumatetsu
hi
i tried to extract resource from pop2
but image is not good
Image
Image

i used pr 1.3 version
and comand line
pr --resource=pop2.xml --export=resources *.dat

Re: there is a way to extract pop2 resource??

Posted: July 6th, 2017, 7:23 pm
by Norbert
Kumatetsu wrote:i used pr 1.3 version
Latest version is 1.3.1 pre-release 2, but it also has the problem.
These files, ROOFTOPS/shap04171.bmp and ROOFTOPS/shap04350.bmp (in fact, all from shap04150.bmp - shap04352.bmp) seem to use an incorrect palette.
I don't know if this bug is easy to fix.
David may know more.

Re: there is a way to extract pop2 resource??

Posted: July 8th, 2017, 8:41 am
by David
Norbert wrote: These files, ROOFTOPS/shap04171.bmp and ROOFTOPS/shap04350.bmp (in fact, all from shap04150.bmp - shap04352.bmp) seem to use an incorrect palette.
I don't know if this bug is easy to fix.
David may know more.
The problem is that the palette resources for these images contain multiple concatenated palettes, and the bugged images would use the second or third palette.
But there is currently no way to tell PR that it should use a later part of the palette, so it uses the first.
To solve this, I should add a new attribute to the resources.xml parser. Maybe "paletteoffset".

Also, I guess it would be a good idea to upload the PR source to GitHub...

Re: there is a way to extract pop2 resource??

Posted: July 8th, 2017, 12:19 pm
by Norbert
David wrote:Also, I guess it would be a good idea to upload the PR source to GitHub...
An ancient version already is. ;)
Better somewhere else though, since that one is part of the whole (outdated) Princed branch.

Re: there is a way to extract pop2 resource??

Posted: July 9th, 2017, 1:26 pm
by David
Here is today's fixed version.

I fixed multiple palette-related problems:
1. The palettes that need offsets. This is what Kumatetsu reported and I elaborated.
2. PR can now use SHPL palettes. Needed for the regular guards (GUARD.DAT) and the copy protection symbols in PRINCE.DAT.
3. The default palettes for 8-bit images are now greyscale instead of all-black. PR uses these when I couldn't find any usable palette. (end sequence in TRANS.DAT, horses in PRINCE.DAT)

Some palettes are *still* wrong, namely the flame behind the prince, the thrown flame and the aforementioned images in point 3.
These images would use palettes from a DAT file different from where the image is.

Re: there is a way to extract pop2 resource??

Posted: July 9th, 2017, 5:08 pm
by Norbert
Thanks for improving this.
In the Makefile, Linux requires some \ to be /, namely for .bitfield.o 5x and for .text.o 6x.
After that I get an "XML parsing error (-14)", but maybe this is also related to paths (didn't look into it yet)?

Re: there is a way to extract pop2 resource??

Posted: July 16th, 2017, 9:36 am
by David
Norbert wrote:In the Makefile, Linux requires some \ to be /, namely for .bitfield.o 5x and for .text.o 6x.
Thanks, I fixed it now (in my copy).
Norbert wrote:After that I get an "XML parsing error (-14)", but maybe this is also related to paths (didn't look into it yet)?
I'll look into that.

About uploading to GitHub:
Norbert wrote: An ancient version already is. ;)
Better somewhere else though, since that one is part of the whole (outdated) Princed branch.
Should I just upload the latest source as first commit, into a new repo in my account?

Re: there is a way to extract pop2 resource??

Posted: July 16th, 2017, 10:36 am
by David
Moved topic to PR forum.
Norbert wrote:After that I get an "XML parsing error (-14)", but maybe this is also related to paths (didn't look into it yet)?
That's because the XML parser of PR can't parse opening tags without attributes.
In pop2.xml there is a <folder> tag. If I put a space before the ">" then it works.
Another thing to fix...

Re: there is a way to extract pop2 resource??

Posted: July 16th, 2017, 10:42 am
by Norbert
David wrote:Should I just upload the latest source as first commit, into a new repo in my account?
Makes sense, yes.