X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fscroll.c;h=bb0863045ea27ad95b12a4409cca71506017c570;hb=8e974b9ed72a1521714ea3cf96a9b87c68db8025;hp=c92469cb0f30ea5fc2429acde1fd99b8b207f144;hpb=2e3fb239b58cf341ceb5b4e7b39b6542f5581cae;p=16.git diff --git a/src/scroll.c b/src/scroll.c index c92469cb..bb086304 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -29,7 +29,7 @@ //#define FADE #define MODEX //this is for mode x initiating -boolean dbg_noplayerinpu=1; +boolean dbg_nommpmca=1; //word far *clock= (word far*) 0x046C; /* 18.2hz clock */ //bitmap_t *p; @@ -42,7 +42,7 @@ float t; sword bakapee; pan_t pan; //debugswitches -boolean panswitch=1; +boolean panswitch=0;//1 //extern boolean pageflipflop=1; unsigned int i; const char *cpus; @@ -65,39 +65,10 @@ void main(int argc, char *argv[]) if(argv[1]) bakapee = atoi(argv[1]); else bakapee = 1; - // DOSLIB: check our environment - probe_dos(); - - // DOSLIB: what CPU are we using? - // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS. - // So this code by itself shouldn't care too much what CPU it's running on. Except that other - // parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for - // the CPU to carry out tasks. --J.C. - cpu_probe(); - - // DOSLIB: check for VGA - if (!probe_vga()) { - printf("VGA probe failed\n"); - return; - } - // hardware must be VGA or higher! - if (!(vga_state.vga_flags & VGA_IS_VGA)) { - printf("This program requires VGA or higher graphics hardware\n"); - return; - } - - if (_DEBUG_INIT() == 0) { -#ifdef DEBUGSERIAL - printf("WARNING: Failed to initialize DEBUG output\n"); -#endif - } - _DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log - _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U); + Startup16(&gvar); pan.pn=1; - start_timer(&gvar); - /* create the map */ fprintf(stderr, "testing map load~ "); loadmap("data/test.map", &map); @@ -123,11 +94,7 @@ void main(int argc, char *argv[]) #endif /* input! */ if(!dbg_noplayerinpu) - { - IN_Startup(); - IN_Default(0,&player,ctrl_Joystick); - //IN_Default(1,&player,ctrl_Joystick); - } + IN_Default(0,&player,ctrl_Keyboard1); /* save the palette */ #ifdef MODEX @@ -184,7 +151,7 @@ void main(int argc, char *argv[]) //default player position on the viewable map player[0].tx = mv[0].tx + mv[0].page->tilemidposscreenx; player[0].ty = mv[0].ty + mv[0].page->tilemidposscreeny; - IN_initplayer(&player);//, 0); + IN_initplayer(&player, 0); //IN_initplayer(&player, 1); #ifndef SPRITE @@ -228,11 +195,11 @@ void main(int argc, char *argv[]) //when player[0].tx or player[0].ty == 0 or player[0].tx == 20 or player[0].ty == 15 then stop because that is edge of map and you do not want to walk of the map //player movement - IN_ReadControl(/*0,*/&player); + IN_ReadControl(0, &player); if(!panswitch){ - walk(mv, player, 0); + walk(mv, &player, 0); }else{ - panpagemanual(mv, player, 0); + panpagemanual(mv, &player, 0); //printf(" player[0].q: %d", player[0].q); printf(" player[0].d: %d\n", player[0].d); } @@ -330,8 +297,7 @@ void main(int argc, char *argv[]) #endif VGAmodeX(0, 1, &gvar); #endif - if(!dbg_noplayerinpu) - IN_Shutdown(); + Shutdown16(&gvar); printf("\nProject 16 scroll.exe. This is just a test file!\n"); printf("version %s\n", VERSION); printf("tx: %d ", mv[0].tx); @@ -360,8 +326,7 @@ void main(int argc, char *argv[]) //printf("mv[%u].tx: %d", pan.pn, mv[pan.pn].tx); printf(" mv[%u].ty: %d ", pan.pn, mv[pan.pn].ty); printf("gvar.video.p=%u ", gvar.video.p); printf("gvar.video.r=%u ", gvar.video.r); printf("pageflipflop=%u\n", pageflipflop); - //0000printf("\ngvar.video.tickclk=%f\n", gvar.video.tickclk); - //0000printf("gvar.video.clk=%f", gvar.video.clk); + //printf("gvar.kurokku: "); printf("%.0f ", clock()); printf("tiku=%lu ", gvar.kurokku.tiku); printf("t=%.0f ", gvar.kurokku.t); printf("ticktock()=%f ", ticktock(&gvar)); printf("%.0f fps", (double)gvar.kurokku.tiku/ticktock(&gvar)); printf("\n"); //printf("map.width=%d map.height=%d map.data[0]=%d\n", mv[0].map->width, mv[0].map->height, mv[0].map->data[0]);