Moved arch/sdl_* to arch/sdl

This commit is contained in:
Bradley Bell 2001-10-19 09:01:56 +00:00
parent 9095414f60
commit 028be9cb2f
19 changed files with 158 additions and 134 deletions

View file

@ -1,32 +1,6 @@
SUBDIRS = @D2X_ARCH_SUBDIRS@
DIST_SUBDIRS = win32 linux
EXTRA_SUBDIRS = dos include
noinst_LIBRARIES = libarch.a
INCLUDES = -I$(top_srcdir)/includes -I$(top_srcdir)/main -I$(top_srcdir)/arch/include
if ENV_DJGPP
libarch_a_SOURCES = dos_init.c dos_vesa.c dos_findfile.c dos_dpmi.c dos_ipx.c
else
libarch_a_SOURCES = linux_init.c sdl_init.c sdl_timer.c
endif
EXTRA_libarch_a_SOURCES = \
dos_init.c dos_vesa.c dos_findfile.c dos_dpmi.c dos_ipx.c \
linux_init.c \
sdl_init.c sdl_timer.c
SUFFIXES = .asm
%.o: %.asm
$(NASM) $(NASMFLAGS) $< -o $@
if ENV_DJGPP
libarch_a_LIBADD += dos_timer.o dos_modex.o
endif
EXTRA_DIST = \
dos_tweak.inc dos_vgaregs.inc \
dos_modex.asm dos_timer.asm
DIST_SUBDIRS = dos linux sdl win32
EXTRA_SUBDIRS = include
dist-hook:
list='$(EXTRA_SUBDIRS)'; for subdir in $$list; do \

27
arch/dos/Makefile.am Normal file
View file

@ -0,0 +1,27 @@
EXTRA_SUBDIRS = allg_snd bak comm include mm_snd
noinst_LIBRARIES = libarch_dos.a
INCLUDES = -I$(top_srcdir)/includes -I$(top_srcdir)/main -I$(srcdir)/include
libarch_dos_a_SOURCES = dpmi.c findfile.c init.c ipx.c vesa.c
SUFFIXES = .asm
%.o: %.asm
$(NASM) $(NASMFLAGS) $< -o $@
if ENV_DJGPP
libarch_dos_a_LIBADD += timer.o modex.o
endif
EXTRA_DIST = \
tweak.inc vgaregs.inc \
modex.asm timer.asm \
digiallg.c digimm.c disk.c midiallg.c mono.c serial.c \
ipx.h mono.h
dist-hook:
list='$(EXTRA_SUBDIRS)'; for subdir in $$list; do \
( cd $(srcdir) && tar --exclude=CVS -cf - $$subdir ) \
| ( cd $(distdir) && tar xf - ) \
done

View file

@ -12,14 +12,17 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
/*
* $Source: /cvs/cvsroot/d2x/arch/dos_dpmi.c,v $
* $Revision: 1.2 $
* $Source: /cvs/cvsroot/d2x/arch/dos/dpmi.c,v $
* $Revision: 1.3 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
* $Date: 2001-10-19 09:01:56 $
*
* Dos DPMI
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2001/01/29 13:35:08 bradleyb
* Fixed build system, minor fixes
*
*/
#ifdef HAVE_CONFIG_H

View file

@ -12,14 +12,17 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
/*
* $Source: /cvs/cvsroot/d2x/arch/dos_findfile.c,v $
* $Source: /cvs/cvsroot/d2x/arch/dos/findfile.c,v $
* $Revision: 1.3 $
* $Author: bradleyb $
* $Date: 2001-01-31 14:04:44 $
* $Date: 2001-10-19 09:01:56 $
*
* Dos findfile functions
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2001/01/31 14:04:44 bradleyb
* Fix compiler warnings
*
* Revision 1.2 2001/01/29 13:35:08 bradleyb
* Fixed build system, minor fixes
*

View file

@ -1,12 +1,15 @@
/*
* $Source: /cvs/cvsroot/d2x/arch/dos_init.c,v $
* $Revision: 1.3 $
* $Source: /cvs/cvsroot/d2x/arch/dos/init.c,v $
* $Revision: 1.4 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
* $Date: 2001-10-19 09:01:56 $
*
* Dos initialization
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2001/01/29 13:35:08 bradleyb
* Fixed build system, minor fixes
*
*/
#ifdef HAVE_CONFIG_H

