AW: AW: Implementing PseudoColor support on TrueColor screens
Sleep
ireallyhatespam at yandex.com
Tue Jun 2 16:24:17 UTC 2020
No, that is not intentional, the original function had x = width-1 and I
forgot to change that for clarity, and yes, the colors are converted
perfectly, by "squashed" I mean what is happening in this image (that is
Doom).
https://postimg.cc/MfRz0Dk7
You see, only 1/4 of the window is being filled, instead of drawing on
the entire window; I just thought the problem was in that function but
that seems to be a problem unrelated to the colors. Here is the (super
messy) original code:
https://github.com/so-sleepy/DOOM/blob/bb4382c111ff0a83e52dd7e043884bf41c89daa0/linuxdoom-1.10/i_video.c#L769
I_InitGraphics() creates the window, I_FinishUpdate() draws the image on
the window (you can ignore all if statements with 'multiply' inside,
those are used to scale), UploadNewPalette() takes the game's palette
and use that to build the lookup table.
> To make things more easy to debug, can you save image->data
> where you know what who that should look like ? then you can play
> with a simple display code instead of that.
Thank you, I will do exactly that! I will try my best to narrow down the
issue.
More information about the xorg
mailing list