X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2F16.c;h=27c17a58c57641cb14d8324a26b040567f53b8d0;hb=0b27dec43b461090fb2b9770f031dd230a9a0f75;hp=5ee40aa99c7505274a26be3895d0735b6f0d0686;hpb=b944e5a4e57c1a1ba44dff4ffafdee4edd5b5d99;p=16.git diff --git a/src/16.c b/src/16.c index 5ee40aa9..27c17a58 100755 --- a/src/16.c +++ b/src/16.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. * @@ -32,6 +32,27 @@ player_t player[MaxPlayers]; void main(int argc, char *argv[]) { + // 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; + } + //screen = modexDefaultPage(); engi_stat = ENGI_RUN; //textInit(); @@ -45,7 +66,7 @@ main(int argc, char *argv[]) /*modexPalSave(gpal); modexSavePalFile("data/g.pal", gpal);*/ printf("wwww loop wwww\n"); - VGAmodeX(1, &gvar); + VGAmodeX(1, 1, &gvar); modexPalBlack(); //so player will not see loadings~ IN_Startup(); IN_Default(0,&player,ctrl_Joystick); @@ -62,7 +83,7 @@ main(int argc, char *argv[]) case 2: cpus = "386 or newer"; break; default: cpus = "internal error"; break; } - VGAmodeX(0, &gvar); + VGAmodeX(0, 1, &gvar); printf("Project 16 16.exe. This is supposed to be the actual finished game executable!\n"); printf("version %s\n", VERSION); printf("detected CPU type: %s\n", cpus);