c2e.convert_special: 0
e2c.convert_num: 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_gfx.cpp:16147:15298:1:
+openfiles: /dos/z/16/16/dos_gfx.h:141:0:0:
openfiles: /dos/z/16/16/dos_kb.c:892:395:0:
openfiles: /dos/z/16/16/dos_kb.h:60:0:0:
openfiles: /dos/z/16/16/lib/lib_com.cpp:0: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:
+openfiles: /dos/z/16/16/lib/x/MODEX.DEF:4471:3131:0:
+openfiles: /dos/z/16/16/lib/x/MAKEFILE:1186:782:0:
snr_recursion_level: 0
convertcolumn_horizontally: 0
adv_open_matchname: 0
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/scroll.txt
-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/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/lib/lib_com.cpp
+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/x.bat
recent_files: file:///dos/z/16/16/xx.bat
+recent_files: file:///dos/z/16/16/16.txt
+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/MODEX.DEF
+recent_files: file:///dos/z/16/16/lib/x/MXPN.ASM
recent_files: file:///dos/z/16/16/lib/x/MAKEFILE
snr_replacetype: 0
savedir: file:///dos/z/16/16
setVisibleStart(visStart + (Cols * width));\r
}\r
\r
-/*To implement smooth horizontal scrolling, you would do the following:\r
--------------- Horizontal Scrolling ------------\r
-FOR X = 0 TO 319 DO\r
- SET HPP TO ( X MOD 4 )\r
- SET VGA OFFSET TO ( X/4 )\r
-END FOR\r
-------------------------------------------------\r
-\r
-Okay, no problem at all (although I think you might have to fiddle\r
-around with the HPP a bit to get it right...try different values and\r
-see what works :).\r
-\r
-So, the next problem is with drawing the images off the screen where\r
-they aren't visible and then scrolling them on!!! As it turns out,\r
-there's yet ANOTHER register to accomplish this. This one's called the\r
-offset register (no, not the one I was talking about before, that one\r
-was actually the "start address" register) and it's at\r
-\r
- PORT: 3D4H/3D5H\r
- OFFSET: 13H\r
-\r
-and here's how to use it\r
-\r
--------------- Offset Register ---------------\r
-OUT 13H TO PORT 3D4H\r
-OUT value TO PORT 3D5H\r
-----------------------------------------------\r
-\r
-Now, what my VGA reference says is that this register holds the number\r
-of bytes (not pixels) difference between the start address of each row.\r
-So, in X-mode it normally contains the value 80 (as we remember,\r
-80 bytes * 4 planes = 320 pixels). This register does not affect the\r
-VISIBLE width of the display, only the difference between addresses on\r
-each row.\r
-\r
-When we scroll horizontally, we need a little bit of extra working space\r
-so we can draw off the edge of the screen.\r
-\r
-Perhaps a little diagram will clarify it. The following picture is of a\r
-standard X-mode addressing scheme with the OFFSET register set to 80.\r
-\r
- ROW OFFSET\r
- 0 0 ========================\r
- 1 80 [ ]\r
- 2 160 [ ]\r
- .. .. [ VISIBLE ]\r
- [ SCREEN ]\r
- [ ]\r
- [ ]\r
- .. .. [ ]\r
- 199 15920 ========================\r
-\r
-and the next diagram is of a modified addressing scheme with the OFFSET\r
-register set to 82 (to give us 4 extra pixels on each side of the screen)\r
-\r
-ROW OFFSET\r
-0 0 ------========================------\r
-1 82 | V [ ] V |\r
-2 164 | I [ ] I |\r
-.. .. | N S [ VISIBLE ] N S |\r
- | O I [ SCREEN ] O I |\r
- | T B [ ] T B |\r
- | L [ ] L |\r
-.. .. | E [ ] E |\r
-199 16318 ------========================------\r
-\r
-Beautiful!!!\r
-\r
-As with vertical scrolling, however, you still have the problem of when\r
-you reach the bottom of page 4...and it's fixed in the same manner.\r
-\r
-I haven't actually managed to get infinite horizontal scrolling working,\r
-but the method I have just stated will give you a horizontal scrolling\r
-range of over 200 screens!!!! So if you need more (which is extremely\r
-unlikely), figure it out yourself.\r
-\r
-\r
-------------------\r
-COMBINED SCROLLING\r
-------------------\r
-To do both horizontal and vertical scrolling, all you have to do is combine\r
-the two methods with a few little extras (it's always the way isn't it).\r
-\r
-You have to start off with the original screen on the current page and the\r
-next page as well. When you scroll horizontally, you have to draw the edge\r
-that's coming in to the screen to BOTH pages (that means you'll be drawing\r
-the incoming edge twice, once for each page). You do this so that when you\r
-have scrolled vertically down through a complete page, you can jump back\r
-to the first page and it will (hopefully) have an identical copy, and you\r
-can then continue scrolling again.\r
-\r
-I'm sorry about this being so confusing but it's a bit difficult to explain.\r
-\r
-\r
-*/\r
-int loadfontX(char *fname)\r
-{\r
- FILE *fp;\r
-\r
- fp = fopen(fname, "rb");\r
-\r
- if (fp == NULL) {\r
- return 0;\r
- } else {\r
- fread(Xfont, 8, 256, fp);\r
- fclose(fp);\r
- return 1;\r
- }\r
-}\r
-\r
-void putchX(cord x, cord y, char c, byte color)\r
-{\r
- int i;\r
- byte *vga_ptr;\r
- byte *font_ptr;\r
- byte temp;\r
-\r
- // 8x8 font\r
- vga_ptr = RowsX[y << 3] + (x << 1) + actStart;\r
- write_plane = -1;\r
-\r
- font_ptr = Xfont + (c << 3);\r
-\r
- i=8;\r
- while (i--) {\r
- temp = *font_ptr++;\r
- outpw(SEQU_ADDR, text_mask[temp & 0x0F]);\r
- *vga_ptr++ = color;\r
-\r
- outpw(SEQU_ADDR, text_mask[temp >> 4]);\r
- *vga_ptr-- = color;\r
- vga_ptr += widthBytes;\r
- }\r
-}\r
-\r
-void putstringX(cord x, cord y, char *str, byte color)\r
-{\r
- int i, skip;\r
- byte *vga_ptr;\r
- byte *font_ptr;\r
- byte c, temp;\r
-\r
- // 8x8 font\r
- vga_ptr = RowsX[y << 3] + (x << 1) + actStart;\r
- write_plane = -1;\r
-\r
- skip = 2 - (widthBytes << 3);\r
-\r
- while (c = *str++) {\r
- font_ptr = Xfont + (c << 3);\r
-\r
- i=8;\r
- while (i--) {\r
- temp = *font_ptr++;\r
- outpw(SEQU_ADDR, text_mask[temp & 0x0F]);\r
- *vga_ptr++ = color;\r
-\r
- outpw(SEQU_ADDR, text_mask[temp >> 4]);\r
- *vga_ptr-- = color;\r
- vga_ptr += widthBytes;\r
- }\r
-\r
- vga_ptr += skip;\r
- }\r
-}\r
-\r
/////////////////////////////////////////////////////////////////////////////\r
// //\r
// setvideo() - This function Manages the video modes //\r
\r
if(!vq){ // deinit the video\r
// change to the video mode we were in before we switched to mode 13h\r
- //mxSetMode( MX_TEXT );\r
- //mxTerm();\r
- in.h.ah = 0x00;\r
- in.h.al = old_mode;\r
- int86(0x10, &in, &out);\r
+ mxSetMode( MX_TEXT );\r
+ //in.h.ah = 0x00;\r
+ //in.h.al = old_mode;\r
+ //int86(0x10, &in, &out);
+ mxTerm();\r
\r
}else if(vq == 1){ // init the video\r
// get old video mode\r
- in.h.ah = 0xf;\r
- int86(0x10, &in, &out);\r
- old_mode = out.h.al;\r
+ //in.h.ah = 0xf;\r
+ //int86(0x10, &in, &out);\r
+ //old_mode = out.h.al;\r
\r
// enter mode\r
- //mxInit();\r
- //mxSetMode( MX_320x200 );\r
- //mxSetVirtualScreen( 640, 400 );\r
- set320x240x256_X();\r
+ mxInit();\r
+ mxSetMode( MX_320x240 );\r
+ mxSetVirtualScreen( 480, 360 );\r
+ //set320x240x256_X();\r
//mxSetMode(MX_320x240);\r
//mxSetVirtualScreen(560,420);\r
//mxSetVirtualScreen((640-TILEWH),(480-TILEWH));\r
/*-----------ding-------------*/\r
int ding(int q){\r
\r
-// if(yy<height){\r
+/* if(yy<height){\r
setActivePage(0);\r
setVisiblePage(0);\r
-/* }\r
+ }\r
if((height)<yy<(height*2)){\r
setActivePage(1);\r
setVisiblePage(1);\r
}\r
}else{\r
if(!bakax){\r
- xx-=TILEWH;\r
-// xx--;\r
+// xx-=TILEWH;\r
+ xx--;\r
}else if(bakax>1){\r
- xx+=TILEWH;\r
-// xx++;\r
+// xx+=TILEWH;\r
+ xx++;\r
}\r
if(!bakay){\r
- yy-=TILEWH;\r
-// yy--;\r
+// yy-=TILEWH;\r
+ yy--;\r
}else if(bakay>1){\r
- yy+=TILEWH;\r
-// yy++;\r
+// yy+=TILEWH;\r
+ yy++;\r
}\r
}\r
}\r
// plot the pixel\r
//---- ppf(xx, yy, coor, vga);\r
}else /*if(xx>=0 && xx<width && yy>=0 && yy<(height*3))*/{\r
- putColorBox_X(xx, yy, TILEWH, TILEWH, coor);\r
+// putColorBox_X(xx, yy, TILEWH, TILEWH, coor);\r
//++++0000\r
-// putPixel_X(xx, yy, coor);\r
+// putPixel_X(xx, yy, coor);
+ mxPutPixel(xx, yy, coor);\r
} \r
\r
//---- if(q==2) ppf(rand()%, rand()%height, 0, vga);\r
ding(4);\r
}\r
//end of screen savers\r
- doTest();\r
-// getch();\r
+ //doTest();\r
+ getch();\r
\r
while(!kbhit()){ // conditions of screen saver\r
// hScroll(1);\r
// scrolly(1);\r
// vScroll(1);\r
// delay(100);
- /*mxSetVirtualScreen(320,240*2);\r
- for(int i=0;i<TILEWH;i++){\r
- mxPan(x,y);\r
- //mxWaitRetrace();\r
- y++;\r
- }*/
- mxSetVirtualScreen(320*2,240);\r
for(int i=0;i<TILEWH;i++){\r
mxPan(x,y);\r
mxWaitRetrace();\r
- x++;\r
+ x++;
+ y++;\r
}
//delay(100);\r
}\r