SDLPoP; David's open-source port of PoP

Open-source port of PoP that runs natively on Windows, Linux, etc.
User avatar
yaqxsw
Wizard Scribe
Wizard Scribe
Posts: 727
Joined: June 18th, 2012, 3:35 pm
Location: Germany

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by yaqxsw »

1.How can I save my history of move at apoplexy like this video by ArmyFly?
1:50 - 1:58 restart at same place - 2:04 etc... how I can do it?

https://www.youtube.com/watch?v=Q14Mr5v6uY4

2. Save button CTRL + G works, but load button CTRL + L dont work... why?
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by David »

yaqxsw wrote: 1.How can I save my history of move at apoplexy like this video by ArmyFly?
In SDLPoP, press F6 to save the current position and F9 to load it.
This should display QUICKSAVE/QUICKLOAD at the bottom, but I don't see that in the video.

The video was uploaded on 2015 July 9, but only experimental versions of SDLPoP could do quicksave at that time...
(SDLPoP_v1.14d_experimental.zip, SDLPoP_v1.15RC.zip and SDLPoP_v1.15RC2.zip)
yaqxsw wrote: 2. Save button CTRL + G works, but load button CTRL + L dont work... why?
Ctrl+L works only in the intro, just as in the original game.
User avatar
yaqxsw
Wizard Scribe
Wizard Scribe
Posts: 727
Joined: June 18th, 2012, 3:35 pm
Location: Germany

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by yaqxsw »

The video was uploaded on 2015 July 9, but only experimental versions of SDLPoP could do quicksave at that time...
(SDLPoP_v1.14d_experimental.zip, SDLPoP_v1.15RC.zip and SDLPoP_v1.15RC2.zip)
I did it. Thanks!

A question, is possible take away this display QUICKSAVE/QUICKLOAD at SDLPoP_v1.16? If yes, how? :)
User avatar
SuavePrince
The Prince of Persia
The Prince of Persia
Posts: 1092
Joined: January 26th, 2015, 6:21 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by SuavePrince »

yaqxsw wrote:1.How can I save my history of move at apoplexy like this video by ArmyFly?
1:50 - 1:58 restart at same place - 2:04 etc... how I can do it?
First:i see armfly use many slots,maybe he is a programmer,i ask tell me how do it thats,but don tell me. :oops:
second:in sdlpop.you cant do it all tricks.i try with the last updated of sdlpop,and i cant some trick...so,dont work for me...
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by David »

yaqxsw wrote: A question, is possible take away this display QUICKSAVE/QUICKLOAD at SDLPoP_v1.16? If yes, how? :)
SuavePrince wrote: First:i see armfly use many slots,maybe he is a programmer,i ask tell me how do it thats,but don tell me. :oops:
Then maybe he didn't use SDLPoP at all.
There are unofficial versions of DOSBox that can save/load states, up to 10 slots.
For example: http://ykhwong.x-y.net/
SuavePrince wrote: second:in sdlpop.you cant do it all tricks.i try with the last updated of sdlpop,and i cant some trick...so,dont work for me...
Open SDLPoP.ini, and change use_fixes_and_enhancements to false.
User avatar
SuavePrince
The Prince of Persia
The Prince of Persia
Posts: 1092
Joined: January 26th, 2015, 6:21 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by SuavePrince »

David wrote:Open SDLPoP.ini, and change use_fixes_and_enhancements to false.
Wow WORKING PERFECT.... THANXS DAVID :P
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by poirot »

David wrote:That's strange, since both SDLPoP and Apoplexy use SDL...
Yes, the problem wasn't the drawing interface, but the way it read the PLV format (previously extracted with PR, which compiled perfectly). I don't remember if PR for mac on intel uses big or little endian numbers; before that, the last time I'd compiled PR for mac was on a PowerPC.

Anyways, the PLV was read wrongly but it wasn't a big/little endian problem but I think a struct pack problem. I didn't want to keep working on that because I could create a whole level editor for SDLPoP that supports more than 24 rooms just by changing a #define, and that was my initial goal.

The level editor is working, some details are missing, but most of the job is done. I've sent you a pull request.
DarkPrince
Efendi
Efendi
Posts: 13
Joined: January 23rd, 2016, 11:08 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by DarkPrince »

