]> 4ch.mooo.com Git - 16.git/commitdiff
modified: 16/dos_gfx.cpp
authorsparky4 <sparky4@4ch.maidlab.jp>
Wed, 21 May 2014 16:09:32 +0000 (11:09 -0500)
committersparky4 <sparky4@4ch.maidlab.jp>
Wed, 21 May 2014 16:09:32 +0000 (11:09 -0500)
16/dos_gfx.cpp

index 0ca933fbb10955fbafa76102c81ea0e45183e690..2a4170a2507d8e513660047cd1d95a4984f0d865 100644 (file)
@@ -191,7 +191,7 @@ OUT value TO PORT 3C0H (where "value" is the
 -----------------------------------------------\r
 */\r
 \r
-mxSetVirtualScreen(480,360);\r
+//mxSetVirtualScreen(480,360);\r
                }\r
 \r
 /*\r
@@ -337,12 +337,13 @@ void MoveTo (word X, word Y) {
 ;\r
 ;-----------------------------------------------------------\r
 ;WARN    PRO\r
-INCLUDE MODEX.DEF\r
-
 #pragma aux mxPan = \\r
+"INCLUDE MODEX.DEF" \\r
 \r
-EXTRN   mxWaitDisplay   : FAR\r
-EXTRN   mxStartAddress  : FAR\r
+\r
+\r
+"EXTRN   mxWaitDisplay   : FAR" \\r
+"EXTRN   mxStartAddress  : FAR" \\r
 \r
 MX_TEXT         SEGMENT USE16 PARA PUBLIC 'CODE'\r
                 ASSUME cs:MX_TEXT, ds:NOTHING, es:NOTHING\r
@@ -741,9 +742,9 @@ int ding(int q){
                if((q == 2\r
                ||q==4\r
                ||q==16\r
-               ) && gq == BONK-1){\r
+               ) && gq == BONK){\r
                                                if(coor < HGQ && coor < LGQ) coor = LGQ;\r
-                                               if(coor < HGQ){\r
+                                               if(coor < HGQ-1){\r
                                                                coor++;\r
                                }else{ coor = LGQ;\r
                                                bakax = rand()%3; bakay = rand()%3;\r
@@ -832,9 +833,9 @@ int ding(int q){
                                // fixer\r
 //                             if(q!=16){\r
 //if(q!=16)\r
-                                               if(xx<(0/*-TILEWH*/)) xx=(width/*+TILEWH*/);\r
+//                                             if(xx<(0/*-(TILEWH/2)*/)) xx=(width/*+(TILEWH)*/);\r
                                                if(yy<0) yy=(height*3);\r
-                                               if(xx>(width/*+TILEWH*/)) xx=(0/*-TILEWH*/);\r
+//                                             if(xx>(width/*+(TILEWH)*/)) xx=(0/*-(TILEWH/2)*/);\r
                                                if(yy>(height*3)) yy=0;\r
 //                             }\r
 \r
@@ -889,8 +890,9 @@ void doTest(void)
 \r
                /* This is the way to calculate the number of pages available. */\r
                pages = 65536L/(widthBytes*height); // apparently this takes the A000 address\r
+//             if(height==240) pages++;\r
 \r
-               printf("%d\n", pages);\r
+//             printf("%d\n", pages);\r
 \r
                for (p = 0; p <= pages; ++p)\r
                                {\r
@@ -904,31 +906,28 @@ void doTest(void)
                                                                {\r
                                                                putPixel_X(x, 0, p+1);\r
                                                                if(p!=pages) putPixel_X(x, height-1, p+1);\r
-                                                                               else putPixel_X(x, 99-1, p+1);\r
+                                                                               else if(height==240) putPixel_X(x, 99-1, p+1);\r
                                                                }\r
 \r
                                                for (y = 0; y <= height; ++y)\r
                                                                {\r
                                                                putPixel_X(0, y, p+1);\r
                                                                if(p!=pages) putPixel_X(width-1, y, p+1);\r
-                                                                               else putPixel_X(width-1, y, p+1);\r
+                                                                               else if(height==240) putPixel_X(width-1, y, p+1);\r
                                                                }\r
 \r
-                                               for (x = 0; x < 16; ++x)\r
-                                                               for (y = 0; y < 16; ++y)\r
-                                                                               putPixel_X(x+(p+2)*16, y+(p+2)*16, x + y*16);\r
+                                               for (x = 0; x < TILEWH; ++x)\r
+                                                               for (y = 0; y < TILEWH; ++y)\r
+                                                                               putPixel_X(x+(p+2)*16, y+(p+2)*TILEWH, x + y*TILEWH);\r
                                                //}\r
 \r
-//                             drawText(0, 0, 15, p);\r
-\r
                                }\r
 \r
                /* Each pages will now contain a different image.  Let the user cycle\r
                   through all the pages by pressing a key. */\r
-               for (p = 0; p <= pages; ++p)\r
+               for (p = 0; p < pages; ++p)\r
                                {\r
                                setVisiblePage(p);\r
-                               //drawText(0, 240, 15, "bakapi");\r
                                getch();\r
                                }\r
 \r
@@ -996,9 +995,11 @@ int main(void)
                }\r
 //++++0000\r
                setvideo(0);\r
+               printf("wwww\n[%d][%d]\n", width,height);\r
+//             setvideo(0);\r
 //mxTerm();\r
 //mxGetVersion();\r
-               puts("Where to next?  It's your move! wwww");\r
+               puts("where to next?  It's your move! wwww");\r
                printf("bakapi ver. 1.04.09.03\nis made by sparky4\81i\81\86\83Ö\81\85\81j feel free to use it ^^\nLicence: GPL v2\n");\r
                return 0;\r
                }\r