X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fscroll.c;h=0c37c8c43f8a112902e171e216254e0f7a6fbdeb;hb=bb3be3ebd67ad43d7b5705efc2b5be70fad01422;hp=6fdee8a648ac54d322720e0d692cf79046cc23b7;hpb=0004dc99fabef783aacb99f55e315d2df0d44e9d;p=16.git diff --git a/src/scroll.c b/src/scroll.c index 6fdee8a6..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. * @@ -21,7 +21,7 @@ */ #include "src/lib/scroll16.h" -#include "src/lib/timer.h" +#include "src/lib/16_timer.h" #include "src/lib/wcpu/wcpu.h" //#define FADE @@ -64,7 +64,28 @@ void main(int argc, char *argv[]) if(argv[1]) bakapee = atoi(argv[1]); else bakapee = 1; - testcontrolnoisy=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; player[0].speed=4; @@ -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");