mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-29 04:29:32 +00:00
Less blatant RGBA_8888 favoritism
This commit is contained in:
parent
f05d1d0311
commit
3ddfe2953e
@ -141,15 +141,15 @@ static void _rerender_character(int col, int row) {
|
|||||||
for (unsigned int j=0; j<pixCharsWidth; j++) {
|
for (unsigned int j=0; j<pixCharsWidth; j++) {
|
||||||
|
|
||||||
// HACK : red <-> green swap
|
// HACK : red <-> green swap
|
||||||
uint32_t rgba = *((uint32_t *)(kbd.model->texPixels + dstIdx));
|
PIXEL_TYPE rgba = *((PIXEL_TYPE *)(kbd.model->texPixels + dstIdx));
|
||||||
uint32_t r = (rgba >> SHIFT_R) & MAX_SATURATION;
|
PIXEL_TYPE r = (rgba >> SHIFT_R) & MAX_SATURATION;
|
||||||
uint32_t g = (rgba >> SHIFT_G) & MAX_SATURATION;
|
PIXEL_TYPE g = (rgba >> SHIFT_G) & MAX_SATURATION;
|
||||||
#if USE_RGBA4444
|
#if USE_RGBA4444
|
||||||
#error fixme
|
#error fixme
|
||||||
#else
|
#else
|
||||||
rgba = ( ((rgba>>SHIFT_B)<<SHIFT_B) | (r << SHIFT_G) | (g << SHIFT_R) );
|
rgba = ( ((rgba>>SHIFT_B)<<SHIFT_B) | (r << SHIFT_G) | (g << SHIFT_R) );
|
||||||
#endif
|
#endif
|
||||||
*( (uint32_t*)(kbd.model->texPixels + dstIdx) ) = rgba;
|
*( (PIXEL_TYPE *)(kbd.model->texPixels + dstIdx) ) = rgba;
|
||||||
|
|
||||||
srcIdx += 1;
|
srcIdx += 1;
|
||||||
dstIdx += sizeof(PIXEL_TYPE);
|
dstIdx += sizeof(PIXEL_TYPE);
|
||||||
|
Loading…
Reference in New Issue
Block a user