From: Maxime Vincent Date: Thu, 9 Jun 2016 14:26:16 +0000 (+0200) Subject: CMAP256 X-Git-Url: https://git.0x19.co/screenshots/freebsd.png?a=commitdiff_plain;h=f167242a8a496fe4e8abe6298c58ba87bfee5978;p=doomgeneric-snom360 CMAP256 --- diff --git a/frosted-doom/i_video_fbdev.c b/frosted-doom/i_video_fbdev.c index b3b6f79..0ea6627 100644 --- a/frosted-doom/i_video_fbdev.c +++ b/frosted-doom/i_video_fbdev.c @@ -378,11 +378,14 @@ void I_FinishUpdate (void) y = SCREENHEIGHT; -#ifdef CMAP256 while (y--) { line_out += x_offset; +#ifdef CMAP256 memcpy(line_out, line_in, SCREENWIDTH); /* FB_WIDTH is bigger than Doom SCREENWIDTH... */ +#else + cmap_to_rgb565(line_out, line_in, SCREENWIDTH); +#endif line_in += SCREENWIDTH; line_out += SCREENWIDTH + x_offset_end; } @@ -390,14 +393,6 @@ void I_FinishUpdate (void) /* Start drawing from y-offset */ lseek(fd_fb, y_offset * FB_WIDTH, SEEK_SET); write(fd_fb, I_VideoBuffer_FB, SCREENHEIGHT * FB_WIDTH); /* draw only portion used by doom + x-offsets */ -#else - while (y--) - { - cmap_to_rgb565(line_out, line_in, SCREENWIDTH); - write(fd_fb, line_out, FB_WIDTH * (FB_BPP_RGB565/8)); - line_in += SCREENWIDTH; - } -#endif } @@ -452,7 +447,7 @@ int I_GetPaletteIndex (int r, int g, int b) int i; col_t color; - //printf("I_GetPaletteIndex\n"); + printf("I_GetPaletteIndex\n"); best = 0; best_diff = INT_MAX;