Commit 3fc8417a authored by deuce's avatar deuce
Browse files

Fix palette breakage from API change.

parent 34370cc5
......@@ -29,6 +29,7 @@ int bitmap_setpixel(uint32_t x, uint32_t y, uint32_t colour);
int bitmap_setpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, uint32_t x_off, uint32_t y_off, struct ciolib_pixels *, void *mask);
struct ciolib_pixels *bitmap_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey);
uint32_t *bitmap_get_modepalette(uint32_t p[16]);
int bitmap_set_modepalette(uint32_t p[16]);
#endif
#ifdef BITMAP_CIOLIB_DRIVER
......
......@@ -188,6 +188,7 @@ int try_sdl_init(int mode)
cio_api.getpixels=bitmap_getpixels;
cio_api.setpixels=bitmap_setpixels;
cio_api.get_modepalette=bitmap_get_modepalette;
cio_api.set_modepalette=bitmap_set_modepalette;
return(1);
}
return(0);
......@@ -241,6 +242,7 @@ int try_x_init(int mode)
cio_api.getpixels=bitmap_getpixels;
cio_api.setpixels=bitmap_setpixels;
cio_api.get_modepalette=bitmap_get_modepalette;
cio_api.set_modepalette=bitmap_set_modepalette;
return(1);
}
return(0);
......
......@@ -3026,12 +3026,11 @@ CIOLIBEXPORT char* CIOLIBCALL cterm_write(struct cterminal * cterm, const void *
cterm_start(cterm);
/* Now rejigger the current modes palette... */
/* TODO: We need a way to remap instead of fuckery */
mpalette = get_modepalette(palette);
if (mpalette) {
for (i=0; i < 16; i++) {
for (i=0; i < 16; i++)
mpalette[i] += 16;
}
set_modepalette(mpalette);
}
oldptnm=*cterm->puttext_can_move;
......@@ -3757,7 +3756,6 @@ CIOLIBEXPORT char* CIOLIBCALL cterm_write(struct cterminal * cterm, const void *
SETCURSORTYPE(cterm->cursor);
/* Now rejigger the current modes palette... */
/* TODO: We need a way to remap instead of fuckery */
if (mpalette) {
for (i=0; i < 16; i++)
mpalette[i] -= 16;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment