apoplexy v3.0 released

Windows and Linux editor of PoP1 (for DOS and SNES) and PoP2 (for DOS).
Locked
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

apoplexy v3.0 released

Post by Norbert »

I've just released version 3.0 of apoplexy.

The GNU/Linux version is available here.
The Windows version can be downloaded here.

No new features, just the final 3.0 version, as promised. :)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: apoplexy v3.0 released

Post by Norbert »

I've found a bug.

This image of the ddd debugger in action shows the problem:

https://s15.postimg.org/mx1630hiz/bug.png
http://i.imgur.com/dnC9TuZ.png

When moving a PoP1/2 for DOS room, ShowRooms() is being called with iRoom -1, and subsequently "iDone[-1] = 1;" will set iZSNES to 1 out of nowhere.

The resulting warning on the console - because it never expects DOS will have iZSNES 1 - is:
-----
[ WARN ] SDL_RenderCopy (imgzsnes): Invalid texture
-----
This can be replicated by moving a room, but only after recompiling.
Either gcc or SDL has changed, or my PC just happens to be in a new state where it decides to modify the memory area that contains iZSNES.

Regardless, this is clearly a bug.
I won't be fixing it so I haven't looked thoroughly into what could be a proper solution (I'd have to re-familiarize myself with the code), but a workaround seems to be:
if (iRoom != -1) { iDone[iRoom] = 1; }
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: apoplexy v3.0 released

Post by David »

Norbert wrote:When moving a PoP1/2 for DOS room, ShowRooms() is being called with iRoom -1,
I found this line: (line 14859)

Code: Select all

				ShowRooms (-1, iMovingNewX, iMovingNewY, 0);
Here, iRoom is explicitly -1.
Norbert wrote: a workaround seems to be:
if (iRoom != -1) { iDone[iRoom] = 1; }
There is already an "if (iRoom != -1)" a few lines above (line 15435), the assignment could be moved into that.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: apoplexy v3.0 released

Post by Norbert »

David wrote:
Norbert wrote:When moving a PoP1/2 for DOS room, ShowRooms() is being called with iRoom -1,
I found this line: (line 14859)

Code: Select all

				ShowRooms (-1, iMovingNewX, iMovingNewY, 0);
Here, iRoom is explicitly -1.
Yeah, that's the call I meant.
David wrote:
Norbert wrote: a workaround seems to be:
if (iRoom != -1) { iDone[iRoom] = 1; }
There is already an "if (iRoom != -1)" a few lines above (line 15435), the assignment could be moved into that.
Maybe, yes.
Falcury
Calif
Calif
Posts: 565
Joined: June 25th, 2009, 10:01 pm

Re: apoplexy v3.0 released

Post by Falcury »

Norbert has released version 3.1 of apoplexy: forum thread
The release thread for v3.0 is now locked.
Locked