]> 4ch.mooo.com Git - 16.git/commitdiff
modified: 16/Project 16.bfproject
authorsparky4 <sparky4@4ch.maidlab.jp>
Mon, 19 May 2014 12:05:13 +0000 (07:05 -0500)
committersparky4 <sparky4@4ch.maidlab.jp>
Mon, 19 May 2014 12:05:13 +0000 (07:05 -0500)
modified:   16/dos_gfx.cpp
modified:   16/dos_gfx.h
modified:   16/lib/lib_com.h

16/Project 16.bfproject
16/dos_gfx.cpp
16/dos_gfx.h
16/lib/lib_com.h

index 8e850a5933a9e25a79ad480dbd75b97f5aecc172..33f3135ba68a7d244206bb5ef88b7ebc186e8cbf 100644 (file)
@@ -1,17 +1,17 @@
 c2e.convert_special: 0
 e2c.convert_num: 0
-openfiles: /dos/z/16/16/dos_gfx.cpp:19214:18374:1:
-openfiles: /dos/z/16/16/dos_gfx.h:380:0:0:
-openfiles: /dos/z/16/16/dos_kb.c:658:109:0:
+openfiles: /dos/z/16/16/dos_gfx.cpp:10793:10158:1:
+openfiles: /dos/z/16/16/dos_gfx.h:537:0:0:
+openfiles: /dos/z/16/16/dos_kb.c:953:406: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/lib_com.h:0:0:0:
+openfiles: /dos/z/16/16/lib/lib_com.h:2523:1479:0:
 openfiles: /dos/z/16/16/scroll.txt:5307:5103:0:
 openfiles: /dos/z/16/16/project16.txt:1675:0:0:
 openfiles: /dos/z/16/16/16.txt:0:0:0:
 openfiles: /dos/z/16/16/lib/x/MXSM.ASM:12781:12781:0:
 openfiles: /dos/z/16/16/lib/x/MODEX.H:1768:1601:0:
-openfiles: /dos/z/16/16/lib/x/MXPN.ASM:1205:649:0:
+openfiles: /dos/z/16/16/lib/x/MXPN.ASM:1205:434:0:
 snr_recursion_level: 0
 convertcolumn_horizontally: 0
 adv_open_matchname: 0
@@ -26,7 +26,7 @@ c2e.convert_iso: 0
 opendir: file:///dos/z/16/16/lib/x
 wrap_text_default: 0
 bookmarks_filename_mode: 1
-ssearch_text: 3DA
+ssearch_text: rand
 snr_casesens: 0
 view_blocks: 1
 name: project 16
@@ -63,16 +63,16 @@ recent_files: file:///dos/z/16/16/lib_com.h
 recent_files: file:///dos/z/16/16/PCGPE10/SCROLL.TXT
 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.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/project16.txt
-recent_files: file:///dos/z/16/16/16.txt
 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/project16.txt
 recent_files: file:///dos/z/16/16/lib/x/MODEX.H
+recent_files: file:///dos/z/16/16/16.txt
 recent_files: file:///dos/z/16/16/lib/x/MXSM.ASM
-recent_files: file:///dos/z/16/16/lib/x/MXPN.ASM
 snr_replacetype: 0
 savedir: file:///dos/z/16/16
 spell_check_default: 1
@@ -84,13 +84,6 @@ snr_escape_chars: 0
 htmlbar_view: 0
 spell_lang: en
 ssearch_dotmatchall: 0
-searchlist: fill_plane(
-searchlist: fmemset
-searchlist: se
-searchlist: 
-searchlist: rect
-searchlist: fmem
-searchlist: vga
 searchlist: 386
 searchlist: CRTC_INDEX
 searchlist: setVisiblePage
@@ -99,6 +92,13 @@ searchlist: lib/x/MXPN.ASM
 searchlist: 3c0
 searchlist: ABS
 searchlist: 3DAH
+searchlist: _DX
+searchlist: unsigned
+searchlist: word
+searchlist: unsigned
+searchlist: word
+searchlist: play
+searchlist: rand
 autocomplete: 1
 outputb_show_all_output: 0
 bookmarks_show_mode: 0
index 79de22fadae6289bdb430f16558e70cb0e06da43..2f2607baf9cbe4d25484831c6894211806d3c0c0 100644 (file)
@@ -287,7 +287,98 @@ void set320x240x256_X(void)
                }\r
 \r
 \r
