mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 00:21:38 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@1126 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5be3b76e85
commit
7aa2930514
14 changed files with 101 additions and 128 deletions
|
@ -285,6 +285,12 @@ endif
|
||||||
|
|
||||||
include Makefile.deps
|
include Makefile.deps
|
||||||
|
|
||||||
|
ifneq (0,$(ENET_NETWORKING))
|
||||||
|
duke3d_h+=$(EINC)/enet_mmulti.h
|
||||||
|
else
|
||||||
|
duke3d_h+=$(EINC)/mmulti.h
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: enginelib editorlib
|
.PHONY: enginelib editorlib
|
||||||
enginelib editorlib:
|
enginelib editorlib:
|
||||||
-mkdir -p $(EOBJ)
|
-mkdir -p $(EOBJ)
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
duke3d_h=$(EINC)/build.h $(EINC)/polymer.h $(EINC)/pragmas.h $(EINC)/compat.h $(EINC)/cache1d.h $(EINC)/baselayer.h $(SRC)/jmact/types.h $(SRC)/jmact/file_lib.h $(SRC)/jmact/util_lib.h $(SRC)/jmact/keyboard.h $(SRC)/jmact/control.h $(INC)/gamedefs.h $(INC)/function.h $(INC)/config.h $(INC)/sounds.h $(INC)/rts.h $(INC)/_rts.h $(INC)/soundefs.h $(SRC)/jaudiolib/fx_man.h $(SRC)/jaudiolib/music.h $(INC)/namesdyn.h $(INC)/funct.h $(INC)/duke3d.h
|
duke3d_h=$(EINC)/build.h $(EINC)/polymer.h $(EINC)/pragmas.h $(EINC)/compat.h $(EINC)/cache1d.h $(EINC)/baselayer.h $(SRC)/jmact/types.h $(SRC)/jmact/file_lib.h $(SRC)/jmact/util_lib.h $(SRC)/jmact/keyboard.h $(SRC)/jmact/control.h $(INC)/gamedefs.h $(INC)/function.h $(INC)/config.h $(INC)/sounds.h $(INC)/rts.h $(INC)/_rts.h $(INC)/soundefs.h $(SRC)/jaudiolib/fx_man.h $(SRC)/jaudiolib/music.h $(INC)/namesdyn.h $(INC)/funct.h $(INC)/duke3d.h
|
||||||
|
|
||||||
ifneq (0,$(ENET_NETWORKING))
|
|
||||||
duke3d_h+=$(EINC)/enet_mmulti.h
|
|
||||||
else
|
|
||||||
duke3d_h+=$(EINC)/mmulti.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
gamedef_h=$(SRC)/gamedef.h
|
gamedef_h=$(SRC)/gamedef.h
|
||||||
|
|
||||||
$(OBJ)/game.$o: $(SRC)/game.c $(SRC)/jmact/scriplib.h $(duke3d_h) $(INC)/osdfuncs.h $(INC)/osdcmds.h $(INC)/grpscan.h
|
$(OBJ)/game.$o: $(SRC)/game.c $(SRC)/jmact/scriplib.h $(duke3d_h) $(INC)/osdfuncs.h $(INC)/osdcmds.h $(INC)/grpscan.h
|
||||||
|
|
|
@ -22,6 +22,7 @@ EDITORLIB=build.lib
|
||||||
DXROOT=c:\sdks\dx6
|
DXROOT=c:\sdks\dx6
|
||||||
MSSDKROOT="C:\Program Files\Microsoft Visual Studio 8\VC
|
MSSDKROOT="C:\Program Files\Microsoft Visual Studio 8\VC
|
||||||
PLATFORMSDK="C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
|
PLATFORMSDK="C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
|
||||||
|
ENETROOT=$(SRC)\enet
|
||||||
|
|
||||||
# /D these to enable certain features of the port's compile process
|
# /D these to enable certain features of the port's compile process
|
||||||
# NOASM When defined, uses C instead of assembly code
|
# NOASM When defined, uses C instead of assembly code
|
||||||
|
@ -44,7 +45,7 @@ CC=cl
|
||||||
AS=ml
|
AS=ml
|
||||||
RC=rc
|
RC=rc
|
||||||
LINK=link /opt:nowin98 /opt:ref /nologo
|
LINK=link /opt:nowin98 /opt:ref /nologo
|
||||||
CFLAGS=$(CFLAGS) /nologo /MD /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(DXROOT)\include /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include"
|
CFLAGS=$(CFLAGS) /nologo /MD /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(DXROOT)\include /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include /I$(ENETROOT)\include"
|
||||||
ASFLAGS=/nologo /coff /c
|
ASFLAGS=/nologo /coff /c
|
||||||
EXESUFFIX=.exe
|
EXESUFFIX=.exe
|
||||||
|
|
||||||
|
@ -66,7 +67,7 @@ ENGINEOBJS= \
|
||||||
$(OBJ)\lzf_d.$o \
|
$(OBJ)\lzf_d.$o \
|
||||||
$(OBJ)\lzwnew.$o \
|
$(OBJ)\lzwnew.$o \
|
||||||
$(OBJ)\md4.$o \
|
$(OBJ)\md4.$o \
|
||||||
$(OBJ)\mmulti.$o \
|
$(OBJ)\mmulti_unstable.$o \
|
||||||
$(OBJ)\osd.$o \
|
$(OBJ)\osd.$o \
|
||||||
$(OBJ)\pragmas.$o \
|
$(OBJ)\pragmas.$o \
|
||||||
$(OBJ)\scriptfile.$o \
|
$(OBJ)\scriptfile.$o \
|
||||||
|
|
|
@ -14,7 +14,7 @@ endif
|
||||||
SDL_FRAMEWORK = 0
|
SDL_FRAMEWORK = 0
|
||||||
|
|
||||||
# Overridden for OSes that don't have the cutdown stdc++ that is supc++
|
# Overridden for OSes that don't have the cutdown stdc++ that is supc++
|
||||||
STDCPPLIB=-lstdc++
|
STDCPPLIB=-lsupc++
|
||||||
|
|
||||||
BUILDCFLAGS=
|
BUILDCFLAGS=
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ ifeq ($(PLATFORM),WINDOWS)
|
||||||
BUILDCFLAGS+= -DHAVE_INTTYPES
|
BUILDCFLAGS+= -DHAVE_INTTYPES
|
||||||
EXESUFFIX=.exe
|
EXESUFFIX=.exe
|
||||||
LIBS+= -lmingwex -lwinmm -L$(DXROOT)/lib -lwsock32 -lcomctl32 #-lshfolder
|
LIBS+= -lmingwex -lwinmm -L$(DXROOT)/lib -lwsock32 -lcomctl32 #-lshfolder
|
||||||
STDCPPLIB=-lstdc++
|
# STDCPPLIB=-lstdc++
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),BSD)
|
ifeq ($(PLATFORM),BSD)
|
||||||
RENDERTYPE=SDL
|
RENDERTYPE=SDL
|
||||||
|
|
|
@ -13,7 +13,7 @@ extern int natfree; //Addfaz NatFree
|
||||||
int initmultiplayersparms(int argc, char **argv);
|
int initmultiplayersparms(int argc, char **argv);
|
||||||
int initmultiplayerscycle(void);
|
int initmultiplayerscycle(void);
|
||||||
|
|
||||||
void initmultiplayers(int argc, char **argv, char damultioption, char dacomrateoption, char dapriority);
|
void initmultiplayers(int argc, char **argv);
|
||||||
void setpackettimeout(int datimeoutcount, int daresendagaincount);
|
void setpackettimeout(int datimeoutcount, int daresendagaincount);
|
||||||
void uninitmultiplayers(void);
|
void uninitmultiplayers(void);
|
||||||
void sendlogon(void);
|
void sendlogon(void);
|
||||||
|
|
|
@ -3,17 +3,19 @@
|
||||||
|
|
||||||
void callcommit(void);
|
void callcommit(void);
|
||||||
void initcrc(void);
|
void initcrc(void);
|
||||||
long getcrc(char *buffer, short bufleng);
|
int getcrc(char *buffer, int bufleng);
|
||||||
void initmultiplayers(int argc, char **argv, char damultioption, char dacomrateoption, char dapriority);
|
void initmultiplayers(int argc, char **argv);
|
||||||
void sendpacket(long other, char *bufptr, long messleng);
|
void sendpacket(int other, char *bufptr, int messleng);
|
||||||
void setpackettimeout(long datimeoutcount, long daresendagaincount);
|
void setpackettimeout(int datimeoutcount, int daresendagaincount);
|
||||||
void uninitmultiplayers(void);
|
void uninitmultiplayers(void);
|
||||||
void sendlogon(void);
|
void sendlogon(void);
|
||||||
void sendlogoff(void);
|
void sendlogoff(void);
|
||||||
int getoutputcirclesize(void);
|
int getoutputcirclesize(void);
|
||||||
void setsocket(short newsocket);
|
void setsocket(int newsocket);
|
||||||
short getpacket(short *other, char *bufptr);
|
int getpacket(int *other, char *bufptr);
|
||||||
void flushpackets(void);
|
void flushpackets(void);
|
||||||
void genericmultifunction(long other, char *bufptr, long messleng, long command);
|
void genericmultifunction(int other, char *bufptr, int messleng, int command);
|
||||||
|
|
||||||
|
extern int natfree;
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -13,7 +13,7 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "mmulti_unstable.h"
|
#include "mmulti_unstable.h"
|
||||||
#include "enet/enet.h"
|
#include <enet/enet.h>
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
#define updatecrc16(crc,dat) crc = (((crc<<8)&65535)^crctable[((((unsigned short)crc)>>8)&65535)^dat])
|
#define updatecrc16(crc,dat) crc = (((crc<<8)&65535)^crctable[((((unsigned short)crc)>>8)&65535)^dat])
|
||||||
|
|
||||||
static long incnt[MAXPLAYERS], outcntplc[MAXPLAYERS], outcntend[MAXPLAYERS];
|
static int incnt[MAXPLAYERS], outcntplc[MAXPLAYERS], outcntend[MAXPLAYERS];
|
||||||
static char errorgotnum[MAXPLAYERS];
|
static char errorgotnum[MAXPLAYERS];
|
||||||
static char errorfixnum[MAXPLAYERS];
|
static char errorfixnum[MAXPLAYERS];
|
||||||
static char errorresendnum[MAXPLAYERS];
|
static char errorresendnum[MAXPLAYERS];
|
||||||
|
@ -51,24 +51,24 @@ static char errorresendnum[MAXPLAYERS];
|
||||||
static char lasterrorgotnum[MAXPLAYERS];
|
static char lasterrorgotnum[MAXPLAYERS];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
long crctable[256];
|
int crctable[256];
|
||||||
int tmpmax[8]; //addfaz variable addition (you could probs think of something better)
|
int tmpmax[8]; //addfaz variable addition (you could probs think of something better)
|
||||||
int itmp = 0; //addfaz router fix STUN
|
int itmp = 0; //addfaz router fix STUN
|
||||||
|
|
||||||
static char lastpacket[576], inlastpacket = 0;
|
static char lastpacket[576], inlastpacket = 0;
|
||||||
static short lastpacketfrom, lastpacketleng;
|
static int lastpacketfrom, lastpacketleng;
|
||||||
|
|
||||||
extern long totalclock; /* MUST EXTERN 1 ANNOYING VARIABLE FROM GAME */
|
extern int totalclock; /* MUST EXTERN 1 ANNOYING VARIABLE FROM GAME */
|
||||||
static long timeoutcount = 60, resendagaincount = 4, lastsendtime[MAXPLAYERS];
|
static int timeoutcount = 60, resendagaincount = 4, lastsendtime[MAXPLAYERS];
|
||||||
|
|
||||||
int natfree; //NatFree mode flag
|
int natfree; //NatFree mode flag
|
||||||
|
|
||||||
static short bakpacketptr[MAXPLAYERS][256], bakpacketlen[MAXPLAYERS][256];
|
static short bakpacketptr[MAXPLAYERS][256], bakpacketlen[MAXPLAYERS][256];
|
||||||
static char bakpacketbuf[BAKSIZ];
|
static char bakpacketbuf[BAKSIZ];
|
||||||
static long bakpacketplc = 0;
|
static int bakpacketplc = 0;
|
||||||
|
|
||||||
short myconnectindex, numplayers;
|
int myconnectindex, numplayers;
|
||||||
short connecthead, connectpoint2[MAXPLAYERS];
|
int connecthead, connectpoint2[MAXPLAYERS];
|
||||||
char syncstate = 0;
|
char syncstate = 0;
|
||||||
|
|
||||||
#define MAXPACKETSIZE 2048
|
#define MAXPACKETSIZE 2048
|
||||||
|
@ -83,7 +83,7 @@ typedef struct
|
||||||
short gametype; /* gametype: 1-serial,2-modem,3-net */
|
short gametype; /* gametype: 1-serial,2-modem,3-net */
|
||||||
short filler;
|
short filler;
|
||||||
char buffer[MAXPACKETSIZE];
|
char buffer[MAXPACKETSIZE];
|
||||||
long longcalladdress;
|
intptr_t longcalladdress;
|
||||||
} gcomtype;
|
} gcomtype;
|
||||||
static gcomtype *gcom;
|
static gcomtype *gcom;
|
||||||
|
|
||||||
|
@ -134,12 +134,12 @@ enum ECommitCMDs
|
||||||
gcomtype *init_network_transport(char **ARGV, int argpos);
|
gcomtype *init_network_transport(char **ARGV, int argpos);
|
||||||
void deinit_network_transport(gcomtype *gcom);
|
void deinit_network_transport(gcomtype *gcom);
|
||||||
//void callcommit(void);
|
//void callcommit(void);
|
||||||
void dosendpackets(long other);
|
void dosendpackets(int other);
|
||||||
|
|
||||||
|
|
||||||
void initcrc(void)
|
void initcrc(void)
|
||||||
{
|
{
|
||||||
long i, j, k, a;
|
int i, j, k, a;
|
||||||
|
|
||||||
for(j=0;j<256;j++) /* Calculate CRC table */
|
for(j=0;j<256;j++) /* Calculate CRC table */
|
||||||
{
|
{
|
||||||
|
@ -157,23 +157,20 @@ void initcrc(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
long getcrc(char *buffer, short bufleng)
|
int getcrc(char *buffer, int bufleng)
|
||||||
{
|
{
|
||||||
long i, j;
|
int i, j;
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
for(i=bufleng-1;i>=0;i--) updatecrc16(j,buffer[i]);
|
for(i=bufleng-1;i>=0;i--) updatecrc16(j,buffer[i]);
|
||||||
return(j&65535);
|
return(j&65535);
|
||||||
}
|
}
|
||||||
|
|
||||||
void initmultiplayers(int argc, char **argv, char damultioption, char dacomrateoption, char dapriority)
|
void initmultiplayers(int argc, char **argv)
|
||||||
{
|
{
|
||||||
long i;
|
int i;
|
||||||
|
|
||||||
UNREFERENCED_PARAMETER(argc);
|
UNREFERENCED_PARAMETER(argc);
|
||||||
UNREFERENCED_PARAMETER(damultioption);
|
|
||||||
UNREFERENCED_PARAMETER(dacomrateoption);
|
|
||||||
UNREFERENCED_PARAMETER(dapriority);
|
|
||||||
|
|
||||||
initcrc();
|
initcrc();
|
||||||
for(i=0;i<MAXPLAYERS;i++)
|
for(i=0;i<MAXPLAYERS;i++)
|
||||||
|
@ -226,9 +223,9 @@ void initmultiplayers(int argc, char **argv, char damultioption, char dacomrateo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void dosendpackets(long other)
|
void dosendpackets(int other)
|
||||||
{
|
{
|
||||||
long i, j, k, messleng;
|
int i, j, k, messleng;
|
||||||
unsigned short dacrc;
|
unsigned short dacrc;
|
||||||
|
|
||||||
if (outcntplc[other] == outcntend[other]) return;
|
if (outcntplc[other] == outcntend[other]) return;
|
||||||
|
@ -303,10 +300,10 @@ void dosendpackets(long other)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void sendpacket(long other, char *bufptr, long messleng)
|
void sendpacket(int other, char *bufptr, int messleng)
|
||||||
{
|
{
|
||||||
long i = 0;
|
int i = 0;
|
||||||
long j = 0;
|
int j = 0;
|
||||||
|
|
||||||
if (numplayers < 2) return;
|
if (numplayers < 2) return;
|
||||||
|
|
||||||
|
@ -335,14 +332,14 @@ void sendpacket(long other, char *bufptr, long messleng)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void setpackettimeout(long datimeoutcount, long daresendagaincount)
|
void setpackettimeout(int datimeoutcount, int daresendagaincount)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(datimeoutcount);
|
UNREFERENCED_PARAMETER(datimeoutcount);
|
||||||
UNREFERENCED_PARAMETER(daresendagaincount);
|
UNREFERENCED_PARAMETER(daresendagaincount);
|
||||||
// Don't do this it keeps '/f4' from working
|
// Don't do this it keeps '/f4' from working
|
||||||
// Though /f4 feels weird on my mouse.... slugish is the word...
|
// Though /f4 feels weird on my mouse.... slugish is the word...
|
||||||
/*
|
/*
|
||||||
long i;
|
int i;
|
||||||
|
|
||||||
timeoutcount = datimeoutcount;
|
timeoutcount = datimeoutcount;
|
||||||
resendagaincount = daresendagaincount;
|
resendagaincount = daresendagaincount;
|
||||||
|
@ -363,7 +360,7 @@ void sendlogon(void)
|
||||||
|
|
||||||
void sendlogoff(void)
|
void sendlogoff(void)
|
||||||
{
|
{
|
||||||
long i;
|
int i;
|
||||||
char tempbuf[2];
|
char tempbuf[2];
|
||||||
|
|
||||||
tempbuf[0] = 255;
|
tempbuf[0] = 255;
|
||||||
|
@ -378,15 +375,15 @@ int getoutputcirclesize(void)
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setsocket(short newsocket)
|
void setsocket(int newsocket)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(newsocket);
|
UNREFERENCED_PARAMETER(newsocket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
short getpacket (short *other, char *bufptr)
|
int getpacket (int *other, char *bufptr)
|
||||||
{
|
{
|
||||||
long i, messleng;
|
int i, messleng;
|
||||||
unsigned short dacrc;
|
unsigned short dacrc;
|
||||||
|
|
||||||
if (numplayers < 2) return(0);
|
if (numplayers < 2) return(0);
|
||||||
|
@ -480,7 +477,7 @@ short getpacket (short *other, char *bufptr)
|
||||||
#if (PRINTERRORS)
|
#if (PRINTERRORS)
|
||||||
initprintf("\n%ld-%ld .û ",gcom->buffer[0],(gcom->buffer[0]+1)&255);
|
initprintf("\n%ld-%ld .û ",gcom->buffer[0],(gcom->buffer[0]+1)&255);
|
||||||
#endif
|
#endif
|
||||||
messleng = ((long)gcom->buffer[3]) + (((long)gcom->buffer[4])<<8);
|
messleng = ((int)gcom->buffer[3]) + (((int)gcom->buffer[4])<<8);
|
||||||
lastpacketleng = gcom->numbytes-7-messleng;
|
lastpacketleng = gcom->numbytes-7-messleng;
|
||||||
memcpy(bufptr,&gcom->buffer[messleng+5],lastpacketleng);
|
memcpy(bufptr,&gcom->buffer[messleng+5],lastpacketleng);
|
||||||
incnt[*other]++;
|
incnt[*other]++;
|
||||||
|
@ -514,7 +511,7 @@ short getpacket (short *other, char *bufptr)
|
||||||
initprintf("\n%ld-%ld ûû ",gcom->buffer[0],(gcom->buffer[0]+1)&255);
|
initprintf("\n%ld-%ld ûû ",gcom->buffer[0],(gcom->buffer[0]+1)&255);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
messleng = ((long)gcom->buffer[3]) + (((long)gcom->buffer[4])<<8);
|
messleng = ((int)gcom->buffer[3]) + (((int)gcom->buffer[4])<<8);
|
||||||
lastpacketleng = gcom->numbytes-7-messleng;
|
lastpacketleng = gcom->numbytes-7-messleng;
|
||||||
inlastpacket = 1; lastpacketfrom = *other;
|
inlastpacket = 1; lastpacketfrom = *other;
|
||||||
|
|
||||||
|
@ -528,7 +525,7 @@ short getpacket (short *other, char *bufptr)
|
||||||
void flushpackets()
|
void flushpackets()
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
long i;
|
int i;
|
||||||
|
|
||||||
if (numplayers < 2) return;
|
if (numplayers < 2) return;
|
||||||
|
|
||||||
|
@ -551,7 +548,7 @@ void flushpackets()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void genericmultifunction(long other, char *bufptr, long messleng, long command)
|
void genericmultifunction(int other, char *bufptr, int messleng, int command)
|
||||||
{
|
{
|
||||||
if (numplayers < 2) return;
|
if (numplayers < 2) return;
|
||||||
|
|
||||||
|
@ -563,53 +560,7 @@ void genericmultifunction(long other, char *bufptr, long messleng, long command)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if UDP_NETWORKING
|
||||||
#if STUB_NETWORKING
|
|
||||||
gcomtype *init_network_transport(char **ARGV, int argpos)
|
|
||||||
{
|
|
||||||
initprintf("No networking support built in.\n");
|
|
||||||
return NULL;
|
|
||||||
} /* init_network_transport */
|
|
||||||
|
|
||||||
void deinit_network_transport(gcomtype *gcom)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void callcommit(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif (defined PLATFORM_DOS)
|
|
||||||
gcomtype *init_network_transport(char **ARGV, int argpos)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* How to talk to COMMIT is passed as a pointer to a block of memory
|
|
||||||
* that COMMIT.EXE configures...
|
|
||||||
*/
|
|
||||||
return((gcomtype *)atol(ARGV[argpos])); /* UGH! --ryan. */
|
|
||||||
} /* init_network_transport */
|
|
||||||
|
|
||||||
static union REGS regs;
|
|
||||||
|
|
||||||
#pragma aux longcall =\
|
|
||||||
"call eax",\
|
|
||||||
parm [eax]
|
|
||||||
|
|
||||||
void callcommit(void)
|
|
||||||
{
|
|
||||||
if (gcom->intnum&0xff00)
|
|
||||||
longcall(gcom->longcalladdress);
|
|
||||||
else
|
|
||||||
int386(gcom->intnum,®s,®s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void deinit_network_transport(gcomtype *gcom)
|
|
||||||
{
|
|
||||||
/* no-op, apparently. */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#elif UDP_NETWORKING
|
|
||||||
|
|
||||||
#if PLATFORM_WIN32
|
#if PLATFORM_WIN32
|
||||||
# include <winsock.h>
|
# include <winsock.h>
|
||||||
|
@ -773,8 +724,12 @@ static int get_udp_packet(int *ip, short *_port, void *pkt, size_t pktsize)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* FIXME: Will this ever receive a partial packet? */
|
/* FIXME: Will this ever receive a partial packet? */
|
||||||
int rc = recvfrom(udpsocket, pkt, pktsize, 0,
|
int rc = recvfrom(udpsocket, pkt, pktsize, 0, (struct sockaddr *) &addr,
|
||||||
(struct sockaddr *) &addr, (unsigned int *)&fromlen);
|
#ifdef _WIN32
|
||||||
|
(int *)&fromlen);
|
||||||
|
#else
|
||||||
|
(unsigned int *)&fromlen);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (rc == -1)
|
if (rc == -1)
|
||||||
err = neterrno();
|
err = neterrno();
|
||||||
|
@ -889,8 +844,8 @@ static int get_udp_packet(int *ip, short *_port, void *pkt, size_t pktsize)
|
||||||
static char *read_whole_file(const char *cfgfile)
|
static char *read_whole_file(const char *cfgfile)
|
||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
long len, rc;
|
int len, rc;
|
||||||
long handle;
|
int handle;
|
||||||
|
|
||||||
if (cfgfile == NULL)
|
if (cfgfile == NULL)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
@ -949,14 +904,14 @@ static char *get_token(char **ptr)
|
||||||
|
|
||||||
static int set_socket_blockmode(int onOrOff)
|
static int set_socket_blockmode(int onOrOff)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned int flags;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
/* set socket to be (non-)blocking. */
|
/* set socket to be (non-)blocking. */
|
||||||
|
|
||||||
#if PLATFORM_WIN32
|
#if PLATFORM_WIN32
|
||||||
flags = (onOrOff) ? 0 : 1;
|
flags = (onOrOff) ? 0 : 1;
|
||||||
rc = (ioctlsocket(udpsocket, FIONBIO, &flags) == 0);
|
rc = (ioctlsocket(udpsocket, FIONBIO, (void *) &flags) == 0);
|
||||||
#else
|
#else
|
||||||
flags = fcntl(udpsocket, F_GETFL, 0);
|
flags = fcntl(udpsocket, F_GETFL, 0);
|
||||||
if ((signed)flags != -1)
|
if ((signed)flags != -1)
|
||||||
|
@ -1085,7 +1040,7 @@ static int connect_to_everyone(gcomtype *gcom, int myip, int bcast)
|
||||||
short port;
|
short port;
|
||||||
int first_send = 1;
|
int first_send = 1;
|
||||||
unsigned short heard_from[MAX_PLAYERS];
|
unsigned short heard_from[MAX_PLAYERS];
|
||||||
unsigned long resendat;
|
unsigned int resendat;
|
||||||
int max;
|
int max;
|
||||||
int remaining;
|
int remaining;
|
||||||
|
|
||||||
|
@ -1124,6 +1079,9 @@ static int connect_to_everyone(gcomtype *gcom, int myip, int bcast)
|
||||||
|
|
||||||
while ((remaining) && (!ctrlc_pressed))
|
while ((remaining) && (!ctrlc_pressed))
|
||||||
{
|
{
|
||||||
|
handleevents();
|
||||||
|
if (quitevent) ctrlc_pressed = 1;
|
||||||
|
|
||||||
if (resendat <= getticks())
|
if (resendat <= getticks())
|
||||||
{
|
{
|
||||||
if (bcast)
|
if (bcast)
|
||||||
|
|
|
@ -104,6 +104,10 @@
|
||||||
RelativePath=".\build\include\editor.h"
|
RelativePath=".\build\include\editor.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\build\include\enet_mmulti.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\build\include\glbuild.h"
|
RelativePath=".\build\include\glbuild.h"
|
||||||
>
|
>
|
||||||
|
@ -136,6 +140,10 @@
|
||||||
RelativePath=".\build\include\mmulti.h"
|
RelativePath=".\build\include\mmulti.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\build\include\mmulti_unstable.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\build\include\mmultimsgs.h"
|
RelativePath=".\build\include\mmultimsgs.h"
|
||||||
>
|
>
|
||||||
|
@ -232,6 +240,10 @@
|
||||||
RelativePath=".\build\src\dynamicgtk.c"
|
RelativePath=".\build\src\dynamicgtk.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\build\src\enet_mmulti.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\build\src\engine.c"
|
RelativePath=".\build\src\engine.c"
|
||||||
>
|
>
|
||||||
|
@ -284,6 +296,10 @@
|
||||||
RelativePath=".\build\src\mmulti_null.c"
|
RelativePath=".\build\src\mmulti_null.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\build\src\mmulti_unstable.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\build\src\osd.c"
|
RelativePath=".\build\src\osd.c"
|
||||||
>
|
>
|
||||||
|
|
|
@ -44,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BUILDDATE " 20081107"
|
#define BUILDDATE " 20081111"
|
||||||
#define VERSION " 1.2.0devel"
|
#define VERSION " 1.2.0devel"
|
||||||
|
|
||||||
static int floor_over_floor;
|
static int floor_over_floor;
|
||||||
|
|
|
@ -583,14 +583,8 @@ extern input_t loc;
|
||||||
extern input_t recsync[RECSYNCBUFSIZ];
|
extern input_t recsync[RECSYNCBUFSIZ];
|
||||||
extern int avgfvel, avgsvel, avgavel, avghorz, avgbits, avgextbits;
|
extern int avgfvel, avgsvel, avgavel, avghorz, avgbits, avgextbits;
|
||||||
|
|
||||||
#ifdef ENET_NETWORKING
|
|
||||||
// HACK: should be changed in the enet network backend
|
|
||||||
extern short numplayers, myconnectindex;
|
|
||||||
extern short connecthead, connectpoint2[MAXPLAYERS]; //Player linked list variables (indeces, not connection numbers)
|
|
||||||
#else
|
|
||||||
extern int numplayers, myconnectindex;
|
extern int numplayers, myconnectindex;
|
||||||
extern int connecthead, connectpoint2[MAXPLAYERS]; //Player linked list variables (indeces, not connection numbers)
|
extern int connecthead, connectpoint2[MAXPLAYERS]; //Player linked list variables (indeces, not connection numbers)
|
||||||
#endif
|
|
||||||
extern int screenpeek;
|
extern int screenpeek;
|
||||||
|
|
||||||
extern int current_menu;
|
extern int current_menu;
|
||||||
|
|
|
@ -651,12 +651,7 @@ int lastpackettime = 0;
|
||||||
void getpackets(void)
|
void getpackets(void)
|
||||||
{
|
{
|
||||||
int i, j, k, l;
|
int i, j, k, l;
|
||||||
#ifdef ENET_NETWORKING
|
|
||||||
// HACK, type should be changed in the enet network backend
|
|
||||||
short other;
|
|
||||||
#else
|
|
||||||
int other;
|
int other;
|
||||||
#endif
|
|
||||||
int packbufleng;
|
int packbufleng;
|
||||||
|
|
||||||
input_t *osyn, *nsyn;
|
input_t *osyn, *nsyn;
|
||||||
|
@ -8896,9 +8891,7 @@ static void comlinehelp(void)
|
||||||
"-r\t\tRecord demo\n"
|
"-r\t\tRecord demo\n"
|
||||||
"-rmnet FILE\tUse FILE for network play configuration (see documentation)\n"
|
"-rmnet FILE\tUse FILE for network play configuration (see documentation)\n"
|
||||||
"-keepaddr\n"
|
"-keepaddr\n"
|
||||||
#ifndef ENET_NETWORKING
|
|
||||||
"-stun\n"
|
"-stun\n"
|
||||||
#endif
|
|
||||||
"-w\t\tShow coordinates"
|
"-w\t\tShow coordinates"
|
||||||
"-noautoload\tDo not use the autoload directory\n"
|
"-noautoload\tDo not use the autoload directory\n"
|
||||||
"-nologo\t\tSkip the logo anim\n"
|
"-nologo\t\tSkip the logo anim\n"
|
||||||
|
@ -9610,13 +9603,13 @@ static void checkcommandline(int argc, const char **argv)
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#ifndef ENET_NETWORKING
|
|
||||||
if (!Bstrcasecmp(c+1,"stun"))
|
if (!Bstrcasecmp(c+1,"stun"))
|
||||||
{
|
{
|
||||||
natfree = 1; //Addfaz NatFree
|
natfree = 1; //Addfaz NatFree
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#ifndef ENET_NETWORKING
|
||||||
if (!Bstrcasecmp(c+1,"rmnet"))
|
if (!Bstrcasecmp(c+1,"rmnet"))
|
||||||
{
|
{
|
||||||
if (argc > i+1)
|
if (argc > i+1)
|
||||||
|
@ -9630,7 +9623,11 @@ static void checkcommandline(int argc, const char **argv)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!Bstrcasecmp(c+1,"net"))
|
if (!Bstrcasecmp(c+1,"net")
|
||||||
|
#ifdef ENET_NETWORKING
|
||||||
|
|| !Bstrcasecmp(c+1,"rmnet")
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
g_NoSetup = TRUE;
|
g_NoSetup = TRUE;
|
||||||
firstnet = i;
|
firstnet = i;
|
||||||
|
@ -10544,7 +10541,14 @@ static void Startup(void)
|
||||||
#ifdef ENET_NETWORKING
|
#ifdef ENET_NETWORKING
|
||||||
// TODO: split this up in the same fine-grained manner as eduke32 network backend, to
|
// TODO: split this up in the same fine-grained manner as eduke32 network backend, to
|
||||||
// allow for event handling
|
// allow for event handling
|
||||||
initmultiplayers(netparamcount,netparam, 0,0,0);
|
initmultiplayers(netparamcount,netparam);
|
||||||
|
|
||||||
|
if (quitevent)
|
||||||
|
{
|
||||||
|
Shutdown();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
if (initmultiplayersparms(netparamcount,netparam))
|
if (initmultiplayersparms(netparamcount,netparam))
|
||||||
{
|
{
|
||||||
|
@ -10978,7 +10982,6 @@ void app_main(int argc,const char **argv)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifndef ENET_NETWORKING
|
|
||||||
if (ud.config.CheckForUpdates == -1)
|
if (ud.config.CheckForUpdates == -1)
|
||||||
{
|
{
|
||||||
i=wm_ynbox("Automatic Release Notification",
|
i=wm_ynbox("Automatic Release Notification",
|
||||||
|
@ -11029,7 +11032,6 @@ void app_main(int argc,const char **argv)
|
||||||
else initprintf("update: failed to check for updates\n");
|
else initprintf("update: failed to check for updates\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
if (preinitengine())
|
if (preinitengine())
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
|
|
||||||
char *s_builddate = "20081107";
|
char *s_builddate = "20081111";
|
||||||
char *MusicPtr = NULL;
|
char *MusicPtr = NULL;
|
||||||
int Musicsize;
|
int Musicsize;
|
||||||
|
|
||||||
|
|
|
@ -348,7 +348,7 @@ int AL_Init()
|
||||||
void AL_Stop();
|
void AL_Stop();
|
||||||
void AL_Shutdown()
|
void AL_Shutdown()
|
||||||
{
|
{
|
||||||
if (openal_disabled)return;
|
if (openal_disabled || !device) return;
|
||||||
|
|
||||||
initprintf("Uninitializing OpenAL...\n");
|
initprintf("Uninitializing OpenAL...\n");
|
||||||
AL_Stop();
|
AL_Stop();
|
||||||
|
|
|
@ -403,6 +403,7 @@ static int osdcmd_rate(const osdfuncparm_t *parm)
|
||||||
}
|
}
|
||||||
else OSD_Printf("rate: value out of range\n");
|
else OSD_Printf("rate: value out of range\n");
|
||||||
#endif
|
#endif
|
||||||
|
UNREFERENCED_PARAMETER(parm);
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue