Can't enter entrance door on level 3 in SDLPoP

Open-source port of PoP that runs natively on Windows, Linux, etc.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5749
Joined: April 9th, 2009, 10:58 pm

Can't enter entrance door on level 3 in SDLPoP

Post by Norbert »

Norbert wrote: January 26th, 2013, 11:45 pm Another one, pointed out by programmer (among others).

[G] Remember, once the player has opened an exit door, the game lets the player exit the level via any exit door that wasn't the level entrance door.
Heh, interestingly, this works in level 3 of the original game if you've died at least once after reaching the checkpoint.
Related: https://www.youtube.com/watch?v=eL-J2C4igds

This does not work with SDLPoP, even if its "Enhanced mode" that allows bug fixes is off.
David
The Prince of Persia
The Prince of Persia
Posts: 2852
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checklist Before Releasing Mod

Post by David »

Norbert wrote: March 7th, 2019, 11:51 pm Heh, interestingly, this works in level 3 of the original game if you've died at least once after reaching the checkpoint.
Related: https://www.youtube.com/watch?v=eL-J2C4igds
I remember this was already mentioned, but I can't find where...
Norbert wrote: March 7th, 2019, 11:51 pm This does not work with SDLPoP, even if its "Enhanced mode" that allows bug fixes is off.
It worked for me:
level_3_exit_bug.png
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5749
Joined: April 9th, 2009, 10:58 pm

Re: Checklist Before Releasing Mod

Post by Norbert »

David wrote: March 9th, 2019, 8:47 pmIt worked for me: [...]
That's weird.
I just retried with SDLPoP, and it's really not possible here.
I guess 32-bit and 64-bit (or Linux and Windows) are different then?
David
The Prince of Persia
The Prince of Persia
Posts: 2852
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checklist Before Releasing Mod

Post by David »

Norbert wrote: March 10th, 2019, 12:22 am
David wrote: March 9th, 2019, 8:47 pmIt worked for me: [...]
That's weird.
I just retried with SDLPoP, and it's really not possible here.
I guess 32-bit and 64-bit (or Linux and Windows) are different then?
It works for me on Linux as well:
level_3_exit_bug_Linux.png

I made a recording about this bug, maybe you could play it back and see what happens?
level_3_exit_bug.p1r
(4.46 KiB) Downloaded 78 times
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5749
Joined: April 9th, 2009, 10:58 pm

Re: Checklist Before Releasing Mod

Post by Norbert »

David wrote: March 15th, 2019, 4:10 pmI made a recording about this bug, maybe you could play it back and see what happens?
Prince just jumps up in front of the level exit door.
He doesn't enter that door.
So, same as when I played myself.

(Unrelated, not sure if you check all threads, any thoughts on the two posts starting here?)
David
The Prince of Persia
The Prince of Persia
Posts: 2852
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checklist Before Releasing Mod

Post by David »

Norbert wrote: March 15th, 2019, 8:26 pm Prince just jumps up in front of the level exit door.
He doesn't enter that door.
So, same as when I played myself.
Well, that's odd.

Entering the exit is checked in the up_pressed() function in seg005.c.
You could add the following debug printout before "if ((leveldoor_tilepos != -1)" to output the values of the variables involved in the condition.

Code: Select all

	printf("\n");
	printf("leveldoor_tilepos = %d\n", leveldoor_tilepos);
	printf("level.start_room = %d\n", level.start_room);
	printf("drawn_room = %d\n", drawn_room);
	printf("fixes->fix_exit_door = %d\n", fixes->fix_exit_door);
	printf("curr_room_modif[leveldoor_tilepos] = %d\n", curr_room_modif[leveldoor_tilepos]);
	printf("leveldoor_open = %d\n", leveldoor_open);
Then play the recording from my previous post.
SDLPoP will output the debug info every time up is pressed, but you only need to look at the last one.

On my system, this is the last output, when the prince enters the closed exit door:

Code: Select all

leveldoor_tilepos = 23
level.start_room = 2
drawn_room = 9
fixes->fix_exit_door = 0
curr_room_modif[leveldoor_tilepos] = 0
leveldoor_open = 1
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5749
Joined: April 9th, 2009, 10:58 pm