-/*-----------XXXX-------------*/\r
+/*-----------XXXX-------------*/
+
+/////////////////////////////////////////////////////////////////////////////\r
+//                                                                         //\r
+// WaitRetrace() - This waits until you are in a Verticle Retrace.         //\r
+//                                                                         //\r
+/////////////////////////////////////////////////////////////////////////////\r
+\r
+void WaitRetrace() {\r
+\r
+//  register char qy;\r
+\r
+       in.h.dx = 0x03DA;\r
+       in.h.al = in.h.dx;\r
+       \r
+       in.h.al &= 0x08;\r
+       int86(0x10, &in, &out);\r
+\r
+\r
+  /*l1: asm {\r
+       in  al,0x03DA;\r
+       and al,0x08;\r
+       jnz  l2;\r
+      }*/\r
+}
+
+/////////////////////////////////////////////////////////////////////////////\r
+//                                                                         //\r
+// MoveTo() - This moves to position X*4 on a chain 4 screen.              //\r
+//                Note: As soon as I find documentation, this function     //\r
+//                will be better documented.  - Snowman                    //\r
+//                                                                         //\r
+/////////////////////////////////////////////////////////////////////////////\r
+\r
+void MoveTo (word X, word Y) {\r
+\r
+//     word O = Y*SIZE*2+X;
+       word O = Y*widthBytes*2+X;\r
+\r
+  asm {\r
+    mov    bx, [O]\r
+    mov    ah, bh\r
+    mov    al, 0x0C\r
+\r
+    mov    dx, 0x3D4\r
+    out    dx, ax\r
+\r
+    mov    ah, bl\r
+    mov    al, 0x0D\r
+    mov    dx, 0x3D4\r
+    out    dx, ax\r
+  }\r
+}
+
+//Procedure Play;\r
+void Play()\r
+{\r
+  int loop1,loop2;\r
+  int xpos,ypos,xdir,ydir;\r
+  //int ch;\r
+//   for(loop1=1;loop1<=62;loop1++)\r
+     //Pal ((char)loop1,(char)loop1,(char)0,(char)(62-loop1)); // { This sets up the pallette for the pic }\r
+\r
+   moveto(0,0,Size); // { This moves the view to the top left hand corner }\r
+\r
+/*   for(loop1=0;loop1<=3;loop1++)\r
+     for(loop2=0;loop2<=5;loop2++)\r
+       Putpic (loop1*160,loop2*66); // { This places the picture all over the\r
+                                    //  chain-4 screen }\r
+   getch();\r
+   ch=0x0;*/\r
+//   xpos=rand (78)+1;\r
+//   ypos=rand (198)+1; // { Random start positions for the view }
+       xpos=0;
+       ypos=0;\r
+   xdir=1;\r
+   ydir=1;\r
+//   while(1)\r
+//   {\r
+     WaitRetrace();     //     { Take this out and watch the screen go crazy! }\r
+     moveto (xpos,ypos,Size);\r
+     xpos=xpos+xdir;\r
+     ypos=ypos+ydir;\r
+     if( (xpos>79)  || (xpos<1))xdir=-xdir;\r
+     if( (ypos>199) || (ypos<1))ydir=-ydir; // { Hit a boundry, change\r
+                                            //    direction! }\r
+//     if(_bios_keybrd(_KEYBRD_READY))ch=getch();\r
+//      if(ch==0x71)break; // 'q'\r
+//      if(ch==0x1b)break; // 'ESC'\r
+//   }\r
+}
+\r
 /*tile*/\r
 //king_crimson's code\r
 void putColorBox_X(int x, int y, int w, int h, byte color) {\r
@@ -823,9 +914,10 @@ int main(void)
                getch();\r
 \r
                while(!kbhit()){ // conditions of screen saver\r
-                       hScroll(1);\r
-                       scrolly(1);\r
-                       delay(100);\r
+//                     hScroll(1);\r
+//                     scrolly(1);\r
+//                     delay(100);
+                       Play();\r
                }\r
 //++++0000\r
                setvideo(0);\r
index 43415ab99787cf68ad75dcc30aafc42ee40f17fd..02f72c34c95d3d7c279a38fd2cd3b5f2b8c5c380 100644 (file)
@@ -11,8 +11,9 @@
 #define LGQ             32\r
 #define HGQ             56\r
 #define TILEWH                          16\r
-#define ABS(a)   ((a < 0) ? -a : a)\r
-#define SGN(a)   ((a < 0) ? -1 : 1)\r
+byte SIZE = 80;      // Size =  40 = 1 across, 4 down\r
+                     // Size =  80 = 2 across, 2 down\r
+                     // Size = 160 = 4 across, 1 down\r
 //#define VMEM            0xA000 // = vga\r
 //int width = 320;\r
 //int height = 240;\r
index d43b7172d688e3a8916b3b56c2bdd5c7d468ddc2..232d4270a2654b6d3342f466e40f0a3d44f0b21f 100644 (file)
@@ -96,7 +96,8 @@
 #define KEY_MENU               (0x75)\r
 \r
 \r
-typedef unsigned char byte;\r
+typedef unsigned char byte;
+typedef unsigned int word;\r
 \r
 void wait(clock_t wait);\r
 \r