4a5 > #include "controller.h" 11d11 < static int stackp; 14c14 < static char *lookup; --- > static char *lookup; 16c16,17 < static char private_stack[256]; --- > // static char private_stack[256]; > // static int stackp; 18c19 < static inline void set_lookup(unsigned char *local_lookup) --- > static inline void set_lookup( char *local_lookup) 24c25 < static unsigned char tg_lookup[7*8*3] = { --- > static char tg_lookup[(char)7*8*3] = { 85a87,88 > > 136,150c139,163 < nib1 = nib1 + nib1 + nib1; /* mult by 3 gives compiler bug */ < fromx = lookup[nib1]; nib1 += 1; < fromy = lookup[nib1]; nib1 += 1; < fromz = lookup[nib1]; < move_to(fromx, fromy); < < nib2 = nib2 + nib2 + nib2; < tox = lookup[nib2]; nib2 += 1; < toy = lookup[nib2]; nib2 += 1; < toz = lookup[nib2]; < < dx = tox-fromx; dy = toy-fromy; < draw_line(dx, dy); < move_to(-dx, -dy); < move_to(-fromx, -fromy); --- > unsigned int nibL1; > unsigned int nibL2; > > nibL1 = (unsigned int) (nib1 + nib1 + nib1); /* mult by 3 gives compiler bug */ > fromx = lookup[nibL1]; nibL1 += 1; > fromy = lookup[nibL1]; nibL1 += 1; > fromz = lookup[nibL1]; > Reset0Ref(); > Moveto_d(-(int)0x40,(int)-0x40); > > // Moveto_d((int)fromx, (int)fromy); > Moveto_d((int)fromy, (int)fromx); > > nibL2 = (unsigned int)(nib2 + nib2 + nib2); > tox = lookup[nibL2]; nibL2 += 1; > toy = lookup[nibL2]; nibL2 += 1; > toz = lookup[nibL2]; > > dx = tox-fromx; > dy = toy-fromy; > > Draw_Line_d((int)dy,(int)dx); > > // Moveto_d(-(int)dx, -(int)dy); > // Moveto_d(-(int)fromx, -(int)fromy); 159,160c172,173 < zero_beam(); < set_scale(scale); --- > Reset0Ref(); > VIA_t1_cnt_lo= (unsigned int)scale; 162c175 < move_to(-0x40,-0x40); --- > Moveto_d(-(int)0x40,(int)-0x40); 166c179 < print_seg_relative(/* from code */ tg[i], /* to code */ tg[i+1]); --- > print_seg_relative(/* from code */(int) tg[i], /* to code */(int) tg[i+1]); 172c185 < static char shieldvec[] = { --- > static signed char shieldvec[] = { 178a192 > signed char *ptr; 180,181c194 < char *ptr; < char x1, y1; --- > signed char x1, y1; 185c198 < zero_beam(); --- > Reset0Ref(); 189c202 < set_scale(scale); --- > VIA_t1_cnt_lo= (unsigned int)scale; 193c206 < move_to(24, -72); /* Manually tweaked */ --- > Moveto_d(24, -72); /* Manually tweaked */ 196d208 < #ifdef NEVER 202c214 < draw_line(x1, y1); --- > Draw_Line_d(x1, y1); 205d216 < #endif 209c220,222 < static char crosshair_points[60] = { /* Should be placed in rom */ --- > /* Should be placed in rom */ > > static signed char crosshair_points[61] = { 219a233 > 0 221c235 < --- > /* 233a248,249 > */ > static signed int _x, _y; /* global rather than param because of compiler bug */ 235d250 < static char x, y; /* global rather than param because of compiler bug */ 239,245c254,259 < #ifdef NEVER < char x1, y1, z1, x2, y2, z2, dx, dy; < char *ptr; < < zero_beam(); < set_scale(0x80); /* 80 matches scale for text in main loop */ < move_to(x,y); --- > signed char x1, y1, z1, x2, y2, z2, dx, dy; > signed char *ptr; > > Reset0Ref(); > VIA_t1_cnt_lo = (unsigned int)0x80; /* 80 matches scale for text in main loop */ > Moveto_d(_y,_x); 248,249c262,263 < set_scale(scale); /* keep movement same but adjust cursor size */ < move_to(-0x20, -0x20); --- > VIA_t1_cnt_lo= (unsigned int)scale;// set_scale(scale); /* keep movement same but adjust cursor size */ > Moveto_d(-0x20, -0x20); 254,260c268,282 < x1 = *ptr++; if (x1 == 0) break; y1 = *ptr++; z1 = *ptr++; < x2 = *ptr++; y2 = *ptr++; z2 = *ptr++; < < dx = x2-x1; dy = y2-y1; < < move_to(x1, y1); draw_line(dx, dy); < move_to(-dx, -dy); move_to(-x1, -y1); --- > x1 = *ptr++; > if (x1 == 0) break; > y1 = *ptr++; > z1 = *ptr++; > x2 = *ptr++; > y2 = *ptr++; > z2 = *ptr++; > > dx = x2-x1; > dy = y2-y1; > > Moveto_d(y1, x1); > Draw_Line_d(dy, dx ); > Moveto_d(-dy,-dx); > Moveto_d(-y1, -x1); 264,265c286,287 < zero_beam(); < set_scale(0x80); /* 80 matches scale for text in main loop */ --- > Reset0Ref(); > VIA_t1_cnt_lo= (unsigned int)0x80;// set_scale(scale); /* 80 matches scale for text in main loop */ 267,269c289,291 < move_to(x,y); < set_scale(scale); /* keep movement same but adjust cursor size */ < move_to(-0x20, -0x20); --- > Moveto_d(_y, _x); > VIA_t1_cnt_lo= (unsigned int)scale;// set_scale(scale); /* keep movement same but adjust cursor size */ > Moveto_d(-0x20, -0x20); 272d293 < #endif 284,286c305,309 < int main(int argc, char **argv) { < char msg[10]; < const char hex[17] = "0123456789ABCDEF"; --- > //int main(int argc, char **argv) { > int main() { > > // char msg[10]; > // const char hex[17] = "0123456789ABCDEF"; 289c312 < x = 0; y = 0; --- > 295c318 < set_dp_c8(); /* vectrex internal... dp must point */ --- > DP_to_C8(); /* vectrex internal... dp must point */ 297,301c320,324 < enable_joystick_1x(); < enable_joystick_1y(); < disable_joystick_2x(); < disable_joystick_2y(); < joy_analog(); --- > enable_controller_1_x(); > enable_controller_1_y(); > disable_controller_2_x(); > disable_controller_2_y(); > Joy_Digital(); //joy_analog(); 304,305c327,328 < read_buttons(); wait_recal(); < read_buttons(); wait_recal(); --- > Read_Btns(); > Wait_Recal(); 309c332 < wait_recal(); /* Once each frame */ --- > Wait_Recal(); /* Once each frame */ 313c336 < zero_beam(); --- > Reset0Ref(); 317c340 < intensity(MAX_BRIGHTNESS); /* set some brightness */ --- > Intensity_a(MAX_BRIGHTNESS); /* set some brightness */ 331c354 < print_str(0, -80, msg); /* a message! */ --- > Print_Str_d(0, -80, msg); /* a message! */ 334c357 < print_str(0, -80, "RUNNING"); /* a message! */ --- > Print_Str_d(0, -80, "RUNNING"); /* a message! */ 338,341c361,367 < x = joystick1_x; y = joystick1_y; < scale = 0xf0; draw_shields(); < #ifdef NEVER < scale = 0x30; draw_crosshair(); --- > _x = joystick_1_x(); > _y = joystick_1_y(); > scale = 0xf0; > draw_shields(); > > scale = 0x30; > draw_crosshair(); 351c377 < #endif --- > 353c379 < joy_analog(); /* call once per round, to insure */ --- > Joy_Digital(); //joy_analog(); /* call once per round, to insure */ 356c382 < } --- > } \ No newline at end of file