Skip to content
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

[Allegro] Messed up colors when switching to zBase and back to OpenGFX #5886

Closed
DorpsGek opened this issue Jan 29, 2014 · 5 comments
Closed
Labels
bug Something isn't working flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) needs triage This issue needs further investigation before it becomes actionable

Comments

@DorpsGek
Copy link
Member

fonsinchen opened the ticket and wrote:

The screenshot pretty much says it all. This is what I get when I start the game with OpenGFX, then switch to zBase, then switch back to OpenGFX. NightGFX looks fine, but even if I subsequently switch to NightGFX and then again back to OpenGFX it still looks bad with OpenGFX.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5886
@DorpsGek
Copy link
Member Author

fonsinchen wrote:

It doesn't even matter which other baseset I use. I consistently get that effect whenever I switch to OpenGFX from the options menu, but I don't get it if I start the game with OpenGFX.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5886#comment12981

@DorpsGek
Copy link
Member Author

fonsinchen wrote:

This is specific to the allegro video driver which I was accidentally using instead of SDL.

Apparently it happens when switching from a 32bit blitter to an 8bit one. In this case it's switching from 32bpp-sse4 to 8bpp-optimized. If I specify a 32bit blitter on the command line everything is fine.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5886#comment12985

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 1, 2014

frosch wrote:

I tried to call set_palette_range and set_palette every tick. But it does not seem to have any effect whatsoever.

Looks like switching video modes breaks allegro. Besided the palette animation not working, also the OS mouse pointer shows up.
* Starting with -b 32bpp-optimized, everything works
* Already starting with zbase and not forcing a 32bpp blitter breaks the OS pointer, since OTTD automatically switches to a 32bpp blitter (which involves changing the video mode).


This comment was imported from FlySpray: https://bugs.openttd.org/task/5886#comment12995

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 3, 2014

MJP wrote:

On my system, the mouse pointer problem is solved by removing "select_mouse_cursor(MOUSE_CURSOR_ARROW);" in allegro_v.cpp.
The documentation says: "This function allows you to use the operating system's native mouse cursors rather than some custom cursor."
(https://www.allegro.cc/manual/4/api/mouse-routines/select_mouse_cursor)


This comment was imported from FlySpray: https://bugs.openttd.org/task/5886#comment13006

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
@TrueBrain TrueBrain added needs triage This issue needs further investigation before it becomes actionable bug Something isn't working and removed bug from FlySpray labels Apr 13, 2018
@frosch123 frosch123 removed the Core label Apr 14, 2018
@andythenorth
Copy link
Contributor

Thanks for this. There's been no activity on this for some time, and as it stands, it doesn't look likely that it will go any further. I'm closing it as we try to keep the issue count low for OpenTTD, it helps us focus on things that are important and fun. Feel free to discuss in irc or request re-opening if you disagree. Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) needs triage This issue needs further investigation before it becomes actionable
Projects
None yet
Development

No branches or pull requests

4 participants