1
0
Fork 0
forked from len0rd/rockbox

Port of Duke Nukem 3D

This ports Fabien Sanglard's Chocolate Duke to run on a version of SDL
for Rockbox.

Change-Id: I8f2c4c78af19de10c1633ed7bb7a997b43256dd9
This commit is contained in:
Franklin Wei 2017-01-21 15:18:31 -05:00
parent 01c6dcf6c7
commit a855d62025
994 changed files with 336924 additions and 15 deletions

View file

@ -0,0 +1,693 @@
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# Engine/src/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/chocolate-duke3d
pkgincludedir = $(includedir)/chocolate-duke3d
pkglibdir = $(libdir)/chocolate-duke3d
pkglibexecdir = $(libexecdir)/chocolate-duke3d
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = Engine/src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
AM_V_AR = $(am__v_AR_$(V))
am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libEngine_a_AR = $(AR) $(ARFLAGS)
libEngine_a_LIBADD =
am_libEngine_a_OBJECTS = libEngine_a-cache.$(OBJEXT) \
libEngine_a-display.$(OBJEXT) libEngine_a-draw.$(OBJEXT) \
libEngine_a-dummy_multi.$(OBJEXT) libEngine_a-engine.$(OBJEXT) \
libEngine_a-filesystem.$(OBJEXT) \
libEngine_a-fixedPoint_math.$(OBJEXT) \
libEngine_a-mmulti.$(OBJEXT) libEngine_a-network.$(OBJEXT) \
libEngine_a-tiles.$(OBJEXT)
libEngine_a_OBJECTS = $(am_libEngine_a_OBJECTS)
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
am__v_lt_1 =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libEngine_a_SOURCES)
DIST_SOURCES = $(libEngine_a_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/build-aux/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing aclocal-1.15
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 0
AUTOCONF = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing autoconf
AUTOHEADER = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing autoheader
AUTOMAKE = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing automake-1.15
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -Wall -Wno-pointer-sign -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-parentheses -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-unused-function -Wno-unused-result -fno-strict-aliasing -fno-aggressive-loop-optimizations -DPLATFORM_UNIX -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -g -O2
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
DEFS = -DPACKAGE_NAME=\"Chocolate\ Duke3D\" -DPACKAGE_TARNAME=\"chocolate-duke3d\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"Chocolate\ Duke3D\ 1.0\" -DPACKAGE_BUGREPORT=\"https://github.com/fabiensanglard/chocolate_duke3D/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"chocolate-duke3d\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ASSERT_H=1 -DHAVE_ENET_ENET_H=1
DEPDIR = .deps
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /usr/bin/grep -E
EXEEXT =
GREP = /usr/bin/grep
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS = -lSDL -lpthread -lSDL_mixer -lSDL -lpthread
LIBOBJS =
LIBS =
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing makeinfo
MKDIR_P = /usr/bin/mkdir -p
OBJEXT = o
PACKAGE = chocolate-duke3d
PACKAGE_BUGREPORT = https://github.com/fabiensanglard/chocolate_duke3D/issues
PACKAGE_NAME = Chocolate Duke3D
PACKAGE_STRING = Chocolate Duke3D 1.0
PACKAGE_TARNAME = chocolate-duke3d
PACKAGE_URL =
PACKAGE_VERSION = 1.0
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR =
PKG_CONFIG_PATH =
RANLIB = ranlib
SDL_CFLAGS = -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL
SDL_LIBS = -lSDL -lpthread
SDL_MIXER_CFLAGS = -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL
SDL_MIXER_LIBS = -lSDL_mixer -lSDL -lpthread
SET_MAKE =
SHELL = /bin/sh
STRIP =
VERSION = 1.0
WINDRES =
abs_builddir = /home/franklin/chocolate_duke3D/Engine/src
abs_srcdir = /home/franklin/chocolate_duke3D/Engine/src
abs_top_builddir = /home/franklin/chocolate_duke3D
abs_top_srcdir = /home/franklin/chocolate_duke3D
ac_ct_CC = gcc
am__include = include
am__leading_dot = .
am__quote =
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
bindir = ${exec_prefix}/bin
build_alias =
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host_alias =
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias =
top_build_prefix = ../../
top_builddir = ../..
top_srcdir = ../..
noinst_LIBRARIES = libEngine.a
libEngine_a_SOURCES = cache.c display.c draw.c dummy_multi.c engine.c filesystem.c fixedPoint_math.c mmulti.c network.c tiles.c
libEngine_a_CFLAGS = -I$(top_srcdir)/Game/src
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Engine/src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Engine/src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libEngine.a: $(libEngine_a_OBJECTS) $(libEngine_a_DEPENDENCIES) $(EXTRA_libEngine_a_DEPENDENCIES)
$(AM_V_at)-rm -f libEngine.a
$(AM_V_AR)$(libEngine_a_AR) libEngine.a $(libEngine_a_OBJECTS) $(libEngine_a_LIBADD)
$(AM_V_at)$(RANLIB) libEngine.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
include ./$(DEPDIR)/libEngine_a-cache.Po
include ./$(DEPDIR)/libEngine_a-display.Po
include ./$(DEPDIR)/libEngine_a-draw.Po
include ./$(DEPDIR)/libEngine_a-dummy_multi.Po
include ./$(DEPDIR)/libEngine_a-engine.Po
include ./$(DEPDIR)/libEngine_a-filesystem.Po
include ./$(DEPDIR)/libEngine_a-fixedPoint_math.Po
include ./$(DEPDIR)/libEngine_a-mmulti.Po
include ./$(DEPDIR)/libEngine_a-network.Po
include ./$(DEPDIR)/libEngine_a-tiles.Po
.c.o:
$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# $(AM_V_CC)source='$<' object='$@' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(COMPILE) -c -o $@ $<
.c.obj:
$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# $(AM_V_CC)source='$<' object='$@' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
libEngine_a-cache.o: cache.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-cache.o -MD -MP -MF $(DEPDIR)/libEngine_a-cache.Tpo -c -o libEngine_a-cache.o `test -f 'cache.c' || echo '$(srcdir)/'`cache.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-cache.Tpo $(DEPDIR)/libEngine_a-cache.Po
# $(AM_V_CC)source='cache.c' object='libEngine_a-cache.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-cache.o `test -f 'cache.c' || echo '$(srcdir)/'`cache.c
libEngine_a-cache.obj: cache.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-cache.obj -MD -MP -MF $(DEPDIR)/libEngine_a-cache.Tpo -c -o libEngine_a-cache.obj `if test -f 'cache.c'; then $(CYGPATH_W) 'cache.c'; else $(CYGPATH_W) '$(srcdir)/cache.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-cache.Tpo $(DEPDIR)/libEngine_a-cache.Po
# $(AM_V_CC)source='cache.c' object='libEngine_a-cache.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-cache.obj `if test -f 'cache.c'; then $(CYGPATH_W) 'cache.c'; else $(CYGPATH_W) '$(srcdir)/cache.c'; fi`
libEngine_a-display.o: display.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-display.o -MD -MP -MF $(DEPDIR)/libEngine_a-display.Tpo -c -o libEngine_a-display.o `test -f 'display.c' || echo '$(srcdir)/'`display.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-display.Tpo $(DEPDIR)/libEngine_a-display.Po
# $(AM_V_CC)source='display.c' object='libEngine_a-display.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-display.o `test -f 'display.c' || echo '$(srcdir)/'`display.c
libEngine_a-display.obj: display.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-display.obj -MD -MP -MF $(DEPDIR)/libEngine_a-display.Tpo -c -o libEngine_a-display.obj `if test -f 'display.c'; then $(CYGPATH_W) 'display.c'; else $(CYGPATH_W) '$(srcdir)/display.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-display.Tpo $(DEPDIR)/libEngine_a-display.Po
# $(AM_V_CC)source='display.c' object='libEngine_a-display.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-display.obj `if test -f 'display.c'; then $(CYGPATH_W) 'display.c'; else $(CYGPATH_W) '$(srcdir)/display.c'; fi`
libEngine_a-draw.o: draw.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-draw.o -MD -MP -MF $(DEPDIR)/libEngine_a-draw.Tpo -c -o libEngine_a-draw.o `test -f 'draw.c' || echo '$(srcdir)/'`draw.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-draw.Tpo $(DEPDIR)/libEngine_a-draw.Po
# $(AM_V_CC)source='draw.c' object='libEngine_a-draw.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-draw.o `test -f 'draw.c' || echo '$(srcdir)/'`draw.c
libEngine_a-draw.obj: draw.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-draw.obj -MD -MP -MF $(DEPDIR)/libEngine_a-draw.Tpo -c -o libEngine_a-draw.obj `if test -f 'draw.c'; then $(CYGPATH_W) 'draw.c'; else $(CYGPATH_W) '$(srcdir)/draw.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-draw.Tpo $(DEPDIR)/libEngine_a-draw.Po
# $(AM_V_CC)source='draw.c' object='libEngine_a-draw.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-draw.obj `if test -f 'draw.c'; then $(CYGPATH_W) 'draw.c'; else $(CYGPATH_W) '$(srcdir)/draw.c'; fi`
libEngine_a-dummy_multi.o: dummy_multi.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-dummy_multi.o -MD -MP -MF $(DEPDIR)/libEngine_a-dummy_multi.Tpo -c -o libEngine_a-dummy_multi.o `test -f 'dummy_multi.c' || echo '$(srcdir)/'`dummy_multi.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-dummy_multi.Tpo $(DEPDIR)/libEngine_a-dummy_multi.Po
# $(AM_V_CC)source='dummy_multi.c' object='libEngine_a-dummy_multi.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-dummy_multi.o `test -f 'dummy_multi.c' || echo '$(srcdir)/'`dummy_multi.c
libEngine_a-dummy_multi.obj: dummy_multi.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-dummy_multi.obj -MD -MP -MF $(DEPDIR)/libEngine_a-dummy_multi.Tpo -c -o libEngine_a-dummy_multi.obj `if test -f 'dummy_multi.c'; then $(CYGPATH_W) 'dummy_multi.c'; else $(CYGPATH_W) '$(srcdir)/dummy_multi.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-dummy_multi.Tpo $(DEPDIR)/libEngine_a-dummy_multi.Po
# $(AM_V_CC)source='dummy_multi.c' object='libEngine_a-dummy_multi.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-dummy_multi.obj `if test -f 'dummy_multi.c'; then $(CYGPATH_W) 'dummy_multi.c'; else $(CYGPATH_W) '$(srcdir)/dummy_multi.c'; fi`
libEngine_a-engine.o: engine.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-engine.o -MD -MP -MF $(DEPDIR)/libEngine_a-engine.Tpo -c -o libEngine_a-engine.o `test -f 'engine.c' || echo '$(srcdir)/'`engine.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-engine.Tpo $(DEPDIR)/libEngine_a-engine.Po
# $(AM_V_CC)source='engine.c' object='libEngine_a-engine.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-engine.o `test -f 'engine.c' || echo '$(srcdir)/'`engine.c
libEngine_a-engine.obj: engine.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-engine.obj -MD -MP -MF $(DEPDIR)/libEngine_a-engine.Tpo -c -o libEngine_a-engine.obj `if test -f 'engine.c'; then $(CYGPATH_W) 'engine.c'; else $(CYGPATH_W) '$(srcdir)/engine.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-engine.Tpo $(DEPDIR)/libEngine_a-engine.Po
# $(AM_V_CC)source='engine.c' object='libEngine_a-engine.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-engine.obj `if test -f 'engine.c'; then $(CYGPATH_W) 'engine.c'; else $(CYGPATH_W) '$(srcdir)/engine.c'; fi`
libEngine_a-filesystem.o: filesystem.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-filesystem.o -MD -MP -MF $(DEPDIR)/libEngine_a-filesystem.Tpo -c -o libEngine_a-filesystem.o `test -f 'filesystem.c' || echo '$(srcdir)/'`filesystem.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-filesystem.Tpo $(DEPDIR)/libEngine_a-filesystem.Po
# $(AM_V_CC)source='filesystem.c' object='libEngine_a-filesystem.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-filesystem.o `test -f 'filesystem.c' || echo '$(srcdir)/'`filesystem.c
libEngine_a-filesystem.obj: filesystem.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-filesystem.obj -MD -MP -MF $(DEPDIR)/libEngine_a-filesystem.Tpo -c -o libEngine_a-filesystem.obj `if test -f 'filesystem.c'; then $(CYGPATH_W) 'filesystem.c'; else $(CYGPATH_W) '$(srcdir)/filesystem.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-filesystem.Tpo $(DEPDIR)/libEngine_a-filesystem.Po
# $(AM_V_CC)source='filesystem.c' object='libEngine_a-filesystem.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-filesystem.obj `if test -f 'filesystem.c'; then $(CYGPATH_W) 'filesystem.c'; else $(CYGPATH_W) '$(srcdir)/filesystem.c'; fi`
libEngine_a-fixedPoint_math.o: fixedPoint_math.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-fixedPoint_math.o -MD -MP -MF $(DEPDIR)/libEngine_a-fixedPoint_math.Tpo -c -o libEngine_a-fixedPoint_math.o `test -f 'fixedPoint_math.c' || echo '$(srcdir)/'`fixedPoint_math.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-fixedPoint_math.Tpo $(DEPDIR)/libEngine_a-fixedPoint_math.Po
# $(AM_V_CC)source='fixedPoint_math.c' object='libEngine_a-fixedPoint_math.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-fixedPoint_math.o `test -f 'fixedPoint_math.c' || echo '$(srcdir)/'`fixedPoint_math.c
libEngine_a-fixedPoint_math.obj: fixedPoint_math.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-fixedPoint_math.obj -MD -MP -MF $(DEPDIR)/libEngine_a-fixedPoint_math.Tpo -c -o libEngine_a-fixedPoint_math.obj `if test -f 'fixedPoint_math.c'; then $(CYGPATH_W) 'fixedPoint_math.c'; else $(CYGPATH_W) '$(srcdir)/fixedPoint_math.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-fixedPoint_math.Tpo $(DEPDIR)/libEngine_a-fixedPoint_math.Po
# $(AM_V_CC)source='fixedPoint_math.c' object='libEngine_a-fixedPoint_math.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-fixedPoint_math.obj `if test -f 'fixedPoint_math.c'; then $(CYGPATH_W) 'fixedPoint_math.c'; else $(CYGPATH_W) '$(srcdir)/fixedPoint_math.c'; fi`
libEngine_a-mmulti.o: mmulti.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-mmulti.o -MD -MP -MF $(DEPDIR)/libEngine_a-mmulti.Tpo -c -o libEngine_a-mmulti.o `test -f 'mmulti.c' || echo '$(srcdir)/'`mmulti.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-mmulti.Tpo $(DEPDIR)/libEngine_a-mmulti.Po
# $(AM_V_CC)source='mmulti.c' object='libEngine_a-mmulti.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-mmulti.o `test -f 'mmulti.c' || echo '$(srcdir)/'`mmulti.c
libEngine_a-mmulti.obj: mmulti.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-mmulti.obj -MD -MP -MF $(DEPDIR)/libEngine_a-mmulti.Tpo -c -o libEngine_a-mmulti.obj `if test -f 'mmulti.c'; then $(CYGPATH_W) 'mmulti.c'; else $(CYGPATH_W) '$(srcdir)/mmulti.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-mmulti.Tpo $(DEPDIR)/libEngine_a-mmulti.Po
# $(AM_V_CC)source='mmulti.c' object='libEngine_a-mmulti.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-mmulti.obj `if test -f 'mmulti.c'; then $(CYGPATH_W) 'mmulti.c'; else $(CYGPATH_W) '$(srcdir)/mmulti.c'; fi`
libEngine_a-network.o: network.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-network.o -MD -MP -MF $(DEPDIR)/libEngine_a-network.Tpo -c -o libEngine_a-network.o `test -f 'network.c' || echo '$(srcdir)/'`network.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-network.Tpo $(DEPDIR)/libEngine_a-network.Po
# $(AM_V_CC)source='network.c' object='libEngine_a-network.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-network.o `test -f 'network.c' || echo '$(srcdir)/'`network.c
libEngine_a-network.obj: network.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-network.obj -MD -MP -MF $(DEPDIR)/libEngine_a-network.Tpo -c -o libEngine_a-network.obj `if test -f 'network.c'; then $(CYGPATH_W) 'network.c'; else $(CYGPATH_W) '$(srcdir)/network.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-network.Tpo $(DEPDIR)/libEngine_a-network.Po
# $(AM_V_CC)source='network.c' object='libEngine_a-network.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-network.obj `if test -f 'network.c'; then $(CYGPATH_W) 'network.c'; else $(CYGPATH_W) '$(srcdir)/network.c'; fi`
libEngine_a-tiles.o: tiles.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-tiles.o -MD -MP -MF $(DEPDIR)/libEngine_a-tiles.Tpo -c -o libEngine_a-tiles.o `test -f 'tiles.c' || echo '$(srcdir)/'`tiles.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-tiles.Tpo $(DEPDIR)/libEngine_a-tiles.Po
# $(AM_V_CC)source='tiles.c' object='libEngine_a-tiles.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-tiles.o `test -f 'tiles.c' || echo '$(srcdir)/'`tiles.c
libEngine_a-tiles.obj: tiles.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-tiles.obj -MD -MP -MF $(DEPDIR)/libEngine_a-tiles.Tpo -c -o libEngine_a-tiles.obj `if test -f 'tiles.c'; then $(CYGPATH_W) 'tiles.c'; else $(CYGPATH_W) '$(srcdir)/tiles.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-tiles.Tpo $(DEPDIR)/libEngine_a-tiles.Po
# $(AM_V_CC)source='tiles.c' object='libEngine_a-tiles.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-tiles.obj `if test -f 'tiles.c'; then $(CYGPATH_W) 'tiles.c'; else $(CYGPATH_W) '$(srcdir)/tiles.c'; fi`
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,3 @@
noinst_LIBRARIES = libEngine.a
libEngine_a_SOURCES = cache.c display.c draw.c dummy_multi.c engine.c filesystem.c fixedPoint_math.c mmulti.c network.c tiles.c
libEngine_a_CFLAGS = -I$(top_srcdir)/Game/src

View file

@ -0,0 +1,693 @@
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = Engine/src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
AM_V_AR = $(am__v_AR_@AM_V@)
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libEngine_a_AR = $(AR) $(ARFLAGS)
libEngine_a_LIBADD =
am_libEngine_a_OBJECTS = libEngine_a-cache.$(OBJEXT) \
libEngine_a-display.$(OBJEXT) libEngine_a-draw.$(OBJEXT) \
libEngine_a-dummy_multi.$(OBJEXT) libEngine_a-engine.$(OBJEXT) \
libEngine_a-filesystem.$(OBJEXT) \
libEngine_a-fixedPoint_math.$(OBJEXT) \
libEngine_a-mmulti.$(OBJEXT) libEngine_a-network.$(OBJEXT) \
libEngine_a-tiles.$(OBJEXT)
libEngine_a_OBJECTS = $(am_libEngine_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libEngine_a_SOURCES)
DIST_SOURCES = $(libEngine_a_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/build-aux/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_LIBS = @SDL_LIBS@
SDL_MIXER_CFLAGS = @SDL_MIXER_CFLAGS@
SDL_MIXER_LIBS = @SDL_MIXER_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
WINDRES = @WINDRES@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LIBRARIES = libEngine.a
libEngine_a_SOURCES = cache.c display.c draw.c dummy_multi.c engine.c filesystem.c fixedPoint_math.c mmulti.c network.c tiles.c
libEngine_a_CFLAGS = -I$(top_srcdir)/Game/src
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Engine/src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Engine/src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libEngine.a: $(libEngine_a_OBJECTS) $(libEngine_a_DEPENDENCIES) $(EXTRA_libEngine_a_DEPENDENCIES)
$(AM_V_at)-rm -f libEngine.a
$(AM_V_AR)$(libEngine_a_AR) libEngine.a $(libEngine_a_OBJECTS) $(libEngine_a_LIBADD)
$(AM_V_at)$(RANLIB) libEngine.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libEngine_a-cache.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libEngine_a-display.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libEngine_a-draw.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libEngine_a-dummy_multi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libEngine_a-engine.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libEngine_a-filesystem.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libEngine_a-fixedPoint_math.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libEngine_a-mmulti.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libEngine_a-network.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libEngine_a-tiles.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
libEngine_a-cache.o: cache.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-cache.o -MD -MP -MF $(DEPDIR)/libEngine_a-cache.Tpo -c -o libEngine_a-cache.o `test -f 'cache.c' || echo '$(srcdir)/'`cache.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-cache.Tpo $(DEPDIR)/libEngine_a-cache.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cache.c' object='libEngine_a-cache.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-cache.o `test -f 'cache.c' || echo '$(srcdir)/'`cache.c
libEngine_a-cache.obj: cache.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-cache.obj -MD -MP -MF $(DEPDIR)/libEngine_a-cache.Tpo -c -o libEngine_a-cache.obj `if test -f 'cache.c'; then $(CYGPATH_W) 'cache.c'; else $(CYGPATH_W) '$(srcdir)/cache.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-cache.Tpo $(DEPDIR)/libEngine_a-cache.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cache.c' object='libEngine_a-cache.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-cache.obj `if test -f 'cache.c'; then $(CYGPATH_W) 'cache.c'; else $(CYGPATH_W) '$(srcdir)/cache.c'; fi`
libEngine_a-display.o: display.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-display.o -MD -MP -MF $(DEPDIR)/libEngine_a-display.Tpo -c -o libEngine_a-display.o `test -f 'display.c' || echo '$(srcdir)/'`display.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-display.Tpo $(DEPDIR)/libEngine_a-display.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='display.c' object='libEngine_a-display.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-display.o `test -f 'display.c' || echo '$(srcdir)/'`display.c
libEngine_a-display.obj: display.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-display.obj -MD -MP -MF $(DEPDIR)/libEngine_a-display.Tpo -c -o libEngine_a-display.obj `if test -f 'display.c'; then $(CYGPATH_W) 'display.c'; else $(CYGPATH_W) '$(srcdir)/display.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-display.Tpo $(DEPDIR)/libEngine_a-display.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='display.c' object='libEngine_a-display.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-display.obj `if test -f 'display.c'; then $(CYGPATH_W) 'display.c'; else $(CYGPATH_W) '$(srcdir)/display.c'; fi`
libEngine_a-draw.o: draw.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-draw.o -MD -MP -MF $(DEPDIR)/libEngine_a-draw.Tpo -c -o libEngine_a-draw.o `test -f 'draw.c' || echo '$(srcdir)/'`draw.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-draw.Tpo $(DEPDIR)/libEngine_a-draw.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='draw.c' object='libEngine_a-draw.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-draw.o `test -f 'draw.c' || echo '$(srcdir)/'`draw.c
libEngine_a-draw.obj: draw.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-draw.obj -MD -MP -MF $(DEPDIR)/libEngine_a-draw.Tpo -c -o libEngine_a-draw.obj `if test -f 'draw.c'; then $(CYGPATH_W) 'draw.c'; else $(CYGPATH_W) '$(srcdir)/draw.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-draw.Tpo $(DEPDIR)/libEngine_a-draw.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='draw.c' object='libEngine_a-draw.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-draw.obj `if test -f 'draw.c'; then $(CYGPATH_W) 'draw.c'; else $(CYGPATH_W) '$(srcdir)/draw.c'; fi`
libEngine_a-dummy_multi.o: dummy_multi.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-dummy_multi.o -MD -MP -MF $(DEPDIR)/libEngine_a-dummy_multi.Tpo -c -o libEngine_a-dummy_multi.o `test -f 'dummy_multi.c' || echo '$(srcdir)/'`dummy_multi.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-dummy_multi.Tpo $(DEPDIR)/libEngine_a-dummy_multi.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy_multi.c' object='libEngine_a-dummy_multi.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-dummy_multi.o `test -f 'dummy_multi.c' || echo '$(srcdir)/'`dummy_multi.c
libEngine_a-dummy_multi.obj: dummy_multi.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-dummy_multi.obj -MD -MP -MF $(DEPDIR)/libEngine_a-dummy_multi.Tpo -c -o libEngine_a-dummy_multi.obj `if test -f 'dummy_multi.c'; then $(CYGPATH_W) 'dummy_multi.c'; else $(CYGPATH_W) '$(srcdir)/dummy_multi.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-dummy_multi.Tpo $(DEPDIR)/libEngine_a-dummy_multi.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy_multi.c' object='libEngine_a-dummy_multi.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-dummy_multi.obj `if test -f 'dummy_multi.c'; then $(CYGPATH_W) 'dummy_multi.c'; else $(CYGPATH_W) '$(srcdir)/dummy_multi.c'; fi`
libEngine_a-engine.o: engine.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-engine.o -MD -MP -MF $(DEPDIR)/libEngine_a-engine.Tpo -c -o libEngine_a-engine.o `test -f 'engine.c' || echo '$(srcdir)/'`engine.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-engine.Tpo $(DEPDIR)/libEngine_a-engine.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='engine.c' object='libEngine_a-engine.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-engine.o `test -f 'engine.c' || echo '$(srcdir)/'`engine.c
libEngine_a-engine.obj: engine.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-engine.obj -MD -MP -MF $(DEPDIR)/libEngine_a-engine.Tpo -c -o libEngine_a-engine.obj `if test -f 'engine.c'; then $(CYGPATH_W) 'engine.c'; else $(CYGPATH_W) '$(srcdir)/engine.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-engine.Tpo $(DEPDIR)/libEngine_a-engine.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='engine.c' object='libEngine_a-engine.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-engine.obj `if test -f 'engine.c'; then $(CYGPATH_W) 'engine.c'; else $(CYGPATH_W) '$(srcdir)/engine.c'; fi`
libEngine_a-filesystem.o: filesystem.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-filesystem.o -MD -MP -MF $(DEPDIR)/libEngine_a-filesystem.Tpo -c -o libEngine_a-filesystem.o `test -f 'filesystem.c' || echo '$(srcdir)/'`filesystem.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-filesystem.Tpo $(DEPDIR)/libEngine_a-filesystem.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='filesystem.c' object='libEngine_a-filesystem.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-filesystem.o `test -f 'filesystem.c' || echo '$(srcdir)/'`filesystem.c
libEngine_a-filesystem.obj: filesystem.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-filesystem.obj -MD -MP -MF $(DEPDIR)/libEngine_a-filesystem.Tpo -c -o libEngine_a-filesystem.obj `if test -f 'filesystem.c'; then $(CYGPATH_W) 'filesystem.c'; else $(CYGPATH_W) '$(srcdir)/filesystem.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-filesystem.Tpo $(DEPDIR)/libEngine_a-filesystem.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='filesystem.c' object='libEngine_a-filesystem.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-filesystem.obj `if test -f 'filesystem.c'; then $(CYGPATH_W) 'filesystem.c'; else $(CYGPATH_W) '$(srcdir)/filesystem.c'; fi`
libEngine_a-fixedPoint_math.o: fixedPoint_math.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-fixedPoint_math.o -MD -MP -MF $(DEPDIR)/libEngine_a-fixedPoint_math.Tpo -c -o libEngine_a-fixedPoint_math.o `test -f 'fixedPoint_math.c' || echo '$(srcdir)/'`fixedPoint_math.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-fixedPoint_math.Tpo $(DEPDIR)/libEngine_a-fixedPoint_math.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fixedPoint_math.c' object='libEngine_a-fixedPoint_math.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-fixedPoint_math.o `test -f 'fixedPoint_math.c' || echo '$(srcdir)/'`fixedPoint_math.c
libEngine_a-fixedPoint_math.obj: fixedPoint_math.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-fixedPoint_math.obj -MD -MP -MF $(DEPDIR)/libEngine_a-fixedPoint_math.Tpo -c -o libEngine_a-fixedPoint_math.obj `if test -f 'fixedPoint_math.c'; then $(CYGPATH_W) 'fixedPoint_math.c'; else $(CYGPATH_W) '$(srcdir)/fixedPoint_math.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-fixedPoint_math.Tpo $(DEPDIR)/libEngine_a-fixedPoint_math.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fixedPoint_math.c' object='libEngine_a-fixedPoint_math.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-fixedPoint_math.obj `if test -f 'fixedPoint_math.c'; then $(CYGPATH_W) 'fixedPoint_math.c'; else $(CYGPATH_W) '$(srcdir)/fixedPoint_math.c'; fi`
libEngine_a-mmulti.o: mmulti.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-mmulti.o -MD -MP -MF $(DEPDIR)/libEngine_a-mmulti.Tpo -c -o libEngine_a-mmulti.o `test -f 'mmulti.c' || echo '$(srcdir)/'`mmulti.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-mmulti.Tpo $(DEPDIR)/libEngine_a-mmulti.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mmulti.c' object='libEngine_a-mmulti.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-mmulti.o `test -f 'mmulti.c' || echo '$(srcdir)/'`mmulti.c
libEngine_a-mmulti.obj: mmulti.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-mmulti.obj -MD -MP -MF $(DEPDIR)/libEngine_a-mmulti.Tpo -c -o libEngine_a-mmulti.obj `if test -f 'mmulti.c'; then $(CYGPATH_W) 'mmulti.c'; else $(CYGPATH_W) '$(srcdir)/mmulti.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-mmulti.Tpo $(DEPDIR)/libEngine_a-mmulti.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mmulti.c' object='libEngine_a-mmulti.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-mmulti.obj `if test -f 'mmulti.c'; then $(CYGPATH_W) 'mmulti.c'; else $(CYGPATH_W) '$(srcdir)/mmulti.c'; fi`
libEngine_a-network.o: network.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-network.o -MD -MP -MF $(DEPDIR)/libEngine_a-network.Tpo -c -o libEngine_a-network.o `test -f 'network.c' || echo '$(srcdir)/'`network.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-network.Tpo $(DEPDIR)/libEngine_a-network.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='network.c' object='libEngine_a-network.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-network.o `test -f 'network.c' || echo '$(srcdir)/'`network.c
libEngine_a-network.obj: network.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-network.obj -MD -MP -MF $(DEPDIR)/libEngine_a-network.Tpo -c -o libEngine_a-network.obj `if test -f 'network.c'; then $(CYGPATH_W) 'network.c'; else $(CYGPATH_W) '$(srcdir)/network.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-network.Tpo $(DEPDIR)/libEngine_a-network.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='network.c' object='libEngine_a-network.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-network.obj `if test -f 'network.c'; then $(CYGPATH_W) 'network.c'; else $(CYGPATH_W) '$(srcdir)/network.c'; fi`
libEngine_a-tiles.o: tiles.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-tiles.o -MD -MP -MF $(DEPDIR)/libEngine_a-tiles.Tpo -c -o libEngine_a-tiles.o `test -f 'tiles.c' || echo '$(srcdir)/'`tiles.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-tiles.Tpo $(DEPDIR)/libEngine_a-tiles.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tiles.c' object='libEngine_a-tiles.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-tiles.o `test -f 'tiles.c' || echo '$(srcdir)/'`tiles.c
libEngine_a-tiles.obj: tiles.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -MT libEngine_a-tiles.obj -MD -MP -MF $(DEPDIR)/libEngine_a-tiles.Tpo -c -o libEngine_a-tiles.obj `if test -f 'tiles.c'; then $(CYGPATH_W) 'tiles.c'; else $(CYGPATH_W) '$(srcdir)/tiles.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libEngine_a-tiles.Tpo $(DEPDIR)/libEngine_a-tiles.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tiles.c' object='libEngine_a-tiles.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libEngine_a_CFLAGS) $(CFLAGS) -c -o libEngine_a-tiles.obj `if test -f 'tiles.c'; then $(CYGPATH_W) 'tiles.c'; else $(CYGPATH_W) '$(srcdir)/tiles.c'; fi`
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,320 @@
/*
* "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
* Ken Silverman's official web site: "http://www.advsys.net/ken"
* See the included license file "BUILDLIC.TXT" for license info.
* This file has been modified from Ken Silverman's original release
*/
#ifndef _INCLUDE_BUILD_H_
#define _INCLUDE_BUILD_H_
#ifdef _WIN32
#include "windows/inttypes.h"
#else
#include <inttypes.h>
#endif
#define MAXSECTORS 1024
#define MAXWALLS 8192
#define MAXSPRITES 4096
#define MAXTILES 9216
#define MAXSTATUS 1024
#define MAXPLAYERS 16
#define MAXXDIM 1600
#define MAXYDIM 1200
#define MAXPALOOKUPS 256
#define MAXPSKYTILES 256
#define MAXSPRITESONSCREEN 1024
#define CLIPMASK0 (((1L)<<16)+1L)
#define CLIPMASK1 (((256L)<<16)+64L)
/*
* Make all variables in BUILD.H defined in the ENGINE,
* and externed in GAME
* (dear lord. --ryan.)
*/
#ifdef ENGINE
#define EXTERN
#else
#define EXTERN extern
#endif
#pragma pack(1)
/*
* ceilingstat/floorstat:
* bit 0: 1 = parallaxing, 0 = not "P"
* bit 1: 1 = groudraw, 0 = not
* bit 2: 1 = swap x&y, 0 = not "F"
* bit 3: 1 = double smooshiness "E"
* bit 4: 1 = x-flip "F"
* bit 5: 1 = y-flip "F"
* bit 6: 1 = Align texture to first wall of sector "R"
* bits 7-8: "T"
* 00 = normal floors
* 01 = masked floors
* 10 = transluscent masked floors
* 11 = reverse transluscent masked floors
* bits 9-15: reserved
*/
/* 40 bytes */
typedef struct
{
short wallptr, wallnum;
int32_t ceilingz, floorz;
short ceilingstat, floorstat;
short ceilingpicnum, ceilingheinum;
int8_t ceilingshade;
uint8_t ceilingpal, ceilingxpanning, ceilingypanning;
short floorpicnum, floorheinum;
int8_t floorshade;
uint8_t floorpal, floorxpanning, floorypanning;
uint8_t visibility, filler;
short lotag, hitag, extra;
} sectortype;
/*
* cstat:
* bit 0: 1 = Blocking wall (use with clipmove, getzrange) "B"
* bit 1: 1 = bottoms of invisible walls swapped, 0 = not "2"
* bit 2: 1 = align picture on bottom (for doors), 0 = top "O"
* bit 3: 1 = x-flipped, 0 = normal "F"
* bit 4: 1 = masking wall, 0 = not "M"
* bit 5: 1 = 1-way wall, 0 = not "1"
* bit 6: 1 = Blocking wall (use with hitscan / cliptype 1) "H"
* bit 7: 1 = Transluscence, 0 = not "T"
* bit 8: 1 = y-flipped, 0 = normal "F"
* bit 9: 1 = Transluscence reversing, 0 = normal "T"
* bits 10-15: reserved
*/
/* 32 bytes */
typedef struct
{
int32_t x, y;
short point2, nextwall, nextsector, cstat;
short picnum, overpicnum;
int8_t shade;
uint8_t pal, xrepeat, yrepeat, xpanning, ypanning;
short lotag, hitag, extra;
} walltype;
/*
* cstat:
* bit 0: 1 = Blocking sprite (use with clipmove, getzrange) "B"
* bit 1: 1 = transluscence, 0 = normal "T"
* bit 2: 1 = x-flipped, 0 = normal "F"
* bit 3: 1 = y-flipped, 0 = normal "F"
* bits 5-4: 00 = FACE sprite (default) "R"
* 01 = WALL sprite (like masked walls)
* 10 = FLOOR sprite (parallel to ceilings&floors)
* bit 6: 1 = 1-sided sprite, 0 = normal "1"
* bit 7: 1 = Real centered centering, 0 = foot center "C"
* bit 8: 1 = Blocking sprite (use with hitscan / cliptype 1) "H"
* bit 9: 1 = Transluscence reversing, 0 = normal "T"
* bits 10-14: reserved
* bit 15: 1 = Invisible sprite, 0 = not invisible
*/
/* 44 bytes */
typedef struct
{
int32_t x, y, z;
short cstat, picnum;
int8_t shade;
uint8_t pal, clipdist, filler;
uint8_t xrepeat, yrepeat;
int8_t xoffset, yoffset;
short sectnum, statnum;
short ang, owner, xvel, yvel, zvel;
short lotag, hitag, extra;
} spritetype;
#pragma pack()
EXTERN sectortype sector[MAXSECTORS];
EXTERN walltype wall[MAXWALLS];
EXTERN spritetype sprite[MAXSPRITES];
EXTERN uint16_t mapCRC;
EXTERN int32_t spritesortcnt;
EXTERN spritetype tsprite[MAXSPRITESONSCREEN];
EXTERN uint8_t vidoption;
EXTERN int32_t xdim, ydim, numpages;
// Fast way to retrive the start of a column in the framebuffer, given a screenspace X coordinate.
EXTERN int32_t ylookup[MAXYDIM+1];
EXTERN int32_t yxaspect, viewingrange;
EXTERN int32_t validmodecnt;
EXTERN short validmode[256];
EXTERN int32_t validmodexdim[256], validmodeydim[256];
EXTERN short numsectors, numwalls;
EXTERN volatile int32_t totalclock;
EXTERN int32_t numframes, randomseed;
EXTERN short sintable[2048];
EXTERN uint8_t palette[768];
EXTERN short numpalookups;
EXTERN uint8_t *palookup[MAXPALOOKUPS];
EXTERN uint8_t parallaxtype, showinvisibility;
EXTERN int32_t parallaxyoffs, parallaxyscale;
EXTERN int32_t visibility, parallaxvisibility;
EXTERN int32_t windowx1, windowy1, windowx2, windowy2;
EXTERN short startumost[MAXXDIM], startdmost[MAXXDIM];
EXTERN short pskyoff[MAXPSKYTILES], pskybits;
EXTERN short headspritesect[MAXSECTORS+1], headspritestat[MAXSTATUS+1];
EXTERN short prevspritesect[MAXSPRITES], prevspritestat[MAXSPRITES];
EXTERN short nextspritesect[MAXSPRITES], nextspritestat[MAXSPRITES];
/*
* These variables are for auto-mapping with the draw2dscreen function.
* When you load a new board, these bits are all set to 0 - since
* you haven't mapped out anything yet. Note that these arrays are
* bit-mapped.
* If you want draw2dscreen() to show sprite #54 then you say:
* spritenum = 54;
* show2dsprite[spritenum>>3] |= (1<<(spritenum&7));
* And if you want draw2dscreen() to not show sprite #54 then you say:
* spritenum = 54;
* show2dsprite[spritenum>>3] &= ~(1<<(spritenum&7));
* Automapping defaults to 0 (do nothing). If you set automapping to 1,
* then in 3D mode, the walls and sprites that you see will show up the
* next time you flip to 2D mode.
*/
EXTERN uint8_t show2dsector[(MAXSECTORS+7)>>3];
EXTERN uint8_t show2dwall[(MAXWALLS+7)>>3];
EXTERN uint8_t show2dsprite[(MAXSPRITES+7)>>3];
EXTERN uint8_t automapping;
//This is the bit vector that marks visited sector during portal flooding. Size is hence (MAXSECTORS / 8)
EXTERN uint8_t visitedSectors[(MAXSECTORS+7)>>3];
/*************************************************************************
POSITION VARIABLES:
POSX is your x - position ranging from 0 to 65535
POSY is your y - position ranging from 0 to 65535
(the length of a side of the grid in EDITBORD would be 1024)
POSZ is your z - position (height) ranging from 0 to 65535, 0 highest.
ANG is your angle ranging from 0 to 2047. Instead of 360 degrees, or
2 * PI radians, I use 2048 different angles, so 90 degrees would
be 512 in my system.
SPRITE VARIABLES:
EXTERN short headspritesect[MAXSECTORS+1], headspritestat[MAXSTATUS+1];
EXTERN short prevspritesect[MAXSPRITES], prevspritestat[MAXSPRITES];
EXTERN short nextspritesect[MAXSPRITES], nextspritestat[MAXSPRITES];
Example: if the linked lists look like the following:
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ Sector lists: Status lists: ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ Sector0: 4, 5, 8 Status0: 2, 0, 8 ³
³ Sector1: 16, 2, 0, 7 Status1: 4, 5, 16, 7, 3, 9 ³
³ Sector2: 3, 9 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Notice that each number listed above is shown exactly once on both the
left and right side. This is because any sprite that exists must
be in some sector, and must have some kind of status that you define.
Coding example #1:
To go through all the sprites in sector 1, the code can look like this:
sectnum = 1;
i = headspritesect[sectnum];
while (i != -1)
{
nexti = nextspritesect[i];
//your code goes here
//ex: printf("Sprite %d is in sector %d\n",i,sectnum);
i = nexti;
}
Coding example #2:
To go through all sprites with status = 1, the code can look like this:
statnum = 1; //status 1
i = headspritestat[statnum];
while (i != -1)
{
nexti = nextspritestat[i];
//your code goes here
//ex: printf("Sprite %d has a status of 1 (active)\n",i,statnum);
i = nexti;
}
insertsprite(short sectnum, short statnum);
deletesprite(short spritenum);
changespritesect(short spritenum, short newsectnum);
changespritestat(short spritenum, short newstatnum);
TILE VARIABLES:
NUMTILES - the number of tiles found TILES.DAT.
TILESIZX[MAXTILES] - simply the x-dimension of the tile number.
TILESIZY[MAXTILES] - simply the y-dimension of the tile number.
WALOFF[MAXTILES] - the actual 32-bit offset pointing to the top-left
corner of the tile.
PICANM[MAXTILES] - flags for animating the tile.
TIMING VARIABLES:
TOTALCLOCK - When the engine is initialized, TOTALCLOCK is set to zero.
From then on, it is incremented 120 times a second by 1. That
means that the number of seconds elapsed is totalclock / 120.
NUMFRAMES - The number of times the draw3dscreen function was called
since the engine was initialized. This helps to determine frame
rate. (Frame rate = numframes * 120 / totalclock.)
OTHER VARIABLES:
STARTUMOST[320] is an array of the highest y-coordinates on each column
that my engine is allowed to write to. You need to set it only
once.
STARTDMOST[320] is an array of the lowest y-coordinates on each column
that my engine is allowed to write to. You need to set it only
once.
SINTABLE[2048] is a sin table with 2048 angles rather than the
normal 360 angles for higher precision. Also since SINTABLE is in
all integers, the range is multiplied by 16383, so instead of the
normal -1<sin(x)<1, the range of sintable is -16383<sintable[]<16383
If you use this sintable, you can possibly speed up your code as
well as save space in memory. If you plan to use sintable, 2
identities you may want to keep in mind are:
sintable[ang&2047] = sin(ang * (3.141592/1024)) * 16383
sintable[(ang+512)&2047] = cos(ang * (3.141592/1024)) * 16383
NUMSECTORS - the total number of existing sectors. Modified every time
you call the loadboard function.
***************************************************************************/
#define PORTSIG "Port by Ryan C. Gordon, Andrew Henderson, Dan Olson, Fabien Sanglard and a cast of thousands."
//Global.c
void Error (int errorType, char *error, ...);
int FindDistance2D(int ix, int iy);
#endif /* defined _INCLUDE_BUILD_H_ */
/* end of build.h ... */

View file

@ -0,0 +1,225 @@
/*
* "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
* Ken Silverman's official web site: "http://www.advsys.net/ken"
* See the included license file "BUILDLIC.TXT" for license info.
* This file has been modified from Ken Silverman's original release
*/
#include "platform.h"
#include "display.h"
#include "fixedPoint_math.h"
#include "cache.h"
#include "build.h"
#include "../../Game/src/cvar_defs.h"
#include "../../Game/src/types.h"
/*
* This module keeps track of a standard linear cacheing system.
* To use this module, here's all you need to do:
*
* Step 1: Allocate a nice BIG buffer, like from 1MB-4MB and
* Call initcache(int32_t cachestart, int32_t cachesize) where
*
* cachestart = (int32_t )(pointer to start of BIG buffer)
* cachesize = length of BIG buffer
*
* Step 2: Call allocache(int32_t *bufptr, int32_t bufsiz, uint8_t *lockptr)
* whenever you need to allocate a buffer, where:
*
* *bufptr = pointer to 4-byte pointer to buffer
* Confused? Using this method, cache2d can remove
* previously allocated things from the cache safely by
* setting the 4-byte pointer to 0.
* bufsiz = number of bytes to allocate
* *lockptr = pointer to locking uint8_t which tells whether
* the region can be removed or not. If *lockptr = 0 then
* the region is not locked else its locked.
*
* Step 3: If you need to remove everything from the cache, or every
* unlocked item from the cache, you can call uninitcache();
* Call uninitcache(0) to remove all unlocked items, or
* Call uninitcache(1) to remove everything.
* After calling uninitcache, it is still ok to call allocache
* without first calling initcache.
*/
#define MAXCACHEOBJECTS 9216
static int32_t cachesize = 0;
int32_t cachecount = 0;
uint8_t zerochar = 0;
uint8_t* cachestart = NULL;
int32_t cacnum = 0, agecount = 0;
typedef struct {
uint8_t** hand;
int32_t leng;
uint8_t *lock; }
cactype;
cactype cac[MAXCACHEOBJECTS];
int32_t lockrecip[200];
// TC game directory
char game_dir[512] = "/.rockbox/duke3d";
void initcache(uint8_t* dacachestart, int32_t dacachesize)
{
int32_t i;
for(i=1;i<200;i++) lockrecip[i] = (1<<28)/(200-i);
cachestart = dacachestart;
cachesize = dacachesize;
cac[0].leng = cachesize;
cac[0].lock = &zerochar;
cacnum = 1;
}
void allocache (uint8_t** newhandle, int32_t newbytes, uint8_t *newlockptr)
{
int32_t i, z, zz, bestz=0, daval, bestval, besto=0, o1, o2, sucklen, suckz;
newbytes = newbytes+15;
if ((uint32_t)newbytes > (uint32_t)cachesize)
{
printf("Cachesize: %d\n",cachesize);
printf("*Newhandle: 0x%x, Newbytes: %d, *Newlock: %d\n",(unsigned int)newhandle,newbytes,*newlockptr);
reportandexit("BUFFER TOO BIG TO FIT IN CACHE!\n");
}
if (*newlockptr == 0)
{
reportandexit("ALLOCACHE CALLED WITH LOCK OF 0!\n");
}
/* Find best place */
bestval = 0x7fffffff; o1 = cachesize;
for(z=cacnum-1;z>=0;z--)
{
o1 -= cac[z].leng;
o2 = o1+newbytes; if (o2 > cachesize) continue;
daval = 0;
for(i=o1,zz=z;i<o2;i+=cac[zz++].leng)
{
if (*cac[zz].lock == 0) continue;
if (*cac[zz].lock >= 200) { daval = 0x7fffffff; break; }
daval += (int32_t ) mulscale32(cac[zz].leng+65536,lockrecip[*cac[zz].lock]);
if (daval >= bestval) break;
}
if (daval < bestval)
{
bestval = daval; besto = o1; bestz = z;
if (bestval == 0) break;
}
}
/*printf("%ld %ld %ld\n",besto,newbytes,*newlockptr);*/
if (bestval == 0x7fffffff)
reportandexit("CACHE SPACE ALL LOCKED UP!\n");
/* Suck things out */
for(sucklen=-newbytes,suckz=bestz;sucklen<0;sucklen+=cac[suckz++].leng)
if (*cac[suckz].lock) *cac[suckz].hand = 0;
/* Remove all blocks except 1 */
suckz -= (bestz+1); cacnum -= suckz;
copybufbyte(&cac[bestz+suckz],&cac[bestz],(cacnum-bestz)*sizeof(cactype));
cac[bestz].hand = newhandle;
*newhandle = cachestart+besto;
cac[bestz].leng = newbytes;
cac[bestz].lock = newlockptr;
cachecount++;
/* Add new empty block if necessary */
if (sucklen <= 0) return;
bestz++;
if (bestz == cacnum)
{
cacnum++; if (cacnum > MAXCACHEOBJECTS) reportandexit("Too many objects in cache! (cacnum > MAXCACHEOBJECTS)\n");
cac[bestz].leng = sucklen;
cac[bestz].lock = &zerochar;
return;
}
if (*cac[bestz].lock == 0) { cac[bestz].leng += sucklen; return; }
cacnum++; if (cacnum > MAXCACHEOBJECTS) reportandexit("Too many objects in cache! (cacnum > MAXCACHEOBJECTS)\n");
for(z=cacnum-1;z>bestz;z--) cac[z] = cac[z-1];
cac[bestz].leng = sucklen;
cac[bestz].lock = &zerochar;
}
void suckcache (int32_t *suckptr)
{
int32_t i;
/* Can't exit early, because invalid pointer might be same even though lock = 0 */
for(i=0;i<cacnum;i++)
if ((int32_t )(*cac[i].hand) == (int32_t )suckptr)
{
if (*cac[i].lock) *cac[i].hand = 0;
cac[i].lock = &zerochar;
cac[i].hand = 0;
/* Combine empty blocks */
if ((i > 0) && (*cac[i-1].lock == 0))
{
cac[i-1].leng += cac[i].leng;
cacnum--; copybuf(&cac[i+1],&cac[i],(cacnum-i)*sizeof(cactype));
}
else if ((i < cacnum-1) && (*cac[i+1].lock == 0))
{
cac[i+1].leng += cac[i].leng;
cacnum--; copybuf(&cac[i+1],&cac[i],(cacnum-i)*sizeof(cactype));
}
}
}
void agecache(void)
{
int32_t cnt;
uint8_t ch;
if (agecount >= cacnum) agecount = cacnum-1;
assert(agecount >= 0);
for(cnt=(cacnum>>4);cnt>=0;cnt--)
{
ch = (*cac[agecount].lock);
if (((ch-2)&255) < 198)
(*cac[agecount].lock) = (uint8_t ) (ch-1);
agecount--; if (agecount < 0) agecount = cacnum-1;
}
}
void reportandexit(char *errormessage)
{
int32_t i, j;
setvmode(0x3);
j = 0;
for(i=0;i<cacnum;i++)
{
printf("%d- ",i);
printf("ptr: 0x%x, ",(int8_t)*cac[i].hand);
printf("leng: %d, ",cac[i].leng);
printf("lock: %d\n",*cac[i].lock);
j += cac[i].leng;
}
printf("Cachesize = %d\n",cachesize);
printf("Cacnum = %d\n",cacnum);
printf("Cache length sum = %d\n",j);
printf("ERROR: %s",errormessage);
Error(EXIT_FAILURE, "");
}

View file

@ -0,0 +1,34 @@
/*
* Cache1d declarations.
*
* Written by Ryan C. Gordon. (icculus@clutteredmind.org)
*
* Please do NOT harrass Ken Silverman about any code modifications
* (including this file) to BUILD.
*/
/*
* "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
* Ken Silverman's official web site: "http://www.advsys.net/ken"
* See the included license file "BUILDLIC.TXT" for license info.
* This file has been modified from Ken Silverman's original release
*/
#ifndef _INCLUDE_CACHE1D_H_
#define _INCLUDE_CACHE1D_H_
void initcache(uint8_t* dacachestart, int32_t dacachesize);
void allocache (uint8_t* *newhandle, int32_t newbytes, uint8_t *newlockptr);
void suckcache (int32_t *suckptr);
void agecache(void);
void reportandexit(char *errormessage);
extern char game_dir[];
//Filesystem
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,110 @@
/*
* "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
* Ken Silverman's official web site: "http://www.advsys.net/ken"
* See the included license file "BUILDLIC.TXT" for license info.
* This file IS NOT A PART OF Ken Silverman's original release
*/
#ifndef _INCLUDE_DISPLAY_H_
#define _INCLUDE_DISPLAY_H_
#include "platform.h"
/* set these in your _platform_init() implementation. */
int _argc;
char **_argv;
/* !!! gads, look at all the namespace polution... */
extern int32_t xres, yres, bytesperline, imageSize, maxpages;
extern uint8_t *screen, vesachecked;
extern int32_t buffermode, origbuffermode, linearmode;
extern uint8_t permanentupdate, vgacompatible;
extern uint8_t moustat;
extern int32_t *horizlookup, *horizlookup2, horizycent;
extern int32_t oxdimen, oviewingrange, oxyaspect;
extern int32_t curbrightness;
extern int32_t qsetmode;
extern int32_t pageoffset, ydim16;
extern uint8_t* frameplace;
extern uint8_t* frameoffset;
extern uint8_t textfont[1024], smalltextfont[1024];
extern uint8_t pow2char[8];
extern int32_t stereomode, visualpage, activepage, whiteband, blackband;
extern int32_t searchx, searchy;
extern int32_t wx1, wy1, wx2, wy2, ydimen;
extern int32_t xdimen, xdimenrecip, halfxdimen, xdimenscale, xdimscale;
/*
* !!! used to be static. If we ever put the original setgamemode() back, this
* !!! can be made static again. --ryan.
* !!! (Actually, most of these extern declarations used to be static...rcg.)
*/
extern uint8_t permanentlock;
// defined in the game project:
extern int32_t BFullScreen; // defined in Game\src\config.c
extern int32_t ScreenMode;
/* these need to be implemented by YOUR driver. */
void _platform_init(int argc, char **argv, const char *title, const char *iconName);
void _idle(void);
void _handle_events(void);
void *_getVideoBase(void);
void initkeys(void);
void uninitkeys(void);
void _nextpage(void);
void _uninitengine(void);
void _joystick_init(void);
void _joystick_deinit(void);
int _joystick_update(void);
int _joystick_axis(int axis);
int _joystick_hat(int hat);
int _joystick_button(int button);
void getvalidvesamodes(void);
int VBE_getPalette(int32_t start, int32_t num, uint8_t *dapal);
int VBE_setPalette(uint8_t *palettebuffer);
void setvmode(int mode);
uint8_t readpixel(uint8_t * location);
void drawpixel(uint8_t * location, uint8_t pixel);
void drawpixel16(int32_t offset);
void fillscreen16 (int32_t input1, int32_t input2, int32_t input3);
void clear2dscreen(void);
void _updateScreenRect(int32_t x, int32_t y, int32_t w, int32_t h);
/* mouse/keystuff stuff. Also implemented in sdl_driver.c ... */
int setupmouse(void);
void readmousexy(short *x, short *y);
void readmousebstatus(short *bstatus);
void keyhandler(void);
uint8_t _readlastkeyhit(void);
/* timer krap. */
int inittimer(int);
void uninittimer(void);
/* this is implemented in the game, and your driver calls it. */
void timerhandler(void);
/* resolution inits. sdl_driver.c ... */
int32_t _setgamemode(uint8_t davidoption, int32_t daxdim, int32_t daydim);
uint32_t getticks();
void drawline16(int32_t XStart, int32_t YStart, int32_t XEnd, int32_t YEnd, uint8_t Color);
void setcolor16(uint8_t color);
void initmultiplayers(uint8_t damultioption, uint8_t dacomrateoption, uint8_t dapriority);
#endif

View file

@ -0,0 +1,919 @@
// "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
// Ken Silverman's official web site: "http://www.advsys.net/ken"
// See the included license file "BUILDLIC.TXT" for license info.
// This file has been modified from Ken Silverman's original release
/* DDOI - This file is an attempt to reimplement a_nasm.asm in C */
/* FCS: However did that work: This is far from perfect but you have my eternal respect !!! */
#include "platform.h"
#include "build.h"
#include "draw.h"
int32_t pixelsAllowed = 10000000000;
uint8_t *transluc = NULL;
static int transrev = 0;
#define shrd(a,b,c) (((b)<<(32-(c))) | ((a)>>(c)))
#define shld(a,b,c) (((b)>>(32-(c))) | ((a)<<(c)))
/* --------------- WALLS RENDERING METHOD (USED TO BE HIGHLY OPTIMIZED ASSEMBLY) ----------------------------*/
extern int32_t asm1;
extern intptr_t asm2;
extern uint8_t *asm3;
extern int32_t asm4;
static uint8_t machxbits_al;
static uint8_t bitsSetup;
static uint8_t * textureSetup;
void sethlinesizes(int32_t i1, int32_t _bits, uint8_t * textureAddress)
{
machxbits_al = i1;
bitsSetup = _bits;
textureSetup = textureAddress;
}
//FCS: Draw ceiling/floors
//Draw a line from destination in the framebuffer to framebuffer-numPixels
void hlineasm4(int32_t numPixels, int32_t shade, uint32_t i4, uint32_t i5, uint8_t *dest){
int32_t shifter = ((256-machxbits_al) & 0x1f);
uint32_t source;
uint8_t * texture = textureSetup;
uint8_t bits = bitsSetup;
shade = shade & 0xffffff00;
numPixels++;
if (!RENDER_DRAW_CEILING_AND_FLOOR)
return;
while (numPixels) {
source = i5 >> shifter;
source = shld(source,i4,bits);
source = texture[source];
if (pixelsAllowed-- > 0)
*dest = globalpalwritten[shade|source];
dest--;
i5 -= asm1;
i4 -= asm2;
numPixels--;
}
}
static int32_t rmach_eax;
static int32_t rmach_ebx;
static int32_t rmach_ecx;
static int32_t rmach_edx;
static int32_t rmach_esi;
void setuprhlineasm4(int32_t i1, int32_t i2, int32_t i3, int32_t i4, int32_t i5, int32_t i6)
{
rmach_eax = i1;
rmach_ebx = i2;
rmach_ecx = i3;
rmach_edx = i4;
rmach_esi = i5;
}
void rhlineasm4(int32_t i1, uint8_t* texture, int32_t i3, uint32_t i4, uint32_t i5, int32_t dest)
{
uint32_t ebp = dest - i1;
uint32_t rmach6b = ebp-1;
int32_t numPixels;
if (i1 <= 0) return;
numPixels = i1;
do {
i3 = ((i3&0xffffff00)|(*texture));
i4 -= rmach_eax;
ebp = (((i4+rmach_eax) < i4) ? -1 : 0);
i5 -= rmach_ebx;
if ((i5 + rmach_ebx) < i5)
texture -= (rmach_ecx+1);
else
texture -= rmach_ecx;
ebp &= rmach_esi;
i1 = ((i1&0xffffff00)|(((uint8_t *)i3)[rmach_edx]));
if (pixelsAllowed-- > 0)
((uint8_t *)rmach6b)[numPixels] = (i1&0xff);
texture -= ebp;
numPixels--;
} while (numPixels);
}
static int32_t rmmach_eax;
static int32_t rmmach_ebx;
static int32_t rmmach_ecx;
static int32_t rmmach_edx;
static int32_t setupTileHeight;
void setuprmhlineasm4(int32_t i1, int32_t i2, int32_t i3, int32_t i4, int32_t tileHeight, int32_t i6)
{
rmmach_eax = i1;
rmmach_ebx = i2;
rmmach_ecx = i3;
rmmach_edx = i4;
setupTileHeight = tileHeight;
}
//FCS: ????
void rmhlineasm4(int32_t i1, intptr_t shade, int32_t colorIndex, int32_t i4, int32_t i5, int32_t dest)
{
uint32_t ebp = dest - i1;
uint32_t rmach6b = ebp-1;
int32_t numPixels;
if (i1 <= 0)
return;
numPixels = i1;
do {
colorIndex = ((colorIndex&0xffffff00)|(*((uint8_t *)shade)));
i4 -= rmmach_eax;
ebp = (((i4+rmmach_eax) < i4) ? -1 : 0);
i5 -= rmmach_ebx;
if ((i5 + rmmach_ebx) < i5)
shade -= (rmmach_ecx+1);
else
shade -= rmmach_ecx;
ebp &= setupTileHeight;
//Check if this colorIndex is the transparent color (255).
if ((colorIndex&0xff) != 255) {
if (pixelsAllowed-- > 0)
{
i1 = ((i1&0xffffff00)|(((uint8_t *)colorIndex)[rmmach_edx]));
((uint8_t *)rmach6b)[numPixels] = (i1&0xff);
}
}
shade -= ebp;
numPixels--;
} while (numPixels);
}
//Variable used to draw column.
//This is how much you have to skip in the framebuffer in order to be one pixel below.
static int32_t bytesperline;
void setBytesPerLine(int32_t _bytesperline)
{
bytesperline = _bytesperline;
}
static uint8_t mach3_al;
//FCS: RENDER TOP AND BOTTOM COLUMN
int32_t prevlineasm1(int32_t i1, uint8_t* palette, int32_t i3, int32_t i4, uint8_t *source, uint8_t *dest)
{
if (i3 == 0)
{
if (!RENDER_DRAW_TOP_AND_BOTTOM_COLUMN)
return 0;
i1 += i4;
i4 = ((uint32_t)i4) >> mach3_al;
i4 = (i4&0xffffff00) | source[i4];
if (pixelsAllowed-- > 0)
*dest = palette[i4];
return i1;
} else {
return vlineasm1(i1,palette,i3,i4,source,dest);
}
}
//FCS: This is used to draw wall border vertical lines
int32_t vlineasm1(int32_t vince, uint8_t* palookupoffse, int32_t numPixels, int32_t vplce, uint8_t* texture, uint8_t* dest)
{
uint32_t temp;
if (!RENDER_DRAW_WALL_BORDERS)
return vplce;
numPixels++;
while (numPixels)
{
temp = ((uint32_t)vplce) >> mach3_al;
temp = texture[temp];
if (pixelsAllowed-- > 0)
*dest = palookupoffse[temp];
vplce += vince;
dest += bytesperline;
numPixels--;
}
return vplce;
}
int32_t tvlineasm1(int32_t i1, uint8_t * texture, int32_t numPixels, int32_t i4, uint8_t *source, uint8_t *dest)
{
uint8_t shiftValue = (globalshiftval & 0x1f);
numPixels++;
while (numPixels)
{
uint32_t temp = i4;
temp >>= shiftValue;
temp = source[temp];
//255 is the index for transparent color index. Skip drawing this pixel.
if (temp != 255)
{
uint16_t colorIndex;
colorIndex = texture[temp];
colorIndex |= ((*dest)<<8);
if (transrev)
colorIndex = ((colorIndex>>8)|(colorIndex<<8));
if (pixelsAllowed-- > 0)
*dest = transluc[colorIndex];
}
i4 += i1;
//We are drawing a column ?!
dest += bytesperline;
numPixels--;
}
return i4;
} /* tvlineasm1 */
static uint8_t tran2shr;
static uint32_t tran2pal_ebx;
static uint32_t tran2pal_ecx;
void setuptvlineasm2(int32_t i1, int32_t i2, int32_t i3)
{
tran2shr = (i1&0x1f);
tran2pal_ebx = i2;
tran2pal_ecx = i3;
} /* */
void tvlineasm2(uint32_t i1, uint32_t i2, uintptr_t i3, uintptr_t i4, uint32_t i5, uintptr_t i6)
{
uint32_t ebp = i1;
uint32_t tran2inca = i2;
uint32_t tran2incb = asm1;
uintptr_t tran2bufa = i3;
uintptr_t tran2bufb = i4;
uintptr_t tran2edi = asm2;
uintptr_t tran2edi1 = asm2 + 1;
i6 -= asm2;
do {
i1 = i5 >> tran2shr;
i2 = ebp >> tran2shr;
i5 += tran2inca;
ebp += tran2incb;
i3 = ((uint8_t *)tran2bufa)[i1];
i4 = ((uint8_t *)tran2bufb)[i2];
if (i3 == 255) { // skipdraw1
if (i4 != 255) { // skipdraw3
uint16_t val;
val = ((uint8_t *)tran2pal_ecx)[i4];
val |= (((uint8_t *)i6)[tran2edi1]<<8);
if (transrev)
val = ((val>>8)|(val<<8));
if (pixelsAllowed-- > 0)
((uint8_t *)i6)[tran2edi1] = transluc[val];
}
} else if (i4 == 255) { // skipdraw2
uint16_t val;
val = ((uint8_t *)tran2pal_ebx)[i3];
val |= (((uint8_t *)i6)[tran2edi]<<8);
if (transrev)
val = ((val>>8)|(val<<8));
if (pixelsAllowed-- > 0)
((uint8_t *)i6)[tran2edi] = transluc[val];
} else {
uint16_t l = ((uint8_t *)i6)[tran2edi]<<8;
uint16_t r = ((uint8_t *)i6)[tran2edi1]<<8;
l |= ((uint8_t *)tran2pal_ebx)[i3];
r |= ((uint8_t *)tran2pal_ecx)[i4];
if (transrev) {
l = ((l>>8)|(l<<8));
r = ((r>>8)|(r<<8));
}
if (pixelsAllowed-- > 0)
{
((uint8_t *)i6)[tran2edi] = transluc[l];
((uint8_t *)i6)[tran2edi1] =transluc[r];
pixelsAllowed--;
}
}
i6 += bytesperline;
} while (i6 > i6 - bytesperline);
asm1 = i5;
asm2 = ebp;
}
static uint8_t machmv;
int32_t mvlineasm1(int32_t vince, uint8_t* palookupoffse, int32_t i3, int32_t vplce, uint8_t* texture, uint8_t *dest)
{
uint32_t temp;
for(;i3>=0;i3--)
{
temp = ((uint32_t)vplce) >> machmv;
temp = texture[temp];
if (temp != 255)
{
if (pixelsAllowed-- > 0)
*dest = palookupoffse[temp];
}
vplce += vince;
dest += bytesperline;
}
return vplce;
}
void setupvlineasm(int32_t i1)
{
mach3_al = (i1&0x1f);
}
//FCS This is used to fill the inside of a wall (so it draws VERTICAL column, always).
void vlineasm4(int32_t columnIndex, intptr_t framebuffer)
{
if (!RENDER_DRAW_WALL_INSIDE)
return ;
int i;
uint32_t temp;
uintptr_t index = (framebuffer + ylookup[columnIndex]);
uint8_t *dest= (uint8_t *)(-ylookup[columnIndex]);
do {
for (i = 0; i < 4; i++)
{
temp = ((uint32_t)vplce[i]) >> mach3_al;
temp = (((uint8_t *)(bufplce[i]))[temp]);
if (pixelsAllowed-- > 0)
dest[index+i] = palookupoffse [i] [temp];
vplce[i] += vince[i];
}
dest += bytesperline;
} while (((uint32_t)dest - bytesperline) < ((uint32_t)dest));
}
void setupmvlineasm(int32_t i1)
{
//Only keep 5 first bits
machmv = (i1&0x1f);
}
void mvlineasm4(int32_t column, intptr_t framebufferOffset)
{
int i;
uint32_t temp;
uintptr_t index = (framebufferOffset + ylookup[column]);
uint8_t *dest = (uint8_t *)(-ylookup[column]);
do {
if (pixelsAllowed <= 0)
return;
for (i = 0; i < 4; i++)
{
temp = ((uint32_t)vplce[i]) >> machmv;
temp = (((uint8_t *)(bufplce[i]))[temp]);
if (temp != 255)
{
if (pixelsAllowed-- > 0)
dest[index+i] = palookupoffse[i][temp];
}
vplce[i] += vince[i];
}
dest += bytesperline;
} while (((uint32_t)dest - bytesperline) < ((uint32_t)dest));
}
/* END --------------- WALLS RENDERING METHOD (USED TO BE HIGHLY OPTIMIZED ASSEMBLY) ----------------------------*/
/* --------------- SPRITE RENDERING METHOD (USED TO BE HIGHLY OPTIMIZED ASSEMBLY) ----------------------------*/
static int32_t spal_eax;
static int32_t smach_eax;
static int32_t smach2_eax;
static int32_t smach5_eax;
static int32_t smach_ecx;
void setupspritevline(int32_t i1, int32_t i2, int32_t i3, int32_t i4, int32_t i5, int32_t i6)
{
spal_eax = i1;
smach_eax = (i5<<16);
smach2_eax = (i5>>16)+i2;
smach5_eax = smach2_eax + i4;
smach_ecx = i3;
}
void spritevline(int32_t i1, uint32_t i2, int32_t i3, uint32_t i4, uint8_t* source, uint8_t* dest)
{
setup:
i2 += smach_eax;
i1 = (i1&0xffffff00) | (*source&0xff);
if ((i2 - smach_eax) > i2)
source += smach2_eax + 1;
else
source += smach2_eax;
while(1) {
i1 = (i1&0xffffff00) | (((uint8_t *)spal_eax)[i1]&0xff);
if (pixelsAllowed-- > 0)
*dest = i1;
dest += bytesperline;
i4 += smach_ecx;
i4--;
if (!((i4 - smach_ecx) > i4) && i4 != 0)
goto setup;
if (i4 == 0)
return;
i2 += smach_eax;
i1 = (i1&0xffffff00) | (*source&0xff);
if ((i2 - smach_eax) > i2)
source += smach5_eax + 1;
else
source += smach5_eax;
}
}
static int32_t mspal_eax;
static int32_t msmach_eax;
static int32_t msmach2_eax;
static int32_t msmach5_eax;
static int32_t msmach_ecx;
void msetupspritevline(int32_t i1, int32_t i2, int32_t i3, int32_t i4, int32_t i5, int32_t i6)
{
mspal_eax = i1;
msmach_eax = (i5<<16);
msmach2_eax = (i5>>16)+i2;
msmach5_eax = smach2_eax + i4;
msmach_ecx = i3;
}
void mspritevline(int32_t colorIndex, int32_t i2, int32_t i3, int32_t i4, uint8_t * source, uint8_t * dest)
{
setup:
i2 += smach_eax;
colorIndex = (colorIndex&0xffffff00) | (*source&0xff);
if ((i2 - smach_eax) > i2)
source += smach2_eax + 1;
else
source += smach2_eax;
while(1){
//Skip transparent pixels (index=255)
if ((colorIndex&0xff) != 255)
{
colorIndex = (colorIndex&0xffffff00) | (((uint8_t *)spal_eax)[colorIndex]&0xff);
if (pixelsAllowed-- > 0)
*dest = colorIndex;
}
dest += bytesperline;
i4 += smach_ecx;
i4--;
if (!((i4 - smach_ecx) > i4) && i4 != 0)
goto setup;
if (i4 == 0)
return;
i2 += smach_eax;
colorIndex = (colorIndex&0xffffff00) | (*source&0xff);
if ((i2 - smach_eax) > i2)
source += smach5_eax + 1;
else
source += smach5_eax;
}
}
uint8_t * tspal;
uint32_t tsmach_eax1;
uint32_t adder;
uint32_t tsmach_eax3;
uint32_t tsmach_ecx;
void tsetupspritevline(uint8_t * palette, int32_t i2, int32_t i3, int32_t i4, int32_t i5)
{
tspal = palette;
tsmach_eax1 = i5 << 16;
adder = (i5 >> 16) + i2;
tsmach_eax3 = adder + i4;
tsmach_ecx = i3;
}
/*
FCS: Draw a sprite vertical line of pixels.
*/
void DrawSpriteVerticalLine(int32_t i2, int32_t numPixels, uint32_t i4, uint8_t * texture, uint8_t * dest)
{
uint8_t colorIndex;
while (numPixels)
{
numPixels--;
if (numPixels != 0)
{
i4 += tsmach_ecx;
if (i4 < (i4 - tsmach_ecx))
adder = tsmach_eax3;
colorIndex = *texture;
i2 += tsmach_eax1;
if (i2 < (i2 - tsmach_eax1))
texture++;
texture += adder;
//255 is the index of the transparent color: Do not draw it.
if (colorIndex != 255)
{
uint16_t val;
val = tspal[colorIndex];
val |= (*dest)<<8;
if (transrev)
val = ((val>>8)|(val<<8));
colorIndex = transluc[val];
if (pixelsAllowed-- > 0)
*dest = colorIndex;
}
//Move down one pixel on the framebuffer
dest += bytesperline;
}
}
}
/* END--------------- SPRITE RENDERING METHOD (USED TO BE HIGHLY OPTIMIZED ASSEMBLY) ----------------------------*/
/* --------------- FLOOR/CEILING RENDERING METHOD (USED TO BE HIGHLY OPTIMIZED ASSEMBLY) ----------------------------*/
void settrans(int32_t type){
transrev = type;
}
static uint8_t * textureData;
static uint8_t * mmach_asm3;
static int32_t mmach_asm1;
static int32_t mmach_asm2;
void mhline(uint8_t * texture, int32_t i2, int32_t numPixels, int32_t i4, int32_t i5, uint8_t* dest)
{
textureData = texture;
mmach_asm3 = asm3;
mmach_asm1 = asm1;
mmach_asm2 = asm2;
mhlineskipmodify(i2,numPixels>>16,i5,dest);
}
static uint8_t mshift_al = 26;
static uint8_t mshift_bl = 6;
void mhlineskipmodify( uint32_t i2, int32_t numPixels, int32_t i5, uint8_t* dest)
{
uint32_t ebx;
int32_t colorIndex;
while (numPixels >= 0)
{
ebx = i2 >> mshift_al;
ebx = shld (ebx, (uint32_t)i5, mshift_bl);
colorIndex = textureData[ebx];
//Skip transparent color.
if ((colorIndex&0xff) != 0xff){
if (pixelsAllowed-- > 0)
*dest = mmach_asm3[colorIndex];
}
i2 += mmach_asm1;
i5 += mmach_asm2;
dest++;
numPixels--;
}
}
void msethlineshift(int32_t i1, int32_t i2)
{
i1 = 256-i1;
mshift_al = (i1&0x1f);
mshift_bl = (i2&0x1f);
} /* msethlineshift */
static uint8_t * tmach_eax;
static uint8_t * tmach_asm3;
static int32_t tmach_asm1;
static int32_t tmach_asm2;
void thline(uint8_t * i1, int32_t i2, int32_t i3, int32_t i4, int32_t i5, uint8_t * i6)
{
tmach_eax = i1;
tmach_asm3 = asm3;
tmach_asm1 = asm1;
tmach_asm2 = asm2;
thlineskipmodify(asm2,i2,i3,i4,i5,i6);
}
static uint8_t tshift_al = 26;
static uint8_t tshift_bl = 6;
void thlineskipmodify(int32_t i1, uint32_t i2, uint32_t i3, int32_t i4, int32_t i5, uint8_t * i6)
{
uint32_t ebx;
int counter = (i3>>16);
while (counter >= 0)
{
ebx = i2 >> tshift_al;
ebx = shld (ebx, (uint32_t)i5, tshift_bl);
i1 = tmach_eax[ebx];
if ((i1&0xff) != 0xff)
{
uint16_t val = tmach_asm3[i1];
val |= (*i6)<<8;
if (transrev)
val = ((val>>8)|(val<<8));
if (pixelsAllowed-- > 0)
*i6 = transluc[val];
}
i2 += tmach_asm1;
i5 += tmach_asm2;
i6++;
counter--;
}
}
void tsethlineshift(int32_t i1, int32_t i2)
{
i1 = 256-i1;
tshift_al = (i1&0x1f);
tshift_bl = (i2&0x1f);
}
static intptr_t slopemach_ebx;
static int32_t slopemach_ecx;
static int32_t slopemach_edx;
static uint8_t slopemach_ah1;
static uint8_t slopemach_ah2;
static float asm2_f;
typedef union { unsigned int i; float f; } bitwisef2i;
void setupslopevlin(int32_t i1, intptr_t i2, int32_t i3)
{
bitwisef2i c;
slopemach_ebx = i2;
slopemach_ecx = i3;
slopemach_edx = (1<<(i1&0x1f)) - 1;
slopemach_edx <<= ((i1&0x1f00)>>8);
slopemach_ah1 = 32-((i1&0x1f00)>>8);
slopemach_ah2 = (slopemach_ah1 - (i1&0x1f)) & 0x1f;
c.f = asm2_f = (float)asm1;
asm2 = c.i;
}
extern int32_t reciptable[2048];
extern int32_t globalx3, globaly3;
extern int32_t fpuasm;
#define low32(a) ((a&0xffffffff))
#define high32(a) ((int)(((__int64)a&(__int64)0xffffffff00000000)>>32))
//FCS: Render RENDER_SLOPPED_CEILING_AND_FLOOR
void slopevlin(intptr_t i1, uint32_t i2, int32_t i3, int32_t i4, int32_t i5, int32_t i6)
{
bitwisef2i c;
uint32_t ecx,eax,ebx,edx,esi,edi;
//This is so bad to cast asm3 to int then float :( !!!
float a = (float)(int32_t) asm3 + asm2_f;
i1 -= slopemach_ecx;
esi = i5 + low32((__int64)globalx3 * (__int64)(i2<<3));
edi = i6 + low32((__int64)globaly3 * (__int64)(i2<<3));
ebx = i4;
if (!RENDER_SLOPPED_CEILING_AND_FLOOR)
return;
do {
// -------------
// All this is calculating a fixed point approx. of 1/a
c.f = a;
fpuasm = eax = c.i;
edx = (((int32_t)eax) < 0) ? 0xffffffff : 0;
eax = eax << 1;
ecx = (eax>>24); // exponent
eax = ((eax&0xffe000)>>11);
ecx = ((ecx&0xffffff00)|((ecx-2)&0xff));
eax = reciptable[eax/4];
eax >>= (ecx&0x1f);
eax ^= edx;
// -------------
edx = i2;
i2 = eax;
eax -= edx;
ecx = low32((__int64)globalx3 * (__int64)eax);
eax = low32((__int64)globaly3 * (__int64)eax);
a += asm2_f;
asm4 = ebx;
ecx = ((ecx&0xffffff00)|(ebx&0xff));
if (ebx >= 8) ecx = ((ecx&0xffffff00)|8);
ebx = esi;
edx = edi;
while ((ecx&0xff))
{
ebx >>= slopemach_ah2;
esi += ecx;
edx >>= slopemach_ah1;
ebx &= slopemach_edx;
edi += eax;
i1 += slopemach_ecx;
edx = ((edx&0xffffff00)|((((uint8_t *)(ebx+edx))[slopemach_ebx])));
ebx = *((uint32_t*)i3); // register trickery
i3 -= 4;
eax = ((eax&0xffffff00)|(*((uint8_t *)(ebx+edx))));
ebx = esi;
if (pixelsAllowed-- > 0)
*((uint8_t *)i1) = (eax&0xff);
edx = edi;
ecx = ((ecx&0xffffff00)|((ecx-1)&0xff));
}
ebx = asm4;
ebx -= 8; // BITSOFPRECISIONPOW
} while ((int32_t)ebx > 0);
}
/* END --------------- FLOOR/CEILING RENDERING METHOD (USED TO BE HIGHLY OPTIMIZED ASSEMBLY) ----------------------------*/

View file

@ -0,0 +1,105 @@
/*
* "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
* Ken Silverman's official web site: "http://www.advsys.net/ken"
* See the included license file "BUILDLIC.TXT" for license info.
* This file IS NOT A PART OF Ken Silverman's original release
*/
#ifndef _INCLUDE_A_H_
#define _INCLUDE_A_H_
#ifdef _WIN32
#include "windows/inttypes.h"
#else
#include <inttypes.h>
#endif
//C++ linker friendly
#ifdef __cplusplus
extern "C" {
#endif
extern uint8_t *transluc;
extern uint8_t *globalpalwritten;
extern int16_t globalshiftval;
extern int32_t vplce[4], vince[4];
extern intptr_t bufplce[4];
extern uint8_t* palookupoffse[4];
void sethlinesizes(int32_t,int32_t,uint8_t *);
void hlineasm4(int32_t,int32_t,uint32_t,uint32_t,uint8_t*);
void setuprhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
void rhlineasm4(int32_t,uint8_t*,int32_t,uint32_t,uint32_t,int32_t);
void setuprmhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
void rmhlineasm4(int32_t,intptr_t,int32_t,int32_t,int32_t,int32_t);
void setBytesPerLine(int32_t);
int32_t prevlineasm1(int32_t,uint8_t* palette ,int32_t,int32_t,uint8_t *,uint8_t *);
int32_t vlineasm1(int32_t,uint8_t*,int32_t,int32_t,uint8_t *,uint8_t*);
int32_t tvlineasm1(int32_t,uint8_t *,int32_t,int32_t,uint8_t *,uint8_t * dest);
void setuptvlineasm2(int32_t,int32_t,int32_t);
void tvlineasm2(uint32_t,uint32_t,uintptr_t,uintptr_t,uint32_t,uintptr_t);
int32_t mvlineasm1(int32_t,uint8_t*,int32_t,int32_t,uint8_t* texture,uint8_t* dest);
void setupvlineasm(int32_t);
void vlineasm4(int32_t,intptr_t);
void setupmvlineasm(int32_t);
void mvlineasm4(int32_t,intptr_t);
void setupspritevline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
void spritevline(int32_t,uint32_t,int32_t,uint32_t,uint8_t*,uint8_t*);
void msetupspritevline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t);
void mspritevline(int32_t,int32_t,int32_t,int32_t,uint8_t *,uint8_t *);
void tsetupspritevline(uint8_t *,int32_t,int32_t,int32_t,int32_t);
void DrawSpriteVerticalLine(int32_t,int32_t,uint32_t,uint8_t* ,uint8_t*);
void mhline(uint8_t *,int32_t,int32_t,int32_t,int32_t,uint8_t*);
void mhlineskipmodify(uint32_t,int32_t,int32_t,uint8_t*);
void msethlineshift(int32_t,int32_t);
void thline(uint8_t*,int32_t,int32_t,int32_t,int32_t,uint8_t *);
void thlineskipmodify(int32_t,uint32_t,uint32_t,int32_t,int32_t,uint8_t *);
void tsethlineshift(int32_t,int32_t);
void setupslopevlin(int32_t,intptr_t,int32_t);
void slopevlin(intptr_t,uint32_t,int32_t,int32_t,int32_t,int32_t);
#define TRANS_NORMAL 0
#define TRANS_REVERSE 1
void settrans(int32_t type);
//FCS: In order to see how the engine renders different part of the screen you can set the following macros
//VISUALIZE RENDERER
#define MAX_PIXEL_RENDERERED ((1600*1200)+20000 )
extern int32_t pixelsAllowed;
#define RENDER_DRAW_WALL_BORDERS 1
#define RENDER_DRAW_WALL_INSIDE 1
#define RENDER_DRAW_CEILING_AND_FLOOR 1
#define RENDER_DRAW_TOP_AND_BOTTOM_COLUMN 1
#define RENDER_SLOPPED_CEILING_AND_FLOOR 1
#if RENDER_DRAW_WALL_BORDERS && RENDER_DRAW_WALL_INSIDE && RENDER_DRAW_CEILING_AND_FLOOR && RENDER_DRAW_TOP_AND_BOTTOM_COLUMN && RENDER_SLOPPED_CEILING_AND_FLOOR && MAX_PIXEL_RENDERERED!=0
#define CLEAR_FRAMEBUFFER 0
#else
#define CLEAR_FRAMEBUFFER 1
#endif
//END VISUALIZE RENDERER
//C++
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,16 @@
//
// dummy.c
// Duke3D
//
// Created by fabien sanglard on 12-12-12.
// Copyright (c) 2012 fabien sanglard. All rights reserved.
//
#include "build.h"
short numplayers = 1, myconnectindex = 0;
short connecthead, connectpoint2[MAXPLAYERS];
//uint8_t syncstate=0;

View file

@ -0,0 +1,177 @@
ENet 1.3.13 (April 30, 2015):
* miscellaneous bug fixes
* added premake and cmake support
* miscellaneous documentation cleanups
ENet 1.3.12 (April 24, 2014):
* added maximumPacketSize and maximumWaitingData fields to ENetHost to limit the amount of
data waiting to be delivered on a peer (beware that the default maximumPacketSize is
32MB and should be set higher if desired as should maximumWaitingData)
ENet 1.3.11 (December 26, 2013):
* allow an ENetHost to connect to itself
* fixed possible bug with disconnect notifications during connect attempts
* fixed some preprocessor definition bugs
ENet 1.3.10 (October 23, 2013);
* doubled maximum reliable window size
* fixed RCVTIMEO/SNDTIMEO socket options and also added NODELAY
ENet 1.3.9 (August 19, 2013):
* added duplicatePeers option to ENetHost which can limit the number of peers from duplicate IPs
* added enet_socket_get_option() and ENET_SOCKOPT_ERROR
* added enet_host_random_seed() platform stub
ENet 1.3.8 (June 2, 2013):
* added enet_linked_version() for checking the linked version
* added enet_socket_get_address() for querying the local address of a socket
* silenced some debugging prints unless ENET_DEBUG is defined during compilation
* handle EINTR in enet_socket_wait() so that enet_host_service() doesn't propagate errors from signals
* optimized enet_host_bandwidth_throttle() to be less expensive for large numbers of peers
ENet 1.3.7 (March 6, 2013):
* added ENET_PACKET_FLAG_SENT to indicate that a packet is being freed because it has been sent
* added userData field to ENetPacket
* changed how random seed is generated on Windows to avoid import warnings
* fixed case where disconnects could be generated with no preceding connect event
ENet 1.3.6 (December 11, 2012):
* added support for intercept callback in ENetHost that can be used to process raw packets before ENet
* added enet_socket_shutdown() for issuing shutdown on a socket
* fixed enet_socket_connect() to not error on non-blocking connects
* fixed bug in MTU negotiation during connections
ENet 1.3.5 (July 31, 2012):
* fixed bug in unreliable packet fragment queuing
ENet 1.3.4 (May 29, 2012):
* added enet_peer_ping_interval() for configuring per-peer ping intervals
* added enet_peer_timeout() for configuring per-peer timeouts
* added protocol packet size limits
ENet 1.3.3 (June 28, 2011):
* fixed bug with simultaneous disconnects not dispatching events
ENet 1.3.2 (May 31, 2011):
* added support for unreliable packet fragmenting via the packet flag
ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT
* fixed regression in unreliable packet queuing
* added check against received port to limit some forms of IP-spoofing
ENet 1.3.1 (February 10, 2011):
* fixed bug in tracking of reliable data in transit
* reliable data window size now scales with the throttle
* fixed bug in fragment length calculation when checksums are used
ENet 1.3.0 (June 5, 2010):
* enet_host_create() now requires the channel limit to be specified as
a parameter
* enet_host_connect() now accepts a data parameter which is supplied
to the receiving receiving host in the event data field for a connect event
* added an adaptive order-2 PPM range coder as a built-in compressor option
which can be set with enet_host_compress_with_range_coder()
* added support for packet compression configurable with a callback
* improved session number handling to not rely on the packet checksum
field, saving 4 bytes per packet unless the checksum option is used
* removed the dependence on the rand callback for session number handling
Caveats: This version is not protocol compatible with the 1.2 series or
earlier. The enet_host_connect and enet_host_create API functions require
supplying additional parameters.
ENet 1.2.5 (June 28, 2011):
* fixed bug with simultaneous disconnects not dispatching events
ENet 1.2.4 (May 31, 2011):
* fixed regression in unreliable packet queuing
* added check against received port to limit some forms of IP-spoofing
ENet 1.2.3 (February 10, 2011):
* fixed bug in tracking reliable data in transit
ENet 1.2.2 (June 5, 2010):
* checksum functionality is now enabled by setting a checksum callback
inside ENetHost instead of being a configure script option
* added totalSentData, totalSentPackets, totalReceivedData, and
totalReceivedPackets counters inside ENetHost for getting usage
statistics
* added enet_host_channel_limit() for limiting the maximum number of
channels allowed by connected peers
* now uses dispatch queues for event dispatch rather than potentially
unscalable array walking
* added no_memory callback that is called when a malloc attempt fails,
such that if no_memory returns rather than aborts (the default behavior),
then the error is propagated to the return value of the API calls
* now uses packed attribute for protocol structures on platforms with
strange alignment rules
* improved autoconf build system contributed by Nathan Brink allowing
for easier building as a shared library
Caveats: If you were using the compile-time option that enabled checksums,
make sure to set the checksum callback inside ENetHost to enet_crc32 to
regain the old behavior. The ENetCallbacks structure has added new fields,
so make sure to clear the structure to zero before use if
using enet_initialize_with_callbacks().
ENet 1.2.1 (November 12, 2009):
* fixed bug that could cause disconnect events to be dropped
* added thin wrapper around select() for portable usage
* added ENET_SOCKOPT_REUSEADDR socket option
* factored enet_socket_bind()/enet_socket_listen() out of enet_socket_create()
* added contributed Code::Blocks build file
ENet 1.2 (February 12, 2008):
* fixed bug in VERIFY_CONNECT acknowledgement that could cause connect
attempts to occasionally timeout
* fixed acknowledgements to check both the outgoing and sent queues
when removing acknowledged packets
* fixed accidental bit rot in the MSVC project file
* revised sequence number overflow handling to address some possible
disconnect bugs
* added enet_host_check_events() for getting only local queued events
* factored out socket option setting into enet_socket_set_option() so
that socket options are now set separately from enet_socket_create()
Caveats: While this release is superficially protocol compatible with 1.1,
differences in the sequence number overflow handling can potentially cause
random disconnects.
ENet 1.1 (June 6, 2007):
* optional CRC32 just in case someone needs a stronger checksum than UDP
provides (--enable-crc32 configure option)
* the size of packet headers are half the size they used to be (so less
overhead when sending small packets)
* enet_peer_disconnect_later() that waits till all queued outgoing
packets get sent before issuing an actual disconnect
* freeCallback field in individual packets for notification of when a
packet is about to be freed
* ENET_PACKET_FLAG_NO_ALLOCATE for supplying pre-allocated data to a
packet (can be used in concert with freeCallback to support some custom
allocation schemes that the normal memory allocation callbacks would
normally not allow)
* enet_address_get_host_ip() for printing address numbers
* promoted the enet_socket_*() functions to be part of the API now
* a few stability/crash fixes

View file

@ -0,0 +1,7 @@
Copyright (c) 2002-2015 Lee Salzman
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -0,0 +1,15 @@
Please visit the ENet homepage at http://enet.bespin.org for installation
and usage instructions.
If you obtained this package from github, the quick description on how to build
is:
# Generate the build system.
autoreconf -vfi
# Compile and install the library.
./configure && make && make install

View file

@ -0,0 +1,27 @@
/**
@file callbacks.h
@brief ENet callbacks
*/
#ifndef __ENET_CALLBACKS_H__
#define __ENET_CALLBACKS_H__
#include <stdlib.h>
typedef struct _ENetCallbacks
{
void * (ENET_CALLBACK * malloc) (size_t size);
void (ENET_CALLBACK * free) (void * memory);
void (ENET_CALLBACK * no_memory) (void);
} ENetCallbacks;
/** @defgroup callbacks ENet internal callbacks
@{
@ingroup private
*/
extern void * enet_malloc (size_t);
extern void enet_free (void *);
/** @} */
#endif /* __ENET_CALLBACKS_H__ */

View file

@ -0,0 +1,592 @@
/**
@file enet.h
@brief ENet public header file
*/
#ifndef __ENET_ENET_H__
#define __ENET_ENET_H__
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdlib.h>
#ifdef _WIN32
#include "win32.h"
#else
#include "unix.h"
#endif
#include "types.h"
#include "protocol.h"
#include "list.h"
#include "callbacks.h"
#define ENET_VERSION_MAJOR 1
#define ENET_VERSION_MINOR 3
#define ENET_VERSION_PATCH 13
#define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch))
#define ENET_VERSION_GET_MAJOR(version) (((version)>>16)&0xFF)
#define ENET_VERSION_GET_MINOR(version) (((version)>>8)&0xFF)
#define ENET_VERSION_GET_PATCH(version) ((version)&0xFF)
#define ENET_VERSION ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH)
typedef enet_uint32 ENetVersion;
struct _ENetHost;
struct _ENetEvent;
struct _ENetPacket;
typedef enum _ENetSocketType
{
ENET_SOCKET_TYPE_STREAM = 1,
ENET_SOCKET_TYPE_DATAGRAM = 2
} ENetSocketType;
typedef enum _ENetSocketWait
{
ENET_SOCKET_WAIT_NONE = 0,
ENET_SOCKET_WAIT_SEND = (1 << 0),
ENET_SOCKET_WAIT_RECEIVE = (1 << 1),
ENET_SOCKET_WAIT_INTERRUPT = (1 << 2)
} ENetSocketWait;
typedef enum _ENetSocketOption
{
ENET_SOCKOPT_NONBLOCK = 1,
ENET_SOCKOPT_BROADCAST = 2,
ENET_SOCKOPT_RCVBUF = 3,
ENET_SOCKOPT_SNDBUF = 4,
ENET_SOCKOPT_REUSEADDR = 5,
ENET_SOCKOPT_RCVTIMEO = 6,
ENET_SOCKOPT_SNDTIMEO = 7,
ENET_SOCKOPT_ERROR = 8,
ENET_SOCKOPT_NODELAY = 9
} ENetSocketOption;
typedef enum _ENetSocketShutdown
{
ENET_SOCKET_SHUTDOWN_READ = 0,
ENET_SOCKET_SHUTDOWN_WRITE = 1,
ENET_SOCKET_SHUTDOWN_READ_WRITE = 2
} ENetSocketShutdown;
#define ENET_HOST_ANY 0
#define ENET_HOST_BROADCAST 0xFFFFFFFFU
#define ENET_PORT_ANY 0
/**
* Portable internet address structure.
*
* The host must be specified in network byte-order, and the port must be in host
* byte-order. The constant ENET_HOST_ANY may be used to specify the default
* server host. The constant ENET_HOST_BROADCAST may be used to specify the
* broadcast address (255.255.255.255). This makes sense for enet_host_connect,
* but not for enet_host_create. Once a server responds to a broadcast, the
* address is updated from ENET_HOST_BROADCAST to the server's actual IP address.
*/
typedef struct _ENetAddress
{
enet_uint32 host;
enet_uint16 port;
} ENetAddress;
/**
* Packet flag bit constants.
*
* The host must be specified in network byte-order, and the port must be in
* host byte-order. The constant ENET_HOST_ANY may be used to specify the
* default server host.
@sa ENetPacket
*/
typedef enum _ENetPacketFlag
{
/** packet must be received by the target peer and resend attempts should be
* made until the packet is delivered */
ENET_PACKET_FLAG_RELIABLE = (1 << 0),
/** packet will not be sequenced with other packets
* not supported for reliable packets
*/
ENET_PACKET_FLAG_UNSEQUENCED = (1 << 1),
/** packet will not allocate data, and user must supply it instead */
ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2),
/** packet will be fragmented using unreliable (instead of reliable) sends
* if it exceeds the MTU */
ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT = (1 << 3),
/** whether the packet has been sent from all queues it has been entered into */
ENET_PACKET_FLAG_SENT = (1<<8)
} ENetPacketFlag;
typedef void (ENET_CALLBACK * ENetPacketFreeCallback) (struct _ENetPacket *);
/**
* ENet packet structure.
*
* An ENet data packet that may be sent to or received from a peer. The shown
* fields should only be read and never modified. The data field contains the
* allocated data for the packet. The dataLength fields specifies the length
* of the allocated data. The flags field is either 0 (specifying no flags),
* or a bitwise-or of any combination of the following flags:
*
* ENET_PACKET_FLAG_RELIABLE - packet must be received by the target peer
* and resend attempts should be made until the packet is delivered
*
* ENET_PACKET_FLAG_UNSEQUENCED - packet will not be sequenced with other packets
* (not supported for reliable packets)
*
* ENET_PACKET_FLAG_NO_ALLOCATE - packet will not allocate data, and user must supply it instead
@sa ENetPacketFlag
*/
typedef struct _ENetPacket
{
size_t referenceCount; /**< internal use only */
enet_uint32 flags; /**< bitwise-or of ENetPacketFlag constants */
enet_uint8 * data; /**< allocated data for packet */
size_t dataLength; /**< length of data */
ENetPacketFreeCallback freeCallback; /**< function to be called when the packet is no longer in use */
void * userData; /**< application private data, may be freely modified */
} ENetPacket;
typedef struct _ENetAcknowledgement
{
ENetListNode acknowledgementList;
enet_uint32 sentTime;
ENetProtocol command;
} ENetAcknowledgement;
typedef struct _ENetOutgoingCommand
{
ENetListNode outgoingCommandList;
enet_uint16 reliableSequenceNumber;
enet_uint16 unreliableSequenceNumber;
enet_uint32 sentTime;
enet_uint32 roundTripTimeout;
enet_uint32 roundTripTimeoutLimit;
enet_uint32 fragmentOffset;
enet_uint16 fragmentLength;
enet_uint16 sendAttempts;
ENetProtocol command;
ENetPacket * packet;
} ENetOutgoingCommand;
typedef struct _ENetIncomingCommand
{
ENetListNode incomingCommandList;
enet_uint16 reliableSequenceNumber;
enet_uint16 unreliableSequenceNumber;
ENetProtocol command;
enet_uint32 fragmentCount;
enet_uint32 fragmentsRemaining;
enet_uint32 * fragments;
ENetPacket * packet;
} ENetIncomingCommand;
typedef enum _ENetPeerState
{
ENET_PEER_STATE_DISCONNECTED = 0,
ENET_PEER_STATE_CONNECTING = 1,
ENET_PEER_STATE_ACKNOWLEDGING_CONNECT = 2,
ENET_PEER_STATE_CONNECTION_PENDING = 3,
ENET_PEER_STATE_CONNECTION_SUCCEEDED = 4,
ENET_PEER_STATE_CONNECTED = 5,
ENET_PEER_STATE_DISCONNECT_LATER = 6,
ENET_PEER_STATE_DISCONNECTING = 7,
ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT = 8,
ENET_PEER_STATE_ZOMBIE = 9
} ENetPeerState;
#ifndef ENET_BUFFER_MAXIMUM
#define ENET_BUFFER_MAXIMUM (1 + 2 * ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS)
#endif
enum
{
ENET_HOST_RECEIVE_BUFFER_SIZE = 256 * 1024,
ENET_HOST_SEND_BUFFER_SIZE = 256 * 1024,
ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL = 1000,
ENET_HOST_DEFAULT_MTU = 1400,
ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE = 32 * 1024 * 1024,
ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA = 32 * 1024 * 1024,
ENET_PEER_DEFAULT_ROUND_TRIP_TIME = 500,
ENET_PEER_DEFAULT_PACKET_THROTTLE = 32,
ENET_PEER_PACKET_THROTTLE_SCALE = 32,
ENET_PEER_PACKET_THROTTLE_COUNTER = 7,
ENET_PEER_PACKET_THROTTLE_ACCELERATION = 2,
ENET_PEER_PACKET_THROTTLE_DECELERATION = 2,
ENET_PEER_PACKET_THROTTLE_INTERVAL = 5000,
ENET_PEER_PACKET_LOSS_SCALE = (1 << 16),
ENET_PEER_PACKET_LOSS_INTERVAL = 10000,
ENET_PEER_WINDOW_SIZE_SCALE = 64 * 1024,
ENET_PEER_TIMEOUT_LIMIT = 32,
ENET_PEER_TIMEOUT_MINIMUM = 5000,
ENET_PEER_TIMEOUT_MAXIMUM = 30000,
ENET_PEER_PING_INTERVAL = 500,
ENET_PEER_UNSEQUENCED_WINDOWS = 64,
ENET_PEER_UNSEQUENCED_WINDOW_SIZE = 1024,
ENET_PEER_FREE_UNSEQUENCED_WINDOWS = 32,
ENET_PEER_RELIABLE_WINDOWS = 16,
ENET_PEER_RELIABLE_WINDOW_SIZE = 0x1000,
ENET_PEER_FREE_RELIABLE_WINDOWS = 8
};
typedef struct _ENetChannel
{
enet_uint16 outgoingReliableSequenceNumber;
enet_uint16 outgoingUnreliableSequenceNumber;
enet_uint16 usedReliableWindows;
enet_uint16 reliableWindows [ENET_PEER_RELIABLE_WINDOWS];
enet_uint16 incomingReliableSequenceNumber;
enet_uint16 incomingUnreliableSequenceNumber;
ENetList incomingReliableCommands;
ENetList incomingUnreliableCommands;
} ENetChannel;
/**
* An ENet peer which data packets may be sent or received from.
*
* No fields should be modified unless otherwise specified.
*/
typedef struct _ENetPeer
{
ENetListNode dispatchList;
struct _ENetHost * host;
enet_uint16 outgoingPeerID;
enet_uint16 incomingPeerID;
enet_uint32 connectID;
enet_uint8 outgoingSessionID;
enet_uint8 incomingSessionID;
ENetAddress address; /**< Internet address of the peer */
void * data; /**< Application private data, may be freely modified */
ENetPeerState state;
ENetChannel * channels;
size_t channelCount; /**< Number of channels allocated for communication with peer */
enet_uint32 incomingBandwidth; /**< Downstream bandwidth of the client in bytes/second */
enet_uint32 outgoingBandwidth; /**< Upstream bandwidth of the client in bytes/second */
enet_uint32 incomingBandwidthThrottleEpoch;
enet_uint32 outgoingBandwidthThrottleEpoch;
enet_uint32 incomingDataTotal;
enet_uint32 outgoingDataTotal;
enet_uint32 lastSendTime;
enet_uint32 lastReceiveTime;
enet_uint32 nextTimeout;
enet_uint32 earliestTimeout;
enet_uint32 packetLossEpoch;
enet_uint32 packetsSent;
enet_uint32 packetsLost;
enet_uint32 packetLoss; /**< mean packet loss of reliable packets as a ratio with respect to the constant ENET_PEER_PACKET_LOSS_SCALE */
enet_uint32 packetLossVariance;
enet_uint32 packetThrottle;
enet_uint32 packetThrottleLimit;
enet_uint32 packetThrottleCounter;
enet_uint32 packetThrottleEpoch;
enet_uint32 packetThrottleAcceleration;
enet_uint32 packetThrottleDeceleration;
enet_uint32 packetThrottleInterval;
enet_uint32 pingInterval;
enet_uint32 timeoutLimit;
enet_uint32 timeoutMinimum;
enet_uint32 timeoutMaximum;
enet_uint32 lastRoundTripTime;
enet_uint32 lowestRoundTripTime;
enet_uint32 lastRoundTripTimeVariance;
enet_uint32 highestRoundTripTimeVariance;
enet_uint32 roundTripTime; /**< mean round trip time (RTT), in milliseconds, between sending a reliable packet and receiving its acknowledgement */
enet_uint32 roundTripTimeVariance;
enet_uint32 mtu;
enet_uint32 windowSize;
enet_uint32 reliableDataInTransit;
enet_uint16 outgoingReliableSequenceNumber;
ENetList acknowledgements;
ENetList sentReliableCommands;
ENetList sentUnreliableCommands;
ENetList outgoingReliableCommands;
ENetList outgoingUnreliableCommands;
ENetList dispatchedCommands;
int needsDispatch;
enet_uint16 incomingUnsequencedGroup;
enet_uint16 outgoingUnsequencedGroup;
enet_uint32 unsequencedWindow [ENET_PEER_UNSEQUENCED_WINDOW_SIZE / 32];
enet_uint32 eventData;
size_t totalWaitingData;
} ENetPeer;
/** An ENet packet compressor for compressing UDP packets before socket sends or receives.
*/
typedef struct _ENetCompressor
{
/** Context data for the compressor. Must be non-NULL. */
void * context;
/** Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes. Should return 0 on failure. */
size_t (ENET_CALLBACK * compress) (void * context, const ENetBuffer * inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 * outData, size_t outLimit);
/** Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes. Should return 0 on failure. */
size_t (ENET_CALLBACK * decompress) (void * context, const enet_uint8 * inData, size_t inLimit, enet_uint8 * outData, size_t outLimit);
/** Destroys the context when compression is disabled or the host is destroyed. May be NULL. */
void (ENET_CALLBACK * destroy) (void * context);
} ENetCompressor;
/** Callback that computes the checksum of the data held in buffers[0:bufferCount-1] */
typedef enet_uint32 (ENET_CALLBACK * ENetChecksumCallback) (const ENetBuffer * buffers, size_t bufferCount);
/** Callback for intercepting received raw UDP packets. Should return 1 to intercept, 0 to ignore, or -1 to propagate an error. */
typedef int (ENET_CALLBACK * ENetInterceptCallback) (struct _ENetHost * host, struct _ENetEvent * event);
/** An ENet host for communicating with peers.
*
* No fields should be modified unless otherwise stated.
@sa enet_host_create()
@sa enet_host_destroy()
@sa enet_host_connect()
@sa enet_host_service()
@sa enet_host_flush()
@sa enet_host_broadcast()
@sa enet_host_compress()
@sa enet_host_compress_with_range_coder()
@sa enet_host_channel_limit()
@sa enet_host_bandwidth_limit()
@sa enet_host_bandwidth_throttle()
*/
typedef struct _ENetHost
{
ENetSocket socket;
ENetAddress address; /**< Internet address of the host */
enet_uint32 incomingBandwidth; /**< downstream bandwidth of the host */
enet_uint32 outgoingBandwidth; /**< upstream bandwidth of the host */
enet_uint32 bandwidthThrottleEpoch;
enet_uint32 mtu;
enet_uint32 randomSeed;
int recalculateBandwidthLimits;
ENetPeer * peers; /**< array of peers allocated for this host */
size_t peerCount; /**< number of peers allocated for this host */
size_t channelLimit; /**< maximum number of channels allowed for connected peers */
enet_uint32 serviceTime;
ENetList dispatchQueue;
int continueSending;
size_t packetSize;
enet_uint16 headerFlags;
ENetProtocol commands [ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS];
size_t commandCount;
ENetBuffer buffers [ENET_BUFFER_MAXIMUM];
size_t bufferCount;
ENetChecksumCallback checksum; /**< callback the user can set to enable packet checksums for this host */
ENetCompressor compressor;
enet_uint8 packetData [2][ENET_PROTOCOL_MAXIMUM_MTU];
ENetAddress receivedAddress;
enet_uint8 * receivedData;
size_t receivedDataLength;
enet_uint32 totalSentData; /**< total data sent, user should reset to 0 as needed to prevent overflow */
enet_uint32 totalSentPackets; /**< total UDP packets sent, user should reset to 0 as needed to prevent overflow */
enet_uint32 totalReceivedData; /**< total data received, user should reset to 0 as needed to prevent overflow */
enet_uint32 totalReceivedPackets; /**< total UDP packets received, user should reset to 0 as needed to prevent overflow */
ENetInterceptCallback intercept; /**< callback the user can set to intercept received raw UDP packets */
size_t connectedPeers;
size_t bandwidthLimitedPeers;
size_t duplicatePeers; /**< optional number of allowed peers from duplicate IPs, defaults to ENET_PROTOCOL_MAXIMUM_PEER_ID */
size_t maximumPacketSize; /**< the maximum allowable packet size that may be sent or received on a peer */
size_t maximumWaitingData; /**< the maximum aggregate amount of buffer space a peer may use waiting for packets to be delivered */
} ENetHost;
/**
* An ENet event type, as specified in @ref ENetEvent.
*/
typedef enum _ENetEventType
{
/** no event occurred within the specified time limit */
ENET_EVENT_TYPE_NONE = 0,
/** a connection request initiated by enet_host_connect has completed.
* The peer field contains the peer which successfully connected.
*/
ENET_EVENT_TYPE_CONNECT = 1,
/** a peer has disconnected. This event is generated on a successful
* completion of a disconnect initiated by enet_pper_disconnect, if
* a peer has timed out, or if a connection request intialized by
* enet_host_connect has timed out. The peer field contains the peer
* which disconnected. The data field contains user supplied data
* describing the disconnection, or 0, if none is available.
*/
ENET_EVENT_TYPE_DISCONNECT = 2,
/** a packet has been received from a peer. The peer field specifies the
* peer which sent the packet. The channelID field specifies the channel
* number upon which the packet was received. The packet field contains
* the packet that was received; this packet must be destroyed with
* enet_packet_destroy after use.
*/
ENET_EVENT_TYPE_RECEIVE = 3
} ENetEventType;
/**
* An ENet event as returned by enet_host_service().
@sa enet_host_service
*/
typedef struct _ENetEvent
{
ENetEventType type; /**< type of the event */
ENetPeer * peer; /**< peer that generated a connect, disconnect or receive event */
enet_uint8 channelID; /**< channel on the peer that generated the event, if appropriate */
enet_uint32 data; /**< data associated with the event, if appropriate */
ENetPacket * packet; /**< packet associated with the event, if appropriate */
} ENetEvent;
/** @defgroup global ENet global functions
@{
*/
/**
Initializes ENet globally. Must be called prior to using any functions in
ENet.
@returns 0 on success, < 0 on failure
*/
ENET_API int enet_initialize (void);
/**
Initializes ENet globally and supplies user-overridden callbacks. Must be called prior to using any functions in ENet. Do not use enet_initialize() if you use this variant. Make sure the ENetCallbacks structure is zeroed out so that any additional callbacks added in future versions will be properly ignored.
@param version the constant ENET_VERSION should be supplied so ENet knows which version of ENetCallbacks struct to use
@param inits user-overridden callbacks where any NULL callbacks will use ENet's defaults
@returns 0 on success, < 0 on failure
*/
ENET_API int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits);
/**
Shuts down ENet globally. Should be called when a program that has
initialized ENet exits.
*/
ENET_API void enet_deinitialize (void);
/**
Gives the linked version of the ENet library.
@returns the version number
*/
ENET_API ENetVersion enet_linked_version (void);
/** @} */
/** @defgroup private ENet private implementation functions */
/**
Returns the wall-time in milliseconds. Its initial value is unspecified
unless otherwise set.
*/
ENET_API enet_uint32 enet_time_get (void);
/**
Sets the current wall-time in milliseconds.
*/
ENET_API void enet_time_set (enet_uint32);
/** @defgroup socket ENet socket functions
@{
*/
ENET_API ENetSocket enet_socket_create (ENetSocketType);
ENET_API int enet_socket_bind (ENetSocket, const ENetAddress *);
ENET_API int enet_socket_get_address (ENetSocket, ENetAddress *);
ENET_API int enet_socket_listen (ENetSocket, int);
ENET_API ENetSocket enet_socket_accept (ENetSocket, ENetAddress *);
ENET_API int enet_socket_connect (ENetSocket, const ENetAddress *);
ENET_API int enet_socket_send (ENetSocket, const ENetAddress *, const ENetBuffer *, size_t);
ENET_API int enet_socket_receive (ENetSocket, ENetAddress *, ENetBuffer *, size_t);
ENET_API int enet_socket_wait (ENetSocket, enet_uint32 *, enet_uint32);
ENET_API int enet_socket_set_option (ENetSocket, ENetSocketOption, int);
ENET_API int enet_socket_get_option (ENetSocket, ENetSocketOption, int *);
ENET_API int enet_socket_shutdown (ENetSocket, ENetSocketShutdown);
ENET_API void enet_socket_destroy (ENetSocket);
ENET_API int enet_socketset_select (ENetSocket, ENetSocketSet *, ENetSocketSet *, enet_uint32);
/** @} */
/** @defgroup Address ENet address functions
@{
*/
/** Attempts to resolve the host named by the parameter hostName and sets
the host field in the address parameter if successful.
@param address destination to store resolved address
@param hostName host name to lookup
@retval 0 on success
@retval < 0 on failure
@returns the address of the given hostName in address on success
*/
ENET_API int enet_address_set_host (ENetAddress * address, const char * hostName);
/** Gives the printable form of the IP address specified in the address parameter.
@param address address printed
@param hostName destination for name, must not be NULL
@param nameLength maximum length of hostName.
@returns the null-terminated name of the host in hostName on success
@retval 0 on success
@retval < 0 on failure
*/
ENET_API int enet_address_get_host_ip (const ENetAddress * address, char * hostName, size_t nameLength);
/** Attempts to do a reverse lookup of the host field in the address parameter.
@param address address used for reverse lookup
@param hostName destination for name, must not be NULL
@param nameLength maximum length of hostName.
@returns the null-terminated name of the host in hostName on success
@retval 0 on success
@retval < 0 on failure
*/
ENET_API int enet_address_get_host (const ENetAddress * address, char * hostName, size_t nameLength);
/** @} */
ENET_API ENetPacket * enet_packet_create (const void *, size_t, enet_uint32);
ENET_API void enet_packet_destroy (ENetPacket *);
ENET_API int enet_packet_resize (ENetPacket *, size_t);
ENET_API enet_uint32 enet_crc32 (const ENetBuffer *, size_t);
ENET_API ENetHost * enet_host_create (const ENetAddress *, size_t, size_t, enet_uint32, enet_uint32);
ENET_API void enet_host_destroy (ENetHost *);
ENET_API ENetPeer * enet_host_connect (ENetHost *, const ENetAddress *, size_t, enet_uint32);
ENET_API int enet_host_check_events (ENetHost *, ENetEvent *);
ENET_API int enet_host_service (ENetHost *, ENetEvent *, enet_uint32);
ENET_API void enet_host_flush (ENetHost *);
ENET_API void enet_host_broadcast (ENetHost *, enet_uint8, ENetPacket *);
ENET_API void enet_host_compress (ENetHost *, const ENetCompressor *);
ENET_API int enet_host_compress_with_range_coder (ENetHost * host);
ENET_API void enet_host_channel_limit (ENetHost *, size_t);
ENET_API void enet_host_bandwidth_limit (ENetHost *, enet_uint32, enet_uint32);
extern void enet_host_bandwidth_throttle (ENetHost *);
extern enet_uint32 enet_host_random_seed (void);
ENET_API int enet_peer_send (ENetPeer *, enet_uint8, ENetPacket *);
ENET_API ENetPacket * enet_peer_receive (ENetPeer *, enet_uint8 * channelID);
ENET_API void enet_peer_ping (ENetPeer *);
ENET_API void enet_peer_ping_interval (ENetPeer *, enet_uint32);
ENET_API void enet_peer_timeout (ENetPeer *, enet_uint32, enet_uint32, enet_uint32);
ENET_API void enet_peer_reset (ENetPeer *);
ENET_API void enet_peer_disconnect (ENetPeer *, enet_uint32);
ENET_API void enet_peer_disconnect_now (ENetPeer *, enet_uint32);
ENET_API void enet_peer_disconnect_later (ENetPeer *, enet_uint32);
ENET_API void enet_peer_throttle_configure (ENetPeer *, enet_uint32, enet_uint32, enet_uint32);
extern int enet_peer_throttle (ENetPeer *, enet_uint32);
extern void enet_peer_reset_queues (ENetPeer *);
extern void enet_peer_setup_outgoing_command (ENetPeer *, ENetOutgoingCommand *);
extern ENetOutgoingCommand * enet_peer_queue_outgoing_command (ENetPeer *, const ENetProtocol *, ENetPacket *, enet_uint32, enet_uint16);
extern ENetIncomingCommand * enet_peer_queue_incoming_command (ENetPeer *, const ENetProtocol *, const void *, size_t, enet_uint32, enet_uint32);
extern ENetAcknowledgement * enet_peer_queue_acknowledgement (ENetPeer *, const ENetProtocol *, enet_uint16);
extern void enet_peer_dispatch_incoming_unreliable_commands (ENetPeer *, ENetChannel *);
extern void enet_peer_dispatch_incoming_reliable_commands (ENetPeer *, ENetChannel *);
extern void enet_peer_on_connect (ENetPeer *);
extern void enet_peer_on_disconnect (ENetPeer *);
ENET_API void * enet_range_coder_create (void);
ENET_API void enet_range_coder_destroy (void *);
ENET_API size_t enet_range_coder_compress (void *, const ENetBuffer *, size_t, size_t, enet_uint8 *, size_t);
ENET_API size_t enet_range_coder_decompress (void *, const enet_uint8 *, size_t, enet_uint8 *, size_t);
extern size_t enet_protocol_command_size (enet_uint8);
#ifdef __cplusplus
}
#endif
#endif /* __ENET_ENET_H__ */

View file

@ -0,0 +1,43 @@
/**
@file list.h
@brief ENet list management
*/
#ifndef __ENET_LIST_H__
#define __ENET_LIST_H__
#include <stdlib.h>
typedef struct _ENetListNode
{
struct _ENetListNode * next;
struct _ENetListNode * previous;
} ENetListNode;
typedef ENetListNode * ENetListIterator;
typedef struct _ENetList
{
ENetListNode sentinel;
} ENetList;
extern void enet_list_clear (ENetList *);
extern ENetListIterator enet_list_insert (ENetListIterator, void *);
extern void * enet_list_remove (ENetListIterator);
extern ENetListIterator enet_list_move (ENetListIterator, void *, void *);
extern size_t enet_list_size (ENetList *);
#define enet_list_begin(list) ((list) -> sentinel.next)
#define enet_list_end(list) (& (list) -> sentinel)
#define enet_list_empty(list) (enet_list_begin (list) == enet_list_end (list))
#define enet_list_next(iterator) ((iterator) -> next)
#define enet_list_previous(iterator) ((iterator) -> previous)
#define enet_list_front(list) ((void *) (list) -> sentinel.next)
#define enet_list_back(list) ((void *) (list) -> sentinel.previous)
#endif /* __ENET_LIST_H__ */

View file

@ -0,0 +1,198 @@
/**
@file protocol.h
@brief ENet protocol
*/
#ifndef __ENET_PROTOCOL_H__
#define __ENET_PROTOCOL_H__
#include "types.h"
enum
{
ENET_PROTOCOL_MINIMUM_MTU = 576,
ENET_PROTOCOL_MAXIMUM_MTU = 4096,
ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS = 32,
ENET_PROTOCOL_MINIMUM_WINDOW_SIZE = 4096,
ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE = 65536,
ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT = 1,
ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT = 255,
ENET_PROTOCOL_MAXIMUM_PEER_ID = 0xFFF,
ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT = 1024 * 1024
};
typedef enum _ENetProtocolCommand
{
ENET_PROTOCOL_COMMAND_NONE = 0,
ENET_PROTOCOL_COMMAND_ACKNOWLEDGE = 1,
ENET_PROTOCOL_COMMAND_CONNECT = 2,
ENET_PROTOCOL_COMMAND_VERIFY_CONNECT = 3,
ENET_PROTOCOL_COMMAND_DISCONNECT = 4,
ENET_PROTOCOL_COMMAND_PING = 5,
ENET_PROTOCOL_COMMAND_SEND_RELIABLE = 6,
ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE = 7,
ENET_PROTOCOL_COMMAND_SEND_FRAGMENT = 8,
ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED = 9,
ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT = 10,
ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 11,
ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT = 12,
ENET_PROTOCOL_COMMAND_COUNT = 13,
ENET_PROTOCOL_COMMAND_MASK = 0x0F
} ENetProtocolCommand;
typedef enum _ENetProtocolFlag
{
ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE = (1 << 7),
ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED = (1 << 6),
ENET_PROTOCOL_HEADER_FLAG_COMPRESSED = (1 << 14),
ENET_PROTOCOL_HEADER_FLAG_SENT_TIME = (1 << 15),
ENET_PROTOCOL_HEADER_FLAG_MASK = ENET_PROTOCOL_HEADER_FLAG_COMPRESSED | ENET_PROTOCOL_HEADER_FLAG_SENT_TIME,
ENET_PROTOCOL_HEADER_SESSION_MASK = (3 << 12),
ENET_PROTOCOL_HEADER_SESSION_SHIFT = 12
} ENetProtocolFlag;
#ifdef _MSC_VER
#pragma pack(push, 1)
#define ENET_PACKED
#elif defined(__GNUC__) || defined(__clang__)
#define ENET_PACKED __attribute__ ((packed))
#else
#define ENET_PACKED
#endif
typedef struct _ENetProtocolHeader
{
enet_uint16 peerID;
enet_uint16 sentTime;
} ENET_PACKED ENetProtocolHeader;
typedef struct _ENetProtocolCommandHeader
{
enet_uint8 command;
enet_uint8 channelID;
enet_uint16 reliableSequenceNumber;
} ENET_PACKED ENetProtocolCommandHeader;
typedef struct _ENetProtocolAcknowledge
{
ENetProtocolCommandHeader header;
enet_uint16 receivedReliableSequenceNumber;
enet_uint16 receivedSentTime;
} ENET_PACKED ENetProtocolAcknowledge;
typedef struct _ENetProtocolConnect
{
ENetProtocolCommandHeader header;
enet_uint16 outgoingPeerID;
enet_uint8 incomingSessionID;
enet_uint8 outgoingSessionID;
enet_uint32 mtu;
enet_uint32 windowSize;
enet_uint32 channelCount;
enet_uint32 incomingBandwidth;
enet_uint32 outgoingBandwidth;
enet_uint32 packetThrottleInterval;
enet_uint32 packetThrottleAcceleration;
enet_uint32 packetThrottleDeceleration;
enet_uint32 connectID;
enet_uint32 data;
} ENET_PACKED ENetProtocolConnect;
typedef struct _ENetProtocolVerifyConnect
{
ENetProtocolCommandHeader header;
enet_uint16 outgoingPeerID;
enet_uint8 incomingSessionID;
enet_uint8 outgoingSessionID;
enet_uint32 mtu;
enet_uint32 windowSize;
enet_uint32 channelCount;
enet_uint32 incomingBandwidth;
enet_uint32 outgoingBandwidth;
enet_uint32 packetThrottleInterval;
enet_uint32 packetThrottleAcceleration;
enet_uint32 packetThrottleDeceleration;
enet_uint32 connectID;
} ENET_PACKED ENetProtocolVerifyConnect;
typedef struct _ENetProtocolBandwidthLimit
{
ENetProtocolCommandHeader header;
enet_uint32 incomingBandwidth;
enet_uint32 outgoingBandwidth;
} ENET_PACKED ENetProtocolBandwidthLimit;
typedef struct _ENetProtocolThrottleConfigure
{
ENetProtocolCommandHeader header;
enet_uint32 packetThrottleInterval;
enet_uint32 packetThrottleAcceleration;
enet_uint32 packetThrottleDeceleration;
} ENET_PACKED ENetProtocolThrottleConfigure;
typedef struct _ENetProtocolDisconnect
{
ENetProtocolCommandHeader header;
enet_uint32 data;
} ENET_PACKED ENetProtocolDisconnect;
typedef struct _ENetProtocolPing
{
ENetProtocolCommandHeader header;
} ENET_PACKED ENetProtocolPing;
typedef struct _ENetProtocolSendReliable
{
ENetProtocolCommandHeader header;
enet_uint16 dataLength;
} ENET_PACKED ENetProtocolSendReliable;
typedef struct _ENetProtocolSendUnreliable
{
ENetProtocolCommandHeader header;
enet_uint16 unreliableSequenceNumber;
enet_uint16 dataLength;
} ENET_PACKED ENetProtocolSendUnreliable;
typedef struct _ENetProtocolSendUnsequenced
{
ENetProtocolCommandHeader header;
enet_uint16 unsequencedGroup;
enet_uint16 dataLength;
} ENET_PACKED ENetProtocolSendUnsequenced;
typedef struct _ENetProtocolSendFragment
{
ENetProtocolCommandHeader header;
enet_uint16 startSequenceNumber;
enet_uint16 dataLength;
enet_uint32 fragmentCount;
enet_uint32 fragmentNumber;
enet_uint32 totalLength;
enet_uint32 fragmentOffset;
} ENET_PACKED ENetProtocolSendFragment;
typedef union _ENetProtocol
{
ENetProtocolCommandHeader header;
ENetProtocolAcknowledge acknowledge;
ENetProtocolConnect connect;
ENetProtocolVerifyConnect verifyConnect;
ENetProtocolDisconnect disconnect;
ENetProtocolPing ping;
ENetProtocolSendReliable sendReliable;
ENetProtocolSendUnreliable sendUnreliable;
ENetProtocolSendUnsequenced sendUnsequenced;
ENetProtocolSendFragment sendFragment;
ENetProtocolBandwidthLimit bandwidthLimit;
ENetProtocolThrottleConfigure throttleConfigure;
} ENET_PACKED ENetProtocol;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
#endif /* __ENET_PROTOCOL_H__ */

View file

@ -0,0 +1,18 @@
/**
@file time.h
@brief ENet time constants and macros
*/
#ifndef __ENET_TIME_H__
#define __ENET_TIME_H__
#define ENET_TIME_OVERFLOW 86400000
#define ENET_TIME_LESS(a, b) ((a) - (b) >= ENET_TIME_OVERFLOW)
#define ENET_TIME_GREATER(a, b) ((b) - (a) >= ENET_TIME_OVERFLOW)
#define ENET_TIME_LESS_EQUAL(a, b) (! ENET_TIME_GREATER (a, b))
#define ENET_TIME_GREATER_EQUAL(a, b) (! ENET_TIME_LESS (a, b))
#define ENET_TIME_DIFFERENCE(a, b) ((a) - (b) >= ENET_TIME_OVERFLOW ? (b) - (a) : (a) - (b))
#endif /* __ENET_TIME_H__ */

View file

@ -0,0 +1,13 @@
/**
@file types.h
@brief type definitions for ENet
*/
#ifndef __ENET_TYPES_H__
#define __ENET_TYPES_H__
typedef unsigned char enet_uint8; /**< unsigned 8-bit type */
typedef unsigned short enet_uint16; /**< unsigned 16-bit type */
typedef unsigned int enet_uint32; /**< unsigned 32-bit type */
#endif /* __ENET_TYPES_H__ */

View file

@ -0,0 +1,40 @@
/**
@file unix.h
@brief ENet Unix header
*/
#ifndef __ENET_UNIX_H__
#define __ENET_UNIX_H__
#ifdef MSG_MAXIOVLEN
#define ENET_BUFFER_MAXIMUM MSG_MAXIOVLEN
#endif
typedef int ENetSocket;
#define ENET_SOCKET_NULL -1
#define ENET_HOST_TO_NET_16(value) (htons (value)) /**< macro that converts host to net byte-order of a 16-bit value */
#define ENET_HOST_TO_NET_32(value) (htonl (value)) /**< macro that converts host to net byte-order of a 32-bit value */
#define ENET_NET_TO_HOST_16(value) (ntohs (value)) /**< macro that converts net to host byte-order of a 16-bit value */
#define ENET_NET_TO_HOST_32(value) (ntohl (value)) /**< macro that converts net to host byte-order of a 32-bit value */
typedef struct
{
void * data;
size_t dataLength;
} ENetBuffer;
#define ENET_CALLBACK
#define ENET_API extern
typedef int ENetSocketSet;
#define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset))
#define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset))
#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset))
#define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset))
#endif /* __ENET_UNIX_H__ */

View file

@ -0,0 +1,12 @@
/**
@file utility.h
@brief ENet utility header
*/
#ifndef __ENET_UTILITY_H__
#define __ENET_UTILITY_H__
#define ENET_MAX(x, y) ((x) > (y) ? (x) : (y))
#define ENET_MIN(x, y) ((x) < (y) ? (x) : (y))
#endif /* __ENET_UTILITY_H__ */

View file

@ -0,0 +1,57 @@
/**
@file win32.h
@brief ENet Win32 header
*/
#ifndef __ENET_WIN32_H__
#define __ENET_WIN32_H__
#ifdef _MSC_VER
#ifdef ENET_BUILDING_LIB
#pragma warning (disable: 4267) // size_t to int conversion
#pragma warning (disable: 4244) // 64bit to 32bit int
#pragma warning (disable: 4018) // signed/unsigned mismatch
#pragma warning (disable: 4146) // unary minus operator applied to unsigned type
#endif
#endif
#include <stdlib.h>
#include <winsock2.h>
typedef SOCKET ENetSocket;
#define ENET_SOCKET_NULL INVALID_SOCKET
#define ENET_HOST_TO_NET_16(value) (htons (value))
#define ENET_HOST_TO_NET_32(value) (htonl (value))
#define ENET_NET_TO_HOST_16(value) (ntohs (value))
#define ENET_NET_TO_HOST_32(value) (ntohl (value))
typedef struct
{
size_t dataLength;
void * data;
} ENetBuffer;
#define ENET_CALLBACK __cdecl
#ifdef ENET_DLL
#ifdef ENET_BUILDING_LIB
#define ENET_API __declspec( dllexport )
#else
#define ENET_API __declspec( dllimport )
#endif /* ENET_BUILDING_LIB */
#else /* !ENET_DLL */
#define ENET_API extern
#endif /* ENET_DLL */
typedef fd_set ENetSocketSet;
#define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset))
#define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset))
#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset))
#define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset))
#endif /* __ENET_WIN32_H__ */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,164 @@
/*
* A list of all symbols exported from engine.c for a game's use.
*
* Put together by Ryan C. Gordon (icculus@clutteredmind.org)
*
* Please do NOT harrass Ken Silverman about any code modifications
* (including this file) to BUILD.
*/
/*
* "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
* Ken Silverman's official web site: "http://www.advsys.net/ken"
* See the included license file "BUILDLIC.TXT" for license info.
* This file IS NOT A PART OF Ken Silverman's original release
*/
#ifndef _INCLUDE_ENGINE_H_
#define _INCLUDE_ENGINE_H_
#ifdef __cplusplus
extern "C" {
#endif
#define ENGINE_DIR "/.rockbox/duke3d/"
//#define SUPERBUILD /* don't touch this. */
/*
* this must be implemented by every program that uses the BUILD engine.
* engine.c calls this function in several places.
* See Ken's test game (in game.c), and his editor (in bstub.c) for examples.
*/
void faketimerhandler(void);
/*
* exported engine functions, in absolutely no particular order.
* See build.txt, build2.txt...and anything else with a .txt extention for
* information on using these functions that may or may not be accurate. :)
*/
int initmouse(void);
int setgamemode(uint8_t davidoption, int32_t daxdim, int32_t daydim);
int getceilzofslope(int16_t sectnum, int32_t dax, int32_t day);
int getflorzofslope(int16_t sectnum, int32_t dax, int32_t day);
void getzsofslope(int16_t sectnum, int32_t dax, int32_t day, int32_t *ceilz, int32_t *florz);
void setaspect(int32_t daxrange, int32_t daaspect);
int insertsprite(int16_t sectnum, int16_t statnum);
void updatesector(int32_t x, int32_t y, int16_t *sectnum);
int lastwall(int16_t point);
void initspritelists(void);
int deletesprite(int16_t spritenum);
int insertspritesect(int16_t sectnum);
int deletespritesect(int16_t deleteme);
int deletespritestat (int16_t deleteme);
int insertspritestat(int16_t statnum);
int changespritesect(int16_t spritenum, int16_t newsectnum);
int changespritestat(int16_t spritenum, int16_t newstatnum);
void loadtile(int16_t tilenume);
void nextpage(void);
void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,int16_t daang, int32_t dahoriz, int16_t dacursectnum);
int loadboard(char *filename, int32_t *daposx, int32_t *daposy,int32_t *daposz, int16_t *daang, int16_t *dacursectnum);
void drawmasks(void);
void printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol,char name[82], uint8_t fontsize);
void initengine(void);
void uninitengine(void);
int loadpics(char *filename, char * gamedir);
int saveboard(char *filename, int32_t *daposx, int32_t *daposy, int32_t *daposz,int16_t *daang, int16_t *dacursectnum);
void plotpixel(int32_t x, int32_t y, uint8_t col);
uint8_t getpixel(int32_t x, int32_t y);
void setbrightness(uint8_t dabrightness, uint8_t *dapal);
int screencapture(char *filename, uint8_t inverseit);
void getmousevalues(int16_t *mousx, int16_t *mousy, int16_t *bstatus);
int clipmove (int32_t *x, int32_t *y, int32_t *z, int16_t *sectnum, int32_t xvect,int32_t yvect, int32_t walldist, int32_t ceildist,int32_t flordist, uint32_t cliptype);
void getzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum,int32_t *ceilz, int32_t *ceilhit, int32_t *florz, int32_t *florhit,int32_t walldist, uint32_t cliptype);
int getangle(int32_t xvect, int32_t yvect);
void alignceilslope(int16_t dasect, int32_t x, int32_t y, int32_t z);
void alignflorslope(int16_t dasect, int32_t x, int32_t y, int32_t z);
int hitscan(int32_t xs, int32_t ys, int32_t zs, int16_t sectnum,
int32_t vx, int32_t vy, int32_t vz,
int16_t *hitsect, int16_t *hitwall, int16_t *hitsprite,
int32_t *hitx, int32_t *hity, int32_t *hitz, uint32_t cliptype);
int inside (int32_t x, int32_t y, int16_t sectnum);
void setfirstwall(int16_t sectnum, int16_t newfirstwall);
void rotatepoint(int32_t xpivot, int32_t ypivot, int32_t x, int32_t y, int16_t daang,
int32_t *x2, int32_t *y2);
int drawtilescreen(int32_t pictopleft, int32_t picbox);
void clearview(int32_t dacol);
void clearallviews(int32_t dacol);
void draw2dgrid(int32_t posxe, int32_t posye, int16_t ange, int32_t zoome,int16_t gride);
void draw2dscreen(int32_t posxe, int32_t posye, int16_t ange, int32_t zoome,int16_t gride);
int sectorofwall(int16_t theline);
int setsprite(int16_t spritenum, int32_t newx, int32_t newy, int32_t newz);
void dragpoint(int16_t pointhighlight, int32_t dax, int32_t day);
int ksqrt(int32_t num);
int loopnumofsector(int16_t sectnum, int16_t wallnum);
int cansee(int32_t x1, int32_t y1, int32_t z1, int16_t sect1,int32_t x2, int32_t y2, int32_t z2, int16_t sect2);
int lintersect(int32_t x1, int32_t y1, int32_t z1, int32_t x2, int32_t y2, int32_t z2, int32_t x3, int32_t y3, int32_t x4, int32_t y4, int32_t *intx,int32_t *inty, int32_t *intz);
int rintersect(int32_t x1, int32_t y1, int32_t z1, int32_t vx, int32_t vy, int32_t vz,
int32_t x3, int32_t y3, int32_t x4, int32_t y4, int32_t *intx,
int32_t *inty, int32_t *intz);
uint8_t* allocatepermanenttile(int16_t tilenume, int32_t xsiz, int32_t ysiz);
void drawline256 (int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint8_t col);
void copytilepiece(int32_t tilenume1, int32_t sx1, int32_t sy1, int32_t xsiz, int32_t ysiz,
int32_t tilenume2, int32_t sx2, int32_t sy2);
int nextsectorneighborz(int16_t sectnum, int32_t thez,
int16_t topbottom, int16_t direction);
int neartag(int32_t xs, int32_t ys, int32_t zs, int16_t sectnum, int16_t ange,
int16_t *neartagsector, int16_t *neartagwall, int16_t *neartagsprite,
int32_t *neartaghitdist, int32_t neartagrange, uint8_t tagsearch);
int pushmove(int32_t *x, int32_t *y, int32_t *z, int16_t *sectnum,
int32_t walldist, int32_t ceildist, int32_t flordist,
uint32_t cliptype);
int krand(void);
void flushperms(void);
void rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum,
int8_t dashade, uint8_t dapalnum, uint8_t dastat,
int32_t cx1, int32_t cy1, int32_t cx2, int32_t cy2);
void makepalookup(int32_t palnum, uint8_t *remapbuf, int8_t r,
int8_t g, int8_t b, uint8_t dastat);
void drawmapview(int32_t dax, int32_t day, int32_t zoome, int16_t ang);
void setview(int32_t x1, int32_t y1, int32_t x2, int32_t y2);
void setviewtotile(int16_t tilenume, int32_t xsiz, int32_t ysiz);
void setviewback(void);
void squarerotatetile(int16_t tilenume);
void preparemirror(int32_t dax, int32_t day, int32_t daz,
int16_t daang, int32_t dahoriz, int16_t dawall,
int16_t dasector, int32_t *tposx, int32_t *tposy,
short *tang);
void completemirror(void);
int clipinsidebox(int32_t x, int32_t y, int16_t wallnum, int32_t walldist);
#include "cache.h"
#include "filesystem.h"
#include "display.h"
#include "fixedPoint_math.h"
#include "tiles.h"
#include "network.h"
//Exported for tile module
extern int32_t setviewcnt;
extern int32_t bakvidoption[4];
extern uint8_t* bakframeplace[4];
extern int32_t bakxsiz[4], bakysiz[4];
extern int32_t bakwindowx1[4], bakwindowy1[4];
extern int32_t bakwindowx2[4], bakwindowy2[4];
extern uint8_t picsiz[MAXTILES], tilefilenum[MAXTILES];
extern int16_t bakumost[MAXXDIM+1], bakdmost[MAXXDIM+1];
extern int32_t numtilefiles, artfil , artfilnum, artfilplc;
extern int32_t pow2long[32];
extern int32_t artsize , cachesize ;
extern int32_t tilefileoffs[MAXTILES];
extern int32_t totalclocklock;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,877 @@
//
// filesystem.c
// Duke3D
//
// Created by fabien sanglard on 12-12-19.
// Copyright (c) 2012 fabien sanglard. All rights reserved.
//
#include "filesystem.h"
#include "platform.h"
#include "cache.h"
#include "fixedPoint_math.h"
#include "../../Game/src/global.h"
extern char game_dir[512];
//The multiplayer module in game.dll needs direct access to the crc32 (sic).
int32_t groupefil_crc32[MAXGROUPFILES];
// A typical GRP index entry:
// - 12 bytes for filename
// - 4 for filesize
typedef uint8_t grpIndexEntry_t[16];
typedef struct grpArchive_s{
int32_t numFiles ;//Number of files in the archive.
grpIndexEntry_t *gfilelist ;//Array containing the filenames.
int32_t *fileOffsets ;//Array containing the file offsets.
int32_t *filesizes ;//Array containing the file offsets.
int fileDescriptor ;//The fd used for open,read operations.
uint32_t crc32 ;//Hash to recognize GRP: Duke Shareware, Duke plutonimum etc...
int cache_len; // valid if cached == 1
int cached; // 0 = not cached, 1 = partial, 2 = full
uint8_t *data; // entire file in RAM
} __attribute__((packed)) grpArchive_t;
//All GRP opened are in this structure
typedef struct grpSet_s{
grpArchive_t archives[MAXGROUPFILES];
int32_t num;
} __attribute__((packed)) grpSet_t;
// Marking it static gurantee not only invisility outside module
// but also that the content will be set to 0.
static grpSet_t grpSet;
int32_t filelength(int32_t fd);
int32_t initgroupfile(const char *filename)
{
uint8_t buf[16] ;
int32_t i, j, k ;
grpArchive_t* archive ;
printf("Loading %s ...\n", filename);
if (grpSet.num == MAXGROUPFILES){
printf("Error: Unable to open an extra GRP archive <= No more slot available.\n");
return(-1);
}
archive = &grpSet.archives[grpSet.num];
//Init the slot
memset(archive, 0, sizeof(grpArchive_t));
//groupfil_memory[numgroupfiles] = NULL; // addresses of raw GRP files in memory
//groupefil_crc32[numgroupfiles] = 0;
archive->fileDescriptor = open(filename,O_BINARY|O_RDONLY);
if (archive->fileDescriptor < 0){
printf("Error: Unable to open file %s.\n",filename);
exit(0);
}
read(archive->fileDescriptor,buf,16);
//FCS : The ".grp" file format is just a collection of a lot of files stored into 1 big one.
//KS doc: I tried to make the format as simple as possible: The first 12 bytes contains my name,
//"KenSilverman". The next 4 bytes is the number of files that were compacted into the
//group file. Then for each file, there is a 16 byte structure, where the first 12
//bytes are the filename, and the last 4 bytes are the file's size. The rest of the
//group file is just the raw data packed one after the other in the same order as the list
//of files. - ken
// Check the magic number (12 bytes header).
if ((buf[0] != 'K') || (buf[1] != 'e') || (buf[2] != 'n') ||
(buf[3] != 'S') || (buf[4] != 'i') || (buf[5] != 'l') ||
(buf[6] != 'v') || (buf[7] != 'e') || (buf[8] != 'r') ||
(buf[9] != 'm') || (buf[10] != 'a') || (buf[11] != 'n')){
printf("Error: File %s is not a GRP archive.\n",filename);
return(-1);
}
// The next 4 bytes of the header feature the number of files in the GRP archive.
archive->numFiles = BUILDSWAP_INTEL32(*((int32_t *)&buf[12]));
archive->gfilelist = kmalloc(archive->numFiles * sizeof(grpIndexEntry_t));
archive->fileOffsets = kmalloc(archive->numFiles * sizeof(int32_t));
archive->filesizes = kmalloc(archive->numFiles * sizeof(int32_t));
// Load the full index 16 bytes per file (12bytes for name + 4 bytes for the size).
read(archive->fileDescriptor,archive->gfilelist, archive->numFiles * 16);
//Initialize all file offset and pointers.
j = 12 + 4 + archive->numFiles * sizeof(grpIndexEntry_t);
for(i=0;i<archive->numFiles;i++){
k = BUILDSWAP_INTEL32(*((int32_t *)&archive->gfilelist[i][12])); // get size
// Now that the filesize has been read, we can replace it with '0' and hence have a
// valid, null terminated character string that will be usable.
archive->gfilelist[i][12] = '\0';
archive->filesizes[i] = k;
archive->fileOffsets[i] = j; // absolute offset list of all files.
j += k;
}
//archive->fileOffsets[archive->numFiles-1] = j;
// Compute CRC32 of the whole grp and implicitely caches the GRP in memory through windows caching service.
// Rewind the fileDescriptor
lseek(archive->fileDescriptor, 0, SEEK_SET);
//i = 1000000;
//groupfil_memory[numgroupfiles] = malloc(i);
//Load the full GRP in RAM.
int total = filelength(archive->fileDescriptor);
#define CRC_BUFLEN 1024*128
/* Atomic Edition won't fit */
if(total > MEMORYSIZE / 2 * 1024 * 1024)
{
#if MEMORYSIZE > 32
archive->cached = 1;
archive->cache_len = 24 * 1024 * 1024; /* arbitrary, but must be multiple of CRC_BUFLEN (currently 1024*128) */
assert(archive->cache_len % CRC_BUFLEN == 0);
archive->data = malloc(archive->cache_len);
#else
archive->cached = 0;
archive->data = 0;
#endif
}
else
{
archive->data = malloc(total);
archive->cached = archive->data != NULL ? 2 : 0;
}
switch(archive->cached)
{
case 2:
printf("Caching complete GRP in RAM (%d KB)\n", total / 1024);
break;
case 1:
printf("Partially caching GRP in RAM (%d KB/%d KB)\n", archive->cache_len / 1024, total / 1024);
break;
default:
printf("Not caching large GRP (%d KB)", total / 1024);
break;
}
uint8_t *crcBuffer = NULL;
/* we need a temporary buffer to calculate the CRC if it's not being cached */
if(!archive->cached)
crcBuffer = malloc(CRC_BUFLEN);
else
crcBuffer = archive->data;
int loop = 0;
int bytes = 0;
bool stop_inc = false;
while((j=read(archive->fileDescriptor, crcBuffer, CRC_BUFLEN))) {
archive->crc32 = crc32_update(crcBuffer,j,archive->crc32);
/* crcBuffer points to a permanent buffer */
if(archive->cached)
{
if(!stop_inc)
crcBuffer += j;
if(archive->cached == 1 && !stop_inc)
{
if(crcBuffer - archive->data >= archive->cache_len) /* we've read enough, further reads go into a temp buffer */
{
crcBuffer = malloc(CRC_BUFLEN);
stop_inc = true;
}
}
}
bytes += j;
loop++;
if(loop % 16 == 0)
printf("%d%% complete...\n", (int)(100.0 * bytes / (float)total)); // sorry
//rb->splashf(0, "point -%d", loop);
}
if(!archive->cached || stop_inc)
free(crcBuffer);
// The game layer seems to absolutely need to access an array int[4] groupefil_crc32
// so we need to store the crc32 in there too.
groupefil_crc32[grpSet.num] = archive->crc32;
//free(groupfil_memory[numgroupfiles]);
//groupfil_memory[numgroupfiles] = 0;
grpSet.num++;
return(grpSet.num-1);
}
void uninitgroupfile(void)
{
int i;
for( i=0 ; i < grpSet.num ;i++){
close(grpSet.archives[i].fileDescriptor);
if(grpSet.archives[i].cached)
free(grpSet.archives[i].data);
free(grpSet.archives[i].gfilelist);
free(grpSet.archives[i].fileOffsets);
free(grpSet.archives[i].filesizes);
memset(&grpSet.archives[i], 0, sizeof(grpArchive_t));
}
}
void crc32_table_gen(unsigned int* crc32_table) /* build CRC32 table */
{
unsigned int crc, poly;
int i, j;
poly = 0xEDB88320L;
for (i = 0; i < 256; i++)
{
crc = i;
for (j = 8; j > 0; j--)
{
if (crc & 1)
crc = (crc >> 1) ^ poly;
else
crc >>= 1;
}
crc32_table[i] = crc;
}
}
unsigned int crc32(uint8_t *buf, unsigned int length)
{
unsigned int initial_crc;
initial_crc = 0;
return(crc32_update(buf, length, initial_crc));
}
uint32_t crc32_update(uint8_t *buf, uint32_t length, uint32_t crc_to_update)
{
unsigned int crc32_table[256];
crc32_table_gen(crc32_table);
crc_to_update ^= 0xFFFFFFFF;
while (length--)
crc_to_update = crc32_table[(crc_to_update ^ *buf++) & 0xFF] ^ (crc_to_update >> 8);
return crc_to_update ^ 0xFFFFFFFF;
}
/*
* 16 12 5
* this is the CCITT CRC 16 polynomial X + X + X + 1.
* This is 0x1021 when x is 2, but the way the algorithm works
* we use 0x8408 (the reverse of the bit pattern). The high
* bit is always assumed to be set, thus we only use 16 bits to
* represent the 17 bit value.
*/
#define POLY 0x8408 /* 1021H bit reversed */
uint16_t crc16(uint8_t *data_p, uint16_t length)
{
uint8_t i;
unsigned int data;
unsigned int crc = 0xffff;
if (length == 0)
return (~crc);
do
{
for (i=0, data=(unsigned int)0xff & *data_p++;
i < 8;
i++, data >>= 1)
{
if ((crc & 0x0001) ^ (data & 0x0001))
crc = (crc >> 1) ^ POLY;
else crc >>= 1;
}
} while (--length);
crc = ~crc;
data = crc;
crc = (crc << 8) | (data >> 8 & 0xff);
return (crc);
}
// The engine can open files transparently on the filesystem or on the GRPsystem
enum fileType_e{ SYSTEM_FILE, GRP_FILE} ;
//An entry in the array tracking open files
typedef struct openFile_s{
enum fileType_e type ;
int fd ; //Either the fileDescriptor or the fileIndex in a GRP depending on the type.
int cursor ; //lseek cursor
int grpID ; //GRP id
int used ; //Marker 1=used
} openFile_t;
#define MAXOPENFILES 64
static openFile_t openFiles[MAXOPENFILES];
int32_t kopen4load(const char *filename, int openOnlyFromGRP){
int32_t i, k;
int32_t newhandle;
grpArchive_t* archive;
//Search a free slot
newhandle = MAXOPENFILES-1;
while (openFiles[newhandle].used && newhandle >= 0)
newhandle--;
if (newhandle < 0)
Error(EXIT_FAILURE, "Too Many files open!\n");
//Try to look in the filesystem first. In this case fd = filedescriptor.
if(!openOnlyFromGRP){
openFiles[newhandle].fd = open(filename,O_BINARY|O_RDONLY);
#if 0
if(openFiles[newhandle].fd < 0)
perror(filename);
#endif
if (openFiles[newhandle].fd >= 0){
openFiles[newhandle].type = SYSTEM_FILE;
openFiles[newhandle].cursor = 0;
openFiles[newhandle].used = 1;
return(newhandle);
}
}
//Try to look in the GRP archives. In this case fd = index of the file in the GRP.
for(k=grpSet.num-1;k>=0;k--)
{
archive = &grpSet.archives[k];
for(i=archive->numFiles-1;i>=0;i--){
if (!strncasecmp((char*)archive->gfilelist[i],filename,12)){
openFiles[newhandle].type = GRP_FILE;
openFiles[newhandle].used = 1;
openFiles[newhandle].cursor = 0;
openFiles[newhandle].fd = i;
openFiles[newhandle].grpID = k;
LOGF("found GRP %s", filename);
return(newhandle);
}
}
}
LOGF("kopen4load: couldn't find %s in GRP", filename);
return(-1);
}
int32_t kread(int32_t handle, void *buffer, int32_t leng){
openFile_t * openFile ;
grpArchive_t * archive ;
openFile = &openFiles[handle];
if (!openFile->used){
printf("Invalide handle. Unrecoverable error.\n");
getchar();
exit(0);
}
//FILESYSTEM ? OS takes care of it !
if (openFile->type == SYSTEM_FILE){
return(read(openFile->fd,buffer,leng));
}
//File is actually in the GRP
archive = & grpSet.archives[openFile->grpID];
//Adjust leng so we cannot read more than filesystem-cursor location.
leng = min(leng,archive->filesizes[openFile->fd]-openFile->cursor);
if(!archive->cached)
{
lseek(archive->fileDescriptor,
archive->fileOffsets[openFile->fd] + openFile->cursor,
SEEK_SET);
leng = read(archive->fileDescriptor,buffer,leng);
}
else
{
if(archive->cached == 2) /* completely in RAM */
memcpy(buffer, archive->data + archive->fileOffsets[openFile->fd] + openFile->cursor, leng);
else
{
/* 3 cases here: either it's completely outside the cached region, in which case we
* fall back to a disk read; it can be on a boundary; or completely in RAM */
int ofs = archive->fileOffsets[openFile->fd];
int start = ofs + openFile->cursor;
/* completely outside */
if(start >= archive->cache_len)
{
lseek(archive->fileDescriptor,
start,
SEEK_SET);
leng = read(archive->fileDescriptor, buffer, leng);
}
else
{
int end = start + leng - 1;
/* partial */
if(end >= archive->cache_len)
{
/* in-RAM portion */
memcpy(buffer, archive->data + start,
archive->cache_len - start);
/* disk */
lseek(archive->fileDescriptor, archive->cache_len, SEEK_SET);
leng = archive->cache_len - start +
read(archive->fileDescriptor, buffer + archive->cache_len - start,
end - archive->cache_len);
}
else
{
/* fully in RAM */
memcpy(buffer, archive->data + ofs + openFile->cursor,
leng);
}
}
}
}
openFile->cursor += leng;
return leng;
}
int32_t kread16(int32_t handle, int16_t *buffer){
if (kread(handle, buffer, 2) != 2)
return(0);
*buffer = BUILDSWAP_INTEL16(*buffer);
return(1);
}
int32_t kread32(int32_t handle, int32_t *buffer){
if (kread(handle, buffer, 4) != 4)
return(0);
*buffer = BUILDSWAP_INTEL32(*buffer);
return(1);
}
int32_t kread8(int32_t handle, uint8_t *buffer){
if (kread(handle, buffer, 1) != 1)
return(0);
return(1);
}
int32_t klseek(int32_t handle, int32_t offset, int whence){
grpArchive_t* archive;
if (!openFiles[handle].used){
printf("Invalide handle. Unrecoverable error.\n");
getchar();
exit(0);
}
// FILESYSTEM ? OS will take care of it.
if (openFiles[handle].type == SYSTEM_FILE){
return lseek(openFiles[handle].fd,offset,whence);
}
archive = & grpSet.archives [ openFiles[handle].grpID ];
switch(whence){
case SEEK_SET: openFiles[handle].cursor = offset; break;
case SEEK_END: openFiles[handle].cursor = archive->filesizes[openFiles[handle].fd]; break;
case SEEK_CUR: openFiles[handle].cursor += offset; break;
}
return(openFiles[handle].cursor);
}
int32_t filelength(int32_t fd)
{
off_t cur = lseek(fd, 0, SEEK_CUR);
off_t len = lseek(fd, 0, SEEK_END);
lseek(fd, cur, SEEK_SET);
return len;
}
int32_t kfilelength(int32_t handle)
{
openFile_t* openFile = &openFiles[handle];
if (!openFile->used){
printf("Invalide handle. Unrecoverable error.\n");
getchar();
exit(0);
}
if (openFile->type == SYSTEM_FILE){
LOGF("calling filelength");
return(filelength(openFile->fd));
}
else{
grpArchive_t* archive = &grpSet.archives[ openFile->grpID ];
return archive->filesizes[openFile->fd];
}
}
void kclose(int32_t handle)
{
openFile_t* openFile = &openFiles[handle];
//This is a typical handle for a non existing file.
if (handle == -1)
return;
if (!openFile->used){
printf("Invalide handle. Unrecoverable error.\n");
getchar();
exit(0);
}
if (openFile->type == SYSTEM_FILE){
close(openFile->fd);
}
memset(openFile, 0, sizeof(openFile_t));
}
/* Internal LZW variables */
#define LZWSIZE 16384 /* Watch out for shorts! */
static uint8_t *lzwbuf1, *lzwbuf4, *lzwbuf5;
static uint8_t lzwbuflock[5];
static short *lzwbuf2, *lzwbuf3;
int32_t compress(uint8_t *lzwinbuf, int32_t uncompleng, uint8_t *lzwoutbuf)
{
int32_t i, addr, newaddr, addrcnt, zx, *longptr;
int32_t bytecnt1, bitcnt, numbits, oneupnumbits;
short *shortptr;
for(i=255;i>=0;i--) { lzwbuf1[i] = (uint8_t ) i; lzwbuf3[i] = (short) ((i+1)&255); }
clearbuf((void *) (lzwbuf2),256>>1,0xffffffff);
clearbuf((void *) (lzwoutbuf),((uncompleng+15)+3)>>2,0L);
addrcnt = 256; bytecnt1 = 0; bitcnt = (4<<3);
numbits = 8; oneupnumbits = (1<<8);
do
{
addr = lzwinbuf[bytecnt1];
do
{
bytecnt1++;
if (bytecnt1 == uncompleng) break;
if (lzwbuf2[addr] < 0) {lzwbuf2[addr] = (short) addrcnt; break;}
newaddr = lzwbuf2[addr];
while (lzwbuf1[newaddr] != lzwinbuf[bytecnt1])
{
zx = lzwbuf3[newaddr];
if (zx < 0) {lzwbuf3[newaddr] = (short) addrcnt; break;}
newaddr = zx;
}
if (lzwbuf3[newaddr] == addrcnt) break;
addr = newaddr;
} while (addr >= 0);
lzwbuf1[addrcnt] = lzwinbuf[bytecnt1];
lzwbuf2[addrcnt] = -1;
lzwbuf3[addrcnt] = -1;
longptr = (int32_t *)&lzwoutbuf[bitcnt>>3];
longptr[0] |= (addr<<(bitcnt&7));
bitcnt += numbits;
if ((addr&((oneupnumbits>>1)-1)) > ((addrcnt-1)&((oneupnumbits>>1)-1)))
bitcnt--;
addrcnt++;
if (addrcnt > oneupnumbits) { numbits++; oneupnumbits <<= 1; }
} while ((bytecnt1 < uncompleng) && (bitcnt < (uncompleng<<3)));
longptr = (int32_t *)&lzwoutbuf[bitcnt>>3];
longptr[0] |= (addr<<(bitcnt&7));
bitcnt += numbits;
if ((addr&((oneupnumbits>>1)-1)) > ((addrcnt-1)&((oneupnumbits>>1)-1)))
bitcnt--;
shortptr = (short *)lzwoutbuf;
shortptr[0] = (short)uncompleng;
if (((bitcnt+7)>>3) < uncompleng)
{
shortptr[1] = (short)addrcnt;
return((bitcnt+7)>>3);
}
shortptr[1] = (short)0;
for(i=0;i<uncompleng;i++) lzwoutbuf[i+4] = lzwinbuf[i];
return(uncompleng+4);
}
int32_t uncompress(uint8_t *lzwinbuf, int32_t compleng, uint8_t *lzwoutbuf)
{
int32_t strtot, currstr, numbits, oneupnumbits;
int32_t i, dat, leng, bitcnt, outbytecnt, *longptr;
short *shortptr;
shortptr = (short *)lzwinbuf;
strtot = (int32_t )shortptr[1];
if (strtot == 0)
{
copybuf((void *)((lzwinbuf)+4),(void *)((lzwoutbuf)),((compleng-4)+3)>>2);
return((int32_t )shortptr[0]); /* uncompleng */
}
for(i=255;i>=0;i--) { lzwbuf2[i] = (short) i; lzwbuf3[i] = (short) i; }
currstr = 256; bitcnt = (4<<3); outbytecnt = 0;
numbits = 8; oneupnumbits = (1<<8);
do
{
longptr = (int32_t *)&lzwinbuf[bitcnt>>3];
dat = ((longptr[0]>>(bitcnt&7)) & (oneupnumbits-1));
bitcnt += numbits;
if ((dat&((oneupnumbits>>1)-1)) > ((currstr-1)&((oneupnumbits>>1)-1)))
{ dat &= ((oneupnumbits>>1)-1); bitcnt--; }
lzwbuf3[currstr] = (short) dat;
for(leng=0;dat>=256;leng++,dat=lzwbuf3[dat])
lzwbuf1[leng] = (uint8_t ) lzwbuf2[dat];
lzwoutbuf[outbytecnt++] = (uint8_t ) dat;
for(i=leng-1;i>=0;i--) lzwoutbuf[outbytecnt++] = lzwbuf1[i];
lzwbuf2[currstr-1] = (short) dat; lzwbuf2[currstr] = (short) dat;
currstr++;
if (currstr > oneupnumbits) { numbits++; oneupnumbits <<= 1; }
} while (currstr < strtot);
return((int32_t )shortptr[0]); /* uncompleng */
}
void kdfread(void *buffer, size_t dasizeof, size_t count, int32_t fil)
{
kread(fil, buffer, dasizeof * count);
#if 0
size_t i, j;
int32_t k, kgoal;
short leng;
uint8_t *ptr;
lzwbuflock[0] = lzwbuflock[1] = lzwbuflock[2] = lzwbuflock[3] = lzwbuflock[4] = 200;
if (lzwbuf1 == NULL) allocache(&lzwbuf1,LZWSIZE+(LZWSIZE>>4),&lzwbuflock[0]);
if (lzwbuf2 == NULL) allocache((uint8_t**)&lzwbuf2,(LZWSIZE+(LZWSIZE>>4))*2,&lzwbuflock[1]);
if (lzwbuf3 == NULL) allocache((uint8_t**)&lzwbuf3,(LZWSIZE+(LZWSIZE>>4))*2,&lzwbuflock[2]);
if (lzwbuf4 == NULL) allocache(&lzwbuf4,LZWSIZE,&lzwbuflock[3]);
if (lzwbuf5 == NULL) allocache(&lzwbuf5,LZWSIZE+(LZWSIZE>>4),&lzwbuflock[4]);
if (dasizeof > LZWSIZE) { count *= dasizeof; dasizeof = 1; }
ptr = (uint8_t *)buffer;
kread(fil,&leng,2); kread(fil,lzwbuf5,(int32_t )leng);
k = 0;
kgoal = uncompress(lzwbuf5,leng,lzwbuf4);
copybufbyte(lzwbuf4,ptr,(int32_t )dasizeof);
k += (int32_t )dasizeof;
for(i=1;i<count;i++)
{
if (k >= kgoal)
{
kread(fil,&leng,2); kread(fil,lzwbuf5,(int32_t )leng);
k = 0; kgoal = uncompress(lzwbuf5,(int32_t )leng,lzwbuf4);
}
for(j=0;j<dasizeof;j++) ptr[j+dasizeof] = (uint8_t ) ((ptr[j]+lzwbuf4[j+k])&255);
k += dasizeof;
ptr += dasizeof;
}
lzwbuflock[0] = lzwbuflock[1] = lzwbuflock[2] = lzwbuflock[3] = lzwbuflock[4] = 1;
#endif
}
void dfread(void *buffer, size_t dasizeof, size_t count, FILE *fil)
{
fread(buffer, dasizeof, count, fil);
#if 0
size_t i, j;
int32_t k, kgoal;
short leng;
uint8_t *ptr;
lzwbuflock[0] = lzwbuflock[1] = lzwbuflock[2] = lzwbuflock[3] = lzwbuflock[4] = 200;
if (lzwbuf1 == NULL) allocache(&lzwbuf1,LZWSIZE+(LZWSIZE>>4),&lzwbuflock[0]);
if (lzwbuf2 == NULL) allocache((uint8_t**)&lzwbuf2,(LZWSIZE+(LZWSIZE>>4))*2,&lzwbuflock[1]);
if (lzwbuf3 == NULL) allocache((uint8_t**)&lzwbuf3,(LZWSIZE+(LZWSIZE>>4))*2,&lzwbuflock[2]);
if (lzwbuf4 == NULL) allocache(&lzwbuf4,LZWSIZE,&lzwbuflock[3]);
if (lzwbuf5 == NULL) allocache(&lzwbuf5,LZWSIZE+(LZWSIZE>>4),&lzwbuflock[4]);
if (dasizeof > LZWSIZE) {
count *= dasizeof;
dasizeof = 1;
}
ptr = (uint8_t *)buffer;
fread(&leng,2,1,fil);
fread(lzwbuf5,(int32_t )leng,1,fil);
k = 0;
kgoal = uncompress(lzwbuf5,(int32_t )leng,lzwbuf4);
copybufbyte(lzwbuf4,ptr,(int32_t )dasizeof);
k += (int32_t )dasizeof;
for(i=1;i<count;i++)
{
if (k >= kgoal)
{
fread(&leng,2,1,fil); fread(lzwbuf5,(int32_t )leng,1,fil);
k = 0; kgoal = uncompress(lzwbuf5,(int32_t )leng,lzwbuf4);
}
for(j=0;j<dasizeof;j++) ptr[j+dasizeof] = (uint8_t ) ((ptr[j]+lzwbuf4[j+k])&255);
k += dasizeof;
ptr += dasizeof;
}
lzwbuflock[0] = lzwbuflock[1] = lzwbuflock[2] = lzwbuflock[3] = lzwbuflock[4] = 1;
#endif
}
void dfwrite(void *buffer, size_t dasizeof, size_t count, FILE *fil)
{
fwrite(buffer, dasizeof, count, fil);
#if 0
size_t i, j, k;
short leng;
uint8_t *ptr;
lzwbuflock[0] = lzwbuflock[1] = lzwbuflock[2] = lzwbuflock[3] = lzwbuflock[4] = 200;
if (lzwbuf1 == NULL) allocache(&lzwbuf1,LZWSIZE+(LZWSIZE>>4),&lzwbuflock[0]);
if (lzwbuf2 == NULL) allocache((uint8_t**)&lzwbuf2,(LZWSIZE+(LZWSIZE>>4))*2,&lzwbuflock[1]);
if (lzwbuf3 == NULL) allocache((uint8_t**)&lzwbuf3,(LZWSIZE+(LZWSIZE>>4))*2,&lzwbuflock[2]);
if (lzwbuf4 == NULL) allocache(&lzwbuf4,LZWSIZE,&lzwbuflock[3]);
if (lzwbuf5 == NULL) allocache(&lzwbuf5,LZWSIZE+(LZWSIZE>>4),&lzwbuflock[4]);
if (dasizeof > LZWSIZE) { count *= dasizeof; dasizeof = 1; }
ptr = (uint8_t *)buffer;
copybufbyte(ptr,lzwbuf4,(int32_t )dasizeof);
k = dasizeof;
if (k > LZWSIZE-dasizeof)
{
leng = (short)compress(lzwbuf4,k,lzwbuf5); k = 0;
fwrite(&leng,2,1,fil); fwrite(lzwbuf5,(int32_t )leng,1,fil);
}
for(i=1;i<count;i++)
{
for(j=0;j<dasizeof;j++) lzwbuf4[j+k] = (uint8_t ) ((ptr[j+dasizeof]-ptr[j])&255);
k += dasizeof;
if (k > LZWSIZE-dasizeof)
{
leng = (short)compress(lzwbuf4,k,lzwbuf5); k = 0;
fwrite(&leng,2,1,fil); fwrite(lzwbuf5,(int32_t )leng,1,fil);
}
ptr += dasizeof;
}
if (k > 0)
{
leng = (short)compress(lzwbuf4,k,lzwbuf5);
fwrite(&leng,2,1,fil); fwrite(lzwbuf5,(int32_t )leng,1,fil);
}
lzwbuflock[0] = lzwbuflock[1] = lzwbuflock[2] = lzwbuflock[3] = lzwbuflock[4] = 1;
#endif
}
int SafeFileExists ( const char * _filename );
int32_t TCkopen4load(const char *filename, int32_t readfromGRP)
{
char fullfilename[512] = "\0";
int32_t result = 0;
if(game_dir[0] != '\0' && !readfromGRP)
{
sprintf(fullfilename, "%s/%s", game_dir, filename);
if (!SafeFileExists(fullfilename)) // try root
sprintf(fullfilename, "%s", filename);
}
else
{
sprintf(fullfilename, "%s/%s", game_dir, filename);
}
result = kopen4load(fullfilename, readfromGRP);
return result;
}
void setGameDir(char* gameDir){
if (gameDir == NULL)
return;
strncpy(game_dir,gameDir,sizeof(game_dir));
}
char* getGameDir(void){
//return game_dir;
return "/.rockbox/duke3d";
}
int getGRPcrc32(int grpID){
return grpSet.archives[grpID].crc32;
}

View file

@ -0,0 +1,49 @@
//
// filesystem.h
// Duke3D
//
// Created by fabien sanglard on 12-12-19.
// Copyright (c) 2012 fabien sanglard. All rights reserved.
//
#ifndef Duke3D_filesystem_h
#define Duke3D_filesystem_h
#include "stdio.h"
#include "platform.h"
#define MAXGROUPFILES 4 /* Warning: Fix groupfil if this is changed */
extern int32_t groupefil_crc32[MAXGROUPFILES];
int32_t initgroupfile(const char *filename);
void uninitgroupfile(void);
uint16_t crc16(uint8_t *data_p, uint16_t length);
uint32_t crc32_update(uint8_t *buf, uint32_t length, uint32_t crc_to_update);
int32_t kopen4load(const char *filename, int openOnlyFromGRP);
int32_t kread(int32_t handle, void *buffer, int32_t leng);
int32_t kread8(int32_t handle, uint8_t *buffer);
int32_t kread16(int32_t handle, int16_t *buffer);
int32_t kread32(int32_t handle, int32_t *buffer);
int32_t klseek(int32_t handle, int32_t offset, int whence);
int32_t kfilelength(int32_t handle);
void kclose(int32_t handle);
void kdfread(void *buffer, size_t dasizeof, size_t count, int32_t fil);
void dfread(void *buffer, size_t dasizeof, size_t count, FILE *fil);
void dfwrite(void *buffer, size_t dasizeof, size_t count, FILE *fil);
int getGRPcrc32(int grpID);
char* getGameDir(void);
void setGameDir(char* gameDir);
int32_t TCkopen4load(const char *filename, int32_t readfromGRP);
#if defined(__APPLE__) || defined(__linux__)
int32_t filelength(int32_t fd);
#endif
#endif

View file

@ -0,0 +1,54 @@
// converted from asm to c by Jonof
#include <stdio.h>
#include "platform.h"
#include "fixedPoint_math.h"
void clearbuf(void *d, int32_t c, int32_t a)
{
int32_t *p = (int32_t*)d;
while ((c--) > 0) *(p++) = a;
}
void clearbufbyte(void *D, int32_t c, int32_t a)
{ // Cringe City
uint8_t *p = (uint8_t *)D;
int32_t m[4] = { 0xffl,0xff00l,0xff0000l,0xff000000l };
int32_t n[4] = { 0,8,16,24 };
int32_t z=0;
while ((c--) > 0) {
*(p++) = (uint8_t )((a & m[z])>>n[z]);
z=(z+1)&3;
}
}
void copybuf(void *s, void *d, int32_t c)
{
int32_t *p = (int32_t*)s, *q = (int32_t*)d;
while ((c--) > 0) *(q++) = *(p++);
}
void copybufbyte(void *S, void *D, int32_t c)
{
uint8_t *p = (uint8_t *)S, *q = (uint8_t *)D;
while((c--) > 0) *(q++) = *(p++);
}
void copybufreverse(void *S, void *D, int32_t c)
{
uint8_t *p = (uint8_t *)S, *q = (uint8_t *)D;
while((c--) > 0) *(q++) = *(p--);
}
void qinterpolatedown16(int32_t* bufptr, int32_t num, int32_t val, int32_t add)
{ // gee, I wonder who could have provided this...
int32_t i, *lptr = bufptr;
for(i=0;i<num;i++) { lptr[i] = (val>>16); val += add; }
}
void qinterpolatedown16short(int32_t* bufptr, int32_t num, int32_t val, int32_t add)
{ // ...maybe the same person who provided this too?
int32_t i; short *sptr = (short *)bufptr;
for(i=0;i<num;i++) { sptr[i] = (short)(val>>16); val += add; }
}

View file

@ -0,0 +1,167 @@
/*
* "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
* Ken Silverman's official web site: "http://www.advsys.net/ken"
* See the included license file "BUILDLIC.TXT" for license info.
* This file has been modified from Ken Silverman's original release
*/
#ifndef __PRAGMAS_H__
#define __PRAGMAS_H__
#include "platform.h"
static __inline void swapchar(uint8_t *p1, uint8_t *p2)
{ uint8_t tmp = *p1; *p1 = *p2; *p2 = tmp; }
static __inline void swapshort(short *p1, short *p2)
{ short tmp = *p1; *p1 = *p2; *p2 = tmp; }
static __inline void swaplong(int32_t *p1, int32_t *p2)
{ int32_t tmp = *p1; *p1 = *p2; *p2 = tmp; }
static __inline void swapchar2(uint8_t *p1, uint8_t *p2, int xsiz)
{
swapchar(p1, p2);
swapchar(p1 + 1, p2 + xsiz);
}
static __inline int32_t msqrtasm(uint32_t input)
{
uint32_t a,b;
a = 0x40000000l; // mov eax, 0x40000000
b = 0x20000000l; // mov ebx, 0x20000000
do { // begit:
if (input >= a) { // cmp ecx, eax / jl skip
input -= a; // sub ecx, eax
a += b*4; // lea eax, [eax+ebx*4]
} // skip:
a -= b; // sub eax, ebx
a >>= 1; // shr eax, 1
b >>= 2; // shr ebx, 2
}
while (b); // jnz begit
if (input >= a) // cmp ecx, eax
a++; // sbb eax, -1
a >>= 1; // shr eax, 1
return a;
}
void vlin16first (int32_t i1, int32_t i2);
static inline int32_t sqr (int32_t input1) { return input1*input1; }
/* internal use:32x32 = 64bit */
static inline int64_t mul32_64(int32_t i1,int32_t i2)
{
return (int64_t)i1*i2;
}
static inline int scale (int32_t input1, int32_t input2, int32_t input3)
{
return (int)(mul32_64(input1,input2)/(int64_t)input3);
}
static inline int mulscale (int32_t input1, int32_t input2, int32_t input3)
{
return (int)(mul32_64(input1,input2)>>input3);
}
static inline int dmulscale (int32_t input1, int32_t input2, int32_t input3,int32_t input4,int32_t input5)
{
return (int)((mul32_64(input1,input2) + mul32_64(input3,input4))>>input5);
}
static inline int tmulscale(int32_t i1, int32_t i2, int32_t i3, int32_t i4, int32_t i5, int32_t i6,int32_t shift)
{
return (int)((mul32_64(i1,i2) + mul32_64(i3,i4) + mul32_64(i5,i6))>>shift);
}
static inline int32_t divscale(int32_t i1, int32_t i2, int32_t i3)
{
return (int32_t)(((int64_t)i1<<i3)/i2);
}
#define DEFFUNCS \
DEFFUN(1)\
DEFFUN(2)\
DEFFUN(3)\
DEFFUN(4)\
DEFFUN(5)\
DEFFUN(6)\
DEFFUN(7)\
DEFFUN(8)\
DEFFUN(9)\
DEFFUN(10)\
DEFFUN(11)\
DEFFUN(12)\
DEFFUN(13)\
DEFFUN(14)\
DEFFUN(15)\
DEFFUN(16)\
DEFFUN(17)\
DEFFUN(18)\
DEFFUN(19)\
DEFFUN(20)\
DEFFUN(21)\
DEFFUN(22)\
DEFFUN(23)\
DEFFUN(24)\
DEFFUN(25)\
DEFFUN(26)\
DEFFUN(27)\
DEFFUN(28)\
DEFFUN(29)\
DEFFUN(30)\
DEFFUN(31)\
DEFFUN(32)
#define DEFFUN(N) \
static __inline int32_t mulscale##N(int32_t input1, int32_t input2) \
{ return mulscale(input1,input2,N); }
DEFFUNCS
#undef DEFFUN
#define DEFFUN(N) \
static __inline int32_t dmulscale##N(int32_t input1, int32_t input2,int32_t input3,int32_t input4) \
{ return dmulscale(input1,input2,input3,input4,N); }
DEFFUNCS
#undef DEFFUN
#define DEFFUN(N) \
static __inline int32_t tmulscale##N(int32_t i1, int32_t i2,int32_t i3,int32_t i4,int32_t i5,int32_t i6) \
{ return tmulscale(i1,i2,i3,i4,i5,i6,N); }
DEFFUNCS
#undef DEFFUN
#define DEFFUN(N) \
static __inline int32_t divscale##N(int32_t input1, int32_t input2) \
{ return divscale(input1,input2,N); }
DEFFUNCS
#undef DEFFUN
static inline int ksgn(int32_t i1)
{
if (i1 < 0) return -1;
else if (i1 > 0) return 1;
else return 0;
}
static inline int sgn(int32_t i1) { return ksgn(i1); }
static inline int klabs (int32_t i1)
{
if (i1 < 0) i1 = -i1;
return i1;
}
static inline int mul3 (int32_t i1) { return i1*3; }
static inline int mul5 (int32_t i1) { return i1*5; }
static inline int mul9 (int32_t i1) { return i1*9; }
void copybufreverse(void *S, void *D, int32_t c);
void copybuf(void *s, void *d, int32_t c);
void clearbuf(void *d, int32_t c, int32_t a);
void clearbufbyte(void *D, int32_t c, int32_t a);
void copybufbyte(void *S, void *D, int32_t c);
void qinterpolatedown16 (int32_t* bufptr, int32_t num, int32_t val, int32_t add);
void qinterpolatedown16short (int32_t* bufptr, int32_t num, int32_t val, int32_t add);
#endif /* !defined _INCLUDE_PRAGMAS_H_ */

View file

@ -0,0 +1,168 @@
#include "SDL.h"
#include "icon.h"
uint8_t iconBMP[]=
{
0x42,0x4d,0x36,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x04,0x00,
0x00,0x28,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x01,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0xff,0xff,0xff,0x00,0x04,0x6a,0xa4,0x00,0x5c,0x62,0x64,
0x00,0x1c,0x92,0xb4,0x00,0x1c,0x32,0x44,0x00,0x34,0x62,0x8c,0x00,
0x4c,0x42,0x44,0x00,0x24,0x4a,0x64,0x00,0x04,0x7a,0xac,0x00,0x04,
0x1a,0x1c,0x00,0x1c,0xaa,0xe4,0x00,0x2c,0x7a,0xa4,0x00,0x34,0x4a,
0x54,0x00,0x24,0x1a,0x1c,0x00,0x1c,0x7a,0xa4,0x00,0x34,0x32,0x2c,
0x00,0x2c,0x92,0xc4,0x00,0x1c,0x8a,0xb4,0x00,0x1c,0x62,0x84,0x00,
0x2c,0x2a,0x24,0x00,0x1c,0x72,0x9c,0x00,0x04,0x92,0xd4,0x00,0x2c,
0x72,0x9c,0x00,0x74,0x72,0x74,0x00,0x44,0x52,0x5c,0x00,0x34,0x8a,
0xc4,0x00,0x1c,0x82,0xb4,0x00,0x1c,0x5a,0x7c,0x00,0x34,0x5a,0x6c,
0x00,0x34,0x42,0x54,0x00,0x3c,0x7a,0x9c,0x00,0x1c,0xa2,0xdc,0x00,
0x64,0x62,0x74,0x00,0x1c,0x3a,0x4c,0x00,0x44,0x62,0x7c,0x00,0x24,
0x22,0x1c,0x00,0x34,0x3a,0x44,0x00,0x24,0x62,0x9c,0x00,0x1c,0x2a,
0x3c,0x00,0x34,0xb2,0xe4,0x00,0x2c,0x82,0xac,0x00,0x1c,0x7a,0xb4,
0x00,0x1c,0x9a,0xd4,0x00,0x1c,0x5a,0x8c,0x00,0x4c,0x4a,0x4c,0x00,
0x1c,0x1a,0x1c,0x00,0x1c,0xb2,0xf4,0x00,0x34,0x52,0x6c,0x00,0x1c,
0x8a,0xcc,0x00,0x34,0x2a,0x2c,0x00,0x24,0x72,0x9c,0x00,0x64,0x5a,
0x5c,0x00,0x2c,0x22,0x24,0x00,0x4c,0x72,0x94,0x00,0x24,0x32,0x3c,
0x00,0x2c,0x6a,0x94,0x00,0x34,0x7a,0xa4,0x00,0x24,0x7a,0xa4,0x00,
0x3c,0x32,0x34,0x00,0x24,0xa2,0xdc,0x00,0x3c,0x72,0x9c,0x00,0x54,
0x52,0x54,0x00,0x24,0x82,0xac,0x00,0x24,0x5a,0x7c,0x00,0x34,0x5a,
0x84,0x00,0x1c,0x6a,0x9c,0x00,0x1c,0x9a,0xe4,0x00,0x1c,0x22,0x2c,
0x00,0x1c,0x02,0x04,0x00,0x54,0x62,0x74,0x00,0x1c,0x92,0xcc,0x00,
0x2c,0x52,0x6c,0x00,0x24,0xaa,0xe4,0x00,0x34,0x52,0x64,0x00,0x2c,
0x9a,0xd4,0x00,0x1c,0x8a,0xc4,0x00,0x1c,0x6a,0x94,0x00,0x2c,0x2a,
0x34,0x00,0x34,0x72,0x9c,0x00,0x84,0x82,0x84,0x00,0x44,0x5a,0x6c,
0x00,0x3c,0x5a,0x74,0x00,0x6c,0x72,0x7c,0x00,0x24,0x3a,0x4c,0x00,
0x3c,0x6a,0x8c,0x00,0x24,0x22,0x2c,0x00,0x3c,0x3a,0x3c,0x00,0x54,
0x4a,0x44,0x00,0x24,0x72,0xac,0x00,0x34,0x6a,0x8c,0x00,0x24,0x6a,
0x9c,0x00,0x04,0x72,0xa4,0x00,0x1c,0x92,0xbc,0x00,0x1c,0x32,0x4c,
0x00,0x4c,0x42,0x4c,0x00,0x1c,0x52,0x7c,0x00,0x04,0x82,0xb4,0x00,
0x1c,0xaa,0xec,0x00,0x2c,0x7a,0xac,0x00,0x34,0x4a,0x64,0x00,0x24,
0x1a,0x24,0x00,0x1c,0x7a,0xac,0x00,0x34,0x32,0x34,0x00,0x1c,0x8a,
0xbc,0x00,0x2c,0x2a,0x2c,0x00,0x1c,0x72,0xac,0x00,0x04,0x9a,0xec,
0x00,0x44,0x52,0x64,0x00,0x3c,0x8a,0xc4,0x00,0x1c,0x82,0xbc,0x00,
0x1c,0x5a,0x84,0x00,0x34,0x5a,0x74,0x00,0x3c,0x42,0x4c,0x00,0x3c,
0x7a,0xac,0x00,0x1c,0xa2,0xe4,0x00,0x6c,0x6a,0x6c,0x00,0x1c,0x3a,
0x54,0x00,0x24,0x22,0x24,0x00,0x34,0x82,0xb4,0x00,0x1c,0x7a,0xbc,
0x00,0x1c,0x9a,0xdc,0x00,0x1c,0x5a,0x94,0x00,0x4c,0x4a,0x54,0x00,
0x1c,0x1a,0x24,0x00,0x24,0xb2,0xf4,0x00,0x34,0x52,0x74,0x00,0x1c,
0x8a,0xd4,0x00,0x34,0x2a,0x34,0x00,0x24,0x72,0xa4,0x00,0x1c,0x02,
0x1c,0x00,0x34,0x9a,0xcc,0x00,0x8c,0x82,0x8c,0x00,0x24,0x6a,0x94,
0x00,0x2c,0x22,0x2c,0x00,0x24,0x32,0x44,0x00,0x2c,0x6a,0x9c,0x00,
0x34,0x7a,0xac,0x00,0x24,0x7a,0xac,0x00,0x3c,0x32,0x3c,0x00,0x24,
0x82,0xb4,0x00,0x24,0x5a,0x84,0x00,0x1c,0x9a,0xec,0x00,0x1c,0x22,
0x34,0x00,0x54,0x62,0x7c,0x00,0x34,0x72,0xa4,0x00,0x3c,0x6a,0x94,
0x00,0x3c,0x3a,0x44,0x00,0x24,0x6a,0xa4,0x00,0xc7,0x67,0x18,0x00,
0x37,0x04,0xeb,0x00,0x91,0xd7,0x12,0x00,0x7c,0x77,0x00,0x00,0x08,
0x30,0x6f,0x00,0x06,0x88,0x03,0x00,0x15,0xd4,0xc3,0x00,0x00,0x77,
0x03,0x00,0x28,0xff,0x23,0x00,0x00,0xff,0x04,0x00,0xab,0xff,0x00,
0x00,0x00,0xff,0x00,0x00,0x00,0x2a,0x60,0x00,0x00,0x88,0x9d,0x00,
0x00,0xd4,0xd4,0x00,0x00,0x77,0x77,0x00,0x00,0xc0,0x00,0x00,0x00,
0xb4,0x00,0x00,0x00,0xd4,0x00,0x00,0x00,0x77,0x00,0x00,0x58,0x00,
0x01,0x00,0xed,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xfd,0x4f,0x00,0x00,0x00,0xe5,0x00,0x00,0x81,0xd6,0x00,0x00,
0x7c,0x77,0x00,0x00,0x05,0xdc,0x00,0x00,0x01,0x07,0x00,0x00,0x81,
0x10,0x00,0x00,0x7c,0x00,0x00,0x00,0xb0,0x82,0x00,0x00,0x3e,0x00,
0x00,0x00,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x00,0x70,
0x00,0x00,0x00,0x02,0x00,0x81,0x00,0xda,0x00,0x7c,0x00,0x77,0x00,
0x00,0x00,0x02,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x28,0x4c,0x00,0x00,0x00,0xad,0x00,0x00,0xab,0x74,
0xd4,0x00,0x00,0x00,0x77,0x00,0x09,0xcb,0xdc,0x00,0x03,0xb4,0x07,
0x00,0x00,0xd4,0x10,0x00,0x00,0x77,0x00,0x00,0x01,0x2a,0xdc,0x00,
0x00,0x02,0x07,0x00,0x00,0x79,0x10,0x00,0x00,0x00,0x00,0x00,0x28,
0xa8,0x90,0x00,0xed,0xec,0x5b,0x00,0x12,0x12,0x33,0x00,0x00,0x00,
0x00,0x00,0xf8,0x00,0x60,0x00,0xf7,0x00,0xeb,0x00,0x12,0x00,0x12,
0x00,0x00,0x00,0x00,0x00,0xf8,0x01,0x23,0x00,0xf7,0x00,0x36,0x00,
0x12,0x00,0xd7,0x00,0x00,0x00,0x5a,0x00,0xf3,0x00,0xdc,0x00,0x99,
0x00,0x07,0x00,0x83,0x00,0x10,0x00,0x7c,0x00,0x00,0x00,0x08,0x3c,
0x01,0x00,0x01,0xec,0x00,0x00,0x81,0x12,0x00,0x00,0x7c,0x00,0x00,
0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
0xff,0x00,0x00,0x00,0x05,0xf8,0x00,0x00,0x01,0xf7,0x00,0x00,0x81,
0x12,0x00,0x00,0x7c,0x00,0x00,0x00,0x24,0x67,0xdc,0x00,0xfe,0x04,
0x07,0x00,0x41,0xd7,0x10,0x00,0x00,0x77,0x00,0x00,0x90,0xd0,0x4f,
0x00,0xd8,0xb4,0xe5,0x00,0x15,0xd4,0xd6,0x00,0x00,0x77,0x77,0x00,
0x2f,0xff,0x29,0x00,0xfe,0xff,0x4e,0x00,0x80,0xff,0xd7,0x00,0x7c,
0xff,0x5a,0x00,0x82,0xcb,0xdc,0x00,0x00,0xb4,0x07,0x00,0x81,0xd4,
0x10,0x00,0x7c,0x77,0x00,0x00,0x58,0xbd,0x02,0x00,0xd6,0xda,0x00,
0x00,0xd4,0xd4,0x00,0x00,0x77,0x77,0x00,0x00,0x2a,0x38,0x4f,0x00,
0x02,0xad,0xe5,0x00,0x79,0x74,0xd6,0x00,0x00,0x00,0x77,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x73,0x06,0x24,0x26,0x36,0x36,0x2c,0x02,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x26,0x1b,0x5b,0x08,
0x12,0x01,0x08,0x5b,0x1b,0x26,0x2d,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,
0x21,0x12,0x60,0x0e,0x4c,0x1b,0x51,0x3f,0x1b,0x4c,0x0e,0x60,0x4c,
0x04,0x2d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2d,0x1b,0x03,0x14,0x07,0x24,0x24,0x06,0x06,
0x06,0x06,0x24,0x66,0x47,0x4c,0x03,0x12,0x09,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x01,0x11,0x1b,
0x66,0x3a,0x0f,0x31,0x13,0x23,0x31,0x31,0x13,0x0f,0x3a,0x24,0x1b,
0x11,0x4c,0x43,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x7b,0x0e,0x14,0x84,0x1b,0x2d,0x2d,0x0d,0x13,0x13,0x31,0x13,
0x31,0x23,0x34,0x2d,0x2d,0x1b,0x12,0x80,0x14,0x43,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x14,0x1a,0x12,0x84,0x45,0x04,
0x44,0x23,0x55,0x34,0x13,0x31,0x75,0x68,0x2d,0x44,0x04,0x45,0x84,
0x4c,0x1a,0x4c,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x1b,
0x11,0x84,0x1a,0x0e,0x4c,0x4c,0x43,0x2d,0x13,0x4d,0x13,0x13,0x31,
0x55,0x2d,0x43,0x4c,0x4c,0x0e,0x65,0x32,0x11,0x1b,0x2d,0x00,0x00,
0x00,0x00,0x00,0x00,0x26,0x03,0x14,0x1a,0x65,0x0e,0x1a,0x60,0x1b,
0x2d,0x64,0x68,0x85,0x68,0x7f,0x23,0x2d,0x1b,0x60,0x65,0x0e,0x60,
0x1a,0x14,0x03,0x26,0x00,0x00,0x00,0x00,0x00,0x2d,0x4c,0x60,0x5a,
0x11,0x60,0x4b,0x46,0x1a,0x1a,0x21,0x2d,0x68,0x0d,0x31,0x68,0x2d,
0x21,0x1a,0x1a,0x1a,0x1a,0x65,0x11,0x41,0x60,0x4c,0x2d,0x00,0x00,
0x00,0x00,0x04,0x1a,0x4c,0x65,0x1a,0x1a,0x84,0x4b,0x65,0x39,0x41,
0x7b,0x64,0x75,0x31,0x2d,0x7b,0x41,0x0e,0x65,0x65,0x08,0x1a,0x1a,
0x65,0x4c,0x65,0x04,0x00,0x00,0x00,0x73,0x1b,0x11,0x84,0x30,0x16,
0x14,0x29,0x46,0x08,0x1a,0x54,0x07,0x34,0x2d,0x0d,0x0d,0x07,0x35,
0x45,0x29,0x65,0x65,0x14,0x16,0x46,0x84,0x11,0x1b,0x73,0x00,0x00,
0x2c,0x0e,0x1a,0x05,0x62,0x14,0x29,0x1a,0x65,0x1a,0x4e,0x50,0x0f,
0x2d,0x7b,0x43,0x0d,0x0f,0x50,0x16,0x65,0x60,0x1a,0x69,0x69,0x0b,
0x91,0x08,0x0e,0x3d,0x00,0x00,0x1d,0x11,0x0e,0x11,0x65,0x11,0x4e,
0x1a,0x1a,0x1a,0x14,0x24,0x0d,0x04,0x14,0x29,0x04,0x2d,0x24,0x14,
0x6d,0x1a,0x65,0x38,0x11,0x14,0x67,0x39,0x11,0x24,0x00,0x00,0x1d,
0x4b,0x0e,0x39,0x0b,0x4e,0x05,0x0b,0x84,0x65,0x05,0x0f,0x7b,0x65,
0x4b,0x4b,0x65,0x64,0x66,0x40,0x39,0x16,0x16,0x54,0x4e,0x28,0x39,
0x0e,0x46,0x53,0x00,0x00,0x66,0x41,0x60,0x13,0x06,0x2c,0x2c,0x2c,
0x06,0x2c,0x2c,0x66,0x55,0x1a,0x15,0x6d,0x08,0x4d,0x0f,0x7a,0x2c,
0x06,0x2c,0x06,0x06,0x06,0x13,0x4c,0x46,0x0c,0x00,0x00,0x5e,0x08,
0x08,0x2d,0x13,0x68,0x68,0x0f,0x0f,0x75,0x34,0x31,0x13,0x47,0x1a,
0x1a,0x49,0x34,0x31,0x8a,0x0f,0x0f,0x0f,0x24,0x24,0x23,0x44,0x4c,
0x2a,0x0c,0x00,0x00,0x02,0x11,0x1a,0x2d,0x2d,0x68,0x68,0x31,0x4d,
0x66,0x0f,0x66,0x31,0x34,0x1d,0x24,0x13,0x31,0x66,0x0f,0x66,0x68,
0x31,0x68,0x0f,0x2d,0x2d,0x65,0x67,0x02,0x00,0x00,0x4f,0x37,0x28,
0x09,0x2d,0x8a,0x66,0x8a,0x66,0x66,0x8a,0x85,0x2d,0x2d,0x2d,0x2d,
0x7b,0x2d,0x7f,0x7f,0x8a,0x7f,0x8a,0x66,0x7f,0x2d,0x43,0x28,0x12,
0x4f,0x00,0x00,0x00,0x47,0x10,0x5f,0x44,0x75,0x66,0x8a,0x7f,0x3a,
0x66,0x64,0x5d,0x1a,0x01,0x12,0x1a,0x5d,0x7b,0x3a,0x66,0x8a,0x66,
0x7f,0x68,0x44,0x5f,0x5c,0x1c,0x00,0x00,0x00,0x00,0x2c,0x67,0x1a,
0x2d,0x2d,0x24,0x8a,0x66,0x8a,0x4d,0x64,0x08,0x2a,0x2a,0x1f,0x1f,
0x65,0x7b,0x85,0x3a,0x7f,0x8a,0x56,0x2d,0x09,0x29,0x4b,0x2c,0x00,
0x00,0x00,0x00,0x00,0x47,0x42,0x6e,0x81,0x7b,0x66,0x56,0x66,0x0d,
0x07,0x78,0x46,0x1f,0x2a,0x46,0x6a,0x07,0x0d,0x66,0x56,0x66,0x7b,
0x81,0x6e,0x42,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x41,0x15,
0x04,0x2d,0x85,0x66,0x68,0x7b,0x67,0x1f,0x1f,0x1f,0x1f,0x1f,0x2a,
0x67,0x7b,0x68,0x66,0x34,0x2d,0x04,0x15,0x93,0x56,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x24,0x29,0x30,0x8e,0x2d,0x2d,0x2d,0x1b,0x61,
0x2e,0x1f,0x15,0x2a,0x0a,0x2e,0x2e,0x1b,0x0d,0x2d,0x2d,0x8e,0x7e,
0x29,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x6a,
0x7e,0x21,0x2d,0x7b,0x67,0x61,0x2e,0x0a,0x19,0x19,0x0a,0x2e,0x61,
0x67,0x7b,0x2d,0x74,0x30,0x6a,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x18,0x4b,0x6a,0x2b,0x47,0x2a,0x2e,0x1f,
0x0a,0x1f,0x0a,0x1f,0x1f,0x2e,0x2a,0x47,0x2b,0x6a,0x4b,0x18,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5e,
0x1a,0x72,0x42,0x82,0x19,0x19,0x48,0x2e,0x2e,0x27,0x28,0x19,0x10,
0x42,0x61,0x65,0x2c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x3d,0x22,0x10,0x61,0x61,0x27,0x4a,
0x19,0x8b,0x4a,0x27,0x2e,0x61,0x10,0x51,0x33,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x50,0x22,0x1e,0x2a,0x10,0x38,0x1e,0x4a,0x46,0x38,0x22,0x02,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x52,0x02,
0x02,0x52,0x83,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
int iconBMP_size = sizeof(iconBMP);

View file

@ -0,0 +1,5 @@
#ifndef icon_H_
#define icon_H_
extern uint8_t iconBMP[];
extern int iconBMP_size;
#endif

View file

@ -0,0 +1,62 @@
//
// macos_compat.h
// Duke3D
//
// Created by fabien sanglard on 12-12-12.
// Copyright (c) 2012 fabien sanglard. All rights reserved.
//
#ifndef Duke3D_macos_compat_h
#define Duke3D_macos_compat_h
#define PLATFORM_SUPPORTS_SDL
#include <stdlib.h>
#define kmalloc(x) malloc(x)
#define kkmalloc(x) malloc(x)
#define kfree(x) free(x)
#define kkfree(x) free(x)
#ifdef FP_OFF
#undef FP_OFF
#endif
// Horrible horrible macro: Watcom allowed memory pointer to be cast
// to a 32bits integer. The code is unfortunately stuffed with this :( !
#define FP_OFF(x) ((int32_t) (x))
#ifndef max
#define max(x, y) (((x) > (y)) ? (x) : (y))
#endif
#ifndef min
#define min(x, y) (((x) < (y)) ? (x) : (y))
#endif
#include <inttypes.h>
#define __int64 int64_t
#define O_BINARY 0
#define UDP_NETWORKING 1
#define PLATFORM_MACOSX 1
#define SOL_IP SOL_SOCKET
#define IP_RECVERR SO_BROADCAST
#define stricmp strcasecmp
#define strcmpi strcasecmp
#include <assert.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#define USER_DUMMY_NETWORK 1
#endif

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,19 @@
#ifndef _MMULTI_STABLE_H_
#define _MMULTI_STABLE_H_
void stable_callcommit(void);
void stable_initcrc(void);
long stable_getcrc(char *buffer, short bufleng);
void stable_initmultiplayers(char damultioption, char dacomrateoption, char dapriority);
void stable_sendpacket(long other, char *bufptr, long messleng);
void stable_setpackettimeout(long datimeoutcount, long daresendagaincount);
void stable_uninitmultiplayers(void);
void stable_sendlogon(void);
void stable_sendlogoff(void);
int stable_getoutputcirclesize(void);
void stable_setsocket(short newsocket);
short stable_getpacket(short *other, char *bufptr);
void stable_flushpackets(void);
void stable_genericmultifunction(long other, char *bufptr, long messleng, long command);
#endif

View file

@ -0,0 +1,19 @@
#ifndef _MMULTI_UNSTABLE_H_
#define _MMULTI_UNSTABLE_H_
void unstable_callcommit(void);
void unstable_initcrc(void);
long unstable_getcrc(char *buffer, short bufleng);
void unstable_initmultiplayers(char damultioption, char dacomrateoption, char dapriority);
void unstable_sendpacket(long other, char *bufptr, long messleng);
void unstable_setpackettimeout(long datimeoutcount, long daresendagaincount);
void unstable_uninitmultiplayers(void);
void unstable_sendlogon(void);
void unstable_sendlogoff(void);
int unstable_getoutputcirclesize(void);
void unstable_setsocket(short newsocket);
short unstable_getpacket(short *other, char *bufptr);
void unstable_flushpackets(void);
void unstable_genericmultifunction(long other, char *bufptr, long messleng, long command);
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,222 @@
//
// network.c
// Duke3D
//
// Created by fabien sanglard on 12-12-22.
// Copyright (c) 2012 fabien sanglard. All rights reserved.
//
#include "network.h"
int nNetMode = 0;
//#include "mmulti_stable.h"
void Setup_UnstableNetworking()
{
nNetMode = 0;
}
void Setup_StableNetworking()
{
nNetMode = 1;
}
//TODO ( "[Fix this horrible networking mess. Function pointers not happy]" )
// I do not like this one bit.
// Figure out what was causing the problems with the function pointers.
// This mess is a direct result of my lack of time.. bleh
// This mess shouldn't even be in this file. /slap /slap
void callcommit(void)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_callcommit();
break;
case 1:
stable_callcommit();
break;
}
#endif
}
void initcrc(void)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_initcrc();
break;
case 1:
stable_initcrc();
break;
}
#endif
}
int32_t getcrc(uint8_t *buffer, short bufleng)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
return unstable_getcrc(buffer, bufleng);
case 1:
return stable_getcrc(buffer, bufleng);
}
#endif
return 0;
}
void initmultiplayers(uint8_t damultioption, uint8_t dacomrateoption, uint8_t dapriority)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_initmultiplayers(damultioption, dacomrateoption, dapriority);
break;
case 1:
stable_initmultiplayers(damultioption, dacomrateoption, dapriority);
break;
}
#endif
}
void sendpacket(int32_t other, uint8_t *bufptr, int32_t messleng)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_sendpacket(other, bufptr, messleng);
break;
case 1:
stable_sendpacket(other, bufptr, messleng);
break;
}
#endif
}
void setpackettimeout(int32_t datimeoutcount, int32_t daresendagaincount)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_setpackettimeout(datimeoutcount, daresendagaincount);
break;
case 1:
stable_setpackettimeout(datimeoutcount, daresendagaincount);
break;
}
#endif
}
void uninitmultiplayers(void)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_uninitmultiplayers();
break;
case 1:
stable_uninitmultiplayers();
break;
}
#endif
}
void sendlogon(void)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_sendlogon();
break;
case 1:
unstable_sendlogon();
break;
}
#endif
}
void sendlogoff(void)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_sendlogoff();
break;
case 1:
stable_sendlogoff();
break;
}
#endif
}
int getoutputcirclesize(void)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
return unstable_getoutputcirclesize();
case 1:
return stable_getoutputcirclesize();
}
#endif
return 0;
}
void setsocket(short newsocket)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_setsocket(newsocket);
break;
case 1:
stable_setsocket(newsocket);
break;
}
#endif
}
short getpacket(short *other, uint8_t *bufptr)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
return unstable_getpacket(other, bufptr); // default
case 1:
return stable_getpacket(other, bufptr);
}
#endif
return 0;
}
void flushpackets(void)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_flushpackets();
break;
case 1:
stable_flushpackets();
break;
}
#endif
}
void genericmultifunction(int32_t other, char *bufptr, int32_t messleng, int32_t command)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
{
case 0:
unstable_genericmultifunction(other, bufptr, messleng, command);
break;
case 1:
stable_genericmultifunction(other, bufptr, messleng, command);
break;
}
#endif
}

View file

@ -0,0 +1,33 @@
//
// network.h
// Duke3D
//
// Created by fabien sanglard on 12-12-22.
// Copyright (c) 2012 fabien sanglard. All rights reserved.
//
#ifndef Duke3D_network_h
#define Duke3D_network_h
#include "platform.h"
void Setup_UnstableNetworking();
void Setup_StableNetworking();
void callcommit(void);
void initcrc(void);
int32_t getcrc(uint8_t *buffer, short bufleng);
void initmultiplayers(uint8_t damultioption, uint8_t dacomrateoption, uint8_t dapriority);
void sendpacket(int32_t other, uint8_t *bufptr, int32_t messleng);
void setpackettimeout(int32_t datimeoutcount, int32_t daresendagaincount);
void uninitmultiplayers(void);
void sendlogon(void);
void sendlogoff(void);
int getoutputcirclesize(void);
void setsocket(short newsocket);
short getpacket(short *other, uint8_t *bufptr);
void flushpackets(void);
void genericmultifunction(int32_t other, char *bufptr, int32_t messleng, int32_t command);
#endif

View file

@ -0,0 +1,38 @@
#ifndef _INCLUDE_PLATFORM_DUKE_H_
#define _INCLUDE_PLATFORM_DUKE_H_
#if (defined PLATFORM_WIN32)
#include "win32_compat.h"
#elif (defined PLATFORM_UNIX)
#include "unix_compat.h"
#elif (defined PLATFORM_DOS)
#include "doscmpat.h"
#elif (defined __APPLE__)
#include "macos_compat.h"
#elif (defined ROCKBOX)
#include "rockbox_compat.h"
#else
#error Define your platform!
#endif
#if (!defined __EXPORT__)
#define __EXPORT__
#endif
uint16_t _swap16(uint16_t D);
unsigned int _swap32(unsigned int D);
#if defined(PLATFORM_MACOSX) && defined(__ppc__)
#define PLATFORM_BIGENDIAN 1
#define BUILDSWAP_INTEL16(x) _swap16(x)
#define BUILDSWAP_INTEL32(x) _swap32(x)
#else
#define PLATFORM_LITTLEENDIAN 1
#define BUILDSWAP_INTEL16(x) (x)
#define BUILDSWAP_INTEL32(x) (x)
#endif
#endif /* !defined _INCLUDE_PLATFORM_H_ */
/* end of platform.h ... */

View file

@ -0,0 +1,67 @@
//
// rockbox_compat.h
// Duke3D
//
// Based on unix_compat.h
// Copyright Wed, Jul 31, 2013, Juan Manuel Borges Caño (GPLv3+)
//
/* all we need */
#include "SDL.h"
#include "plugin.h"
#ifndef Duke3D_rockbox_compat_h
#define Duke3D_rockbox_compat_h
//#define BYTE_ORDER LITTLE_ENDIAN
#define PLATFORM_SUPPORTS_SDL
#define kmalloc(x) malloc(x)
#define kkmalloc(x) malloc(x)
#define kfree(x) free(x)
#define kkfree(x) free(x)
#ifdef FP_OFF
#undef FP_OFF
#endif
// Horrible horrible macro: Watcom allowed memory pointer to be cast
// to a 32bits integer. The code is unfortunately stuffed with this :( !
#define FP_OFF(x) ((int32_t)(x))
#ifndef max
#define max(x, y) (((x) > (y)) ? (x) : (y))
#endif
#ifndef min
#define min(x, y) (((x) < (y)) ? (x) : (y))
#endif
#include <inttypes.h>
#define __int64 int64_t
#define O_BINARY 0
#define UDP_NETWORKING 1
#define PLATFORM_ROCKBOX 1
#define read(a, b, c) rb->read((a), (b), (c))
#define write(a, b, c) rb->write((a), (b), (c))
#define close(a) rb->close(a)
/*
#define SOL_IP SOL_SOCKET
#define IP_RECVERR SO_BROADCAST
*/
#define stricmp strcasecmp
#define strcmpi strcasecmp
#define S_IREAD S_IRUSR
#define USER_DUMMY_NETWORK 1
#define STUB_NETWORKING 1
#endif

View file

@ -0,0 +1,386 @@
//
// tiles.c
// Duke3D
//
// Created by fabien sanglard on 12-12-22.
// Copyright (c) 2012 fabien sanglard. All rights reserved.
//
#include "tiles.h"
#include "engine.h"
#include "draw.h"
#include "filesystem.h"
char artfilename[20];
tile_t tiles[MAXTILES];
int32_t numTiles;
int32_t artversion;
uint8_t *pic = NULL;
uint8_t gotpic[(MAXTILES+7)>>3];
void setviewtotile(short tilenume, int32_t tileWidth, int32_t tileHeight)
{
int32_t i, j;
/* DRAWROOMS TO TILE BACKUP&SET CODE */
tiles[tilenume].dim.width = tileWidth;
tiles[tilenume].dim.height = tileHeight;
bakxsiz[setviewcnt] = tileWidth;
bakysiz[setviewcnt] = tileHeight;
bakvidoption[setviewcnt] = vidoption;
vidoption = 2;
bakframeplace[setviewcnt] = frameplace;
frameplace = tiles[tilenume].data;
bakwindowx1[setviewcnt] = windowx1;
bakwindowy1[setviewcnt] = windowy1;
bakwindowx2[setviewcnt] = windowx2;
bakwindowy2[setviewcnt] = windowy2;
copybufbyte(&startumost[windowx1],&bakumost[windowx1],(windowx2-windowx1+1)*sizeof(bakumost[0]));
copybufbyte(&startdmost[windowx1],&bakdmost[windowx1],(windowx2-windowx1+1)*sizeof(bakdmost[0]));
setview(0,0,tileHeight-1,tileWidth-1);
setaspect(65536,65536);
j = 0;
for(i=0; i<=tileWidth; i++) {
ylookup[i] = j;
j += tileWidth;
}
setBytesPerLine(tileHeight);
setviewcnt++;
}
void squarerotatetile(short tilenume)
{
int32_t i, j, k;
uint8_t *ptr1, *ptr2;
dimensions_t tileDim;
tileDim.width = tiles[tilenume].dim.width;
tileDim.height = tiles[tilenume].dim.height;
/* supports square tiles only for rotation part */
if (tileDim.width == tileDim.height)
{
k = (tileDim.width<<1);
for(i=tileDim.width-1; i>=0; i--)
{
ptr1 = tiles[tilenume].data+i*(tileDim.width+1);
ptr2 = ptr1;
if ((i&1) != 0) {
ptr1--;
ptr2 -= tileDim.width;
swapchar(ptr1,ptr2);
}
for(j=(i>>1)-1; j>=0; j--)
{
ptr1 -= 2;
ptr2 -= k;
swapchar2(ptr1,ptr2,tileDim.width);
}
}
}
}
//1. Lock a picture in the cache system.
//2. Mark it as used in the bitvector tracker.
void setgotpic(int32_t tilenume)
{
if (tiles[tilenume].lock < 200)
tiles[tilenume].lock = 199;
gotpic[tilenume>>3] |= pow2char[tilenume&7];
}
void loadtile(short tilenume)
{
uint8_t *ptr;
int32_t i, tileFilesize;
if ((uint32_t)tilenume >= (uint32_t)MAXTILES)
return;
tileFilesize = tiles[tilenume].dim.width * tiles[tilenume].dim.height;
if (tileFilesize <= 0)
return;
i = tilefilenum[tilenume];
if (i != artfilnum){
if (artfil != -1)
kclose(artfil);
artfilnum = i;
artfilplc = 0L;
artfilename[7] = (i%10)+48;
artfilename[6] = ((i/10)%10)+48;
artfilename[5] = ((i/100)%10)+48;
artfil = TCkopen4load(artfilename,0);
if (artfil == -1){
printf("Error, unable to load artfile:'%s'.\n",artfilename);
getchar();
exit(0);
}
faketimerhandler();
}
if (tiles[tilenume].data == NULL){
tiles[tilenume].lock = 199;
allocache(&tiles[tilenume].data,tileFilesize,(uint8_t *) &tiles[tilenume].lock);
}
if (artfilplc != tilefileoffs[tilenume])
{
klseek(artfil,tilefileoffs[tilenume]-artfilplc,SEEK_CUR);
faketimerhandler();
}
ptr = tiles[tilenume].data;
kread(artfil,ptr,tileFilesize);
faketimerhandler();
artfilplc = tilefileoffs[tilenume]+tileFilesize;
}
uint8_t* allocatepermanenttile(short tilenume, int32_t width, int32_t height)
{
int32_t j;
uint32_t tileDataSize;
//Check dimensions are correct.
if ((width <= 0) || (height <= 0) || ((uint32_t)tilenume >= (uint32_t)MAXTILES))
return(0);
tileDataSize = width * height;
tiles[tilenume].lock = 255;
allocache(&tiles[tilenume].data,tileDataSize,(uint8_t *) &tiles[tilenume].lock);
tiles[tilenume].dim.width = width;
tiles[tilenume].dim.height = height;
tiles[tilenume].animFlags = 0;
j = 15;
while ((j > 1) && (pow2long[j] > width))
j--;
picsiz[tilenume] = ((uint8_t )j);
j = 15;
while ((j > 1) && (pow2long[j] > height))
j--;
picsiz[tilenume] += ((uint8_t )(j<<4));
return(tiles[tilenume].data);
}
int loadpics(char *filename, char * gamedir)
{
int32_t offscount, localtilestart, localtileend, dasiz;
short fil, i, j, k;
strcpy(artfilename,filename);
for(i=0; i<MAXTILES; i++)
{
tiles[i].dim.width = 0;
tiles[i].dim.height = 0;
tiles[i].animFlags = 0L;
}
artsize = 0L;
numtilefiles = 0;
do
{
k = numtilefiles;
artfilename[7] = (k%10)+48;
artfilename[6] = ((k/10)%10)+48;
artfilename[5] = ((k/100)%10)+48;
if ((fil = TCkopen4load(artfilename,0)) != -1)
{
kread32(fil,&artversion);
if (artversion != 1) return(-1);
kread32(fil,&numTiles);
kread32(fil,&localtilestart);
kread32(fil,&localtileend);
/*kread(fil,&tilesizx[localtilestart],(localtileend-localtilestart+1)<<1);*/
for (i = localtilestart; i <= localtileend; i++)
kread16(fil,&tiles[i].dim.width);
/*kread(fil,&tilesizy[localtilestart],(localtileend-localtilestart+1)<<1);*/
for (i = localtilestart; i <= localtileend; i++)
kread16(fil,&tiles[i].dim.height);
/*kread(fil,&picanm[localtilestart],(localtileend-localtilestart+1)<<2);*/
for (i = localtilestart; i <= localtileend; i++)
kread32(fil,&tiles[i].animFlags);
offscount = 4+4+4+4+((localtileend-localtilestart+1)<<3);
for(i=localtilestart; i<=localtileend; i++)
{
tilefilenum[i] = k;
tilefileoffs[i] = offscount;
dasiz = tiles[i].dim.width*tiles[i].dim.height;
offscount += dasiz;
artsize += ((dasiz+15)&0xfffffff0);
}
kclose(fil);
numtilefiles++;
}
}
while (k != numtilefiles);
printf("Art files loaded\n");
clearbuf(gotpic,(MAXTILES+31)>>5,0L);
/* try dpmi_DETERMINEMAXREALALLOC! */
cachesize = max(artsize,1048576);
while ((pic = (uint8_t *)kkmalloc(cachesize)) == NULL)
{
cachesize -= 65536L;
if (cachesize < 65536) return(-1);
}
initcache(pic,cachesize);
for(i=0; i<MAXTILES; i++)
{
j = 15;
while ((j > 1) && (pow2long[j] > tiles[i].dim.width))
j--;
picsiz[i] = ((uint8_t )j);
j = 15;
while ((j > 1) && (pow2long[j] > tiles[i].dim.height))
j--;
picsiz[i] += ((uint8_t )(j<<4));
}
artfil = -1;
artfilnum = -1;
artfilplc = 0L;
return(0);
}
void TILE_MakeAvailable(short picID){
if (tiles[picID].data == NULL)
loadtile(picID);
}
void copytilepiece(int32_t tilenume1, int32_t sx1, int32_t sy1, int32_t xsiz, int32_t ysiz,
int32_t tilenume2, int32_t sx2, int32_t sy2)
{
uint8_t *ptr1, *ptr2, dat;
int32_t xsiz1, ysiz1, xsiz2, ysiz2, i, j, x1, y1, x2, y2;
xsiz1 = tiles[tilenume1].dim.width;
ysiz1 = tiles[tilenume1].dim.height;
xsiz2 = tiles[tilenume2].dim.width;
ysiz2 = tiles[tilenume2].dim.height;
if ((xsiz1 > 0) && (ysiz1 > 0) && (xsiz2 > 0) && (ysiz2 > 0))
{
TILE_MakeAvailable(tilenume1);
TILE_MakeAvailable(tilenume2);
x1 = sx1;
for(i=0; i<xsiz; i++)
{
y1 = sy1;
for(j=0; j<ysiz; j++)
{
x2 = sx2+i;
y2 = sy2+j;
if ((x2 >= 0) && (y2 >= 0) && (x2 < xsiz2) && (y2 < ysiz2))
{
ptr1 = tiles[tilenume1].data + x1*ysiz1 + y1;
ptr2 = tiles[tilenume2].data + x2*ysiz2 + y2;
dat = *ptr1;
if (dat != 255)
*ptr2 = *ptr1;
}
y1++;
if (y1 >= ysiz1) y1 = 0;
}
x1++;
if (x1 >= xsiz1) x1 = 0;
}
}
}
/*
FCS: If a texture is animated, this will return the offset to add to tilenum
in order to retrieve the texture to display.
*/
int animateoffs(int16_t tilenum)
{
int32_t i, k, offs;
offs = 0;
i = (totalclocklock>>((tiles[tilenum].animFlags>>24)&15));
if ((tiles[tilenum].animFlags&63) > 0){
switch(tiles[tilenum].animFlags&192)
{
case 64:
k = (i%((tiles[tilenum].animFlags&63)<<1));
if (k < (tiles[tilenum].animFlags&63))
offs = k;
else
offs = (((tiles[tilenum].animFlags&63)<<1)-k);
break;
case 128:
offs = (i%((tiles[tilenum].animFlags&63)+1));
break;
case 192:
offs = -(i%((tiles[tilenum].animFlags&63)+1));
}
}
return(offs);
}

View file

@ -0,0 +1,73 @@
//
// tiles.h
// Duke3D
//
// Created by fabien sanglard on 12-12-22.
// Copyright (c) 2012 fabien sanglard. All rights reserved.
//
#ifndef Duke3D_tiles_h
#define Duke3D_tiles_h
#include "build.h"
/*
// The dimension of the tile in texels unit. The sizes can be obtained for
// any tile by doing a tilesizx * tilesizy
//EXTERN short tilesizx[MAXTILES], tilesizy[MAXTILES];
typedef struct dimensions_s{
short width;
short height;
} dimensions_t;
dimensions_t tiles[MAXTILES];
// An array of locks for each pic: Used to check if a texture is in RAM or in the GRP.
EXTERN uint8_t walock[MAXTILES];
EXTERN int32_t numtiles, picanm[MAXTILES];
//The wall texture data.
EXTERN uint8_t* waloff[MAXTILES];
*/
typedef struct dimensions_s{
short width;
short height;
} dimensions_t;
typedef struct tile_s{
dimensions_t dim;
uint8_t lock;
int32_t animFlags;
uint8_t* data;
} tile_t;
extern tile_t tiles[MAXTILES];
void setviewtotile(short tilenume, int32_t tileWidth, int32_t tileHeight);
void squarerotatetile(short tilenume);
void loadtile(short tilenume);
uint8_t* allocatepermanenttile(short tilenume, int32_t width, int32_t height);
int loadpics(char *filename, char * gamedir);
void copytilepiece(int32_t tilenume1, int32_t sx1, int32_t sy1, int32_t xsiz, int32_t ysiz,int32_t tilenume2, int32_t sx2, int32_t sy2);
//Bitvector marking picture used for rendition.
extern uint8_t gotpic[(MAXTILES+7)>>3];
void setgotpic(int32_t tilenume);
int animateoffs(int16_t tilenum);
extern uint8_t *pic ;
void TILE_MakeAvailable(short picID);
#endif

View file

@ -0,0 +1,67 @@
//
// unix_compat.h
// Duke3D
//
// Based on macos_compat.h
// Copyright Wed, Jul 31, 2013, Juan Manuel Borges Caño (GPLv3+)
//
#ifndef Duke3D_unix_compat_h
#define Duke3D_unix_compat_h
//#define BYTE_ORDER LITTLE_ENDIAN
#define PLATFORM_SUPPORTS_SDL
#include <stdlib.h>
#define kmalloc(x) malloc(x)
#define kkmalloc(x) malloc(x)
#define kfree(x) free(x)
#define kkfree(x) free(x)
#ifdef FP_OFF
#undef FP_OFF
#endif
// Horrible horrible macro: Watcom allowed memory pointer to be cast
// to a 32bits integer. The code is unfortunately stuffed with this :( !
#define FP_OFF(x) ((int32_t) (x))
#ifndef max
#define max(x, y) (((x) > (y)) ? (x) : (y))
#endif
#ifndef min
#define min(x, y) (((x) < (y)) ? (x) : (y))
#endif
#include <inttypes.h>
#define __int64 int64_t
#define O_BINARY 0
#define UDP_NETWORKING 1
#define PLATFORM_UNIX 1
/*
#define SOL_IP SOL_SOCKET
#define IP_RECVERR SO_BROADCAST
*/
#define stricmp strcasecmp
#define strcmpi strcasecmp
#define S_IREAD S_IRUSR
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/uio.h>
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
#define USER_DUMMY_NETWORK 1
#endif

View file

@ -0,0 +1,106 @@
/*
* win32 compatibility header. Takes care of some legacy code issues
* and incompatibilities at the source level.
*
* Written by Ryan C. Gordon (icculus@clutteredmind.org)
*
* Please do NOT harrass Ken Silverman about any code modifications
* (including this file) to BUILD.
*/
/*
* "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
* Ken Silverman's official web site: "http://www.advsys.net/ken"
* See the included license file "BUILDLIC.TXT" for license info.
* This file IS NOT A PART OF Ken Silverman's original release
*/
#ifndef _INCLUDE_WIN32_COMPAT_H_
#define _INCLUDE_WIN32_COMPAT_H_
#if (!defined PLATFORM_WIN32)
#error PLATFORM_WIN32 is not defined.
#endif
#define PLATFORM_SUPPORTS_SDL
#include <stdio.h>
#if (!defined _MSC_VER)
#include <unistd.h>
#else
#include <fcntl.h>
#include <SYS\STAT.H>
#endif
#include <stdlib.h>
#include <io.h>
#include <direct.h>
#include <conio.h>
#include <dos.h>
#include <assert.h>
#include <string.h>
#define kmalloc(x) malloc(x)
#define kkmalloc(x) malloc(x)
#define kfree(x) free(x)
#define kkfree(x) free(x)
#ifdef FP_OFF
#undef FP_OFF
#endif
#define FP_OFF(x) ((long) (x))
/* !!! This might be temporary. */
#define printext16 printext256
#define printext16_noupdate printext256_noupdate
#ifndef max
#define max(x, y) (((x) > (y)) ? (x) : (y))
#endif
#ifndef min
#define min(x, y) (((x) < (y)) ? (x) : (y))
#endif
#if (defined __WATCOMC__)
#define inline
#pragma intrinsic(min);
#pragma intrinsic(max);
#define __int64 long long
#endif
#if (defined _MSC_VER)
#if ((!defined _INTEGRAL_MAX_BITS) || (_INTEGRAL_MAX_BITS < 64))
#error __int64 type not supported
#endif
#define open _open
#define O_BINARY _O_BINARY
#define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY
#define O_RDWR _O_RDWR
#define O_TRUNC _O_TRUNC
#define O_CREAT _O_CREAT
#define S_IREAD _S_IREAD
#define S_IWRITE _S_IWRITE
#define S_IRDWR _S_IRDWR
#endif /* defined _MSC_VER */
#define snprintf _snprintf
#define strncasecmp strnicmp
//Damn you Microsoft, how hard would it REALLY be to support C99 ?!??!?!
#define inline
#include "windows/inttypes.h"
#endif
/* end of win32_compat.h ... */

View file

@ -0,0 +1,305 @@
// ISO C9x compliant inttypes.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006 Alexander Chemeris
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [
#error "Use this header only with Microsoft Visual C++ compilers!"
#endif // _MSC_VER ]
#ifndef _MSC_INTTYPES_H_ // [
#define _MSC_INTTYPES_H_
#if _MSC_VER > 1000
#pragma once
#endif
#include "stdint.h"
// 7.8 Format conversion of integer types
typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
// 7.8.1 Macros for format specifiers
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198
// The fprintf macros for signed integers are:
#define PRId8 "d"
#define PRIi8 "i"
#define PRIdLEAST8 "d"
#define PRIiLEAST8 "i"
#define PRIdFAST8 "d"
#define PRIiFAST8 "i"
#define PRId16 "hd"
#define PRIi16 "hi"
#define PRIdLEAST16 "hd"
#define PRIiLEAST16 "hi"
#define PRIdFAST16 "hd"
#define PRIiFAST16 "hi"
#define PRId32 "I32d"
#define PRIi32 "I32i"
#define PRIdLEAST32 "I32d"
#define PRIiLEAST32 "I32i"
#define PRIdFAST32 "I32d"
#define PRIiFAST32 "I32i"
#define PRId64 "I64d"
#define PRIi64 "I64i"
#define PRIdLEAST64 "I64d"
#define PRIiLEAST64 "I64i"
#define PRIdFAST64 "I64d"
#define PRIiFAST64 "I64i"
#define PRIdMAX "I64d"
#define PRIiMAX "I64i"
#define PRIdPTR "Id"
#define PRIiPTR "Ii"
// The fprintf macros for unsigned integers are:
#define PRIo8 "o"
#define PRIu8 "u"
#define PRIx8 "x"
#define PRIX8 "X"
#define PRIoLEAST8 "o"
#define PRIuLEAST8 "u"
#define PRIxLEAST8 "x"
#define PRIXLEAST8 "X"
#define PRIoFAST8 "o"
#define PRIuFAST8 "u"
#define PRIxFAST8 "x"
#define PRIXFAST8 "X"
#define PRIo16 "ho"
#define PRIu16 "hu"
#define PRIx16 "hx"
#define PRIX16 "hX"
#define PRIoLEAST16 "ho"
#define PRIuLEAST16 "hu"
#define PRIxLEAST16 "hx"
#define PRIXLEAST16 "hX"
#define PRIoFAST16 "ho"
#define PRIuFAST16 "hu"
#define PRIxFAST16 "hx"
#define PRIXFAST16 "hX"
#define PRIo32 "I32o"
#define PRIu32 "I32u"
#define PRIx32 "I32x"
#define PRIX32 "I32X"
#define PRIoLEAST32 "I32o"
#define PRIuLEAST32 "I32u"
#define PRIxLEAST32 "I32x"
#define PRIXLEAST32 "I32X"
#define PRIoFAST32 "I32o"
#define PRIuFAST32 "I32u"
#define PRIxFAST32 "I32x"
#define PRIXFAST32 "I32X"
#define PRIo64 "I64o"
#define PRIu64 "I64u"
#define PRIx64 "I64x"
#define PRIX64 "I64X"
#define PRIoLEAST64 "I64o"
#define PRIuLEAST64 "I64u"
#define PRIxLEAST64 "I64x"
#define PRIXLEAST64 "I64X"
#define PRIoFAST64 "I64o"
#define PRIuFAST64 "I64u"
#define PRIxFAST64 "I64x"
#define PRIXFAST64 "I64X"
#define PRIoMAX "I64o"
#define PRIuMAX "I64u"
#define PRIxMAX "I64x"
#define PRIXMAX "I64X"
#define PRIoPTR "Io"
#define PRIuPTR "Iu"
#define PRIxPTR "Ix"
#define PRIXPTR "IX"
// The fscanf macros for signed integers are:
#define SCNd8 "d"
#define SCNi8 "i"
#define SCNdLEAST8 "d"
#define SCNiLEAST8 "i"
#define SCNdFAST8 "d"
#define SCNiFAST8 "i"
#define SCNd16 "hd"
#define SCNi16 "hi"
#define SCNdLEAST16 "hd"
#define SCNiLEAST16 "hi"
#define SCNdFAST16 "hd"
#define SCNiFAST16 "hi"
#define SCNd32 "ld"
#define SCNi32 "li"
#define SCNdLEAST32 "ld"
#define SCNiLEAST32 "li"
#define SCNdFAST32 "ld"
#define SCNiFAST32 "li"
#define SCNd64 "I64d"
#define SCNi64 "I64i"
#define SCNdLEAST64 "I64d"
#define SCNiLEAST64 "I64i"
#define SCNdFAST64 "I64d"
#define SCNiFAST64 "I64i"
#define SCNdMAX "I64d"
#define SCNiMAX "I64i"
#ifdef _WIN64 // [
# define SCNdPTR "I64d"
# define SCNiPTR "I64i"
#else // _WIN64 ][
# define SCNdPTR "ld"
# define SCNiPTR "li"
#endif // _WIN64 ]
// The fscanf macros for unsigned integers are:
#define SCNo8 "o"
#define SCNu8 "u"
#define SCNx8 "x"
#define SCNX8 "X"
#define SCNoLEAST8 "o"
#define SCNuLEAST8 "u"
#define SCNxLEAST8 "x"
#define SCNXLEAST8 "X"
#define SCNoFAST8 "o"
#define SCNuFAST8 "u"
#define SCNxFAST8 "x"
#define SCNXFAST8 "X"
#define SCNo16 "ho"
#define SCNu16 "hu"
#define SCNx16 "hx"
#define SCNX16 "hX"
#define SCNoLEAST16 "ho"
#define SCNuLEAST16 "hu"
#define SCNxLEAST16 "hx"
#define SCNXLEAST16 "hX"
#define SCNoFAST16 "ho"
#define SCNuFAST16 "hu"
#define SCNxFAST16 "hx"
#define SCNXFAST16 "hX"
#define SCNo32 "lo"
#define SCNu32 "lu"
#define SCNx32 "lx"
#define SCNX32 "lX"
#define SCNoLEAST32 "lo"
#define SCNuLEAST32 "lu"
#define SCNxLEAST32 "lx"
#define SCNXLEAST32 "lX"
#define SCNoFAST32 "lo"
#define SCNuFAST32 "lu"
#define SCNxFAST32 "lx"
#define SCNXFAST32 "lX"
#define SCNo64 "I64o"
#define SCNu64 "I64u"
#define SCNx64 "I64x"
#define SCNX64 "I64X"
#define SCNoLEAST64 "I64o"
#define SCNuLEAST64 "I64u"
#define SCNxLEAST64 "I64x"
#define SCNXLEAST64 "I64X"
#define SCNoFAST64 "I64o"
#define SCNuFAST64 "I64u"
#define SCNxFAST64 "I64x"
#define SCNXFAST64 "I64X"
#define SCNoMAX "I64o"
#define SCNuMAX "I64u"
#define SCNxMAX "I64x"
#define SCNXMAX "I64X"
#ifdef _WIN64 // [
# define SCNoPTR "I64o"
# define SCNuPTR "I64u"
# define SCNxPTR "I64x"
# define SCNXPTR "I64X"
#else // _WIN64 ][
# define SCNoPTR "lo"
# define SCNuPTR "lu"
# define SCNxPTR "lx"
# define SCNXPTR "lX"
#endif // _WIN64 ]
#endif // __STDC_FORMAT_MACROS ]
// 7.8.2 Functions for greatest-width integer types
// 7.8.2.1 The imaxabs function
#define imaxabs _abs64
// 7.8.2.2 The imaxdiv function
// This is modified version of div() function from Microsoft's div.c found
// in %MSVC.NET%\crt\src\div.c
#ifdef STATIC_IMAXDIV // [
static
#else // STATIC_IMAXDIV ][
_inline
#endif // STATIC_IMAXDIV ]
imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
{
imaxdiv_t result;
result.quot = numer / denom;
result.rem = numer % denom;
if (numer < 0 && result.rem > 0) {
// did division wrong; must fix up
++result.quot;
result.rem -= denom;
}
return result;
}
// 7.8.2.3 The strtoimax and strtoumax functions
#define strtoimax _strtoi64
#define strtoumax _strtoui64
// 7.8.2.4 The wcstoimax and wcstoumax functions
#define wcstoimax _wcstoi64
#define wcstoumax _wcstoui64
#endif // _MSC_INTTYPES_H_ ]

View file

@ -0,0 +1,247 @@
// ISO C9x compliant stdint.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006-2008 Alexander Chemeris
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [
#error "Use this header only with Microsoft Visual C++ compilers!"
#endif // _MSC_VER ]
#ifndef _MSC_STDINT_H_ // [
#define _MSC_STDINT_H_
#if _MSC_VER > 1000
#pragma once
#endif
#include <limits.h>
// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
// or compiler give many errors like this:
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
#ifdef __cplusplus
extern "C" {
#endif
# include <wchar.h>
#ifdef __cplusplus
}
#endif
// Define _W64 macros to mark types changing their size, like intptr_t.
#ifndef _W64
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
# define _W64 __w64
# else
# define _W64
# endif
#endif
// 7.18.1 Integer types
// 7.18.1.1 Exact-width integer types
// Visual Studio 6 and Embedded Visual C++ 4 doesn't
// realize that, e.g. char has the same size as __int8
// so we give up on __intX for them.
#if (_MSC_VER < 1300)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
// 7.18.1.2 Minimum-width integer types
typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
typedef int64_t int_least64_t;
typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
typedef uint64_t uint_least64_t;
// 7.18.1.3 Fastest minimum-width integer types
typedef int8_t int_fast8_t;
typedef int16_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef int64_t int_fast64_t;
typedef uint8_t uint_fast8_t;
typedef uint16_t uint_fast16_t;
typedef uint32_t uint_fast32_t;
typedef uint64_t uint_fast64_t;
// 7.18.1.4 Integer types capable of holding object pointers
#ifdef _WIN64 // [
typedef signed __int64 intptr_t;
typedef unsigned __int64 uintptr_t;
#else // _WIN64 ][
typedef _W64 signed int intptr_t;
typedef _W64 unsigned int uintptr_t;
#endif // _WIN64 ]
// 7.18.1.5 Greatest-width integer types
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
// 7.18.2 Limits of specified-width integer types
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
// 7.18.2.1 Limits of exact-width integer types
#define INT8_MIN ((int8_t)_I8_MIN)
#define INT8_MAX _I8_MAX
#define INT16_MIN ((int16_t)_I16_MIN)
#define INT16_MAX _I16_MAX
#define INT32_MIN ((int32_t)_I32_MIN)
#define INT32_MAX _I32_MAX
#define INT64_MIN ((int64_t)_I64_MIN)
#define INT64_MAX _I64_MAX
#define UINT8_MAX _UI8_MAX
#define UINT16_MAX _UI16_MAX
#define UINT32_MAX _UI32_MAX
#define UINT64_MAX _UI64_MAX
// 7.18.2.2 Limits of minimum-width integer types
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
// 7.18.2.3 Limits of fastest minimum-width integer types
#define INT_FAST8_MIN INT8_MIN
#define INT_FAST8_MAX INT8_MAX
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
// 7.18.2.4 Limits of integer types capable of holding object pointers
#ifdef _WIN64 // [
# define INTPTR_MIN INT64_MIN
# define INTPTR_MAX INT64_MAX
# define UINTPTR_MAX UINT64_MAX
#else // _WIN64 ][
# define INTPTR_MIN INT32_MIN
# define INTPTR_MAX INT32_MAX
# define UINTPTR_MAX UINT32_MAX
#endif // _WIN64 ]
// 7.18.2.5 Limits of greatest-width integer types
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
// 7.18.3 Limits of other integer types
#ifdef _WIN64 // [
# define PTRDIFF_MIN _I64_MIN
# define PTRDIFF_MAX _I64_MAX
#else // _WIN64 ][
# define PTRDIFF_MIN _I32_MIN
# define PTRDIFF_MAX _I32_MAX
#endif // _WIN64 ]
#define SIG_ATOMIC_MIN INT_MIN
#define SIG_ATOMIC_MAX INT_MAX
#ifndef SIZE_MAX // [
# ifdef _WIN64 // [
# define SIZE_MAX _UI64_MAX
# else // _WIN64 ][
# define SIZE_MAX _UI32_MAX
# endif // _WIN64 ]
#endif // SIZE_MAX ]
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
#ifndef WCHAR_MIN // [
# define WCHAR_MIN 0
#endif // WCHAR_MIN ]
#ifndef WCHAR_MAX // [
# define WCHAR_MAX _UI16_MAX
#endif // WCHAR_MAX ]
#define WINT_MIN 0
#define WINT_MAX _UI16_MAX
#endif // __STDC_LIMIT_MACROS ]
// 7.18.4 Limits of other integer types
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
// 7.18.4.1 Macros for minimum-width integer constants
#define INT8_C(val) val##i8
#define INT16_C(val) val##i16
#define INT32_C(val) val##i32
#define INT64_C(val) val##i64
#define UINT8_C(val) val##ui8
#define UINT16_C(val) val##ui16
#define UINT32_C(val) val##ui32
#define UINT64_C(val) val##ui64
// 7.18.4.2 Macros for greatest-width integer constants
#define INTMAX_C INT64_C
#define UINTMAX_C UINT64_C
#endif // __STDC_CONSTANT_MACROS ]
#endif // _MSC_STDINT_H_ ]

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,942 @@
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# Game/src/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/chocolate-duke3d
pkgincludedir = $(includedir)/chocolate-duke3d
pkglibdir = $(libdir)/chocolate-duke3d
pkglibexecdir = $(libexecdir)/chocolate-duke3d
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = Game/src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
AM_V_AR = $(am__v_AR_$(V))
am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libGame_a_AR = $(AR) $(ARFLAGS)
libGame_a_DEPENDENCIES = premap.o
am_libGame_a_OBJECTS = libGame_a-actors.$(OBJEXT) \
libGame_a-animlib.$(OBJEXT) libGame_a-config.$(OBJEXT) \
libGame_a-console.$(OBJEXT) libGame_a-control.$(OBJEXT) \
libGame_a-cvar_defs.$(OBJEXT) libGame_a-cvars.$(OBJEXT) \
libGame_a-dummy_audiolib.$(OBJEXT) libGame_a-game.$(OBJEXT) \
libGame_a-gamedef.$(OBJEXT) libGame_a-global.$(OBJEXT) \
libGame_a-keyboard.$(OBJEXT) libGame_a-menues.$(OBJEXT) \
libGame_a-player.$(OBJEXT) libGame_a-rts.$(OBJEXT) \
libGame_a-scriplib.$(OBJEXT) libGame_a-sector.$(OBJEXT) \
libGame_a-sounds.$(OBJEXT)
libGame_a_OBJECTS = $(am_libGame_a_OBJECTS)
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
am__v_lt_1 =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libGame_a_SOURCES)
DIST_SOURCES = $(libGame_a_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/build-aux/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing aclocal-1.15
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 0
AUTOCONF = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing autoconf
AUTOHEADER = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing autoheader
AUTOMAKE = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing automake-1.15
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -Wall -Wno-pointer-sign -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-parentheses -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-unused-function -Wno-unused-result -fno-strict-aliasing -fno-aggressive-loop-optimizations -DPLATFORM_UNIX -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -g -O2
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
DEFS = -DPACKAGE_NAME=\"Chocolate\ Duke3D\" -DPACKAGE_TARNAME=\"chocolate-duke3d\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"Chocolate\ Duke3D\ 1.0\" -DPACKAGE_BUGREPORT=\"https://github.com/fabiensanglard/chocolate_duke3D/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"chocolate-duke3d\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ASSERT_H=1 -DHAVE_ENET_ENET_H=1
DEPDIR = .deps
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /usr/bin/grep -E
EXEEXT =
GREP = /usr/bin/grep
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS = -lSDL -lpthread -lSDL_mixer -lSDL -lpthread
LIBOBJS =
LIBS =
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing makeinfo
MKDIR_P = /usr/bin/mkdir -p
OBJEXT = o
PACKAGE = chocolate-duke3d
PACKAGE_BUGREPORT = https://github.com/fabiensanglard/chocolate_duke3D/issues
PACKAGE_NAME = Chocolate Duke3D
PACKAGE_STRING = Chocolate Duke3D 1.0
PACKAGE_TARNAME = chocolate-duke3d
PACKAGE_URL =
PACKAGE_VERSION = 1.0
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR =
PKG_CONFIG_PATH =
RANLIB = ranlib
SDL_CFLAGS = -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL
SDL_LIBS = -lSDL -lpthread
SDL_MIXER_CFLAGS = -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL
SDL_MIXER_LIBS = -lSDL_mixer -lSDL -lpthread
SET_MAKE =
SHELL = /bin/sh
STRIP =
VERSION = 1.0
WINDRES =
abs_builddir = /home/franklin/chocolate_duke3D/Game/src
abs_srcdir = /home/franklin/chocolate_duke3D/Game/src
abs_top_builddir = /home/franklin/chocolate_duke3D
abs_top_srcdir = /home/franklin/chocolate_duke3D
ac_ct_CC = gcc
am__include = include
am__leading_dot = .
am__quote =
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
bindir = ${exec_prefix}/bin
build_alias =
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host_alias =
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias =
top_build_prefix = ../../
top_builddir = ../..
top_srcdir = ../..
SUBDIRS = audiolib midi
noinst_LIBRARIES = libGame.a
libGame_a_SOURCES = \
actors.c animlib.c config.c console.c control.c cvar_defs.c cvars.c dummy_audiolib.c game.c \
gamedef.c global.c keyboard.c menues.c player.c rts.c scriplib.c sector.c sounds.c
libGame_a_LIBADD = premap.o
libGame_a_CFLAGS = -I$(top_srcdir)/Engine/src
all: all-recursive
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Game/src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Game/src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libGame.a: $(libGame_a_OBJECTS) $(libGame_a_DEPENDENCIES) $(EXTRA_libGame_a_DEPENDENCIES)
$(AM_V_at)-rm -f libGame.a
$(AM_V_AR)$(libGame_a_AR) libGame.a $(libGame_a_OBJECTS) $(libGame_a_LIBADD)
$(AM_V_at)$(RANLIB) libGame.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
include ./$(DEPDIR)/libGame_a-actors.Po
include ./$(DEPDIR)/libGame_a-animlib.Po
include ./$(DEPDIR)/libGame_a-config.Po
include ./$(DEPDIR)/libGame_a-console.Po
include ./$(DEPDIR)/libGame_a-control.Po
include ./$(DEPDIR)/libGame_a-cvar_defs.Po
include ./$(DEPDIR)/libGame_a-cvars.Po
include ./$(DEPDIR)/libGame_a-dummy_audiolib.Po
include ./$(DEPDIR)/libGame_a-game.Po
include ./$(DEPDIR)/libGame_a-gamedef.Po
include ./$(DEPDIR)/libGame_a-global.Po
include ./$(DEPDIR)/libGame_a-keyboard.Po
include ./$(DEPDIR)/libGame_a-menues.Po
include ./$(DEPDIR)/libGame_a-player.Po
include ./$(DEPDIR)/libGame_a-rts.Po
include ./$(DEPDIR)/libGame_a-scriplib.Po
include ./$(DEPDIR)/libGame_a-sector.Po
include ./$(DEPDIR)/libGame_a-sounds.Po
.c.o:
$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# $(AM_V_CC)source='$<' object='$@' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(COMPILE) -c -o $@ $<
.c.obj:
$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# $(AM_V_CC)source='$<' object='$@' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
libGame_a-actors.o: actors.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-actors.o -MD -MP -MF $(DEPDIR)/libGame_a-actors.Tpo -c -o libGame_a-actors.o `test -f 'actors.c' || echo '$(srcdir)/'`actors.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-actors.Tpo $(DEPDIR)/libGame_a-actors.Po
# $(AM_V_CC)source='actors.c' object='libGame_a-actors.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-actors.o `test -f 'actors.c' || echo '$(srcdir)/'`actors.c
libGame_a-actors.obj: actors.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-actors.obj -MD -MP -MF $(DEPDIR)/libGame_a-actors.Tpo -c -o libGame_a-actors.obj `if test -f 'actors.c'; then $(CYGPATH_W) 'actors.c'; else $(CYGPATH_W) '$(srcdir)/actors.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-actors.Tpo $(DEPDIR)/libGame_a-actors.Po
# $(AM_V_CC)source='actors.c' object='libGame_a-actors.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-actors.obj `if test -f 'actors.c'; then $(CYGPATH_W) 'actors.c'; else $(CYGPATH_W) '$(srcdir)/actors.c'; fi`
libGame_a-animlib.o: animlib.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-animlib.o -MD -MP -MF $(DEPDIR)/libGame_a-animlib.Tpo -c -o libGame_a-animlib.o `test -f 'animlib.c' || echo '$(srcdir)/'`animlib.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-animlib.Tpo $(DEPDIR)/libGame_a-animlib.Po
# $(AM_V_CC)source='animlib.c' object='libGame_a-animlib.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-animlib.o `test -f 'animlib.c' || echo '$(srcdir)/'`animlib.c
libGame_a-animlib.obj: animlib.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-animlib.obj -MD -MP -MF $(DEPDIR)/libGame_a-animlib.Tpo -c -o libGame_a-animlib.obj `if test -f 'animlib.c'; then $(CYGPATH_W) 'animlib.c'; else $(CYGPATH_W) '$(srcdir)/animlib.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-animlib.Tpo $(DEPDIR)/libGame_a-animlib.Po
# $(AM_V_CC)source='animlib.c' object='libGame_a-animlib.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-animlib.obj `if test -f 'animlib.c'; then $(CYGPATH_W) 'animlib.c'; else $(CYGPATH_W) '$(srcdir)/animlib.c'; fi`
libGame_a-config.o: config.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-config.o -MD -MP -MF $(DEPDIR)/libGame_a-config.Tpo -c -o libGame_a-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-config.Tpo $(DEPDIR)/libGame_a-config.Po
# $(AM_V_CC)source='config.c' object='libGame_a-config.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c
libGame_a-config.obj: config.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-config.obj -MD -MP -MF $(DEPDIR)/libGame_a-config.Tpo -c -o libGame_a-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-config.Tpo $(DEPDIR)/libGame_a-config.Po
# $(AM_V_CC)source='config.c' object='libGame_a-config.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi`
libGame_a-console.o: console.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-console.o -MD -MP -MF $(DEPDIR)/libGame_a-console.Tpo -c -o libGame_a-console.o `test -f 'console.c' || echo '$(srcdir)/'`console.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-console.Tpo $(DEPDIR)/libGame_a-console.Po
# $(AM_V_CC)source='console.c' object='libGame_a-console.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-console.o `test -f 'console.c' || echo '$(srcdir)/'`console.c
libGame_a-console.obj: console.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-console.obj -MD -MP -MF $(DEPDIR)/libGame_a-console.Tpo -c -o libGame_a-console.obj `if test -f 'console.c'; then $(CYGPATH_W) 'console.c'; else $(CYGPATH_W) '$(srcdir)/console.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-console.Tpo $(DEPDIR)/libGame_a-console.Po
# $(AM_V_CC)source='console.c' object='libGame_a-console.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-console.obj `if test -f 'console.c'; then $(CYGPATH_W) 'console.c'; else $(CYGPATH_W) '$(srcdir)/console.c'; fi`
libGame_a-control.o: control.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-control.o -MD -MP -MF $(DEPDIR)/libGame_a-control.Tpo -c -o libGame_a-control.o `test -f 'control.c' || echo '$(srcdir)/'`control.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-control.Tpo $(DEPDIR)/libGame_a-control.Po
# $(AM_V_CC)source='control.c' object='libGame_a-control.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-control.o `test -f 'control.c' || echo '$(srcdir)/'`control.c
libGame_a-control.obj: control.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-control.obj -MD -MP -MF $(DEPDIR)/libGame_a-control.Tpo -c -o libGame_a-control.obj `if test -f 'control.c'; then $(CYGPATH_W) 'control.c'; else $(CYGPATH_W) '$(srcdir)/control.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-control.Tpo $(DEPDIR)/libGame_a-control.Po
# $(AM_V_CC)source='control.c' object='libGame_a-control.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-control.obj `if test -f 'control.c'; then $(CYGPATH_W) 'control.c'; else $(CYGPATH_W) '$(srcdir)/control.c'; fi`
libGame_a-cvar_defs.o: cvar_defs.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-cvar_defs.o -MD -MP -MF $(DEPDIR)/libGame_a-cvar_defs.Tpo -c -o libGame_a-cvar_defs.o `test -f 'cvar_defs.c' || echo '$(srcdir)/'`cvar_defs.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-cvar_defs.Tpo $(DEPDIR)/libGame_a-cvar_defs.Po
# $(AM_V_CC)source='cvar_defs.c' object='libGame_a-cvar_defs.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-cvar_defs.o `test -f 'cvar_defs.c' || echo '$(srcdir)/'`cvar_defs.c
libGame_a-cvar_defs.obj: cvar_defs.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-cvar_defs.obj -MD -MP -MF $(DEPDIR)/libGame_a-cvar_defs.Tpo -c -o libGame_a-cvar_defs.obj `if test -f 'cvar_defs.c'; then $(CYGPATH_W) 'cvar_defs.c'; else $(CYGPATH_W) '$(srcdir)/cvar_defs.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-cvar_defs.Tpo $(DEPDIR)/libGame_a-cvar_defs.Po
# $(AM_V_CC)source='cvar_defs.c' object='libGame_a-cvar_defs.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-cvar_defs.obj `if test -f 'cvar_defs.c'; then $(CYGPATH_W) 'cvar_defs.c'; else $(CYGPATH_W) '$(srcdir)/cvar_defs.c'; fi`
libGame_a-cvars.o: cvars.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-cvars.o -MD -MP -MF $(DEPDIR)/libGame_a-cvars.Tpo -c -o libGame_a-cvars.o `test -f 'cvars.c' || echo '$(srcdir)/'`cvars.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-cvars.Tpo $(DEPDIR)/libGame_a-cvars.Po
# $(AM_V_CC)source='cvars.c' object='libGame_a-cvars.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-cvars.o `test -f 'cvars.c' || echo '$(srcdir)/'`cvars.c
libGame_a-cvars.obj: cvars.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-cvars.obj -MD -MP -MF $(DEPDIR)/libGame_a-cvars.Tpo -c -o libGame_a-cvars.obj `if test -f 'cvars.c'; then $(CYGPATH_W) 'cvars.c'; else $(CYGPATH_W) '$(srcdir)/cvars.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-cvars.Tpo $(DEPDIR)/libGame_a-cvars.Po
# $(AM_V_CC)source='cvars.c' object='libGame_a-cvars.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-cvars.obj `if test -f 'cvars.c'; then $(CYGPATH_W) 'cvars.c'; else $(CYGPATH_W) '$(srcdir)/cvars.c'; fi`
libGame_a-dummy_audiolib.o: dummy_audiolib.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-dummy_audiolib.o -MD -MP -MF $(DEPDIR)/libGame_a-dummy_audiolib.Tpo -c -o libGame_a-dummy_audiolib.o `test -f 'dummy_audiolib.c' || echo '$(srcdir)/'`dummy_audiolib.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-dummy_audiolib.Tpo $(DEPDIR)/libGame_a-dummy_audiolib.Po
# $(AM_V_CC)source='dummy_audiolib.c' object='libGame_a-dummy_audiolib.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-dummy_audiolib.o `test -f 'dummy_audiolib.c' || echo '$(srcdir)/'`dummy_audiolib.c
libGame_a-dummy_audiolib.obj: dummy_audiolib.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-dummy_audiolib.obj -MD -MP -MF $(DEPDIR)/libGame_a-dummy_audiolib.Tpo -c -o libGame_a-dummy_audiolib.obj `if test -f 'dummy_audiolib.c'; then $(CYGPATH_W) 'dummy_audiolib.c'; else $(CYGPATH_W) '$(srcdir)/dummy_audiolib.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-dummy_audiolib.Tpo $(DEPDIR)/libGame_a-dummy_audiolib.Po
# $(AM_V_CC)source='dummy_audiolib.c' object='libGame_a-dummy_audiolib.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-dummy_audiolib.obj `if test -f 'dummy_audiolib.c'; then $(CYGPATH_W) 'dummy_audiolib.c'; else $(CYGPATH_W) '$(srcdir)/dummy_audiolib.c'; fi`
libGame_a-game.o: game.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-game.o -MD -MP -MF $(DEPDIR)/libGame_a-game.Tpo -c -o libGame_a-game.o `test -f 'game.c' || echo '$(srcdir)/'`game.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-game.Tpo $(DEPDIR)/libGame_a-game.Po
# $(AM_V_CC)source='game.c' object='libGame_a-game.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-game.o `test -f 'game.c' || echo '$(srcdir)/'`game.c
libGame_a-game.obj: game.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-game.obj -MD -MP -MF $(DEPDIR)/libGame_a-game.Tpo -c -o libGame_a-game.obj `if test -f 'game.c'; then $(CYGPATH_W) 'game.c'; else $(CYGPATH_W) '$(srcdir)/game.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-game.Tpo $(DEPDIR)/libGame_a-game.Po
# $(AM_V_CC)source='game.c' object='libGame_a-game.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-game.obj `if test -f 'game.c'; then $(CYGPATH_W) 'game.c'; else $(CYGPATH_W) '$(srcdir)/game.c'; fi`
libGame_a-gamedef.o: gamedef.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-gamedef.o -MD -MP -MF $(DEPDIR)/libGame_a-gamedef.Tpo -c -o libGame_a-gamedef.o `test -f 'gamedef.c' || echo '$(srcdir)/'`gamedef.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-gamedef.Tpo $(DEPDIR)/libGame_a-gamedef.Po
# $(AM_V_CC)source='gamedef.c' object='libGame_a-gamedef.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-gamedef.o `test -f 'gamedef.c' || echo '$(srcdir)/'`gamedef.c
libGame_a-gamedef.obj: gamedef.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-gamedef.obj -MD -MP -MF $(DEPDIR)/libGame_a-gamedef.Tpo -c -o libGame_a-gamedef.obj `if test -f 'gamedef.c'; then $(CYGPATH_W) 'gamedef.c'; else $(CYGPATH_W) '$(srcdir)/gamedef.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-gamedef.Tpo $(DEPDIR)/libGame_a-gamedef.Po
# $(AM_V_CC)source='gamedef.c' object='libGame_a-gamedef.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-gamedef.obj `if test -f 'gamedef.c'; then $(CYGPATH_W) 'gamedef.c'; else $(CYGPATH_W) '$(srcdir)/gamedef.c'; fi`
libGame_a-global.o: global.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-global.o -MD -MP -MF $(DEPDIR)/libGame_a-global.Tpo -c -o libGame_a-global.o `test -f 'global.c' || echo '$(srcdir)/'`global.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-global.Tpo $(DEPDIR)/libGame_a-global.Po
# $(AM_V_CC)source='global.c' object='libGame_a-global.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-global.o `test -f 'global.c' || echo '$(srcdir)/'`global.c
libGame_a-global.obj: global.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-global.obj -MD -MP -MF $(DEPDIR)/libGame_a-global.Tpo -c -o libGame_a-global.obj `if test -f 'global.c'; then $(CYGPATH_W) 'global.c'; else $(CYGPATH_W) '$(srcdir)/global.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-global.Tpo $(DEPDIR)/libGame_a-global.Po
# $(AM_V_CC)source='global.c' object='libGame_a-global.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-global.obj `if test -f 'global.c'; then $(CYGPATH_W) 'global.c'; else $(CYGPATH_W) '$(srcdir)/global.c'; fi`
libGame_a-keyboard.o: keyboard.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-keyboard.o -MD -MP -MF $(DEPDIR)/libGame_a-keyboard.Tpo -c -o libGame_a-keyboard.o `test -f 'keyboard.c' || echo '$(srcdir)/'`keyboard.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-keyboard.Tpo $(DEPDIR)/libGame_a-keyboard.Po
# $(AM_V_CC)source='keyboard.c' object='libGame_a-keyboard.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-keyboard.o `test -f 'keyboard.c' || echo '$(srcdir)/'`keyboard.c
libGame_a-keyboard.obj: keyboard.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-keyboard.obj -MD -MP -MF $(DEPDIR)/libGame_a-keyboard.Tpo -c -o libGame_a-keyboard.obj `if test -f 'keyboard.c'; then $(CYGPATH_W) 'keyboard.c'; else $(CYGPATH_W) '$(srcdir)/keyboard.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-keyboard.Tpo $(DEPDIR)/libGame_a-keyboard.Po
# $(AM_V_CC)source='keyboard.c' object='libGame_a-keyboard.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-keyboard.obj `if test -f 'keyboard.c'; then $(CYGPATH_W) 'keyboard.c'; else $(CYGPATH_W) '$(srcdir)/keyboard.c'; fi`
libGame_a-menues.o: menues.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-menues.o -MD -MP -MF $(DEPDIR)/libGame_a-menues.Tpo -c -o libGame_a-menues.o `test -f 'menues.c' || echo '$(srcdir)/'`menues.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-menues.Tpo $(DEPDIR)/libGame_a-menues.Po
# $(AM_V_CC)source='menues.c' object='libGame_a-menues.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-menues.o `test -f 'menues.c' || echo '$(srcdir)/'`menues.c
libGame_a-menues.obj: menues.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-menues.obj -MD -MP -MF $(DEPDIR)/libGame_a-menues.Tpo -c -o libGame_a-menues.obj `if test -f 'menues.c'; then $(CYGPATH_W) 'menues.c'; else $(CYGPATH_W) '$(srcdir)/menues.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-menues.Tpo $(DEPDIR)/libGame_a-menues.Po
# $(AM_V_CC)source='menues.c' object='libGame_a-menues.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-menues.obj `if test -f 'menues.c'; then $(CYGPATH_W) 'menues.c'; else $(CYGPATH_W) '$(srcdir)/menues.c'; fi`
libGame_a-player.o: player.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-player.o -MD -MP -MF $(DEPDIR)/libGame_a-player.Tpo -c -o libGame_a-player.o `test -f 'player.c' || echo '$(srcdir)/'`player.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-player.Tpo $(DEPDIR)/libGame_a-player.Po
# $(AM_V_CC)source='player.c' object='libGame_a-player.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-player.o `test -f 'player.c' || echo '$(srcdir)/'`player.c
libGame_a-player.obj: player.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-player.obj -MD -MP -MF $(DEPDIR)/libGame_a-player.Tpo -c -o libGame_a-player.obj `if test -f 'player.c'; then $(CYGPATH_W) 'player.c'; else $(CYGPATH_W) '$(srcdir)/player.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-player.Tpo $(DEPDIR)/libGame_a-player.Po
# $(AM_V_CC)source='player.c' object='libGame_a-player.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-player.obj `if test -f 'player.c'; then $(CYGPATH_W) 'player.c'; else $(CYGPATH_W) '$(srcdir)/player.c'; fi`
libGame_a-rts.o: rts.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-rts.o -MD -MP -MF $(DEPDIR)/libGame_a-rts.Tpo -c -o libGame_a-rts.o `test -f 'rts.c' || echo '$(srcdir)/'`rts.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-rts.Tpo $(DEPDIR)/libGame_a-rts.Po
# $(AM_V_CC)source='rts.c' object='libGame_a-rts.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-rts.o `test -f 'rts.c' || echo '$(srcdir)/'`rts.c
libGame_a-rts.obj: rts.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-rts.obj -MD -MP -MF $(DEPDIR)/libGame_a-rts.Tpo -c -o libGame_a-rts.obj `if test -f 'rts.c'; then $(CYGPATH_W) 'rts.c'; else $(CYGPATH_W) '$(srcdir)/rts.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-rts.Tpo $(DEPDIR)/libGame_a-rts.Po
# $(AM_V_CC)source='rts.c' object='libGame_a-rts.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-rts.obj `if test -f 'rts.c'; then $(CYGPATH_W) 'rts.c'; else $(CYGPATH_W) '$(srcdir)/rts.c'; fi`
libGame_a-scriplib.o: scriplib.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-scriplib.o -MD -MP -MF $(DEPDIR)/libGame_a-scriplib.Tpo -c -o libGame_a-scriplib.o `test -f 'scriplib.c' || echo '$(srcdir)/'`scriplib.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-scriplib.Tpo $(DEPDIR)/libGame_a-scriplib.Po
# $(AM_V_CC)source='scriplib.c' object='libGame_a-scriplib.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-scriplib.o `test -f 'scriplib.c' || echo '$(srcdir)/'`scriplib.c
libGame_a-scriplib.obj: scriplib.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-scriplib.obj -MD -MP -MF $(DEPDIR)/libGame_a-scriplib.Tpo -c -o libGame_a-scriplib.obj `if test -f 'scriplib.c'; then $(CYGPATH_W) 'scriplib.c'; else $(CYGPATH_W) '$(srcdir)/scriplib.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-scriplib.Tpo $(DEPDIR)/libGame_a-scriplib.Po
# $(AM_V_CC)source='scriplib.c' object='libGame_a-scriplib.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-scriplib.obj `if test -f 'scriplib.c'; then $(CYGPATH_W) 'scriplib.c'; else $(CYGPATH_W) '$(srcdir)/scriplib.c'; fi`
libGame_a-sector.o: sector.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-sector.o -MD -MP -MF $(DEPDIR)/libGame_a-sector.Tpo -c -o libGame_a-sector.o `test -f 'sector.c' || echo '$(srcdir)/'`sector.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-sector.Tpo $(DEPDIR)/libGame_a-sector.Po
# $(AM_V_CC)source='sector.c' object='libGame_a-sector.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-sector.o `test -f 'sector.c' || echo '$(srcdir)/'`sector.c
libGame_a-sector.obj: sector.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-sector.obj -MD -MP -MF $(DEPDIR)/libGame_a-sector.Tpo -c -o libGame_a-sector.obj `if test -f 'sector.c'; then $(CYGPATH_W) 'sector.c'; else $(CYGPATH_W) '$(srcdir)/sector.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-sector.Tpo $(DEPDIR)/libGame_a-sector.Po
# $(AM_V_CC)source='sector.c' object='libGame_a-sector.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-sector.obj `if test -f 'sector.c'; then $(CYGPATH_W) 'sector.c'; else $(CYGPATH_W) '$(srcdir)/sector.c'; fi`
libGame_a-sounds.o: sounds.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-sounds.o -MD -MP -MF $(DEPDIR)/libGame_a-sounds.Tpo -c -o libGame_a-sounds.o `test -f 'sounds.c' || echo '$(srcdir)/'`sounds.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-sounds.Tpo $(DEPDIR)/libGame_a-sounds.Po
# $(AM_V_CC)source='sounds.c' object='libGame_a-sounds.o' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-sounds.o `test -f 'sounds.c' || echo '$(srcdir)/'`sounds.c
libGame_a-sounds.obj: sounds.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-sounds.obj -MD -MP -MF $(DEPDIR)/libGame_a-sounds.Tpo -c -o libGame_a-sounds.obj `if test -f 'sounds.c'; then $(CYGPATH_W) 'sounds.c'; else $(CYGPATH_W) '$(srcdir)/sounds.c'; fi`
$(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-sounds.Tpo $(DEPDIR)/libGame_a-sounds.Po
# $(AM_V_CC)source='sounds.c' object='libGame_a-sounds.obj' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-sounds.obj `if test -f 'sounds.c'; then $(CYGPATH_W) 'sounds.c'; else $(CYGPATH_W) '$(srcdir)/sounds.c'; fi`
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(LIBRARIES)
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-generic clean-noinstLIBRARIES \
cscopelist-am ctags ctags-am distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
# Starting a new game will lead to a crash if premap.o was built with -O1/-O2/-O3,
# that's why we're compiling it seperately with -O0
premap.o: premap.c
$(AM_V_CC)$(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -I$(top_srcdir)/Engine/src -O0 -c $^ -o $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,14 @@
SUBDIRS = audiolib midi
noinst_LIBRARIES = libGame.a
libGame_a_SOURCES = \
actors.c animlib.c config.c console.c control.c cvar_defs.c cvars.c dummy_audiolib.c game.c \
gamedef.c global.c keyboard.c menues.c player.c rts.c scriplib.c sector.c sounds.c
libGame_a_LIBADD = premap.o
libGame_a_CFLAGS = -I$(top_srcdir)/Engine/src
# Starting a new game will lead to a crash if premap.o was built with -O1/-O2/-O3,
# that's why we're compiling it seperately with -O0
premap.o: premap.c
$(AM_V_CC)$(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -I$(top_srcdir)/Engine/src -O0 -c $^ -o $@

View file

@ -0,0 +1,942 @@
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = Game/src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
AM_V_AR = $(am__v_AR_@AM_V@)
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libGame_a_AR = $(AR) $(ARFLAGS)
libGame_a_DEPENDENCIES = premap.o
am_libGame_a_OBJECTS = libGame_a-actors.$(OBJEXT) \
libGame_a-animlib.$(OBJEXT) libGame_a-config.$(OBJEXT) \
libGame_a-console.$(OBJEXT) libGame_a-control.$(OBJEXT) \
libGame_a-cvar_defs.$(OBJEXT) libGame_a-cvars.$(OBJEXT) \
libGame_a-dummy_audiolib.$(OBJEXT) libGame_a-game.$(OBJEXT) \
libGame_a-gamedef.$(OBJEXT) libGame_a-global.$(OBJEXT) \
libGame_a-keyboard.$(OBJEXT) libGame_a-menues.$(OBJEXT) \
libGame_a-player.$(OBJEXT) libGame_a-rts.$(OBJEXT) \
libGame_a-scriplib.$(OBJEXT) libGame_a-sector.$(OBJEXT) \
libGame_a-sounds.$(OBJEXT)
libGame_a_OBJECTS = $(am_libGame_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libGame_a_SOURCES)
DIST_SOURCES = $(libGame_a_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/build-aux/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_LIBS = @SDL_LIBS@
SDL_MIXER_CFLAGS = @SDL_MIXER_CFLAGS@
SDL_MIXER_LIBS = @SDL_MIXER_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
WINDRES = @WINDRES@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = audiolib midi
noinst_LIBRARIES = libGame.a
libGame_a_SOURCES = \
actors.c animlib.c config.c console.c control.c cvar_defs.c cvars.c dummy_audiolib.c game.c \
gamedef.c global.c keyboard.c menues.c player.c rts.c scriplib.c sector.c sounds.c
libGame_a_LIBADD = premap.o
libGame_a_CFLAGS = -I$(top_srcdir)/Engine/src
all: all-recursive
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Game/src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Game/src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libGame.a: $(libGame_a_OBJECTS) $(libGame_a_DEPENDENCIES) $(EXTRA_libGame_a_DEPENDENCIES)
$(AM_V_at)-rm -f libGame.a
$(AM_V_AR)$(libGame_a_AR) libGame.a $(libGame_a_OBJECTS) $(libGame_a_LIBADD)
$(AM_V_at)$(RANLIB) libGame.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-actors.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-animlib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-config.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-console.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-control.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-cvar_defs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-cvars.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-dummy_audiolib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-game.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-gamedef.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-global.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-keyboard.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-menues.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-player.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-rts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-scriplib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-sector.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGame_a-sounds.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
libGame_a-actors.o: actors.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-actors.o -MD -MP -MF $(DEPDIR)/libGame_a-actors.Tpo -c -o libGame_a-actors.o `test -f 'actors.c' || echo '$(srcdir)/'`actors.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-actors.Tpo $(DEPDIR)/libGame_a-actors.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='actors.c' object='libGame_a-actors.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-actors.o `test -f 'actors.c' || echo '$(srcdir)/'`actors.c
libGame_a-actors.obj: actors.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-actors.obj -MD -MP -MF $(DEPDIR)/libGame_a-actors.Tpo -c -o libGame_a-actors.obj `if test -f 'actors.c'; then $(CYGPATH_W) 'actors.c'; else $(CYGPATH_W) '$(srcdir)/actors.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-actors.Tpo $(DEPDIR)/libGame_a-actors.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='actors.c' object='libGame_a-actors.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-actors.obj `if test -f 'actors.c'; then $(CYGPATH_W) 'actors.c'; else $(CYGPATH_W) '$(srcdir)/actors.c'; fi`
libGame_a-animlib.o: animlib.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-animlib.o -MD -MP -MF $(DEPDIR)/libGame_a-animlib.Tpo -c -o libGame_a-animlib.o `test -f 'animlib.c' || echo '$(srcdir)/'`animlib.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-animlib.Tpo $(DEPDIR)/libGame_a-animlib.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='animlib.c' object='libGame_a-animlib.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-animlib.o `test -f 'animlib.c' || echo '$(srcdir)/'`animlib.c
libGame_a-animlib.obj: animlib.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-animlib.obj -MD -MP -MF $(DEPDIR)/libGame_a-animlib.Tpo -c -o libGame_a-animlib.obj `if test -f 'animlib.c'; then $(CYGPATH_W) 'animlib.c'; else $(CYGPATH_W) '$(srcdir)/animlib.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-animlib.Tpo $(DEPDIR)/libGame_a-animlib.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='animlib.c' object='libGame_a-animlib.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-animlib.obj `if test -f 'animlib.c'; then $(CYGPATH_W) 'animlib.c'; else $(CYGPATH_W) '$(srcdir)/animlib.c'; fi`
libGame_a-config.o: config.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-config.o -MD -MP -MF $(DEPDIR)/libGame_a-config.Tpo -c -o libGame_a-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-config.Tpo $(DEPDIR)/libGame_a-config.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config.c' object='libGame_a-config.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c
libGame_a-config.obj: config.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-config.obj -MD -MP -MF $(DEPDIR)/libGame_a-config.Tpo -c -o libGame_a-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-config.Tpo $(DEPDIR)/libGame_a-config.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config.c' object='libGame_a-config.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi`
libGame_a-console.o: console.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-console.o -MD -MP -MF $(DEPDIR)/libGame_a-console.Tpo -c -o libGame_a-console.o `test -f 'console.c' || echo '$(srcdir)/'`console.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-console.Tpo $(DEPDIR)/libGame_a-console.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='console.c' object='libGame_a-console.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-console.o `test -f 'console.c' || echo '$(srcdir)/'`console.c
libGame_a-console.obj: console.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-console.obj -MD -MP -MF $(DEPDIR)/libGame_a-console.Tpo -c -o libGame_a-console.obj `if test -f 'console.c'; then $(CYGPATH_W) 'console.c'; else $(CYGPATH_W) '$(srcdir)/console.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-console.Tpo $(DEPDIR)/libGame_a-console.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='console.c' object='libGame_a-console.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-console.obj `if test -f 'console.c'; then $(CYGPATH_W) 'console.c'; else $(CYGPATH_W) '$(srcdir)/console.c'; fi`
libGame_a-control.o: control.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-control.o -MD -MP -MF $(DEPDIR)/libGame_a-control.Tpo -c -o libGame_a-control.o `test -f 'control.c' || echo '$(srcdir)/'`control.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-control.Tpo $(DEPDIR)/libGame_a-control.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='control.c' object='libGame_a-control.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-control.o `test -f 'control.c' || echo '$(srcdir)/'`control.c
libGame_a-control.obj: control.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-control.obj -MD -MP -MF $(DEPDIR)/libGame_a-control.Tpo -c -o libGame_a-control.obj `if test -f 'control.c'; then $(CYGPATH_W) 'control.c'; else $(CYGPATH_W) '$(srcdir)/control.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-control.Tpo $(DEPDIR)/libGame_a-control.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='control.c' object='libGame_a-control.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-control.obj `if test -f 'control.c'; then $(CYGPATH_W) 'control.c'; else $(CYGPATH_W) '$(srcdir)/control.c'; fi`
libGame_a-cvar_defs.o: cvar_defs.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-cvar_defs.o -MD -MP -MF $(DEPDIR)/libGame_a-cvar_defs.Tpo -c -o libGame_a-cvar_defs.o `test -f 'cvar_defs.c' || echo '$(srcdir)/'`cvar_defs.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-cvar_defs.Tpo $(DEPDIR)/libGame_a-cvar_defs.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cvar_defs.c' object='libGame_a-cvar_defs.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-cvar_defs.o `test -f 'cvar_defs.c' || echo '$(srcdir)/'`cvar_defs.c
libGame_a-cvar_defs.obj: cvar_defs.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-cvar_defs.obj -MD -MP -MF $(DEPDIR)/libGame_a-cvar_defs.Tpo -c -o libGame_a-cvar_defs.obj `if test -f 'cvar_defs.c'; then $(CYGPATH_W) 'cvar_defs.c'; else $(CYGPATH_W) '$(srcdir)/cvar_defs.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-cvar_defs.Tpo $(DEPDIR)/libGame_a-cvar_defs.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cvar_defs.c' object='libGame_a-cvar_defs.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-cvar_defs.obj `if test -f 'cvar_defs.c'; then $(CYGPATH_W) 'cvar_defs.c'; else $(CYGPATH_W) '$(srcdir)/cvar_defs.c'; fi`
libGame_a-cvars.o: cvars.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-cvars.o -MD -MP -MF $(DEPDIR)/libGame_a-cvars.Tpo -c -o libGame_a-cvars.o `test -f 'cvars.c' || echo '$(srcdir)/'`cvars.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-cvars.Tpo $(DEPDIR)/libGame_a-cvars.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cvars.c' object='libGame_a-cvars.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-cvars.o `test -f 'cvars.c' || echo '$(srcdir)/'`cvars.c
libGame_a-cvars.obj: cvars.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-cvars.obj -MD -MP -MF $(DEPDIR)/libGame_a-cvars.Tpo -c -o libGame_a-cvars.obj `if test -f 'cvars.c'; then $(CYGPATH_W) 'cvars.c'; else $(CYGPATH_W) '$(srcdir)/cvars.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-cvars.Tpo $(DEPDIR)/libGame_a-cvars.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cvars.c' object='libGame_a-cvars.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-cvars.obj `if test -f 'cvars.c'; then $(CYGPATH_W) 'cvars.c'; else $(CYGPATH_W) '$(srcdir)/cvars.c'; fi`
libGame_a-dummy_audiolib.o: dummy_audiolib.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-dummy_audiolib.o -MD -MP -MF $(DEPDIR)/libGame_a-dummy_audiolib.Tpo -c -o libGame_a-dummy_audiolib.o `test -f 'dummy_audiolib.c' || echo '$(srcdir)/'`dummy_audiolib.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-dummy_audiolib.Tpo $(DEPDIR)/libGame_a-dummy_audiolib.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy_audiolib.c' object='libGame_a-dummy_audiolib.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-dummy_audiolib.o `test -f 'dummy_audiolib.c' || echo '$(srcdir)/'`dummy_audiolib.c
libGame_a-dummy_audiolib.obj: dummy_audiolib.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-dummy_audiolib.obj -MD -MP -MF $(DEPDIR)/libGame_a-dummy_audiolib.Tpo -c -o libGame_a-dummy_audiolib.obj `if test -f 'dummy_audiolib.c'; then $(CYGPATH_W) 'dummy_audiolib.c'; else $(CYGPATH_W) '$(srcdir)/dummy_audiolib.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-dummy_audiolib.Tpo $(DEPDIR)/libGame_a-dummy_audiolib.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy_audiolib.c' object='libGame_a-dummy_audiolib.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-dummy_audiolib.obj `if test -f 'dummy_audiolib.c'; then $(CYGPATH_W) 'dummy_audiolib.c'; else $(CYGPATH_W) '$(srcdir)/dummy_audiolib.c'; fi`
libGame_a-game.o: game.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-game.o -MD -MP -MF $(DEPDIR)/libGame_a-game.Tpo -c -o libGame_a-game.o `test -f 'game.c' || echo '$(srcdir)/'`game.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-game.Tpo $(DEPDIR)/libGame_a-game.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='game.c' object='libGame_a-game.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-game.o `test -f 'game.c' || echo '$(srcdir)/'`game.c
libGame_a-game.obj: game.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-game.obj -MD -MP -MF $(DEPDIR)/libGame_a-game.Tpo -c -o libGame_a-game.obj `if test -f 'game.c'; then $(CYGPATH_W) 'game.c'; else $(CYGPATH_W) '$(srcdir)/game.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-game.Tpo $(DEPDIR)/libGame_a-game.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='game.c' object='libGame_a-game.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-game.obj `if test -f 'game.c'; then $(CYGPATH_W) 'game.c'; else $(CYGPATH_W) '$(srcdir)/game.c'; fi`
libGame_a-gamedef.o: gamedef.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-gamedef.o -MD -MP -MF $(DEPDIR)/libGame_a-gamedef.Tpo -c -o libGame_a-gamedef.o `test -f 'gamedef.c' || echo '$(srcdir)/'`gamedef.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-gamedef.Tpo $(DEPDIR)/libGame_a-gamedef.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gamedef.c' object='libGame_a-gamedef.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-gamedef.o `test -f 'gamedef.c' || echo '$(srcdir)/'`gamedef.c
libGame_a-gamedef.obj: gamedef.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-gamedef.obj -MD -MP -MF $(DEPDIR)/libGame_a-gamedef.Tpo -c -o libGame_a-gamedef.obj `if test -f 'gamedef.c'; then $(CYGPATH_W) 'gamedef.c'; else $(CYGPATH_W) '$(srcdir)/gamedef.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-gamedef.Tpo $(DEPDIR)/libGame_a-gamedef.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gamedef.c' object='libGame_a-gamedef.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-gamedef.obj `if test -f 'gamedef.c'; then $(CYGPATH_W) 'gamedef.c'; else $(CYGPATH_W) '$(srcdir)/gamedef.c'; fi`
libGame_a-global.o: global.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-global.o -MD -MP -MF $(DEPDIR)/libGame_a-global.Tpo -c -o libGame_a-global.o `test -f 'global.c' || echo '$(srcdir)/'`global.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-global.Tpo $(DEPDIR)/libGame_a-global.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='global.c' object='libGame_a-global.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-global.o `test -f 'global.c' || echo '$(srcdir)/'`global.c
libGame_a-global.obj: global.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-global.obj -MD -MP -MF $(DEPDIR)/libGame_a-global.Tpo -c -o libGame_a-global.obj `if test -f 'global.c'; then $(CYGPATH_W) 'global.c'; else $(CYGPATH_W) '$(srcdir)/global.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-global.Tpo $(DEPDIR)/libGame_a-global.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='global.c' object='libGame_a-global.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-global.obj `if test -f 'global.c'; then $(CYGPATH_W) 'global.c'; else $(CYGPATH_W) '$(srcdir)/global.c'; fi`
libGame_a-keyboard.o: keyboard.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-keyboard.o -MD -MP -MF $(DEPDIR)/libGame_a-keyboard.Tpo -c -o libGame_a-keyboard.o `test -f 'keyboard.c' || echo '$(srcdir)/'`keyboard.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-keyboard.Tpo $(DEPDIR)/libGame_a-keyboard.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='keyboard.c' object='libGame_a-keyboard.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-keyboard.o `test -f 'keyboard.c' || echo '$(srcdir)/'`keyboard.c
libGame_a-keyboard.obj: keyboard.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-keyboard.obj -MD -MP -MF $(DEPDIR)/libGame_a-keyboard.Tpo -c -o libGame_a-keyboard.obj `if test -f 'keyboard.c'; then $(CYGPATH_W) 'keyboard.c'; else $(CYGPATH_W) '$(srcdir)/keyboard.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-keyboard.Tpo $(DEPDIR)/libGame_a-keyboard.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='keyboard.c' object='libGame_a-keyboard.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-keyboard.obj `if test -f 'keyboard.c'; then $(CYGPATH_W) 'keyboard.c'; else $(CYGPATH_W) '$(srcdir)/keyboard.c'; fi`
libGame_a-menues.o: menues.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-menues.o -MD -MP -MF $(DEPDIR)/libGame_a-menues.Tpo -c -o libGame_a-menues.o `test -f 'menues.c' || echo '$(srcdir)/'`menues.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-menues.Tpo $(DEPDIR)/libGame_a-menues.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='menues.c' object='libGame_a-menues.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-menues.o `test -f 'menues.c' || echo '$(srcdir)/'`menues.c
libGame_a-menues.obj: menues.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-menues.obj -MD -MP -MF $(DEPDIR)/libGame_a-menues.Tpo -c -o libGame_a-menues.obj `if test -f 'menues.c'; then $(CYGPATH_W) 'menues.c'; else $(CYGPATH_W) '$(srcdir)/menues.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-menues.Tpo $(DEPDIR)/libGame_a-menues.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='menues.c' object='libGame_a-menues.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-menues.obj `if test -f 'menues.c'; then $(CYGPATH_W) 'menues.c'; else $(CYGPATH_W) '$(srcdir)/menues.c'; fi`
libGame_a-player.o: player.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-player.o -MD -MP -MF $(DEPDIR)/libGame_a-player.Tpo -c -o libGame_a-player.o `test -f 'player.c' || echo '$(srcdir)/'`player.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-player.Tpo $(DEPDIR)/libGame_a-player.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='player.c' object='libGame_a-player.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-player.o `test -f 'player.c' || echo '$(srcdir)/'`player.c
libGame_a-player.obj: player.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-player.obj -MD -MP -MF $(DEPDIR)/libGame_a-player.Tpo -c -o libGame_a-player.obj `if test -f 'player.c'; then $(CYGPATH_W) 'player.c'; else $(CYGPATH_W) '$(srcdir)/player.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-player.Tpo $(DEPDIR)/libGame_a-player.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='player.c' object='libGame_a-player.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-player.obj `if test -f 'player.c'; then $(CYGPATH_W) 'player.c'; else $(CYGPATH_W) '$(srcdir)/player.c'; fi`
libGame_a-rts.o: rts.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-rts.o -MD -MP -MF $(DEPDIR)/libGame_a-rts.Tpo -c -o libGame_a-rts.o `test -f 'rts.c' || echo '$(srcdir)/'`rts.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-rts.Tpo $(DEPDIR)/libGame_a-rts.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rts.c' object='libGame_a-rts.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-rts.o `test -f 'rts.c' || echo '$(srcdir)/'`rts.c
libGame_a-rts.obj: rts.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-rts.obj -MD -MP -MF $(DEPDIR)/libGame_a-rts.Tpo -c -o libGame_a-rts.obj `if test -f 'rts.c'; then $(CYGPATH_W) 'rts.c'; else $(CYGPATH_W) '$(srcdir)/rts.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-rts.Tpo $(DEPDIR)/libGame_a-rts.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rts.c' object='libGame_a-rts.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-rts.obj `if test -f 'rts.c'; then $(CYGPATH_W) 'rts.c'; else $(CYGPATH_W) '$(srcdir)/rts.c'; fi`
libGame_a-scriplib.o: scriplib.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-scriplib.o -MD -MP -MF $(DEPDIR)/libGame_a-scriplib.Tpo -c -o libGame_a-scriplib.o `test -f 'scriplib.c' || echo '$(srcdir)/'`scriplib.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-scriplib.Tpo $(DEPDIR)/libGame_a-scriplib.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scriplib.c' object='libGame_a-scriplib.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-scriplib.o `test -f 'scriplib.c' || echo '$(srcdir)/'`scriplib.c
libGame_a-scriplib.obj: scriplib.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-scriplib.obj -MD -MP -MF $(DEPDIR)/libGame_a-scriplib.Tpo -c -o libGame_a-scriplib.obj `if test -f 'scriplib.c'; then $(CYGPATH_W) 'scriplib.c'; else $(CYGPATH_W) '$(srcdir)/scriplib.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-scriplib.Tpo $(DEPDIR)/libGame_a-scriplib.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scriplib.c' object='libGame_a-scriplib.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-scriplib.obj `if test -f 'scriplib.c'; then $(CYGPATH_W) 'scriplib.c'; else $(CYGPATH_W) '$(srcdir)/scriplib.c'; fi`
libGame_a-sector.o: sector.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-sector.o -MD -MP -MF $(DEPDIR)/libGame_a-sector.Tpo -c -o libGame_a-sector.o `test -f 'sector.c' || echo '$(srcdir)/'`sector.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-sector.Tpo $(DEPDIR)/libGame_a-sector.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sector.c' object='libGame_a-sector.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-sector.o `test -f 'sector.c' || echo '$(srcdir)/'`sector.c
libGame_a-sector.obj: sector.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-sector.obj -MD -MP -MF $(DEPDIR)/libGame_a-sector.Tpo -c -o libGame_a-sector.obj `if test -f 'sector.c'; then $(CYGPATH_W) 'sector.c'; else $(CYGPATH_W) '$(srcdir)/sector.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-sector.Tpo $(DEPDIR)/libGame_a-sector.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sector.c' object='libGame_a-sector.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-sector.obj `if test -f 'sector.c'; then $(CYGPATH_W) 'sector.c'; else $(CYGPATH_W) '$(srcdir)/sector.c'; fi`
libGame_a-sounds.o: sounds.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-sounds.o -MD -MP -MF $(DEPDIR)/libGame_a-sounds.Tpo -c -o libGame_a-sounds.o `test -f 'sounds.c' || echo '$(srcdir)/'`sounds.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-sounds.Tpo $(DEPDIR)/libGame_a-sounds.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sounds.c' object='libGame_a-sounds.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-sounds.o `test -f 'sounds.c' || echo '$(srcdir)/'`sounds.c
libGame_a-sounds.obj: sounds.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -MT libGame_a-sounds.obj -MD -MP -MF $(DEPDIR)/libGame_a-sounds.Tpo -c -o libGame_a-sounds.obj `if test -f 'sounds.c'; then $(CYGPATH_W) 'sounds.c'; else $(CYGPATH_W) '$(srcdir)/sounds.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libGame_a-sounds.Tpo $(DEPDIR)/libGame_a-sounds.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sounds.c' object='libGame_a-sounds.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libGame_a_CFLAGS) $(CFLAGS) -c -o libGame_a-sounds.obj `if test -f 'sounds.c'; then $(CYGPATH_W) 'sounds.c'; else $(CYGPATH_W) '$(srcdir)/sounds.c'; fi`
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(LIBRARIES)
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-generic clean-noinstLIBRARIES \
cscopelist-am ctags ctags-am distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
# Starting a new game will lead to a crash if premap.o was built with -O1/-O2/-O3,
# that's why we're compiling it seperately with -O0
premap.o: premap.c
$(AM_V_CC)$(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -I$(top_srcdir)/Engine/src -O0 -c $^ -o $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,174 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
aint32_t with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------
// _functio.h
// file created by makehead.exe
// these headers contain default key assignments, as well as
// default button assignments and game function names
// axis defaults are also included
#ifndef _function_private_
#define _function_private_
#ifdef __cplusplus
extern "C" {
#endif
char * gamefunctions[] =
{
"Move_Forward",
"Move_Backward",
"Turn_Left",
"Turn_Right",
"Strafe",
"Fire",
"Open",
"Run",
"AutoRun",
"Jump",
"Crouch",
"Look_Up",
"Look_Down",
"Look_Left",
"Look_Right",
"Strafe_Left",
"Strafe_Right",
"Aim_Up",
"Aim_Down",
"Weapon_1",
"Weapon_2",
"Weapon_3",
"Weapon_4",
"Weapon_5",
"Weapon_6",
"Weapon_7",
"Weapon_8",
"Weapon_9",
"Weapon_10",
"Inventory",
"Inventory_Left",
"Inventory_Right",
"Holo_Duke",
"Jetpack",
"NightVision",
"MedKit",
"TurnAround",
"SendMessage",
"Map",
"Shrink_Screen",
"Enlarge_Screen",
"Center_View",
"Holster_Weapon",
"Show_Opponents_Weapon",
"Map_Follow_Mode",
"See_Coop_View",
"Mouse_Aiming",
"Toggle_Crosshair",
"Steroids",
"Quick_Kick",
"Next_Weapon",
"Previous_Weapon",
"Hide_Weapon",
"Auto_Aim",
"Console"
};
#define NUMKEYENTRIES 55 // Don't forget to change NUMGAMEFUNCTIONS as well
// FIX_00011: duke3d.cfg not needed anymore to start the game. Will create a default one
// if not found and use default keys.
struct keyEntry{
char * entryKey;
char * keyname1;
char * keyname2;
} ;
struct keyEntry keydefaults[] = {
{ "Move_Forward", "Up", "" },
{ "Move_Backward", "", "" },
{ "Turn_Left", "Left", "" },
{ "Turn_Right", "Right", "" },
{ "Strafe", "", "" },
{ "Fire", "Enter", "" },
{ "Open", "Up", "" },
{ "Run", "", "" },
{ "AutoRun", "", "" },
{ "Jump", "Down", "" },
{ "Crouch", "", "" },
{ "Look_Up", "", "" },
{ "Look_Down", "", "" },
{ "Look_Left", "", "" },
{ "Look_Right", "", "" },
{ "Strafe_Left", "A", "" },
{ "Strafe_Right", "D", "" },
{ "Aim_Up", "", "" },
{ "Aim_Down", "", "" },
{ "Weapon_1", "", "" },
{ "Weapon_2", "", "" },
{ "Weapon_3", "", "" },
{ "Weapon_4", "", "" },
{ "Weapon_5", "", "" },
{ "Weapon_6", "", "" },
{ "Weapon_7", "", "" },
{ "Weapon_8", "", "" },
{ "Weapon_9", "", "" },
{ "Weapon_10", "", "" },
{ "Inventory", "", "" },
{ "Inventory_Left", "", "" },
{ "Inventory_Right","]", "", "" },
{ "Holo_Duke", "", "" },
{ "Jetpack", "", "" },
{ "NightVision", "", "" },
{ "MedKit", "", "" },
{ "TurnAround", "", "" },
{ "SendMessage", "", "" },
{ "Map", "", "" },
{ "Shrink_Screen", "", "" },
{ "Enlarge_Screen", "", "" },
{ "Center_View", "", "" },
{ "Holster_Weapon", "", "" },
{ "Show_Opponents_Weapon", "", "" },
{ "Map_Follow_Mode","F", "", "" },
{ "See_Coop_View", "", "" },
{ "Mouse_Aiming", "", "" },
{ "Toggle_Crosshair", "", "" },
{ "Steroids", "", "" },
{ "Quick_Kick", "", "" },
{ "Next_Weapon", "", "" },
{ "Previous_Weapon",";", "", "" },
{ "Hide_Weapon", "", "" },
{ "Auto_Aim", "", "" },
{ "Console", "", "" },
};
#ifdef __cplusplus
};
#endif
#endif

View file

@ -0,0 +1,54 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
aint32_t with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------
#ifndef __rts_private__
#define __rts_private__
//===============
// TYPES
//===============
typedef struct
{
char name[8];
int32 handle,position,size;
} lumpinfo_t;
typedef struct
{
char identification[4]; // should be IWAD
int32 numlumps;
int32 infotableofs;
} wadinfo_t;
typedef struct
{
int32 filepos;
int32 size;
char name[8];
} filelump_t;
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,352 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
aint32_t with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------
#include <SDL.h>
#include "types.h"
#include "develop.h"
#include "util_lib.h"
//#include "_animlib.h"
#include "animlib.h"
//****************************************************************************
//
// GLOBALS
//
//****************************************************************************
//****************************************************************************
//
// LOCALS
//
//****************************************************************************
anim_t * anim=NULL;
static boolean Anim_Started = false;
//****************************************************************************
//
// CheckAnimStarted ()
//
//****************************************************************************
void CheckAnimStarted ( char * funcname )
{
if (!Anim_Started)
Error(EXIT_FAILURE, "ANIMLIB_%s: Anim has not been initialized\n",funcname);
}
//****************************************************************************
//
// findpage ()
// - given a frame number return the large page number it resides in
//
//****************************************************************************
uint16 findpage (uint16 framenumber)
{
uint16 i;
CheckAnimStarted ( "findpage" );
for(i=0; i<anim->lpheader.nLps; i++)
{
if
(
anim->LpArray[i].baseRecord <= framenumber &&
anim->LpArray[i].baseRecord + anim->LpArray[i].nRecords > framenumber
)
return(i);
}
return(i);
}
//****************************************************************************
//
// loadpage ()
// - seek out and load in the large page specified
//
//****************************************************************************
void loadpage (uint16 pagenumber, uint16 *pagepointer)
{
int32 size;
byte * buffer;
CheckAnimStarted ( "loadpage" );
buffer = anim->buffer;
if (anim->curlpnum != pagenumber)
{
anim->curlpnum = pagenumber;
buffer += 0xb00 + (pagenumber*0x10000);
size = sizeof(lp_descriptor);
memcpy(&anim->curlp,buffer,size);
buffer += size + sizeof(uint16);
memcpy(pagepointer,buffer,anim->curlp.nBytes+(anim->curlp.nRecords*2));
}
}
//****************************************************************************
//
// CPlayRunSkipDump ()
// - This version of the decompressor is here for portability to non PC's
//
//****************************************************************************
void CPlayRunSkipDump (byte *srcP, byte *dstP)
{
int8_t cnt;
uint16 wordCnt;
byte pixel;
nextOp:
cnt = (int8_t ) *srcP++;
//printf("op %d", cnt);
if (cnt > 0)
goto dump; /* dump following bytes */
if (cnt == 0)
goto run; /* repeating sequence */
cnt -= 0x80;
if (cnt == 0)
goto longOp;
/* shortSkip */
dstP += cnt; /* adding 7-bit count to 32-bit pointer */
goto nextOp;
dump:
do
{
*dstP++ = *srcP++;
} while (--cnt);
goto nextOp;
run:
wordCnt = (byte)*srcP++; /* 8-bit unsigned count */
pixel = *srcP++;
do
{
*dstP++ = pixel;
} while (--wordCnt);
goto nextOp;
longOp:
//printf("longop");
//wordCnt = *((uint16 *)srcP);
wordCnt = *srcP | (*(srcP+1) << 8);
srcP += sizeof(uint16);
if ((int16)wordCnt <= 0)
goto notLongSkip; /* Do SIGNED test. */
/* longSkip. */
dstP += wordCnt;
goto nextOp;
notLongSkip:
if (wordCnt == 0)
goto stop;
wordCnt -= 0x8000; /* Remove sign bit. */
if (wordCnt >= 0x4000)
goto longRun;
/* longDump. */
do
{
*dstP++ = *srcP++;
} while (--wordCnt);
goto nextOp;
longRun:
wordCnt -= 0x4000; /* Clear "longRun" bit. */
pixel = *srcP++;
do
{
*dstP++ = pixel;
} while (--wordCnt);
goto nextOp;
stop: /* all done */
;
}
//****************************************************************************
//
// renderframe ()
// - draw the frame sepcified from the large page in the buffer pointed to
//
//****************************************************************************
void renderframe (uint16 framenumber, uint16 *pagepointer)
{
uint16 offset=0;
uint16 i;
uint16 destframe;
byte *ppointer;
CheckAnimStarted ( "renderframe" );
destframe = framenumber - anim->curlp.baseRecord;
for(i = 0; i < destframe; i++)
offset += readLE16(pagepointer + i);
ppointer = (byte *)pagepointer;
ppointer+=anim->curlp.nRecords*2+offset;
//rb->splash(HZ, "point 1");
if(ppointer[1])
{
ppointer += 4;
uint16_t val = readLE16(ppointer + 2);
//rb->splashf(HZ, "val=%d", val);
ppointer += val + (val & 1);
//uint16_t val = readLE16(((uint16_t*)ppointer) + 1);
//ppointer += (4 + ( ( val + (val & 1 ))));
}
else
ppointer+=4;
//rb->splashf(HZ, "point 2 (d = %d)", (char*)ppointer - (char*)pagepointer);
CPlayRunSkipDump (ppointer, anim->imagebuffer);
}
//****************************************************************************
//
// drawframe ()
// - high level frame draw routine
//
//****************************************************************************
void drawframe (uint16 framenumber)
{
//rb->splashf(HZ, "draw %d", framenumber);
CheckAnimStarted ( "drawframe" );
loadpage(findpage(framenumber), anim->thepage);
//rb->splashf(HZ, "page: %08x", crc32(anim->thepage, sizeof(anim->thepage)));
renderframe(framenumber, anim->thepage);
//rb->splashf(HZ, "image: %08x", crc32(anim->imagebuffer, sizeof(anim->imagebuffer)));
}
//****************************************************************************
//
// ANIM_LoadAnim ()
//
//****************************************************************************
void ANIM_LoadAnim (byte * buffer)
{
uint16 i;
int32 size;
if (!Anim_Started) Anim_Started = true;
anim->buffer = buffer;
anim->curlpnum = 0xffff;
anim->currentframe = -1;
size = sizeof(lpfileheader);
assert(sizeof(lpfileheader) == 128);
assert(sizeof(lp_descriptor) == 6);
assert(sizeof(anim->LpArray) == 1536);
memcpy(&anim->lpheader, buffer, size );
buffer += size+128;
// load the color palette
for (i = 0; i < 768; i += 3)
{
anim->pal[i+2] = *buffer++;
anim->pal[i+1] = *buffer++;
anim->pal[i] = *buffer++;
buffer++;
}
// read in large page descriptors
size = sizeof(anim->LpArray);
memcpy(&anim->LpArray,buffer,size);
}
//****************************************************************************
//
// ANIM_FreeAnim ()
//
//****************************************************************************
void ANIM_FreeAnim ( void )
{
if (Anim_Started)
{
// SafeFree(anim);
Anim_Started = false;
}
}
//****************************************************************************
//
// ANIM_NumFrames ()
//
//****************************************************************************
int32 ANIM_NumFrames ( void )
{
CheckAnimStarted ( "NumFrames" );
return anim->lpheader.nRecords;
}
//****************************************************************************
//
// ANIM_DrawFrame ()
//
//****************************************************************************
byte * ANIM_DrawFrame (int32 framenumber)
{
int32 cnt;
CheckAnimStarted ( "DrawFrame" );
if ((anim->currentframe != -1) && (anim->currentframe<=framenumber))
{
for (cnt = anim->currentframe; cnt < framenumber; cnt++)
drawframe (cnt);
}
else
{
for (cnt = 0; cnt < framenumber; cnt++)
drawframe (cnt);
}
anim->currentframe = framenumber;
return anim->imagebuffer;
}
//****************************************************************************
//
// ANIM_GetPalette ()
//
//****************************************************************************
byte * ANIM_GetPalette ( void )
{
CheckAnimStarted ( "GetPalette" );
return anim->pal;
}

View file

@ -0,0 +1,155 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
aint32_t with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
//
// ANIMLIB.H
//
/////////////////////////////////////////////////////////////////////////////
#ifndef _animlib_public_
#define _animlib_public_
#ifdef __cplusplus
extern "C" {
#endif
// structure declarations for deluxe animate large page files */
typedef struct
{
uint32 id; // 4 character ID == "LPF " */
uint16 maxLps; // max # largePages allowed. 256 FOR NOW. */
uint16 nLps; // # largePages in this file. */
uint32 nRecords; // # records in this file. 65534 is current limit plus */
// one for last-to-first delta for looping the animation */
uint16 maxRecsPerLp; // # records permitted in an lp. 256 FOR NOW. */
uint16 lpfTableOffset; // Absolute Seek position of lpfTable. 1280 FOR NOW.
// The lpf Table is an array of 256 large page structures
// that is used to facilitate finding records in an anim
// file without having to seek through all of the Large
// Pages to find which one a specific record lives in. */
uint32 contentType; // 4 character ID == "ANIM" */
uint16 width; // Width of screen in pixels. */
uint16 height; // Height of screen in pixels. */
byte variant; // 0==ANIM. */
byte version; // 0==frame rate is multiple of 18 cycles/sec.
// 1==frame rate is multiple of 70 cycles/sec. */
byte hasLastDelta; // 1==Last record is a delta from last-to-first frame. */
byte lastDeltaValid; // 0==The last-to-first delta (if present) hasn't been
// updated to match the current first&last frames, so it
// should be ignored. */
byte pixelType; // /* 0==256 color. */
byte CompressionType;// /* 1==(RunSkipDump) Only one used FOR NOW. */
byte otherRecsPerFrm;// /* 0 FOR NOW. */
byte bitmaptype; // /* 1==320x200, 256-color. Only one implemented so far. */
byte recordTypes[32];// /* Not yet implemented. */
uint32 nFrames; // /* In case future version adds other records at end of
// file, we still know how many actual frames.
// NOTE: DOES include last-to-first delta when present. */
uint16 framesPerSecond; // Number of frames to play per second. */
uint16 pad2[29]; // 58 bytes of filler to round up to 128 bytes total. */
} __attribute__ ((packed)) lpfileheader;
// this is the format of a large page structure
typedef struct
{
uint16 baseRecord; // Number of first record in this large page.
uint16 nRecords; // Number of records in lp.
// bit 15 of "nRecords" == "has continuation from previous lp".
// bit 14 of "nRecords" == "final record continues on next lp".
uint16 nBytes; // Total number of bytes of contents, excluding header.
} __attribute__ ((packed)) lp_descriptor;
typedef struct
{
uint16 framecount; // current frame of anim
lpfileheader lpheader; // file header will be loaded into this structure
lp_descriptor LpArray[256]; // arrays of large page structs used to find frames
uint16 curlpnum; // initialize to an invalid Large page number
lp_descriptor curlp; // header of large page currently in memory
uint16 thepage[0x8000]; // buffer where current large page is loaded
byte imagebuffer[0x10000]; // buffer where anim frame is decoded
byte * buffer;
byte pal[768];
int32 currentframe;
} __attribute__ ((packed)) anim_t;
//****************************************************************************
//
// ANIM_LoadAnim ()
//
// Setup internal anim data structure
//
//****************************************************************************
void ANIM_LoadAnim (byte * buffer);
//****************************************************************************
//
// ANIM_FreeAnim ()
//
// Free up internal anim data structure
//
//****************************************************************************
void ANIM_FreeAnim ( void );
//****************************************************************************
//
// ANIM_NumFrames ()
//
// returns the number of frames in the current anim
//
//****************************************************************************
int32 ANIM_NumFrames ( void );
//****************************************************************************
//
// ANIM_DrawFrame ()
//
// Draw the frame to a returned buffer
//
//****************************************************************************
byte * ANIM_DrawFrame (int32 framenumber);
//****************************************************************************
//
// ANIM_GetPalette ()
//
// return the palette of the anim
//****************************************************************************
byte * ANIM_GetPalette ( void );
extern anim_t * anim;
#ifdef __cplusplus
};
#endif
#endif

View file

@ -0,0 +1,546 @@
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# Game/src/audiolib/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/chocolate-duke3d
pkgincludedir = $(includedir)/chocolate-duke3d
pkglibdir = $(libdir)/chocolate-duke3d
pkglibexecdir = $(libexecdir)/chocolate-duke3d
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = Game/src/audiolib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
AM_V_AR = $(am__v_AR_$(V))
am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libaudio_a_AR = $(AR) $(ARFLAGS)
libaudio_a_LIBADD =
am_libaudio_a_OBJECTS = fx_man.$(OBJEXT) dsl.$(OBJEXT) \
ll_man.$(OBJEXT) multivoc.$(OBJEXT) mv_mix.$(OBJEXT) \
mvreverb.$(OBJEXT) nodpmi.$(OBJEXT) pitch.$(OBJEXT) \
user.$(OBJEXT) usrhooks.$(OBJEXT)
libaudio_a_OBJECTS = $(am_libaudio_a_OBJECTS)
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libaudio_a_SOURCES)
DIST_SOURCES = $(libaudio_a_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/build-aux/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing aclocal-1.15
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 0
AUTOCONF = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing autoconf
AUTOHEADER = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing autoheader
AUTOMAKE = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing automake-1.15
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -Wall -Wno-pointer-sign -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-parentheses -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-unused-function -Wno-unused-result -fno-strict-aliasing -fno-aggressive-loop-optimizations -DPLATFORM_UNIX -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -g -O2
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
DEFS = -DPACKAGE_NAME=\"Chocolate\ Duke3D\" -DPACKAGE_TARNAME=\"chocolate-duke3d\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"Chocolate\ Duke3D\ 1.0\" -DPACKAGE_BUGREPORT=\"https://github.com/fabiensanglard/chocolate_duke3D/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"chocolate-duke3d\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ASSERT_H=1 -DHAVE_ENET_ENET_H=1
DEPDIR = .deps
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /usr/bin/grep -E
EXEEXT =
GREP = /usr/bin/grep
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS = -lSDL -lpthread -lSDL_mixer -lSDL -lpthread
LIBOBJS =
LIBS =
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/missing makeinfo
MKDIR_P = /usr/bin/mkdir -p
OBJEXT = o
PACKAGE = chocolate-duke3d
PACKAGE_BUGREPORT = https://github.com/fabiensanglard/chocolate_duke3D/issues
PACKAGE_NAME = Chocolate Duke3D
PACKAGE_STRING = Chocolate Duke3D 1.0
PACKAGE_TARNAME = chocolate-duke3d
PACKAGE_URL =
PACKAGE_VERSION = 1.0
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR =
PKG_CONFIG_PATH =
RANLIB = ranlib
SDL_CFLAGS = -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL
SDL_LIBS = -lSDL -lpthread
SDL_MIXER_CFLAGS = -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL
SDL_MIXER_LIBS = -lSDL_mixer -lSDL -lpthread
SET_MAKE =
SHELL = /bin/sh
STRIP =
VERSION = 1.0
WINDRES =
abs_builddir = /home/franklin/chocolate_duke3D/Game/src/audiolib
abs_srcdir = /home/franklin/chocolate_duke3D/Game/src/audiolib
abs_top_builddir = /home/franklin/chocolate_duke3D
abs_top_srcdir = /home/franklin/chocolate_duke3D
ac_ct_CC = gcc
am__include = include
am__leading_dot = .
am__quote =
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
bindir = ${exec_prefix}/bin
build_alias =
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host_alias =
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /home/franklin/chocolate_duke3D/build-aux/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias =
top_build_prefix = ../../../
top_builddir = ../../..
top_srcdir = ../../..
noinst_LIBRARIES = libaudio.a
libaudio_a_SOURCES = fx_man.c dsl.c ll_man.c multivoc.c mv_mix.c mvreverb.c nodpmi.c pitch.c user.c usrhooks.c
AM_CFLAGS = -I$(top_srcdir)/Engine/src
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Game/src/audiolib/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Game/src/audiolib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libaudio.a: $(libaudio_a_OBJECTS) $(libaudio_a_DEPENDENCIES) $(EXTRA_libaudio_a_DEPENDENCIES)
$(AM_V_at)-rm -f libaudio.a
$(AM_V_AR)$(libaudio_a_AR) libaudio.a $(libaudio_a_OBJECTS) $(libaudio_a_LIBADD)
$(AM_V_at)$(RANLIB) libaudio.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
include ./$(DEPDIR)/dsl.Po
include ./$(DEPDIR)/fx_man.Po
include ./$(DEPDIR)/ll_man.Po
include ./$(DEPDIR)/multivoc.Po
include ./$(DEPDIR)/mv_mix.Po
include ./$(DEPDIR)/mvreverb.Po
include ./$(DEPDIR)/nodpmi.Po
include ./$(DEPDIR)/pitch.Po
include ./$(DEPDIR)/user.Po
include ./$(DEPDIR)/usrhooks.Po
.c.o:
$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# $(AM_V_CC)source='$<' object='$@' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(COMPILE) -c -o $@ $<
.c.obj:
$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# $(AM_V_CC)source='$<' object='$@' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,4 @@
noinst_LIBRARIES = libaudio.a
libaudio_a_SOURCES = fx_man.c dsl.c ll_man.c multivoc.c mv_mix.c mvreverb.c nodpmi.c pitch.c user.c usrhooks.c
AM_CFLAGS = -I$(top_srcdir)/Engine/src

View file

@ -0,0 +1,546 @@
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = Game/src/audiolib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
AM_V_AR = $(am__v_AR_@AM_V@)
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libaudio_a_AR = $(AR) $(ARFLAGS)
libaudio_a_LIBADD =
am_libaudio_a_OBJECTS = fx_man.$(OBJEXT) dsl.$(OBJEXT) \
ll_man.$(OBJEXT) multivoc.$(OBJEXT) mv_mix.$(OBJEXT) \
mvreverb.$(OBJEXT) nodpmi.$(OBJEXT) pitch.$(OBJEXT) \
user.$(OBJEXT) usrhooks.$(OBJEXT)
libaudio_a_OBJECTS = $(am_libaudio_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libaudio_a_SOURCES)
DIST_SOURCES = $(libaudio_a_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/build-aux/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_LIBS = @SDL_LIBS@
SDL_MIXER_CFLAGS = @SDL_MIXER_CFLAGS@
SDL_MIXER_LIBS = @SDL_MIXER_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
WINDRES = @WINDRES@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LIBRARIES = libaudio.a
libaudio_a_SOURCES = fx_man.c dsl.c ll_man.c multivoc.c mv_mix.c mvreverb.c nodpmi.c pitch.c user.c usrhooks.c
AM_CFLAGS = -I$(top_srcdir)/Engine/src
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Game/src/audiolib/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Game/src/audiolib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libaudio.a: $(libaudio_a_OBJECTS) $(libaudio_a_DEPENDENCIES) $(EXTRA_libaudio_a_DEPENDENCIES)
$(AM_V_at)-rm -f libaudio.a
$(AM_V_AR)$(libaudio_a_AR) libaudio.a $(libaudio_a_OBJECTS) $(libaudio_a_LIBADD)
$(AM_V_at)$(RANLIB) libaudio.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fx_man.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ll_man.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multivoc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mv_mix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mvreverb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nodpmi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pitch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usrhooks.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,174 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef ___AL_MIDI_H
#define ___AL_MIDI_H
#define NO_ADLIB_DETECTION "NOAL"
#define STEREO_DETUNE 5
#define lobyte( num ) ( ( unsigned )*( ( char * )&( num ) ) )
#define hibyte( num ) ( ( unsigned )*( ( ( char * )&( num ) ) + 1 ) )
#define AL_VoiceNotFound -1
#define alFreqH 0xb0
#define alEffects 0xbd
/* Number of slots for the voices on the chip */
#define NumChipSlots 18
#define NUM_VOICES 9
#define NUM_CHANNELS 16
#define NOTE_ON 0x2000 /* Used to turn note on or toggle note */
#define NOTE_OFF 0x0000
#define MAX_VELOCITY 0x7f
#define MAX_OCTAVE 7
#define MAX_NOTE ( MAX_OCTAVE * 12 + 11 )
#define FINETUNE_MAX 31
#define FINETUNE_RANGE ( FINETUNE_MAX + 1 )
#define PITCHBEND_CENTER 1638400
#define note_off 0x80
#define note_on 0x90
#define poly_aftertouch 0xa0
#define control_change 0xb0
#define program_chng 0xc0
#define channel_aftertouch 0xd0
#define pitch_wheel 0xe0
#define MIDI_VOLUME 7
#define MIDI_PAN 10
#define MIDI_DETUNE 94
#define MIDI_ALL_NOTES_OFF 0x7B
#define MIDI_RESET_ALL_CONTROLLERS 0x79
#define MIDI_RPN_MSB 100
#define MIDI_RPN_LSB 101
#define MIDI_DATAENTRY_MSB 6
#define MIDI_DATAENTRY_LSB 38
#define MIDI_PITCHBEND_RPN 0
enum cromatic_scale
{
C = 0x157,
C_SHARP = 0x16B,
D_FLAT = 0x16B,
D = 0x181,
D_SHARP = 0x198,
E_FLAT = 0x198,
E = 0x1B0,
F_FLAT = 0x1B0,
E_SHARP = 0x1CA,
F = 0x1CA,
F_SHARP = 0x1E5,
G_FLAT = 0x1E5,
G = 0x202,
G_SHARP = 0x220,
A_FLAT = 0x220,
A = 0x241,
A_SHARP = 0x263,
B_FLAT = 0x263,
B = 0x287,
C_FLAT = 0x287,
B_SHARP = 0x2AE,
};
/* Definition of octave information to be ORed onto F-Number */
enum octaves
{
OCTAVE_0 = 0x0000,
OCTAVE_1 = 0x0400,
OCTAVE_2 = 0x0800,
OCTAVE_3 = 0x0C00,
OCTAVE_4 = 0x1000,
OCTAVE_5 = 0x1400,
OCTAVE_6 = 0x1800,
OCTAVE_7 = 0x1C00
};
typedef struct VOICE
{
struct VOICE *next;
struct VOICE *prev;
unsigned num;
unsigned key;
unsigned velocity;
unsigned channel;
unsigned pitchleft;
unsigned pitchright;
int timbre;
int port;
unsigned status;
} VOICE;
typedef struct
{
VOICE *start;
VOICE *end;
} VOICELIST;
typedef struct
{
VOICELIST Voices;
int Timbre;
int Pitchbend;
int KeyOffset;
unsigned KeyDetune;
unsigned Volume;
unsigned EffectiveVolume;
int Pan;
int Detune;
unsigned RPN;
short PitchBendRange;
short PitchBendSemiTones;
short PitchBendHundreds;
} CHANNEL;
typedef struct
{
unsigned char SAVEK[ 2 ];
unsigned char Level[ 2 ];
unsigned char Env1[ 2 ];
unsigned char Env2[ 2 ];
unsigned char Wave[ 2 ];
unsigned char Feedback;
signed char Transpose;
signed char Velocity;
} TIMBRE;
extern TIMBRE ADLIB_TimbreBank[ 256 ];
static void AL_ResetVoices( void );
static void AL_CalcPitchInfo( void );
static void AL_SetVoiceTimbre( int voice );
static void AL_SetVoiceVolume( int voice );
static int AL_AllocVoice( void );
static int AL_GetVoice( int channel, int key );
static void AL_SetVoicePitch( int voice );
static void AL_SetChannelVolume( int channel, int volume );
static void AL_SetChannelPan( int channel, int pan );
static void AL_SetChannelDetune( int channel, int detune );
#endif

View file

@ -0,0 +1,133 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: _BLASTER.H
author: James R. Dose
date: February 4, 1994
Private header for for BLASTER.C
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef ___BLASTER_H
#define ___BLASTER_H
#define VALID ( 1 == 1 )
#define INVALID ( !VALID )
#define TRUE ( 1 == 1 )
#define FALSE ( !TRUE )
#define YES ( 1 == 1 )
#define NO ( !YES )
#define lobyte( num ) ( ( int )*( ( char * )&( num ) ) )
#define hibyte( num ) ( ( int )*( ( ( char * )&( num ) ) + 1 ) )
#define BLASTER_MixerAddressPort 0x04
#define BLASTER_MixerDataPort 0x05
#define BLASTER_ResetPort 0x06
#define BLASTER_ReadPort 0x0A
#define BLASTER_WritePort 0x0C
#define BLASTER_DataAvailablePort 0x0E
#define BLASTER_Ready 0xAA
#define BLASTER_16BitDMAAck 0x0F
#define MIXER_DSP4xxISR_Ack 0x82
#define MIXER_DSP4xxISR_Enable 0x83
#define MIXER_MPU401_INT 0x4
#define MIXER_16BITDMA_INT 0x2
#define MIXER_8BITDMA_INT 0x1
#define MIXER_DisableMPU401Interrupts 0xB
#define MIXER_SBProOutputSetting 0x0E
#define MIXER_SBProStereoFlag 0x02
#define MIXER_SBProVoice 0x04
#define MIXER_SBProMidi 0x26
#define MIXER_SB16VoiceLeft 0x32
#define MIXER_SB16VoiceRight 0x33
#define MIXER_SB16MidiLeft 0x34
#define MIXER_SB16MidiRight 0x35
#define DSP_Version1xx 0x0100
#define DSP_Version2xx 0x0200
#define DSP_Version201 0x0201
#define DSP_Version3xx 0x0300
#define DSP_Version4xx 0x0400
#define DSP_SB16Version DSP_Version4xx
#define DSP_MaxNormalRate 22000
#define DSP_MaxHighSpeedRate 44000
#define DSP_8BitAutoInitRecord 0x2c
#define DSP_8BitHighSpeedAutoInitRecord 0x98
#define DSP_Old8BitADC 0x24
#define DSP_8BitAutoInitMode 0x1c
#define DSP_8BitHighSpeedAutoInitMode 0x90
#define DSP_SetBlockLength 0x48
#define DSP_Old8BitDAC 0x14
#define DSP_16BitDAC 0xB6
#define DSP_8BitDAC 0xC6
#define DSP_8BitADC 0xCe
#define DSP_SetTimeConstant 0x40
#define DSP_Set_DA_Rate 0x41
#define DSP_Set_AD_Rate 0x42
#define DSP_Halt8bitTransfer 0xd0
#define DSP_Continue8bitTransfer 0xd4
#define DSP_Halt16bitTransfer 0xd5
#define DSP_Continue16bitTransfer 0xd6
#define DSP_SpeakerOn 0xd1
#define DSP_SpeakerOff 0xd3
#define DSP_GetVersion 0xE1
#define DSP_Reset 0xFFFF
#define DSP_SignedBit 0x10
#define DSP_StereoBit 0x20
#define DSP_UnsignedMonoData 0x00
#define DSP_SignedMonoData ( DSP_SignedBit )
#define DSP_UnsignedStereoData ( DSP_StereoBit )
#define DSP_SignedStereoData ( DSP_SignedBit | DSP_StereoBit )
#define BlasterEnv_Address 'A'
#define BlasterEnv_Interrupt 'I'
#define BlasterEnv_8bitDma 'D'
#define BlasterEnv_16bitDma 'H'
#define BlasterEnv_Type 'T'
#define BlasterEnv_Midi 'P'
#define BlasterEnv_EmuAddress 'E'
#define CalcTimeConstant( rate, samplesize ) \
( ( 65536L - ( 256000000L / ( ( samplesize ) * ( rate ) ) ) ) >> 8 )
#define CalcSamplingRate( tc ) \
( 256000000L / ( 65536L - ( tc << 8 ) ) )
typedef struct
{
int IsSupported;
int HasMixer;
int MaxMixMode;
int MinSamplingRate;
int MaxSamplingRate;
} CARD_CAPABILITY;
#endif

View file

@ -0,0 +1,164 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
file: _GUSWAVE.H
author: James R. Dose
date: March 23, 1994
Private header for GUSWAVE.C
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef ___GUSWAVE_H
#define ___GUSWAVE_H
#define TRUE ( 1 == 1 )
#define FALSE ( !TRUE )
#define LOADDS _loadds
#define VOC_8BIT 0x0
#define VOC_CT4_ADPCM 0x1
#define VOC_CT3_ADPCM 0x2
#define VOC_CT2_ADPCM 0x3
#define VOC_16BIT 0x4
#define VOC_ALAW 0x6
#define VOC_MULAW 0x7
#define VOC_CREATIVE_ADPCM 0x200
#define MAX_BLOCK_LENGTH 0x8000
#define GF1BSIZE 896L /* size of buffer per wav on GUS */
//#define GF1BSIZE 512L /* size of buffer per wav on GUS */
//#define VOICES 8 /* maximum amount of concurrent wav files */
#define VOICES 2 /* maximum amount of concurrent wav files */
#define MAX_VOICES 32 /* This should always be 32 */
#define MAX_VOLUME 4095
#define BUFFER 2048U /* size of DMA buffer for patch loading */
typedef enum
{
Raw,
VOC,
DemandFeed,
WAV
} wavedata;
typedef enum
{
NoMoreData,
KeepPlaying,
SoundDone
} playbackstatus;
typedef volatile struct VoiceNode
{
struct VoiceNode *next;
struct VoiceNode *prev;
wavedata wavetype;
int bits;
playbackstatus ( *GetSound )( struct VoiceNode *voice );
int num;
unsigned long mem; /* location in ultrasound memory */
int Active; /* this instance in use */
int GF1voice; /* handle to active voice */
char *NextBlock;
char *LoopStart;
char *LoopEnd;
unsigned LoopCount;
unsigned long LoopSize;
unsigned long BlockLength;
unsigned long PitchScale;
unsigned char *sound;
unsigned long length;
unsigned long SamplingRate;
unsigned long RateScale;
int Playing;
int handle;
int priority;
void ( *DemandFeed )( char **ptr, unsigned long *length );
unsigned long callbackval;
int Volume;
int Pan;
}
VoiceNode;
typedef struct
{
VoiceNode *start;
VoiceNode *end;
}
voicelist;
typedef volatile struct voicestatus
{
VoiceNode *Voice;
int playing;
}
voicestatus;
typedef struct
{
char RIFF[ 4 ];
unsigned long file_size;
char WAVE[ 4 ];
char fmt[ 4 ];
unsigned long format_size;
} __attribute__((packed)) riff_header;
typedef struct
{
unsigned short wFormatTag;
unsigned short nChannels;
unsigned long nSamplesPerSec;
unsigned long nAvgBytesPerSec;
unsigned short nBlockAlign;
unsigned short nBitsPerSample;
} __attribute__((packed)) format_header;
typedef struct
{
unsigned char DATA[ 4 ];
unsigned long size;
} __attribute__((packed)) data_header;
playbackstatus GUSWAVE_GetNextVOCBlock( VoiceNode *voice );
VoiceNode *GUSWAVE_GetVoice( int handle );
int GUSWAVE_Play( VoiceNode *voice, int angle, int volume, int channels );
VoiceNode *GUSWAVE_AllocVoice( int priority );
static int GUSWAVE_InitVoices( void );
#endif

View file

@ -0,0 +1,290 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: _MIDI.H
author: James R. Dose
date: May 25, 1994
Private header for MIDI.C. Midi song file playback routines.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef ___MIDI_H
#define ___MIDI_H
#define RELATIVE_BEAT( measure, beat, tick ) \
( ( tick ) + ( ( beat ) << 9 ) + ( ( measure ) << 16 ) )
//Bobby Prince thinks this may be 100
//#define GENMIDI_DefaultVolume 100
#define GENMIDI_DefaultVolume 90
#define MAX_FORMAT 1
#define NUM_MIDI_CHANNELS 16
#define TIME_PRECISION 16
#define MIDI_HEADER_SIGNATURE 0x6468544d // "MThd"
#define MIDI_TRACK_SIGNATURE 0x6b72544d // "MTrk"
#define MIDI_VOLUME 7
#define MIDI_PAN 10
#define MIDI_DETUNE 94
#define MIDI_RHYTHM_CHANNEL 9
#define MIDI_RPN_MSB 100
#define MIDI_RPN_LSB 101
#define MIDI_DATAENTRY_MSB 6
#define MIDI_DATAENTRY_LSB 38
#define MIDI_PITCHBEND_MSB 0
#define MIDI_PITCHBEND_LSB 0
#define MIDI_RUNNING_STATUS 0x80
#define MIDI_NOTE_OFF 0x8
#define MIDI_NOTE_ON 0x9
#define MIDI_POLY_AFTER_TCH 0xA
#define MIDI_CONTROL_CHANGE 0xB
#define MIDI_PROGRAM_CHANGE 0xC
#define MIDI_AFTER_TOUCH 0xD
#define MIDI_PITCH_BEND 0xE
#define MIDI_SPECIAL 0xF
#define MIDI_SYSEX 0xF0
#define MIDI_SYSEX_CONTINUE 0xF7
#define MIDI_META_EVENT 0xFF
#define MIDI_END_OF_TRACK 0x2F
#define MIDI_TEMPO_CHANGE 0x51
#define MIDI_TIME_SIGNATURE 0x58
#define MIDI_RESET_ALL_CONTROLLERS 0x79
#define MIDI_ALL_NOTES_OFF 0x7b
#define MIDI_MONO_MODE_ON 0x7E
#define MIDI_SYSTEM_RESET 0xFF
#define GET_NEXT_EVENT( track, data ) \
( data ) = *( track )->pos; \
( track )->pos += 1
#define GET_MIDI_CHANNEL( event ) ( ( event ) & 0xf )
#define GET_MIDI_COMMAND( event ) ( ( event ) >> 4 )
#define EMIDI_INFINITE -1
#define EMIDI_END_LOOP_VALUE 127
#define EMIDI_ALL_CARDS 127
#define EMIDI_INCLUDE_TRACK 110
#define EMIDI_EXCLUDE_TRACK 111
#define EMIDI_PROGRAM_CHANGE 112
#define EMIDI_VOLUME_CHANGE 113
#define EMIDI_CONTEXT_START 114
#define EMIDI_CONTEXT_END 115
#define EMIDI_LOOP_START 116
#define EMIDI_LOOP_END 117
#define EMIDI_SONG_LOOP_START 118
#define EMIDI_SONG_LOOP_END 119
#define EMIDI_GeneralMIDI 0
#define EMIDI_SoundCanvas 1
#define EMIDI_AWE32 2
#define EMIDI_WaveBlaster 3
#define EMIDI_SoundBlaster 4
#define EMIDI_ProAudio 5
#define EMIDI_SoundMan16 6
#define EMIDI_Adlib 7
#define EMIDI_Soundscape 8
#define EMIDI_Ultrasound 9
#define EMIDI_AffectsCurrentCard( c, type ) \
( ( ( c ) == EMIDI_ALL_CARDS ) || ( ( c ) == ( type ) ) )
#define EMIDI_NUM_CONTEXTS 7
typedef struct
{
unsigned char *pos;
unsigned char *loopstart;
short loopcount;
short RunningStatus;
unsigned time;
long FPSecondsPerTick;
short tick;
short beat;
short measure;
short BeatsPerMeasure;
short TicksPerBeat;
short TimeBase;
long delay;
short active;
} songcontext;
typedef struct
{
unsigned char *start;
unsigned char *pos;
long delay;
short active;
short RunningStatus;
short currentcontext;
songcontext context[ EMIDI_NUM_CONTEXTS ];
char EMIDI_IncludeTrack;
char EMIDI_ProgramChange;
char EMIDI_VolumeChange;
} track;
static long _MIDI_ReadNumber( void *from, size_t size );
static long _MIDI_ReadDelta( track *ptr );
static void _MIDI_ResetTracks( void );
static void _MIDI_AdvanceTick( void );
static void _MIDI_MetaEvent( track *Track );
static void _MIDI_SysEx( track *Track );
static int _MIDI_InterpretControllerInfo( track *Track, int TimeSet,
int channel, int c1, int c2 );
//static
void _MIDI_ServiceRoutine( task *Task );
static int _MIDI_SendControlChange( int channel, int c1, int c2 );
static void _MIDI_SetChannelVolume( int channel, int volume );
static void _MIDI_SendChannelVolumes( void );
static int _MIDI_ProcessNextTick( void );
static void _MIDI_InitEMIDI( void );
/*
if ( c1 == EMIDI_LOOP_START )
{
if ( c2 == 0 )
{
Track->context[ 0 ].loopcount = EMIDI_INFINITE;
}
else
{
Track->context[ 0 ].loopcount = c2;
}
Track->context[ 0 ].pos = Track->pos;
Track->context[ 0 ].loopstart = Track->pos;
Track->context[ 0 ].RunningStatus = Track->RunningStatus;
Track->context[ 0 ].time = _MIDI_Time;
Track->context[ 0 ].FPSecondsPerTick = _MIDI_FPSecondsPerTick;
Track->context[ 0 ].tick = _MIDI_Tick;
Track->context[ 0 ].beat = _MIDI_Beat;
Track->context[ 0 ].measure = _MIDI_Measure;
Track->context[ 0 ].BeatsPerMeasure = _MIDI_BeatsPerMeasure;
Track->context[ 0 ].TicksPerBeat = _MIDI_TicksPerBeat;
Track->context[ 0 ].TimeBase = _MIDI_TimeBase;
break;
}
if ( ( c1 == EMIDI_LOOP_END ) &&
( c2 == EMIDI_END_LOOP_VALUE ) )
{
if ( ( Track->context[ 0 ].loopstart != NULL ) &&
( Track->context[ 0 ].loopcount != 0 ) )
{
if ( Track->context[ 0 ].loopcount != EMIDI_INFINITE )
{
Track->context[ 0 ].loopcount--;
}
Track->pos = Track->context[ 0 ].loopstart;
Track->RunningStatus = Track->context[ 0 ].RunningStatus;
if ( !TimeSet )
{
_MIDI_Time = Track->context[ 0 ].time;
_MIDI_FPSecondsPerTick = Track->context[ 0 ].FPSecondsPerTick;
_MIDI_Tick = Track->context[ 0 ].tick;
_MIDI_Beat = Track->context[ 0 ].beat;
_MIDI_Measure = Track->context[ 0 ].measure;
_MIDI_BeatsPerMeasure = Track->context[ 0 ].BeatsPerMeasure;
_MIDI_TicksPerBeat = Track->context[ 0 ].TicksPerBeat;
_MIDI_TimeBase = Track->context[ 0 ].TimeBase;
TimeSet = TRUE;
}
}
break;
}
if ( c1 == MIDI_MONO_MODE_ON )
{
Track->pos++;
}
if ( ( c1 == MIDI_VOLUME ) && ( !Track->EMIDI_VolumeChange ) )
{
_MIDI_SetChannelVolume( channel, c2 );
break;
}
else if ( ( c1 == EMIDI_VOLUME_CHANGE ) &&
( Track->EMIDI_VolumeChange ) )
{
_MIDI_SetChannelVolume( channel, c2 );
break;
}
if ( ( c1 == EMIDI_PROGRAM_CHANGE ) &&
( Track->EMIDI_ProgramChange ) )
{
_MIDI_Funcs->ProgramChange( channel, MIDI_PatchMap[ c2 & 0x7f ] );
break;
}
if ( c1 == EMIDI_CONTEXT_START )
{
break;
}
if ( c1 == EMIDI_CONTEXT_END )
{
if ( ( Track->currentcontext != _MIDI_Context ) ||
( Track->context[ _MIDI_Context ].pos == NULL )
{
break;
}
Track->currentcontext = _MIDI_Context;
Track->context[ 0 ].loopstart = Track->context[ _MIDI_Context ].loopstart;
Track->context[ 0 ].loopcount = Track->context[ _MIDI_Context ].loopcount;
Track->pos = Track->context[ _MIDI_Context ].pos;
Track->RunningStatus = Track->context[ _MIDI_Context ].RunningStatus;
if ( TimeSet )
{
break;
}
_MIDI_Time = Track->context[ _MIDI_Context ].time;
_MIDI_FPSecondsPerTick = Track->context[ _MIDI_Context ].FPSecondsPerTick;
_MIDI_Tick = Track->context[ _MIDI_Context ].tick;
_MIDI_Beat = Track->context[ _MIDI_Context ].beat;
_MIDI_Measure = Track->context[ _MIDI_Context ].measure;
_MIDI_BeatsPerMeasure = Track->context[ _MIDI_Context ].BeatsPerMeasure;
_MIDI_TicksPerBeat = Track->context[ _MIDI_Context ].TicksPerBeat;
_MIDI_TimeBase = Track->context[ _MIDI_Context ].TimeBase;
TimeSet = TRUE;
break;
}
if ( _MIDI_Funcs->ControlChange )
{
_MIDI_Funcs->ControlChange( channel, c1, c2 );
}
*/
#endif

View file

@ -0,0 +1,318 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
file: _MULTIVC.H
author: James R. Dose
date: December 20, 1993
Private header for MULTIVOC.C
(c) Copyright 1993 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef ___MULTIVC_H
#define ___MULTIVC_H
#define TRUE ( 1 == 1 )
#define FALSE ( !TRUE )
#define VOC_8BIT 0x0
#define VOC_CT4_ADPCM 0x1
#define VOC_CT3_ADPCM 0x2
#define VOC_CT2_ADPCM 0x3
#define VOC_16BIT 0x4
#define VOC_ALAW 0x6
#define VOC_MULAW 0x7
#define VOC_CREATIVE_ADPCM 0x200
#define T_SIXTEENBIT_STEREO 0
#define T_8BITS 1
#define T_MONO 2
#define T_16BITSOURCE 4
#define T_LEFTQUIET 8
#define T_RIGHTQUIET 16
#define T_DEFAULT T_SIXTEENBIT_STEREO
#define MV_MaxPanPosition 31
#define MV_NumPanPositions ( MV_MaxPanPosition + 1 )
#define MV_MaxTotalVolume 255
//#define MV_MaxVolume 63
//#define MV_NumVoices 8
#define MIX_VOLUME( volume ) \
( ( max( 0, min( ( volume ), 255 ) ) * ( MV_MaxVolume + 1 ) ) >> 8 )
// ( ( max( 0, min( ( volume ), 255 ) ) ) >> 2 )
//#define SILENCE_16BIT 0x80008000
#define SILENCE_16BIT 0
#define SILENCE_8BIT 0x80808080
//#define SILENCE_16BIT_PAS 0
#define MixBufferSize 256
#define NumberOfBuffers 16
#define TotalBufferSize ( MixBufferSize * NumberOfBuffers )
#define PI 3.1415926536
typedef enum
{
Raw,
VOC,
DemandFeed,
WAV
} wavedata;
typedef enum
{
NoMoreData,
KeepPlaying
} playbackstatus;
typedef struct VoiceNode
{
struct VoiceNode *next;
struct VoiceNode *prev;
wavedata wavetype;
char bits;
playbackstatus ( *GetSound )( struct VoiceNode *voice );
void ( *mix )( unsigned long position, unsigned long rate,
uint8_t *start, unsigned long length );
uint8_t *NextBlock;
uint8_t *LoopStart;
uint8_t *LoopEnd;
unsigned LoopCount;
unsigned long LoopSize;
unsigned long BlockLength;
unsigned long PitchScale;
unsigned long FixedPointBufferSize;
uint8_t *sound;
unsigned long length;
uint32_t SamplingRate;
unsigned long RateScale;
unsigned long position;
int Playing;
int handle;
int priority;
void ( *DemandFeed )( char **ptr, uint32_t *length );
#if 0
short *LeftVolume;
short *RightVolume;
#else
int LeftVolume;
int RightVolume;
#endif
int GLast;
int GPos;
int GVal[4];
unsigned long callbackval;
} VoiceNode;
typedef struct
{
VoiceNode *start;
VoiceNode *end;
} VList;
typedef struct
{
unsigned char left;
unsigned char right;
} Pan;
typedef signed short MONO16;
typedef signed char MONO8;
typedef struct
{
MONO16 left;
MONO16 right;
// unsigned short left;
// unsigned short right;
} STEREO16;
typedef struct
{
MONO16 left;
MONO16 right;
} SIGNEDSTEREO16;
typedef struct
{
// MONO8 left;
// MONO8 right;
char left;
char right;
} STEREO8;
typedef struct
{
char RIFF[ 4 ];
unsigned long file_size;
char WAVE[ 4 ];
char fmt[ 4 ];
unsigned long format_size;
} riff_header;
typedef struct
{
unsigned short wFormatTag;
unsigned short nChannels;
unsigned long nSamplesPerSec;
unsigned long nAvgBytesPerSec;
unsigned short nBlockAlign;
unsigned short nBitsPerSample;
} format_header;
typedef struct
{
char DATA[ 4 ];
unsigned long size;
} data_header;
typedef MONO8 VOLUME8[ 256 ];
typedef MONO16 VOLUME16[ 256 ];
// typedef char HARSH_CLIP_TABLE_8[ MV_NumVoices * 256 ];
//static void MV_Mix( VoiceNode *voice);
//static void MV_PlayVoice( VoiceNode *voice );
//static void MV_StopVoice( VoiceNode *voice );
//static void MV_ServiceVoc( void );
//static playbackstatus MV_GetNextVOCBlock( VoiceNode *voice );
//static playbackstatus MV_GetNextDemandFeedBlock( VoiceNode *voice );
//static playbackstatus MV_GetNextRawBlock( VoiceNode *voice );
//static playbackstatus MV_GetNextWAVBlock( VoiceNode *voice );
//static void MV_ServiceRecord( void );
//static VoiceNode *MV_GetVoice( int handle );
//static VoiceNode *MV_AllocVoice( int priority );
//#if 0
//static short *MV_GetVolumeTable( int vol );
//#else
//static int MV_GetVolumeTable( int vol );
//#endif
void MV_SetVoiceMixMode( VoiceNode *voice );
//static void MV_SetVoicePitch( VoiceNode *voice, unsigned long rate, int pitchoffset );
//static void MV_CalcVolume( int MaxLevel );
//static void MV_CalcPanTable( void );
#ifdef PLAT_DOS
#define ATR_INDEX 0x3c0
#define STATUS_REGISTER_1 0x3da
#define SetBorderColor(color) \
{ \
inp (STATUS_REGISTER_1); \
outp (ATR_INDEX,0x31); \
outp (ATR_INDEX,color); \
}
#endif
void ClearBuffer_DW( void *ptr, unsigned data, int length );
#ifdef PLAT_DOS
#pragma aux ClearBuffer_DW = \
"cld", \
"push es", \
"push ds", \
"pop es", \
"rep stosd", \
"pop es", \
parm [ edi ] [ eax ] [ ecx ] modify exact [ ecx edi ];
#endif
/*
void MV_Mix8BitMono( unsigned long position, unsigned long rate,
const char *start, unsigned long length );
void MV_Mix8BitStereo( unsigned long position,
unsigned long rate, const char *start, unsigned long length );
void MV_Mix16BitMono( unsigned long position,
unsigned long rate, const char *start, unsigned long length );
void MV_Mix16BitStereo( unsigned long position,
unsigned long rate, const char *start, unsigned long length );
void MV_Mix16BitMono16( unsigned long position,
unsigned long rate, const char *start, unsigned long length );
void MV_Mix8BitMono16( unsigned long position, unsigned long rate,
const char *start, unsigned long length );
void MV_Mix8BitStereo16( unsigned long position,
unsigned long rate, const char *start, unsigned long length );
void MV_Mix16BitStereo16( unsigned long position,
unsigned long rate, const char *start, unsigned long length );
*/
void MV_MixFPMono8( unsigned long position, unsigned long rate,
const char *start, unsigned long length );
void MV_MixFPMono16( unsigned long position, unsigned long rate,
const char *start, unsigned long length );
void MV_MixFPStereo8( unsigned long position, unsigned long rate,
const char *start, unsigned long length );
void MV_MixFPStereo16( unsigned long position, unsigned long rate,
const char *start, unsigned long length );
void MV_FPReverb(int volume);
void MV_FPReverbFree(void);
void MV_16BitDownmix(char *dest, int count);
void MV_8BitDownmix(char *dest, int count);
/*
void MV_16BitReverbFast( const char *src, char *dest, int count, int shift );
void MV_8BitReverbFast( const signed char *src, signed char *dest, int count, int shift );
*/
#ifdef PLAT_DOS
#pragma aux MV_16BitReverb parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
#pragma aux MV_8BitReverb parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
#pragma aux MV_16BitReverbFast parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
#pragma aux MV_8BitReverbFast parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
#endif
#endif

View file

@ -0,0 +1,250 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: _PAS16.H
author: James R. Dose
date: March 27, 1994
Private header for for PAS16.C
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef ___PAS16_H
#define ___PAS16_H
#define TRUE ( 1 == 1 )
#define FALSE ( !TRUE )
#define VALID ( 1 == 1 )
#define INVALID ( !VALID )
#define lobyte( num ) ( ( int )*( ( char * )&( num ) ) )
#define hibyte( num ) ( ( int )*( ( ( char * )&( num ) ) + 1 ) )
#define STEREO 1
#define SIXTEEN_BIT 2
#define MONO_8BIT 0
#define STEREO_8BIT ( STEREO )
#define MONO_16BIT ( SIXTEEN_BIT )
#define STEREO_16BIT ( STEREO | SIXTEEN_BIT )
#define PAS_MaxMixMode STEREO_16BIT
#define MONO_8BIT_SAMPLE_SIZE 1
#define MONO_16BIT_SAMPLE_SIZE 2
#define STEREO_8BIT_SAMPLE_SIZE ( 2 * MONO_8BIT_SAMPLE_SIZE )
#define STEREO_16BIT_SAMPLE_SIZE ( 2 * MONO_16BIT_SAMPLE_SIZE )
#define PAS_RevisionBits 0xe0
#define AudioFilterControl 0xb8a
#define InterruptControl 0xb8b
#define InterruptStatus 0xb89
#define PCMDataRegister 0xf88
#define CrossChannelControl 0xf8a
#define SampleRateTimer 0x1388
#define SampleBufferCount 0x1389
#define LocalSpeakerTimerCount 0x138a
#define LocalTimerControl 0x138b
#define SampleSizeConfiguration 0x8389
#define AudioMuteFlag 0x20
#define SampleRateTimerGateFlag 0x40
#define SampleBufferCountGateFlag 0x80
#define SampleRateInterruptFlag 0x04
#define SampleBufferInterruptFlag 0x08
#define PAS_SampleSizeMask 0xf3
#define PAS_SignedSampleMask 0xe3
#define PAS_16BitSampleFlag 0x04
#define PAS_UnsignedSampleFlag 0x10
//bSC2msbinv equ 00010000b ;; invert MSB from standard method
#define PAS_OverSamplingMask 0xfc
#define PAS_1xOverSampling 0x00
#define PAS_2xOverSampling 0x01
#define PAS_4xOverSampling 0x03
#define PAS_StereoFlag 0x20
#define PAS_AudioMuteFlag 0x20
#define DEFAULT_BASE ( 0x0388 ^ 0x388 ) /* default base I/O address */
#define ALT_BASE_1 ( 0x0384 ^ 0x388 ) /* first alternate address */
#define ALT_BASE_2 ( 0x038C ^ 0x388 ) /* second alternate address */
#define ALT_BASE_3 ( 0x0288 ^ 0x388 ) /* third alternate address */
#define PAS_DMAEnable 0x80
#define PAS_ChannelConnectMask 0x0f
#define PAS_PCMStartDAC 0xD0
#define PAS_PCMStartADC 0xC0
#define PAS_PCMStopMask 0x3f
#define RECORD 0
#define PLAYBACK 1
#define SelectSampleRateTimer 0x36 // 00110110b
#define SelectSampleBufferCount 0x74 // 01110100b
#define CalcTimeInterval( rate ) \
( 1193180UL / ( rate ) )
#define CalcSamplingRate( interval ) \
( 1193180UL / ( interval ) )
#define MV_Signature 0x4d56
#define MV_SoundInt 0x2f
#define MV_CheckForDriver 0xbc00
#define MV_GetVersion 0xbc01
#define MV_GetPointerToStateTable 0xbc02
#define MV_GetPointerToFunctionTable 0xbc03
#define MV_GetDmaIrqInt 0xbc04
#define MV_SendCommandStructure 0xbc05
#define MV_GetDriverMessage 0xbc06
#define MV_SetHotkeyScanCodes 0xbc0a
#define MV_GetPathToDriver 0xbc0b
#define OUTPUTMIXER 0x00 /* output mixer H/W select */
#define INPUTMIXER 0x40 /* input mixer select */
#define DEFMIXER -1 /* use last mixer selected */
/* left channel values */
#define L_FM 0x01
#define L_IMIXER 0x02
#define L_EXT 0x03
#define L_INT 0x04
#define L_MIC 0x05
#define L_PCM 0x06
#define L_SPEAKER 0x07
#define L_FREE 0x00
#define L_SBDAC 0x00
/* right channel values */
#define R_FM 0x08
#define R_IMIXER 0x09
#define R_EXT 0x0A
#define R_INT 0x0B
#define R_MIC 0x0C
#define R_PCM 0x0D
#define R_SPEAKER 0x0E
#define R_FREE 0x0F
#define R_SBDAC 0x0F
typedef struct
{
unsigned char sysspkrtmr; /* 42 System Speaker Timer Address */
unsigned char systmrctlr; /* 43 System Timer Control */
unsigned char sysspkrreg; /* 61 System Speaker Register */
unsigned char joystick; /* 201 Joystick Register */
unsigned char lfmaddr; /* 388 Left FM Synth Address */
unsigned char lfmdata; /* 389 Left FM Synth Data */
unsigned char rfmaddr; /* 38A Right FM Synth Address */
unsigned char rfmdata; /* 38B Right FM Synth Data */
unsigned char dfmaddr; /* 788 Dual FM Synth Address */
unsigned char dfmdata; /* 789 Dual FM Synth Data */
unsigned char RESRVD1[1]; /* reserved */
unsigned char paudiomixr; /* 78B Paralllel Audio Mixer Control*/
unsigned char audiomixr; /* B88 Audio Mixer Control */
unsigned char intrctlrst; /* B89 Interrupt Status */
unsigned char audiofilt; /* B8A Audio Filter Control */
unsigned char intrctlr; /* B8B Interrupt Control */
unsigned char pcmdata; /* F88 PCM Data I/O Register */
unsigned char RESRVD2; /* reserved */
unsigned char crosschannel; /* F8A Cross Channel */
unsigned char RESRVD3; /* reserved */
unsigned short samplerate; /* 1388 Sample Rate Timer */
unsigned short samplecnt; /* 1389 Sample Count Register */
unsigned short spkrtmr; /* 138A Shadow Speaker Timer Count */
unsigned char tmrctlr; /* 138B Shadow Speaker Timer Control */
unsigned char mdirqvect; /* 1788 MIDI IRQ Vector Register */
unsigned char mdsysctlr; /* 1789 MIDI System Control Register */
unsigned char mdsysstat; /* 178A MIDI IRQ Status Register */
unsigned char mdirqclr; /* 178B MIDI IRQ Clear Register */
unsigned char mdgroup1; /* 1B88 MIDI Group #1 Register */
unsigned char mdgroup2; /* 1B89 MIDI Group #2 Register */
unsigned char mdgroup3; /* 1B8A MIDI Group #3 Register */
unsigned char mdgroup4; /* 1B8B MIDI Group #4 Register */
} MVState;
typedef struct
{
unsigned long SetMixer;
unsigned long SetVolume;
unsigned long SetFilter;
unsigned long SetCrossChannel;
unsigned long GetMixer;
unsigned long GetVolume;
unsigned long GetFilter;
unsigned long GetCrossChannel;
unsigned long ReadSound;
unsigned long FMSplit;
} MVFunc;
int PAS_CheckForDriver( void );
MVState *PAS_GetStateTable( void );
MVFunc *PAS_GetFunctionTable( void );
int PAS_GetCardSettings( void );
void PAS_EnableInterrupt( void );
void PAS_DisableInterrupt( void );
void interrupt far PAS_ServiceInterrupt( void );
//void interrupt PAS_ServiceInterrupt( void );
void PAS_Write( int Register, int Data );
int PAS_Read( int Register );
void PAS_SetSampleRateTimer( void );
void PAS_SetSampleBufferCount( void );
int PAS_SetupDMABuffer( char *BufferPtr, int BufferSize, int mode );
int PAS_GetFilterSetting( int rate );
void PAS_BeginTransfer( int mode );
int PAS_TestAddress( int address );
int PAS_FindCard( void );
int PAS_CallMVFunction( unsigned long function, int ebx, int ecx, int edx );
void PAS_SaveState( void );
void PAS_RestoreState( void );
#pragma aux PAS_TestAddress = \
"mov dx, 0b8bh", \
"xor dx, ax", \
"in al, dx", \
"cmp al, 0ffh", \
"je TestExit", \
"mov ah, al", \
"xor al, 0e0h", \
"out dx, al", \
"jmp TestDelay1", \
"TestDelay1:", \
"jmp TestDelay2", \
"TestDelay2:", \
"in al, dx", \
"xchg al, ah", \
"out dx, al", \
"sub al, ah", \
"TestExit:", \
"and eax, 0ffh" \
parm [ eax ] modify exact [ eax dx ];
#endif

View file

@ -0,0 +1,136 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: _SNDSCAP.H
author: James R. Dose
date: October 26, 1994
Private header for SNDSCAPE.C
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef ___SNDSCAP_H
#define ___SNDSCAP_H
#define VALID ( 1 == 1 )
#define INVALID ( !VALID )
#define TRUE ( 1 == 1 )
#define FALSE ( !TRUE )
#define lobyte( num ) ( ( int )*( ( char * )&( num ) ) )
#define hibyte( num ) ( ( int )*( ( ( char * )&( num ) ) + 1 ) )
#define STEREO 1
#define SIXTEEN_BIT 2
#define MONO_8BIT 0
#define STEREO_8BIT ( STEREO )
#define MONO_16BIT ( SIXTEEN_BIT )
#define STEREO_16BIT ( STEREO | SIXTEEN_BIT )
#define SOUNDSCAPE_MaxMixMode STEREO_16BIT
#define MONO_8BIT_SAMPLE_SIZE 1
#define MONO_16BIT_SAMPLE_SIZE 2
#define STEREO_8BIT_SAMPLE_SIZE ( 2 * MONO_8BIT_SAMPLE_SIZE )
#define STEREO_16BIT_SAMPLE_SIZE ( 2 * MONO_16BIT_SAMPLE_SIZE )
#define SOUNDSCAPE_DefaultSampleRate 11000
#define SOUNDSCAPE_DefaultMixMode MONO_8BIT
#define SOUNDSCAPE_MaxIrq 15
/* Ensoniq gate-array chip defines ... */
#define ODIE 0 /* ODIE gate array */
#define OPUS 1 /* OPUS gate array */
#define MMIC 2 /* MiMIC gate array */
/* relevant direct register defines - offsets from base address */
#define GA_HOSTCSTAT 2 /* host port ctrl/stat reg */
#define GA_HOSTDATA 3 /* host port data reg */
#define GA_REGADDR 4 /* indirect address reg */
#define GA_REGDATA 5 /* indirect data reg */
#define SB_IACK 0x22e /* SoundBlaster IACK register */
/* relevant indirect register defines */
#define GA_DMACHB 3 /* DMA chan B assign reg */
#define GA_INTCFG 4 /* interrupt configuration reg */
#define GA_DMACFG 5 /* DMA config reg */
#define GA_CDCFG 6 /* CD-ROM (AD-1848) config reg */
#define GA_HMCTL 9 /* host master control reg */
#define GA_CHIPSEL 10 /* programmable external chip select */
/* AD-1848 chip defines ... */
/* relevant direct register defines */
#define AD_REGADDR 0 /* indirect address reg */
#define AD_REGDATA 1 /* indirect data reg */
#define AD_STATUS 2 /* status register */
#define AD_OFFSET 8 /* for some boards, a fixed BasePort offset */
/* relevant indirect register defines */
#define AD_LEFTOUT 6 /* left DAC output control reg */
#define AD_RIGHTOUT 7 /* right DAC output control reg */
#define AD_FORMAT 8 /* clock and data format reg */
#define AD_CONFIG 9 /* interface config register */
#define AD_PINCTRL 10 /* external pin control reg */
#define AD_UCOUNT 14 /* upper count reg */
#define AD_LCOUNT 15 /* lower count reg */
/* some firmware command and communication defines */
#define SET_CTL 0x88 /* set a control value */
#define GET_CTL 0x89 /* get a control value */
#define SET_REV 0xb0 /* set synth reverb */
#define SYNTH_VOL 0x04 /* Synth Vol control number */
#define RXRDY 0x01 /* Receive-Ready bit mask */
#define TXRDY 0x02 /* Transmit-Ready bit mask */
/* some miscellaneous defines ... soundscape reg values, sytem int regs, ... */
#define INTCONT1 0x20 /* Interrupt Controller 1 control register */
#define INTCONT2 0xa0 /* Interrupt Controller 2 control register */
#define INTMASK1 0x21 /* Interrupt Controller 1 mask register */
#define INTMASK2 0xa1 /* Interrupt Controller 2 mask register */
#define VECTBASE1 0x08 /* vector base for XT interrupts */
#define VECTBASE2 0x70 /* vector base for AT extended interrupts */
#define EOI 0x20 /* End Of Interrupt command */
#define AUTO_OUT 0x58 /* DMA controller mode */
static void SOUNDSCAPE_EnableInterrupt( void );
static void SOUNDSCAPE_DisableInterrupt( void );
static void __interrupt __far SOUNDSCAPE_ServiceInterrupt( void );
static int ga_read( int rnum );
static void ga_write( int rnum, int value );
static int ad_read( int rnum );
static void ad_write( int rnum, int value );
static void tdelay( void );
static void pcm_format( void );
static int SOUNDSCAPE_SetupDMABuffer( char *BufferPtr, int BufferSize, int mode );
static int SOUNDSCAPE_BeginPlayback( int length );
static void SOUNDSCAPE_LockEnd( void );
static void SOUNDSCAPE_UnlockMemory( void );
static int SOUNDSCAPE_LockMemory( void );
static unsigned short allocateTimerStack( unsigned short size );
static void deallocateTimerStack( unsigned short selector );
static int parse( char *val, char *str, FILE *p1 );
static int SOUNDSCAPE_FindCard( void );
static int SOUNDSCAPE_Setup( void );
#endif

View file

@ -0,0 +1,552 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: ADLIBFX.C
author: James R. Dose
date: April 1, 1994
Low level routines to support Adlib sound effects created by Muse.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#include <dos.h>
#include <stdlib.h>
#include <conio.h>
#include "dpmi.h"
#include "task_man.h"
#include "interrup.h"
#include "al_midi.h"
#include "adlibfx.h"
#define TRUE ( 1 == 1 )
#define FALSE ( !TRUE )
static void ADLIBFX_SendOutput( int reg, int data );
static void ADLIBFX_Service( task *Task );
static long ADLIBFX_LengthLeft;
static int ADLIBFX_Block;
static ALSound *ADLIBFX_Sound = NULL;
static char *ADLIBFX_SoundPtr = NULL;
static int ADLIBFX_Priority;
static unsigned long ADLIBFX_CallBackVal;
static void ( *ADLIBFX_CallBackFunc )( unsigned long ) = NULL;
static int ADLIBFX_SoundVolume;
static int ADLIBFX_TotalVolume = ADLIBFX_MaxVolume;
static task *ADLIBFX_ServiceTask = NULL;
static int ADLIBFX_VoiceHandle = ADLIBFX_MinVoiceHandle;
int ADLIBFX_Installed = FALSE;
int ADLIBFX_ErrorCode = ADLIBFX_Ok;
#define ADLIBFX_SetErrorCode( status ) \
ADLIBFX_ErrorCode = ( status );
/*---------------------------------------------------------------------
Function: ADLIBFX_ErrorString
Returns a pointer to the error message associated with an error
number. A -1 returns a pointer the current error.
---------------------------------------------------------------------*/
char *ADLIBFX_ErrorString
(
int ErrorNumber
)
{
char *ErrorString;
switch( ErrorNumber )
{
case ADLIBFX_Warning :
case ADLIBFX_Error :
ErrorString = ADLIBFX_ErrorString( ADLIBFX_ErrorCode );
break;
case ADLIBFX_Ok :
ErrorString = "Adlib FX ok.";
break;
case ADLIBFX_NoVoices :
ErrorString = "No free voices available in Adlib FX.";
break;
case ADLIBFX_VoiceNotFound :
ErrorString = "No voice with matching handle found.";
break;
case ADLIBFX_DPMI_Error :
ErrorString = "DPMI Error in AdlibFX.";
break;
default :
ErrorString = "Unknown Adlib FX error code.";
break;
}
return( ErrorString );
}
/**********************************************************************
Memory locked functions:
**********************************************************************/
#define ADLIBFX_LockStart ADLIBFX_SendOutput
/*---------------------------------------------------------------------
Function: ADLIBFX_SendOutput
Writes a byte of data to the specified register on the Adlib card.
---------------------------------------------------------------------*/
static void ADLIBFX_SendOutput
(
int reg,
int data
)
{
int i;
int adlib_port = 0x388;
unsigned flags;
flags = DisableInterrupts();
outp( adlib_port, reg );
for( i = 6; i ; i-- )
{
inp( adlib_port );
}
outp( adlib_port + 1, data );
for( i = 35; i ; i-- )
{
inp( adlib_port );
}
RestoreInterrupts( flags );
}
/*---------------------------------------------------------------------
Function: ADLIBFX_Stop
Halts playback of the currently playing sound effect.
---------------------------------------------------------------------*/
int ADLIBFX_Stop
(
int handle
)
{
unsigned flags;
if ( ( handle != ADLIBFX_VoiceHandle ) || ( ADLIBFX_Sound == NULL ) )
{
ADLIBFX_SetErrorCode( ADLIBFX_VoiceNotFound );
return( ADLIBFX_Warning );
}
flags = DisableInterrupts();
ADLIBFX_SendOutput( 0xb0, 0 );
ADLIBFX_Sound = NULL;
ADLIBFX_SoundPtr = NULL;
ADLIBFX_LengthLeft = 0;
ADLIBFX_Priority = 0;
RestoreInterrupts( flags );
if ( ADLIBFX_CallBackFunc )
{
ADLIBFX_CallBackFunc( ADLIBFX_CallBackVal );
}
return( ADLIBFX_Ok );
}
/*---------------------------------------------------------------------
Function: ADLIBFX_Service
Task Manager routine to perform the playback of a sound effect.
---------------------------------------------------------------------*/
static void ADLIBFX_Service
(
task *Task
)
{
int value;
if ( ADLIBFX_SoundPtr )
{
value = *ADLIBFX_SoundPtr++;
if ( value != 0 )
{
ADLIBFX_SendOutput( 0xa0, value );
ADLIBFX_SendOutput( 0xb0, ADLIBFX_Block );
}
else
{
ADLIBFX_SendOutput( 0xb0, 0 );
}
ADLIBFX_LengthLeft--;
if ( ADLIBFX_LengthLeft <= 0 )
{
ADLIBFX_Stop( ADLIBFX_VoiceHandle );
}
}
}
/*---------------------------------------------------------------------
Function: ADLIBFX_SetVolume
Sets the volume of the currently playing sound effect.
---------------------------------------------------------------------*/
int ADLIBFX_SetVolume
(
int handle,
int volume
)
{
unsigned flags;
int carrierlevel;
flags = DisableInterrupts();
if ( ( handle != ADLIBFX_VoiceHandle ) || ( ADLIBFX_Sound == NULL ) )
{
RestoreInterrupts( flags );
ADLIBFX_SetErrorCode( ADLIBFX_VoiceNotFound );
return( ADLIBFX_Warning );
}
volume = min( volume, ADLIBFX_MaxVolume );
volume = max( volume, 0 );
ADLIBFX_SoundVolume = volume;
volume *= ADLIBFX_TotalVolume;
volume /= ADLIBFX_MaxVolume;
carrierlevel = ADLIBFX_Sound->cScale & 0x3f;
carrierlevel ^= 0x3f;
carrierlevel *= ( volume / 2 ) + 0x80;
carrierlevel /= ADLIBFX_MaxVolume;
carrierlevel ^= 0x3f;
carrierlevel |= ADLIBFX_Sound->cScale & 0xc0;
ADLIBFX_SendOutput( 0x43, carrierlevel );
RestoreInterrupts( flags );
return( ADLIBFX_Ok );
}
/*---------------------------------------------------------------------
Function: ADLIBFX_SetTotalVolume
Sets the total volume of the sound effect.
---------------------------------------------------------------------*/
int ADLIBFX_SetTotalVolume
(
int volume
)
{
volume = max( volume, 0 );
volume = min( volume, ADLIBFX_MaxVolume );
ADLIBFX_TotalVolume = volume;
ADLIBFX_SetVolume( ADLIBFX_VoiceHandle, ADLIBFX_SoundVolume );
return( ADLIBFX_Ok );
}
/*---------------------------------------------------------------------
Function: ADLIBFX_GetTotalVolume
Returns the total volume of the sound effect.
---------------------------------------------------------------------*/
int ADLIBFX_GetTotalVolume
(
void
)
{
return( ADLIBFX_TotalVolume );
}
/*---------------------------------------------------------------------
Function: ADLIBFX_VoiceAvailable
Checks if a voice can be play at the specified priority.
---------------------------------------------------------------------*/
int ADLIBFX_VoiceAvailable
(
int priority
)
{
if ( priority < ADLIBFX_Priority )
{
return( FALSE );
}
return( TRUE );
}
/*---------------------------------------------------------------------
Function: ADLIBFX_Play
Starts playback of a Muse sound effect.
---------------------------------------------------------------------*/
int ADLIBFX_Play
(
ALSound *sound,
int volume,
int priority,
unsigned long callbackval
)
{
unsigned flags;
int carrierlevel;
if ( priority < ADLIBFX_Priority )
{
ADLIBFX_SetErrorCode( ADLIBFX_NoVoices );
return( ADLIBFX_Warning );
}
ADLIBFX_Stop( ADLIBFX_VoiceHandle );
ADLIBFX_VoiceHandle++;
if ( ADLIBFX_VoiceHandle < ADLIBFX_MinVoiceHandle )
{
ADLIBFX_VoiceHandle = ADLIBFX_MinVoiceHandle;
}
flags = DisableInterrupts();
ADLIBFX_LengthLeft = sound->length;
ADLIBFX_Priority = priority;
ADLIBFX_Sound = sound;
ADLIBFX_SoundPtr = &sound->data;
ADLIBFX_CallBackVal = callbackval;
ADLIBFX_Block = ( ( sound->block & 7 ) << 2 ) | 0x20;
volume = min( volume, ADLIBFX_MaxVolume );
volume = max( volume, 0 );
ADLIBFX_SoundVolume = volume;
volume *= ADLIBFX_TotalVolume;
volume /= ADLIBFX_MaxVolume;
carrierlevel = sound->cScale & 0x3f;
carrierlevel ^= 0x3f;
carrierlevel *= ( volume / 2 ) + 0x80;
carrierlevel /= ADLIBFX_MaxVolume;
carrierlevel ^= 0x3f;
carrierlevel |= sound->cScale & 0xc0;
ADLIBFX_SendOutput( 0x20, sound->mChar );
ADLIBFX_SendOutput( 0x40, sound->mScale );
ADLIBFX_SendOutput( 0x60, sound->mAttack );
ADLIBFX_SendOutput( 0x80, sound->mSus );
ADLIBFX_SendOutput( 0xe0, sound->mWave );
ADLIBFX_SendOutput( 0x23, sound->cChar );
ADLIBFX_SendOutput( 0x43, carrierlevel );
ADLIBFX_SendOutput( 0x63, sound->cAttack );
ADLIBFX_SendOutput( 0x83, sound->cSus );
ADLIBFX_SendOutput( 0xe3, sound->cWave );
ADLIBFX_SendOutput( 0xc0, 0 );
RestoreInterrupts( flags );
return( ADLIBFX_VoiceHandle );
}
/*---------------------------------------------------------------------
Function: ADLIBFX_SoundPlaying
Checks if a sound effect is currently playing.
---------------------------------------------------------------------*/
int ADLIBFX_SoundPlaying
(
int handle
)
{
int status;
status = FALSE;
if ( ( handle == ADLIBFX_VoiceHandle ) && ( ADLIBFX_LengthLeft > 0 ) )
{
status = TRUE;
}
return( status );
}
/*---------------------------------------------------------------------
Function: ADLIBFX_LockEnd
Used for determining the length of the functions to lock in memory.
---------------------------------------------------------------------*/
static void ADLIBFX_LockEnd
(
void
)
{
}
/*---------------------------------------------------------------------
Function: ADLIBFX_SetCallBack
Set the function to call when a voice stops.
---------------------------------------------------------------------*/
void ADLIBFX_SetCallBack
(
void ( *function )( unsigned long )
)
{
ADLIBFX_CallBackFunc = function;
}
/*---------------------------------------------------------------------
Function: ADLIBFX_Init
Initializes the sound effect engine.
---------------------------------------------------------------------*/
int ADLIBFX_Init
(
void
)
{
int status;
if ( ADLIBFX_Installed )
{
ADLIBFX_Shutdown();
}
status = DPMI_LockMemoryRegion( ADLIBFX_LockStart, ADLIBFX_LockEnd );
status |= DPMI_Lock( ADLIBFX_VoiceHandle );
status |= DPMI_Lock( ADLIBFX_Sound );
status |= DPMI_Lock( ADLIBFX_ErrorCode );
status |= DPMI_Lock( ADLIBFX_SoundPtr );
status |= DPMI_Lock( ADLIBFX_LengthLeft );
status |= DPMI_Lock( ADLIBFX_Priority );
status |= DPMI_Lock( ADLIBFX_CallBackFunc );
status |= DPMI_Lock( ADLIBFX_Block );
if ( status != DPMI_Ok )
{
ADLIBFX_SetErrorCode( ADLIBFX_DPMI_Error );
return( ADLIBFX_Error );
}
//JIM
// AL_ReserveVoice( 0 );
ADLIBFX_Stop( ADLIBFX_VoiceHandle );
ADLIBFX_ServiceTask = TS_ScheduleTask( &ADLIBFX_Service, 140, 2, NULL );
TS_Dispatch();
ADLIBFX_Installed = TRUE;
ADLIBFX_CallBackFunc = NULL;
ADLIBFX_SetErrorCode( ADLIBFX_Ok );
return( ADLIBFX_Ok );
}
/*---------------------------------------------------------------------
Function: ADLIBFX_Shutdown
Ends the use of the sound effect engine.
---------------------------------------------------------------------*/
int ADLIBFX_Shutdown
(
void
)
{
if ( ADLIBFX_Installed )
{
ADLIBFX_Stop( ADLIBFX_VoiceHandle );
TS_Terminate( ADLIBFX_ServiceTask );
ADLIBFX_ServiceTask = NULL;
//JIM
// AL_ReleaseVoice( 0 );
ADLIBFX_Installed = FALSE;
DPMI_UnlockMemoryRegion( ADLIBFX_LockStart, ADLIBFX_LockEnd );
DPMI_Unlock( ADLIBFX_VoiceHandle );
DPMI_Unlock( ADLIBFX_Sound );
DPMI_Unlock( ADLIBFX_ErrorCode );
DPMI_Unlock( ADLIBFX_SoundPtr );
DPMI_Unlock( ADLIBFX_LengthLeft );
DPMI_Unlock( ADLIBFX_Priority );
DPMI_Unlock( ADLIBFX_CallBackFunc );
DPMI_Unlock( ADLIBFX_Block );
}
ADLIBFX_SetErrorCode( ADLIBFX_Ok );
return( ADLIBFX_Ok );
}

View file

@ -0,0 +1,80 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: ADLIBFX.H
author: James R. Dose
date: April 1, 1994
Public header for ADLIBFX.C
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __ADLIBFX_H
#define __ADLIBFX_H
enum ADLIBFX_Errors
{
ADLIBFX_Warning = -2,
ADLIBFX_Error = -1,
ADLIBFX_Ok = 0,
ADLIBFX_NoVoices,
ADLIBFX_VoiceNotFound,
ADLIBFX_DPMI_Error
};
typedef struct
{
unsigned long length;
short int priority;
char mChar, cChar;
char mScale, cScale;
char mAttack, cAttack;
char mSus, cSus;
char mWave, cWave;
char nConn;
char voice;
char mode;
char unused[ 3 ];
char block;
char data[];
} ALSound;
#define ADLIBFX_MaxVolume 255
#define ADLIBFX_MinVoiceHandle 1
char *ADLIBFX_ErrorString( int ErrorNumber );
int ADLIBFX_Stop( int handle );
int ADLIBFX_SetVolume( int handle, int volume );
int ADLIBFX_SetTotalVolume( int volume );
int ADLIBFX_GetTotalVolume( void );
int ADLIBFX_VoiceAvailable( int priority );
int ADLIBFX_Play( ALSound *sound, int volume, int priority, unsigned long callbackval );
int ADLIBFX_SoundPlaying( int handle );
void ADLIBFX_SetCallBack( void ( *function )( unsigned long ) );
int ADLIBFX_Init( void );
int ADLIBFX_Shutdown( void );
#pragma aux ADLIBFX_Shutdown frame;
void PCFX_UnlockMemory( void );
#pragma aux ADLIBFX_UnlockMemory frame;
int PCFX_LockMemory( void );
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,58 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __AL_MIDI_H
#define __AL_MIDI_H
enum AL_Errors
{
AL_Warning = -2,
AL_Error = -1,
AL_Ok = 0,
};
#define AL_MaxVolume 127
#define AL_DefaultChannelVolume 90
//#define AL_DefaultPitchBendRange 2
#define AL_DefaultPitchBendRange 200
#define ADLIB_PORT 0x388
void AL_SendOutputToPort( int port, int reg, int data );
void AL_SendOutput( int voice, int reg, int data );
void AL_StereoOn( void );
void AL_StereoOff( void );
int AL_ReserveVoice( int voice );
int AL_ReleaseVoice( int voice );
void AL_Shutdown( void );
int AL_Init( int soundcard );
void AL_SetMaxMidiChannel( int channel );
void AL_Reset( void );
void AL_NoteOff( int channel, int key, int velocity );
void AL_NoteOn( int channel, int key, int vel );
//Turned off to test if it works with Watcom 10a
// #pragma aux AL_NoteOn frame;
void AL_AllNotesOff( int channel );
void AL_ControlChange( int channel, int type, int data );
void AL_ProgramChange( int channel, int patch );
void AL_SetPitchBend( int channel, int lsb, int msb );
int AL_DetectFM( void );
void AL_RegisterTimbreBank( unsigned char *timbres );
#endif

View file

@ -0,0 +1,49 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#if (HAVE_ASSERT_H != 1)
#ifndef __ASSERT_H
#define __ASSERT_H
#ifdef NDEBUG
#define ASSERT(f)
#else
#pragma aux _Assert aborts; /* _Assert will not return */
extern void _Assert( char *strFile, unsigned uLine ); /*prototype */
#define ASSERT(f) \
if (f) \
; \
else \
_Assert( __FILE__, __LINE__ )
#endif
#else
#error Multiple definition of ASSERT()
#endif
#endif //HAVE_ASSERT_H

View file

@ -0,0 +1,540 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: AWE32.C
author: James R. Dose
date: August 23, 1994
Cover functions for calling the AWE32 low-level library.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#include <conio.h>
#include <string.h>
#include "dpmi.h"
#include "blaster.h"
#include "ctaweapi.h"
#include "awe32.h"
#define _inp inp
#define _outp outp
/* DSP defines */
#define MPU_ACK_OK 0xfe
#define MPU_RESET_CMD 0xff
#define MPU_ENTER_UART 0x3f
static WORD wSBCBaseAddx; /* Sound Blaster base address */
static WORD wEMUBaseAddx; /* EMU8000 subsystem base address */
static WORD wMpuBaseAddx; /* MPU401 base address */
static unsigned short NoteFlags[ 128 ];
/* macros */
#define SBCPort( x ) ( ( x ) + wSBCBaseAddx )
#define MPUPort( x ) ( ( x ) + wMpuBaseAddx )
static SOUND_PACKET spSound =
{
0
};
static LONG lBankSizes[ MAXBANKS ] =
{
0
};
unsigned SetES( void );
#pragma aux SetES = \
"xor eax, eax" \
"mov ax, es" \
"mov bx, ds" \
"mov es, bx" \
modify [ eax ebx ];
void RestoreES( unsigned num );
#pragma aux RestoreES = \
"mov es, ax" \
parm [ eax ];
int AWE32_ErrorCode = AWE32_Ok;
#define AWE32_SetErrorCode( status ) \
AWE32_ErrorCode = ( status );
/*---------------------------------------------------------------------
Function: AWE32_ErrorString
Returns a pointer to the error message associated with an error
number. A -1 returns a pointer the current error.
---------------------------------------------------------------------*/
char *AWE32_ErrorString
(
int ErrorNumber
)
{
char *ErrorString;
switch( ErrorNumber )
{
case AWE32_Warning :
case AWE32_Error :
ErrorString = AWE32_ErrorString( AWE32_ErrorCode );
break;
case AWE32_Ok :
ErrorString = "AWE32 ok.";
break;
case AWE32_SoundBlasterError :
ErrorString = BLASTER_ErrorString( BLASTER_Error );
break;
case AWE32_NotDetected :
ErrorString = "Could not detect AWE32.";
break;
case AWE32_UnableToInitialize :
ErrorString = "Unable to initialize AWE32.";
case AWE32_MPU401Error :
ErrorString = "MPU-401 initialization failed in AWE32.";
break;
case AWE32_DPMI_Error :
ErrorString = "DPMI Error in AWE32.";
break;
default :
ErrorString = "Unknown AWE32 error code.";
break;
}
return( ErrorString );
}
/**********************************************************************
Memory locked functions:
**********************************************************************/
#define AWE32_LockStart AWE32_NoteOff
void AWE32_NoteOff
(
int channel,
int key,
int velocity
)
{
unsigned temp;
temp = SetES();
awe32NoteOff( channel, key, velocity );
RestoreES( temp );
NoteFlags[ key ] ^= ( 1 << channel );
}
void AWE32_NoteOn
(
int channel,
int key,
int velocity
)
{
unsigned temp;
temp = SetES();
awe32NoteOn( channel, key, velocity );
RestoreES( temp );
NoteFlags[ key ] |= ( 1 << channel );
}
void AWE32_PolyAftertouch
(
int channel,
int key,
int pressure
)
{
unsigned temp;
temp = SetES();
awe32PolyKeyPressure( channel, key, pressure );
RestoreES( temp );
}
void AWE32_ChannelAftertouch
(
int channel,
int pressure
)
{
unsigned temp;
temp = SetES();
awe32ChannelPressure( channel, pressure );
RestoreES( temp );
}
void AWE32_ControlChange
(
int channel,
int number,
int value
)
{
unsigned temp;
int i;
unsigned channelmask;
temp = SetES();
if ( number == 0x7b )
{
channelmask = 1 << channel;
for( i = 0; i < 128; i++ )
{
if ( NoteFlags[ i ] & channelmask )
{
awe32NoteOff( channel, i, 0 );
NoteFlags[ i ] ^= channelmask;
}
}
}
else
{
awe32Controller( channel, number, value );
}
RestoreES( temp );
}
void AWE32_ProgramChange
(
int channel,
int program
)
{
unsigned temp;
temp = SetES();
awe32ProgramChange( channel, program );
RestoreES( temp );
}
void AWE32_PitchBend
(
int channel,
int lsb,
int msb
)
{
unsigned temp;
temp = SetES();
awe32PitchBend( channel, lsb, msb );
RestoreES( temp );
}
/*---------------------------------------------------------------------
Function: AWE32_LockEnd
Used for determining the length of the functions to lock in memory.
---------------------------------------------------------------------*/
static void AWE32_LockEnd
(
void
)
{
}
/*
static int InitMPU
(
void
)
{
volatile DWORD dwCount;
for (dwCount=0; dwCount<0x2000; dwCount++) ;
dwCount = 0x2000;
while (dwCount && _inp(MPUPort(1)) & 0x40) --dwCount;
_outp(MPUPort(1), MPU_RESET_CMD);
for (dwCount=0; dwCount<0x2000; dwCount++) ;
dwCount = 0x2000;
while (dwCount && _inp(MPUPort(1)) & 0x80) --dwCount;
_inp(MPUPort(0));
for (dwCount=0; dwCount<0x2000; dwCount++) ;
dwCount = 0x2000;
while (dwCount && _inp(MPUPort(1)) & 0x40) --dwCount;
_outp(MPUPort(1), MPU_RESET_CMD);
for (dwCount=0; dwCount<0x2000; dwCount++) ;
dwCount = 0x2000;
while (dwCount && _inp(MPUPort(1)) & 0x80) --dwCount;
_inp(MPUPort(0));
for (dwCount=0; dwCount<0x2000; dwCount++) ;
dwCount = 0x2000;
while (dwCount && _inp(MPUPort(1)) & 0x40) --dwCount;
_outp(MPUPort(1), MPU_ENTER_UART);
for (dwCount=0; dwCount<0x2000; dwCount++) ;
dwCount = 0x2000;
while (dwCount && _inp(MPUPort(1)) & 0x80) --dwCount;
if (!dwCount) return TRUE;
if (_inp(MPUPort(0)) != MPU_ACK_OK) return TRUE;
// mask MPU-401 interrupt
_outp(SBCPort(0x4), 0x83);
_outp(SBCPort(0x5), _inp(SBCPort(0x5)) & ~0x04);
return FALSE;
}
*/
/*ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸*/
/*³ ShutdownMPU ³*/
/*³ Cleans up Sound Blaster to normal state. ³*/
/*ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ;*/
static void ShutdownMPU
(
void
)
{
volatile DWORD dwCount;
for (dwCount=0; dwCount<0x2000; dwCount++) ;
dwCount = 0x2000;
while (dwCount && _inp(MPUPort(1)) & 0x40) --dwCount;
_outp(MPUPort(1), MPU_RESET_CMD);
for (dwCount=0; dwCount<0x2000; dwCount++) ;
_inp(MPUPort(0));
for (dwCount=0; dwCount<0x2000; dwCount++) ;
dwCount = 0x2000;
while (dwCount && _inp(MPUPort(1)) & 0x40) --dwCount;
_outp(MPUPort(1), MPU_RESET_CMD);
for (dwCount=0; dwCount<0x2000; dwCount++) ;
_inp(MPUPort(0));
}
/*ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸*/
/*³ LoadSBK ³*/
/*ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ;*/
static void LoadSBK
(
void
)
{
/* use embeded preset objects */
spSound.bank_no = 0; /* load as Bank 0 */
spSound.total_banks = 1; /* use 1 bank first */
lBankSizes[ 0 ] = 0; /* ram is not needed */
spSound.banksizes = lBankSizes;
awe32DefineBankSizes( &spSound );
awe32SoundPad.SPad1 = awe32SPad1Obj;
awe32SoundPad.SPad2 = awe32SPad2Obj;
awe32SoundPad.SPad3 = awe32SPad3Obj;
awe32SoundPad.SPad4 = awe32SPad4Obj;
awe32SoundPad.SPad5 = awe32SPad5Obj;
awe32SoundPad.SPad6 = awe32SPad6Obj;
awe32SoundPad.SPad7 = awe32SPad7Obj;
}
int AWE32_Init
(
void
)
{
int status;
BLASTER_CONFIG Blaster;
wSBCBaseAddx = 0x220;
wEMUBaseAddx = 0x620;
wMpuBaseAddx = 0x330;
status = BLASTER_GetCardSettings( &Blaster );
if ( status != BLASTER_Ok )
{
status = BLASTER_GetEnv( &Blaster );
if ( status != BLASTER_Ok )
{
AWE32_SetErrorCode( AWE32_SoundBlasterError );
return( AWE32_Error );
}
}
wSBCBaseAddx = Blaster.Address;
if ( wSBCBaseAddx == UNDEFINED )
{
wSBCBaseAddx = 0x220;
}
wMpuBaseAddx = Blaster.Midi;
if ( wMpuBaseAddx == UNDEFINED )
{
wMpuBaseAddx = 0x330;
}
wEMUBaseAddx = Blaster.Emu;
if ( wEMUBaseAddx <= 0 )
{
wEMUBaseAddx = wSBCBaseAddx + 0x400;
}
status = awe32Detect( wEMUBaseAddx );
if ( status )
{
AWE32_SetErrorCode( AWE32_NotDetected );
return( AWE32_Error );
}
status = awe32InitHardware();
if ( status )
{
AWE32_SetErrorCode( AWE32_UnableToInitialize );
return( AWE32_Error );
}
status = awe32InitMIDI();
if ( status )
{
AWE32_Shutdown();
AWE32_SetErrorCode( AWE32_MPU401Error )
return( AWE32_Error );
}
/*
status = InitMPU();
if ( status )
{
ShutdownMPU();
status = InitMPU();
if ( status )
{
ShutdownMPU();
status = InitMPU();
if ( status )
{
AWE32_Shutdown();
AWE32_SetErrorCode( AWE32_MPU401Error )
return( AWE32_Error );
}
}
}
*/
status = DPMI_LockMemoryRegion( AWE32_LockStart, AWE32_LockEnd );
status |= DPMI_Lock( wSBCBaseAddx );
status |= DPMI_Lock( wEMUBaseAddx );
status |= DPMI_Lock( wMpuBaseAddx );
status |= DPMI_Lock( spSound );
status |= DPMI_Lock( lBankSizes );
status |= DPMI_LockMemory( NoteFlags, sizeof( NoteFlags ) );
// Lock awe32 library
status = DPMI_LockMemoryRegion( __midieng_code, __midieng_ecode );
status = DPMI_LockMemoryRegion( __midieng_code(), __midieng_ecode() );
status = DPMI_LockMemoryRegion( __nrpn_code, __nrpn_ecode );
status = DPMI_LockMemoryRegion( __nrpn_code(), __nrpn_ecode() );
status = DPMI_LockMemoryRegion( &__midivar_data, &__midivar_edata );
status = DPMI_LockMemoryRegion( &__nrpnvar_data, &__nrpnvar_edata );
status = DPMI_LockMemoryRegion( &__embed_data, &__embed_edata );
if ( status != DPMI_Ok )
{
ShutdownMPU();
awe32Terminate();
AWE32_SetErrorCode( AWE32_DPMI_Error );
return( AWE32_Error );
}
// Set the number of voices to use to 32
awe32NumG = 32;
awe32TotalPatchRam(&spSound);
LoadSBK();
awe32InitMIDI();
awe32InitNRPN();
memset( NoteFlags, 0, sizeof( NoteFlags ) );
return( AWE32_Ok );
}
void AWE32_Shutdown
(
void
)
{
ShutdownMPU();
awe32Terminate();
DPMI_UnlockMemoryRegion( AWE32_LockStart, AWE32_LockEnd );
DPMI_Unlock( wSBCBaseAddx );
DPMI_Unlock( wEMUBaseAddx );
DPMI_Unlock( wMpuBaseAddx );
DPMI_Unlock( spSound );
DPMI_Unlock( lBankSizes );
DPMI_UnlockMemory( NoteFlags, sizeof( NoteFlags ) );
// Unlock awe32 library
DPMI_UnlockMemoryRegion( __midieng_code, __midieng_ecode );
DPMI_UnlockMemoryRegion( __midieng_code(), __midieng_ecode() );
DPMI_UnlockMemoryRegion( __nrpn_code, __nrpn_ecode );
DPMI_UnlockMemoryRegion( __nrpn_code(), __nrpn_ecode() );
DPMI_UnlockMemoryRegion( &__midivar_data, &__midivar_edata );
DPMI_UnlockMemoryRegion( &__nrpnvar_data, &__nrpnvar_edata );
DPMI_UnlockMemoryRegion( &__embed_data, &__embed_edata );
}

View file

@ -0,0 +1,58 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: AWE32.H
author: James R. Dose
date: August 23, 1994
Public header for AWE32.C Cover functions for calling the
AWE32 low-level library.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __AWE32_H
#define __AWE32_H
enum AWE32_ERRORS
{
AWE32_Warning = -2,
AWE32_Error = -1,
AWE32_Ok = 0,
AWE32_SoundBlasterError,
AWE32_NotDetected,
AWE32_UnableToInitialize,
AWE32_MPU401Error,
AWE32_DPMI_Error
};
char *AWE32_ErrorString( int ErrorNumber );
int AWE32_Init( void );
void AWE32_Shutdown( void );
void AWE32_NoteOff( int channel, int key, int velocity );
void AWE32_NoteOn( int channel, int key, int velocity );
void AWE32_PolyAftertouch( int channel, int key, int pressure );
void AWE32_ChannelAftertouch( int channel, int pressure );
void AWE32_ControlChange( int channel, int number, int value );
void AWE32_ProgramChange( int channel, int program );
void AWE32_PitchBend( int channel, int lsb, int msb );
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,148 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: BLASTER.H
author: James R. Dose
date: February 4, 1994
Public header for BLASTER.C
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __BLASTER_H
#define __BLASTER_H
typedef struct
{
unsigned Address;
unsigned Type;
unsigned Interrupt;
unsigned Dma8;
unsigned Dma16;
unsigned Midi;
unsigned Emu;
} BLASTER_CONFIG;
extern BLASTER_CONFIG BLASTER_Config;
extern int BLASTER_DMAChannel;
#define UNDEFINED -1
enum BLASTER_ERRORS
{
BLASTER_Warning = -2,
BLASTER_Error = -1,
BLASTER_Ok = 0,
BLASTER_EnvNotFound,
BLASTER_AddrNotSet,
BLASTER_DMANotSet,
BLASTER_DMA16NotSet,
BLASTER_InvalidParameter,
BLASTER_CardNotReady,
BLASTER_NoSoundPlaying,
BLASTER_InvalidIrq,
BLASTER_UnableToSetIrq,
BLASTER_DmaError,
BLASTER_NoMixer,
BLASTER_DPMI_Error,
BLASTER_OutOfMemory
};
enum BLASTER_Types
{
SB = 1,
SBPro = 2,
SB20 = 3,
SBPro2 = 4,
SB16 = 6
};
#define BLASTER_MinCardType SB
#define BLASTER_MaxCardType SB16
#define STEREO 1
#define SIXTEEN_BIT 2
#define MONO_8BIT 0
#define STEREO_8BIT ( STEREO )
#define MONO_16BIT ( SIXTEEN_BIT )
#define STEREO_16BIT ( STEREO | SIXTEEN_BIT )
#define BLASTER_MaxMixMode STEREO_16BIT
#define MONO_8BIT_SAMPLE_SIZE 1
#define MONO_16BIT_SAMPLE_SIZE 2
#define STEREO_8BIT_SAMPLE_SIZE ( 2 * MONO_8BIT_SAMPLE_SIZE )
#define STEREO_16BIT_SAMPLE_SIZE ( 2 * MONO_16BIT_SAMPLE_SIZE )
#define BLASTER_DefaultSampleRate 11000
#define BLASTER_DefaultMixMode MONO_8BIT
#define BLASTER_MaxIrq 15
char *BLASTER_ErrorString( int ErrorNumber );
void BLASTER_EnableInterrupt( void );
void BLASTER_DisableInterrupt( void );
int BLASTER_WriteDSP( unsigned data );
int BLASTER_ReadDSP( void );
int BLASTER_ResetDSP( void );
int BLASTER_GetDSPVersion( void );
void BLASTER_SpeakerOn( void );
void BLASTER_SpeakerOff( void );
void BLASTER_SetPlaybackRate( unsigned rate );
unsigned BLASTER_GetPlaybackRate( void );
int BLASTER_SetMixMode( int mode );
void BLASTER_StopPlayback( void );
int BLASTER_SetupDMABuffer( char *BufferPtr, int BufferSize, int mode );
int BLASTER_GetCurrentPos( void );
int BLASTER_DSP1xx_BeginPlayback( int length );
int BLASTER_DSP2xx_BeginPlayback( int length );
int BLASTER_DSP4xx_BeginPlayback( int length );
int BLASTER_BeginBufferedRecord( char *BufferStart, int BufferSize,
int NumDivisions, unsigned SampleRate, int MixMode,
void ( *CallBackFunc )( void ) );
int BLASTER_BeginBufferedPlayback( char *BufferStart,
int BufferSize, int NumDivisions, unsigned SampleRate,
int MixMode, void ( *CallBackFunc )( void ) );
void BLASTER_WriteMixer( int reg, int data );
int BLASTER_ReadMixer( int reg );
int BLASTER_GetVoiceVolume( void );
int BLASTER_SetVoiceVolume( int volume );
int BLASTER_GetMidiVolume( void );
int BLASTER_SetMidiVolume( int volume );
int BLASTER_CardHasMixer( void );
void BLASTER_SaveVoiceVolume( void );
void BLASTER_RestoreVoiceVolume( void );
void BLASTER_SaveMidiVolume( void );
void BLASTER_RestoreMidiVolume( void );
int BLASTER_GetEnv( BLASTER_CONFIG *Config );
int BLASTER_SetCardSettings( BLASTER_CONFIG Config );
int BLASTER_GetCardSettings( BLASTER_CONFIG *Config );
int BLASTER_GetCardInfo( int *MaxSampleBits, int *MaxChannels );
void BLASTER_SetCallBack( void ( *func )( void ) );
void BLASTER_SetupWaveBlaster( void );
void BLASTER_ShutdownWaveBlaster( void );
int BLASTER_Init( void );
void BLASTER_Shutdown( void );
void BLASTER_UnlockMemory( void );
int BLASTER_LockMemory( void );
#endif

View file

@ -0,0 +1,352 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/****************************************************************************\
* *
* CTAWEAPI.H SB AWE32 DOS API header *
* *
* (C) Copyright Creative Technology Ltd. 1992-94. All rights reserved *
* worldwide. *
* *
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY *
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE *
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR *
* PURPOSE. *
* *
* You have a royalty-free right to use, modify, reproduce and *
* distribute the Sample Files (and/or any modified version) in *
* any way you find useful, provided that you agree to *
* the Creative's Software Licensing Aggreement and you also agree that *
* Creative has no warranty obligations or liability for any Sample Files. *
* *
\****************************************************************************/
/****************************************************************************\
* File name : CTAWEAPI.H *
* *
* Programmer : Creative SB AWE32 Team *
* Creative Technology Ltd, 1994. All rights reserved. *
* *
* Version : 2.0b *
* *
\****************************************************************************/
#ifndef _CTAWEAPI
#define _CTAWEAPI
#define MAXBANKS 64 /* maximum number of banks */
#define MAXNRPN 32 /* maximum number of NRPN */
#if defined(__FLAT__) || defined(__HIGHC__) || defined(DOS386)
#define PACKETSIZE 8192 /* packet size for 32bit libraries */
#else
#define PACKETSIZE 512 /* packet size for real mode libraries */
#endif
#if defined(__FLAT__)
#define NEAR
#define FAR
#endif
#if defined(__SC__)
#pragma pack(1)
#if defined(DOS386)
#define NEAR
#define FAR
#endif
#endif
#if defined(__WATCOMC__)
#pragma pack(1)
#endif
#if defined(__HIGHC__)
#define NEAR
#define FAR
#define PASCAL _DCC((_DEFAULT_CALLING_CONVENTION|_CALLEE_POPS_STACK) & \
~ (_REVERSE_PARMS|_OVERLOADED))
#pragma Push_align_members(1)
#pragma Global_aliasing_convention("_%r")
#endif
typedef int BOOL;
#define FALSE 0
#define TRUE 1
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
typedef short int SHORT;
typedef unsigned int UINT;
typedef signed long LONG;
#ifndef FAR
#define FAR __far
#endif
#ifndef HUGE
#define HUGE __huge
#endif
#ifndef PASCAL
#define PASCAL __pascal
#endif
typedef void FAR* LPVOID;
typedef BYTE FAR* LPBYTE;
typedef WORD FAR* LPWORD;
typedef DWORD FAR* LPDWORD;
#define LOBYTE(w) ((BYTE)(w))
#define HIBYTE(w) ((BYTE)(((UINT)(w) >> 8) & 0xFF))
#define LOWORD(l) ((WORD)(DWORD)(l))
#define HIWORD(l) ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF))
#if defined(__cplusplus)
extern "C" {
#endif
/* Start of modules */
extern int* __midieng_code(void);
extern int* __hardware_code(void);
extern int* __sbkload_code(void);
extern int* __nrpn_code(void);
extern int __midivar_data;
extern int __nrpnvar_data;
extern int __embed_data;
typedef char SCRATCH[702];
typedef char SOUNDFONT[124];
typedef char GCHANNEL[20];
typedef char MIDICHANNEL[32];
typedef char NRPNCHANNEL[96];
typedef struct {
SHORT bank_no; /* Slot number being used */
SHORT total_banks; /* Total number of banks */
LONG FAR* banksizes; /* Pointer to a list of bank sizes */
LONG file_size; /* exact size of the sound font file */
char FAR* data; /* Address of buffer of size >= PACKETSIZE */
char FAR* presets; /* Allocated memory for preset data */
LONG total_patch_ram; /* Total patch ram available */
SHORT no_sample_packets;/* Number of packets of sound sample to stream */
LONG sample_seek; /* Start file location of sound sample */
LONG preset_seek; /* Address of preset_seek location */
LONG preset_read_size; /* Number of bytes from preset_seek to allocate and read */
LONG preset_size; /* Preset actual size */
} SOUND_PACKET;
typedef struct {
SHORT tag; /* Must be 0x100 or 0x101 */
SHORT preset_size; /* Preset table of this size is required */
SHORT no_wave_packets; /* Number of packets of Wave sample to stream. */
LONG reserved;
SHORT bank_no; /* bank number */
char FAR* data; /* Address of packet of size PACKETSIZE */
char FAR* presets; /* Allocated memory for preset data */
LONG sample_size; /* Sample size, i.e. number of samples */
LONG samples_per_sec; /* Samples per second */
SHORT bits_per_sample; /* Bits per sample, 8 or 16 */
SHORT no_channels; /* Number of channels, 1=mono, 2=stereo */
SHORT looping; /* Looping? 0=no, 1=yes */
LONG startloop; /* if looping, then these are the addresses */
LONG endloop;
SHORT release; /* release time, 0=24ms, 8191=23.78s */
} WAVE_PACKET;
typedef struct {
LPBYTE SPad1;
LPBYTE SPad2;
LPBYTE SPad3;
LPBYTE SPad4;
LPBYTE SPad5;
LPBYTE SPad6;
LPBYTE SPad7;
} SOUNDPAD;
/* AWE32 variables */
extern WORD awe32NumG;
extern WORD awe32BaseAddx;
extern DWORD awe32DramSize;
/* MIDI variables */
extern SCRATCH awe32Scratch;
extern SOUNDFONT awe32SFont[4];
extern GCHANNEL awe32GChannel[32];
extern MIDICHANNEL awe32MIDIChannel[16];
extern SOUNDPAD awe32SoundPad;
/* NRPN variables */
extern NRPNCHANNEL awe32NRPNChannel[16];
/* SoundFont objects */
extern BYTE awe32SPad1Obj[];
extern BYTE awe32SPad2Obj[];
extern BYTE awe32SPad3Obj[];
extern BYTE awe32SPad4Obj[];
extern BYTE awe32SPad5Obj[];
extern BYTE awe32SPad6Obj[];
extern BYTE awe32SPad7Obj[];
/* AWE register functions */
extern void PASCAL awe32RegW(WORD, WORD);
extern WORD PASCAL awe32RegRW(WORD);
extern void PASCAL awe32RegDW(WORD, DWORD);
extern DWORD PASCAL awe32RegRDW(WORD);
/* MIDI support functions */
extern WORD PASCAL awe32InitMIDI(void);
extern WORD PASCAL awe32NoteOn(WORD, WORD, WORD);
extern WORD PASCAL awe32NoteOff(WORD, WORD, WORD);
extern WORD PASCAL awe32ProgramChange(WORD, WORD);
extern WORD PASCAL awe32Controller(WORD, WORD, WORD);
extern WORD PASCAL awe32PolyKeyPressure(WORD, WORD, WORD);
extern WORD PASCAL awe32ChannelPressure(WORD, WORD);
extern WORD PASCAL awe32PitchBend(WORD, WORD, WORD);
extern WORD PASCAL awe32Sysex(WORD, LPBYTE, WORD);
extern WORD PASCAL __awe32NoteOff(WORD, WORD, WORD, WORD);
extern WORD PASCAL __awe32IsPlaying(WORD, WORD, WORD, WORD);
/* NRPN support functions */
extern WORD PASCAL awe32InitNRPN(void);
/* Hardware support functions */
extern WORD PASCAL awe32Detect(WORD);
extern WORD PASCAL awe32InitHardware(void);
extern WORD PASCAL awe32Terminate(void);
/* SoundFont support functions */
extern WORD PASCAL awe32TotalPatchRam(SOUND_PACKET FAR*);
extern WORD PASCAL awe32DefineBankSizes(SOUND_PACKET FAR*);
extern WORD PASCAL awe32SFontLoadRequest(SOUND_PACKET FAR*);
extern WORD PASCAL awe32StreamSample(SOUND_PACKET FAR*);
extern WORD PASCAL awe32SetPresets(SOUND_PACKET FAR*);
extern WORD PASCAL awe32ReleaseBank(SOUND_PACKET FAR*);
extern WORD PASCAL awe32ReleaseAllBanks(SOUND_PACKET FAR*);
extern WORD PASCAL awe32WPLoadRequest(WAVE_PACKET FAR*);
extern WORD PASCAL awe32WPLoadWave(WAVE_PACKET FAR*);
extern WORD PASCAL awe32WPStreamWave(WAVE_PACKET FAR*);
extern WORD PASCAL awe32WPBuildSFont(WAVE_PACKET FAR*);
/* End of modules */
extern int* __midieng_ecode(void);
extern int* __hardware_ecode(void);
extern int* __sbkload_ecode(void);
extern int* __nrpn_ecode(void);
extern int __midivar_edata;
extern int __nrpnvar_edata;
extern int __embed_edata;
#if defined(__cplusplus)
}
#endif
#if defined(__SC__)
#pragma pack()
#endif
#if defined(__HIGHC__)
#pragma Pop_align_members
#pragma Global_aliasing_convention()
#pragma Alias(awe32RegW,"AWE32REGW")
#pragma Alias(awe32RegRW,"AWE32REGRW")
#pragma Alias(awe32RegDW,"AWE32REGDW")
#pragma Alias(awe32RegRDW,"AWE32REGRDW")
#pragma Alias(awe32InitMIDI,"AWE32INITMIDI")
#pragma Alias(awe32NoteOn,"AWE32NOTEON")
#pragma Alias(awe32NoteOff,"AWE32NOTEOFF")
#pragma Alias(awe32ProgramChange,"AWE32PROGRAMCHANGE")
#pragma Alias(awe32Controller,"AWE32CONTROLLER")
#pragma Alias(awe32PolyKeyPressure,"AWE32POLYKEYPRESSURE")
#pragma Alias(awe32ChannelPressure,"AWE32CHANNELPRESSURE")
#pragma Alias(awe32PitchBend,"AWE32PITCHBEND")
#pragma Alias(awe32Sysex,"AWE32SYSEX")
#pragma Alias(__awe32NoteOff,"__AWE32NOTEOFF")
#pragma Alias(__awe32IsPlaying,"__AWE32ISPLAYING")
#pragma Alias(awe32InitNRPN,"AWE32INITNRPN")
#pragma Alias(awe32Detect,"AWE32DETECT")
#pragma Alias(awe32InitHardware,"AWE32INITHARDWARE")
#pragma Alias(awe32Terminate,"AWE32TERMINATE")
#pragma Alias(awe32TotalPatchRam,"AWE32TOTALPATCHRAM")
#pragma Alias(awe32DefineBankSizes,"AWE32DEFINEBANKSIZES")
#pragma Alias(awe32SFontLoadRequest,"AWE32SFONTLOADREQUEST")
#pragma Alias(awe32StreamSample,"AWE32STREAMSAMPLE")
#pragma Alias(awe32SetPresets,"AWE32SETPRESETS")
#pragma Alias(awe32ReleaseBank,"AWE32RELEASEBANK")
#pragma Alias(awe32ReleaseAllBanks,"AWE32RELEASEALLBANKS")
#pragma Alias(awe32WPLoadRequest,"AWE32WPLOADREQUEST")
#pragma Alias(awe32WPLoadWave,"AWE32WPLOADWAVE")
#pragma Alias(awe32WPStreamWave,"AWE32WPSTREAMWAVE")
#pragma Alias(awe32WPBuildSFont,"AWE32WPBUILDSFONT")
#endif
#if defined(__WATCOMC__)
#pragma pack()
#pragma aux awe32NumG "_*"
#pragma aux awe32BaseAddx "_*"
#pragma aux awe32DramSize "_*"
#pragma aux awe32Scratch "_*"
#pragma aux awe32SFont "_*"
#pragma aux awe32GChannel "_*"
#pragma aux awe32MIDIChannel "_*"
#pragma aux awe32SoundPad "_*"
#pragma aux awe32NRPNChannel "_*"
#pragma aux awe32SPad1Obj "_*"
#pragma aux awe32SPad2Obj "_*"
#pragma aux awe32SPad3Obj "_*"
#pragma aux awe32SPad4Obj "_*"
#pragma aux awe32SPad5Obj "_*"
#pragma aux awe32SPad6Obj "_*"
#pragma aux awe32SPad7Obj "_*"
#pragma aux __midieng_code "_*"
#pragma aux __midieng_ecode "_*"
#pragma aux __hardware_code "_*"
#pragma aux __hardware_ecode "_*"
#pragma aux __sbkload_code "_*"
#pragma aux __sbkload_ecode "_*"
#pragma aux __nrpn_code "_*"
#pragma aux __nrpn_ecode "_*"
#pragma aux __midivar_data "_*"
#pragma aux __midivar_edata "_*"
#pragma aux __nrpnvar_data "_*"
#pragma aux __nrpnvar_edata "_*"
#pragma aux __embed_data "_*"
#pragma aux __embed_edata "_*"
#endif
#endif /* _CTAWEAPI */

View file

@ -0,0 +1,251 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include "debugio.h"
static unsigned short disp_offset = 160 * 24;
static void myutoa( unsigned num, char *string, int radix );
static void myitoa( int num, char *string, int radix );
void DB_SetXY
(
int x,
int y
)
{
disp_offset = ( x * 2 ) + ( y * 160 );
}
void DB_PutChar
(
char ch
)
{
int j;
char *disp_start = (char *)( 0xb0000 );
if ( disp_offset >= 160 * 24 )
{
for ( j = 160; j < 160 * 24; j += 2 )
{
*( disp_start + j - 160 ) = *( disp_start + j );
}
disp_offset = 160 * 23;
for ( j = disp_offset; j < ( 160 * 24 ); j += 2 )
{
*( disp_start + j ) = ' ';
}
}
if ( ch >= 32 )
{
*( disp_start + disp_offset ) = ch;
disp_offset = disp_offset + 2;
}
if ( ch == '\r' )
{
disp_offset = disp_offset / 160;
disp_offset = disp_offset * 160;
}
if ( ch == '\n' )
{
disp_offset = disp_offset + 160;
if ( disp_offset < 160 * 24 )
{
for ( j = disp_offset; j < ( ( ( disp_offset / 160 ) + 1 ) *
160 ); j += 2 )
{
*( disp_start + j ) = ' ';
}
}
}
}
int DB_PrintString
(
char *string
)
{
int count;
char *ptr;
ptr = string;
count = 0;
while ( *ptr )
{
DB_PutChar( *ptr );
count++;
ptr++;
}
return( count );
}
static void myutoa
(
unsigned num,
char *string,
int radix
)
{
int val;
int length;
int pos;
char temp[ 100 ];
length = 0;
do
{
val = num % radix;
if ( val < 10 )
{
temp[ length ] = '0' + val;
}
else
{
temp[ length ] = 'A' + val - 10;
}
num /= radix;
length++;
}
while( num > 0 );
pos = 0;
while( length > 0 )
{
length--;
string[ length ] = temp[ pos ];
pos++;
}
string[ pos ] = 0;
}
static void myitoa
(
int num,
char *string,
int radix
)
{
if ( num < 0 )
{
*string++ = '-';
num = -num;
}
myutoa( num, string, radix );
}
int DB_PrintNum
(
int number
)
{
char string[ 100 ];
int count;
myitoa( number, &string[ 0 ], 10 );
count = DB_PrintString( &string[ 0 ] );
return( count );
}
int DB_PrintUnsigned
(
unsigned long number,
int radix
)
{
char string[ 100 ];
int count;
myutoa( number, &string[ 0 ], radix );
count = DB_PrintString( &string[ 0 ] );
return( count );
}
int DB_printf
(
char *fmt,
...
)
{
va_list argptr;
int count;
char *ptr;
va_start( argptr, fmt );
ptr = fmt;
count = 0;
while( *ptr != 0 )
{
if ( *ptr == '%' )
{
ptr++;
switch( *ptr )
{
case 0 :
return( EOF );
break;
case 'd' :
count += DB_PrintNum( va_arg( argptr, int ) );
break;
case 's' :
count += DB_PrintString( va_arg( argptr, char * ) );
break;
case 'u' :
count += DB_PrintUnsigned( va_arg( argptr, int ), 10 );
break;
case 'x' :
case 'X' :
count += DB_PrintUnsigned( va_arg( argptr, int ), 16 );
break;
}
ptr++;
}
else
{
DB_PutChar( *ptr );
count++;
ptr++;
}
}
va_end( argptr );
return( count );
}

View file

@ -0,0 +1,30 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __DEBUGIO_H
#define __DEBUGIO_H
void DB_SetXY( int x, int y );
void DB_PutChar( char ch );
int DB_PrintString( char *string );
int DB_PrintNum( int number );
int DB_PrintUnsigned( unsigned long number, int radix );
int DB_printf( char *fmt, ... );
#endif

View file

@ -0,0 +1,379 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: DMA.C
author: James R. Dose
date: February 4, 1994
Low level routines to for programming the DMA controller for 8 bit
and 16 bit transfers.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#include <dos.h>
#include <conio.h>
#include <stdlib.h>
#include "dma.h"
#define DMA_MaxChannel 7
#define VALID ( 1 == 1 )
#define INVALID ( !VALID )
#define BYTE 0
#define WORD 1
typedef struct
{
int Valid;
int Width;
int Mask;
int Mode;
int Clear;
int Page;
int Address;
int Length;
} DMA_PORT;
static const DMA_PORT DMA_PortInfo[ DMA_MaxChannel + 1 ] =
{
{ VALID, BYTE, 0xA, 0xB, 0xC, 0x87, 0x0, 0x1 },
{ VALID, BYTE, 0xA, 0xB, 0xC, 0x83, 0x2, 0x3 },
{ INVALID, BYTE, 0xA, 0xB, 0xC, 0x81, 0x4, 0x5 },
{ VALID, BYTE, 0xA, 0xB, 0xC, 0x82, 0x6, 0x7 },
{ INVALID, WORD, 0xD4, 0xD6, 0xD8, 0x8F, 0xC0, 0xC2 },
{ VALID, WORD, 0xD4, 0xD6, 0xD8, 0x8B, 0xC4, 0xC6 },
{ VALID, WORD, 0xD4, 0xD6, 0xD8, 0x89, 0xC8, 0xCA },
{ VALID, WORD, 0xD4, 0xD6, 0xD8, 0x8A, 0xCC, 0xCE },
};
int DMA_ErrorCode = DMA_Ok;
#define DMA_SetErrorCode( status ) \
DMA_ErrorCode = ( status );
/*---------------------------------------------------------------------
Function: DMA_ErrorString
Returns a pointer to the error message associated with an error
number. A -1 returns a pointer the current error.
---------------------------------------------------------------------*/
char *DMA_ErrorString
(
int ErrorNumber
)
{
char *ErrorString;
switch( ErrorNumber )
{
case DMA_Error :
ErrorString = DMA_ErrorString( DMA_ErrorCode );
break;
case DMA_Ok :
ErrorString = "DMA channel ok.";
break;
case DMA_ChannelOutOfRange :
ErrorString = "DMA channel out of valid range.";
break;
case DMA_InvalidChannel :
ErrorString = "Unsupported DMA channel.";
break;
default :
ErrorString = "Unknown DMA error code.";
break;
}
return( ErrorString );
}
/*---------------------------------------------------------------------
Function: DMA_VerifyChannel
Verifies whether a DMA channel is available to transfer data.
---------------------------------------------------------------------*/
int DMA_VerifyChannel
(
int channel
)
{
int status;
int Error;
status = DMA_Ok;
Error = DMA_Ok;
if ( ( channel < 0 ) || ( DMA_MaxChannel < channel ) )
{
Error = DMA_ChannelOutOfRange;
status = DMA_Error;
}
else if ( DMA_PortInfo[ channel ].Valid == INVALID )
{
Error = DMA_InvalidChannel;
status = DMA_Error;
}
DMA_SetErrorCode( Error );
return( status );
}
/*---------------------------------------------------------------------
Function: DMA_SetupTransfer
Programs the specified DMA channel to transfer data.
---------------------------------------------------------------------*/
int DMA_SetupTransfer
(
int channel,
char *address,
int length,
int mode
)
{
DMA_PORT *Port;
int addr;
int ChannelSelect;
int Page;
int HiByte;
int LoByte;
int TransferLength;
int status;
status = DMA_VerifyChannel( channel );
if ( status == DMA_Ok )
{
Port = &DMA_PortInfo[ channel ];
ChannelSelect = channel & 0x3;
addr = ( int )address;
if ( Port->Width == WORD )
{
Page = ( addr >> 16 ) & 255;
HiByte = ( addr >> 9 ) & 255;
LoByte = ( addr >> 1 ) & 255;
// Convert the length in bytes to the length in words
TransferLength = ( length + 1 ) >> 1;
// The length is always one less the number of bytes or words
// that we're going to send
TransferLength--;
}
else
{
Page = ( addr >> 16 ) & 255;
HiByte = ( addr >> 8 ) & 255;
LoByte = addr & 255;
// The length is always one less the number of bytes or words
// that we're going to send
TransferLength = length - 1;
}
// Mask off DMA channel
outp( Port->Mask, 4 | ChannelSelect );
// Clear flip-flop to lower byte with any data
outp( Port->Clear, 0 );
// Set DMA mode
switch( mode )
{
case DMA_SingleShotRead :
outp( Port->Mode, 0x48 | ChannelSelect );
break;
case DMA_SingleShotWrite :
outp( Port->Mode, 0x44 | ChannelSelect );
break;
case DMA_AutoInitRead :
outp( Port->Mode, 0x58 | ChannelSelect );
break;
case DMA_AutoInitWrite :
outp( Port->Mode, 0x54 | ChannelSelect );
break;
}
// Send address
outp( Port->Address, LoByte );
outp( Port->Address, HiByte );
// Send page
outp( Port->Page, Page );
// Send length
outp( Port->Length, TransferLength );
outp( Port->Length, TransferLength >> 8 );
// enable DMA channel
outp( Port->Mask, ChannelSelect );
}
return( status );
}
/*---------------------------------------------------------------------
Function: DMA_EndTransfer
Ends use of the specified DMA channel.
---------------------------------------------------------------------*/
int DMA_EndTransfer
(
int channel
)
{
DMA_PORT *Port;
int ChannelSelect;
int status;
status = DMA_VerifyChannel( channel );
if ( status == DMA_Ok )
{
Port = &DMA_PortInfo[ channel ];
ChannelSelect = channel & 0x3;
// Mask off DMA channel
outp( Port->Mask, 4 | ChannelSelect );
// Clear flip-flop to lower byte with any data
outp( Port->Clear, 0 );
}
return( status );
}
/*---------------------------------------------------------------------
Function: DMA_GetCurrentPos
Returns the position of the specified DMA transfer.
---------------------------------------------------------------------*/
char *DMA_GetCurrentPos
(
int channel
)
{
DMA_PORT *Port;
unsigned long addr;
int status;
addr = NULL;
status = DMA_VerifyChannel( channel );
if ( status == DMA_Ok )
{
Port = &DMA_PortInfo[ channel ];
if ( Port->Width == WORD )
{
// Get address
addr = inp( Port->Address ) << 1;
addr |= inp( Port->Address ) << 9;
// Get page
addr |= inp( Port->Page ) << 16;
}
else
{
// Get address
addr = inp( Port->Address );
addr |= inp( Port->Address ) << 8;
// Get page
addr |= inp( Port->Page ) << 16;
}
}
return( ( char * )addr );
}
/*---------------------------------------------------------------------
Function: DMA_GetTransferCount
Returns how many bytes are left in the DMA's transfer.
---------------------------------------------------------------------*/
int DMA_GetTransferCount
(
int channel
)
{
DMA_PORT *Port;
int count;
int status;
status = DMA_Ok;
count = 0;
if ( ( channel < 0 ) || ( DMA_MaxChannel < channel ) )
{
status = DMA_ChannelOutOfRange;
}
else if ( DMA_PortInfo[ channel ].Valid == INVALID )
{
status = DMA_InvalidChannel;
}
if ( status == DMA_Ok )
{
Port = &DMA_PortInfo[ channel ];
outp( Port->Clear, 0 );
count = inp( Port->Length );
count += inp( Port->Length ) << 8;
if ( Port->Width == WORD )
{
count <<= 1;
}
}
DMA_SetErrorCode( status );
return( count );
}

View file

@ -0,0 +1,83 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
file: DMA.H
author: James R. Dose
date: February 4, 1994
Public header file for DMA.C
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __DMA_H
#define __DMA_H
enum DMA_ERRORS
{
DMA_Error = -1,
DMA_Ok = 0,
DMA_ChannelOutOfRange,
DMA_InvalidChannel
};
enum DMA_Modes
{
DMA_SingleShotRead,
DMA_SingleShotWrite,
DMA_AutoInitRead,
DMA_AutoInitWrite
};
char *DMA_ErrorString
(
int ErrorNumber
);
int DMA_VerifyChannel
(
int channel
);
int DMA_SetupTransfer
(
int channel,
char *address,
int length,
int mode
);
int DMA_EndTransfer
(
int channel
);
char *DMA_GetCurrentPos
(
int channel
);
int DMA_GetTransferCount
(
int channel
);
#endif

View file

@ -0,0 +1,250 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: DPMI.C
author: James R. Dose
date: April 8, 1994
Functions for performing DPMI calls.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#include <dos.h>
#include <string.h>
#include "dpmi.h"
#define TRUE ( 1 == 1 )
#define FALSE ( !TRUE )
static union REGS Regs;
static struct SREGS SegRegs;
/*---------------------------------------------------------------------
Function: DPMI_GetRealModeVector
Returns the vector of a real mode interrupt.
---------------------------------------------------------------------*/
unsigned long DPMI_GetRealModeVector
(
int num
)
{
unsigned long vector;
Regs.x.eax = 0x0200;
Regs.h.bl = num;
int386( 0x31, &Regs, &Regs );
vector = Regs.w.cx & 0xffff;
vector <<= 16;
vector |= Regs.w.dx & 0xffff;
return( vector );
}
/*---------------------------------------------------------------------
Function: DPMI_SetRealModeVector
Sets the vector of a real mode interrupt.
---------------------------------------------------------------------*/
void DPMI_SetRealModeVector
(
int num,
unsigned long vector
)
{
Regs.x.eax = 0x0201;
Regs.h.bl = num;
Regs.w.dx = vector & 0xffff;
Regs.w.cx = ( vector >> 16 ) & 0xffff;
int386( 0x31, &Regs, &Regs );
}
/*---------------------------------------------------------------------
Function: DPMI_CallRealModeFunction
Performs a call to a real mode function.
---------------------------------------------------------------------*/
int DPMI_CallRealModeFunction
(
dpmi_regs *callregs
)
{
// Setup our registers to call DPMI
Regs.w.ax = 0x0301;
Regs.h.bl = 0;
Regs.h.bh = 0;
Regs.w.cx = 0;
SegRegs.es = FP_SEG( callregs );
Regs.x.edi = FP_OFF( callregs );
// Call Real-mode procedure with Far Return Frame
int386x( 0x31, &Regs, &Regs, &SegRegs );
if ( Regs.x.cflag )
{
return( DPMI_Error );
}
return( DPMI_Ok );
}
/*---------------------------------------------------------------------
Function: DPMI_LockMemory
Locks a region of memory to keep the virtual memory manager from
paging the region out.
---------------------------------------------------------------------*/
int DPMI_LockMemory
(
void *address,
unsigned length
)
{
unsigned linear;
// Thanks to DOS/4GW's zero-based flat memory model, converting
// a pointer of any type to a linear address is trivial.
linear = (unsigned) address;
// DPMI Lock Linear Region
Regs.w.ax = 0x600;
// Linear address in BX:CX
Regs.w.bx = (linear >> 16);
Regs.w.cx = (linear & 0xFFFF);
// Length in SI:DI
Regs.w.si = (length >> 16);
Regs.w.di = (length & 0xFFFF);
int386 (0x31, &Regs, &Regs);
// Return 0 if can't lock
if ( Regs.w.cflag )
{
return( DPMI_Error );
}
return ( DPMI_Ok );
}
/*---------------------------------------------------------------------
Function: DPMI_LockMemoryRegion
Locks a region of memory to keep the virtual memory manager from
paging the region out.
---------------------------------------------------------------------*/
int DPMI_LockMemoryRegion
(
void *start,
void *end
)
{
int status;
status = DPMI_LockMemory( start, ( char * )end - ( char * )start );
return( status );
}
/*---------------------------------------------------------------------
Function: DPMI_UnlockMemory
Unlocks a region of memory that was previously locked.
---------------------------------------------------------------------*/
int DPMI_UnlockMemory
(
void *address,
unsigned length
)
{
unsigned linear;
// Thanks to DOS/4GW's zero-based flat memory model, converting
// a pointer of any type to a linear address is trivial.
linear = (unsigned) address;
// DPMI Unlock Linear Region
Regs.w.ax = 0x601;
// Linear address in BX:CX
Regs.w.bx = (linear >> 16);
Regs.w.cx = (linear & 0xFFFF);
// Length in SI:DI
Regs.w.si = (length >> 16);
Regs.w.di = (length & 0xFFFF);
int386 (0x31, &Regs, &Regs);
// Return 0 if can't unlock
if ( Regs.w.cflag )
{
return( DPMI_Error );
}
return ( DPMI_Ok );
}
/*---------------------------------------------------------------------
Function: DPMI_UnlockMemoryRegion
Unlocks a region of memory that was previously locked.
---------------------------------------------------------------------*/
int DPMI_UnlockMemoryRegion
(
void *start,
void *end
)
{
int status;
status = DPMI_UnlockMemory( start, ( char * )end - ( char * )start );
return( status );
}

View file

@ -0,0 +1,86 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: DPMI.H
author: James R. Dose
date: March 31, 1994
Inline functions for performing DPMI calls.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __DPMI_H
#define __DPMI_H
#include "SDL.h"
#ifdef _WIN32
#include "../../../Engine/src/windows/inttypes.h"
#else
#include <inttypes.h>
#endif
enum DPMI_Errors
{
DPMI_Warning = -2,
DPMI_Error = -1,
DPMI_Ok = 0
};
typedef struct
{
uint32_t EDI;
uint32_t ESI;
uint32_t EBP;
uint32_t Reserved;
uint32_t EBX;
uint32_t EDX;
uint32_t ECX;
uint32_t EAX;
uint32_t Flags;
uint32_t ES;
uint32_t DS;
uint32_t FS;
uint32_t GS;
uint32_t IP;
uint16_t CS;
uint16_t SP;
uint16_t SS;
} dpmi_regs;
uint32_t DPMI_GetRealModeVector( int num );
int DPMI_CallRealModeFunction( dpmi_regs *callregs );
int DPMI_GetDOSMemory( void **ptr, int *descriptor, unsigned length );
int DPMI_FreeDOSMemory( int descriptor );
int DPMI_LockMemory( void *address, unsigned length );
int DPMI_LockMemoryRegion( void *start, void *end );
int DPMI_UnlockMemory( void *address, unsigned length );
int DPMI_UnlockMemoryRegion( void *start, void *end );
#define DPMI_Lock( variable ) \
( DPMI_LockMemory( &( variable ), sizeof( variable ) ) )
#define DPMI_Unlock( variable ) \
( DPMI_UnlockMemory( &( variable ), sizeof( variable ) ) )
#endif

View file

@ -0,0 +1,231 @@
#include <stdlib.h>
#include <string.h>
#include "dsl.h"
#include "util.h"
#include "SDL.h"
#include "SDL_mixer.h"
extern volatile int MV_MixPage;
static int DSL_ErrorCode = DSL_Ok;
static int mixer_initialized;
static void ( *_CallBackFunc )( void );
static volatile char *_BufferStart;
static int _BufferSize;
static int _NumDivisions;
static int _SampleRate;
static int _remainder;
static Mix_Chunk *blank;
static unsigned char *blank_buf;
/*
possible todo ideas: cache sdl/sdl mixer error messages.
*/
char *DSL_ErrorString( int ErrorNumber )
{
char *ErrorString;
switch (ErrorNumber) {
case DSL_Warning:
case DSL_Error:
ErrorString = DSL_ErrorString(DSL_ErrorCode);
break;
case DSL_Ok:
ErrorString = "SDL Driver ok.";
break;
case DSL_SDLInitFailure:
ErrorString = "SDL Audio initialization failed.";
break;
case DSL_MixerActive:
ErrorString = "SDL Mixer already initialized.";
break;
case DSL_MixerInitFailure:
ErrorString = "SDL Mixer initialization failed.";
break;
default:
ErrorString = "Unknown SDL Driver error.";
break;
}
return ErrorString;
}
static void DSL_SetErrorCode(int ErrorCode)
{
DSL_ErrorCode = ErrorCode;
}
int DSL_Init( void )
{
DSL_SetErrorCode(DSL_Ok);
if (SDL_InitSubSystem(SDL_INIT_AUDIO|SDL_INIT_NOPARACHUTE) < 0) {
DSL_SetErrorCode(DSL_SDLInitFailure);
return DSL_Error;
}
return DSL_Ok;
}
void DSL_Shutdown( void )
{
DSL_StopPlayback();
}
static void mixer_callback(int chan, void *stream, int len, void *udata)
{
Uint8 *stptr;
Uint8 *fxptr;
int copysize;
/* len should equal _BufferSize, else this is screwed up */
stptr = (Uint8 *)stream;
if (_remainder > 0) {
copysize = min(len, _remainder);
fxptr = (Uint8 *)(&_BufferStart[MV_MixPage *
_BufferSize]);
memcpy(stptr, fxptr+(_BufferSize-_remainder), copysize);
len -= copysize;
_remainder -= copysize;
stptr += copysize;
}
while (len > 0) {
/* new buffer */
_CallBackFunc();
fxptr = (Uint8 *)(&_BufferStart[MV_MixPage *
_BufferSize]);
copysize = min(len, _BufferSize);
memcpy(stptr, fxptr, copysize);
len -= copysize;
stptr += copysize;
}
_remainder = len;
}
int DSL_BeginBufferedPlayback( char *BufferStart,
int BufferSize, int NumDivisions, unsigned SampleRate,
int MixMode, void ( *CallBackFunc )( void ) )
{
Uint16 format;
int channels;
int chunksize;
int blah;
if (mixer_initialized) {
DSL_SetErrorCode(DSL_MixerActive);
return DSL_Error;
}
_CallBackFunc = CallBackFunc;
_BufferStart = BufferStart;
_BufferSize = (BufferSize / NumDivisions);
_NumDivisions = NumDivisions;
_SampleRate = SampleRate;
_remainder = 0;
format = (MixMode & SIXTEEN_BIT) ? AUDIO_S16LSB : AUDIO_U8;
channels = (MixMode & STEREO) ? 2 : 1;
/*
I find 50ms to be ideal, at least with my hardware. This clamping mechanism
was added because it seems the above remainder handling isn't so nice --kode54
*/
chunksize = (5 * SampleRate) / 100;
blah = _BufferSize;
if (MixMode & SIXTEEN_BIT) blah >>= 1;
if (MixMode & STEREO) blah >>= 1;
if (chunksize % blah) chunksize += blah - (chunksize % blah);
if (Mix_OpenAudio(SampleRate, format, channels, chunksize) < 0) {
DSL_SetErrorCode(DSL_MixerInitFailure);
return DSL_Error;
}
/*
Mix_SetPostMix(mixer_callback, NULL);
*/
/* have to use a channel because postmix will overwrite the music... */
Mix_RegisterEffect(0, mixer_callback, NULL, NULL);
/* create a dummy sample just to allocate that channel */
blank_buf = (Uint8 *)malloc(4096);
memset(blank_buf, 0, 4096);
blank = Mix_QuickLoad_RAW(blank_buf, 4096);
Mix_PlayChannel(0, blank, -1);
mixer_initialized = 1;
return DSL_Ok;
}
void DSL_StopPlayback( void )
{
if (mixer_initialized) {
Mix_HaltChannel(0);
}
if (blank != NULL) {
Mix_FreeChunk(blank);
}
blank = NULL;
if (blank_buf != NULL) {
free(blank_buf);
}
blank_buf = NULL;
if (mixer_initialized) {
Mix_CloseAudio();
}
mixer_initialized = 0;
}
unsigned DSL_GetPlaybackRate( void )
{
return _SampleRate;
}
uint32_t DisableInterrupts( void )
{
return 0;
}
void RestoreInterrupts( uint32_t flags )
{
}

View file

@ -0,0 +1,28 @@
#ifndef AUDIOLIB__DSL_H
#define AUDIOLIB__DSL_H
#define MONO_8BIT 0
#define STEREO 1
#define SIXTEEN_BIT 2
#define STEREO_16BIT ( STEREO | SIXTEEN_BIT )
enum DSL_ERRORS
{
DSL_Warning = -2,
DSL_Error = -1,
DSL_Ok = 0,
DSL_SDLInitFailure,
DSL_MixerActive,
DSL_MixerInitFailure
};
char *DSL_ErrorString( int ErrorNumber );
int DSL_Init( void );
void DSL_StopPlayback( void );
unsigned DSL_GetPlaybackRate( void );
int DSL_BeginBufferedPlayback( char *BufferStart,
int BufferSize, int NumDivisions, unsigned SampleRate,
int MixMode, void ( *CallBackFunc )( void ) );
void DSL_Shutdown( void );
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,140 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: FX_MAN.H
author: James R. Dose
date: March 17, 1994
Public header for FX_MAN.C
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __FX_MAN_H
#define __FX_MAN_H
#include "sndcards.h"
#ifdef _WIN32
#include "../../Engine/src/windows/inttypes.h"
#else
#include <inttypes.h>
#endif
typedef struct
{
int MaxVoices;
int MaxSampleBits;
int MaxChannels;
} fx_device;
#define MonoFx 1
#define StereoFx 2
typedef struct
{
unsigned long Address;
unsigned long Type;
unsigned long Interrupt;
unsigned long Dma8;
unsigned long Dma16;
unsigned long Midi;
unsigned long Emu;
} fx_blaster_config;
enum FX_ERRORS
{
FX_Warning = -2,
FX_Error = -1,
FX_Ok = 0,
FX_ASSVersion,
FX_BlasterError,
FX_SoundCardError,
FX_InvalidCard,
FX_MultiVocError,
FX_DPMI_Error
};
enum fx_BLASTER_Types
{
fx_SB = 1,
fx_SBPro = 2,
fx_SB20 = 3,
fx_SBPro2 = 4,
fx_SB16 = 6
};
char *FX_ErrorString( int ErrorNumber );
int FX_SetupCard( int SoundCard, fx_device *device );
int FX_GetBlasterSettings( fx_blaster_config *blaster );
int FX_SetupSoundBlaster( fx_blaster_config blaster, int *MaxVoices, int *MaxSampleBits, int *MaxChannels );
int FX_Init( int SoundCard, int numvoices, int numchannels, int samplebits, unsigned mixrate );
int FX_Shutdown( void );
int FX_SetCallBack( void ( *function )( int32_t ) );
void FX_SetVolume( int volume );
int FX_GetVolume( void );
void FX_SetReverseStereo( int setting );
int FX_GetReverseStereo( void );
void FX_SetReverb( int reverb );
void FX_SetFastReverb( int reverb );
int FX_GetMaxReverbDelay( void );
int FX_GetReverbDelay( void );
void FX_SetReverbDelay( int delay );
int FX_VoiceAvailable( int priority );
int FX_EndLooping( int handle );
int FX_SetPan( int handle, int vol, int left, int right );
int FX_SetPitch( int handle, int pitchoffset );
int FX_SetFrequency( int handle, int frequency );
int FX_PlayVOC( uint8_t *ptr, int pitchoffset, int vol, int left, int right,
int priority, uint32_t callbackval );
int FX_PlayLoopedVOC( uint8_t *ptr, int32_t loopstart, int32_t loopend,
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority,
uint32_t callbackval );
int FX_PlayWAV( uint8_t *ptr, int pitchoffset, int vol, int left, int right,
int priority, uint32_t callbackval );
int FX_PlayLoopedWAV( uint8_t *ptr, int32_t loopstart, int32_t loopend,
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority,
uint32_t callbackval );
int FX_PlayVOC3D( uint8_t *ptr, int32_t pitchoffset, int32_t angle, int32_t distance,
int32_t priority, uint32_t callbackval );
int FX_PlayWAV3D( uint8_t *ptr, int pitchoffset, int angle, int distance,
int priority, uint32_t callbackval );
int FX_PlayRaw( uint8_t *ptr, uint32_t length, uint32_t rate,
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority,
uint32_t callbackval );
int FX_PlayLoopedRaw( uint8_t *ptr, uint32_t length, char *loopstart,
char *loopend, uint32_t rate, int32_t pitchoffset, int32_t vol, int32_t left,
int32_t right, int32_t priority, uint32_t callbackval );
int32_t FX_Pan3D( int handle, int angle, int distance );
int32_t FX_SoundActive( int32_t handle );
int32_t FX_SoundsPlaying( void );
int32_t FX_StopSound( int handle );
int32_t FX_StopAllSounds( void );
int32_t FX_StartDemandFeedPlayback( void ( *function )( char **ptr, uint32_t *length ),
int32_t rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right,
int32_t priority, uint32_t callbackval );
int FX_StartRecording( int MixRate, void ( *function )( char *ptr, int length ) );
void FX_StopRecord( void );
#endif

View file

@ -0,0 +1,290 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
typedef struct
{
unsigned char SAVEK[ 2 ];
unsigned char Level[ 2 ];
unsigned char Env1[ 2 ];
unsigned char Env2[ 2 ];
unsigned char Wave[ 2 ];
unsigned char Feedback;
signed char Transpose;
signed char Velocity;
} TIMBRE;
TIMBRE ADLIB_TimbreBank[ 256 ] =
{
{ { 33, 33 }, { 143, 6 }, { 242, 242 }, { 69, 118 }, { 0, 0 }, 8, 0 },
{ { 49, 33 }, { 75, 0 }, { 242, 242 }, { 84, 86 }, { 0, 0 }, 8, 0 },
{ { 49, 33 }, { 73, 0 }, { 242, 242 }, { 85, 118 }, { 0, 0 }, 8, 0 },
{ { 177, 97 }, { 14, 0 }, { 242, 243 }, { 59, 11 }, { 0, 0 }, 6, 0 },
{ { 1, 33 }, { 87, 0 }, { 241, 241 }, { 56, 40 }, { 0, 0 }, 0, 0 },
{ { 1, 33 }, { 147, 0 }, { 241, 241 }, { 56, 40 }, { 0, 0 }, 0, 0 },
{ { 33, 54 }, { 128, 14 }, { 162, 241 }, { 1, 213 }, { 0, 0 }, 8, 0 },
{ { 1, 1 }, { 146, 0 }, { 194, 194 }, { 168, 88 }, { 0, 0 }, 10, 0 },
{ { 12, 129 }, { 92, 0 }, { 246, 243 }, { 84, 181 }, { 0, 0 }, 0, 0 },
{ { 7, 17 }, { 151, 128 }, { 246, 245 }, { 50, 17 }, { 0, 0 }, 2, 0 },
{ { 23, 1 }, { 33, 0 }, { 86, 246 }, { 4, 4 }, { 0, 0 }, 2, 0 },
{ { 24, 129 }, { 98, 0 }, { 243, 242 }, { 230, 246 }, { 0, 0 }, 0, 0 },
{ { 24, 33 }, { 35, 0 }, { 247, 229 }, { 85, 216 }, { 0, 0 }, 0, 0 },
{ { 21, 1 }, { 145, 0 }, { 246, 246 }, { 166, 230 }, { 0, 0 }, 4, 0 },
{ { 69, 129 }, { 89, 128 }, { 211, 163 }, { 130, 227 }, { 0, 0 }, 12, 0 },
{ { 3, 129 }, { 73, 128 }, { 116, 179 }, { 85, 5 }, { 1, 0 }, 4, 0 },
{ { 113, 49 }, { 146, 0 }, { 246, 241 }, { 20, 7 }, { 0, 0 }, 2, 0 },
{ { 114, 48 }, { 20, 0 }, { 199, 199 }, { 88, 8 }, { 0, 0 }, 2, 0 },
{ { 112, 177 }, { 68, 0 }, { 170, 138 }, { 24, 8 }, { 0, 0 }, 4, 0 },
{ { 35, 177 }, { 147, 0 }, { 151, 85 }, { 35, 20 }, { 1, 0 }, 4, 0 },
{ { 97, 177 }, { 19, 128 }, { 151, 85 }, { 4, 4 }, { 1, 0 }, 0, 0 },
{ { 36, 177 }, { 72, 0 }, { 152, 70 }, { 42, 26 }, { 1, 0 }, 12, 0 },
{ { 97, 33 }, { 19, 0 }, { 145, 97 }, { 6, 7 }, { 1, 0 }, 10, 0 },
{ { 33, 161 }, { 19, 137 }, { 113, 97 }, { 6, 7 }, { 0, 0 }, 6, 0 },
{ { 2, 65 }, { 156, 128 }, { 243, 243 }, { 148, 200 }, { 1, 0 }, 12, 0 },
{ { 3, 17 }, { 84, 0 }, { 243, 241 }, { 154, 231 }, { 1, 0 }, 12, 0 },
{ { 35, 33 }, { 95, 0 }, { 241, 242 }, { 58, 248 }, { 0, 0 }, 0, 0 },
{ { 3, 33 }, { 135, 128 }, { 246, 243 }, { 34, 243 }, { 1, 0 }, 6, 0 },
{ { 3, 33 }, { 71, 0 }, { 249, 246 }, { 84, 58 }, { 0, 0 }, 0, 0 },
{ { 35, 33 }, { 72, 0 }, { 149, 132 }, { 25, 25 }, { 1, 0 }, 8, 0 },
{ { 35, 33 }, { 74, 0 }, { 149, 148 }, { 25, 25 }, { 1, 0 }, 8, 0 },
{ { 9, 132 }, { 161, 128 }, { 32, 209 }, { 79, 248 }, { 0, 0 }, 8, 0 },
{ { 33, 162 }, { 30, 0 }, { 148, 195 }, { 6, 166 }, { 0, 0 }, 2, 0 },
{ { 49, 49 }, { 18, 0 }, { 241, 241 }, { 40, 24 }, { 0, 0 }, 10, 0 },
{ { 49, 49 }, { 141, 0 }, { 241, 241 }, { 232, 120 }, { 0, 0 }, 10, 0 },
{ { 49, 50 }, { 91, 0 }, { 81, 113 }, { 40, 72 }, { 0, 0 }, 12, 0 },
{ { 1, 33 }, { 139, 64 }, { 161, 242 }, { 154, 223 }, { 0, 0 }, 8, 0 },
{ { 1, 33 }, { 137, 64 }, { 161, 242 }, { 154, 223 }, { 0, 0 }, 8, 0 },
{ { 49, 49 }, { 139, 0 }, { 244, 241 }, { 232, 120 }, { 0, 0 }, 10, 0 },
{ { 49, 49 }, { 18, 0 }, { 241, 241 }, { 40, 24 }, { 0, 0 }, 10, 0 },
{ { 49, 33 }, { 21, 0 }, { 221, 86 }, { 19, 38 }, { 1, 0 }, 8, 0 },
{ { 49, 33 }, { 22, 0 }, { 221, 102 }, { 19, 6 }, { 1, 0 }, 8, 0 },
{ { 113, 49 }, { 73, 0 }, { 209, 97 }, { 28, 12 }, { 1, 0 }, 8, 0 },
{ { 33, 35 }, { 77, 128 }, { 113, 114 }, { 18, 6 }, { 1, 0 }, 2, 0 },
{ { 241, 225 }, { 64, 0 }, { 241, 111 }, { 33, 22 }, { 1, 0 }, 2, 0 },
{ { 2, 1 }, { 26, 128 }, { 245, 133 }, { 117, 53 }, { 1, 0 }, 0, 0 },
{ { 2, 1 }, { 29, 128 }, { 245, 243 }, { 117, 244 }, { 1, 0 }, 0, 0 },
{ { 16, 17 }, { 65, 0 }, { 245, 242 }, { 5, 195 }, { 1, 0 }, 2, 0 },
{ { 33, 162 }, { 155, 1 }, { 177, 114 }, { 37, 8 }, { 1, 0 }, 14, 0 },
{ { 161, 33 }, { 152, 0 }, { 127, 63 }, { 3, 7 }, { 1, 1 }, 0, 0 },
{ { 161, 97 }, { 147, 0 }, { 193, 79 }, { 18, 5 }, { 0, 0 }, 10, 0 },
{ { 33, 97 }, { 24, 0 }, { 193, 79 }, { 34, 5 }, { 0, 0 }, 12, 0 },
{ { 49, 114 }, { 91, 131 }, { 244, 138 }, { 21, 5 }, { 0, 0 }, 0, 0 },
{ { 161, 97 }, { 144, 0 }, { 116, 113 }, { 57, 103 }, { 0, 0 }, 0, 0 },
{ { 113, 114 }, { 87, 0 }, { 84, 122 }, { 5, 5 }, { 0, 0 }, 12, 0 },
{ { 144, 65 }, { 0, 0 }, { 84, 165 }, { 99, 69 }, { 0, 0 }, 8, 0 },
{ { 33, 33 }, { 146, 1 }, { 133, 143 }, { 23, 9 }, { 0, 0 }, 12, 0 },
{ { 33, 33 }, { 148, 5 }, { 117, 143 }, { 23, 9 }, { 0, 0 }, 12, 0 },
{ { 33, 97 }, { 148, 0 }, { 118, 130 }, { 21, 55 }, { 0, 0 }, 12, 0 },
{ { 49, 33 }, { 67, 0 }, { 158, 98 }, { 23, 44 }, { 1, 1 }, 2, 0 },
{ { 33, 33 }, { 155, 0 }, { 97, 127 }, { 106, 10 }, { 0, 0 }, 2, 0 },
{ { 97, 34 }, { 138, 6 }, { 117, 116 }, { 31, 15 }, { 0, 0 }, 8, 0 },
{ { 161, 33 }, { 134, 13 }, { 114, 113 }, { 85, 24 }, { 1, 0 }, 0, 0 },
{ { 33, 33 }, { 77, 0 }, { 84, 166 }, { 60, 28 }, { 0, 0 }, 8, 0 },
{ { 49, 97 }, { 143, 0 }, { 147, 114 }, { 2, 11 }, { 1, 0 }, 8, 0 },
{ { 49, 97 }, { 142, 0 }, { 147, 114 }, { 3, 9 }, { 1, 0 }, 8, 0 },
{ { 49, 97 }, { 145, 0 }, { 147, 130 }, { 3, 9 }, { 1, 0 }, 10, 0 },
{ { 49, 97 }, { 142, 0 }, { 147, 114 }, { 15, 15 }, { 1, 0 }, 10, 0 },
{ { 33, 33 }, { 75, 0 }, { 170, 143 }, { 22, 10 }, { 1, 0 }, 8, 0 },
{ { 49, 33 }, { 144, 0 }, { 126, 139 }, { 23, 12 }, { 1, 1 }, 6, 0 },
{ { 49, 50 }, { 129, 0 }, { 117, 97 }, { 25, 25 }, { 1, 0 }, 0, 0 },
{ { 50, 33 }, { 144, 0 }, { 155, 114 }, { 33, 23 }, { 0, 0 }, 4, 0 },
{ { 225, 225 }, { 31, 0 }, { 133, 101 }, { 95, 26 }, { 0, 0 }, 0, 0 },
{ { 225, 225 }, { 70, 0 }, { 136, 101 }, { 95, 26 }, { 0, 0 }, 0, 0 },
{ { 161, 33 }, { 156, 0 }, { 117, 117 }, { 31, 10 }, { 0, 0 }, 2, 0 },
{ { 49, 33 }, { 139, 0 }, { 132, 101 }, { 88, 26 }, { 0, 0 }, 0, 0 },
{ { 225, 161 }, { 76, 0 }, { 102, 101 }, { 86, 38 }, { 0, 0 }, 0, 0 },
{ { 98, 161 }, { 203, 0 }, { 118, 85 }, { 70, 54 }, { 0, 0 }, 0, 0 },
{ { 98, 161 }, { 153, 0 }, { 87, 86 }, { 7, 7 }, { 0, 0 }, 11, 0 },
{ { 98, 161 }, { 147, 0 }, { 119, 118 }, { 7, 7 }, { 0, 0 }, 11, 0 },
{ { 34, 33 }, { 89, 0 }, { 255, 255 }, { 3, 15 }, { 2, 0 }, 0, 0 },
{ { 33, 33 }, { 14, 0 }, { 255, 255 }, { 15, 15 }, { 1, 1 }, 0, 0 },
{ { 34, 33 }, { 70, 128 }, { 134, 100 }, { 85, 24 }, { 0, 0 }, 0, 0 },
{ { 33, 161 }, { 69, 0 }, { 102, 150 }, { 18, 10 }, { 0, 0 }, 0, 0 },
{ { 33, 34 }, { 139, 0 }, { 146, 145 }, { 42, 42 }, { 1, 0 }, 0, 0 },
{ { 162, 97 }, { 158, 64 }, { 223, 111 }, { 5, 7 }, { 0, 0 }, 2, 0 },
{ { 32, 96 }, { 26, 0 }, { 239, 143 }, { 1, 6 }, { 0, 2 }, 0, 0 },
{ { 33, 33 }, { 143, 128 }, { 241, 244 }, { 41, 9 }, { 0, 0 }, 10, 0 },
{ { 119, 161 }, { 165, 0 }, { 83, 160 }, { 148, 5 }, { 0, 0 }, 2, 0 },
{ { 97, 177 }, { 31, 128 }, { 168, 37 }, { 17, 3 }, { 0, 0 }, 10, 0 },
{ { 97, 97 }, { 23, 0 }, { 145, 85 }, { 52, 22 }, { 0, 0 }, 12, 0 },
{ { 113, 114 }, { 93, 0 }, { 84, 106 }, { 1, 3 }, { 0, 0 }, 0, 0 },
{ { 33, 162 }, { 151, 0 }, { 33, 66 }, { 67, 53 }, { 0, 0 }, 8, 0 },
{ { 161, 33 }, { 28, 0 }, { 161, 49 }, { 119, 71 }, { 1, 1 }, 0, 0 },
{ { 33, 97 }, { 137, 3 }, { 17, 66 }, { 51, 37 }, { 0, 0 }, 10, 0 },
{ { 161, 33 }, { 21, 0 }, { 17, 207 }, { 71, 7 }, { 1, 0 }, 0, 0 },
{ { 58, 81 }, { 206, 0 }, { 248, 134 }, { 246, 2 }, { 0, 0 }, 2, 0 },
{ { 33, 33 }, { 21, 0 }, { 33, 65 }, { 35, 19 }, { 1, 0 }, 0, 0 },
{ { 6, 1 }, { 91, 0 }, { 116, 165 }, { 149, 114 }, { 0, 0 }, 0, 0 },
{ { 34, 97 }, { 146, 131 }, { 177, 242 }, { 129, 38 }, { 0, 0 }, 12, 0 },
{ { 65, 66 }, { 77, 0 }, { 241, 242 }, { 81, 245 }, { 1, 0 }, 0, 0 },
{ { 97, 163 }, { 148, 128 }, { 17, 17 }, { 81, 19 }, { 1, 0 }, 6, 0 },
{ { 97, 161 }, { 140, 128 }, { 17, 29 }, { 49, 3 }, { 0, 0 }, 6, 0 },
{ { 164, 97 }, { 76, 0 }, { 243, 129 }, { 115, 35 }, { 1, 0 }, 4, 0 },
{ { 2, 7 }, { 133, 3 }, { 210, 242 }, { 83, 246 }, { 0, 1 }, 0, 0 },
{ { 17, 19 }, { 12, 128 }, { 163, 162 }, { 17, 229 }, { 1, 0 }, 0, 0 },
{ { 17, 17 }, { 6, 0 }, { 246, 242 }, { 65, 230 }, { 1, 2 }, 4, 0 },
{ { 147, 145 }, { 145, 0 }, { 212, 235 }, { 50, 17 }, { 0, 1 }, 8, 0 },
{ { 4, 1 }, { 79, 0 }, { 250, 194 }, { 86, 5 }, { 0, 0 }, 12, 0 },
{ { 33, 34 }, { 73, 0 }, { 124, 111 }, { 32, 12 }, { 0, 1 }, 6, 0 },
{ { 49, 33 }, { 133, 0 }, { 221, 86 }, { 51, 22 }, { 1, 0 }, 10, 0 },
{ { 32, 33 }, { 4, 129 }, { 218, 143 }, { 5, 11 }, { 2, 0 }, 6, 0 },
{ { 5, 3 }, { 106, 128 }, { 241, 195 }, { 229, 229 }, { 0, 0 }, 6, 0 },
{ { 7, 2 }, { 21, 0 }, { 236, 248 }, { 38, 22 }, { 0, 0 }, 10, 0 },
{ { 5, 1 }, { 157, 0 }, { 103, 223 }, { 53, 5 }, { 0, 0 }, 8, 0 },
{ { 24, 18 }, { 150, 0 }, { 250, 248 }, { 40, 229 }, { 0, 0 }, 10, 0 },
{ { 16, 0 }, { 134, 3 }, { 168, 250 }, { 7, 3 }, { 0, 0 }, 6, 0 },
{ { 17, 16 }, { 65, 3 }, { 248, 243 }, { 71, 3 }, { 2, 0 }, 4, 0 },
{ { 1, 16 }, { 142, 0 }, { 241, 243 }, { 6, 2 }, { 2, 0 }, 14, 0 },
{ { 14, 192 }, { 0, 0 }, { 31, 31 }, { 0, 255 }, { 0, 3 }, 14, 0 },
{ { 6, 3 }, { 128, 136 }, { 248, 86 }, { 36, 132 }, { 0, 2 }, 14, 0 },
{ { 14, 208 }, { 0, 5 }, { 248, 52 }, { 0, 4 }, { 0, 3 }, 14, 0 },
{ { 14, 192 }, { 0, 0 }, { 246, 31 }, { 0, 2 }, { 0, 3 }, 14, 0 },
{ { 213, 218 }, { 149, 64 }, { 55, 86 }, { 163, 55 }, { 0, 0 }, 0, 0 },
{ { 53, 20 }, { 92, 8 }, { 178, 244 }, { 97, 21 }, { 2, 0 }, 10, 0 },
{ { 14, 208 }, { 0, 0 }, { 246, 79 }, { 0, 245 }, { 0, 3 }, 14, 0 },
{ { 38, 228 }, { 0, 0 }, { 255, 18 }, { 1, 22 }, { 0, 1 }, 14, 0 },
{ { 0, 0 }, { 0, 0 }, { 243, 246 }, { 240, 201 }, { 0, 2 }, 14, 0 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 0, 0 }, { 0, 0 }, { 252, 250 }, { 5, 23 }, { 2, 0 }, 14, 52 },
{ { 0, 1 }, { 2, 0 }, { 255, 255 }, { 7, 8 }, { 0, 0 }, 0, 48 },
{ { 0, 0 }, { 0, 0 }, { 252, 250 }, { 5, 23 }, { 2, 0 }, 14, 58 },
{ { 0, 0 }, { 0, 0 }, { 246, 246 }, { 12, 6 }, { 0, 0 }, 4, 60 },
{ { 12, 18 }, { 0, 0 }, { 246, 251 }, { 8, 71 }, { 0, 2 }, 10, 47 },
{ { 0, 0 }, { 3, 0 }, { 248, 246 }, { 42, 69 }, { 0, 1 }, 4, 43 },
{ { 12, 18 }, { 0, 0 }, { 246, 251 }, { 8, 71 }, { 0, 2 }, 10, 49 },
{ { 0, 0 }, { 3, 0 }, { 248, 246 }, { 42, 69 }, { 0, 1 }, 4, 43 },
{ { 12, 18 }, { 0, 0 }, { 246, 251 }, { 8, 71 }, { 0, 2 }, 10, 51 },
{ { 0, 0 }, { 3, 0 }, { 248, 246 }, { 42, 69 }, { 0, 1 }, 4, 43 },
{ { 12, 18 }, { 0, 0 }, { 246, 251 }, { 8, 71 }, { 0, 2 }, 10, 54 },
{ { 12, 18 }, { 0, 0 }, { 246, 251 }, { 8, 71 }, { 0, 2 }, 10, 57 },
{ { 0, 0 }, { 3, 0 }, { 248, 246 }, { 42, 69 }, { 0, 1 }, 4, 72 },
{ { 12, 18 }, { 0, 0 }, { 246, 251 }, { 8, 71 }, { 0, 2 }, 10, 60 },
{ { 14, 208 }, { 0, 10 }, { 245, 159 }, { 48, 2 }, { 0, 0 }, 14, 76 },
{ { 14, 7 }, { 10, 93 }, { 228, 245 }, { 228, 229 }, { 3, 1 }, 6, 84 },
{ { 2, 5 }, { 3, 10 }, { 180, 151 }, { 4, 247 }, { 0, 0 }, 14, 36 },
{ { 78, 158 }, { 0, 0 }, { 246, 159 }, { 0, 2 }, { 0, 3 }, 14, 76 },
{ { 17, 16 }, { 69, 8 }, { 248, 243 }, { 55, 5 }, { 2, 0 }, 8, 84 },
{ { 14, 208 }, { 0, 0 }, { 246, 159 }, { 0, 2 }, { 0, 3 }, 14, 83 },
{ { 128, 16 }, { 0, 13 }, { 255, 255 }, { 3, 20 }, { 3, 0 }, 12, 84 },
{ { 14, 7 }, { 8, 81 }, { 248, 244 }, { 66, 228 }, { 0, 3 }, 14, 24 },
{ { 14, 208 }, { 0, 10 }, { 245, 159 }, { 48, 2 }, { 0, 0 }, 14, 77 },
{ { 1, 2 }, { 0, 0 }, { 250, 200 }, { 191, 151 }, { 0, 0 }, 7, 60 },
{ { 1, 1 }, { 81, 0 }, { 250, 250 }, { 135, 183 }, { 0, 0 }, 6, 65 },
{ { 1, 2 }, { 84, 0 }, { 250, 248 }, { 141, 184 }, { 0, 0 }, 6, 59 },
{ { 1, 2 }, { 89, 0 }, { 250, 248 }, { 136, 182 }, { 0, 0 }, 6, 51 },
{ { 1, 0 }, { 0, 0 }, { 249, 250 }, { 10, 6 }, { 3, 0 }, 14, 45 },
{ { 0, 0 }, { 128, 0 }, { 249, 246 }, { 137, 108 }, { 3, 0 }, 14, 71 },
{ { 3, 12 }, { 128, 8 }, { 248, 246 }, { 136, 182 }, { 3, 0 }, 15, 60 },
{ { 3, 12 }, { 133, 0 }, { 248, 246 }, { 136, 182 }, { 3, 0 }, 15, 58 },
{ { 14, 0 }, { 64, 8 }, { 118, 119 }, { 79, 24 }, { 0, 2 }, 14, 53 },
{ { 14, 3 }, { 64, 0 }, { 200, 155 }, { 73, 105 }, { 0, 2 }, 14, 64 },
{ { 215, 199 }, { 220, 0 }, { 173, 141 }, { 5, 5 }, { 3, 0 }, 14, 71 },
{ { 215, 199 }, { 220, 0 }, { 168, 136 }, { 4, 4 }, { 3, 0 }, 14, 61 },
{ { 128, 17 }, { 0, 0 }, { 246, 103 }, { 6, 23 }, { 3, 3 }, 14, 61 },
{ { 128, 17 }, { 0, 9 }, { 245, 70 }, { 5, 22 }, { 2, 3 }, 14, 48 },
{ { 6, 21 }, { 63, 0 }, { 0, 247 }, { 244, 245 }, { 0, 0 }, 1, 48 },
{ { 6, 18 }, { 63, 0 }, { 0, 247 }, { 244, 245 }, { 3, 0 }, 0, 69 },
{ { 6, 18 }, { 63, 0 }, { 0, 247 }, { 244, 245 }, { 0, 0 }, 1, 68 },
{ { 1, 2 }, { 88, 0 }, { 103, 117 }, { 231, 7 }, { 0, 0 }, 0, 63 },
{ { 65, 66 }, { 69, 8 }, { 248, 117 }, { 72, 5 }, { 0, 0 }, 0, 74 },
{ { 10, 30 }, { 64, 78 }, { 224, 255 }, { 240, 5 }, { 3, 0 }, 8, 60 },
{ { 10, 30 }, { 124, 82 }, { 224, 255 }, { 240, 2 }, { 3, 0 }, 8, 80 },
{ { 14, 0 }, { 64, 8 }, { 122, 123 }, { 74, 27 }, { 0, 2 }, 14, 64 },
{ { 14, 7 }, { 10, 64 }, { 228, 85 }, { 228, 57 }, { 3, 1 }, 6, 69 },
{ { 5, 4 }, { 5, 64 }, { 249, 214 }, { 50, 165 }, { 3, 0 }, 14, 73 },
{ { 2, 21 }, { 63, 0 }, { 0, 247 }, { 243, 245 }, { 3, 0 }, 8, 75 },
{ { 1, 2 }, { 79, 0 }, { 250, 248 }, { 141, 181 }, { 0, 0 }, 7, 68 },
{ { 0, 0 }, { 0, 0 }, { 246, 246 }, { 12, 6 }, { 0, 0 }, 4, 48 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 53 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 35 }
};

View file

@ -0,0 +1,283 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
file: GUS.C
author: James R. Dose
date: September 7, 1994
Gravis Ultrasound initialization routines.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#include <conio.h>
#include <dos.h>
#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include "usrhooks.h"
#include "interrup.h"
#include "newgf1.h"
#include "gusmidi.h"
#include "guswave.h"
#include "_guswave.h"
#define TRUE ( 1 == 1 )
#define FALSE ( !TRUE )
// size of DMA buffer for patch loading
#define DMABUFFSIZE 2048U
struct gf1_dma_buff GUS_HoldBuffer;
static int HoldBufferAllocated = FALSE;
static int GUS_Installed = 0;
extern VoiceNode GUSWAVE_Voices[ VOICES ];
extern int GUSWAVE_Installed;
unsigned long GUS_TotalMemory;
int GUS_MemConfig;
int GUS_AuxError = 0;
int GUS_ErrorCode = GUS_Ok;
#define GUS_SetErrorCode( status ) \
GUS_ErrorCode = ( status );
/*---------------------------------------------------------------------
Function: GUS_ErrorString
Returns a pointer to the error message associated with an error
number. A -1 returns a pointer the current error.
---------------------------------------------------------------------*/
char *GUS_ErrorString
(
int ErrorNumber
)
{
char *ErrorString;
switch( ErrorNumber )
{
case GUS_Warning :
case GUS_Error :
ErrorString = GUS_ErrorString( GUS_ErrorCode );
break;
case GUS_Ok :
ErrorString = "Ultrasound music ok.";
break;
case GUS_OutOfMemory :
ErrorString = "Out of memory in GusMidi.";
break;
case GUS_OutOfDosMemory :
ErrorString = "Out of conventional (640K) memory in GusMidi.";
break;
case GUS_GF1Error :
ErrorString = gf1_error_str( GUS_AuxError );
break;
case GUS_InvalidIrq :
ErrorString = "Ultrasound IRQ must be 7 or less.";
break;
case GUS_ULTRADIRNotSet :
ErrorString = "ULTRADIR environment variable not set.";
break;
case GUS_MissingConfig :
// ErrorString = "Can't find GUSMIDI.INI file.";
ErrorString = "Can't find ULTRAMID.INI file.";
break;
case GUS_FileError :
ErrorString = strerror( GUS_AuxError );
break;
default :
ErrorString = "Unknown Ultrasound error code.";
break;
}
return( ErrorString );
}
/*---------------------------------------------------------------------
Function: D32DosMemAlloc
Allocate a block of Conventional memory.
---------------------------------------------------------------------*/
void *D32DosMemAlloc
(
unsigned size
)
{
union REGS r;
// DPMI allocate DOS memory
r.x.eax = 0x0100;
// Number of paragraphs requested
r.x.ebx = ( size + 15 ) >> 4;
int386( 0x31, &r, &r );
if ( r.x.cflag )
{
// Failed
return( NULL );
}
return( ( void * )( ( r.x.eax & 0xFFFF ) << 4 ) );
}
/*---------------------------------------------------------------------
Function: GUS_Init
Initializes the Gravis Ultrasound for sound and music playback.
---------------------------------------------------------------------*/
int GUS_Init
(
void
)
{
struct load_os os;
int ret;
if ( GUS_Installed > 0 )
{
GUS_Installed++;
return( GUS_Ok );
}
GUS_SetErrorCode( GUS_Ok );
GUS_Installed = 0;
GetUltraCfg( &os );
if ( os.forced_gf1_irq > 7 )
{
GUS_SetErrorCode( GUS_InvalidIrq );
return( GUS_Error );
}
if ( !HoldBufferAllocated )
{
GUS_HoldBuffer.vptr = D32DosMemAlloc( DMABUFFSIZE );
if ( GUS_HoldBuffer.vptr == NULL )
{
GUS_SetErrorCode( GUS_OutOfDosMemory );
return( GUS_Error );
}
GUS_HoldBuffer.paddr = ( unsigned long )GUS_HoldBuffer.vptr;
HoldBufferAllocated = TRUE;
}
os.voices = 24;
ret = gf1_load_os( &os );
if ( ret )
{
GUS_AuxError = ret;
GUS_SetErrorCode( GUS_GF1Error );
return( GUS_Error );
}
GUS_TotalMemory = gf1_mem_avail();
GUS_MemConfig = ( GUS_TotalMemory - 1 ) >> 18;
GUS_Installed = 1;
return( GUS_Ok );
}
/*---------------------------------------------------------------------
Function: GUS_Shutdown
Ends use of the Gravis Ultrasound. Must be called the same number
of times as GUS_Init.
---------------------------------------------------------------------*/
void GUS_Shutdown
(
void
)
{
if ( GUS_Installed > 0 )
{
GUS_Installed--;
if ( GUS_Installed == 0 )
{
gf1_unload_os();
}
}
}
/*---------------------------------------------------------------------
Function: GUSWAVE_Shutdown
Terminates use of the Gravis Ultrasound for digitized sound playback.
---------------------------------------------------------------------*/
void GUSWAVE_Shutdown
(
void
)
{
int i;
if ( GUSWAVE_Installed )
{
GUSWAVE_KillAllVoices();
// free memory
for ( i = 0; i < VOICES; i++ )
{
if ( GUSWAVE_Voices[ i ].mem != NULL )
{
gf1_free( GUSWAVE_Voices[ i ].mem );
GUSWAVE_Voices[ i ].mem = NULL;
}
}
GUS_Shutdown();
GUSWAVE_Installed = FALSE;
}
}

View file

@ -0,0 +1,561 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*********** ***********************************************************
file: GUSMIDI.C
author: James R. Dose
date: March 23, 1994
General MIDI playback functions for the Gravis Ultrasound
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
// Module MUST be compiled with structure allignment set to a maximum
// of 1 byte ( zp1 ).
#include <conio.h>
#include <dos.h>
#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include "usrhooks.h"
#include "interrup.h"
#include "newgf1.h"
#include "gusmidi.h"
#define TRUE ( 1 == 1 )
#define FALSE ( !TRUE )
// size of DMA buffer for patch loading
#define DMABUFFSIZE 2048U
#define MAX_MEM_CONFIG 3
// size of patch array (128 perc, 128 melodic)
#define NUM_PATCHES 256
// size of largest patch name
#define BIGGEST_NAME 9
#define UNUSED_PATCH -1
static struct patch Patch[ NUM_PATCHES ];
static unsigned char *PatchWaves[ NUM_PATCHES ];
static int PatchMap[ NUM_PATCHES ][ MAX_MEM_CONFIG + 1 ];
static char ProgramName[ NUM_PATCHES ][ BIGGEST_NAME ];
static char PatchLoaded[ NUM_PATCHES ];
static char ConfigFileName[] = "ULTRAMID.INI";
static char ConfigDirectory[ 80 ] = { '\0' };
// The name of the configuration directory
static char InstrumentDirectory[ 80 ];
extern struct gf1_dma_buff GUS_HoldBuffer;
extern unsigned long GUS_TotalMemory;
extern int GUS_MemConfig;
static int GUSMIDI_Volume = 255;
extern int GUS_AuxError;
extern int GUS_ErrorCode;
int GUSMIDI_Installed = FALSE;
#define GUS_SetErrorCode( status ) \
GUS_ErrorCode = ( status );
/*---------------------------------------------------------------------
Function: GUS_GetPatchMap
Reads the patch map from disk.
---------------------------------------------------------------------*/
int GUS_GetPatchMap
(
char *name
)
{
char text[ 80 ];
char *ud;
int index;
int ignore;
FILE *fp;
for( index = 0; index < NUM_PATCHES; index++ )
{
PatchMap[ index ][ 0 ] = UNUSED_PATCH;
PatchMap[ index ][ 1 ] = UNUSED_PATCH;
PatchMap[ index ][ 2 ] = UNUSED_PATCH;
PatchMap[ index ][ 3 ] = UNUSED_PATCH;
ProgramName[ index ][ 0 ] = 0;
}
ud = getenv( "ULTRADIR" );
if ( ud == NULL )
{
GUS_SetErrorCode( GUS_ULTRADIRNotSet );
return( GUS_Error );
}
strcpy( InstrumentDirectory, ud );
strcat( InstrumentDirectory, "\\midi\\" );
strcpy( ConfigDirectory, ud );
strcat( ConfigDirectory, "\\midi\\" );
strcpy( text, name );
fp = fopen( text, "r" );
if ( fp == NULL )
{
strcpy( text, InstrumentDirectory );
strcat( text, name );
fp = fopen( text, "r" );
if ( fp == NULL )
{
GUS_SetErrorCode( GUS_MissingConfig );
return( GUS_Error );
}
}
while( 1 )
{
if ( fgets( text, 80, fp ) == NULL )
{
break;
}
if ( text[ 0 ] == '#' )
{
continue;
}
if ( sscanf( text, "%d", &index ) != 1 )
{
continue;
}
sscanf( text, "%d, %d, %d, %d, %d, %s\n", &ignore,
&PatchMap[ index ][ 0 ],
&PatchMap[ index ][ 1 ],
&PatchMap[ index ][ 2 ],
&PatchMap[ index ][ 3 ],
ProgramName[ index ] );
}
fclose( fp );
return( GUS_Ok );
}
/*---------------------------------------------------------------------
Function: GUSMIDI_UnloadPatch
Unloads a patch from the GUS's memory.
---------------------------------------------------------------------*/
int GUSMIDI_UnloadPatch
(
int prognum
)
{
int prog;
unsigned flags;
prog = PatchMap[ prognum ][ GUS_MemConfig ];
if ( PatchLoaded[ prog ] )
{
flags = DisableInterrupts();
gf1_unload_patch( &Patch[ prog ] );
if ( PatchWaves[ prog ] != NULL )
{
USRHOOKS_FreeMem( PatchWaves[ prog ] );
PatchWaves[ prog ] = NULL;
}
// just in case sequence is still playing
Patch[ prog ].nlayers = 0;
PatchLoaded[ prog ] = FALSE;
RestoreInterrupts( flags );
}
return( GUS_Ok );
}
/*---------------------------------------------------------------------
Function: GUSMIDI_LoadPatch
Loads a patch into the GUS's memory.
---------------------------------------------------------------------*/
int GUSMIDI_LoadPatch
(
int prognum
)
{
int prog;
char text[ 80 ];
int ret;
unsigned char *wave_buff;
struct patchinfo patchi;
int status;
prog = PatchMap[ prognum ][ GUS_MemConfig ];
if ( ( PatchLoaded[ prog ] ) || ( prog == UNUSED_PATCH ) )
{
return( GUS_Ok );
}
if ( !ProgramName[ prog ][ 0 ] )
{
return( GUS_Ok );
}
strcpy( text, InstrumentDirectory );
strcat( text, ProgramName[ prog ] );
strcat( text, ".pat" );
ret = gf1_get_patch_info( text, &patchi );
if ( ret != OK )
{
GUS_AuxError = ret;
GUS_SetErrorCode( GUS_GF1Error );
return( GUS_Error );
}
status = USRHOOKS_GetMem( &wave_buff, patchi.header.wave_forms *
sizeof( struct wave_struct ) );
if ( status != USRHOOKS_Ok )
{
GUS_SetErrorCode( GUS_OutOfMemory );
return( GUS_Error );
}
ret = gf1_load_patch( text, &patchi, &Patch[ prog ], &GUS_HoldBuffer,
DMABUFFSIZE, ( unsigned char * )wave_buff, PATCH_LOAD_8_BIT );
if ( ret != OK )
{
USRHOOKS_FreeMem( wave_buff );
GUS_AuxError = ret;
GUS_SetErrorCode( GUS_GF1Error );
return( GUS_Error );
}
PatchWaves[ prog ] = wave_buff;
PatchLoaded[ prog ] = TRUE;
return( GUS_Ok );
}
/*---------------------------------------------------------------------
Function: GUSMIDI_ProgramChange
Selects the instrument to use on the specified MIDI channel.
---------------------------------------------------------------------*/
void GUSMIDI_ProgramChange
(
int channel,
int prognum
)
{
int prog;
prog = PatchMap[ prognum ][ GUS_MemConfig ];
if ( PatchLoaded[ prog ] )
{
gf1_midi_change_program( &Patch[ prog ], channel );
}
else
{
gf1_midi_change_program( NULL, channel );
}
}
/*---------------------------------------------------------------------
Function: GUSMIDI_NoteOn
Plays a note on the specified channel.
---------------------------------------------------------------------*/
void GUSMIDI_NoteOn
(
int chan,
int note,
int velocity
)
{
int prog;
if ( chan == 9 )
{
prog = PatchMap[ note + 128 ][ GUS_MemConfig ];
if ( PatchLoaded[ prog ] )
{
gf1_midi_note_on( &Patch[ note + 128 ], 1,
note, velocity, 9 );
}
}
else
{
gf1_midi_note_on( 0L, 1, note, velocity, chan );
}
}
/*---------------------------------------------------------------------
Function: GUSMIDI_NoteOff
Turns off a note on the specified channel.
---------------------------------------------------------------------*/
#pragma warn -par
void GUSMIDI_NoteOff
(
int chan,
int note,
int velocity
)
{
gf1_midi_note_off( note, chan );
}
#pragma warn .par
/*---------------------------------------------------------------------
Function: GUSMIDI_ControlChange
Sets the value of a controller on the specified channel.
---------------------------------------------------------------------*/
void GUSMIDI_ControlChange
(
int channel,
int number,
int value
)
{
gf1_midi_parameter( channel, number, value );
}
/*---------------------------------------------------------------------
Function: GUSMIDI_PitchBend
Sets the pitch bend on the specified MIDI channel.
---------------------------------------------------------------------*/
void GUSMIDI_PitchBend
(
int channel,
int lsb,
int msb
)
{
gf1_midi_pitch_bend( channel, lsb, msb );
}
/*---------------------------------------------------------------------
Function: GUSMIDI_ReleasePatches
Removes all the instruments from the GUS's memory.
---------------------------------------------------------------------*/
void GUSMIDI_ReleasePatches
(
void
)
{
int i;
for( i = 0; i < 256; i++ )
{
GUSMIDI_UnloadPatch( i );
}
}
/*---------------------------------------------------------------------
Function: GUSMIDI_SetVolume
Sets the total music volume.
---------------------------------------------------------------------*/
void GUSMIDI_SetVolume
(
int volume
)
{
// Set the minimum to 2 because 0 has a tremolo problem
volume = max( 2, volume );
volume = min( volume, 255 );
GUSMIDI_Volume = volume;
// range = 0 to 127
gf1_midi_synth_volume( 0, volume >> 1 );
}
/*---------------------------------------------------------------------
Function: GUSMIDI_GetVolume
Returns the total music volume.
---------------------------------------------------------------------*/
int GUSMIDI_GetVolume
(
void
)
{
return( GUSMIDI_Volume );
}
/*---------------------------------------------------------------------
Function: GUSMIDI_Init
Initializes the Gravis Ultrasound for music playback.
---------------------------------------------------------------------*/
int GUSMIDI_Init
(
void
)
{
int ret;
int i;
int startmem;
// unsigned long mem;
extern int GUSWAVE_Installed;
if ( GUSMIDI_Installed )
{
GUSMIDI_Shutdown();
}
ret = GUS_Init();
if ( ret != GUS_Ok )
{
return( ret );
}
if ( GUS_MemConfig < 0 )
{
GUS_MemConfig = 0;
}
if ( GUS_MemConfig > MAX_MEM_CONFIG )
{
GUS_MemConfig = MAX_MEM_CONFIG;
}
for( i = 0; i < NUM_PATCHES; i++ )
{
ProgramName[ i ][ 0 ] = '\0';
PatchWaves[ i ] = NULL;
PatchLoaded[ i ] = FALSE;
}
GUSMIDI_SetVolume( 255 );
GUSMIDI_Installed = TRUE;
ret = GUS_GetPatchMap( ConfigFileName );
if ( ret != GUS_Ok )
{
GUSMIDI_Shutdown();
return( ret );
}
// if ( !GUSWAVE_Installed )
// {
// mem = gf1_malloc( 8192 );
// }
startmem = gf1_mem_avail();
for( i = 0; i < NUM_PATCHES; i++ )
{
ret = GUSMIDI_LoadPatch( i );
if ( ret != GUS_Ok )
{
}
// if ( ret != GUS_Ok )
// {
// return( ret );
// }
}
// if ( !GUSWAVE_Installed )
// {
// gf1_free( mem );
// }
GUSMIDI_Installed = TRUE;
return( GUS_Ok );
}
/*---------------------------------------------------------------------
Function: GUSMIDI_Shutdown
Ends use of the Gravis Ultrasound for music playback.
---------------------------------------------------------------------*/
void GUSMIDI_Shutdown
(
void
)
{
GUSMIDI_ReleasePatches();
GUS_Shutdown();
GUSMIDI_Installed = FALSE;
}

View file

@ -0,0 +1,59 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GUSMIDI_H
#define __GUSMIDI_H
extern struct gf1_dma_buff GUS_HoldBuffer;
enum GUS_Errors
{
GUS_Warning = -2,
GUS_Error = -1,
GUS_Ok = 0,
GUS_OutOfMemory,
GUS_OutOfDosMemory,
GUS_OutOfDRAM,
GUS_GF1Error,
GUS_InvalidIrq,
GUS_ULTRADIRNotSet,
GUS_MissingConfig,
GUS_FileError
};
char *GUS_ErrorString( int ErrorNumber );
int GUS_GetPatchMap( char *name );
int GUSMIDI_UnloadPatch( int prog );
int GUSMIDI_LoadPatch( int prog );
void GUSMIDI_ProgramChange( int channel, int prog );
void GUSMIDI_NoteOn( int chan, int note, int velocity );
void GUSMIDI_NoteOff( int chan, int note, int velocity );
void GUSMIDI_ControlChange( int channel, int number, int value );
void GUSMIDI_PitchBend( int channel, int lsb, int msb );
void GUSMIDI_ReleasePatches( void );
void GUSMIDI_SetVolume( int volume );
int GUSMIDI_GetVolume( void );
int GUS_Init( void );
void GUS_Shutdown( void );
#pragma aux GUS_Shutdown frame;
int GUSMIDI_Init( void );
void GUSMIDI_Shutdown( void );
void *D32DosMemAlloc( unsigned size );
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,75 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: GUSWAVE.H
author: James R. Dose
date: March 23, 1994
Public header for for GUSWAVE.C
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __GUSWAVE_H
#define __GUSWAVE_H
#define GUSWAVE_MinVoiceHandle 1
enum GUSWAVE_Errors
{
GUSWAVE_Warning = -2,
GUSWAVE_Error = -1,
GUSWAVE_Ok = 0,
GUSWAVE_GUSError,
GUSWAVE_NotInstalled,
GUSWAVE_NoVoices,
GUSWAVE_UltraNoMem,
GUSWAVE_UltraNoMemMIDI,
GUSWAVE_VoiceNotFound,
GUSWAVE_InvalidVOCFile,
GUSWAVE_InvalidWAVFile
};
char *GUSWAVE_ErrorString( int ErrorNumber );
int GUSWAVE_VoicePlaying( int handle );
int GUSWAVE_VoicesPlaying( void );
int GUSWAVE_Kill( int handle );
int GUSWAVE_KillAllVoices( void );
int GUSWAVE_SetPitch( int handle, int pitchoffset );
int GUSWAVE_SetPan3D( int handle, int angle, int distance );
void GUSWAVE_SetVolume( int volume );
int GUSWAVE_GetVolume( void );
int GUSWAVE_VoiceAvailable( int priority );
int GUSWAVE_PlayVOC( char *sample, int pitchoffset, int angle, int volume,
int priority, unsigned long callbackval );
int GUSWAVE_PlayWAV( char *sample, int pitchoffset, int angle, int volume,
int priority, unsigned long callbackval );
int GUSWAVE_StartDemandFeedPlayback( void ( *function )( char **ptr, unsigned long *length ),
int channels, int bits, int rate, int pitchoffset, int angle,
int volume, int priority, unsigned long callbackval );
void GUSWAVE_SetCallBack( void ( *function )( unsigned long ) );
void GUSWAVE_SetReverseStereo( int setting );
int GUSWAVE_GetReverseStereo( void );
int GUSWAVE_Init( int numvoices );
void GUSWAVE_Shutdown( void );
#pragma aux GUSWAVE_Shutdown frame;
#endif

View file

@ -0,0 +1,50 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: INTERRUP.H
author: James R. Dose
date: March 31, 1994
Inline functions for disabling and restoring the interrupt flag.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __INTERRUPT_H
#define __INTERRUPT_H
unsigned long DisableInterrupts( void );
void RestoreInterrupts( unsigned long flags );
#ifdef PLAT_DOS
#pragma aux DisableInterrupts = \
"pushfd", \
"pop eax", \
"cli" \
modify [ eax ];
#pragma aux RestoreInterrupts = \
"push eax", \
"popfd" \
parm [ eax ];
#endif
#endif

View file

@ -0,0 +1,325 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: IRQ.C
author: James R. Dose
date: August 26, 1994
Low level routines to set and restore IRQ's through DPMI.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#include <dos.h>
#include <stdlib.h>
#include "irq.h"
#define D32RealSeg(P) ( ( ( ( unsigned long )( P ) ) >> 4 ) & 0xFFFF )
#define D32RealOff(P) ( ( ( unsigned long )( P ) ) & 0xF )
typedef struct
{
unsigned long drdi;
unsigned long drsi;
unsigned long drbp;
unsigned long drxx;
unsigned long drbx;
unsigned long drdx;
unsigned long drcx;
unsigned long drax;
unsigned short drflags;
unsigned short dres;
unsigned short drds;
unsigned short drfs;
unsigned short drgs;
unsigned short drip;
unsigned short drcs;
unsigned short drsp;
unsigned short drss;
} DPMI_REGS;
static DPMI_REGS rmregs = { 0 };
static void ( __interrupt __far *IRQ_Callback )( void ) = NULL;
static char *IRQ_RealModeCode = NULL;
static unsigned short IRQ_CallBackSegment;
static unsigned short IRQ_CallBackOffset;
static unsigned short IRQ_RealModeSegment;
static unsigned short IRQ_RealModeOffset;
static unsigned long IRQ_ProtectedModeOffset;
static unsigned short IRQ_ProtectedModeSelector;
static union REGS Regs;
static struct SREGS SegRegs;
static void *D32DosMemAlloc
(
unsigned long size
)
{
// DPMI allocate DOS memory
Regs.x.eax = 0x0100;
// Number of paragraphs requested
Regs.x.ebx = ( size + 15 ) >> 4;
int386( 0x31, &Regs, &Regs );
if ( Regs.x.cflag != 0 )
{
// Failed
return ( ( unsigned long )0 );
}
return( ( void * )( ( Regs.x.eax & 0xFFFF ) << 4 ) );
}
// Intermediary function: DPMI calls this, making it
// easier to write in C
// handle 16-bit incoming stack
void fixebp
(
void
);
#pragma aux fixebp = \
"mov bx, ss" \
"lar ebx, ebx" \
"bt ebx, 22" \
"jc bigstk" \
"movzx esp, sp" \
"mov ebp, esp" \
"bigstk:" \
modify exact [ ebx ];
#pragma aux rmcallback parm [];
void rmcallback
(
unsigned short _far *stkp
)
{
// "Pop" the real mode return frame so we
// can resume where we left off
rmregs.drip = *stkp++;
rmregs.drcs = *stkp++;
rmregs.drsp = FP_OFF(stkp);
// Call protected-mode handler
IRQ_Callback();
}
static void _interrupt _cdecl callback_x
(
// regs pushed in this order by prologue
int rgs,
int rfs,
int res,
int rds,
int rdi,
int rsi,
int rbp,
int rsp,
int rbx,
int rdx,
int rcx,
int rax
)
{
// unsigned short _far *stkp;
// return;
fixebp();
rmcallback (MK_FP(rds, rsi));
}
/*
static void _interrupt _cdecl callback_x
(
// regs pushed in this order by prologue
int rgs,
int rfs,
int res,
int rds,
int rdi,
int rsi,
int rbp,
int rsp,
int rbx,
int rdx,
int rcx,
int rax
)
{
unsigned short _far *stkp;
fixebp();
stkp = MK_FP(rds, rsi);
// "Pop" the real mode return frame so we
// can resume where we left off
rmregs.drip = *stkp++;
rmregs.drcs = *stkp++;
rmregs.drsp = FP_OFF(stkp);
// Call protected-mode handler
IRQ_Callback();
}
*/
int IRQ_SetVector
(
int vector,
void ( __interrupt __far *function )( void )
)
{
void far *fp;
IRQ_Callback = function;
// Save the starting real-mode and protected-mode handler addresses
// DPMI get protected mode vector */
Regs.w.ax = 0x0204;
Regs.w.bx = vector;
int386( 0x31, &Regs, &Regs );
IRQ_ProtectedModeSelector = Regs.w.cx;
IRQ_ProtectedModeOffset = Regs.x.edx;
// DPMI get real mode vector
Regs.w.ax = 0x0200;
Regs.w.bx = vector;
int386( 0x31, &Regs, &Regs );
IRQ_RealModeSegment = Regs.w.cx;
IRQ_RealModeOffset = Regs.w.dx;
// Set up callback
// DPMI allocate real mode callback
Regs.w.ax = 0x0303;
fp = ( void far * )callback_x;
SegRegs.ds = FP_SEG( fp );
Regs.x.esi = FP_OFF( fp );
fp = ( void _far * )&rmregs;
SegRegs.es = FP_SEG( fp );
Regs.x.edi = FP_OFF( fp );
int386x( 0x31, &Regs, &Regs, &SegRegs );
IRQ_CallBackSegment = Regs.w.cx;
IRQ_CallBackOffset = Regs.w.dx;
if ( Regs.x.cflag != 0 )
{
return( IRQ_Error );
}
if ( IRQ_RealModeCode == NULL )
{
// Allocate 6 bytes of low memory for real mode interrupt handler
IRQ_RealModeCode = D32DosMemAlloc( 6 );
if ( IRQ_RealModeCode == NULL )
{
// Free callback
Regs.w.ax = 0x304;
Regs.w.cx = IRQ_CallBackSegment;
Regs.w.dx = IRQ_CallBackOffset;
int386x( 0x31, &Regs, &Regs, &SegRegs );
return( IRQ_Error );
}
}
// Poke code (to call callback) into real mode handler
// CALL FAR PTR (callback)
IRQ_RealModeCode[ 0 ] = '\x9A';
*( ( unsigned short * )&IRQ_RealModeCode[ 1 ] ) = IRQ_CallBackOffset;
*( ( unsigned short * )&IRQ_RealModeCode[ 3 ] ) = IRQ_CallBackSegment;
// IRET
IRQ_RealModeCode[ 5 ] = '\xCF';
// Install protected mode handler
// DPMI set protected mode vector
Regs.w.ax = 0x0205;
Regs.w.bx = vector;
fp = function;
Regs.w.cx = FP_SEG( fp );
Regs.x.edx = FP_OFF( fp );
int386( 0x31, &Regs, &Regs );
// Install callback address as real mode handler
// DPMI set real mode vector
Regs.w.ax = 0x0201;
Regs.w.bx = vector;
Regs.w.cx = D32RealSeg( IRQ_RealModeCode );
Regs.w.dx = D32RealOff( IRQ_RealModeCode );
int386( 0x31, &Regs, &Regs );
return( IRQ_Ok );
}
int IRQ_RestoreVector
(
int vector
)
{
// Restore original interrupt handlers
// DPMI set real mode vector
Regs.w.ax = 0x0201;
Regs.w.bx = vector;
Regs.w.cx = IRQ_RealModeSegment;
Regs.w.dx = IRQ_RealModeOffset;
int386( 0x31, &Regs, &Regs );
Regs.w.ax = 0x0205;
Regs.w.bx = vector;
Regs.w.cx = IRQ_ProtectedModeSelector;
Regs.x.edx = IRQ_ProtectedModeOffset;
int386( 0x31, &Regs, &Regs );
// Free callback
Regs.w.ax = 0x304;
Regs.w.cx = IRQ_CallBackSegment;
Regs.w.dx = IRQ_CallBackOffset;
int386x( 0x31, &Regs, &Regs, &SegRegs );
if ( Regs.x.cflag )
{
return( IRQ_Error );
}
return( IRQ_Ok );
}

View file

@ -0,0 +1,54 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: IRQ.H
author: James R. Dose
date: August 8, 1994
Public header for IRQ.C
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __IRQ_H
#define __IRQ_H
enum IRQ_ERRORS
{
IRQ_Warning = -2,
IRQ_Error = -1,
IRQ_Ok = 0,
};
#define VALID_IRQ( irq ) ( ( ( irq ) >= 0 ) && ( ( irq ) <= 15 ) )
int IRQ_SetVector
(
int vector,
void ( __interrupt *function )( void )
);
int IRQ_RestoreVector
(
int vector
);
#endif

View file

@ -0,0 +1,290 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
typedef struct
{
unsigned char SAVEK[ 2 ];
unsigned char Level[ 2 ];
unsigned char Env1[ 2 ];
unsigned char Env2[ 2 ];
unsigned char Wave[ 2 ];
unsigned char Feedback;
signed char Transpose;
signed char Velocity;
} TIMBRE;
TIMBRE ADLIB_TimbreBank[ 256 ] =
{
{ { 33, 49 }, { 79, 0 }, { 242, 210 }, { 82, 115 }, { 0, 0 }, 6, 0 },
{ { 19, 17 }, { 198, 10 }, { 242, 241 }, { 245, 245 }, { 1, 0 }, 0, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 3, 18 }, { 48, 16 }, { 246, 242 }, { 25, 244 }, { 0, 0 }, 15, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 24, 129 }, { 98, 0 }, { 243, 242 }, { 230, 246 }, { 0, 0 }, 0, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 23, 2 }, { 79, 16 }, { 242, 242 }, { 96, 114 }, { 0, 0 }, 8, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 178, 176 }, { 192, 134 }, { 159, 148 }, { 6, 15 }, { 1, 1 }, 9, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 178, 176 }, { 192, 128 }, { 159, 148 }, { 6, 15 }, { 1, 1 }, 9, 0 },
{ { 130, 128 }, { 192, 134 }, { 145, 145 }, { 246, 246 }, { 1, 1 }, 9, 0 },
{ { 36, 49 }, { 79, 27 }, { 242, 82 }, { 11, 11 }, { 0, 0 }, 14, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 35, 33 }, { 72, 0 }, { 149, 132 }, { 25, 25 }, { 1, 0 }, 8, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 19, 49 }, { 150, 128 }, { 254, 242 }, { 33, 148 }, { 0, 0 }, 10, 0 },
{ { 1, 17 }, { 77, 0 }, { 242, 245 }, { 83, 116 }, { 1, 1 }, 8, 0 },
{ { 33, 40 }, { 1, 9 }, { 148, 148 }, { 25, 9 }, { 0, 0 }, 6, 0 },
{ { 33, 40 }, { 1, 19 }, { 148, 148 }, { 25, 9 }, { 0, 0 }, 6, 0 },
{ { 36, 194 }, { 138, 3 }, { 250, 145 }, { 111, 248 }, { 0, 0 }, 8, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 33 }, { 26, 0 }, { 241, 246 }, { 207, 72 }, { 0, 0 }, 10, 0 },
{ { 1, 34 }, { 29, 0 }, { 183, 196 }, { 34, 55 }, { 0, 0 }, 14, 0 },
{ { 49, 34 }, { 30, 0 }, { 242, 241 }, { 239, 104 }, { 0, 0 }, 14, 0 },
{ { 49, 34 }, { 30, 0 }, { 242, 245 }, { 239, 120 }, { 0, 0 }, 14, 0 },
{ { 49, 34 }, { 30, 0 }, { 242, 245 }, { 239, 120 }, { 0, 0 }, 14, 0 },
{ { 17, 49 }, { 5, 9 }, { 249, 241 }, { 37, 52 }, { 0, 0 }, 10, 0 },
{ { 17, 49 }, { 5, 0 }, { 249, 241 }, { 37, 52 }, { 0, 0 }, 10, 0 },
{ { 49, 114 }, { 138, 0 }, { 213, 97 }, { 25, 27 }, { 0, 0 }, 12, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 17, 17 }, { 150, 128 }, { 165, 245 }, { 85, 179 }, { 2, 1 }, 12, 0 },
{ { 1, 17 }, { 156, 128 }, { 128, 240 }, { 5, 6 }, { 0, 0 }, 0, 0 },
{ { 17, 17 }, { 150, 128 }, { 165, 245 }, { 85, 179 }, { 2, 1 }, 12, 0 },
{ { 2, 1 }, { 153, 128 }, { 245, 246 }, { 85, 83 }, { 0, 0 }, 0, 0 },
{ { 192, 0 }, { 13, 0 }, { 165, 212 }, { 67, 35 }, { 2, 1 }, 0, 0 },
{ { 33, 32 }, { 88, 0 }, { 194, 97 }, { 227, 22 }, { 1, 3 }, 0, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 34 }, { 22, 0 }, { 176, 179 }, { 129, 44 }, { 0, 1 }, 12, 0 },
{ { 49, 114 }, { 91, 131 }, { 244, 138 }, { 21, 5 }, { 0, 0 }, 0, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 33 }, { 29, 0 }, { 113, 129 }, { 174, 158 }, { 0, 0 }, 14, 0 },
{ { 49, 97 }, { 28, 128 }, { 65, 146 }, { 11, 59 }, { 0, 0 }, 14, 0 },
{ { 49, 241 }, { 28, 0 }, { 65, 146 }, { 11, 27 }, { 0, 0 }, 10, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 33 }, { 155, 0 }, { 97, 127 }, { 106, 10 }, { 0, 0 }, 2, 0 },
{ { 225, 226 }, { 21, 3 }, { 113, 129 }, { 174, 158 }, { 0, 0 }, 14, 0 },
{ { 33, 33 }, { 29, 0 }, { 113, 129 }, { 174, 158 }, { 0, 0 }, 14, 0 },
{ { 33, 33 }, { 77, 0 }, { 84, 166 }, { 60, 28 }, { 0, 0 }, 8, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 50 }, { 79, 0 }, { 113, 82 }, { 83, 76 }, { 0, 0 }, 10, 0 },
{ { 33, 50 }, { 79, 0 }, { 113, 82 }, { 83, 76 }, { 0, 0 }, 10, 0 },
{ { 32, 49 }, { 78, 0 }, { 113, 82 }, { 104, 94 }, { 0, 0 }, 10, 0 },
{ { 33, 33 }, { 75, 0 }, { 170, 143 }, { 22, 10 }, { 1, 0 }, 8, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 50, 97 }, { 154, 130 }, { 81, 162 }, { 27, 59 }, { 0, 0 }, 12, 0 },
{ { 50, 33 }, { 192, 0 }, { 155, 114 }, { 33, 7 }, { 0, 0 }, 4, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 162 }, { 131, 141 }, { 116, 101 }, { 23, 23 }, { 0, 0 }, 7, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 225, 98 }, { 236, 0 }, { 110, 101 }, { 143, 42 }, { 0, 0 }, 14, 0 },
{ { 50, 33 }, { 144, 0 }, { 155, 114 }, { 33, 23 }, { 0, 0 }, 4, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 245, 242 }, { 154, 128 }, { 12, 96 }, { 199, 165 }, { 0, 0 }, 13, 0 },
{ { 98, 161 }, { 147, 0 }, { 119, 118 }, { 7, 7 }, { 0, 0 }, 11, 0 },
{ { 34, 33 }, { 89, 8 }, { 255, 255 }, { 3, 15 }, { 2, 0 }, 0, 0 },
{ { 33, 33 }, { 29, 0 }, { 113, 129 }, { 14, 14 }, { 0, 0 }, 14, 0 },
{ { 34, 33 }, { 70, 128 }, { 134, 100 }, { 85, 24 }, { 0, 0 }, 0, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 113, 114 }, { 93, 0 }, { 84, 106 }, { 1, 3 }, { 0, 0 }, 0, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 0, 17 }, { 13, 128 }, { 241, 80 }, { 255, 255 }, { 0, 0 }, 6, 0 },
{ { 33, 97 }, { 137, 3 }, { 17, 66 }, { 51, 37 }, { 0, 0 }, 10, 0 },
{ { 0, 49 }, { 16, 128 }, { 17, 176 }, { 239, 15 }, { 0, 0 }, 10, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 164, 97 }, { 76, 16 }, { 243, 129 }, { 115, 35 }, { 1, 0 }, 4, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 1, 1 }, { 0, 0 }, { 255, 255 }, { 7, 7 }, { 0, 0 }, 7, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 1, 221 }, { 0, 0 }, { 246, 31 }, { 0, 6 }, { 2, 3 }, 12, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 36 },
{ { 16, 17 }, { 68, 0 }, { 248, 243 }, { 119, 6 }, { 2, 0 }, 8, 36 },
{ { 3, 15 }, { 0, 0 }, { 251, 245 }, { 43, 11 }, { 2, 0 }, 15, 36 },
{ { 33, 0 }, { 128, 0 }, { 255, 249 }, { 7, 7 }, { 0, 1 }, 14, 36 },
{ { 240, 229 }, { 192, 0 }, { 255, 251 }, { 255, 240 }, { 3, 0 }, 14, 48 },
{ { 33, 0 }, { 128, 0 }, { 255, 248 }, { 10, 25 }, { 0, 1 }, 14, 36 },
{ { 1, 0 }, { 0, 0 }, { 250, 242 }, { 124, 4 }, { 0, 0 }, 0, 48 },
{ { 12, 18 }, { 0, 0 }, { 246, 251 }, { 8, 71 }, { 0, 2 }, 10, 69 },
{ { 1, 0 }, { 0, 0 }, { 250, 242 }, { 124, 4 }, { 0, 0 }, 0, 52 },
{ { 14, 0 }, { 64, 8 }, { 118, 119 }, { 79, 24 }, { 0, 2 }, 14, 48 },
{ { 1, 0 }, { 0, 0 }, { 250, 242 }, { 124, 4 }, { 0, 0 }, 0, 55 },
{ { 2, 5 }, { 3, 10 }, { 180, 151 }, { 4, 247 }, { 0, 0 }, 14, 57 },
{ { 1, 0 }, { 0, 0 }, { 250, 242 }, { 124, 4 }, { 0, 0 }, 0, 58 },
{ { 1, 0 }, { 0, 0 }, { 250, 242 }, { 124, 4 }, { 0, 0 }, 0, 60 },
{ { 1, 221 }, { 12, 0 }, { 246, 159 }, { 0, 2 }, { 0, 3 }, 12, 62 },
{ { 1, 0 }, { 0, 0 }, { 250, 242 }, { 124, 4 }, { 0, 0 }, 0, 63 },
{ { 12, 18 }, { 0, 0 }, { 246, 203 }, { 2, 67 }, { 0, 2 }, 10, 70 },
{ { 12, 18 }, { 0, 0 }, { 246, 203 }, { 2, 19 }, { 0, 2 }, 10, 70 },
{ { 14, 7 }, { 6, 68 }, { 248, 244 }, { 66, 228 }, { 3, 3 }, 14, 53 },
{ { 14, 0 }, { 64, 8 }, { 150, 183 }, { 79, 24 }, { 0, 2 }, 14, 48 },
{ { 1, 221 }, { 0, 0 }, { 246, 159 }, { 0, 2 }, { 2, 3 }, 12, 84 },
{ { 2, 9 }, { 27, 0 }, { 245, 246 }, { 118, 214 }, { 2, 0 }, 4, 43 },
{ { 0, 223 }, { 9, 0 }, { 246, 147 }, { 0, 67 }, { 0, 2 }, 14, 56 },
{ { 128, 144 }, { 13, 0 }, { 248, 159 }, { 0, 4 }, { 2, 3 }, 14, 24 },
{ { 12, 18 }, { 0, 0 }, { 246, 203 }, { 2, 67 }, { 0, 2 }, 10, 65 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 1, 2 }, { 84, 0 }, { 250, 248 }, { 141, 184 }, { 0, 0 }, 6, 48 },
{ { 1, 2 }, { 84, 0 }, { 250, 248 }, { 141, 184 }, { 0, 0 }, 6, 51 },
{ { 1, 2 }, { 84, 0 }, { 250, 248 }, { 141, 184 }, { 0, 0 }, 6, 54 },
{ { 2, 4 }, { 0, 0 }, { 250, 200 }, { 191, 151 }, { 0, 0 }, 11, 42 },
{ { 2, 4 }, { 0, 0 }, { 250, 200 }, { 191, 151 }, { 0, 0 }, 11, 39 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 14, 0 }, { 64, 8 }, { 118, 119 }, { 79, 24 }, { 0, 2 }, 14, 64 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 128, 17 }, { 0, 0 }, { 255, 111 }, { 6, 22 }, { 3, 0 }, 14, 52 },
{ { 128, 17 }, { 0, 0 }, { 255, 79 }, { 6, 22 }, { 3, 0 }, 14, 52 },
{ { 6, 21 }, { 63, 0 }, { 0, 247 }, { 244, 245 }, { 0, 0 }, 1, 60 },
{ { 6, 21 }, { 63, 0 }, { 0, 247 }, { 244, 245 }, { 0, 0 }, 1, 66 },
{ { 6, 21 }, { 63, 0 }, { 0, 247 }, { 244, 245 }, { 0, 0 }, 1, 59 },
{ { 65, 66 }, { 69, 0 }, { 252, 105 }, { 69, 5 }, { 0, 0 }, 0, 91 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 23, 2 }, { 79, 16 }, { 242, 242 }, { 96, 114 }, { 0, 0 }, 8, 109 },
{ { 14, 0 }, { 64, 8 }, { 118, 119 }, { 79, 24 }, { 0, 2 }, 14, 64 },
{ { 133, 132 }, { 5, 64 }, { 249, 214 }, { 50, 165 }, { 3, 0 }, 14, 79 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 },
{ { 33, 17 }, { 17, 0 }, { 163, 196 }, { 67, 34 }, { 2, 0 }, 13, 0 }
};

View file

@ -0,0 +1,118 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __linklist_h
#define __linklist_h
#ifdef __cplusplus
extern "C" {
#endif
#define NewNode(type) ((type*)SafeMalloc(sizeof(type)))
#define LL_CreateNewLinkedList(rootnode,type,next,prev) \
{ \
(rootnode) = NewNode(type); \
(rootnode)->prev = (rootnode); \
(rootnode)->next = (rootnode); \
}
#define LL_AddNode(rootnode, newnode, next, prev) \
{ \
(newnode)->next = (rootnode); \
(newnode)->prev = (rootnode)->prev; \
(rootnode)->prev->next = (newnode); \
(rootnode)->prev = (newnode); \
}
#define LL_TransferList(oldroot,newroot,next,prev) \
{ \
if ((oldroot)->prev != (oldroot)) \
{ \
(oldroot)->prev->next = (newroot); \
(oldroot)->next->prev = (newroot)->prev; \
(newroot)->prev->next = (oldroot)->next; \
(newroot)->prev = (oldroot)->prev; \
(oldroot)->next = (oldroot); \
(oldroot)->prev = (oldroot); \
} \
}
#define LL_ReverseList(root,type,next,prev) \
{ \
type *newend,*trav,*tprev; \
\
newend = (root)->next; \
for(trav = (root)->prev; trav != newend; trav = tprev) \
{ \
tprev = trav->prev; \
LL_MoveNode(trav,newend,next,prev); \
} \
}
#define LL_RemoveNode(node,next,prev) \
{ \
(node)->prev->next = (node)->next; \
(node)->next->prev = (node)->prev; \
(node)->next = (node); \
(node)->prev = (node); \
}
#define LL_SortedInsertion(rootnode,insertnode,next,prev,type,sortparm) \
{ \
type *hoya; \
\
hoya = (rootnode)->next; \
while((hoya != (rootnode)) && ((insertnode)->sortparm > hoya->sortparm)) \
{ \
hoya = hoya->next; \
} \
LL_AddNode(hoya,(insertnode),next,prev); \
}
#define LL_MoveNode(node,newroot,next,prev) \
{ \
LL_RemoveNode((node),next,prev); \
LL_AddNode((newroot),(node),next,prev); \
}
#define LL_ListEmpty(list,next,prev) \
( \
((list)->next == (list)) && \
((list)->prev == (list)) \
)
#define LL_Free(list) SafeFree(list)
#define LL_Reset(list,next,prev) (list)->next = (list)->prev = (list)
#define LL_New LL_CreateNewLinkedList
#define LL_Remove LL_RemoveNode
#define LL_Add LL_AddNode
#define LL_Empty LL_ListEmpty
#define LL_Move LL_MoveNode
#ifdef __cplusplus
};
#endif
#endif

View file

@ -0,0 +1,173 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: LL_MAN.C
author: James R. Dose
date: January 1, 1994
Linked list management routines.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#define LOCKMEMORY
#include <stddef.h>
#include "ll_man.h"
#ifdef LOCKMEMORY
#include "dpmi.h"
#endif
#define OFFSET( structure, offset ) \
( *( ( char ** )&( structure )[ offset ] ) )
/**********************************************************************
Memory locked functions:
**********************************************************************/
#define LL_LockStart LL_AddNode
void LL_AddNode
(
char *item,
char **head,
char **tail,
int next,
int prev
)
{
OFFSET( item, prev ) = NULL;
OFFSET( item, next ) = *head;
if ( *head )
{
OFFSET( *head, prev ) = item;
}
else
{
*tail = item;
}
*head = item;
}
void LL_RemoveNode
(
char *item,
char **head,
char **tail,
int next,
int prev
)
{
if ( OFFSET( item, prev ) == NULL )
{
*head = OFFSET( item, next );
}
else
{
OFFSET( OFFSET( item, prev ), next ) = OFFSET( item, next );
}
if ( OFFSET( item, next ) == NULL )
{
*tail = OFFSET( item, prev );
}
else
{
OFFSET( OFFSET( item, next ), prev ) = OFFSET( item, prev );
}
OFFSET( item, next ) = NULL;
OFFSET( item, prev ) = NULL;
}
/*---------------------------------------------------------------------
Function: LL_LockEnd
Used for determining the length of the functions to lock in memory.
---------------------------------------------------------------------*/
static void LL_LockEnd
(
void
)
{
}
/*---------------------------------------------------------------------
Function: LL_UnlockMemory
Unlocks all neccessary data.
---------------------------------------------------------------------*/
void LL_UnlockMemory
(
void
)
{
#ifdef LOCKMEMORY
DPMI_UnlockMemoryRegion( LL_LockStart, LL_LockEnd );
#endif
}
/*---------------------------------------------------------------------
Function: LL_LockMemory
Locks all neccessary data.
---------------------------------------------------------------------*/
int LL_LockMemory
(
void
)
{
#ifdef LOCKMEMORY
int status;
status = DPMI_LockMemoryRegion( LL_LockStart, LL_LockEnd );
if ( status != DPMI_Ok )
{
return( LL_Error );
}
#endif
return( LL_Ok );
}

View file

@ -0,0 +1,76 @@
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************
module: LL_MAN.H
author: James R. Dose
date: February 4, 1994
Public header for LL_MAN.C. Linked list management routines.
(c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/
#ifndef __LL_MAN_H
#define __LL_MAN_H
enum LL_Errors
{
LL_Warning = -2,
LL_Error = -1,
LL_Ok = 0
};
typedef struct list
{
void *start;
void *end;
} list;
void LL_AddNode( char *node, char **head, char **tail, int next, int prev );
void LL_RemoveNode( char *node, char **head, char **tail, int next, int prev );
void LL_UnlockMemory( void );
int LL_LockMemory( void );
#define LL_AddToHead( type, listhead, node ) \
LL_AddNode( ( char * )( node ), \
( char ** )&( ( listhead )->start ), \
( char ** )&( ( listhead )->end ), \
( int )&( ( type * ) 0 )->next, \
( int )&( ( type * ) 0 )->prev )
#define LL_AddToTail( type, listhead, node ) \
LL_AddNode( ( char * )( node ), \
( char ** )&( ( listhead )->end ), \
( char ** )&( ( listhead )->start ), \
( int )&( ( type * ) 0 )->prev, \
( int )&( ( type * ) 0 )->next )
#define LL_Remove( type, listhead, node ) \
LL_RemoveNode( ( char * )( node ), \
( char ** )&( ( listhead )->start ), \
( char ** )&( ( listhead )->end ), \
( int )&( ( type * ) 0 )->next, \
( int )&( ( type * ) 0 )->prev )
#define LL_NextNode( node ) ( ( node )->next )
#define LL_PreviousNode( node ) ( ( node )->prev )
#endif

Some files were not shown because too many files have changed in this diff Show more