From: sparky4 Date: Wed, 4 Jun 2014 05:15:50 +0000 (-0500) Subject: modified: 16/DOS_GFX.EXE X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=6d12b848e69f91f740168fa9e8b04dcacd3a3b24;p=16.git modified: 16/DOS_GFX.EXE modified: 16/DOS_GFX.OBJ modified: 16/Project 16.bfproject modified: 16/dos_gfx.cpp modified: 16/dos_gfx.h --- diff --git a/16/DOS_GFX.EXE b/16/DOS_GFX.EXE index 634b6bc4..4019618b 100644 Binary files a/16/DOS_GFX.EXE and b/16/DOS_GFX.EXE differ diff --git a/16/DOS_GFX.OBJ b/16/DOS_GFX.OBJ index 7b489c25..00248b20 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 7f1e4040..e962e601 100644 --- a/16/Project 16.bfproject +++ b/16/Project 16.bfproject @@ -1,21 +1,20 @@ c2e.convert_special: 0 e2c.convert_num: 0 -openfiles: /dos/z/16/16/dos_gfx.cpp:7011:6876:1: -openfiles: /dos/z/16/16/dos_gfx.h:477:0:0: +openfiles: /dos/z/16/16/dos_gfx.cpp:6494:6858:1: +openfiles: /dos/z/16/16/dos_gfx.h:363: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/lib_com.h:2553:1416:0: openfiles: /dos/z/16/16/scroll.txt:5307:5080:0: -openfiles: /dos/z/16/16/project16.txt:8161:7087:0: +openfiles: /dos/z/16/16/project16.txt:8161:6091:0: openfiles: /dos/z/16/16/16.txt:0:0:0: -openfiles: /dos/z/16/16/lib/x/MODEX.H:4215:3474:0: -openfiles: /dos/z/16/16/lib/x/MODEX.DEF:4471:3131:0: -openfiles: /dos/z/16/16/lib/x/MAKEFILE:1186:782:0: -openfiles: /dos/z/4x4_16/modex/DEMO07.PAS:985:490:0: +openfiles: /dos/z/16/16/lib/x/MODEX.H:4025:2832:0: openfiles: /dos/z/16/16/lib/intro/lib.c:2417:1910:0: openfiles: /dos/z/16/src/lib/dos_gfx.cpp:2384:0:0: openfiles: /dos/z/16/src/lib/dos_gfx.h:0:0:0: +openfiles: /dos/z/4x4_16/modex/DEMO01.PAS:3301:2608:0: +openfiles: /dos/z/4x4_16/!/c/TUT10.C:4286:3454:0: snr_recursion_level: 0 convertcolumn_horizontally: 0 adv_open_matchname: 0 @@ -27,10 +26,10 @@ view_left_panel: 0 default_mime_type: text/plain e2c.convert_xml: 1 c2e.convert_iso: 0 -opendir: file:///dos/z/16/src/lib +opendir: file:///dos/z/4x4_16/!/c wrap_text_default: 0 bookmarks_filename_mode: 1 -ssearch_text: text +ssearch_text: Readkey; snr_casesens: 0 view_blocks: 1 name: project 16 @@ -79,21 +78,23 @@ recent_files: file:///dos/z/16/16/xx.bat 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/dos_gfx.cpp -recent_files: file:///dos/z/16/16/lib/lib_com.h 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/src/lib/dos_gfx.h -recent_files: file:///dos/z/16/src/lib/dos_gfx.cpp -recent_files: file:///dos/z/4x4_16/modex/DEMO07.PAS -recent_files: file:///dos/z/16/16/lib/x/MAKEFILE recent_files: file:///dos/z/16/16/lib/x/MODEX.H recent_files: file:///dos/z/16/16/lib/x/MODEX.DEF +recent_files: file:///dos/z/16/src/lib/dos_gfx.h +recent_files: file:///dos/z/16/16/16.txt +recent_files: file:///dos/z/4x4_16/modex/DEMO07.PAS +recent_files: file:///dos/z/16/src/lib/dos_gfx.cpp recent_files: file:///dos/z/16/16/lib/intro/lib.c +recent_files: file:///dos/z/16/16/lib/x/MAKEFILE +recent_files: file:///dos/z/4x4_16/modex/DEMO01.PAS +recent_files: file:///dos/z/4x4_16/!/c/TUT10.C snr_replacetype: 0 savedir: file:///dos/z/16/16 spell_check_default: 1 @@ -105,11 +106,6 @@ snr_escape_chars: 0 htmlbar_view: 0 spell_lang: en ssearch_dotmatchall: 0 -searchlist: setvir -searchlist: virtual -searchlist: STEPS -searchlist: mxSetClip( TRUE ); -searchlist: world_matrix searchlist: mxPutPixel searchlist: setactive searchlist: vga @@ -120,6 +116,11 @@ searchlist: mxSetTextColor searchlist: OP_TRANS searchlist: texyt searchlist: text +searchlist: Palette +searchlist: bios_keybrd +searchlist: Readkey; Readkey; +searchlist: Readkey; +searchlist: Readkey; autocomplete: 1 outputb_show_all_output: 0 bookmarks_show_mode: 0 diff --git a/16/dos_gfx.cpp b/16/dos_gfx.cpp index 195624d0..40c0a24d 100644 --- a/16/dos_gfx.cpp +++ b/16/dos_gfx.cpp @@ -112,7 +112,7 @@ int ding(int q){ ||q==16 ) && gq == BONK){ if(coor < HGQ && coor < LGQ) coor = LGQ; - if(coor < HGQ){ + if(coor < HGQ-1){ coor++; }else{ coor = LGQ; bakax = rand()%3; bakay = rand()%3; @@ -182,18 +182,18 @@ int ding(int q){ } }else{ if(!bakax){ - xx-=TILEWH; -// xx--; +// xx-=TILEWH; + xx--; }else if(bakax>1){ - xx+=TILEWH; -// xx++; +// xx+=TILEWH; + xx++; } if(!bakay){ - yy-=TILEWH; -// yy--; +// yy-=TILEWH; + yy--; }else if(bakay>1){ - yy+=TILEWH; -// yy++; +// yy+=TILEWH; + yy++; } } } @@ -216,13 +216,13 @@ int ding(int q){ // plot the pixel }else{ - mxFillBox(xx, yy, TILEWH, TILEWH, coor, 0); -// mxPutPixel(xx, yy, coor); +// mxFillBox(xx, yy, TILEWH, TILEWH, coor, 16); + mxPutPixel(xx, yy, coor); } - if(q==2) mxPutPixel(rand()%SW, rand()%(SH*3), 0); - if(q==16) mxPutPixel(rand()%SW, rand()%(SH*3), 0); - if(q==2||q==4||q==16){ bakax = rand()%3; bakay = rand()%3; } + if(q==2) mxPutPixel(rand()%VW, rand()%(VH), 0); + if(q==16) mxPutPixel(rand()%VW, rand()%(VH), 0); + if(q==2||q==4||q==16){ bakax = rand()%3; bakay = rand()%3; } //random 3 switch gq++; //if(xx<0||xx>320||yy<0||yy>(SH*3)) // printf("%d %d %d %d %d %d\n", xx, yy, coor, bakax, bakay, getPixel_X(xx,yy)); @@ -244,7 +244,8 @@ int ding(int q){ int main(void) { - int key,d,xpos,ypos,xdir,ydir; + int key,d,xpos,ypos,xdir,ydir; + int ch=0x0; //short int temp; // main variables d=1; // switch variable @@ -269,8 +270,9 @@ int main(void) setvideo(1); } }*/ // else off - while(!kbhit()){ // conditions of screen saver - ding(key); + while(1){ // conditions of screen saver + while(!kbhit()){ + ding(key); } //end of screen savers //doTest(); @@ -284,8 +286,6 @@ int main(void) mxPutPixel(0, y, 15); mxPutPixel(SW-1, y, 15); } - - getch(); for (int x = 320; x < VW; ++x) { mxPutPixel(x, 0, 15); @@ -295,12 +295,18 @@ int main(void) { mxPutPixel(0, y, 15); mxPutPixel(VW-1, y, 15); - } + } + + getch(); + //mxFillBox(xx, yy, QUADWH, QUADWH, 1, 16); + //mxFillBox(xx, yy, QUADWH, QUADWH, 2, 16); + //mxFillBox(xx, yy, QUADWH, QUADWH, 3, 16); + //mxFillBox(xx, yy, QUADWH, QUADWH, 4, 16); mxSetTextColor(16, OP_TRANS); - mxOutText(64, SH-40, "CRAZY!!!!"); - mxOutText(64, SH-32, "CRAZY!!!!"); - mxOutText(64, SH-24, " _ CRAZY!!!!"); - mxOutText(64, SH-16, " _ _ CRAZY!!!!"); + mxOutText(56, SH-40, "CRAZY!!!!]"); + mxOutText(64, SH-32, "CRAZY!!!!]"); + mxOutText(64, SH-24, "____ CRAZY!!!!]"); + mxOutText(56, SH-16, "___ _ CRAZY!!!!]"); getch(); while(!kbhit()){ // hScroll(1); @@ -309,18 +315,23 @@ int main(void) // delay(100); //for(int i=0;i(VW-SW-1)) || (xpos<1)){xdir=-xdir;} if( (ypos>(VH-SH-1)) || (ypos<1)){ydir=-ydir;} // { Hit a boundry, change // direction! } - //} + } + ch=getch(); + if(ch==0x71)break; // 'q' + if(ch==0x1b)break; // 'ESC' } setvideo(0); printf("wwww\nResolution: %dx%d\n", SW,SH); diff --git a/16/dos_gfx.h b/16/dos_gfx.h index 6c7bbeea..a6a08f9f 100644 --- a/16/dos_gfx.h +++ b/16/dos_gfx.h @@ -11,7 +11,8 @@ #define BONK 400 #define LGQ 32 #define HGQ 56 -#define TILEWH 16 +#define TILEWH 16 +#define QUADWH TILEWH/4 /*byte SIZE = 80; // Size = 40 = 1 across, 4 down // Size = 80 = 2 across, 2 down // Size = 160 = 4 across, 1 down*/