Skip to content

Commit

Permalink
CMAP256
Browse files Browse the repository at this point in the history
  • Loading branch information
maximevince committed Jun 9, 2016
1 parent 88e741c commit f167242
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions frosted-doom/i_video_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,26 +378,21 @@ 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;
}

/* 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

}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f167242

Please sign in to comment.