From 2fa4a2a885c385b8fe353798e87b16a03f0b5e95 Mon Sep 17 00:00:00 2001 From: nobody Date: Thu, 29 May 2003 06:26:31 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'd2x-0_2_2'. --- ChangeLog | 30 ---------------------- Info.plist.in | 30 ---------------------- Makefile.am | 66 ------------------------------------------------ NEWS | 9 ------- README | 5 ++++ configure.ac | 21 +++------------ libmve/mveplay.c | 16 +++++------- main/Makefile.am | 2 +- main/bm.c | 8 +++--- main/inferno.c | 17 ++++--------- main/titles.c | 6 ++--- 11 files changed, 28 insertions(+), 182 deletions(-) delete mode 100644 Info.plist.in diff --git a/ChangeLog b/ChangeLog index ab45b24c..7828ae88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,33 +1,3 @@ -0.2.4: - -2003-05-12 Bradley Bell - - * configure.ac: increment version number - - * main/bm.c: use con_printf for exit model warnings - - * configure.ac: must check for timespec after setting -mno-cygwin - - * main/inferno.c: added -nohogdir and -userdir options - - * NEWS, main/titles.c: use briefings with no extension - -0.2.3: - -2003-04-30 Bradley Bell - - * configure.ac: have to include time.h when checking for nanosleep - - * configure.ac, libmve/mveplay.c: use autoconf to check for struct - timespec - - * Makefile.am, NEWS, README, configure.ac: fix linking bug, - increment version number - - * main/Makefile.am: make dist fix - -0.2.2: - 2003-04-29 Bradley Bell * configure.ac, 2d/2dsline.c, main/automap.c, libmve/mveplay.c: diff --git a/Info.plist.in b/Info.plist.in deleted file mode 100644 index a4b3e848..00000000 --- a/Info.plist.in +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - @TARGETS@ - CFBundleGetInfoString - @VERSION@, Copyright 2003 Bradley Bell - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - @PACKAGE@ - CFBundlePackageType - APPL - CFBundleShortVersionString - @VERSION@ - CFBundleSignature - ???? - CFBundleVersion - @VERSION@ - NSMainNibFile - SDLMain.nib - NSPrincipalClass - NSApplication - NSHumanReadableCopyright - Copyright 2003 Bradley Bell - - diff --git a/Makefile.am b/Makefile.am index 28db43f2..4b4f1d0d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,14 +2,6 @@ SUBDIRS = 2d 3d maths mem cfile iff texmap misc arch main libmve utilities EXTRA_SUBDIRS = include unused debian rpm -if BUILD_MACOSX_BUNDLE -bundle_contents = @PACKAGE@.app/Contents -else -if BUILD_SIMPLE_BUNDLE -bundle_contents = @PACKAGE@ -endif -endif - bin_PROGRAMS = @TARGETS@ EXTRA_PROGRAMS = d2x d2x-sdl d2x-gl d2x-svga d2x-ggi @@ -20,10 +12,6 @@ if MINGW32 LD_KLUDGE = main/inferno.o endif -if MACOSX -AM_LDFLAGS = -all_load -endif - if EDITOR EDITOR_LIBS = main/editor/libeditor.a endif @@ -56,60 +44,6 @@ dist-hook: pkgdatadir = @sharepath@ missiondir = ${pkgdatadir}/missions -CLEANFILES = @TARGETS@ Info.plist - -if BUILD_MACOSX_BUNDLE - -@PACKAGE@_bundle: @TARGETS@ - mkdir -p $(bundle_contents)/MacOS - echo "APPL????" > $(bundle_contents)/PkgInfo - $(INSTALL_DATA) Info.plist $(bundle_contents) - $(INSTALL_PROGRAM) @TARGETS@ $(bundle_contents)/MacOS/ - -install-exec-hook: @PACKAGE@_bundle - rm -rf $(DESTDIR)$(prefix)/@PACKAGE@.app - mkdir -p $(DESTDIR)$(prefix)/ - cp -r @PACKAGE@.app $(DESTDIR)$(prefix)/ - -clean-local: - rm -rf $(bundle_contents) - -else - -if BUILD_SIMPLE_BUNDLE - -@PACKAGE@_bundle: @TARGETS@ - $(INSTALL_PROGRAM) @TARGETS@ $(bundle_contents)/ - -install-exec-hook: @PACKAGE@_bundle - rm -rf $(DESTDIR)/$(prefix)/@PACKAGE@ - mkdir -p $(DESTDIR)/$(prefix)/ - cp COPYING @PACKAGE@/COPYING.txt - cp COPYING.LIB @PACKAGE@/COPYING_LIB.txt - cp ChangeLog @PACKAGE@/ChangeLog.txt - cp TODO @PACKAGE@/TODO.txt - cp README @PACKAGE@/README.txt - cp README.jp @PACKAGE@/README_jp.txt - cp README.sfont @PACKAGE@/sfont.txt - cp README.xkobo @PACKAGE@/xkobo.txt - cp README.xkobo.jp @PACKAGE@/xkobo_jp.txt - cp 501 @PACKAGE@/scores/42 - cp -r @PACKAGE@ $(DESTDIR)/$(prefix)/ - -clean-local: - rm -rf $(bundle_contents) - -else -@PACKAGE@_bundle: - -install-exec-hook: - -clean-local: - -endif - -endif - EXTRA_DIST = ${EXTRA_SUBDIRS} \ ChangeLog \ README.utils \ diff --git a/NEWS b/NEWS index 7cab2a01..3ba36334 100644 --- a/NEWS +++ b/NEWS @@ -1,12 +1,3 @@ ---- Version 0.2.4 --- -- Fix crash on some mission briefings - ---- Version 0.2.3 --- -- Fix linking bug on OS X - ---- Version 0.2.2 --- -- Support for OS X 10.2 added - --- Version 0.2.1 --- - D1 Mac versions should now work. diff --git a/README b/README index 46ca5552..2e0baa20 100644 --- a/README +++ b/README @@ -130,6 +130,11 @@ Compile and install SDL from source: d2x doesn't use Project Builder. configure and compile as with other unices. +The final linking will probably fail (because of circular +dependencies, I think) Until I fix it or find a better workaround, +I've just been linking by hand (i.e. gcc [...] -o d2x-sdl `find +. -name "*.o"` [...]) + Known bugs/issues: * Serial and network support missing * GL version very buggy diff --git a/configure.ac b/configure.ac index 8cc5f1a4..28e671bd 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ define([D2X_MAJOR],0) define([D2X_MINOR],2) -define([D2X_MICRO],4) +define([D2X_MICRO],2) AC_INIT(d2x,[D2X_MAJOR.D2X_MINOR.D2X_MICRO],[descent-source@warpcore.org]) AC_PREREQ(2.52) @@ -36,6 +36,7 @@ AC_PROG_CXX AC_STDC_HEADERS AC_PATH_PROGS(NASM, nasm nasmw, no) AC_C_BIGENDIAN +AC_CHECK_DECLS(nanosleep) case $host_cpu in sparc) @@ -43,9 +44,6 @@ case $host_cpu in ;; esac -build_macosx_bundle=no -build_simple_bundle=no - case $host_os in cygwin) AC_MSG_WARN([Cygwin found, setting -mno-cygwin]) @@ -57,22 +55,12 @@ case $host_os in ;; darwin*) MACOSX=yes - AC_MSG_RESULT(Mac OS X/Darwin; Mac OS X bundle) - build_macosx_bundle=yes - DATADIR='EXE>>../Resources' - #SCOREDIR='/Library/Preferences/KoboDeluxe/scores' - #CONFIGDIR='HOME>>Library/Preferences' - #CONFIGFILE='KoboDeluxe Preferences' - MATHLIB="" - ;; + ;; msdos*) MSDOS=yes ;; esac -AC_CHECK_DECLS(nanosleep,,,[#include ]) -AC_CHECK_TYPES(struct timespec) - AM_CONDITIONAL(MINGW32, test x$MINGW32 = xyes) if test x$MINGW32 = xyes; then GL_LIBS="opengl32 glu32" @@ -83,8 +71,6 @@ else fi AM_CONDITIONAL(MACOSX, test x$MACOSX = xyes) -AM_CONDITIONAL(BUILD_MACOSX_BUNDLE, test x$build_macosx_bundle = xyes) -AM_CONDITIONAL(BUILD_SIMPLE_BUNDLE, test x$build_simple_bundle = xyes) dnl Set $prefix and $exec_prefix to $ac_default_prefix if they are not set test "x$prefix" = "xNONE" && prefix=$ac_default_prefix @@ -390,7 +376,6 @@ AC_OUTPUT( utilities/Makefile debian/changelog rpm/d2x.spec - Info.plist ) AC_MSG_RESULT([ diff --git a/libmve/mveplay.c b/libmve/mveplay.c index b377a394..8c6d48b9 100644 --- a/libmve/mveplay.c +++ b/libmve/mveplay.c @@ -1,4 +1,4 @@ -/* $Id: mveplay.c,v 1.11 2003-04-30 20:05:52 btb Exp $ */ +/* $Id: mveplay.c,v 1.10 2003-04-29 08:05:41 btb Exp $ */ #ifdef HAVE_CONFIG_H #include #endif @@ -130,14 +130,6 @@ static int micro_frame_delay=0; static int timer_started=0; static struct timeval timer_expire = {0, 0}; -#if !HAVE_STRUCT_TIMESPEC -struct timespec -{ - long int tv_sec; /* Seconds. */ - long int tv_nsec; /* Nanoseconds. */ -}; -#endif - #if defined(HAVE_DECL_NANOSLEEP) && !HAVE_DECL_NANOSLEEP int nanosleep(struct timespec *ts, void *rem); #endif @@ -145,6 +137,12 @@ int nanosleep(struct timespec *ts, void *rem); #ifdef __WIN32 #include +struct timespec +{ + long int tv_sec; /* Seconds. */ + long int tv_nsec; /* Nanoseconds. */ +}; + int gettimeofday(struct timeval *tv, void *tz) { static int counter = 0; diff --git a/main/Makefile.am b/main/Makefile.am index bc57cadb..0fd6118a 100644 --- a/main/Makefile.am +++ b/main/Makefile.am @@ -33,7 +33,7 @@ songs.c state.c switch.c terrain.c texmerge.c \ text.c titles.c vclip.c wall.c weapon.c EXTRA_libmain_a_SOURCES = \ -kmatrix.c multi.c multibot.c network.c netmisc.c \ +kmatrix.c multi.c multibot.c network.c \ bmread.c EXTRA_DIST = ${EXTRA_SUBDIRS} \ diff --git a/main/bm.c b/main/bm.c index d76a1d3a..2dbc0508 100644 --- a/main/bm.c +++ b/main/bm.c @@ -1,4 +1,4 @@ -/* $Id: bm.c,v 1.32 2003-05-13 01:13:08 btb Exp $ */ +/* $Id: bm.c,v 1.31 2003-03-29 22:34:59 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -669,7 +669,7 @@ int load_exit_models() !bm_load_extra_objbitmap("rbot061.bbm") || !bm_load_extra_objbitmap("rbot063.bbm")) { - con_printf(CON_NORMAL, "Can't load exit models!\n"); + Warning("Can't load exit models!\n"); return 0; } @@ -719,7 +719,7 @@ int load_exit_models() case D1_OEM_PIGSIZE: case D1_MAC_PIGSIZE: case D1_MAC_SHARE_PIGSIZE: - con_printf(CON_NORMAL, "Can't load exit models!\n"); + Warning("Can't load exit models!\n"); return 0; break; } @@ -737,7 +737,7 @@ int load_exit_models() cfclose(exit_hamfile); } else { - con_printf(CON_NORMAL, "Can't load exit models!\n"); + Warning("Can't load exit models!\n"); return 0; } diff --git a/main/inferno.c b/main/inferno.c index 30744a99..11962683 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -1,4 +1,4 @@ -/* $Id: inferno.c,v 1.62 2003-05-12 22:46:01 btb Exp $ */ +/* $Id: inferno.c,v 1.61 2003-04-24 18:19:05 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -916,10 +916,6 @@ void print_commandline_help() printf( " -maxfps %s\n", "Set maximum framerate (1-100)"); printf( " -notitles %s\n", "Do not show titlescreens on startup"); printf( " -hogdir %s\n", "set shared data directory to "); -#ifdef __unix__ - printf( " -nohogdir %s\n", "don't try to use shared data directory"); - printf( " -userdir %s\n", "set user dir to instead of $HOME/.d2x"); -#endif printf( " -ini %s\n", "option file (alternate to command line), defaults to d2x.ini"); printf( " -autodemo %s\n", "Start in demo mode"); printf( " -bigpig %s\n","FIXME: Undocumented"); @@ -1190,16 +1186,11 @@ int main(int argc, char *argv[]) error_init(NULL, NULL); - InitArgs( argc,argv ); - #ifdef __unix__ { char *home = getenv("HOME"); - if ((t = FindArg("-userdir"))) - chdir(Args[t+1]); - - else if (home) { + if (home) { char buf[PATH_MAX + 5]; strcpy(buf, home); @@ -1213,6 +1204,8 @@ int main(int argc, char *argv[]) } #endif + InitArgs( argc,argv ); + if (FindArg("-debug")) con_threshold.value = (float)2; else if (FindArg("-verbose")) @@ -1222,7 +1215,7 @@ int main(int argc, char *argv[]) if ((t=FindArg("-hogdir"))) cfile_use_alternate_hogdir(Args[t+1]); #ifdef __unix__ - else if (!FindArg("-nohogdir")) + else cfile_use_alternate_hogdir(SHAREPATH); #endif diff --git a/main/titles.c b/main/titles.c index d27eff7f..60e1c5a2 100644 --- a/main/titles.c +++ b/main/titles.c @@ -1,4 +1,4 @@ -/* $Id: titles.c,v 1.25 2003-05-12 22:45:10 btb Exp $ */ +/* $Id: titles.c,v 1.24 2003-03-01 12:50:45 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -1207,8 +1207,8 @@ int load_screen_text(char *filename, char **buf) char nfilename[30], *ptr; strcpy(nfilename, filename); - if ((ptr = strrchr(nfilename, '.'))) - *ptr = '\0'; + ptr = strrchr(nfilename, '.'); + *ptr = '\0'; strcat(nfilename, ".txb"); if ((ifile = cfopen(nfilename, "rb")) == NULL) { mprintf ((0,"can't open %s!\n",nfilename)); -- 2.39.2