View file

@ -12,14 +12,17 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
/*
* $Source: /cvs/cvsroot/d2x/arch/dos_ipx.c,v $
* $Revision: 1.2 $
* $Source: /cvs/cvsroot/d2x/arch/dos/ipx.c,v $
* $Revision: 1.3 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
* $Date: 2001-10-19 09:01:56 $
*
* Routines for IPX communications.
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2001/01/29 13:35:08 bradleyb
* Fixed build system, minor fixes
*
* Revision 1.1.1.1 2001/01/19 03:30:15 bradleyb
* Import of d2x-0.0.8
*
@ -174,7 +177,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#endif
#ifdef RCS
static char rcsid[] = "$Id: dos_ipx.c,v 1.2 2001-01-29 13:35:08 bradleyb Exp $";
static char rcsid[] = "$Id: ipx.c,v 1.3 2001-10-19 09:01:56 bradleyb Exp $";
#endif
#ifdef __GNUC__

View file

@ -9,14 +9,17 @@
;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_modex.asm,v $
; $Source: /cvs/cvsroot/d2x/arch/dos/modex.asm,v $
; $Revision: 1.3 $
; $Author: bradleyb $
; $Date: 2001-01-31 14:04:44 $
; $Date: 2001-10-19 09:01:56 $
;
; Routines to access ModeX VGA memory
;
; $Log: not supported by cvs2svn $
; Revision 1.3 2001/01/31 14:04:44 bradleyb
; Fix compiler warnings
;
; Revision 1.2 2001/01/29 13:35:08 bradleyb
; Fixed build system, minor fixes
;

View file

@ -1,12 +1,15 @@
;
; $Source: /cvs/cvsroot/d2x/arch/dos_timer.asm,v $
; $Revision: 1.2 $
; $Source: /cvs/cvsroot/d2x/arch/dos/timer.asm,v $
; $Revision: 1.3 $
; $Author: bradleyb $
; $Date: 2001-01-29 13:35:08 $
; $Date: 2001-10-19 09:01:56 $
;
; DOS timer routines
;
; $Log: not supported by cvs2svn $
; Revision 1.2 2001/01/29 13:35:08 bradleyb
; Fixed build system, minor fixes
;
;

View file

@ -9,14 +9,17 @@
;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_tweak.inc,v $
; $Revision: 1.2 $
; $Source: /cvs/cvsroot/d2x/arch/dos/tweak.inc,v $
; $Revision: 1.3 $
; $Author: bradleyb $
; $Date: 2001-01-29 13:35:08 $
; $Date: 2001-10-19 09:01:56 $
;
; Parameters used by modex.asm to set various modex resolutions.
;
; $Log: not supported by cvs2svn $
; Revision 1.2 2001/01/29 13:35:08 bradleyb
; Fixed build system, minor fixes
;
; Revision 1.1.1.1 2001/01/19 03:30:15 bradleyb
; Import of d2x-0.0.8
;

View file

@ -1,12 +1,15 @@
/*
* $Source: /cvs/cvsroot/d2x/arch/dos_vesa.c,v $
* $Revision: 1.2 $
* $Source: /cvs/cvsroot/d2x/arch/dos/vesa.c,v $
* $Revision: 1.3 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
* $Date: 2001-10-19 09:01:56 $
*
* Dos VESA
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2001/01/29 13:35:08 bradleyb
* Fixed build system, minor fixes
*
*/
#ifdef HAVE_CONFIG_H

