From: Holger Schemel Date: Mon, 27 Sep 1999 23:39:42 +0000 (+0200) Subject: rnd-19990928-1-src X-Git-Tag: 1.4.0^2~11 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=c21cf4c301f745142f3cbb4987efe6446a3a8c4e;p=rocksndiamonds.git rnd-19990928-1-src --- diff --git a/CHANGES b/CHANGES index 4a42a215..b5c47ee1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,43 @@ +Release Version 1.3.5 [?? SEP 1999] +----------------------------------- + - new cool medium-sized crystal font + - new elements and graphics for Diamond Caves II levels + - new elements and graphics for Emerald Mine Club levels + - brushed-up (higher resolution) graphics for Supaplex elements + - new elements for more authentic Emerald Mine elements (doors) + - more level editor enhancements: + element list scrollbar and level number selection within editor + - lots of new levels converted from Emerald Mine Club disks, + DX-Boulderdash and Supaplex + - new levels created and contributed by players + - now over 160 level series with over 14.000 levels + - high score list now scrollable to see all 100 entries + - new 16-bit elements level format to allow more than 256 elements + - re-introduced level handicap for more challange (levels must be + solved to be able to play the next one; can be disabled in setup) + - new setup option to disable time limit for relaxed playing :-) + - GAME_DIR path split into RO_GAME_DIR and RW_GAME_DIR to allow + distributors to separate read-only (levels, graphics, sounds) + from writable (hich scores) game data + - new personal level setup files to store level handicap and + last played level for each level series + - removed some 32-bit dependent code; should be 64-bit clean now + - some little bugs fixed + +Release Version 1.3.0 [5 FEB 1999] +---------------------------------- + - strongly enhanced level editor + - new elements, graphics and levels for Supaplex style games + - completely rewritten platform independent gadget code + (buttons, scrollbars, text and number input gadgets) + - nasty sound bug fixed (showed up with Linux kernel 2.2.x) + Release Version 1.2.0 [5 DEC 1998] --------------------------------------------------------- +---------------------------------- - DOS/Windows version - - new WAV sound loader - - new PCX graphics loader + - new WAV sound loader (to replace the old Amiga 8SVX files) + - new PCX graphics loader (to avoid GIF license problems) - network multiplayer games with upto four players - no separate network server needed; each client can fork a network server at startup if there's no server @@ -38,12 +72,12 @@ Release Version 1.2.0 [5 DEC 1998] execution Release Version 1.1 [???] [NOT RELEASED] ----------------------------------- +---------------------------------------- - new (but broken) GIF graphics loader to be independent - from the XPM library and replace all graphics by GIFs. + from the XPM library and to replace all graphics by GIF files Release Version 1.0 [9 APR 1997] [NOT RELEASED] ---------------------------------------------- +----------------------------------------------- - the game now contains many really playable levels, not only a few levels for testing - the game is now even better playable by keyboard @@ -60,11 +94,11 @@ Release Version 1.0 [9 APR 1997] [NOT RELEASED] position Prerelease Version 0.9b2 [21 NOV 1995] [NOT RELEASED] ---------------------------------------------------- +----------------------------------------------------- - new game elements Prerelease Version 0.9b [4 NOV 1995] ----------------------------------- +------------------------------------ - the game is now completely Freeware - the game is now better playable by keyboard (in the last version, the player was making more than @@ -80,5 +114,5 @@ Prerelease Version 0.9b [4 NOV 1995] Zucconi) Prerelease Version 0.9 [23 OCT 1995] ----------------------------------- +------------------------------------ - first (pre)release version diff --git a/src/Makefile b/src/Makefile index c27e4c54..4a065da3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -60,7 +60,7 @@ LIBS = -L$(XLIB_PATH) $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS) else RM = del PROGNAME = ../rocks.exe -LIBS = -lm -lalleg +LIBS = -s -lm -lalleg endif CPP = $(CC) -E diff --git a/src/files.c b/src/files.c index bcd3574d..1e44ad71 100644 --- a/src/files.c +++ b/src/files.c @@ -1640,6 +1640,15 @@ static int LoadLevelInfoFromLevelDir(char *level_directory, int start_entry) leveldir[current_entry].color = LEVELCOLOR(&leveldir[current_entry]); leveldir[current_entry].class_desc = getLevelClassDescription(&leveldir[current_entry]); +#if 0 + leveldir[current_entry].handicap_level = + leveldir[current_entry].first_level; /* default value */ +#else + leveldir[current_entry].handicap_level = + (leveldir[current_entry].user_defined ? + leveldir[current_entry].last_level : + leveldir[current_entry].first_level); +#endif freeSetupFileList(setup_file_list); current_entry++; @@ -2000,8 +2009,12 @@ void LoadLevelSetup_SeriesInfo(int leveldir_nr) char *level_subdir = leveldir[leveldir_nr].filename; /* always start with reliable default values */ +#if 0 level_nr = 0; leveldir[leveldir_nr].handicap_level = 0; +#else + level_nr = leveldir[leveldir_nr].first_level; +#endif checkSeriesInfo(leveldir_nr); @@ -2040,6 +2053,9 @@ void LoadLevelSetup_SeriesInfo(int leveldir_nr) if (level_nr > leveldir[leveldir_nr].last_level + 1) level_nr = leveldir[leveldir_nr].last_level; + if (leveldir[leveldir_nr].user_defined) + level_nr = leveldir[leveldir_nr].last_level; + leveldir[leveldir_nr].handicap_level = level_nr; } @@ -2090,39 +2106,22 @@ void SaveLevelSetup_SeriesInfo(int leveldir_nr) } #ifdef MSDOS -static boolean initErrorFile() +void initErrorFile() { char *filename; - FILE *error_file; InitUserDataDirectory(); filename = getPath2(getUserDataDir(), ERROR_FILENAME); - error_file = fopen(filename, "w"); + unlink(filename); free(filename); - - if (error_file == NULL) - return FALSE; - - fclose(error_file); - - return TRUE; } FILE *openErrorFile() { - static boolean first_access = TRUE; char *filename; FILE *error_file; - if (first_access) - { - if (!initErrorFile()) - return NULL; - - first_access = FALSE; - } - filename = getPath2(getUserDataDir(), ERROR_FILENAME); error_file = fopen(filename, "a"); free(filename); diff --git a/src/files.h b/src/files.h index ae27e21e..79971cd6 100644 --- a/src/files.h +++ b/src/files.h @@ -36,6 +36,7 @@ void LoadLevelSetup_SeriesInfo(int); void SaveLevelSetup_SeriesInfo(int); #ifdef MSDOS +void initErrorFile(); FILE *openErrorFile(); void dumpErrorFile(); #endif diff --git a/src/init.c b/src/init.c index 0a2e0b03..b8fe9cc7 100644 --- a/src/init.c +++ b/src/init.c @@ -55,6 +55,10 @@ static void InitElementProperties(void); void OpenAll(int argc, char *argv[]) { +#ifdef MSDOS + initErrorFile(); +#endif + if (options.serveronly) { NetworkServer(options.server_port, options.serveronly); diff --git a/src/msdos.c b/src/msdos.c index df72b8eb..d9dd5e79 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -516,7 +516,10 @@ static BITMAP *Image_to_AllegroBitmap(Image *image) /* allocate new allegro bitmap structure */ if ((bitmap = create_bitmap_ex(depth, image->width, image->height)) == NULL) + { + errno_pcx = PCX_NoMemory; return NULL; + } clear(bitmap); @@ -582,17 +585,11 @@ static BITMAP *Read_PCX_to_AllegroBitmap(char *filename) /* read the graphic file in PCX format to internal image structure */ if ((image = Read_PCX_to_Image(filename)) == NULL) - { - Error(ERR_RETURN, "Read_PCX_to_Image failed"); return NULL; - } /* convert internal image structure to allegro bitmap structure */ if ((bitmap = Image_to_AllegroBitmap(image)) == NULL) - { - Error(ERR_RETURN, "Image_to_AllegroBitmap failed"); return NULL; - } set_palette(global_colormap); @@ -605,7 +602,7 @@ int Read_PCX_to_Pixmap(Display *display, Window window, GC gc, char *filename, BITMAP *bitmap; if ((bitmap = Read_PCX_to_AllegroBitmap(filename)) == NULL) - return PCX_FileInvalid; + return errno_pcx; *pixmap = (Pixmap)bitmap; *pixmap_mask = (Pixmap)bitmap;