dos33fsprogs/gr-sim/gr-sim.h

128 lines
3.9 KiB
C
Raw Normal View History

2017-05-02 14:56:59 +00:00
extern unsigned char ram[128*1024];
extern unsigned char a,y,x;
2017-05-02 14:56:59 +00:00
int grsim_input(void);
int grsim_update(void);
int grsim_init(void);
int color_equals(int new_color);
2017-05-04 18:59:25 +00:00
int basic_plot(unsigned char xcoord, unsigned char ycoord);
int basic_hlin(int x1, int x2, int at);
int basic_vlin(int y1, int y2, int at);
2017-05-02 19:21:32 +00:00
int gr(void);
2017-05-03 14:50:15 +00:00
int bload(char *filename, int address);
int scrn(unsigned char xcoord, unsigned char ycoord);
int scrn_page(unsigned char xcoord, unsigned char ycoord, int page);
2017-05-04 18:32:23 +00:00
int grsim_unrle(unsigned char *rle_data, int address);
int home(void);
2017-08-23 18:06:38 +00:00
int grsim_put_sprite_page(int page,unsigned char *sprite_data, int xpos, int ypos);
int grsim_put_sprite(unsigned char *sprite_data, int xpos, int ypos);
2017-05-12 16:50:24 +00:00
int gr_copy(short source, short dest);
int gr_copy_to_current(short source);
2017-05-17 19:47:20 +00:00
int text(void);
void basic_htab(int x);
void basic_vtab(int y);
void basic_print(char *string);
void basic_inverse(void);
void basic_normal(void);
2017-05-19 03:38:06 +00:00
int hlin(int page, int x1, int x2, int at);
2017-11-23 04:50:43 +00:00
int hlin_setup(int page, int x1, int x2, int at);
int hlin_continue(int width);
int hlin_double_continue(int width);
int hlin_double(int page, int x1, int x2, int at);
2017-08-12 23:44:35 +00:00
void soft_switch(unsigned short address);
int soft_switch_read(unsigned short address);
int vlin(int y1, int y2, int at);
2017-08-11 05:21:00 +00:00
int collision(int xx, int yy, int ground_color);
2018-07-02 19:21:46 +00:00
void set_plaid(void);
2018-07-07 20:24:06 +00:00
void clear_plaid(void);
2018-07-02 19:21:46 +00:00
//void clear_top_a(void);
//void clear_top(int page);
//void clear_bottom(int page);
void vtab(int ypos);
void htab(int xpos);
void move_cursor(void);
2017-11-18 19:31:03 +00:00
void move_and_print(char *string);
void print(char *string);
2017-11-18 19:31:03 +00:00
void print_both_pages(char *string);
void print_inverse(char *string);
void print_flash(char *string);
2017-08-23 23:52:28 +00:00
int plot(unsigned char xcoord, unsigned char ycoord);
#define APPLE_UP 11
#define APPLE_DOWN 10
#define APPLE_LEFT 8
#define APPLE_RIGHT 21
2017-05-17 19:47:20 +00:00
2017-07-10 04:39:38 +00:00
#define COLOR_BLACK 0
#define COLOR_RED 1
#define COLOR_DARKBLUE 2
#define COLOR_PURPLE 3
#define COLOR_DARKGREEN 4
#define COLOR_GREY 5
#define COLOR_MEDIUMBLUE 6
#define COLOR_LIGHTBLUE 7
#define COLOR_BROWN 8
#define COLOR_ORANGE 9
#define COLOR_GREY2 10
#define COLOR_PINK 11
#define COLOR_LIGHTGREEN 12
#define COLOR_YELLOW 13
#define COLOR_AQUA 14
#define COLOR_WHITE 15
2017-08-12 23:44:35 +00:00
/* Soft Switches */
#define EIGHTYSTORE_OFF 0xc000 // page2 selects AUX ram
#define EIGHTYSTORE_ON 0xc001 // page2 selects MAIN ram
#define EIGHTYCOL_OFF 0xc00c // Display 40 columns
#define EIGHTYCOLO_ON 0xc00d // Display 80 columns
#define ALTCHAR_OFF 0xc00e // Use primary charset
#define ALTCHAR_ON 0xc00f // Use alternate charset
#define EIGHTYSTORE_RD 0xc018 // Read 80stor switch (R7)
#define TEXT_RD 0xc01a // Read text switch (R7)
#define MIXED_RD 0xc01b // Read mixed switch (R7)
#define PAGE2_RD 0xc01c // Read Page2 (R7)
#define HIRES_RD 0xc01d // Read HIRES (R7)
#define ALTCHAR_RD 0xc01e // Read ALTCHAR switch (R7)
#define EIGHTYCOL_RD 0xc01f // Read 80col switch (1==on) (R7)
#define TXTCLR 0xc050 // Display GR
#define TEXT_OFF 0xc050 // Display GR
#define TXTSET 0xc051 // Display Text
#define TEXT_ON 0xc051 // Display Text
#define MIXED_OFF 0xc052 // Mixed Text Off
#define MIXCLR 0xc052 // Mixed Text Off
#define MIXED_ON 0xc053 // Mixed Text On
#define MIXSET 0xc053 // Mixed Text On
#define PAGE2_OFF 0xc054 // Use Page 1
#define LOWSCR 0xc054 // Use Page 1
#define PAGE2_ON 0xc055 // Use Page 2
#define HISCR 0xc055 // Use Page 2
#define HIRES_OFF 0xc056 // lowres mode
#define LORES 0xc056 // lowres mode
#define HIRES_ON 0xc057 // hires mode
#define HIRES 0xc057 // hires mode
#define DHIRES_ON 0xc05e // double-hires on
#define DHIRES_OFF 0xc05f // double-hires off
#define DHIRES_RD 0xc07f // double-hires read
#define PAGE0 0x0
#define PAGE1 0x4
#define PAGE2 0x8
/* gr_fast_clear.c */
void clear_screens(void);
void clear_top(void);
void clear_top_a(int color);
void clear_bottom(void);
void clear_screens_notext(void);
void clear_all(void);
2018-07-02 01:50:51 +00:00
int hgr(void);
int hplot(int xx, int yy);
int hplot_to(int xx, int yy);
int hcolor_equals(int color);