X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fscroll.c;h=0c37c8c43f8a112902e171e216254e0f7a6fbdeb;hb=25b9bc83026e8a72be55c8ba9ad73496e8654e50;hp=e7987762f78ec3b587e2c3432cac78c45130493f;hpb=b944e5a4e57c1a1ba44dff4ffafdee4edd5b5d99;p=16.git diff --git a/src/scroll.c b/src/scroll.c index e7987762..0c37c8c4 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * @@ -64,6 +64,27 @@ 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; + } + testcontrolnoisy=0; player[0].persist_aniframe=0; @@ -73,7 +94,6 @@ void main(int argc, char *argv[]) printf("starting timer "); start_timer(&gvar); printf("ok\n"); - //extern struct inconfig inpu; // atexit(qclean()); @@ -118,7 +138,7 @@ void main(int argc, char *argv[]) #endif textInit(); - VGAmodeX(bakapee, &gvar); + VGAmodeX(bakapee, 1, &gvar); // printf("%dx%d\n", gvar.video.page[0].sw, gvar.video.page[0].sh); #ifdef FADE modexPalBlack(); //reset the palette~ @@ -368,7 +388,7 @@ void main(int argc, char *argv[]) //TSR if(IN_KeyDown(87)) //f11 { - VGAmodeX(0, &gvar); + VGAmodeX(0, 0, &gvar); IN_Shutdown(); __asm { @@ -411,7 +431,7 @@ void main(int argc, char *argv[]) modexSavePalFile("data/g.pal", gpal); modexFadeOff(4, gpal); #endif - VGAmodeX(0, &gvar); + VGAmodeX(0, 1, &gvar); #endif IN_Shutdown(); printf("Project 16 scroll.exe. This is just a test file!\n");