libretro / gpsp

gpSP for libretro.
GNU General Public License v2.0
51 stars 51 forks source link

Add extra if/else brackets in obj_render #209

Closed andymcca closed 11 months ago

andymcca commented 1 year ago

On some code comparisons between this and TempGBA I found missing brackets on an else statement in obj_render. Don't think it changes the code path, but does make things a little clearer. Have corrected these in this PR,

negativeExponent commented 1 year ago

does this fix issue #74 or something else? there seems to be a a few post lately with regards to layer priorities etc.

DrUm78 commented 1 year ago

btw it does not compile anymore for classic_armv7_a7 with this PR: logs.txt It does well without this code.

negativeExponent commented 1 year ago

video.c, line 2913 has and extra backslash at the end causing the build error (tested on linux)

andymcca commented 1 year ago

does this fix issue #74 or something else? there seems to be a a few post lately with regards to layer priorities etc.

No it doesn't fix it, just a cosmetic change in the code to make it more readable. But I have been looking at that issue. Interested to know whether it does it in TempGBA4PSP-Mod as I'm in the process of adapting video.c from that fork. To me that issue looks like when the player sprite hits the outside wall in the foreground, the obj layer order changes but the pointer to that particular tile becomes somehow invalid. Hence the black block that appears.

With the right knowledge and looking at how other emus do this I don't think it's a hard fix, but personally i need to read a bit more on both fronts to figure it out. I think David is also open to taking a look when he has time as we've discussed it recently.

davidgfnet commented 11 months ago

Closing this PR, since the WIP video rewrite branch should fix this. Thank you :)