Fixed build system, minor fixes

This commit is contained in:
Bradley Bell 2001-01-29 13:35:09 +00:00
parent ff512f8d21
commit 80db083ba9
18 changed files with 368 additions and 71 deletions

View file

@ -1,13 +1,24 @@
SUBDIRS = include dos linux ogl sdl win32
SUBDIRS = include dos linux ogl win32
noinst_LIBRARIES = libarch.a
INCLUDES = -I$(top_srcdir)/includes -I$(top_srcdir)/main -I$(top_srcdir)/arch/include
libarch_a_SOURCES = \
dos_init.c dos_vesa.c dos_findfile.c dos_dpmi.c dos_ipx.c \
linux_init.c linux_findfile.c linux_net.c linux_ipx_bsd.c \
linux_ipx_lin.c linux_ipx_udp.c \
sdl_init.c sdl_timer.c
if ENV_DJGPP
libarch_a_SOURCES = dos_init.c dos_vesa.c dos_findfile.c dos_dpmi.c dos_ipx.c
else
if USE_NETWORK
libarch_a_SOURCES = linux_init.c linux_findfile.c sdl_init.c sdl_timer.c \
linux_ipx_bsd.c linux_ipx_lin.c linux_ipx_udp.c linux_net.c
else
libarch_a_SOURCES = linux_init.c linux_findfile.c sdl_init.c sdl_timer.c
endif
endif
EXTRA_libarch_a_SOURCES = \
dos_init.c dos_vesa.c dos_findfile.c dos_dpmi.c dos_ipx.c \
linux_init.c linux_findfile.c \
linux_net.c linux_ipx_bsd.c linux_ipx_lin.c linux_ipx_udp.c \
sdl_init.c sdl_timer.c
SUFFIXES = .asm
%.o: %.asm

View file

