diff options
-rwxr-xr-x | atari/plot/plotter.h | 4 | ||||
-rwxr-xr-x | atari/plot/plotter_vdi.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/atari/plot/plotter.h b/atari/plot/plotter.h index d2d44c0d8..cf07d434f 100755 --- a/atari/plot/plotter.h +++ b/atari/plot/plotter.h @@ -303,8 +303,10 @@ void dump_font_drivers(void); void dump_plot_drivers(void);
void dump_vdi_info(short);
+/* convert an vdi color to bgra */ +void vdi1000_to_rgb( unsigned short * in, unsigned char * out ); -/* convert an rgb color to vdi1000 color */
+/* convert an bgra color to vdi1000 color */
void rgb_to_vdi1000( unsigned char * in, unsigned short * out );
/* convert an rgb color to an index into the web palette */
diff --git a/atari/plot/plotter_vdi.c b/atari/plot/plotter_vdi.c index 6557c4240..fa7bc3550 100755 --- a/atari/plot/plotter_vdi.c +++ b/atari/plot/plotter_vdi.c @@ -70,6 +70,9 @@ static int bitmap( GEM_PLOTTER self, struct bitmap * bmp, int x, int y, unsigned long bg, unsigned long flags ); static int plot_mfdb( GEM_PLOTTER self, GRECT * where, MFDB * mfdb, unsigned char fgcolor, uint32_t flags); static int text(GEM_PLOTTER self, int x, int y, const char *text,size_t length, const plot_font_style_t *fstyle); + +static inline void set_stdpx( MFDB * dst, int wdplanesz, int x, int y, unsigned char val ); +static inline unsigned char get_stdpx(MFDB * dst, int wdplanesz, int x, int y ); #ifdef WITH_8BPP_SUPPORT @@ -212,7 +215,7 @@ int ctor_plotter_vdi(GEM_PLOTTER self ) } } - vdi1000_to_rgb( &pal[i], &rgb_lookup[i][0] ); + vdi1000_to_rgb( &pal[i][0], &rgb_lookup[i][0] ); } } else { @@ -953,7 +956,6 @@ static void snapshot_destroy( GEM_PLOTTER self ) } } -
inline void set_stdpx( MFDB * dst, int wdplanesz, int x, int y, unsigned char val )
{
short * buf;
@@ -1128,7 +1130,7 @@ static int bitmap_convert_8( GEM_PLOTTER self, // apply transparency. if( transp ){ unsigned long bgcol = 0; - unsigned char prev_col = 0x12345678; + unsigned char prev_col = 0; for( y=0; y<clip->g_h; y++ ){ @@ -1145,7 +1147,7 @@ static int bitmap_convert_8( GEM_PLOTTER self, if( (pixel&0xFF) < 0xF0 ){ col = get_stdpx( &stdform, wdplanesize,x,y ); - if( col != prev_col ) + if( (col != prev_col) || (y == 0) ) bgcol = (((rgb_lookup[col][2] << 16) | (rgb_lookup[col][1] << 8) | (rgb_lookup[col][0]))<<8); if( prev_col != col || prev_pixel != pixel ){ prev_col = col; |