I'm finishing a game port, only a few pieces left to get it working nicely.
In order to get more performance I had to tune down the colors to 16 bit mode, it was in 32 before.
It's a sdl port, the problem is some tiles and pixels color suddenly changed, probably with some conflict with the colorkey for transparencies.
I managed to fix most of them by changing one of the parameters of the surfaces to hardware mode
( from SWSURFACE to HWSURFACE )
Thing is there's still one thing whose color has changed, the function that handles string drawing, where it should be white ( 255, 255, 255 ) it prints what appear to be cyan ( rgb 0, 255 , 255 I think.. ).
Could anyone help me with these?
RGB Color conversion issue?
- Neoblast
- DC Developer
- Posts: 314
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Sat Dec 01, 2007 8:51 am
- Has thanked: 3 times
- Been thanked: 1 time
- Neoblast
- DC Developer
- Posts: 314
- Joined: Sat Dec 01, 2007 8:51 am
- Has thanked: 3 times
- Been thanked: 1 time
Re: RGB Color conversion issue?
It's fixed now but thank you Ph3N0M
One of the issues was fixed by using SDL_HWSURFACE ( it had to do with the alpha and changin from 32 to 16 bit mode )
and the other one, related to the strings the game I just released prints, they appeared cyan instead of white, Indiket helped me out with this
This is how it was:
SDL_Color color = { c >> 16, c >> 8, c }; For 32 Bit mode
And how it gets fixed:
SDL_Color color = { c >> 8, c >> 4, c }; For 16 bit mode
One of the issues was fixed by using SDL_HWSURFACE ( it had to do with the alpha and changin from 32 to 16 bit mode )
and the other one, related to the strings the game I just released prints, they appeared cyan instead of white, Indiket helped me out with this
This is how it was:
SDL_Color color = { c >> 16, c >> 8, c }; For 32 Bit mode
And how it gets fixed:
SDL_Color color = { c >> 8, c >> 4, c }; For 16 bit mode