1 diff -Nur aavga-1.0.orig/aavga.c aavga-1.0/aavga.c
2 --- aavga-1.0.orig/aavga.c Mon Feb 12 23:35:30 2001
3 +++ aavga-1.0/aavga.c Sat Jun 23 20:15:59 2001
5 { 320, 400, 1, 256, 320, 320, 0, 320 * 400, 0, IS_LINEAR, 0, 320 * 400, 0, NULL, 1024 * 1024, NULL, NULL } , /*7 */
6 { 360, 480, 1, 256, 360, 360, 0, 260 * 480, 0, IS_LINEAR, 0, 360 * 480, 0, NULL, 1024 * 1024, NULL, NULL } , /*8 */
8 - { 640, 480, 1, 256, 640, 480, 0, 640 * 480, 0, IS_LINEAR, 0, 640 * 480, 0, NULL, 1024 * 1024, NULL, NULL } , /*11 */
9 - { 800, 600, 1, 256, 800, 600, 0, 800 * 600, 0, IS_LINEAR, 0, 800 * 600, 0, NULL, 1024 * 1024, NULL, NULL } , /*12 */
10 - { 1024, 768, 1, 256, 1024, 768, 0, 1024 * 768, 0, IS_LINEAR, 0, 1024*768, 0, NULL, 1024 * 1024, NULL, NULL } , /*13 */
11 + { 640, 480, 1, 256, 640, 480, 0, 640 * 480, 0, IS_LINEAR, 0, 640 * 480, 0, NULL, 1024 * 1024, NULL, NULL } , /*10 */
12 + { 800, 600, 1, 256, 800, 600, 0, 800 * 600, 0, IS_LINEAR, 0, 800 * 600, 0, NULL, 1024 * 1024, NULL, NULL } , /*11 */
13 + { 1024, 768, 1, 256, 1024, 768, 0, 1024 * 768, 0, IS_LINEAR, 0, 1024*768, 0, NULL, 1024 * 1024, NULL, NULL } , /*12 */
14 + { 1280, 1024, 1, 256, 1280, 1024, 0, 1280 * 1024, 0, IS_LINEAR, 0, 1280*1024, 0, NULL, 2048 * 1024, NULL, NULL } , /*13 */
22 - fprintf (stderr, " AA-lib SVGA emulation mode:%i\n", x);
24 + fprintf (stderr, " AA-lib SVGA emulation mode:%i\n", x);
25 aa_parseoptions (NULL, NULL, NULL, NULL);
27 if (x == 0 && context)
29 if (!aa_autoinitmouse (context, AA_SENDRELEASE))
30 return fprintf (stderr, "Error in aa_autoinitmouse!\n"), 1;
32 - fprintf (stderr, " AA-lib initialized\n");
34 + fprintf (stderr, " AA-lib initialized\n");
44 +/* svgalib >= 1.2.11 functions */
46 +_aavga_modenamestab[]={
57 +#define _aavga_modenum (sizeof(_aavga_modenamestab)/sizeof(char*))
59 +vga_getmodename(int mode)
61 + if(mode>=_aavga_modenum)
63 + return _aavga_modenamestab[mode];
67 +vga_runinbackground_version(void)
75 + memset(buffer,0,mode[cmode].maxpixels);
80 +vga_drawscansegment(unsigned char *colors, int x, int y, int length)
82 + memcpy(buffer+y*mode[cmode].width+x,colors,length);
87 +vga_drawscanline(int line, unsigned char *color)
89 + return vga_drawscansegment(color,0,line,mode[cmode].width);
95 +vga_unlockvc(void) {}
97 +vga_disabledriverreport(void) {}
99 +/* svgalib >= 1.3.0 functions */
100 +int vga_getdefaultmode(void)
103 + if((ms=getenv("SVGALIB_DEFAULT_MODE"))==NULL)
106 + for(m=0;m<_aavga_modenum;m++)
107 + if(!strcmp(ms,_aavga_modenamestab[m]))
111 + return atoi(ms)>0 ? atoi(ms) : -1;