1,3 → 1,4 |
|
#include <stdlib.h> |
#include <string.h> |
#include <stdio.h> |
9,6 → 10,18 |
#include "doomstat.h" |
#include "i_net.h" |
|
#ifdef DLHEAP |
|
void* _cdecl dlmalloc(size_t); |
void _cdecl dlfree(void*); |
void _cdecl mf_init(); |
|
#define malloc dlmalloc |
#define free dlfree |
#define realloc dlrealloc |
|
#endif |
|
#ifndef B_HOST_IS_LENDIAN |
#define B_HOST_IS_LENDIAN 1 |
#endif |
56,6 → 69,7 |
|
static int first_user_port=IPPORT_USERRESERVED+0x1D+0x10; |
|
/********** |
int GetAvailPort(void) |
{ |
int i,d0; |
70,11 → 84,11 |
I_Error("Unable to get new port\n"); |
return -1; |
} |
**********/ |
|
|
int CreateInputUDPsocket(void) |
{ |
int d0; |
int d0=0; |
//__asm__ __volatile__( |
// "int $0x40" |
// :"=a"(d0) |
109,6 → 123,11 |
{ |
int c; |
doomdata_t sw; |
|
|
//printf("ERROR Packet Send\n\r"); |
|
|
// byte swap |
sw.checksum = htonl(netbuffer->checksum); |
sw.player = netbuffer->player; |
158,6 → 177,7 |
// |
// I_InitNetwork |
// |
|
void I_InitNetwork (void) |
{ |
boolean trueval = true; |
226,16 → 246,20 |
// __libclog_printf("DOOM: Input UDP socket is %d\n",insocket); |
} |
|
|
void I_NetCmd (void) |
{ |
|
|
//printf("ERROR NetCmd"); |
|
|
if (doomcom->command == CMD_SEND) |
{ |
netsend (); |
// netsend (); |
} |
else if (doomcom->command == CMD_GET) |
{ |
netget (); |
// netget (); |
} |
else |
I_Error ("Bad net cmd: %i\n",doomcom->command); |