|
|
1.1.1.3 root 1: /*
1.1 root 2: * UAE - The Un*x Amiga Emulator
1.1.1.3 root 3: *
1.1 root 4: * Interface to the graphics system (X, SVGAlib)
1.1.1.3 root 5: *
6: * Copyright 1995-1997 Bernd Schmidt
1.1 root 7: */
8:
9: typedef long int xcolnr;
10:
1.1.1.2 root 11: typedef int (*allocfunc_type)(int, int, int, xcolnr *);
1.1 root 12:
13: extern xcolnr xcolors[4096];
14:
15: extern int buttonstate[3];
16: extern int newmousecounters;
17: extern int lastmx, lastmy;
1.1.1.4 root 18: extern int ievent_alive;
1.1 root 19:
1.1.1.4 root 20: extern int graphics_setup (void);
21: extern int graphics_init (void);
22: extern void graphics_leave (void);
23: extern void handle_events (void);
24: extern void setup_brkhandler (void);
25:
26: extern void flush_line (int);
27: extern void flush_block (int, int);
28: extern void flush_screen (int, int);
29:
30: extern int lockscr (void);
31: extern void unlockscr (void);
32:
33: extern int debuggable (void);
34: extern int needmousehack (void);
35: extern void togglemouse (void);
36: extern void LED (int);
37:
38: extern int bits_in_mask (unsigned long mask);
39: extern int mask_shift (unsigned long mask);
40: extern unsigned long doMask (int p, int bits, int shift);
41: extern unsigned long doMask256 (int p, int bits, int shift);
42: extern void setup_maxcol (int);
43: extern void alloc_colors256 (int (*)(int, int, int, xcolnr *));
44: extern void alloc_colors64k (int, int, int, int, int, int);
45: extern void setup_greydither (int bits, allocfunc_type allocfunc);
46: extern void setup_greydither_maxcol (int maxcol, allocfunc_type allocfunc);
47: extern void setup_dither (int bits, allocfunc_type allocfunc);
48: extern void DitherLine (uae_u8 *l, uae_u16 *r4g4b4, int x, int y, uae_s16 len, int bits) ASM_SYM_FOR_FUNC("DitherLine");
1.1 root 49:
50: struct vidbuf_description
51: {
1.1.1.4 root 52: /* The graphics code has a choice whether it wants to use a large buffer
53: * for the whole display, or only a small buffer for a single line.
54: * If you use a large buffer:
55: * - set bufmem to point at it
56: * - set linemem to 0
57: * - if memcpy within bufmem would be very slow, i.e. because bufmem is
58: * in graphics card memory, also set emergmem to point to a buffer
59: * that is large enough to hold a single line.
60: * - implement flush_line to be a no-op.
61: * If you use a single line buffer:
62: * - set bufmem and emergmem to 0
63: * - set linemem to point at your buffer
64: * - implement flush_line to copy a single line to the screen
65: */
66: char *bufmem;
67: char *linemem;
68: char *emergmem;
1.1.1.2 root 69: int rowbytes; /* Bytes per row in the memory pointed at by bufmem. */
70: int pixbytes; /* Bytes per pixel. */
1.1.1.3 root 71: int width;
72: int height;
1.1.1.2 root 73: int maxblocklines; /* Set to 0 if you want calls to flush_line after each drawn line, or the number of
74: * lines that flush_block wants to/can handle (it isn't really useful to use another
75: * value than maxline here). */
1.1.1.3 root 76: int can_double; /* Set if the high part of each entry in xcolors contains the same value
77: * as the low part, so that two pixels can be drawn at once. */
1.1 root 78: };
79:
80: extern struct vidbuf_description gfxvidinfo;
1.1.1.3 root 81:
82: /* For ports using tui.c, this should be built by graphics_setup(). */
83: extern struct bstring *video_mode_menu;
84: extern void vidmode_menu_selected(int);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.