View file

@ -9,14 +9,17 @@
;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_vgaregs.inc,v $
; $Revision: 1.2 $
; $Source: /cvs/cvsroot/d2x/arch/dos/vgaregs.inc,v $
; $Revision: 1.3 $
; $Author: bradleyb $
; $Date: 2001-01-29 13:35:08 $
; $Date: 2001-10-19 09:01:56 $
;
; Readable descriptions of VGA ports.
;
; $Log: not supported by cvs2svn $
; Revision 1.2 2001/01/29 13:35:08 bradleyb
; Fixed build system, minor fixes
;
; Revision 1.1.1.1 2001/01/19 03:30:15 bradleyb
; Import of d2x-0.0.8
;

View file

@ -2,12 +2,12 @@ EXTRA_SUBDIRS = include
noinst_LIBRARIES = libarch_linux.a
INCLUDES = -I$(top_srcdir)/includes -I$(top_srcdir)/main -I$(srcdir)/include
INCLUDES = -I$(top_srcdir)/arch/include -I$(top_srcdir)/includes -I$(top_srcdir)/main -I$(srcdir)/include
if USE_NETWORK
libarch_linux_a_SOURCES = findfile.c ipx_bsd.c ipx_kali.c ipx_lin.c linuxnet.c ukali.c
libarch_linux_a_SOURCES = findfile.c init.c ipx_bsd.c ipx_kali.c ipx_lin.c linuxnet.c ukali.c
else
libarch_linux_a_SOURCES = findfile.c
libarch_linux_a_SOURCES = findfile.c init.c
endif
EXTRA_libarch_linux_a_SOURCES = \

View file

@ -1,12 +1,15 @@
/*
* $Source: /cvs/cvsroot/d2x/arch/linux_init.c,v $
* $Source: /cvs/cvsroot/d2x/arch/linux/init.c,v $
* $Revision: 1.4 $
* $Author: bradleyb $
* $Date: 2001-01-29 13:35:08 $
* $Date: 2001-10-19 09:01:56 $
*
* linux init.c - added Matt Mueller 9/6/98
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2001/01/29 13:35:08 bradleyb
* Fixed build system, minor fixes
*
*/
#ifdef HAVE_CONFIG_H

View file

@ -1,43 +0,0 @@
/*
* $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>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
#include "text.h"
#include "event.h"
#include "error.h"
#include "args.h"
#include "digi.h"
extern void d_mouse_init();
void sdl_close()
{
SDL_Quit();
}
void arch_sdl_init()
{
// Initialise the library
//edited on 01/03/99 by Matt Mueller - if we use SDL_INIT_EVERYTHING, cdrom is initialized even if -nocdaudio is used
#ifdef SDL_INPUT
if (!FindArg("-nomouse"))
d_mouse_init();
#endif
if (!FindArg("-nosound"))
digi_init();
atexit(sdl_close);
}

View file

@ -1,24 +0,0 @@
/*
* $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>
#endif
#include <SDL/SDL.h>
#include "maths.h"
fix timer_get_fixed_seconds(void) {
fix x;
unsigned long tv_now = SDL_GetTicks();
x=i2f(tv_now/1000) | fixdiv(i2f(tv_now % 1000),i2f(1000));
return x;
}

View file

@ -5,9 +5,9 @@ noinst_LIBRARIES = libarch_win32.a
INCLUDES = -I$(top_srcdir)/includes -I$(srcdir)/include
if USE_NETWORK
libarch_win32_a_SOURCES = findfile.c winnet.c ipx_win.c
libarch_win32_a_SOURCES = findfile.c mingw_init.c winnet.c ipx_win.c
else
libarch_win32_a_SOURCES = findfile.c
libarch_win32_a_SOURCES = findfile.c mingw_init.c
endif
EXTRA_DIST = \

56
arch/win32/mingw_init.c Normal file
View file

@ -0,0 +1,56 @@
/*
* $Source: /cvs/cvsroot/d2x/arch/win32/mingw_init.c,v $
* $Revision: 1.1 $
* $Author: bradleyb $
* $Date: 2001-10-19 09:01:56 $
*
* mingw_init.c - Basically same as linux init.c
*
* $Log: not supported by cvs2svn $
*
*/
#ifdef HAVE_CONFIG_H
#include <conf.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include "pstypes.h"
#include "console.h"
#include "text.h"
#include "event.h"
#include "error.h"
#include "joy.h"
#include "args.h"
extern void arch_sdl_init();
extern void key_init();
extern int com_init();
extern void timer_init();
void arch_init_start()
{
}
void arch_init()
{
// Initialise the library
arch_sdl_init();
if (!FindArg( "-nojoystick" )) {
con_printf(CON_VERBOSE, "\n%s", TXT_VERBOSE_6);
joy_init();
}
//added 06/09/99 Matt Mueller - fix nonetwork compile
#ifdef NETWORK
//end addition -MM
//added on 10/19/98 by Victor Rachels to add serial support (from DPH)
if(!(FindArg("-noserial")))
com_init();
//end this section addition - Victor
//added 06/09/99 Matt Mueller - fix nonetwork compile
#endif
//end addition -MM
key_init();
}

