New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load game menu: animated image missing, purple mess. #359
Comments
I suspect this is going to be in GameStateLoad::loadPreview Double check usage of SDL_SetColorKey on the layers and the composite images. Check the default behavior in the SDL docs. |
aapo, can you test to see if this was an issue before Git 0f519d8? If the error was introduced in that commit, it'll have to be related to the way headers are handled. E.g. maybe we can't use forward declaration because something important was in one particular header. |
It's ARM. So forwarding could work in very different way. |
It happens also older commits, e.g. ba2037f I think it is some old library my system. (SDL or png) |
When you play the game, do you see ugly purple squares anywhere else? If not, it's probably a logic bug somewhere in this one function (maybe assumptions that work on most but not all systems) |
No there are no purple anywhere else. Purple is this image: flare/mods/fantasycore/images/avatar/preview_background.png So GameStateLoad::loadPreview+SDL_SetColorKey might be good guess. |
I compiled Flare on a Raspberry Pi (also an ARM processor); it had the same issue. Also, sometimes creatures were missing, though that might be attributed to the ridiculously slow processor and low memory. (I was getting around 5-10 FPS...) |
Does it still happen? |
Note that images/avatar/preview_background.png is no longer needed thanks to the separate preview images that now exist. If we clean up GameStateLoad::loadPreview() we should also be able to fix this issue. |
I did some cleanup of the menu, now possible with the separate preview images. I'm assuming this will fix the issue. If not, please comment and I'll reopen the issue. |
Ah, found the actual issue. In GameStateLoad I was formatting the "magic pink" transparency by the Screen's format instead of the image file's format. The image files are 32 bit. If the screen was anything less than 32 bit, or some other format (e.g. different endian) it would cause this mess. The latest check-in should solve it. Tested via Remote Desktop with reduced color depth. |
Git 0f519d8 on ARM-Linux (Maemo5)
Loading menu should show animated icon for saved game, but it shows purple rectangle.
http://imagepaste.nullnetwork.net/viewimage.php?id=3944
The text was updated successfully, but these errors were encountered: