From: sparky4 Date: Mon, 26 May 2014 20:46:33 +0000 (-0500) Subject: modified: 16/DOS_GFX.OBJ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=b85f5578c98d17b265e06cfd63af8c81670e0b03;p=16.git modified: 16/DOS_GFX.OBJ modified: 16/Project 16.bfproject modified: 16/dos_gfx.cpp modified: 16/lib/x/MAKEFILE deleted: 16/lib/x/MODEX.BAK modified: 16/lib/x/MODEX.DEF modified: 16/lib/x/MODEX.H modified: 16/lib/x/MODEX.LIB deleted: 16/lib/x/MODEX.OBJ modified: 16/lib/x/MXBB.ASM modified: 16/lib/x/MXBB.OBJ modified: 16/lib/x/MXCC.ASM modified: 16/lib/x/MXCC.OBJ modified: 16/lib/x/MXCG.ASM modified: 16/lib/x/MXCG.OBJ modified: 16/lib/x/MXCL.ASM modified: 16/lib/x/MXCL.OBJ modified: 16/lib/x/MXCR.ASM modified: 16/lib/x/MXCR.OBJ modified: 16/lib/x/MXEL.ASM deleted: 16/lib/x/MXEL.OBJ modified: 16/lib/x/MXFB.ASM modified: 16/lib/x/MXFB.OBJ modified: 16/lib/x/MXFP.ASM modified: 16/lib/x/MXFP.OBJ modified: 16/lib/x/MXGC.ASM modified: 16/lib/x/MXGC.OBJ modified: 16/lib/x/MXGI.ASM modified: 16/lib/x/MXGI.OBJ modified: 16/lib/x/MXGM.ASM modified: 16/lib/x/MXGM.OBJ modified: 16/lib/x/MXGP.ASM modified: 16/lib/x/MXGP.OBJ modified: 16/lib/x/MXGV.ASM modified: 16/lib/x/MXGV.OBJ modified: 16/lib/x/MXHL.ASM modified: 16/lib/x/MXHL.OBJ modified: 16/lib/x/MXIT.ASM modified: 16/lib/x/MXIT.OBJ modified: 16/lib/x/MXLL.ASM modified: 16/lib/x/MXLL.OBJ modified: 16/lib/x/MXLN.ASM modified: 16/lib/x/MXLN.OBJ modified: 16/lib/x/MXOT.ASM modified: 16/lib/x/MXOT.OBJ modified: 16/lib/x/MXPB.ASM modified: 16/lib/x/MXPB.OBJ modified: 16/lib/x/MXPF.ASM modified: 16/lib/x/MXPF.OBJ modified: 16/lib/x/MXPG.ASM modified: 16/lib/x/MXPG.OBJ modified: 16/lib/x/MXPI.ASM modified: 16/lib/x/MXPI.OBJ modified: 16/lib/x/MXPN.ASM modified: 16/lib/x/MXPN.OBJ modified: 16/lib/x/MXPP.ASM modified: 16/lib/x/MXPP.OBJ deleted: 16/lib/x/MXPT.ASM deleted: 16/lib/x/MXPT.OBJ modified: 16/lib/x/MXRA.ASM modified: 16/lib/x/MXRA.OBJ modified: 16/lib/x/MXRP.ASM modified: 16/lib/x/MXRP.OBJ modified: 16/lib/x/MXSA.ASM modified: 16/lib/x/MXSA.OBJ modified: 16/lib/x/MXSC.ASM modified: 16/lib/x/MXSC.OBJ modified: 16/lib/x/MXSI.ASM modified: 16/lib/x/MXSI.OBJ modified: 16/lib/x/MXSL.ASM modified: 16/lib/x/MXSL.OBJ modified: 16/lib/x/MXSM.ASM modified: 16/lib/x/MXSM.OBJ modified: 16/lib/x/MXSP.ASM modified: 16/lib/x/MXSP.OBJ modified: 16/lib/x/MXSS.ASM modified: 16/lib/x/MXSS.OBJ modified: 16/lib/x/MXTL.ASM modified: 16/lib/x/MXTL.OBJ modified: 16/lib/x/MXVS.ASM modified: 16/lib/x/MXVS.OBJ deleted: 16/lib/x/MXVS~1.OBJ modified: 16/lib/x/MXWD.ASM modified: 16/lib/x/MXWD.OBJ modified: 16/lib/x/MXWM.ASM modified: 16/lib/x/MXWM.OBJ modified: 16/lib/x/MXWP.ASM modified: 16/lib/x/MXWP.OBJ modified: 16/lib/x/MXWR.ASM modified: 16/lib/x/MXWR.OBJ deleted: 16/lib/x/compile.bat deleted: 16/lib/x/modex.bak deleted: 16/lib/x/modex.lb1 deleted: 16/lib/x/modex.lib deleted: 16/lib/x/modex.mk deleted: 16/lib/x/modex.mk1 deleted: 16/lib/x/modex.tgt deleted: 16/lib/x/modex.wpj modified: 16/x.bat 16/DOS_GFX.EXE --- diff --git a/16/DOS_GFX.OBJ b/16/DOS_GFX.OBJ index 23a5a035..33fc4b75 100644 Binary files a/16/DOS_GFX.OBJ and b/16/DOS_GFX.OBJ differ diff --git a/16/Project 16.bfproject b/16/Project 16.bfproject index 90a63e85..8d363c9a 100644 --- a/16/Project 16.bfproject +++ b/16/Project 16.bfproject @@ -1,6 +1,6 @@ c2e.convert_special: 0 e2c.convert_num: 0 -openfiles: /dos/z/16/16/dos_gfx.cpp:8871:8213:0: +openfiles: /dos/z/16/16/dos_gfx.cpp:24360:23947:1: openfiles: /dos/z/16/16/dos_gfx.h:607:0:0: openfiles: /dos/z/16/16/dos_kb.c:892:395:0: openfiles: /dos/z/16/16/dos_kb.h:60:0:0: @@ -9,12 +9,13 @@ openfiles: /dos/z/16/16/lib/lib_com.h:2553:1575:0: openfiles: /dos/z/16/16/scroll.txt:5307:5080:0: openfiles: /dos/z/16/16/project16.txt:1675:950:0: openfiles: /dos/z/16/16/16.txt:0:0:0: -openfiles: /dos/z/16/16/lib/x/MODEX.DEF:4500:3857:0: -openfiles: /dos/z/16/16/lib/x/MODEX.H:2733:2279:0: -openfiles: /dos/z/16/16/lib/x/MXVS.ASM:272:0:0: -openfiles: /dos/z/16/16/lib/x/MXPN.ASM:257:0:0: -openfiles: /dos/z/16/16/x.bat:0:0:0: -openfiles: /dos/z/16/16/xx.bat:16:0:1: +openfiles: /dos/z/16/16/lib/x/MODEX.H:1569:1079:0: +openfiles: /dos/z/16/16/lib/x/MXVS.ASM:260:0:0: +openfiles: /dos/z/16/16/lib/x/MXPN.ASM:241:0:0: +openfiles: /dos/z/16/16/x.bat:71:0:0: +openfiles: /dos/z/16/16/xx.bat:16:0:0: +openfiles: /dos/z/16/16/lib/x/MODEX.DEF:4471:3564:0: +openfiles: /dos/z/16/16/lib/x/MAKEFILE:1186:804:0: snr_recursion_level: 0 convertcolumn_horizontally: 0 adv_open_matchname: 0 @@ -26,7 +27,7 @@ view_left_panel: 0 default_mime_type: text/plain e2c.convert_xml: 1 c2e.convert_iso: 0 -opendir: file:///dos/z/16/16 +opendir: file:///dos/z/16/16/lib/x wrap_text_default: 0 bookmarks_filename_mode: 1 ssearch_text: virtual @@ -71,21 +72,23 @@ recent_files: file:///dos/z/16/16/w_modex/XPRIM.CPP recent_files: file:///dos/z/16/16/w_modex/MODEX.CPP recent_files: file:///dos/z/16/16/w_modex/TEST.CPP recent_files: file:///dos/z/16/16/Project%2016.bfproject +recent_files: file:///dos/z/16/16/lib/x/compile.bat recent_files: file:///dos/z/16/16/dos_gfx.cpp recent_files: file:///dos/z/16/16/dos_gfx.h recent_files: file:///dos/z/16/16/dos_kb.c recent_files: file:///dos/z/16/16/dos_kb.h -recent_files: file:///dos/z/16/16/lib/lib_com.cpp -recent_files: file:///dos/z/16/16/lib/lib_com.h recent_files: file:///dos/z/16/16/scroll.txt -recent_files: file:///dos/z/16/16/project16.txt -recent_files: file:///dos/z/16/16/16.txt -recent_files: file:///dos/z/16/16/lib/x/MODEX.DEF +recent_files: file:///dos/z/16/16/lib/x/MXPN.ASM recent_files: file:///dos/z/16/16/lib/x/MODEX.H recent_files: file:///dos/z/16/16/lib/x/MXVS.ASM -recent_files: file:///dos/z/16/16/lib/x/MXPN.ASM +recent_files: file:///dos/z/16/16/16.txt +recent_files: file:///dos/z/16/16/lib/lib_com.cpp +recent_files: file:///dos/z/16/16/lib/lib_com.h +recent_files: file:///dos/z/16/16/project16.txt recent_files: file:///dos/z/16/16/x.bat recent_files: file:///dos/z/16/16/xx.bat +recent_files: file:///dos/z/16/16/lib/x/MODEX.DEF +recent_files: file:///dos/z/16/16/lib/x/MAKEFILE snr_replacetype: 0 savedir: file:///dos/z/16/16 spell_check_default: 1 diff --git a/16/dos_gfx.cpp b/16/dos_gfx.cpp index 3fb7b683..d17f6ebb 100644 --- a/16/dos_gfx.cpp +++ b/16/dos_gfx.cpp @@ -6,20 +6,20 @@ * * Simple graphics library to accompany the article * - * INTRODUCTION TO MODE X. + * INTRODUCTION TO MODE X. * * This library provides the basic functions for initializing and using * unchained (planar) 256-color VGA modes. Currently supported are: * - * - 320x200 - * - 320x240 + * - 320x200 + * - 320x240 * * Functions are provided for: * - * - initializing one of the available modes - * - setting the start address of the VGA refresh data - * - setting active and visible display pages - * - writing and reading a single pixel to/from video memory + * - initializing one of the available modes + * - setting the start address of the VGA refresh data + * - setting active and visible display pages + * - writing and reading a single pixel to/from video memory * * The library is provided as a demonstration only, and is not claimed * to be particularly efficient or suited for any purpose. It has only @@ -76,10 +76,10 @@ byte coor; /* * Define the port addresses of some VGA registers. */ -#define CRTC_ADDR 0x3d4 /* Base port of the CRT Controller (color) */ +#define CRTC_ADDR 0x3d4 /* Base port of the CRT Controller (color) */ -#define SEQU_ADDR 0x3c4 /* Base port of the Sequencer */ -#define GRAC_ADDR 0x3ce /* Base port of the Graphics Controller */ +#define SEQU_ADDR 0x3c4 /* Base port of the Sequencer */ +#define GRAC_ADDR 0x3ce /* Base port of the Graphics Controller */ #define STATUS_ADDR 0x3DA unsigned char *RowsX[600]; @@ -112,48 +112,48 @@ unsigned actStart, visStart; /* * set320x200x256_X() - * sets mode 13h, then turns it into an unchained (planar), 4-page - * 320x200x256 mode. + * sets mode 13h, then turns it into an unchained (planar), 4-page + * 320x200x256 mode. */ void set320x200x256_X(void) - { - union REGS r; + { + union REGS r; - /* Set VGA BIOS mode 13h: */ - r.x.ax = 0x0013; - int86(0x10, &r, &r); + /* Set VGA BIOS mode 13h: */ + r.x.ax = 0x0013; + int86(0x10, &r, &r); - /* Turn off the Chain-4 bit (bit 3 at index 4, port 0x3c4): */ - outpw(SEQU_ADDR, 0x0604); + /* Turn off the Chain-4 bit (bit 3 at index 4, port 0x3c4): */ + outpw(SEQU_ADDR, 0x0604); - /* Turn off word mode, by setting the Mode Control register - of the CRT Controller (index 0x17, port 0x3d4): */ - outpw(CRTC_ADDR, 0xE317); + /* Turn off word mode, by setting the Mode Control register + of the CRT Controller (index 0x17, port 0x3d4): */ + outpw(CRTC_ADDR, 0xE317); - /* Turn off doubleword mode, by setting the Underline Location - register (index 0x14, port 0x3d4): */ - outpw(CRTC_ADDR, 0x0014); + /* Turn off doubleword mode, by setting the Underline Location + register (index 0x14, port 0x3d4): */ + outpw(CRTC_ADDR, 0x0014); - /* Clear entire video memory, by selecting all four planes, then - writing 0 to entire segment. */ - outpw(SEQU_ADDR, 0x0F02); - memset(vga+1, 0, 0xffff); /* stupid size_t exactly 1 too small */ - vga[0] = 0; + /* Clear entire video memory, by selecting all four planes, then + writing 0 to entire segment. */ + outpw(SEQU_ADDR, 0x0F02); + memset(vga+1, 0, 0xffff); /* stupid size_t exactly 1 too small */ + vga[0] = 0; - /* Update the global variables to reflect dimensions of this - mode. This is needed by most future drawing operations. */ - width = 320; - height = 200; + /* Update the global variables to reflect dimensions of this + mode. This is needed by most future drawing operations. */ + width = 320; + height = 200; - /* Each byte addresses four pixels, so the width of a scan line - in *bytes* is one fourth of the number of pixels on a line. */ - widthBytes = width / 4; + /* Each byte addresses four pixels, so the width of a scan line + in *bytes* is one fourth of the number of pixels on a line. */ + widthBytes = width / 4; - /* By default we want screen refreshing and drawing operations - to be based at offset 0 in the video segment. */ - actStart = visStart = 0; + /* By default we want screen refreshing and drawing operations + to be based at offset 0 in the video segment. */ + actStart = visStart = 0; - /* + /* -------------------- HORIZONTAL SCROLLING -------------------- @@ -191,16 +191,17 @@ OUT value TO PORT 3C0H (where "value" is the ----------------------------------------------- */ - } +//mxSetVirtualScreen(480,360); + } /* * setActiveStart() tells our graphics operations which address in video * memory should be considered the top left corner. */ void setActiveStart(unsigned offset) - { - actStart = offset; - } + { + actStart = offset; + } /* * setVisibleStart() tells the VGA from which byte to fetch the first @@ -211,13 +212,13 @@ void setActiveStart(unsigned offset) * set, but before the low byte is set, which produces a bad flicker. */ void setVisibleStart(unsigned offset) - { - visStart = offset; - outpw(CRTC_ADDR, 0x0C); /* set high byte */ - outpw(CRTC_ADDR+1, visStart >> 8); - outpw(CRTC_ADDR, 0x0D); /* set low byte */ - outpw(CRTC_ADDR+1, visStart & 0xff); - } + { + visStart = offset; + outpw(CRTC_ADDR, 0x0C); /* set high byte */ + outpw(CRTC_ADDR+1, visStart >> 8); + outpw(CRTC_ADDR, 0x0D); /* set low byte */ + outpw(CRTC_ADDR+1, visStart & 0xff); + } /* * setXXXPage() sets the specified page by multiplying the page number @@ -226,200 +227,130 @@ void setVisibleStart(unsigned offset) * function. The first page is number 0. */ void setActivePage(int page) - { - setActiveStart(page * widthBytes * height); - } + { + setActiveStart(page * widthBytes * height); + } void setVisiblePage(int page) - { - setVisibleStart(page * widthBytes * height); - } + { + setVisibleStart(page * widthBytes * height); + } void putPixel_X(int x, int y, byte color) - { - /* Each address accesses four neighboring pixels, so set - Write Plane Enable according to which pixel we want - to modify. The plane is determined by the two least - significant bits of the x-coordinate: */ - outp(0x3c4, 0x02); - outp(0x3c5, 0x01 << (x & 3)); - - /* The offset of the pixel into the video segment is - offset = (width * y + x) / 4, and write the given - color to the plane we selected above. Heed the active - page start selection. */ - vga[(unsigned)(widthBytes * y) + (x / 4) + actStart] = color; - - } + { + /* Each address accesses four neighboring pixels, so set + Write Plane Enable according to which pixel we want + to modify. The plane is determined by the two least + significant bits of the x-coordinate: */ + outp(0x3c4, 0x02); + outp(0x3c5, 0x01 << (x & 3)); + + /* The offset of the pixel into the video segment is + offset = (width * y + x) / 4, and write the given + color to the plane we selected above. Heed the active + page start selection. */ + vga[(unsigned)(widthBytes * y) + (x / 4) + actStart] = color; + + } byte getPixel_X(int x, int y) - { - /* Select the plane from which we must read the pixel color: */ - outpw(GRAC_ADDR, 0x04); - outpw(GRAC_ADDR+1, x & 3); + { + /* Select the plane from which we must read the pixel color: */ + outpw(GRAC_ADDR, 0x04); + outpw(GRAC_ADDR+1, x & 3); - return vga[(unsigned)(widthBytes * y) + (x / 4) + actStart]; + return vga[(unsigned)(widthBytes * y) + (x / 4) + actStart]; - } + } void set320x240x256_X(void) - { - /* Set the unchained version of mode 13h: */ - set320x200x256_X(); - - /* Modify the vertical sync polarity bits in the Misc. Output - Register to achieve square aspect ratio: */ - outp(0x3C2, 0xE3); - - /* Modify the vertical timing registers to reflect the increased - vertical resolution, and to center the image as good as - possible: */ - outpw(0x3D4, 0x2C11); /* turn off write protect */ - outpw(0x3D4, 0x0D06); /* vertical total */ - outpw(0x3D4, 0x3E07); /* overflow register */ - outpw(0x3D4, 0xEA10); /* vertical retrace start */ - outpw(0x3D4, 0xAC11); /* vertical retrace end AND wr.prot */ - outpw(0x3D4, 0xDF12); /* vertical display enable end */ - outpw(0x3D4, 0xE715); /* start vertical blanking */ - outpw(0x3D4, 0x0616); /* end vertical blanking */ - - /* Update mode info, so future operations are aware of the - resolution */ - height = 240; - -//#pragma aux mxSetVirtualScreen "_" -//void mxSetVirtualScreen(unsigned short int width, unsigned short int height); -mxSetVirtualScreen(480,360); - } + { + /* Set the unchained version of mode 13h: */ + set320x200x256_X(); + + /* Modify the vertical sync polarity bits in the Misc. Output + Register to achieve square aspect ratio: */ + outp(0x3C2, 0xE3); + + /* Modify the vertical timing registers to reflect the increased + vertical resolution, and to center the image as good as + possible: */ + outpw(0x3D4, 0x2C11); /* turn off write protect */ + outpw(0x3D4, 0x0D06); /* vertical total */ + outpw(0x3D4, 0x3E07); /* overflow register */ + outpw(0x3D4, 0xEA10); /* vertical retrace start */ + outpw(0x3D4, 0xAC11); /* vertical retrace end AND wr.prot */ + outpw(0x3D4, 0xDF12); /* vertical display enable end */ + outpw(0x3D4, 0xE715); /* start vertical blanking */ + outpw(0x3D4, 0x0616); /* end vertical blanking */ + + /* Update mode info, so future operations are aware of the + resolution */ + height = 240; + + } /*-----------XXXX-------------*/ ///////////////////////////////////////////////////////////////////////////// -// // -// WaitRetrace() - This waits until you are in a Verticle Retrace. // -// // +// // +// WaitRetrace() - This waits until you are in a Verticle Retrace. // +// // ///////////////////////////////////////////////////////////////////////////// void wait_for_retrace(void) { while (!(inp(STATUS_ADDR) & 0x08)); } -///////////////////////////////////////////////////////////////////////////// -// // -// MoveTo() - This moves to position X*4 on a chain 4 screen. // -// Note: As soon as I find documentation, this function // -// will be better documented. - Snowman // -// // -///////////////////////////////////////////////////////////////////////////// -/* -void MoveTo (word X, word Y) { - -// word O = Y*SIZE*2+X; - word O = Y*widthBytes*2+X; - - asm { - mov bx, [O] - mov ah, bh - mov al, 0x0C - - mov dx, 0x3D4 - out dx, ax - - mov ah, bl - mov al, 0x0D - mov dx, 0x3D4 - out dx, ax - } - -} - -//Procedure Play; -void Play() -{ - int loop1,loop2; - int xpos,ypos,xdir,ydir; - //int ch; -// for(loop1=1;loop1<=62;loop1++) - //Pal ((char)loop1,(char)loop1,(char)0,(char)(62-loop1)); // { This sets up the pallette for the pic } - - moveto(0,0,Size); // { This moves the view to the top left hand corner } - -// for(loop1=0;loop1<=3;loop1++) -// for(loop2=0;loop2<=5;loop2++) -// Putpic (loop1*160,loop2*66); // { This places the picture all over the - // chain-4 screen } -// getch(); -// ch=0x0; -// xpos=rand (78)+1; -// ypos=rand (198)+1; // { Random start positions for the view } - xpos=0; - ypos=0; - xdir=1; - ydir=1; -// while(1) -// { - WaitRetrace(); // { Take this out and watch the screen go crazy! } - moveto (xpos,ypos,Size); - xpos=xpos+xdir; - ypos=ypos+ydir; - if( (xpos>79) || (xpos<1))xdir=-xdir; - if( (ypos>199) || (ypos<1))ydir=-ydir; // { Hit a boundry, change - // direction! } -// if(_bios_keybrd(_KEYBRD_READY))ch=getch(); -// if(ch==0x71)break; // 'q' -// if(ch==0x1b)break; // 'ESC' -// } -} -*/ /*tile*/ //king_crimson's code void putColorBox_X(int x, int y, int w, int h, byte color) { - outp(0x3c4, 0x02); - - int curx, cury; - unsigned drawptr; - for (curx=x; curx<(x+w); curx++) { - outp(0x3c5, 0x01 << (curx & 3)); - drawptr = (unsigned)(widthBytes * y) + (curx / 4) + actStart; - for (cury=0; cury0) - boingy=1; - - for(int ti=0;ti0) + boingy=1; + + for(int ti=0;ti> 2); - outp(0x3D4, Cols); - //setVisibleStart(visStart + (Cols * height)); - setVisibleStart(visStart + (Cols * width)); + wait_for_retrace(); + outp(0x3C0, 0x13); + outp(0x3C0, Cols & 3); + outp(0x3D4, 0x13); + outp(0x3D5, Cols >> 2); + outp(0x3D4, Cols); + //setVisibleStart(visStart + (Cols * height)); + setVisibleStart(visStart + (Cols * width)); } /*To implement smooth horizontal scrolling, you would do the following: @@ -463,29 +394,29 @@ so we can draw off the edge of the screen. Perhaps a little diagram will clarify it. The following picture is of a standard X-mode addressing scheme with the OFFSET register set to 80. - ROW OFFSET - 0 0 ======================== - 1 80 [ ] - 2 160 [ ] - .. .. [ VISIBLE ] - [ SCREEN ] - [ ] - [ ] - .. .. [ ] - 199 15920 ======================== + ROW OFFSET + 0 0 ======================== + 1 80 [ ] + 2 160 [ ] + .. .. [ VISIBLE ] + [ SCREEN ] + [ ] + [ ] + .. .. [ ] + 199 15920 ======================== and the next diagram is of a modified addressing scheme with the OFFSET register set to 82 (to give us 4 extra pixels on each side of the screen) ROW OFFSET -0 0 ------========================------ -1 82 | V [ ] V | -2 164 | I [ ] I | -.. .. | N S [ VISIBLE ] N S | - | O I [ SCREEN ] O I | - | T B [ ] T B | - | L [ ] L | -.. .. | E [ ] E | +0 0 ------========================------ +1 82 | V [ ] V | +2 164 | I [ ] I | +.. .. | N S [ VISIBLE ] N S | + | O I [ SCREEN ] O I | + | T B [ ] T B | + | L [ ] L | +.. .. | E [ ] E | 199 16318 ------========================------ Beautiful!!! @@ -519,297 +450,306 @@ I'm sorry about this being so confusing but it's a bit difficult to explain. */ int loadfontX(char *fname) { - FILE *fp; + FILE *fp; - fp = fopen(fname, "rb"); + fp = fopen(fname, "rb"); - if (fp == NULL) { - return 0; - } else { - fread(Xfont, 8, 256, fp); - fclose(fp); - return 1; - } + if (fp == NULL) { + return 0; + } else { + fread(Xfont, 8, 256, fp); + fclose(fp); + return 1; + } } void putchX(cord x, cord y, char c, byte color) { - int i; - byte *vga_ptr; - byte *font_ptr; - byte temp; - - // 8x8 font - vga_ptr = RowsX[y << 3] + (x << 1) + actStart; - write_plane = -1; - - font_ptr = Xfont + (c << 3); - - i=8; - while (i--) { - temp = *font_ptr++; - outpw(SEQU_ADDR, text_mask[temp & 0x0F]); - *vga_ptr++ = color; - - outpw(SEQU_ADDR, text_mask[temp >> 4]); - *vga_ptr-- = color; - vga_ptr += widthBytes; - } + int i; + byte *vga_ptr; + byte *font_ptr; + byte temp; + + // 8x8 font + vga_ptr = RowsX[y << 3] + (x << 1) + actStart; + write_plane = -1; + + font_ptr = Xfont + (c << 3); + + i=8; + while (i--) { + temp = *font_ptr++; + outpw(SEQU_ADDR, text_mask[temp & 0x0F]); + *vga_ptr++ = color; + + outpw(SEQU_ADDR, text_mask[temp >> 4]); + *vga_ptr-- = color; + vga_ptr += widthBytes; + } } void putstringX(cord x, cord y, char *str, byte color) { - int i, skip; - byte *vga_ptr; - byte *font_ptr; - byte c, temp; + int i, skip; + byte *vga_ptr; + byte *font_ptr; + byte c, temp; - // 8x8 font - vga_ptr = RowsX[y << 3] + (x << 1) + actStart; - write_plane = -1; + // 8x8 font + vga_ptr = RowsX[y << 3] + (x << 1) + actStart; + write_plane = -1; - skip = 2 - (widthBytes << 3); + skip = 2 - (widthBytes << 3); - while (c = *str++) { - font_ptr = Xfont + (c << 3); + while (c = *str++) { + font_ptr = Xfont + (c << 3); - i=8; - while (i--) { - temp = *font_ptr++; - outpw(SEQU_ADDR, text_mask[temp & 0x0F]); - *vga_ptr++ = color; + i=8; + while (i--) { + temp = *font_ptr++; + outpw(SEQU_ADDR, text_mask[temp & 0x0F]); + *vga_ptr++ = color; - outpw(SEQU_ADDR, text_mask[temp >> 4]); - *vga_ptr-- = color; - vga_ptr += widthBytes; - } + outpw(SEQU_ADDR, text_mask[temp >> 4]); + *vga_ptr-- = color; + vga_ptr += widthBytes; + } - vga_ptr += skip; - } + vga_ptr += skip; + } } ///////////////////////////////////////////////////////////////////////////// -// // -// setvideo() - This function Manages the video modes // -// // +// // +// setvideo() - This function Manages the video modes // +// // ///////////////////////////////////////////////////////////////////////////// void setvideo(/*byte mode, */int vq){ - union REGS in, out; - - if(!vq){ // deinit the video - // change to the video mode we were in before we switched to mode 13h - in.h.ah = 0x00; - in.h.al = old_mode; - int86(0x10, &in, &out); - - }else if(vq == 1){ // init the video - // get old video mode - in.h.ah = 0xf; - int86(0x10, &in, &out); - old_mode = out.h.al; - - // enter mode - set320x240x256_X(); - } + union REGS in, out; + + if(!vq){ // deinit the video + // change to the video mode we were in before we switched to mode 13h + //mxSetMode( MX_TEXT ); + //mxTerm(); + in.h.ah = 0x00; + in.h.al = old_mode; + int86(0x10, &in, &out); + + }else if(vq == 1){ // init the video + // get old video mode + in.h.ah = 0xf; + int86(0x10, &in, &out); + old_mode = out.h.al; + + // enter mode + //mxInit(); + //mxSetMode( MX_320x200 ); + //mxSetVirtualScreen( 640, 400 ); + set320x240x256_X(); + //mxSetMode(MX_320x240); + //mxSetVirtualScreen(560,420); + //mxSetVirtualScreen((640-TILEWH),(480-TILEWH)); + //mxSetClip( TRUE ); + } } ///////////////////////////////////////////////////////////////////////////// -// // +// // // cls() - This clears the screen to the specified color, on the VGA or on // -// the Virtual screen. // -// // +// the Virtual screen. // +// // ///////////////////////////////////////////////////////////////////////////// void cls(byte color, byte *Where){ - _fmemset(Where, color, width*(height*17)); + _fmemset(Where, color, width*(height*17)); } //color ‚Ä‚·‚Æ int colortest(){ - if(gq < NUM_COLORS){ - cls(gq, vga); - gq++; - }else gq = 0; - return gq; + if(gq < NUM_COLORS){ + cls(gq, vga); + gq++; + }else gq = 0; + return gq; } //color ‚Ä‚·‚Æ int colorz(){ - if(gq < HGQ){ -//---- cls(gq, vaddr); - cls(gq, vga); - gq++; - }else gq = LGQ; - return gq; + if(gq < HGQ){ +//---- cls(gq, vaddr); + cls(gq, vga); + gq++; + }else gq = LGQ; + return gq; } //slow spectrum down void ssd(int svq){ - if(sy < height+1){ - if(sx < width+1){ - //plotpixel(xx, yy, coor, vga); - //ppf(sx, sy, coor, vga); - putPixel_X(sx, sy, coor); - //printf("%d %d %d %d\n", sx, sy, svq, coor); - sx++; - }else sx = 0; - if(sx == width){ - sy++; - if(svq == 7) coor++; - if(sy == height && svq == 8) coor = rand()%NUM_COLORS; - } - }else sy = 0; + if(sy < height+1){ + if(sx < width+1){ + //plotpixel(xx, yy, coor, vga); + //ppf(sx, sy, coor, vga); + putPixel_X(sx, sy, coor); + //printf("%d %d %d %d\n", sx, sy, svq, coor); + sx++; + }else sx = 0; + if(sx == width){ + sy++; + if(svq == 7) coor++; + if(sy == height && svq == 8) coor = rand()%NUM_COLORS; + } + }else sy = 0; } /*-----------ding-------------*/ int ding(int q){ -// if(yy0){ - yy++; - d3y--; - } - } - if(bakax<0){ - xx--; - }else - if(bakax>0){ - xx++; - } - }else{ - if(q==16) - { - if(!bakax){ - xx--;//=TILEWH; - }else if(bakax>0){ - xx++;//=TILEWH; - } - if(!bakay){ - yy--;//=TILEWH; - }else if(bakay>0){ - yy++;//=TILEWH; - } - }else{ - if(!bakax){ -// xx-=TILEWH; - xx--; - }else if(bakax>1){ -// xx+=TILEWH; - xx++; - } - if(!bakay){ -// yy-=TILEWH; - yy--; - }else if(bakay>1){ -// yy+=TILEWH; - yy++; - } - } - } - // fixer -// if(q!=16){ + if((q == 2 + ||q==4 + ||q==16 + ) && gq == BONK){ + if(coor < HGQ && coor < LGQ) coor = LGQ; + if(coor < HGQ-1){ + coor++; + }else{ coor = LGQ; + bakax = rand()%3; bakay = rand()%3; + } + } + + if(q==8){ colorz(); return gq; }else + if(q==10){ ssd(q); /*printf("%d\n", coor);*/ }else + if(q==5){ colortest(); return gq; }else + if(q==11){ colorz(); delay(100); return gq; } + if(q==6){ + coor = rand()%NUM_COLORS; +//---- cls(coor, vaddr); + cls(coor, vga); + //updatevbuff(); + } + + if(q==7||q==9){ + if(gq < HGQ){ + if(q == 7) ssd(q); + if(q == 9){ ssd(q); coor++; } + gq++; + }else gq = LGQ; + } + if((q<5 && gq0){ + yy++; + d3y--; + } + } + if(bakax<0){ + xx--; + }else + if(bakax>0){ + xx++; + } + }else{ + if(q==16) + { + if(!bakax){ + xx--; + }else if(bakax>0){ + xx++; + } + if(!bakay){ + yy--; + }else if(bakay>0){ + yy++; + } + }else{ + if(!bakax){ + xx-=TILEWH; +// xx--; + }else if(bakax>1){ + xx+=TILEWH; +// xx++; + } + if(!bakay){ + yy-=TILEWH; +// yy--; + }else if(bakay>1){ + yy+=TILEWH; +// yy++; + } + } + } + // fixer +// if(q!=16){ //if(q!=16) -// if(xx<(0/*-(TILEWH/2)*/)) xx=(width/*+(TILEWH)*/); - if(yy<0) yy=(height*3); -// if(xx>(width/*+(TILEWH)*/)) xx=(0/*-(TILEWH/2)*/); - if(yy>(height*3)) yy=0; -// } +// if(xx<0) xx=(width-TILEWH); +// if(yy<0) yy=(height-TILEWH); +// if(xx>(width-TILEWH)) xx=0; +// if(yy>(height-TILEWH)) yy=0; +// } //interesting effects - if(q==16) - { - int tx=0,ty=0; - tx+=xx+16; - ty+=yy+16; - putPixel_X(tx, ty, coor); - //drawrect(tx, ty, tx+TILEWH, ty+TILEWH, coor); - //printf("%d %d %d %d %d %d\n", xx, yy, tx, ty, TILEWH); - - // plot the pixel -//---- ppf(xx, yy, coor, vga); - }else /*if(xx>=0 && xx=0 && yy<(height*3))*/{ -// putColorBox_X(xx, yy, TILEWH, TILEWH, coor); + if(q==16) + { + int tx=0,ty=0; + tx+=xx+16; + ty+=yy+16; + putPixel_X(tx, ty, coor); + //drawrect(tx, ty, tx+TILEWH, ty+TILEWH, coor); + //printf("%d %d %d %d %d %d\n", xx, yy, tx, ty, TILEWH); + + // plot the pixel +//---- ppf(xx, yy, coor, vga); + }else /*if(xx>=0 && xx=0 && yy<(height*3))*/{ + putColorBox_X(xx, yy, TILEWH, TILEWH, coor); //++++0000 - putPixel_X(xx, yy, coor); - } +// putPixel_X(xx, yy, coor); + } -//---- if(q==2) ppf(rand()%, rand()%height, 0, vga); -// if(q==2) putColorBox_X(rand()%width, rand()%(height*3), TILEWH, TILEWH, 0); +//---- if(q==2) ppf(rand()%, rand()%height, 0, vga); +// if(q==2) putColorBox_X(rand()%width, rand()%(height*3), TILEWH, TILEWH, 0); //++++0000 - if(q==2) putPixel_X(rand()%width, rand()%(height*3), 0); - if(q==16) putPixel_X(rand()%width, rand()%(height*3), 0); - if(q==2||q==4||q==16){ bakax = rand()%3; bakay = rand()%3; } - gq++; + if(q==2) putPixel_X(rand()%width, rand()%(height*3), 0); + if(q==16) putPixel_X(rand()%width, rand()%(height*3), 0); + if(q==2||q==4||q==16){ bakax = rand()%3; bakay = rand()%3; } + gq++; //if(xx<0||xx>320||yy<0||yy>(height*3)) -// printf("%d %d %d %d %d %d\n", xx, yy, coor, bakax, bakay, getPixel_X(xx,yy)); -// printf("%d\n", getPixel_X(xx,yy)); +// printf("%d %d %d %d %d %d\n", xx, yy, coor, bakax, bakay, getPixel_X(xx,yy)); +// printf("%d\n", getPixel_X(xx,yy)); //0000 -// drawText(0, 0, 15, getPixel_X(xx,yy)); - }else gq = LGQ; - return gq; +// drawText(0, 0, 15, getPixel_X(xx,yy)); + }else gq = LGQ; + return gq; } @@ -824,124 +764,134 @@ int ding(int q){ #include void doTest(void) - { - int p, x, y, pages; - - /* This is the way to calculate the number of pages available. */ - pages = 65536L/(widthBytes*height); // apparently this takes the A000 address -// if(height==240) pages++; - -// printf("%d\n", pages); - - for (p = 0; p <= pages; ++p) - { - setActivePage(p); - - /* On each page draw a single colored border, and dump the palette - onto a small square about the middle of the page. */ - - //{ - for (x = 0; x <= width; ++x) - { - putPixel_X(x, 0, p+1); - if(p!=pages) putPixel_X(x, height-1, p+1); - else if(height==240) putPixel_X(x, 99-1, p+1); - } - - for (y = 0; y <= height; ++y) - { - putPixel_X(0, y, p+1); - if(p!=pages) putPixel_X(width-1, y, p+1); - else if(height==240) putPixel_X(width-1, y, p+1); - } - - for (x = 0; x < TILEWH; ++x) - for (y = 0; y < TILEWH; ++y) - putPixel_X(x+(p+2)*16, y+(p+2)*TILEWH, x + y*TILEWH); - //} - - } - - /* Each pages will now contain a different image. Let the user cycle - through all the pages by pressing a key. */ - for (p = 0; p < pages; ++p) - { - setVisiblePage(p); - getch(); - } - - } + { + int p, x, y, pages; + + /* This is the way to calculate the number of pages available. */ + pages = 65536L/(widthBytes*height); // apparently this takes the A000 address +// if(height==240) pages++; + +// printf("%d\n", pages); + + for (p = 0; p <= pages; ++p) + { + setActivePage(p); + + /* On each page draw a single colored border, and dump the palette + onto a small square about the middle of the page. */ + + //{ + for (x = 0; x <= width; ++x) + { + putPixel_X(x, 0, p+1); + if(p!=pages) putPixel_X(x, height-1, p+1); + else if(height==240) putPixel_X(x, 99-1, p+1); + } + + for (y = 0; y <= height; ++y) + { + putPixel_X(0, y, p+1); + if(p!=pages) putPixel_X(width-1, y, p+1); + else if(height==240) putPixel_X(width-1, y, p+1); + } + + for (x = 0; x < TILEWH; ++x) + for (y = 0; y < TILEWH; ++y) + putPixel_X(x+(p+2)*16, y+(p+2)*TILEWH, x + y*TILEWH); + //} + + } + + /* Each pages will now contain a different image. Let the user cycle + through all the pages by pressing a key. */ + for (p = 0; p < pages; ++p) + { + setVisiblePage(p); + getch(); + } + + } /* * Library test (program) entry point. */ int main(void) - { - int key,d; - //short int temp; - // main variables - d=1; // switch variable - key=4; // default screensaver number -// puts("First, have a look at the 320x200 mode. I will draw some rubbish"); -// puts("on all of the four pages, then let you cycle through them by"); -// puts("hitting a key on each page."); -// puts("Press a key when ready..."); -// getch(); - -// doTest(); - -// puts("Then, check out Mode X, 320x240 with 3 (and a half) pages."); -// puts("Press a key when ready..."); -// getch(); + { + int key,d,x,y; + //short int temp; + // main variables + d=1; // switch variable + key=4; // default screensaver number + x=0; + y=0; +// puts("First, have a look at the 320x200 mode. I will draw some rubbish"); +// puts("on all of the four pages, then let you cycle through them by"); +// puts("hitting a key on each page."); +// puts("Press a key when ready..."); +// getch(); + +// doTest(); + +// puts("Then, check out Mode X, 320x240 with 3 (and a half) pages."); +// puts("Press a key when ready..."); +// getch(); //++++0000 - setvideo(1); - /*temp = loadfontX("vga8x8.fnt"); + setvideo(1); + /*temp = loadfontX("vga8x8.fnt"); - if (temp) { - putstringX(0, 0, "bakapi!", 2); - } - getch();*/ + if (temp) { + putstringX(0, 0, "bakapi!", 2); + } + getch();*/ // screen savers /*while(d!=0){ // on! - if(!kbhit()){ // conditions of screen saver - ding(key); - }else{ - setvideo(0); - // user imput switch - printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 5 to quit.\n", getch()); // prompt the user - scanf("%d", &key); - //if(key==3){xx=yy=0;} // crazy screen saver wwww - if(key==5) d=0; - setvideo(1); - } - }*/ // else off - while(!kbhit()){ // conditions of screen saver - ding(4); - } - //end of screen savers - doTest(); -// getch(); - - while(!kbhit()){ // conditions of screen saver - hScroll(1); -// scrolly(1); -// vScroll(1); -// delay(100); -// Play(); - } -//++++0000 - setvideo(0); - printf("Resolution:\n[%d][%d]\n", width,height); -// setvideo(0); -//mxTerm(); - -// printf("[%d]\n", mxGetVersion()); - puts("where to next? It's your move! wwww"); - printf("bakapi ver. 1.04.09.03\nis made by sparky4i†ƒÖ…j feel free to use it ^^\nLicence: GPL v2\n"); - return 0; - } + if(!kbhit()){ // conditions of screen saver + ding(key); + }else{ + setvideo(0); + // user imput switch + printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 5 to quit.\n", getch()); // prompt the user + scanf("%d", &key); + //if(key==3){xx=yy=0;} // crazy screen saver wwww + if(key==5) d=0; + setvideo(1); + } + }*/ // else off + while(!kbhit()){ // conditions of screen saver + ding(4); + } + //end of screen savers + doTest(); +// getch(); + + while(!kbhit()){ // conditions of screen saver +// hScroll(1); +// scrolly(1); +// vScroll(1); +// delay(100); + /*mxSetVirtualScreen(320,240*2); + for(int i=0;i, " needs a 386 or better to run!" -; jmp @@jump -; ENDIF -;ENDM -END +.chk386 MACRO name, jump + IF USE386 EQ FALSE + .OUT "Warning: ", , " needs a 386 or better to run!" + jmp @@jump + ENDIF +ENDM diff --git a/16/lib/x/MODEX.H b/16/lib/x/MODEX.H index 71f3dcf7..2c1f1ebe 100644 --- a/16/lib/x/MODEX.H +++ b/16/lib/x/MODEX.H @@ -48,7 +48,7 @@ #define MXBOOL short int #define MXSINT short int #define MXUINT unsigned short int -#define MXAPI far __syscall +#define MXAPI far pascal #define MXPTR void far * // Functions diff --git a/16/lib/x/MODEX.LIB b/16/lib/x/MODEX.LIB index ea682c00..ec5c605c 100644 Binary files a/16/lib/x/MODEX.LIB and b/16/lib/x/MODEX.LIB differ diff --git a/16/lib/x/MODEX.OBJ b/16/lib/x/MODEX.OBJ deleted file mode 100644 index 7b72fdba..00000000 Binary files a/16/lib/x/MODEX.OBJ and /dev/null differ diff --git a/16/lib/x/MXBB.ASM b/16/lib/x/MXBB.ASM index 309c7908..ac6668ce 100644 --- a/16/lib/x/MXBB.ASM +++ b/16/lib/x/MXBB.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxBitBlt diff --git a/16/lib/x/MXBB.OBJ b/16/lib/x/MXBB.OBJ index 35d36a75..16df03e9 100644 Binary files a/16/lib/x/MXBB.OBJ and b/16/lib/x/MXBB.OBJ differ diff --git a/16/lib/x/MXCC.ASM b/16/lib/x/MXCC.ASM index 01f553c1..4f78adb9 100644 --- a/16/lib/x/MXCC.ASM +++ b/16/lib/x/MXCC.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC xsubClipLine diff --git a/16/lib/x/MXCC.OBJ b/16/lib/x/MXCC.OBJ index 2ac9ef72..fcb14b00 100644 Binary files a/16/lib/x/MXCC.OBJ and b/16/lib/x/MXCC.OBJ differ diff --git a/16/lib/x/MXCG.ASM b/16/lib/x/MXCG.ASM index 543d43cb..42163d7a 100644 --- a/16/lib/x/MXCG.ASM +++ b/16/lib/x/MXCG.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxColorToGray diff --git a/16/lib/x/MXCG.OBJ b/16/lib/x/MXCG.OBJ index 804cdb2a..86ea2df4 100644 Binary files a/16/lib/x/MXCG.OBJ and b/16/lib/x/MXCG.OBJ differ diff --git a/16/lib/x/MXCL.ASM b/16/lib/x/MXCL.ASM index e2c25360..aaa0bac3 100644 --- a/16/lib/x/MXCL.ASM +++ b/16/lib/x/MXCL.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxCircle diff --git a/16/lib/x/MXCL.OBJ b/16/lib/x/MXCL.OBJ index 3b9d8c63..30e27162 100644 Binary files a/16/lib/x/MXCL.OBJ and b/16/lib/x/MXCL.OBJ differ diff --git a/16/lib/x/MXCR.ASM b/16/lib/x/MXCR.ASM index eae529c7..ca1fa7bb 100644 --- a/16/lib/x/MXCR.ASM +++ b/16/lib/x/MXCR.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxSetSysClipRegion diff --git a/16/lib/x/MXCR.OBJ b/16/lib/x/MXCR.OBJ index 7493b937..d679f61e 100644 Binary files a/16/lib/x/MXCR.OBJ and b/16/lib/x/MXCR.OBJ differ diff --git a/16/lib/x/MXEL.ASM b/16/lib/x/MXEL.ASM index 03412721..2c9dda2a 100644 --- a/16/lib/x/MXEL.ASM +++ b/16/lib/x/MXEL.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxEllipse diff --git a/16/lib/x/MXEL.OBJ b/16/lib/x/MXEL.OBJ deleted file mode 100644 index 520971cb..00000000 Binary files a/16/lib/x/MXEL.OBJ and /dev/null differ diff --git a/16/lib/x/MXFB.ASM b/16/lib/x/MXFB.ASM index eaf29144..41ea5deb 100644 --- a/16/lib/x/MXFB.ASM +++ b/16/lib/x/MXFB.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxFillBox diff --git a/16/lib/x/MXFB.OBJ b/16/lib/x/MXFB.OBJ index 5474062f..3a1d69aa 100644 Binary files a/16/lib/x/MXFB.OBJ and b/16/lib/x/MXFB.OBJ differ diff --git a/16/lib/x/MXFP.ASM b/16/lib/x/MXFP.ASM index 2b00d2d3..8eea25be 100644 --- a/16/lib/x/MXFP.ASM +++ b/16/lib/x/MXFP.ASM @@ -5,7 +5,7 @@ ; Author: Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxFadePalette diff --git a/16/lib/x/MXFP.OBJ b/16/lib/x/MXFP.OBJ index bf2a4769..194fc0d1 100644 Binary files a/16/lib/x/MXFP.OBJ and b/16/lib/x/MXFP.OBJ differ diff --git a/16/lib/x/MXGC.ASM b/16/lib/x/MXGC.ASM index 91a9c875..85edf7a6 100644 --- a/16/lib/x/MXGC.ASM +++ b/16/lib/x/MXGC.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxGetColor diff --git a/16/lib/x/MXGC.OBJ b/16/lib/x/MXGC.OBJ index 3551d910..fd30cce0 100644 Binary files a/16/lib/x/MXGC.OBJ and b/16/lib/x/MXGC.OBJ differ diff --git a/16/lib/x/MXGI.ASM b/16/lib/x/MXGI.ASM index 9d7c4f87..7037d411 100644 --- a/16/lib/x/MXGI.ASM +++ b/16/lib/x/MXGI.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxGetImage diff --git a/16/lib/x/MXGI.OBJ b/16/lib/x/MXGI.OBJ index 023e9437..2c664a22 100644 Binary files a/16/lib/x/MXGI.OBJ and b/16/lib/x/MXGI.OBJ differ diff --git a/16/lib/x/MXGM.ASM b/16/lib/x/MXGM.ASM index 42702613..a67476a0 100644 --- a/16/lib/x/MXGM.ASM +++ b/16/lib/x/MXGM.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxGammaCorrect diff --git a/16/lib/x/MXGM.OBJ b/16/lib/x/MXGM.OBJ index 4236c96a..6973c922 100644 Binary files a/16/lib/x/MXGM.OBJ and b/16/lib/x/MXGM.OBJ differ diff --git a/16/lib/x/MXGP.ASM b/16/lib/x/MXGP.ASM index aa476494..6c143173 100644 --- a/16/lib/x/MXGP.ASM +++ b/16/lib/x/MXGP.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxGetPalette diff --git a/16/lib/x/MXGP.OBJ b/16/lib/x/MXGP.OBJ index e675df1b..b9d00483 100644 Binary files a/16/lib/x/MXGP.OBJ and b/16/lib/x/MXGP.OBJ differ diff --git a/16/lib/x/MXGV.ASM b/16/lib/x/MXGV.ASM index 3a69b894..2a54b1d0 100644 --- a/16/lib/x/MXGV.ASM +++ b/16/lib/x/MXGV.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxGetVersion diff --git a/16/lib/x/MXGV.OBJ b/16/lib/x/MXGV.OBJ index 5e82a43f..40569cd8 100644 Binary files a/16/lib/x/MXGV.OBJ and b/16/lib/x/MXGV.OBJ differ diff --git a/16/lib/x/MXHL.ASM b/16/lib/x/MXHL.ASM index 28a0fd1b..049a0566 100644 --- a/16/lib/x/MXHL.ASM +++ b/16/lib/x/MXHL.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC subHorizontalLineInfo diff --git a/16/lib/x/MXHL.OBJ b/16/lib/x/MXHL.OBJ index b7e250c3..1574a952 100644 Binary files a/16/lib/x/MXHL.OBJ and b/16/lib/x/MXHL.OBJ differ diff --git a/16/lib/x/MXIT.ASM b/16/lib/x/MXIT.ASM index 8f1006dd..c0d9cedd 100644 --- a/16/lib/x/MXIT.ASM +++ b/16/lib/x/MXIT.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxInit diff --git a/16/lib/x/MXIT.OBJ b/16/lib/x/MXIT.OBJ index 4ab3ea92..a41c8564 100644 Binary files a/16/lib/x/MXIT.OBJ and b/16/lib/x/MXIT.OBJ differ diff --git a/16/lib/x/MXLL.ASM b/16/lib/x/MXLL.ASM index 6a69e29c..34fec043 100644 --- a/16/lib/x/MXLL.ASM +++ b/16/lib/x/MXLL.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxLoadLatches diff --git a/16/lib/x/MXLL.OBJ b/16/lib/x/MXLL.OBJ index b0c28167..554d5226 100644 Binary files a/16/lib/x/MXLL.OBJ and b/16/lib/x/MXLL.OBJ differ diff --git a/16/lib/x/MXLN.ASM b/16/lib/x/MXLN.ASM index 07a277fc..fbc4ab94 100644 --- a/16/lib/x/MXLN.ASM +++ b/16/lib/x/MXLN.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxLine diff --git a/16/lib/x/MXLN.OBJ b/16/lib/x/MXLN.OBJ index 2d34c427..d163b711 100644 Binary files a/16/lib/x/MXLN.OBJ and b/16/lib/x/MXLN.OBJ differ diff --git a/16/lib/x/MXOT.ASM b/16/lib/x/MXOT.ASM index 3440ffaf..62547665 100644 --- a/16/lib/x/MXOT.ASM +++ b/16/lib/x/MXOT.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES ; We use the reserved name 'WIDTH' +WARN PRO +NOWARN RES ; We use the reserved name 'WIDTH' INCLUDE MODEX.DEF PUBLIC mxOutChar diff --git a/16/lib/x/MXOT.OBJ b/16/lib/x/MXOT.OBJ index 482f5022..5330d8ad 100644 Binary files a/16/lib/x/MXOT.OBJ and b/16/lib/x/MXOT.OBJ differ diff --git a/16/lib/x/MXPB.ASM b/16/lib/x/MXPB.ASM index 170dca2d..8c6aa449 100644 --- a/16/lib/x/MXPB.ASM +++ b/16/lib/x/MXPB.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mx_ScanBuffer diff --git a/16/lib/x/MXPB.OBJ b/16/lib/x/MXPB.OBJ index 17e08ea6..f573e187 100644 Binary files a/16/lib/x/MXPB.OBJ and b/16/lib/x/MXPB.OBJ differ diff --git a/16/lib/x/MXPF.ASM b/16/lib/x/MXPF.ASM index f48077d4..db0da898 100644 --- a/16/lib/x/MXPF.ASM +++ b/16/lib/x/MXPF.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxFillPoly diff --git a/16/lib/x/MXPF.OBJ b/16/lib/x/MXPF.OBJ index 4063ea80..f2757767 100644 Binary files a/16/lib/x/MXPF.OBJ and b/16/lib/x/MXPF.OBJ differ diff --git a/16/lib/x/MXPG.ASM b/16/lib/x/MXPG.ASM index c77c7d45..caa7cf1b 100644 --- a/16/lib/x/MXPG.ASM +++ b/16/lib/x/MXPG.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxGouraudPoly diff --git a/16/lib/x/MXPG.OBJ b/16/lib/x/MXPG.OBJ index ed04544f..edb1615d 100644 Binary files a/16/lib/x/MXPG.OBJ and b/16/lib/x/MXPG.OBJ differ diff --git a/16/lib/x/MXPI.ASM b/16/lib/x/MXPI.ASM index 9e78bbd8..9e8525f5 100644 --- a/16/lib/x/MXPI.ASM +++ b/16/lib/x/MXPI.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxPutImage diff --git a/16/lib/x/MXPI.OBJ b/16/lib/x/MXPI.OBJ index 8f39897e..fc9eba54 100644 Binary files a/16/lib/x/MXPI.OBJ and b/16/lib/x/MXPI.OBJ differ diff --git a/16/lib/x/MXPN.ASM b/16/lib/x/MXPN.ASM index 03517655..eaaf61b4 100644 --- a/16/lib/x/MXPN.ASM +++ b/16/lib/x/MXPN.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxPan diff --git a/16/lib/x/MXPN.OBJ b/16/lib/x/MXPN.OBJ index 27da206d..acf3483f 100644 Binary files a/16/lib/x/MXPN.OBJ and b/16/lib/x/MXPN.OBJ differ diff --git a/16/lib/x/MXPP.ASM b/16/lib/x/MXPP.ASM index 37dbc345..fc1755a3 100644 --- a/16/lib/x/MXPP.ASM +++ b/16/lib/x/MXPP.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxGetPixel diff --git a/16/lib/x/MXPP.OBJ b/16/lib/x/MXPP.OBJ index b1831797..2dee3124 100644 Binary files a/16/lib/x/MXPP.OBJ and b/16/lib/x/MXPP.OBJ differ diff --git a/16/lib/x/MXPT.ASM b/16/lib/x/MXPT.ASM deleted file mode 100644 index bc184274..00000000 --- a/16/lib/x/MXPT.ASM +++ /dev/null @@ -1,829 +0,0 @@ -;----------------------------------------------------------- -; -; MXPT.ASM - Convex polygon fill with texture mapping -; Copyright (c) 1994 by Alessandro Scotti -; -;----------------------------------------------------------- -;WARN PRO -;NOWARN RES -INCLUDE MODEX.DEF - -PUBLIC mxTexturePoly - -;----------------------------------------------------------- -; -; "Local" definitions -; -TPOINT STRUC - X DW ? - Y DW ? -TPOINT ENDS - -; Do NOT change order! -TSCAN STRUC - Y1 DW ? - IX1 DW ? - IY1 DW ? - Y2 DW ? - IX2 DW ? - IY2 DW ? -TSCAN ENDS - -MAXSCANCOLUMNS EQU POLYSCANBUFSIZE / SIZE TSCAN - -MX_TEXT SEGMENT USE16 PARA PUBLIC 'CODE' - ASSUME cs:MX_TEXT, ds:NOTHING, es:NOTHING - -EXTRN mx_VideoSegment : WORD -EXTRN mx_CodeSegment : WORD -EXTRN mx_BytesPerLine : WORD -EXTRN mx_ClipX1 : WORD -EXTRN mx_ClipY1 : WORD -EXTRN mx_ClipX2 : WORD -EXTRN mx_ClipY2 : WORD -EXTRN mx_ScanBuffer : NEAR - -; Global variables, to optimize allocation of local space -mx_Texture DD ? -mx_TextureWidth DW ? -mx_XStepLo DW ? -mx_XStepHi DW ? -mx_XBump DW ? -mx_YStepLo DW ? -mx_YStepHi DW ? -mx_YBump DW ? -mx_TempX DW 512 DUP(?) -mx_TempY DW 512 DUP(?) - -;----------------------------------------------------------- -; -; Scans an edge using the DDA (digital differential analyzer) algorithm. -; Also saves information for the texture scanner. -; -; Input: -; DS:BX = pointer to start point (X1, Y1) -; DS:SI = pointer to end point (X2, Y2) -; ES:DI = pointer to edge buffer -; Output: -; ES:DI = updated pointer to edge buffer -; -subScan PROC NEAR - mov cx, ds:[si].X - sub cx, ds:[bx].X ; Get width - mov es:[di].IX1, cx ; Save width - jg @@1 - ret -@@1: - push bp ; Save BP - - mov ax, ds:[si].Y - mov bx, ds:[bx].Y - sub ax, bx ; Get height - jg @@T2B ; Scan top to bottom - jl @@B2T ; Scan bottom to top - -; Special case: vertical line - mov ax, bx -@@V: - mov es:[di].Y1, ax - add di, SIZE TSCAN - dec cx - jnz @@V - jmp @@Exit - -; Scan top to bottom -@@T2B: - cwd - div cx - mov bp, ax - xor ax, ax - div cx - xchg ax, bx ; BP:BX = fixed 16:16 step - mov dx, 8000h -@@T2BLoop: - mov es:[di].Y1, ax - add di, SIZE TSCAN - add dx, bx - adc ax, bp - dec cx - jnz @@T2BLoop - jmp @@Exit - -; Scan bottom to top -@@B2T: - neg ax - cwd - div cx - mov bp, ax - xor ax, ax - div cx - xchg ax, bx - mov dx, 8000h -@@B2TLoop: - mov es:[di].Y1, ax - add di, SIZE TSCAN - sub dx, bx - sbb ax, bp - dec cx - jnz @@B2TLoop - -@@Exit: - pop bp - ret -subScan ENDP - -;----------------------------------------------------------- -; -; Scans a texture edge. -; -; Input: -; DS:BX = pointer to start point (X1, Y1) -; DS:SI = pointer to end point (X2, Y2) -; ES:DI = pointer to edge buffer -; CX = number of steps -; Output: -; ES:DI = updated pointer to edge buffer -; -subScanTexture PROC NEAR - .push bp - .push di, bx, cx ; Save registers - mov ax, ds:[si].X ; Scan X coordinate first - mov bx, ds:[bx].X - sub ax, bx - jg @@XP ; Positive - jl @@XN ; Negative - -; Special case: constant -@@XCLoop: - mov es:[di].IX1, bx - add di, SIZE TSCAN - dec cx - jnz @@XCLoop - jmp @@ScanY - -; Increasing step -@@XP: - cwd - div cx - mov bp, ax - xor ax, ax - div cx - xchg ax, bx - mov dx, 8000h -@@XPLoop: - mov es:[di].IX1, ax - add di, SIZE TSCAN - add dx, bx - adc ax, bp - dec cx - jnz @@XPLoop - jmp @@ScanY - -; Decreasing step -@@XN: - neg ax - cwd - div cx - mov bp, ax - xor ax, ax - div cx - xchg ax, bx - mov dx, 8000h -@@XNLoop: - mov es:[di].IX1, ax - add di, SIZE TSCAN - sub dx, bx - sbb ax, bp - dec cx - jnz @@XNLoop - -; Now scan the Y coordinate -@@ScanY: - .pop di, bx, cx ; Restore registers - mov ax, ds:[si].Y - mov bx, ds:[bx].Y - sub ax, bx - jg @@YP ; Positive - jl @@YN ; Negative - -; Special case: constant - mov ax, cx -@@YCLoop: - mov es:[di].IY1, bx - add di, SIZE TSCAN - dec ax - jnz @@YCLoop - jmp @@Exit - -; Increasing step -@@YP: - cwd - div cx - mov bp, ax - xor ax, ax - div cx - xchg ax, bx - mov dx, 8000h -@@YPLoop: - mov es:[di].IY1, ax - add di, SIZE TSCAN - add dx, bx - adc ax, bp - dec cx - jnz @@YPLoop - jmp @@Exit - -; Decreasing step -@@YN: - neg ax - cwd - div cx - mov bp, ax - xor ax, ax - div cx - xchg ax, bx - mov dx, 8000h -@@YNLoop: - mov es:[di].IY1, ax - add di, SIZE TSCAN - sub dx, bx - sbb ax, bp - dec cx - jnz @@YNLoop - -@@Exit: - .pop bp - ret -subScanTexture ENDP - -;----------------------------------------------------------- -; -; Fills a scan column with texture. -; -; Input: -; DS:SI = current TSCAN -; ES:DI = address of top pixel -; CX = number of pixels to write -; Output: -; none -; Notes: -; must preserve DS:SI, texture info in global variables. -; -subFillScan PROC NEAR - ASSUME ds:NOTHING - .push ds, si, bp, cx - - movzx ecx, cx ; Clear high word of ECX - - movzx eax, ds:[si].IX2 - movzx ebx, ds:[si].IX1 - sub ax, bx - jge @@XP - -;--------------------------------------- -; Delta X is negative -@@XN: - neg ax ; Make AX positive - shl eax, 8 ; Convert 8:8 fixed to 16:16 - cdq - idiv ecx - ror eax, 16 - mov ebp, eax ; Save X step into EBP - - movzx eax, ds:[si].IY2 - movzx esi, ds:[si].IY1 - sub ax, si - jge @@XNYP - -;----------------------- -; DeltaX < 0, DeltaY < 0 -@@XNYN: - neg ax - shl eax, 8 - cdq - idiv ecx - ror eax, 16 - mov dx, [mx_TextureWidth] - mul dl - xchg eax, esi ; ESI = Y step - ror eax, 8 - mul dl - ror ebx, 8 - add bx, ax ; BX = start offset in texture - lds dx, [mx_Texture] - movzx edx, dx - add edx, ebx ; EDX = X step lo:texture offset - xchg edx, esi ; EDX = Y step -@@XNYNLoop: - dec cx - jl @@XNYNDone - movzx ax, ds:[si] - mov es:[di], al - add di, [mx_BytesPerLine] - sub esi, ebp - sbb si, 0 - sub si, dx - sub eax, edx - jnc @@XNYNLoop - sub si, [mx_TextureWidth] - jmp @@XNYNLoop -@@XNYNDone: - jmp @@Exit - -;----------------------- -; DeltaX < 0, DeltaY > 0 -@@XNYP: - shl eax, 8 - cdq - idiv ecx - ror eax, 16 - mov dx, [mx_TextureWidth] - mul dl - xchg eax, esi ; ESI = Y step - ror eax, 8 - mul dl - ror ebx, 8 - add bx, ax ; BX = start offset in texture - lds dx, [mx_Texture] - movzx edx, dx - add edx, ebx ; EDX = X step lo:texture offset - xchg edx, esi ; EDX = Y step -@@XNYPLoop: - dec cx - jl @@XNYPDone - movzx ax, ds:[si] - mov es:[di], al - add di, [mx_BytesPerLine] - sub esi, ebp - sbb si, 0 - add si, dx - add eax, edx - jnc @@XNYPLoop - add si, [mx_TextureWidth] - jmp @@XNYPLoop -@@XNYPDone: - jmp @@Exit - -;--------------------------------------- -; Delta X is positive -@@XP: - shl eax, 8 ; Convert 8:8 fixed to 16:16 - cdq - idiv ecx - ror eax, 16 - mov ebp, eax ; Save X step into EBP - - movzx eax, ds:[si].IY2 - movzx esi, ds:[si].IY1 - sub ax, si - jge @@XPYP - -;----------------------- -; DeltaX > 0, DeltaY < 0 -@@XPYN: - neg ax - shl eax, 8 - cdq - idiv ecx - ror eax, 16 - mov dx, [mx_TextureWidth] - mul dl - xchg eax, esi ; ESI = Y step - ror eax, 8 - mul dl - ror ebx, 8 - add bx, ax ; BX = start offset in texture - lds dx, [mx_Texture] - movzx edx, dx - add edx, ebx ; EDX = X step lo:texture offset - xchg edx, esi ; EDX = Y step -@@XPYNLoop: - dec cx - jl @@XPYNDone - movzx ax, ds:[si] - mov es:[di], al - add di, [mx_BytesPerLine] - add esi, ebp - adc si, 0 - sub si, dx - sub eax, edx - jnc @@XPYNLoop - sub si, [mx_TextureWidth] - jmp @@XPYNLoop -@@XPYNDone: - jmp @@Exit - -;----------------------- -; DeltaX > 0, DeltaY > 0 -@@XPYP: - shl eax, 8 - cdq - idiv ecx - ror eax, 16 - mov dx, [mx_TextureWidth] - mul dl - xchg eax, esi ; ESI = Y step - ror eax, 8 - mul dl - ror ebx, 8 - add bx, ax ; BX = start offset in texture - lds dx, [mx_Texture] - movzx edx, dx - add edx, ebx ; EDX = X step lo:texture offset - xchg edx, esi ; EDX = Y step -@@XPYPLoop: - dec cx - jl @@XPYPDone - movzx ax, ds:[si] - mov es:[di], al - add di, [mx_BytesPerLine] - add esi, ebp - adc si, 0 - add si, dx - add eax, edx - jnc @@XPYPLoop - add si, [mx_TextureWidth] - jmp @@XPYPLoop -@@XPYPDone: - jmp @@Exit - -@@Exit: - .pop ds, si, bp, cx - ASSUME ds:NOTHING - ret -subFillScan ENDP - -;----------------------------------------------------------- -; -; Fills a convex polygon with the specified color. -; Interpolates pixel colors using the Gouraud algorithm. -; -; Input: -; Count = number of vertexes -; Map = indexes of points and colors (integer) -; Points = array of points (integer X, Y coordinates) -; TPoints = array of points inside texture (fixed 8:8 coordinates) -; Texture = pointer to texture image -; TWidth = texture width in pixels -; Output: -; none -; Notes: -; vertexes must be in counterclockwise order, arrays are 0-based. -; -mxTexturePoly PROC FAR - ARG TWidth:WORD, \ - Texture:DWORD, \ - TPoints:DWORD, \ - Points:DWORD, \ - Map:DWORD, \ - Count:WORD = ARG_SIZE - LOCAL WritePlane:BYTE:2, \ - ScanOffsetT:WORD, \ - ScanOffsetB:WORD, \ - ScanCount:WORD, \ - Holder:WORD, \ - Height:WORD, \ - MinIdxT:WORD, \ - MinIdxB:WORD, \ - MaxIdx:WORD, \ - Width:WORD, \ - BoxX1:WORD, \ - BoxY1:WORD, \ - BoxX2:WORD, \ - BoxY2::WORD = AUTO_SIZE - .enter AUTO_SIZE - .push ds, si, es, di - ASSUME ds:NOTHING - -IF USE386 EQ FALSE - jmp @@Exit -ENDIF - -; Check that at least three vertexes are specified - mov cx, [Count] - cmp cx, 3 - jb @@Exit - -;------------------------------ -; Find bounding box for polygon - les di, [Map] ; Point to map table - lds si, [Points] ; Point to vertex array - mov [BoxX1], 32767 - mov [BoxX2], -32768 - mov [BoxY1], 32767 - mov [BoxY2], -32768 - - xor dx, dx -@@MinMaxLoop: - mov bx, es:[di] ; Get index of vertex - .shl bx, 2 ; Get offset in point array - add bx, si - -; Check X range -@@CheckMinX: - mov ax, ds:[bx].X ; Get X coordinate - cmp ax, [BoxX1] - jge @@CheckMaxX - mov [BoxX1], ax - mov [MinIdxT], dx - mov [MinIdxB], dx -@@CheckMaxX: - cmp ax, [BoxX2] - jle @@CheckMinY - mov [BoxX2], ax - mov [MaxIdx], dx - -; Check Y range -@@CheckMinY: - mov ax, ds:[bx].Y - cmp ax, [BoxY1] - jge @@CheckMaxY - mov [BoxY1], ax -@@CheckMaxY: - cmp ax, [BoxY2] - jle @@CheckDone - mov [BoxY2], ax - -; Repeat thru all points -@@CheckDone: - add di, 2 ; Next map entry - add dx, 2 - dec cx - jnz @@MinMaxLoop - -;--------------------------------- -; Check if polygon is full clipped - mov ax, [BoxX2] - cmp ax, [mx_ClipX1] ; Is poly full clipped? - jl @@Exit - mov bx, [BoxX1] - cmp bx, [mx_ClipX2] ; Is poly full clipped? - jg @@Exit - sub ax, bx ; Get width - jle @@Exit ; Exit if not positive - mov ax, [BoxY2] - cmp ax, [mx_ClipY1] ; Is poly full clipped? - jl @@Exit - mov bx, [BoxY1] - cmp bx, [mx_ClipY2] ; Is poly full clipped? - jg @@Exit - sub ax, bx ; Get height - jle @@Exit ; Exit if not positive - - dec [Count] - shl [Count], 1 ; We'll work with word offsets - -;---------------------- -; Scan top polygon edge - mov es, [mx_CodeSegment] - mov di, OFFSET mx_ScanBuffer - mov si, [MinIdxT] ; Offset of top point index -@@STLoop: - mov dx, si - lds bx, [Map] ; DS:BX -> map table - mov ax, ds:[bx+si] ; Index of top point #1 - dec si ; Next top point - dec si - test si, si - jns @@ST1 - mov si, [Count] -@@ST1: - mov [MinIdxT], si ; Save new index of bottom point - mov cx, si - mov si, ds:[bx+si] ; Get index of top point #2 - .shl ax, 2 ; Convert indexes to offsets - .shl si, 2 - shl cx, 1 ; Save map points - shl dx, 1 - mov dh, cl - mov es:[di].IY1, dx - lds bx, [Points] ; Get pointer to vertexes - add si, bx - add bx, ax - call subScan ; Scan poly top edge - mov si, [MinIdxT] - cmp si, [MaxIdx] ; Reached last vertex? - jne @@STLoop ; No, continue - mov es:[di].IX1, -1 ; Mark end of scan - -;------------------------- -; Scan bottom polygon edge - mov di, OFFSET mx_ScanBuffer + OFFSET Y2 - mov si, [MinIdxB] -@@SBLoop: - mov dx, si - lds bx, [Map] ; DS:BX -> map table - mov ax, ds:[bx+si] ; Index of bottom point #1 - inc si ; Next bottom point - inc si - cmp si, [Count] - jbe @@SB1 - xor si, si -@@SB1: - mov [MinIdxB], si ; Save new index of bottom point - mov cx, si - mov si, ds:[bx+si] ; Get index of bottom point #2 - .shl ax, 2 ; Convert indexes to offsets - .shl si, 2 - shl cx, 1 ; Save map points - shl dx, 1 - mov dh, cl - mov es:[di].IY1, dx - lds bx, [Points] ; Get pointer to vertexes - add si, bx - add bx, ax - call subScan ; Scan poly bottom edge - mov si, [MinIdxB] - cmp si, [MaxIdx] ; Reached last vertex? - jne @@SBLoop ; No, continue - mov es:[di].IX1, -1 ; Mark end of scan - -;---------------------- -; Scan top texture edge - mov di, OFFSET mx_ScanBuffer - mov ds, WORD PTR [TPoints][2] -@@TTLoop: - mov cx, es:[di].IX1 - test cx, cx - jle @@TTDone - mov ax, es:[di].IY1 - mov dl, ah - xor ah, ah - xor dh, dh - mov si, dx - mov bx, WORD PTR [TPoints][0] - add si, bx - add bx, ax - call subScanTexture ; Scan texture top edge - jmp @@TTLoop -@@TTDone: - -;------------------------- -; Scan bottom texture edge - mov di, OFFSET mx_ScanBuffer + OFFSET Y2 -@@TBLoop: - mov cx, es:[di].IX1 - test cx, cx - jle @@TBDone - mov ax, es:[di].IY1 - mov dl, ah - xor ah, ah - xor dh, dh - mov si, dx - mov bx, WORD PTR [TPoints][0] - add si, bx - add bx, ax - call subScanTexture ; Scan texture top edge - jmp @@TBLoop -@@TBDone: - -;-------------------- -; Clip left and right - mov si, OFFSET mx_ScanBuffer - mov ax, [BoxX1] - mov cx, [BoxX2] - sub cx, ax - mov bx, [mx_ClipX1] ; CX = bounding box width - sub bx, ax - jle @@ClipL1 ; No need to clip left - sub cx, bx - add ax, bx ; BoxX1 = mx_ClipX1 - mov [BoxX1], ax - .shl bx, 2 ; Warning!!! This is an hand-coded - add si, bx ; multiply by the size of TSCAN - shl bx, 1 - add si, bx -@@ClipL1: - mov bx, ax - add bx, cx ; Last scan column - sub bx, [mx_ClipX2] - jle @@ClipL2 ; No need to clip right - sub cx, bx ; Clip right -@@ClipL2: - test cx, cx ; Is clipped width positive? - jle @@Exit ; No, exit - mov [ScanCount], cx ; Save number of columns to draw - mov [ScanOffsetT], si ; Remember offset of (clipped) buffer - mov ds, [mx_CodeSegment] ; DS:SI -> scan buffer - -;------------------------------ -; Check if Y clipping is needed - mov ax, [BoxY1] - cmp ax, [mx_ClipY1] - jl @@ClipTB ; Need to clip top - mov ax, [BoxY2] - cmp ax, [mx_ClipY2] - jg @@ClipTB ; Need to clip bottom - jmp @@ClipYExit ; Skip Y clipping - -;-------------------- -; Clip top and bottom -@@ClipTB: - mov di, cx ; DI = scan count - inc di ; Increment count for pre-loop test - sub si, SIZE TSCAN -@@ClipYLoop: - dec di ; Any column left? - jz @@ClipYExit ; No, exit - add si, SIZE TSCAN - mov ax, ds:[si].Y1 ; Y1 - mov cx, ds:[si].Y2 ; Y2 - mov dx, [mx_ClipY2] - cmp ax, dx ; Full clipped? - jg @@ClipYClip ; Yes, skip this column - cmp cx, dx ; Need to clip bottom? - jle @@ClipY1 ; No, continue -; Clip bottom, update texture too - mov ds:[si].Y2, dx - mov bx, cx - sub bx, dx ; Number of pixels to clip - sub cx, ax ; Height - jle @@ClipYClip - mov ax, ds:[si].IX1 ; Update texture - sub ax, ds:[si].IX2 - imul bx - idiv cx - add ds:[si].IX2, ax - mov ax, ds:[si].IY1 - sub ax, ds:[si].IY2 - imul bx - idiv cx - add ds:[si].IY2, ax - mov ax, ds:[si].Y1 ; Reload coordinates - mov cx, ds:[si].Y2 ; -@@ClipY1: - mov dx, [mx_ClipY1] - cmp cx, dx ; Full top clipped? - jl @@ClipYClip ; Yes, skip - sub cx, ax ; Get height - jle @@ClipYClip ; Skip if not positive - cmp ax, dx ; Need to clip top? - jge @@ClipYLoop ; No, continue -; Clip top, update texture too - mov ds:[si].Y1, dx ; Y1 = mx_ClipY1 - sub dx, ax ; DX = number of pixels clipped - cmp cx, dx - jbe @@ClipYClip ; Full clipped, skip - mov bx, dx ; Save pixel count - mov ax, ds:[si].IX2 - sub ax, ds:[si].IX1 - imul bx - idiv cx - add ds:[si].IX1, ax - mov ax, ds:[si].IY2 - sub ax, ds:[si].IY1 - imul bx - idiv cx - add ds:[si].IY1, ax - jmp @@ClipYLoop -@@ClipYClip: - mov ds:[si].Y1, -1 ; Mark column as clipped - jmp @@ClipYLoop -@@ClipYExit: - -;------------- -; Draw columns - mov es, [mx_VideoSegment] - mov ax, [TWidth] - mov ds:[mx_TextureWidth], ax - mov ax, WORD PTR [Texture][0] - mov dx, WORD PTR [Texture][2] - mov WORD PTR ds:[mx_Texture][0], ax - mov WORD PTR ds:[mx_Texture][2], dx - mov si, [ScanOffsetT] - mov cl, BYTE PTR [BoxX1] ; Init write plane - and cl, 03h - mov al, 11h - shl al, cl - mov [WritePlane], al - .shr [BoxX1], 2 -@@DrawLoop: - mov ax, ds:[si].Y1 - test ax, ax ; Was column clipped? - js @@DrawNext ; Yes, skip - mov cx, ds:[si].Y2 - sub cx, ax ; CX = height - jle @@DrawNext - mul [mx_BytesPerLine] ; Get pixel address - add ax, [BoxX1] - mov di, ax - mov ah, [WritePlane] - mov al, 02h - mov dx, TS - out dx, ax - call subFillScan -@@DrawNext: - rol [WritePlane], 1 - adc [BoxX1], 0 ; Bump pointer to video memory if needed - add si, SIZE TSCAN - dec [ScanCount] - jnz @@DrawLoop - -@@Exit: - xor ax, ax - .pop ds, si, es, di - .leave ARG_SIZE -mxTexturePoly ENDP - -MX_TEXT ENDS -END diff --git a/16/lib/x/MXPT.OBJ b/16/lib/x/MXPT.OBJ deleted file mode 100644 index 5535ce32..00000000 Binary files a/16/lib/x/MXPT.OBJ and /dev/null differ diff --git a/16/lib/x/MXRA.ASM b/16/lib/x/MXRA.ASM index 90ccea78..dd8e6839 100644 --- a/16/lib/x/MXRA.ASM +++ b/16/lib/x/MXRA.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxRowAddress diff --git a/16/lib/x/MXRA.OBJ b/16/lib/x/MXRA.OBJ index a45dd559..97470e67 100644 Binary files a/16/lib/x/MXRA.OBJ and b/16/lib/x/MXRA.OBJ differ diff --git a/16/lib/x/MXRP.ASM b/16/lib/x/MXRP.ASM index 712338f5..de820c16 100644 --- a/16/lib/x/MXRP.ASM +++ b/16/lib/x/MXRP.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxRotatePalette diff --git a/16/lib/x/MXRP.OBJ b/16/lib/x/MXRP.OBJ index 543b7781..f5161bde 100644 Binary files a/16/lib/x/MXRP.OBJ and b/16/lib/x/MXRP.OBJ differ diff --git a/16/lib/x/MXSA.ASM b/16/lib/x/MXSA.ASM index 122cfb21..3ebae67d 100644 --- a/16/lib/x/MXSA.ASM +++ b/16/lib/x/MXSA.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxStartAddress diff --git a/16/lib/x/MXSA.OBJ b/16/lib/x/MXSA.OBJ index fcf28d08..88cde04f 100644 Binary files a/16/lib/x/MXSA.OBJ and b/16/lib/x/MXSA.OBJ differ diff --git a/16/lib/x/MXSC.ASM b/16/lib/x/MXSC.ASM index 1df04661..bcae45e6 100644 --- a/16/lib/x/MXSC.ASM +++ b/16/lib/x/MXSC.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxSetColor diff --git a/16/lib/x/MXSC.OBJ b/16/lib/x/MXSC.OBJ index acb32331..95ae7fc2 100644 Binary files a/16/lib/x/MXSC.OBJ and b/16/lib/x/MXSC.OBJ differ diff --git a/16/lib/x/MXSI.ASM b/16/lib/x/MXSI.ASM index 9964d473..b88d3b11 100644 --- a/16/lib/x/MXSI.ASM +++ b/16/lib/x/MXSI.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxStretchImage diff --git a/16/lib/x/MXSI.OBJ b/16/lib/x/MXSI.OBJ index 3d0ab0ac..3d0d3b29 100644 Binary files a/16/lib/x/MXSI.OBJ and b/16/lib/x/MXSI.OBJ differ diff --git a/16/lib/x/MXSL.ASM b/16/lib/x/MXSL.ASM index 3eafeb1c..d7908855 100644 --- a/16/lib/x/MXSL.ASM +++ b/16/lib/x/MXSL.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxStartLine diff --git a/16/lib/x/MXSL.OBJ b/16/lib/x/MXSL.OBJ index 911808be..51017dae 100644 Binary files a/16/lib/x/MXSL.OBJ and b/16/lib/x/MXSL.OBJ differ diff --git a/16/lib/x/MXSM.ASM b/16/lib/x/MXSM.ASM index 65d33710..183fba1e 100644 --- a/16/lib/x/MXSM.ASM +++ b/16/lib/x/MXSM.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxChangeMode diff --git a/16/lib/x/MXSM.OBJ b/16/lib/x/MXSM.OBJ index dc069e7e..63c8eee2 100644 Binary files a/16/lib/x/MXSM.OBJ and b/16/lib/x/MXSM.OBJ differ diff --git a/16/lib/x/MXSP.ASM b/16/lib/x/MXSP.ASM index 0b692c7c..1d08e711 100644 --- a/16/lib/x/MXSP.ASM +++ b/16/lib/x/MXSP.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxSetPalette diff --git a/16/lib/x/MXSP.OBJ b/16/lib/x/MXSP.OBJ index afe4985b..4a5dcc22 100644 Binary files a/16/lib/x/MXSP.OBJ and b/16/lib/x/MXSP.OBJ differ diff --git a/16/lib/x/MXSS.ASM b/16/lib/x/MXSS.ASM index baca87c8..97df7366 100644 --- a/16/lib/x/MXSS.ASM +++ b/16/lib/x/MXSS.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxSplitScreen diff --git a/16/lib/x/MXSS.OBJ b/16/lib/x/MXSS.OBJ index 4963c96f..428b7e88 100644 Binary files a/16/lib/x/MXSS.OBJ and b/16/lib/x/MXSS.OBJ differ diff --git a/16/lib/x/MXTL.ASM b/16/lib/x/MXTL.ASM index 5d9b8b89..69900c88 100644 --- a/16/lib/x/MXTL.ASM +++ b/16/lib/x/MXTL.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxPutTile diff --git a/16/lib/x/MXTL.OBJ b/16/lib/x/MXTL.OBJ index b914c84c..68d0ac4b 100644 Binary files a/16/lib/x/MXTL.OBJ and b/16/lib/x/MXTL.OBJ differ diff --git a/16/lib/x/MXVS.ASM b/16/lib/x/MXVS.ASM index 3791b4cc..992eabab 100644 --- a/16/lib/x/MXVS.ASM +++ b/16/lib/x/MXVS.ASM @@ -4,8 +4,8 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO -;NOWARN RES +WARN PRO +NOWARN RES INCLUDE MODEX.DEF PUBLIC mxSetVirtualScreen diff --git a/16/lib/x/MXVS.OBJ b/16/lib/x/MXVS.OBJ index 4bf0b4d4..996060c1 100644 Binary files a/16/lib/x/MXVS.OBJ and b/16/lib/x/MXVS.OBJ differ diff --git a/16/lib/x/MXVS~1.OBJ b/16/lib/x/MXVS~1.OBJ deleted file mode 100644 index ac8b6e69..00000000 Binary files a/16/lib/x/MXVS~1.OBJ and /dev/null differ diff --git a/16/lib/x/MXWD.ASM b/16/lib/x/MXWD.ASM index 2013aae5..de55208f 100644 --- a/16/lib/x/MXWD.ASM +++ b/16/lib/x/MXWD.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxWaitDisplay diff --git a/16/lib/x/MXWD.OBJ b/16/lib/x/MXWD.OBJ index 71c32692..1adaaaea 100644 Binary files a/16/lib/x/MXWD.OBJ and b/16/lib/x/MXWD.OBJ differ diff --git a/16/lib/x/MXWM.ASM b/16/lib/x/MXWM.ASM index 64c7ee48..06158859 100644 --- a/16/lib/x/MXWM.ASM +++ b/16/lib/x/MXWM.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxWriteMode diff --git a/16/lib/x/MXWM.OBJ b/16/lib/x/MXWM.OBJ index 2bd36784..875e6d78 100644 Binary files a/16/lib/x/MXWM.OBJ and b/16/lib/x/MXWM.OBJ differ diff --git a/16/lib/x/MXWP.ASM b/16/lib/x/MXWP.ASM index e4175ce0..19ca99d0 100644 --- a/16/lib/x/MXWP.ASM +++ b/16/lib/x/MXWP.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxWritePlane diff --git a/16/lib/x/MXWP.OBJ b/16/lib/x/MXWP.OBJ index 2d6b03c9..9df95b91 100644 Binary files a/16/lib/x/MXWP.OBJ and b/16/lib/x/MXWP.OBJ differ diff --git a/16/lib/x/MXWR.ASM b/16/lib/x/MXWR.ASM index 706ece28..bd29fe59 100644 --- a/16/lib/x/MXWR.ASM +++ b/16/lib/x/MXWR.ASM @@ -4,7 +4,7 @@ ; Copyright (c) 1993,1994 by Alessandro Scotti ; ;----------------------------------------------------------- -;WARN PRO +WARN PRO INCLUDE MODEX.DEF PUBLIC mxWaitRetrace diff --git a/16/lib/x/MXWR.OBJ b/16/lib/x/MXWR.OBJ index 87221784..463abcda 100644 Binary files a/16/lib/x/MXWR.OBJ and b/16/lib/x/MXWR.OBJ differ diff --git a/16/lib/x/compile.bat b/16/lib/x/compile.bat deleted file mode 100644 index c527580e..00000000 --- a/16/lib/x/compile.bat +++ /dev/null @@ -1 +0,0 @@ -jwasmr -0 -Zm *.asm \ No newline at end of file diff --git a/16/lib/x/modex.bak b/16/lib/x/modex.bak deleted file mode 100644 index 0069d2e6..00000000 Binary files a/16/lib/x/modex.bak and /dev/null differ diff --git a/16/lib/x/modex.lb1 b/16/lib/x/modex.lb1 deleted file mode 100644 index 0084fdfa..00000000 --- a/16/lib/x/modex.lb1 +++ /dev/null @@ -1,40 +0,0 @@ -+'MXBB.obj' -+'MXCC.obj' -+'MXCG.obj' -+'MXCL.obj' -+'MXCR.obj' -+'MXEL.obj' -+'MXFB.obj' -+'MXFP.obj' -+'MXGC.obj' -+'MXGI.obj' -+'MXGM.obj' -+'MXGP.obj' -+'MXGV.obj' -+'MXHL.obj' -+'MXIT.obj' -+'MXLL.obj' -+'MXLN.obj' -+'MXOT.obj' -+'MXPB.obj' -+'MXPF.obj' -+'MXPG.obj' -+'MXPI.obj' -+'MXPN.obj' -+'MXPP.obj' -+'MXPT.obj' -+'MXRA.obj' -+'MXRP.obj' -+'MXSA.obj' -+'MXSC.obj' -+'MXSI.obj' -+'MXSL.obj' -+'MXSM.obj' -+'MXSP.obj' -+'MXSS.obj' -+'MXTL.obj' -+'MXVS.obj' -+'MXWD.obj' -+'MXWM.obj' -+'MXWP.obj' -+'MXWR.obj' diff --git a/16/lib/x/modex.lib b/16/lib/x/modex.lib deleted file mode 100644 index ea682c00..00000000 Binary files a/16/lib/x/modex.lib and /dev/null differ diff --git a/16/lib/x/modex.mk b/16/lib/x/modex.mk deleted file mode 100644 index 9ba3a13b..00000000 --- a/16/lib/x/modex.mk +++ /dev/null @@ -1,3 +0,0 @@ -project : C:\z\16\16\lib\x\modex.lib .SYMBOLIC - -!include C:\z\16\16\lib\x\modex.mk1 diff --git a/16/lib/x/modex.mk1 b/16/lib/x/modex.mk1 deleted file mode 100644 index 88f8bf49..00000000 --- a/16/lib/x/modex.mk1 +++ /dev/null @@ -1,236 +0,0 @@ -!define BLANK "" -C:\z\16\16\lib\x\MXBB.obj : C:\z\16\16\lib\x\MXBB.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXBB.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXCC.obj : C:\z\16\16\lib\x\MXCC.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXCC.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXCG.obj : C:\z\16\16\lib\x\MXCG.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXCG.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXCL.obj : C:\z\16\16\lib\x\MXCL.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXCL.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXCR.obj : C:\z\16\16\lib\x\MXCR.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXCR.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXEL.obj : C:\z\16\16\lib\x\MXEL.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXEL.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXFB.obj : C:\z\16\16\lib\x\MXFB.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXFB.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXFP.obj : C:\z\16\16\lib\x\MXFP.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXFP.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXGC.obj : C:\z\16\16\lib\x\MXGC.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXGC.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXGI.obj : C:\z\16\16\lib\x\MXGI.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXGI.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXGM.obj : C:\z\16\16\lib\x\MXGM.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXGM.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXGP.obj : C:\z\16\16\lib\x\MXGP.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXGP.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXGV.obj : C:\z\16\16\lib\x\MXGV.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXGV.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXHL.obj : C:\z\16\16\lib\x\MXHL.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXHL.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXIT.obj : C:\z\16\16\lib\x\MXIT.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXIT.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXLL.obj : C:\z\16\16\lib\x\MXLL.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXLL.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXLN.obj : C:\z\16\16\lib\x\MXLN.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXLN.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXOT.obj : C:\z\16\16\lib\x\MXOT.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXOT.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXPB.obj : C:\z\16\16\lib\x\MXPB.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXPB.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXPF.obj : C:\z\16\16\lib\x\MXPF.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXPF.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXPG.obj : C:\z\16\16\lib\x\MXPG.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXPG.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXPI.obj : C:\z\16\16\lib\x\MXPI.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXPI.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXPN.obj : C:\z\16\16\lib\x\MXPN.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXPN.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXPP.obj : C:\z\16\16\lib\x\MXPP.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXPP.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXPT.obj : C:\z\16\16\lib\x\MXPT.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXPT.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXRA.obj : C:\z\16\16\lib\x\MXRA.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXRA.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXRP.obj : C:\z\16\16\lib\x\MXRP.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXRP.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXSA.obj : C:\z\16\16\lib\x\MXSA.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXSA.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXSC.obj : C:\z\16\16\lib\x\MXSC.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXSC.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXSI.obj : C:\z\16\16\lib\x\MXSI.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXSI.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXSL.obj : C:\z\16\16\lib\x\MXSL.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXSL.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXSM.obj : C:\z\16\16\lib\x\MXSM.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXSM.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXSP.obj : C:\z\16\16\lib\x\MXSP.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXSP.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXSS.obj : C:\z\16\16\lib\x\MXSS.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXSS.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXTL.obj : C:\z\16\16\lib\x\MXTL.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXTL.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXVS.obj : C:\z\16\16\lib\x\MXVS.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXVS.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXWD.obj : C:\z\16\16\lib\x\MXWD.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXWD.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXWM.obj : C:\z\16\16\lib\x\MXWM.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXWM.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXWP.obj : C:\z\16\16\lib\x\MXWP.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXWP.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\MXWR.obj : C:\z\16\16\lib\x\MXWR.ASM .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - *wasm MXWR.ASM -i="C:\FDOS\WATCOM/h" -ml -d1 -w4 -e25 -zq - -C:\z\16\16\lib\x\modex.lib : C:\z\16\16\lib\x\MXBB.obj C:\z\16\16\lib\x\MXCC& -.obj C:\z\16\16\lib\x\MXCG.obj C:\z\16\16\lib\x\MXCL.obj C:\z\16\16\lib\x\MX& -CR.obj C:\z\16\16\lib\x\MXEL.obj C:\z\16\16\lib\x\MXFB.obj C:\z\16\16\lib\x\& -MXFP.obj C:\z\16\16\lib\x\MXGC.obj C:\z\16\16\lib\x\MXGI.obj C:\z\16\16\lib\& -x\MXGM.obj C:\z\16\16\lib\x\MXGP.obj C:\z\16\16\lib\x\MXGV.obj C:\z\16\16\li& -b\x\MXHL.obj C:\z\16\16\lib\x\MXIT.obj C:\z\16\16\lib\x\MXLL.obj C:\z\16\16\& -lib\x\MXLN.obj C:\z\16\16\lib\x\MXOT.obj C:\z\16\16\lib\x\MXPB.obj C:\z\16\1& -6\lib\x\MXPF.obj C:\z\16\16\lib\x\MXPG.obj C:\z\16\16\lib\x\MXPI.obj C:\z\16& -\16\lib\x\MXPN.obj C:\z\16\16\lib\x\MXPP.obj C:\z\16\16\lib\x\MXPT.obj C:\z\& -16\16\lib\x\MXRA.obj C:\z\16\16\lib\x\MXRP.obj C:\z\16\16\lib\x\MXSA.obj C:\& -z\16\16\lib\x\MXSC.obj C:\z\16\16\lib\x\MXSI.obj C:\z\16\16\lib\x\MXSL.obj C& -:\z\16\16\lib\x\MXSM.obj C:\z\16\16\lib\x\MXSP.obj C:\z\16\16\lib\x\MXSS.obj& - C:\z\16\16\lib\x\MXTL.obj C:\z\16\16\lib\x\MXVS.obj C:\z\16\16\lib\x\MXWD.o& -bj C:\z\16\16\lib\x\MXWM.obj C:\z\16\16\lib\x\MXWP.obj C:\z\16\16\lib\x\MXWR& -.obj C:\z\16\16\lib\x\MODEX.DEF C:\z\16\16\lib\x\MODEX.H .AUTODEPEND - @C: - cd C:\z\16\16\lib\x - %create modex.lb1 -!ifneq BLANK "MXBB.obj MXCC.obj MXCG.obj MXCL.obj MXCR.obj MXEL.obj MXFB.obj& - MXFP.obj MXGC.obj MXGI.obj MXGM.obj MXGP.obj MXGV.obj MXHL.obj MXIT.obj MXL& -L.obj MXLN.obj MXOT.obj MXPB.obj MXPF.obj MXPG.obj MXPI.obj MXPN.obj MXPP.ob& -j MXPT.obj MXRA.obj MXRP.obj MXSA.obj MXSC.obj MXSI.obj MXSL.obj MXSM.obj MX& -SP.obj MXSS.obj MXTL.obj MXVS.obj MXWD.obj MXWM.obj MXWP.obj MXWR.obj" - @for %i in (MXBB.obj MXCC.obj MXCG.obj MXCL.obj MXCR.obj MXEL.obj MXFB.obj & -MXFP.obj MXGC.obj MXGI.obj MXGM.obj MXGP.obj MXGV.obj MXHL.obj MXIT.obj MXLL& -.obj MXLN.obj MXOT.obj MXPB.obj MXPF.obj MXPG.obj MXPI.obj MXPN.obj MXPP.obj& - MXPT.obj MXRA.obj MXRP.obj MXSA.obj MXSC.obj MXSI.obj MXSL.obj MXSM.obj MXS& -P.obj MXSS.obj MXTL.obj MXVS.obj MXWD.obj MXWM.obj MXWP.obj MXWR.obj) do @%a& -ppend modex.lb1 +'%i' -!endif -!ifneq BLANK "" - @for %i in () do @%append modex.lb1 +'%i' -!endif - *wlib -c -n -q -p=512 -irn -inn modex.lib @modex.lb1 - diff --git a/16/lib/x/modex.tgt b/16/lib/x/modex.tgt deleted file mode 100644 index c59015ea..00000000 --- a/16/lib/x/modex.tgt +++ /dev/null @@ -1,948 +0,0 @@ -40 -targetIdent -0 -MProject -1 -MComponent -0 -2 -WString -3 -LIB -3 -WString -5 -d_6s9 -1 -0 -1 -4 -MCommand -0 -5 -MCommand -0 -6 -MItem -9 -modex.lib -7 -WString -3 -LIB -8 -WVList -5 -9 -MCState -10 -WString -4 -WLIB -11 -WString -27 -???s?Don't create .bak file -1 -0 -12 -MRState -13 -WString -4 -WLIB -14 -WString -18 -???s?Do not import -1 -0 -15 -MRState -16 -WString -4 -WLIB -17 -WString -19 -???s?Import by name -1 -1 -18 -MRState -19 -WString -4 -WLIB -20 -WString -18 -???s?Do not import -1 -0 -21 -MRState -22 -WString -4 -WLIB -23 -WString -19 -???s?Import by name -1 -1 -24 -WVList -1 -25 -ActionStates -26 -WString -5 -&Make -27 -WVList -2 -28 -MCState -29 -WString -5 -WMAKE -30 -WString -21 -?????Make all targets -1 -1 -31 -MCState -32 -WString -5 -WMAKE -33 -WString -23 -?????Do not erase files -1 -1 --1 -1 -1 -0 -34 -WPickList -45 -35 -MItem -5 -*.ASM -36 -WString -6 -ASMOBJ -37 -WVList -0 -38 -WVList -0 --1 -1 -1 -0 -39 -MItem -8 -MXBB.ASM -40 -WString -6 -ASMOBJ -41 -WVList -0 -42 -WVList -0 -35 -1 -1 -0 -43 -MItem -8 -MXCC.ASM -44 -WString -6 -ASMOBJ -45 -WVList -0 -46 -WVList -0 -35 -1 -1 -0 -47 -MItem -8 -MXCG.ASM -48 -WString -6 -ASMOBJ -49 -WVList -0 -50 -WVList -0 -35 -1 -1 -0 -51 -MItem -8 -MXCL.ASM -52 -WString -6 -ASMOBJ -53 -WVList -0 -54 -WVList -0 -35 -1 -1 -0 -55 -MItem -8 -MXCR.ASM -56 -WString -6 -ASMOBJ -57 -WVList -0 -58 -WVList -0 -35 -1 -1 -0 -59 -MItem -8 -MXEL.ASM -60 -WString -6 -ASMOBJ -61 -WVList -0 -62 -WVList -0 -35 -1 -1 -0 -63 -MItem -8 -MXFB.ASM -64 -WString -6 -ASMOBJ -65 -WVList -0 -66 -WVList -0 -35 -1 -1 -0 -67 -MItem -8 -MXFP.ASM -68 -WString -6 -ASMOBJ -69 -WVList -0 -70 -WVList -0 -35 -1 -1 -0 -71 -MItem -8 -MXGC.ASM -72 -WString -6 -ASMOBJ -73 -WVList -0 -74 -WVList -0 -35 -1 -1 -0 -75 -MItem -8 -MXGI.ASM -76 -WString -6 -ASMOBJ -77 -WVList -0 -78 -WVList -0 -35 -1 -1 -0 -79 -MItem -8 -MXGM.ASM -80 -WString -6 -ASMOBJ -81 -WVList -0 -82 -WVList -0 -35 -1 -1 -0 -83 -MItem -8 -MXGP.ASM -84 -WString -6 -ASMOBJ -85 -WVList -0 -86 -WVList -0 -35 -1 -1 -0 -87 -MItem -8 -MXGV.ASM -88 -WString -6 -ASMOBJ -89 -WVList -0 -90 -WVList -0 -35 -1 -1 -0 -91 -MItem -8 -MXHL.ASM -92 -WString -6 -ASMOBJ -93 -WVList -0 -94 -WVList -0 -35 -1 -1 -0 -95 -MItem -8 -MXIT.ASM -96 -WString -6 -ASMOBJ -97 -WVList -0 -98 -WVList -0 -35 -1 -1 -0 -99 -MItem -8 -MXLL.ASM -100 -WString -6 -ASMOBJ -101 -WVList -0 -102 -WVList -0 -35 -1 -1 -0 -103 -MItem -8 -MXLN.ASM -104 -WString -6 -ASMOBJ -105 -WVList -0 -106 -WVList -0 -35 -1 -1 -0 -107 -MItem -8 -MXOT.ASM -108 -WString -6 -ASMOBJ -109 -WVList -0 -110 -WVList -0 -35 -1 -1 -0 -111 -MItem -8 -MXPB.ASM -112 -WString -6 -ASMOBJ -113 -WVList -0 -114 -WVList -0 -35 -1 -1 -0 -115 -MItem -8 -MXPF.ASM -116 -WString -6 -ASMOBJ -117 -WVList -0 -118 -WVList -0 -35 -1 -1 -0 -119 -MItem -8 -MXPG.ASM -120 -WString -6 -ASMOBJ -121 -WVList -0 -122 -WVList -0 -35 -1 -1 -0 -123 -MItem -8 -MXPI.ASM -124 -WString -6 -ASMOBJ -125 -WVList -0 -126 -WVList -0 -35 -1 -1 -0 -127 -MItem -8 -MXPN.ASM -128 -WString -6 -ASMOBJ -129 -WVList -0 -130 -WVList -0 -35 -1 -1 -0 -131 -MItem -8 -MXPP.ASM -132 -WString -6 -ASMOBJ -133 -WVList -0 -134 -WVList -0 -35 -1 -1 -0 -135 -MItem -8 -MXPT.ASM -136 -WString -6 -ASMOBJ -137 -WVList -0 -138 -WVList -0 -35 -1 -1 -0 -139 -MItem -8 -MXRA.ASM -140 -WString -6 -ASMOBJ -141 -WVList -0 -142 -WVList -0 -35 -1 -1 -0 -143 -MItem -8 -MXRP.ASM -144 -WString -6 -ASMOBJ -145 -WVList -0 -146 -WVList -0 -35 -1 -1 -0 -147 -MItem -8 -MXSA.ASM -148 -WString -6 -ASMOBJ -149 -WVList -0 -150 -WVList -0 -35 -1 -1 -0 -151 -MItem -8 -MXSC.ASM -152 -WString -6 -ASMOBJ -153 -WVList -0 -154 -WVList -0 -35 -1 -1 -0 -155 -MItem -8 -MXSI.ASM -156 -WString -6 -ASMOBJ -157 -WVList -0 -158 -WVList -0 -35 -1 -1 -0 -159 -MItem -8 -MXSL.ASM -160 -WString -6 -ASMOBJ -161 -WVList -0 -162 -WVList -0 -35 -1 -1 -0 -163 -MItem -8 -MXSM.ASM -164 -WString -6 -ASMOBJ -165 -WVList -0 -166 -WVList -0 -35 -1 -1 -0 -167 -MItem -8 -MXSP.ASM -168 -WString -6 -ASMOBJ -169 -WVList -0 -170 -WVList -0 -35 -1 -1 -0 -171 -MItem -8 -MXSS.ASM -172 -WString -6 -ASMOBJ -173 -WVList -0 -174 -WVList -0 -35 -1 -1 -0 -175 -MItem -8 -MXTL.ASM -176 -WString -6 -ASMOBJ -177 -WVList -0 -178 -WVList -0 -35 -1 -1 -0 -179 -MItem -8 -MXVS.ASM -180 -WString -6 -ASMOBJ -181 -WVList -0 -182 -WVList -0 -35 -1 -1 -0 -183 -MItem -8 -MXWD.ASM -184 -WString -6 -ASMOBJ -185 -WVList -0 -186 -WVList -0 -35 -1 -1 -0 -187 -MItem -8 -MXWM.ASM -188 -WString -6 -ASMOBJ -189 -WVList -0 -190 -WVList -0 -35 -1 -1 -0 -191 -MItem -8 -MXWP.ASM -192 -WString -6 -ASMOBJ -193 -WVList -0 -194 -WVList -0 -35 -1 -1 -0 -195 -MItem -8 -MXWR.ASM -196 -WString -6 -ASMOBJ -197 -WVList -0 -198 -WVList -0 -35 -1 -1 -0 -199 -MItem -5 -*.DEF -200 -WString -3 -NIL -201 -WVList -0 -202 -WVList -0 --1 -1 -1 -0 -203 -MItem -9 -MODEX.DEF -204 -WString -3 -NIL -205 -WVList -0 -206 -WVList -0 -199 -1 -1 -0 -207 -MItem -3 -*.H -208 -WString -3 -NIL -209 -WVList -0 -210 -WVList -0 --1 -1 -1 -0 -211 -MItem -7 -MODEX.H -212 -WString -3 -NIL -213 -WVList -0 -214 -WVList -0 -207 -1 -1 -0 diff --git a/16/lib/x/modex.wpj b/16/lib/x/modex.wpj deleted file mode 100644 index 0acca465..00000000 --- a/16/lib/x/modex.wpj +++ /dev/null @@ -1,43 +0,0 @@ -40 -projectIdent -0 -VpeMain -1 -WRect --40 --53 -10320 -9973 -2 -MProject -3 -MCommand -0 -4 -MCommand -0 -1 -5 -WFileName -9 -modex.tgt -6 -WVList -1 -7 -VComponent -8 -WRect -0 -0 -5700 -4293 -0 -0 -9 -WFileName -9 -modex.tgt -26 -0 -7 diff --git a/16/x.bat b/16/x.bat index 45108a71..f70fb530 100644 --- a/16/x.bat +++ b/16/x.bat @@ -1,3 +1,3 @@ wpp /d1 /0 /ml dos_gfx -wlink file dos_gfx,lib\x\*.obj library lib\x\modex.lib name dos_gfx +wlink debug c option cvp file 'dos_gfx','lib\x\mxvs.obj' library 'lib\x\modex.lib' name dos_gfx copy /y dos_gfx.exe c:\z\bakapi.exe