View file

@ -67,14 +67,16 @@ if test "$host_os" = "msdosdjgpp"; then
CFLAGS="-I \$(top_srcdir)/arch/dos/include $CFLAGS"
AC_PATH_PROG(NASM, nasm, no)
TARGETS=d2x
D2X_ARCH_SUBDIRS=dos
else
CFLAGS="-pipe $CFLAGS"
D2X_ARCH_SUBDIRS=sdl
if test x$MINGW32 = xyes; then
D2X_ARCH_SUBDIRS=win32
D2X_ARCH_SUBDIRS="win32 ${D2X_ARCH_SUBDIRS}"
else
D2X_ARCH_SUBDIRS=linux
D2X_ARCH_SUBDIRS="linux ${D2X_ARCH_SUBDIRS}"
fi
dnl Check for SDL
@ -227,7 +229,9 @@ Makefile
2d/Makefile
3d/Makefile
arch/Makefile
arch/dos/Makefile
arch/linux/Makefile
arch/sdl/Makefile
arch/win32/Makefile
cfile/Makefile
iff/Makefile

View file

@ -11,16 +11,16 @@ EXTRA_PROGRAMS = d2x d2x-sdl d2x-ogl d2x-svga d2x-ggi
LDFLAGS = -export-dynamic
if ENV_DJGPP
ARCH_LIBS =
ARCH_LIBS = ../arch/dos/libarch_dos.a
else
if MINGW32
ARCH_LIBS = ../arch/win32/libarch_win32.a
ARCH_LIBS = ../arch/win32/libarch_win32.a ../arch/sdl/libarch_sdl.a
else
ARCH_LIBS = ../arch/linux/libarch_linux.a
ARCH_LIBS = ../arch/linux/libarch_linux.a ../arch/sdl/libarch_sdl.a
endif
endif
d2x_LDADD = ${ARCH_LIBS} ../3d/lib3d.a ../2d/lib2d.a ../mem/libmem.a ../cfile/libcfile.a ../iff/libiff.a ../texmap/libtexmap.a ../misc/libmisc.a ../maths/libmaths.a ../video/libvideo.a ../arch/libarch.a ../sound/libsound.a ../input/libinput.a
d2x_LDADD = ${ARCH_LIBS} ../3d/lib3d.a ../2d/lib2d.a ../mem/libmem.a ../cfile/libcfile.a ../iff/libiff.a ../texmap/libtexmap.a ../misc/libmisc.a ../maths/libmaths.a ../video/libvideo.a ../sound/libsound.a ../input/libinput.a
if MINGW32
if USE_NETWORK