From: Holger Schemel Date: Sun, 17 Sep 2000 02:37:22 +0000 (+0200) Subject: rnd-20000917-1-src X-Git-Tag: 2.0.0^2~42 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8be31c2781126204470171aff7af45713ec42e9e;p=rocksndiamonds.git rnd-20000917-1-src --- diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..697475a7 --- /dev/null +++ b/INSTALL @@ -0,0 +1,85 @@ + +Installation instructions for Rocks'n'Diamonds 1.2.0 +==================================================== + +Compilation +----------- + +If your system supports Linux/i386/ELF/libc5 executables (Linux package) +or if you run DOS/Windows (DOS package), you can directly use the included +precompiled binary. + +If you use a different system, just recompile the game: + +If you use Linux with gcc or DOS/Windows with djgpp, just try 'make' +which should work without problems. + +If you use SUN/Solaris with gcc and GNU make, try 'make solaris'. + +If the above doesn't work, edit the Makefile in the top level directory. +If it doesn't work either, edit the Makefile in the 'src' subdirectory. + +If you had to modify any Makefile to compile it, please drop me a note +about it to 'aeglos@valinor.owl.de'. Thanks! + + +Customization +------------- + +The following configuration options in the top level Makefile help +you to customize the game to your system and your environment: + +CC Choose your favorite ANSI C compiler. + Default is 'gcc'. + +PLATFORM Choose your platform, if auto detection fails. + Auto detection should work for Linux and DOS + (just type 'make'), on SUN/Solaris systems 'make solaris' + should work. Other systems may need additional editing + of 'src/Makefile' to set some additional compiler options. + +X11_PATH Specify the path to your X11 installation. Include files + and libraries are searched for at $(X11_PATH)/include and + $(X11_PATH)/lib, if you set this variables. If you don't + set this variable, your compiler must be able to find X11 + by itself, which works fine for Linux, for example. + +GAME_DIR Specify the directory where the program looks for all the + graphics, sounds, levels and high scores. If you leave this + commented out, the current directory ('.') is used, which + lets you use the game without installing it somewhere in + your system (although you have to 'cd' to the game directory + each time you want to play it). + +JOYSTICK Uncomment this line if your system does not support game + port hardware like joysticks (and has therefore no joystick + include file). Currently the game should work with joysticks + on Linux and FreeBSD. + +SOUNDS Uncomment this line if your system does not support audio + hardware. Currently the game should work with sound support + on Linux, FreeBSD, SUN/Solaris, HP-UX and most Unix system + that support '/dev/dsp' or '/dev/audio' devices. + +SCORE_ENTRIES Choose if you want to allow many entries in the high score + table for one player or exactly one entry. Systems with a + lot of users maybe want to limit high score entries to only + one entry for each player (and therefore set 'SCORE_ENTRIES' + to 'ONE_PER_NAME') where systems used by only one person + maybe want to use the default of 'MANY_PER_NAME' which is + automatically choosen if you leave everything commented out. + +Modifications of the Makefile in the directory 'src' are normally not needed. +If the game fails to compile out of the box, you may have to modify some +of the system variables there to get it to compile. + +SYSTEM May need to be set to some system dependend values. + +INCL, LIBS Maybe some more directories for include files and libraries + have to be added to this variables depending on your system. + + +If you have any comments, additions or modifications to the Makefile(s), +please send me mail: 'aeglos@valinor.owl.de'. Thanks! + +05-DEC-1998, Holger Schemel diff --git a/Makefile b/Makefile index 10909b96..93533d6d 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ sdl: @$(MAKE_CMD) TARGET=sdl sdl_old: - @$(MAKE_CMD) TARGET=sdl_old_10 + @$(MAKE_CMD) TARGET=sdl USE_SDL_OLD_LIBS=true solaris: @$(MAKE_CMD) PLATFORM=solaris @@ -76,3 +76,28 @@ windows: clean: @$(MAKE_CMD) clean + + +#-----------------------------------------------------------------------------# +# development only stuff # +#-----------------------------------------------------------------------------# + +backup: + ./Scripts/make_backup.sh src + +backup_lev: + ./Scripts/make_backup.sh lev + +backup_gfx: + ./Scripts/make_backup.sh gfx + +dist-unix: + ./Scripts/make_dist.sh unix . + +dist-dos: + ./Scripts/make_dist.sh dos . + +dist: dist-unix dist-dos + +depend dep: + $(MAKE_CMD) depend diff --git a/src/Makefile b/src/Makefile index cdef423e..d034771b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -41,13 +41,6 @@ else PROFILING = -pg endif -ifeq ($(TARGET),sdl_old_10) -TARGET = sdl -USE_SDL_OLD_LIBS = true -else -USE_SDL_OLD_LIBS = false -endif - ifeq ($(TARGET),sdl) USE_SDL = true else @@ -169,3 +162,15 @@ clean: $(RM) *.o $(RM) ../*.exe $(RM) $(PROGNAME) + + +#-----------------------------------------------------------------------------# +# development only stuff # +#-----------------------------------------------------------------------------# + +depend: + for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend + +ifeq (.depend,$(wildcard .depend)) +include .depend +endif diff --git a/src/game.c b/src/game.c index 5561d17c..0b731c32 100644 --- a/src/game.c +++ b/src/game.c @@ -712,8 +712,7 @@ void InitGame() DrawAllPlayers(); FadeToFront(); - /* after drawing the level, corect some elements */ - + /* after drawing the level, correct some elements */ if (game.timegate_time_left == 0) CloseAllOpenTimegates(); diff --git a/src/init.c b/src/init.c index 9c842f45..c591c0db 100644 --- a/src/init.c +++ b/src/init.c @@ -228,6 +228,7 @@ void InitSound() if (!LoadSound(&Sound[i])) { sound_status = SOUND_OFF; + sound_loops_allowed = FALSE; return; } } diff --git a/src/misc.c b/src/misc.c index 2389f59a..aaad307a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1182,8 +1182,13 @@ boolean validLevelSeries(struct LevelDirInfo *node) struct LevelDirInfo *getFirstValidLevelSeries(struct LevelDirInfo *node) { - if (node == NULL) /* start with first level directory entry */ - return getFirstValidLevelSeries(leveldir_first); + if (node == NULL) + { + if (leveldir_first) /* start with first level directory entry */ + return getFirstValidLevelSeries(leveldir_first); + else + return NULL; + } else if (node->node_group) /* enter level group (step down into tree) */ return getFirstValidLevelSeries(node->node_group); else if (node->parent_link) /* skip start entry of level group */