Re: Checklist Before Releasing Mod

Post by Norbert »

David wrote: March 16th, 2019, 5:55 pmOn my system, this is the last output, when the prince enters the closed exit door: [...]
On my system, it says:

Code: Select all

seg005.c: In function ‘up_pressed’:
seg005.c:395:45: error: ‘fixes_options_type {aka struct fixes_options_type}’ has no member named ‘fix_exit_door’
  printf("fixes->fix_exit_door = %d\n", fixes->fix_exit_door);
                                             ^~
Makefile:37: recipe for target 'seg005.o' failed
make: *** [seg005.o] Error 1
:lol:

So, this was probably changed after 1.18.1 then.

(By the way, maybe this should be a separate thread.)
David
The Prince of Persia
The Prince of Persia
Posts: 2852
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checklist Before Releasing Mod

Post by David »

Norbert wrote: March 17th, 2019, 1:56 am So, this was probably changed after 1.18.1 then.
Indeed: https://github.com/NagyD/SDLPoP/blob/ma ... g.txt#L521
So we saw different results because you're using the latest release and I'm using the latest version in Git.
I guess it's time to make a new release...
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5749
Joined: April 9th, 2009, 10:58 pm

Re: Checklist Before Releasing Mod

Post by Norbert »

David wrote: March 17th, 2019, 7:23 pmI guess it's time to make a new release...
Yeah. Go for it? :)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5749
Joined: April 9th, 2009, 10:58 pm

Re: Checklist Before Releasing Mod

Post by Norbert »

Not crucial, but maybe update
set (SDLPoP_VERSION "1.18")
in src/CMakeLists.txt.

And in all .h and .c files
Copyright (C) 2013-2018 Dávid Nagy
David
The Prince of Persia
The Prince of Persia
Posts: 2852
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checklist Before Releasing Mod

Post by David »

Oh great...
Norbert wrote: March 31st, 2019, 8:51 pm Not crucial, but maybe update
set (SDLPoP_VERSION "1.18")
in src/CMakeLists.txt.
Done: https://github.com/NagyD/SDLPoP/commit/ ... ebf57e1b59
Norbert wrote: March 31st, 2019, 8:51 pm And in all .h and .c files
Copyright (C) 2013-2018 Dávid Nagy
Done: https://github.com/NagyD/SDLPoP/commit/ ... 45768b3c0b

Should I replace the ZIP as well, or is it not that important?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5749
Joined: April 9th, 2009, 10:58 pm

Re: Checklist Before Releasing Mod

Post by Norbert »

David wrote: March 31st, 2019, 9:41 pmShould I replace the ZIP as well, or is it not that important?
Sure, why not.
Version 1.19 hasn't been announced yet...
David
The Prince of Persia
The Prince of Persia
Posts: 2852
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checklist Before Releasing Mod

Post by David »

Norbert wrote: March 17th, 2019, 1:56 am (By the way, maybe this should be a separate thread.)
Done.
David
The Prince of Persia
The Prince of Persia
Posts: 2852
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Checklist Before Releasing Mod

Post by David »

Norbert wrote: March 31st, 2019, 9:43 pm
David wrote: March 31st, 2019, 9:41 pmShould I replace the ZIP as well, or is it not that important?
Sure, why not.
Version 1.19 hasn't been announced yet...
Done: viewtopic.php?p=25431#p25431
David
The Prince of Persia
The Prince of Persia
Posts: 2852
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Can't enter entrance door on level 3 in SDLPoP

Post by David »

I know this was a year ago, but...
David wrote: March 9th, 2019, 8:47 pm
Norbert wrote: March 7th, 2019, 11:51 pm Heh, interestingly, this works in level 3 of the original game if you've died at least once after reaching the checkpoint.
Related: https://www.youtube.com/watch?v=eL-J2C4igds
I remember this was already mentioned, but I can't find where...
Here it is: viewtopic.php?p=15955#p15955

I found it now because the link in this recent post pointed right there. :)
Post Reply