Hello, quick question: I compiled it myself on OSX, everything great so far, but I reached Level 4 I had the impression the colors for the blocks at the bottom where a bit off. Some googling/screenshots confirmed this: http://imgur.com/HZP3pRw

Any idea what my prince drank? :)
poirot
Developer
Developer
Posts: 394
Joined: March 24th, 2003, 8:52 pm
Location: Australia
Contact:

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by poirot »

Did you take this screenshot? What's your OSX version? did you use ports or brew? Does this happen with the latest version on the git repository? It works for me really fine in 10.9.5.
DarkPrince
Efendi
Efendi
Posts: 13
Joined: January 23rd, 2016, 11:08 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by DarkPrince »

Hello! Sorry to be not specific at all, just wanted to get a bearing if this came up (obvisouly not!). The details:

- my screenshot
- OSX 10.11.2
- I tried using homebrew and macports, both yielded the same result (I made sure that I completely removed brew stuff prior testing with macports)
- it's the latest git version, cloned yesterday and pulled and tested again before I wrote this post ( commit a7c746ceef5f1bed4d698684bd2750a44b97fcb2 )

Thanks!
Falcury
Calif
Calif
Posts: 568
Joined: June 25th, 2009, 10:01 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Falcury »

David found the cause of the bug earlier:
viewtopic.php?f=69&t=3512&start=180#p16388

It occurs due to a workaround that we needed in order to circumvent a bug in SDL 2.0.3. The bug should have been fixed in 2.0.4 (I suppose we should upgrade to the new version, and take out the workaround?)

Apparently that bug does not occur in the version of SDL2 that you have, so the workaround actually causes the problem.

To fix it for now, find these two places in seg009.c:
https://github.com/NagyD/SDLPoP/blob/ma ... 09.c#L2187
https://github.com/NagyD/SDLPoP/blob/ma ... 09.c#L2637

This is the relevant code at those two locations:

Code: Select all

// @Hack: byte order (rgb) is reversed (otherwise the color is wrong) - why doesn't this work as expected?
// This is a bug in SDL2: https://bugzilla.libsdl.org/show_bug.cgi?id=2986
uint32_t rgb_color = SDL_MapRGB(onscreen_surface_->format, palette_color.b<<2, palette_color.g<<2, palette_color.r<<2);
Note that the order of the arguments is reversed (b, g, r instead of r, g, b)
To fix, swap b with r.
DarkPrince
Efendi
Efendi
Posts: 13
Joined: January 23rd, 2016, 11:08 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by DarkPrince »

Can confirm, looks correct once I reverted the hack. Awesome!

I checked, and yes, it's SDL 2.0.4 I'm using via Homebrew.
DarkPrince
Efendi
Efendi
Posts: 13
Joined: January 23rd, 2016, 11:08 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by DarkPrince »

As I played through, I noticed a graphical glitch on Level 12 where the other self picks up the sword: http://imgur.com/a/dSqrF . I went through this thread but couldn't find anything related.

Upon arrival at the bottom half, it looks as it is.

Once entered from the right, it almost always was graphically glitches with, interestingly, changing appearances on different tries.

But it was not a gameplay issue. The other self always appeared as expected and then the glitch immediately went away.
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by David »

I took out the workaround: https://github.com/NagyD/SDLPoP/commit/ ... 772d4911b6
DarkPrince wrote: As I played through, I noticed a graphical glitch on Level 12 where the other self picks up the sword: http://imgur.com/a/dSqrF .
I tried it now, but I didn't see any glitch.
But... I guess it is related to the fake tiles.
The sword animates its modifier, and a floor with a certain modifier can appear as floor or empty space.
Falcury
Calif
Calif
Posts: 568
Joined: June 25th, 2009, 10:01 pm

Re: SDLPoP; David's open-source port of PoP (pre-release)

Post by Falcury »

Interesting, that would be the "fake tiles" at work... But I cannot seem to reproduce this...

If you add this code, below this line in seg002.c (https://github.com/NagyD/SDLPoP/blob/ma ... 002.c#L428):

Code: Select all

curr_room_modif[curr_tilepos] = 0;
Does that fix it?
Post Reply