Skip to content

Instantly share code, notes, and snippets.

View QuantumApprentice's full-sized avatar

QuantumApprentice QuantumApprentice

View GitHub Profile
for (unsigned int i = 0; i < frame_size; i++)
{
uint8_t Palette_Index;
memcpy(&Palette_Index, (uint8_t*)Paletted_Surface->pixels + i, sizeof(uint8_t));
uint32_t w_PaletteColor = 0;
w_PaletteColor = (uint32_t)(&pxlFMT_Pal.palette + Palette_Index);
((uint32_t*)Output_Surface->pixels)[i] = w_PaletteColor;
//int w_smallest = INT_MAX;