summaryrefslogtreecommitdiff
path: root/atari/plot/plotter.c
diff options
context:
space:
mode:
Diffstat (limited to 'atari/plot/plotter.c')
-rwxr-xr-xatari/plot/plotter.c59
1 files changed, 4 insertions, 55 deletions
diff --git a/atari/plot/plotter.c b/atari/plot/plotter.c
index 1532bde4d..9436dbc36 100755
--- a/atari/plot/plotter.c
+++ b/atari/plot/plotter.c
@@ -40,47 +40,6 @@
#include "atari/misc.h"
#include "atari/osspec.h"
-
-unsigned char rgb_web_pal[216][3] = {
- {0x00,0x00,0x00}, {0x33,0x00,0x00}, {0x66,0x00,0x00}, {0x99,0x00,0x00}, {0xcc,0x00,0x00}, {0xff,0x00,0x00},
- {0x00,0x33,0x00}, {0x33,0x33,0x00}, {0x66,0x33,0x00}, {0x99,0x33,0x00}, {0xcc,0x33,0x00}, {0xff,0x33,0x00},
- {0x00,0x66,0x00}, {0x33,0x66,0x00}, {0x66,0x66,0x00}, {0x99,0x66,0x00}, {0xcc,0x66,0x00}, {0xff,0x66,0x00},
- {0x00,0x99,0x00}, {0x33,0x99,0x00}, {0x66,0x99,0x00}, {0x99,0x99,0x00}, {0xcc,0x99,0x00}, {0xff,0x99,0x00},
- {0x00,0xcc,0x00}, {0x33,0xcc,0x00}, {0x66,0xcc,0x00}, {0x99,0xcc,0x00}, {0xcc,0xcc,0x00}, {0xff,0xcc,0x00},
- {0x00,0xff,0x00}, {0x33,0xff,0x00}, {0x66,0xff,0x00}, {0x99,0xff,0x00}, {0xcc,0xff,0x00}, {0xff,0xff,0x00},
- {0x00,0x00,0x33}, {0x33,0x00,0x33}, {0x66,0x00,0x33}, {0x99,0x00,0x33}, {0xcc,0x00,0x33}, {0xff,0x00,0x33},
- {0x00,0x33,0x33}, {0x33,0x33,0x33}, {0x66,0x33,0x33}, {0x99,0x33,0x33}, {0xcc,0x33,0x33}, {0xff,0x33,0x33},
- {0x00,0x66,0x33}, {0x33,0x66,0x33}, {0x66,0x66,0x33}, {0x99,0x66,0x33}, {0xcc,0x66,0x33}, {0xff,0x66,0x33},
- {0x00,0x99,0x33}, {0x33,0x99,0x33}, {0x66,0x99,0x33}, {0x99,0x99,0x33}, {0xcc,0x99,0x33}, {0xff,0x99,0x33},
- {0x00,0xcc,0x33}, {0x33,0xcc,0x33}, {0x66,0xcc,0x33}, {0x99,0xcc,0x33}, {0xcc,0xcc,0x33}, {0xff,0xcc,0x33},
- {0x00,0xff,0x33}, {0x33,0xff,0x33}, {0x66,0xff,0x33}, {0x99,0xff,0x33}, {0xcc,0xff,0x33}, {0xff,0xff,0x33},
- {0x00,0x00,0x66}, {0x33,0x00,0x66}, {0x66,0x00,0x66}, {0x99,0x00,0x66}, {0xcc,0x00,0x66}, {0xff,0x00,0x66},
- {0x00,0x33,0x66}, {0x33,0x33,0x66}, {0x66,0x33,0x66}, {0x99,0x33,0x66}, {0xcc,0x33,0x66}, {0xff,0x33,0x66},
- {0x00,0x66,0x66}, {0x33,0x66,0x66}, {0x66,0x66,0x66}, {0x99,0x66,0x66}, {0xcc,0x66,0x66}, {0xff,0x66,0x66},
- {0x00,0x99,0x66}, {0x33,0x99,0x66}, {0x66,0x99,0x66}, {0x99,0x99,0x66}, {0xcc,0x99,0x66}, {0xff,0x99,0x66},
- {0x00,0xcc,0x66}, {0x33,0xcc,0x66}, {0x66,0xcc,0x66}, {0x99,0xcc,0x66}, {0xcc,0xcc,0x66}, {0xff,0xcc,0x66},
- {0x00,0xff,0x66}, {0x33,0xff,0x66}, {0x66,0xff,0x66}, {0x99,0xff,0x66}, {0xcc,0xff,0x66}, {0xff,0xff,0x66},
- {0x00,0x00,0x99}, {0x33,0x00,0x99}, {0x66,0x00,0x99}, {0x99,0x00,0x99}, {0xcc,0x00,0x99}, {0xff,0x00,0x99},
- {0x00,0x33,0x99}, {0x33,0x33,0x99}, {0x66,0x33,0x99}, {0x99,0x33,0x99}, {0xcc,0x33,0x99}, {0xff,0x33,0x99},
- {0x00,0x66,0x99}, {0x33,0x66,0x99}, {0x66,0x66,0x99}, {0x99,0x66,0x99}, {0xcc,0x66,0x99}, {0xff,0x66,0x99},
- {0x00,0x99,0x99}, {0x33,0x99,0x99}, {0x66,0x99,0x99}, {0x99,0x99,0x99}, {0xcc,0x99,0x99}, {0xff,0x99,0x99},
- {0x00,0xcc,0x99}, {0x33,0xcc,0x99}, {0x66,0xcc,0x99}, {0x99,0xcc,0x99}, {0xcc,0xcc,0x99}, {0xff,0xcc,0x99},
- {0x00,0xff,0x99}, {0x33,0xff,0x99}, {0x66,0xff,0x99}, {0x99,0xff,0x99}, {0xcc,0xff,0x99}, {0xff,0xff,0x99},
- {0x00,0x00,0xcc}, {0x33,0x00,0xcc}, {0x66,0x00,0xcc}, {0x99,0x00,0xcc}, {0xcc,0x00,0xcc}, {0xff,0x00,0xcc},
- {0x00,0x33,0xcc}, {0x33,0x33,0xcc}, {0x66,0x33,0xcc}, {0x99,0x33,0xcc}, {0xcc,0x33,0xcc}, {0xff,0x33,0xcc},
- {0x00,0x66,0xcc}, {0x33,0x66,0xcc}, {0x66,0x66,0xcc}, {0x99,0x66,0xcc}, {0xcc,0x66,0xcc}, {0xff,0x66,0xcc},
- {0x00,0x99,0xcc}, {0x33,0x99,0xcc}, {0x66,0x99,0xcc}, {0x99,0x99,0xcc}, {0xcc,0x99,0xcc}, {0xff,0x99,0xcc},
- {0x00,0xcc,0xcc}, {0x33,0xcc,0xcc}, {0x66,0xcc,0xcc}, {0x99,0xcc,0xcc}, {0xcc,0xcc,0xcc}, {0xff,0xcc,0xcc},
- {0x00,0xff,0xcc}, {0x33,0xff,0xcc}, {0x66,0xff,0xcc}, {0x99,0xff,0xcc}, {0xcc,0xff,0xcc}, {0xff,0xff,0xcc},
- {0x00,0x00,0xff}, {0x33,0x00,0xff}, {0x66,0x00,0xff}, {0x99,0x00,0xff}, {0xcc,0x00,0xff}, {0xff,0x00,0xff},
- {0x00,0x33,0xff}, {0x33,0x33,0xff}, {0x66,0x33,0xff}, {0x99,0x33,0xff}, {0xcc,0x33,0xff}, {0xff,0x33,0xff},
- {0x00,0x66,0xff}, {0x33,0x66,0xff}, {0x66,0x66,0xff}, {0x99,0x66,0xff}, {0xcc,0x66,0xff}, {0xff,0x66,0xff},
- {0x00,0x99,0xff}, {0x33,0x99,0xff}, {0x66,0x99,0xff}, {0x99,0x99,0xff}, {0xcc,0x99,0xff}, {0xff,0x99,0xff},
- {0x00,0xcc,0xff}, {0x33,0xcc,0xff}, {0x66,0xcc,0xff}, {0x99,0xcc,0xff}, {0xcc,0xcc,0xff}, {0xff,0xcc,0xff},
- {0x00,0xff,0xff}, {0x33,0xff,0xff}, {0x66,0xff,0xff}, {0x99,0xff,0xff}, {0xcc,0xff,0xff}, {0xff,0xff,0xff}
-};
-
-
unsigned short vdi_web_pal[216][3] = {
{0x000,0x000,0x000}, {0x0c8,0x000,0x000}, {0x190,0x000,0x000}, {0x258,0x000,0x000}, {0x320,0x000,0x000}, {0x3e8,0x000,0x000},
{0x000,0x0c8,0x000}, {0x0c8,0x0c8,0x000}, {0x190,0x0c8,0x000}, {0x258,0x0c8,0x000}, {0x320,0x0c8,0x000}, {0x3e8,0x0c8,0x000},
@@ -217,15 +176,6 @@ struct s_vdi_sysinfo * read_vdi_sysinfo( short vdih, struct s_vdi_sysinfo * info
case VDI_CLUT_HARDWARE:
{
- int i;
- unsigned short *tmp_p;
-/* it's possible to store the vdi painters:
- tmp_p = (unsigned short *)&work_out[16];
-
- for (i=0;i<256;i++) {
- vdi_index[*tmp_p++] = i;
- }
-*/
}
break;
@@ -730,6 +680,7 @@ void plotter_get_clip_grect( GEM_PLOTTER self, GRECT * out )
void plotter_get_visible_grect( GEM_PLOTTER self, GRECT * out )
{
+ /*todo: !!! */
out->g_x = self->clipping.x0;
out->g_y = self->clipping.y0;
out->g_w = self->clipping.x1 - self->clipping.x0;
@@ -748,7 +699,6 @@ int plotter_std_clip(GEM_PLOTTER self, const struct rect * clip)
void plotter_vdi_clip( GEM_PLOTTER self, bool set)
{
- return;
if( set == true ) {
struct rect * c = &self->clipping;
short vdiflags[58];
@@ -760,12 +710,11 @@ void plotter_vdi_clip( GEM_PLOTTER self, bool set)
prev_vdi_clip[3] = vdiflags[48];
newclip[0] = CURFB(self).x + MAX(c->x0, 0);
newclip[1] = CURFB(self).y + MAX(c->y0, 0);
- newclip[2] = CURFB(self).x + MIN(CURFB(self).vis_w, c->x1 - c->x0)-1;
- newclip[3] = CURFB(self).y + MIN(CURFB(self).vis_h, c->y1 - c->y0)-1;
+ newclip[2] = newclip[0] + MIN(CURFB(self).vis_w-c->x0, c->x1 - c->x0)-1;
+ newclip[3] = newclip[1] + MIN(CURFB(self).vis_h-c->y1, c->y1 - c->y0)-1;
vs_clip( self->vdi_handle, 1, (short*)&newclip );
} else {
- short set = 1;
- vs_clip( self->vdi_handle, set, (short *)&prev_vdi_clip );
+ vs_clip( self->vdi_handle, 1, (short *)&prev_vdi_clip );
}
}