Giter Site home page Giter Site logo

//#define DOOM2

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <process.h> #include <conio.h> #include <dos.h>

#include "doomnet.h" //#include "ipxstr.h" #include "ipx_frch.h" // FRENCH VERSION

doomcom_t doomcom; int vectorishooked; void interrupt (*olddoomvect) (void);

/*

= = LaunchDOOM

These fields in doomcom should be filled in before calling:

 short     numnodes;      // console is allways node 0
 short     ticdup;             // 1 = no duplication, 2-5 = dup for 

slow nets short extratics; // 1 = send a backup tic in every packet

 short     consoleplayer; // 0-3 = player number
 short     numplayers;         // 1-4
 short     angleoffset;   // 1 = left, 0 = center, -1 = right
 short     drone;              // 1 = drone

============= */

void LaunchDOOM (void) { char *newargs[99]; char adrstring[10]; long flatadr;

// prepare for DOOM doomcom.id = DOOMCOM_ID;

// hook the interrupt vector olddoomvect = getvect (doomcom.intnum); setvect (doomcom.intnum,(void interrupt (*)(void))MK_FP(_CS, (int)NetISR)); vectorishooked = 1;

// build the argument list for DOOM, adding a -net &doomcom memcpy (newargs, _argv, (_argc+1)2); newargs[_argc] = "-net"; flatadr = (long)_DS16 + (unsigned)&doomcom; sprintf (adrstring,"%lu",flatadr); newargs[_argc+1] = adrstring; newargs[_argc+2] = NULL;

 if (!access("doom2.exe",0))
	spawnv  (P_WAIT, "doom2", newargs);
 else
	spawnv  (P_WAIT, "doom", newargs);

 #ifdef DOOM2
 printf (STR_RETURNED"\n");
 #else
 printf ("Returned from DOOM\n");
 #endif

}

mwood5970's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.