@ -11,9 +11,20 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
/*
* $Source: /cvs/cvsroot/d2x/arch/dos_dpmi.c,v $
* $Revision: 1.2 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
*
* Dos DPMI
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#ifdef __ENV_DJGPP__
#endif
#ifdef __DJGPP__
#define _BORLAND_DOS_REGS 1
@ -394,5 +405,3 @@ int dpmi_set_pm_handler(unsigned intnum, void far * isr )
return 0;
return 1;
}
#endif // __ENV_DJGPP__

View file

@ -11,9 +11,20 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
/*
* $Source: /cvs/cvsroot/d2x/arch/dos_findfile.c,v $
* $Revision: 1.2 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
*
* Dos findfile functions
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#ifdef __ENV_DJGPP__
#endif
#include <dos.h>
#include <string.h>
@ -90,6 +101,3 @@ int SetFileDateTime(int filehandle, FILETIMESTRUCT *ftstruct)
{
return _dos_setftime(filehandle, ftstruct->date, ftstruct->time);
}
#endif //__ENV_DJGPP__

View file

@ -1,5 +1,17 @@
/*
* $Source: /cvs/cvsroot/d2x/arch/dos_init.c,v $
* $Revision: 1.3 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
*
* Dos initialization
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#ifdef __ENV_DJGPP__
#endif
#include <stdio.h>
#include <string.h>
@ -366,5 +378,3 @@ void arch_init() {
div0_init(DM_ERROR);
#endif
}
#endif // __ENV_DJGPP__

View file

@ -10,9 +10,172 @@ CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
#include <conf.h>
#ifdef __ENV_DJGPP__
/*
* $Source: /cvs/cvsroot/d2x/arch/dos_ipx.c,v $
* $Revision: 1.2 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
*
* Routines for IPX communications.
*
* $Log: not supported by cvs2svn $
* Revision 1.1.1.1 2001/01/19 03:30:15 bradleyb
* Import of d2x-0.0.8
*
* Revision 1.1.1.1 1999/06/14 21:58:22 donut
* Import of d1x 1.37 source.
*
* Revision 2.10 1995/03/29 17:27:55 john
* Added code to not duplicate broadcasts.
*
* Revision 2.9 1995/03/29 15:32:07 john
* NEatened.
*
* Revision 2.8 1995/03/29 15:07:31 john
* Added network support.
*
* Revision 2.7 1995/03/29 11:22:27 john
* Added broadcasting over a net.
*
* Revision 2.6 1995/03/28 20:05:03 john
* Took away alternate server stuff.
*
* Revision 2.5 1995/03/23 19:14:29 john
* Added better MAX_USERS message.
*
* Revision 2.4 1995/03/23 19:00:02 john
* Added user list capabitly.
*
* Revision 2.3 1995/03/23 12:27:05 john
* Move IPX into bios lib.
*
* Revision 2.2 1995/03/22 19:08:15 john
* Added code to fix sending packets over router... now
* we just need to make broadcasts go over router!!
*
* Revision 2.1 1995/03/21 08:40:16 john
* Ifdef'd out the NETWORK code.
*
* Revision 2.0 1995/02/27 11:30:45 john
* New version 2.0, which has no anonymous unions, builds with
* Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
*
* Revision 1.31 1995/02/16 17:35:03 john
* Added code to allow dynamic socket changing.
*
* Revision 1.30 1995/02/01 21:03:45 john
* Lintified.
*
* Revision 1.29 1995/01/22 14:31:05 john
* Added key.h
*
* Revision 1.28 1995/01/22 14:29:26 john
* Added code to bypass broadcast messages.
*
* Revision 1.27 1995/01/03 13:46:16 john
* Added code that should make ipx work over different servers,
* but ifdef'd it out with SHAREWARE in ipx.c. I haven't tested
* this, and I hope it doesn't introduce net bugs.
*
* Revision 1.26 1994/12/14 11:54:37 rob
* Reduce # of ipx packets.
*
* Revision 1.25 1994/12/11 00:43:28 john
* Locked down DOS ipx buffers... probably not necessary, tho.
*
* Revision 1.24 1994/12/08 15:49:58 rob
* Bumped up the # of ipx packets.
*
* Revision 1.23 1994/12/04 15:23:54 rob
* Reduced packet # constants.
*
* Revision 1.22 1994/11/27 23:12:39 matt
* Made changes for new mprintf calling convention
*
* Revision 1.21 1994/11/19 15:15:19 mike
* remove unused code and data
*
* Revision 1.20 1994/11/10 11:06:07 rob
* Raised number of ipx packets to 64 and buffers to 128 (for 8-way games)
* Removed (commented out) all the spx support stuff.
*
* Revision 1.19 1994/11/07 17:50:12 rob
* Bumped up max_packets and ipx_num_packets to double their previous
* values.
*
* Revision 1.18 1994/11/07 15:39:01 rob
* Removed temporary hacked ipx_send_object function.
* Replaced with a more general thing.
*
* Revision 1.17 1994/11/05 16:08:40 rob
* Made a change necessary for object syncing on rejoin.
*
* Revision 1.16 1994/11/01 15:57:12 rob
* Added support for SPX sockets for critical messages.
*
* Revision 1.15 1994/10/31 19:21:01 rob
* Added a routine for sending objects via ipx. Its a hack and shoukld
* be replaced by something more general time permitting.
*
* Revision 1.14 1994/10/20 14:57:42 john
* Some test stuff.
*
* Revision 1.13 1994/10/20 11:22:45 john
* Tweaked the number of waiting packets. Added code to print
* total packets missed, and to limit the packet send rate to
* 10 packets per second unless firing.
*
* Revision 1.12 1994/10/03 20:50:11 john
* Started adding sound pause functions.
*
* Revision 1.11 1994/09/15 08:54:24 mike
* comment out a mprintf.
*
* Revision 1.10 1994/09/12 19:38:20 john
* Made some stuff that prints to the DOS screen go to the
* mono instead, since it really is debugging info.
*
* Revision 1.9 1994/09/07 13:32:03 john
* Made ipx_close explicitly close the socket we were using,
* because it seems that VLM's don't automatically close them
* like the older NETX stuff did (Going from Novell 3.11 driver
* to 3.12 anyway).
*
* Revision 1.8 1994/09/06 19:29:20 john
* Added trial version of rejoin function.
*
* Revision 1.7 1994/08/09 19:31:50 john
* Networking changes.
*
* Revision 1.6 1994/08/05 16:11:41 john
* Psuedo working version of networking.
*
* Revision 1.5 1994/08/04 19:17:21 john
* Inbetween version of network stuff.
*
* Revision 1.4 1994/07/29 16:08:57 john
* *** empty log message ***
*
* Revision 1.3 1994/07/25 12:33:31 john
* Network "pinging" in.
*
* Revision 1.2 1994/07/20 15:58:28 john
* First installment of ipx stuff.
*
* Revision 1.1 1994/07/19 15:42:00 john
* Initial revision
*
*
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#endif
#ifdef RCS
static char rcsid[] = "$Id: dos_ipx.c,v 1.2 2001-01-29 13:35:08 bradleyb Exp $";
#endif
#ifdef __GNUC__
#define _BORLAND_DOS_REGS 1
@ -749,5 +912,3 @@ void ipx_read_network_file(char * filename)
//---}
//---
//---
#endif // __ENV_DJGPP__

View file

@ -10,13 +10,16 @@
;COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
;
; $Source: /cvs/cvsroot/d2x/arch/dos_modex.asm,v $
; $Revision: 1.1.1.1 $
; $Revision: 1.2 $
; $Author: bradleyb $
; $Date: 2001-01-19 03:33:51 $
; $Date: 2001-01-29 13:35:08 $
;
; Routines to access ModeX VGA memory
;
; $Log: not supported by cvs2svn $
; Revision 1.1.1.1 2001/01/19 03:30:15 bradleyb
; Import of d2x-0.0.8
;
; Revision 1.1.1.1 1999/06/14 21:57:56 donut
; Import of d1x 1.37 source.
;
@ -79,8 +82,8 @@
[BITS 32]
section .data
%include "dos_vgaregs.inc"
%include "dos_tweak.inc"
%include "vgaregs.inc"
%include "tweak.inc"
extern _gr_var_bwidth
extern _gr_video_memory

View file

@ -1,3 +1,15 @@
;
; $Source: /cvs/cvsroot/d2x/arch/dos_timer.asm,v $
; $Revision: 1.2 $
; $Author: bradleyb $
; $Date: 2001-01-29 13:35:08 $
;
; DOS timer routines
;
; $Log: not supported by cvs2svn $
;
[BITS 32]
[EXTERN _atexit]

View file

@ -10,13 +10,16 @@
;COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
;
; $Source: /cvs/cvsroot/d2x/arch/dos_tweak.inc,v $
; $Revision: 1.1.1.1 $
; $Revision: 1.2 $
; $Author: bradleyb $
; $Date: 2001-01-19 03:33:51 $
; $Date: 2001-01-29 13:35:08 $
;
; Parameters used by modex.asm to set various modex resolutions.
;
; $Log: not supported by cvs2svn $
; Revision 1.1.1.1 2001/01/19 03:30:15 bradleyb
; Import of d2x-0.0.8
;
; Revision 1.1.1.1 1999/06/14 21:58:45 donut
; Import of d1x 1.37 source.
;

View file

@ -1,6 +1,17 @@
#include <conf.h>
#ifdef __ENV_DJGPP__
/*
* $Source: /cvs/cvsroot/d2x/arch/dos_vesa.c,v $
* $Revision: 1.2 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
*
* Dos VESA
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#endif
#include <string.h>
#include "gr.h"
@ -135,6 +146,3 @@ void gr_vesa_pixel(unsigned char color, unsigned int addr) {
gr_vesa_setpage(addr >> 16);
gr_video_memory[addr & 0xffff] = color;
}
#endif // __ENV_DJGPP__

View file

@ -10,13 +10,16 @@
;COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
;
; $Source: /cvs/cvsroot/d2x/arch/dos_vgaregs.inc,v $
; $Revision: 1.1.1.1 $
; $Revision: 1.2 $
; $Author: bradleyb $
; $Date: 2001-01-19 03:33:51 $
; $Date: 2001-01-29 13:35:08 $
;
; Readable descriptions of VGA ports.
;
; $Log: not supported by cvs2svn $
; Revision 1.1.1.1 2001/01/19 03:30:15 bradleyb
; Import of d2x-0.0.8
;
; Revision 1.1.1.1 1999/06/14 21:58:45 donut
; Import of d1x 1.37 source.
;

View file

@ -1,5 +1,17 @@
/*
* $Source: /cvs/cvsroot/d2x/arch/linux_findfile.c,v $
* $Revision: 1.2 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
*
* Linux findfile functions
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#ifdef __ENV_LINUX__
#endif
#include <stdlib.h>
#include <string.h>
@ -53,6 +65,3 @@ int FileFindClose(void)
globfree(&glob_a);
return 0;
}
#endif // __ENV_LINUX__

View file

@ -1,6 +1,17 @@
// linux init.c - added Matt Mueller 9/6/98
/*
* $Source: /cvs/cvsroot/d2x/arch/linux_init.c,v $
* $Revision: 1.4 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
*
* linux init.c - added Matt Mueller 9/6/98
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#ifdef __ENV_LINUX__
#endif
#include <stdlib.h>
#include <stdio.h>
@ -46,6 +57,3 @@ void arch_init()
//end addition -MM
key_init();
}
#endif // __ENV_LINUX__

View file

@ -1,8 +1,18 @@
/* IPX driver using BSD style sockets */
/* Mostly taken from dosemu */
/*
* $Source: /cvs/cvsroot/d2x/arch/linux_ipx_bsd.c,v $
* $Revision: 1.2 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
*
* IPX driver using BSD style sockets
* Mostly taken from dosemu
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#ifdef __ENV_LINUX__
#ifdef NETWORK
#endif
#include <stdio.h>
#include <sys/types.h>
@ -226,5 +236,3 @@ struct ipx_driver ipx_bsd = {
ipx_bsd_ReceivePacket,
ipx_general_PacketReady
};
#endif // NETWORK
#endif // __ENV_LINUX__

View file

@ -1,8 +1,18 @@
/*
* $Source: /cvs/cvsroot/d2x/arch/linux_ipx_lin.c,v $
* $Revision: 1.2 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
*
* Linux IPX
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#endif
#ifdef __ENV_LINUX__
#ifdef NETWORK
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
@ -214,5 +224,3 @@ int ipx_linux_ReceivePacket(ipx_socket_t *s, char *buffer, int bufsize,
return size;
}
#endif // NETWORK
#endif // __ENV_LINUX__

View file

@ -1,4 +1,10 @@
/* IPX driver for native Linux TCP/IP networking (UDP implementation)
/*
* $Source: /cvs/cvsroot/d2x/arch/linux_ipx_udp.c,v $
* $Revision: 1.3 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
*
* IPX driver for native Linux TCP/IP networking (UDP implementation)
* Version 0.99.2
* Contact Jan [Lace] Kratochvil <short@ucw.cz> for assistance
* (no "It somehow doesn't work! What should I do?" complaints, please)
@ -56,11 +62,14 @@
* ./d1x -udp +UPPER_DISTANT_MACHINE_NAME
*
* Have fun!
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#ifdef __ENV_LINUX__
#ifdef NETWORK
#endif
#include <stdio.h>
#include <string.h>
#include <netinet/in.h> /* for htons & co. */
@ -589,5 +598,3 @@ struct ipx_driver ipx_udp = {
ipx_udp_ReceivePacket,
ipx_general_PacketReady
};
#endif // NETWORK
#endif // __ENV_LINUX__

