Join GitHub today
Strange minimap fade/melt effect #3
Interestingly, before fading, there is a ghost view of the minimap on the left hand side of the screen:
(EDIT: oops, you already noticed this, ah well)
I have narrowed the bug down to the code that is supposed to darken the trail of your exploration, WinMain:6515-6520. If I comment those out, the fading doesn't happen.
It's probably related to other state not being right, though.
I'm also going to guess something is wrong in Engine::System_SetRenderTarget, because the only place you use it is for the maps and the screenshots, and in both cases something is rather off when combined with blending (more evidence in the screenshots of the credits screen).
It's hard to understand, though.
referenced this issue
Oct 25, 2014
Render-to-texture is implemented as kind of a huge hack, because plain SDL 1.2 doesn't easily give access to framebuffer objects and all.
The bug occurs because the current color buffer was not cleared properly, and because rendering was done using blending which I think is inappropriate when making 1-to-1 copies to/from the coor buffer.
The effect was that the color buffers began to blend in the lower left corner, because that's where the textures where constructed, the origin being the lower left corner.
Screenshots of the credits screen were also suffering from this. The screenshot was taken using render-to-target, and there's also a hack about textures needing flipping involved. Because screenshots are the same size as the window, the entire buffer got blended.