SDLPoP; David's open-source port of PoP
-
- Efendi
- Posts: 13
- Joined: January 23rd, 2016, 11:08 pm
Re: SDLPoP; David's open-source port of PoP
I've recompiled again but couldn't exactly reproduce.
That is: without your patch, the sword is not visible when entered from the right (but gets picked up by mirror self properly).
With your patch, no change currently.
I'm unsure what lead to the random blocks appearing and now not. I am sorry.
That is: without your patch, the sword is not visible when entered from the right (but gets picked up by mirror self properly).
With your patch, no change currently.
I'm unsure what lead to the random blocks appearing and now not. I am sorry.
Re: SDLPoP; David's open-source port of PoP
Falcury wrote:But I cannot seem to reproduce this...
1. First, you must look at the room when the sword is there, so the animation can start.DarkPrince wrote:I'm unsure what lead to the random blocks appearing and now not.
2. Remember that the animation is random and fast. Only a few values will show fake tiles, so the bug will usually not appear.
I could reproduce the bug now, but it took more than 10 tries.
And I used the built-in editor to put the starting position into room 18. (The sword is removed when you leave room 18 to the right.)
In one case, I also saw that a wall pattern appeared where the sword was. This might also happen in the original game.
Just for the fun, there are some versions of PoP where the colors of the screen change while slow-falling is in effect:DarkPrince wrote:I had the impression the colors for the blocks at the bottom where a bit off. [...] Any idea what my prince drank?
https://www.youtube.com/watch?feature=p ... XqnI#t=251 (PC98)
https://www.youtube.com/watch?feature=p ... 7F8#t=1614 (PC Engine)
Re: SDLPoP; David's open-source port of PoP
Problem!Falcury wrote: 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?)
With SDL 2.0.4, SDLPoP crashes when I resize the window in any way. This includes entering/exiting fullscreen mode.
The crash happens in the SDL_RenderClear() call.
If I comment that out then it crashes in SDL_RenderCopy().
If I also comment that out, then there is no crash (and no display either).
Apoplexy does not crash with the same DLL.
Update:
There are two versions of SDL2.dll in the SDL2-devel-2.0.4-mingw.tar.gz archive.
SDL2-2.0.4\i686-w64-mingw32\bin\SDL2.dll --> This crashes.
SDL2-2.0.4\lib\x86\SDL2.dll --> This does not crash. But this is version 2.0.2 !
Re: SDLPoP; David's open-source port of PoP
You must recompile sdl2 v2.04 with this patch.
I have the same problem before...
diff -Naur src/render/direct3d/SDL_render_d3d.c src/render/direct3d/SDL_render_d3d.c
--- src/render/direct3d/SDL_render_d3d.c 2016-01-02 19:56:31 +0000
+++ src/render/direct3d/SDL_render_d3d.c 2016-01-13 22:24:01 +0000
@@ -1003,6 +1003,10 @@
{
D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata;
D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata;
+
+ if (!texturedata) {
+ return 0;
+ }
if (D3D_RecreateTextureRep(data->device, &texturedata->texture, texture->format, texture->w, texture->h) < 0) {
return -1;
https://bugzilla.libsdl.org/attachment. ... ction=edit
I have the same problem before...
diff -Naur src/render/direct3d/SDL_render_d3d.c src/render/direct3d/SDL_render_d3d.c
--- src/render/direct3d/SDL_render_d3d.c 2016-01-02 19:56:31 +0000
+++ src/render/direct3d/SDL_render_d3d.c 2016-01-13 22:24:01 +0000
@@ -1003,6 +1003,10 @@
{
D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata;
D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata;
+
+ if (!texturedata) {
+ return 0;
+ }
if (D3D_RecreateTextureRep(data->device, &texturedata->texture, texture->format, texture->w, texture->h) < 0) {
return -1;
https://bugzilla.libsdl.org/attachment. ... ction=edit
-
- Efendi
- Posts: 13
- Joined: January 23rd, 2016, 11:08 pm
Re: SDLPoP; David's open-source port of PoP
That gave me a nice chuckle today.David wrote:(The sword is removed when you leave room 18 to the right.)Falcury wrote:But I cannot seem to reproduce this...
Earlier when I read it, I didn't realize what you meant. I thought the sword was supposed to be still there and the mirror self picking it up in front of you blabla ...
I played the actual dos version today and OFCOURSE the sword isn't there the second time you enter the screen. That's the whole point because he took it in the meantime.
As I said, I chuckled at myself. Has been too long and I'm just a fart becoming old :-)
Re: SDLPoP; David's open-source port of PoP
Thanks for that!acd2001 wrote:You must recompile sdl2 v2.04 with this patch.
So it happens only with DirectX 9. -- So it's not a problem under Linux and OS X (they use OpenGL), and under newer versions of Windows that use DirectX 11.
And only with certain texture formats. -- Maybe that's why Apoplexy is not affected?
On a related note, maybe I should put the RGB/BGR hack back, but with a run-time check that sees whether it is needed.
Oh, so *this* is what you meant when you wrote:DarkPrince wrote: Earlier when I read it, I didn't realize what you meant. I thought the sword was supposed to be still there and the mirror self picking it up in front of you blabla ...
But at last now everything is clear.DarkPrince wrote: without your patch, the sword is not visible when entered from the right (but gets picked up by mirror self properly)
Anyway, the appearing fake wall was an actual bug, so thanks for the bug report!
(Hmm... Maybe the event could be changed to work as you thought, just for fun...)
Re: SDLPoP; David's open-source port of PoP
Done: https://github.com/NagyD/SDLPoP/commit/ ... 134810a751David wrote:On a related note, maybe I should put the RGB/BGR hack back, but with a run-time check that sees whether it is needed.
Re: SDLPoP; David's open-source port of PoP
Thank you for that! The blue palace levels started to annoy me!David wrote:Done: https://github.com/NagyD/SDLPoP/commit/ ... 134810a751David wrote:On a related note, maybe I should put the RGB/BGR hack back, but with a run-time check that sees whether it is needed.
Re: SDLPoP; David's open-source port of PoP
After a number of attempts, I managed to get a second (regular) wall spot to appear, in place of the sword:David wrote:Falcury wrote:But I cannot seem to reproduce this...1. First, you must look at the room when the sword is there, so the animation can start.DarkPrince wrote:I'm unsure what lead to the random blocks appearing and now not.
2. Remember that the animation is random and fast. Only a few values will show fake tiles, so the bug will usually not appear.
I could reproduce the bug now, but it took more than 10 tries.
And I used the built-in editor to put the starting position into room 18. (The sword is removed when you leave room 18 to the right.)
In one case, I also saw that a wall pattern appeared where the sword was. This might also happen in the original game.
I suppose this should also (rarely) happen in the original game? If so, this has to be the most obscure bug that has been found in the game so far! Nice find!
Something unrelated:
I am trying to experiment with implementing some basic scripting capabilities. At the moment I am trying out Lua as a scripting language, because it is relatively lightweight, easy to use and has a clean C interface.
Other options may be AngelScript, GameMonkey or Pawn. However, these all seem to be more complicated and (in the case of AngelScript and GameMonkey) we would have to mix C++ and C code.
Hopefully in the end such a scripting feature could make it easier for mod makers to define their own special events, custom potion effects, nonlinear gameplay, etc (without the need to distribute a custom executable).
Edit: Hm, libtcc also looks attractive. It can basically compile C code on the fly and run it as a script. Perhaps this is a better option than Lua.
Re: SDLPoP; David's open-source port of PoP
Here is a 'proof of concept' experimental version that shows how scripting could work.
I have used the Tiny C Compiler; it can dynamically load full-featured C code. Luckily, linking compiled C scripts back to the main program at runtime turns out to be not the most difficult part -- the main challenge could be to come up with a nice API...
I added this script as an example (filename is script.p1s):
Once you grow tired of the script, you can of course simply delete it, rename it or modify it as you will.
Here is the pull request page on Github. Still very much a work in progress...
I have used the Tiny C Compiler; it can dynamically load full-featured C code. Luckily, linking compiled C scripts back to the main program at runtime turns out to be not the most difficult part -- the main challenge could be to come up with a nice API...
I added this script as an example (filename is script.p1s):
Spoiler: show
Here is the pull request page on Github. Still very much a work in progress...
- Attachments
-
- SDLPoP_v1.17b1.zip
- (4.84 MiB) Downloaded 60 times
Re: SDLPoP; David's open-source port of PoP
A Problem:
1. If I use levigation, I dont hear levigation sound... what is problem
2. If some save state on dosbox, dosbox will close... how solve problem
3. How mix prince.exe with other prince.exe? I want, that SDLpop have 1000 minuts, special event + quicksave. How to do
1. If I use levigation, I dont hear levigation sound... what is problem
2. If some save state on dosbox, dosbox will close... how solve problem
3. How mix prince.exe with other prince.exe? I want, that SDLpop have 1000 minuts, special event + quicksave. How to do
Re: SDLPoP; David's open-source port of PoP
Hi yaqxsw,yaqxsw wrote:A Problem:
1. If I use levigation, I dont hear levigation sound... what is problem
2. If some save state on dosbox, dosbox will close... how solve problem
I don't fully understand what you mean. Are you playing the DOS version using DOSBox, or are you using SDLPoP? Could you give some more details?
The starting time cannot be easily changed yet. But, we can add an option in SDLPoP.ini for this in the next version.yaqxsw wrote:3. How mix prince.exe with other prince.exe? I want, that SDLpop have 1000 minuts, special event + quicksave. How to do
What special event are you referring to?
Re: SDLPoP; David's open-source port of PoP
I use Apoplexy. I think, it should DOSbox.Hi yaqxsw,
I don't fully understand what you mean. Are you playing the DOS version using DOSBox, or are you using SDLPoP? Could you give some more details?
There are many special event, for example winning room, skeleton awake and other... I dont want create again SDLPoP prince.exe because it would take many timeThe starting time cannot be easily changed yet. But, we can add an option in SDLPoP.ini for this in the next version.
What special event are you referring to?
Re: SDLPoP; David's open-source port of PoP
It's already there: start_minutes_left = default and start_ticks_left = default.Falcury wrote:The starting time cannot be easily changed yet. But, we can add an option in SDLPoP.ini for this in the next version.
Re: SDLPoP; David's open-source port of PoP
Ah yes, I forgot. Wow, that was stupid of me.David wrote:It's already there: start_minutes_left = default and start_ticks_left = default.Falcury wrote:The starting time cannot be easily changed yet. But, we can add an option in SDLPoP.ini for this in the next version.