View file

@ -10,10 +10,22 @@ CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
#include <conf.h>
#ifdef __ENV_LINUX__
#ifdef NETWORK
/*
* $Source: /cvs/cvsroot/d2x/arch/linux_net.c,v $
* $Revision: 1.3 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:09 $
*
* Linux net
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@ -364,5 +376,3 @@ void ipx_read_network_file(char * filename)
}
fclose(fp);
}
#endif //NETWORK
#endif // __ENV_LINUX__

View file

@ -1,6 +1,18 @@
// SDL architecture support
/*
* $Source: /cvs/cvsroot/d2x/arch/sdl_init.c,v $
* $Revision: 1.4 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:09 $
*
* SDL architecture support
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#ifdef __ENV_LINUX__
#endif
#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
@ -29,5 +41,3 @@ void arch_sdl_init()
digi_init();
atexit(sdl_close);
}
#endif // __ENV_LINUX__

View file

@ -1,7 +1,18 @@
// SDL library timer functions
/*
* $Source: /cvs/cvsroot/d2x/arch/sdl_timer.c,v $
* $Revision: 1.2 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:09 $
*
* SDL library timer functions
*
* $Log: not supported by cvs2svn $
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#ifdef __ENV_LINUX__
#endif
#include <SDL/SDL.h>
#include "maths.h"
@ -11,5 +22,3 @@ fix timer_get_fixed_seconds(void) {
x=i2f(tv_now/1000) | fixdiv(i2f(tv_now % 1000),i2f(1000));
return x;
}
#endif