From: Holger Schemel Date: Mon, 5 Aug 2002 02:01:14 +0000 (+0200) Subject: rocksndiamonds-2.1.0 X-Git-Tag: 2.1.0^2 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=688d5ecd9dd6a29a959a6becf05c5fcba7fc90af;p=rocksndiamonds.git rocksndiamonds-2.1.0 --- diff --git a/CHANGES b/CHANGES index c5e1c905..6112c0b0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ -Release Version 2.1.0 [XX XXX XXXX] +Release Version 2.1.0 [05 AUG 2002] ----------------------------------- + - native Mac OS X port (finally!) - graphics, sounds and music now fully configurable - added support for TrueColor PCX graphics files - added support for 16 bit WAV sound files @@ -16,6 +17,13 @@ Release Version 2.1.0 [XX XXX XXXX] - fixed memory leak in image loading code - fixed some "solid" elements that were accidentally destructible - fixed some tape stuff + - added new contributed levels from the following players: + + Conor Mancone + + Gavin Davidson + + Jerome Kunegis + + Rüdiger Schäfer + + Flyboy: level group "Cops and Robbers", with own graphics set + - added custom graphics set "Animal Kingdom" by Flyboy Release Version 2.0.1 [19 MAR 2002] ----------------------------------- diff --git a/src/Makefile b/src/Makefile index ad10d1fe..e935b51d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -49,7 +49,6 @@ PLATFORM = unix endif ifeq ($(PLATFORM),macosx) -# PROGNAME = ../Rocks\'n\'Diamonds.app/Contents/MacOS/$(PROGBASE) PLATFORM = unix TARGET=sdl endif @@ -103,7 +102,7 @@ CONFIG_GAME_DIR = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR) CONFIG = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES) $(JOYSTICK) -DEBUG = -DDEBUG -g +# DEBUG = -DDEBUG -g # PROFILING = $(PROFILING_FLAGS) # OPTIONS = $(DEBUG) -Wall # only for debugging purposes diff --git a/src/conftime.h b/src/conftime.h index 6379b4f9..28ed84b5 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-07-31 22:20]" +#define COMPILE_DATE_STRING "[2002-08-05 02:26]" diff --git a/src/init.c b/src/init.c index 41bdc360..0e1fc339 100644 --- a/src/init.c +++ b/src/init.c @@ -1680,10 +1680,11 @@ void Execute_Debug_Command(char *command) { if (strcmp(command, "create graphicsinfo.conf") == 0) { - printf("# (Currently only the \"name\" directive is recognized.)\n"); + printf("# (Currently only \"name\" and \"sort_priority\" recognized.)\n"); printf("\n"); printf("%s\n", getFormattedSetupEntry("name", "Classic Graphics")); printf("\n"); + printf("%s\n", getFormattedSetupEntry("sort_priority", "100")); } else if (strcmp(command, "create soundsinfo.conf") == 0) { @@ -1694,6 +1695,8 @@ void Execute_Debug_Command(char *command) printf("\n"); printf("%s\n", getFormattedSetupEntry("name", "Classic Sounds")); printf("\n"); + printf("%s\n", getFormattedSetupEntry("sort_priority", "100")); + printf("\n"); for (i=0; ifilename, node->name, node->name_short); + printf("filename == '%s' (%s) [%s] (%d)\n", + node->filename, node->name, node->name_short, node->sort_priority); if (node->node_group != NULL) dumpTreeInfo(node->node_group, depth + 1); @@ -1322,8 +1334,20 @@ static int compareTreeInfoEntries(const void *object1, const void *object2) { const TreeInfo *entry1 = *((TreeInfo **)object1); const TreeInfo *entry2 = *((TreeInfo **)object2); + int class_sorting1, class_sorting2; int compare_result; + if (entry1->type == TREE_TYPE_LEVEL_DIR) + { + class_sorting1 = LEVELSORTING(entry1); + class_sorting2 = LEVELSORTING(entry2); + } + else + { + class_sorting1 = ARTWORKSORTING(entry1); + class_sorting2 = ARTWORKSORTING(entry2); + } + if (entry1->parent_link || entry2->parent_link) compare_result = (entry1->parent_link ? -1 : +1); else if (entry1->sort_priority == entry2->sort_priority) @@ -1336,10 +1360,10 @@ static int compareTreeInfoEntries(const void *object1, const void *object2) free(name1); free(name2); } - else if (LEVELSORTING(entry1) == LEVELSORTING(entry2)) + else if (class_sorting1 == class_sorting2) compare_result = entry1->sort_priority - entry2->sort_priority; else - compare_result = LEVELSORTING(entry1) - LEVELSORTING(entry2); + compare_result = class_sorting1 - class_sorting2; return compare_result; } @@ -1660,7 +1684,7 @@ static boolean LoadArtworkInfoFromArtworkConf(TreeInfo **node_first, (artwork_new->basepath == OPTIONS_ARTWORK_DIRECTORY(type) ? FALSE : TRUE); /* (may use ".sort_priority" from "setup_file_list" above) */ - artwork_new->color = LEVELCOLOR(artwork_new); + artwork_new->color = ARTWORKCOLOR(artwork_new); artwork_new->class_desc = getLevelClassDescription(artwork_new); if (setup_file_list == NULL) /* (after determining ".user_defined") */ @@ -1673,15 +1697,15 @@ static boolean LoadArtworkInfoFromArtworkConf(TreeInfo **node_first, if (artwork_new->user_defined) { artwork_new->name = getStringCopy("private"); - artwork_new->sort_priority = LEVELCLASS_USER; + artwork_new->sort_priority = ARTWORKCLASS_USER; } else { artwork_new->name = getStringCopy("classic"); - artwork_new->sort_priority = LEVELCLASS_CLASSICS; + artwork_new->sort_priority = ARTWORKCLASS_CLASSICS; } - artwork_new->color = LEVELCOLOR(artwork_new); + artwork_new->color = ARTWORKCOLOR(artwork_new); artwork_new->class_desc = getLevelClassDescription(artwork_new); } else diff --git a/src/libgame/setup.h b/src/libgame/setup.h index 5096f2b7..f299f3d9 100644 --- a/src/libgame/setup.h +++ b/src/libgame/setup.h @@ -134,6 +134,42 @@ struct TokenInfo IS_LEVELCLASS_DX(n) ? LEVELCLASS_DX : \ LEVELCLASS_UNDEFINED) +/* sort priorities of artwork */ +#define ARTWORKCLASS_CLASSICS_START 100 +#define ARTWORKCLASS_CLASSICS_END 199 +#define ARTWORKCLASS_CONTRIBUTION_START 200 +#define ARTWORKCLASS_CONTRIBUTION_END 299 +#define ARTWORKCLASS_LEVEL_START 300 +#define ARTWORKCLASS_LEVEL_END 399 +#define ARTWORKCLASS_USER_START 400 +#define ARTWORKCLASS_USER_END 499 + +#define ARTWORKCLASS_CLASSICS ARTWORKCLASS_CLASSICS_START +#define ARTWORKCLASS_CONTRIBUTION ARTWORKCLASS_CONTRIBUTION_START +#define ARTWORKCLASS_LEVEL ARTWORKCLASS_LEVEL_START +#define ARTWORKCLASS_USER ARTWORKCLASS_USER_START + +#define ARTWORKCLASS_UNDEFINED 999 + +#define IS_ARTWORKCLASS_CLASSICS(p) \ + ((p)->sort_priority >= ARTWORKCLASS_CLASSICS_START && \ + (p)->sort_priority <= ARTWORKCLASS_CLASSICS_END) +#define IS_ARTWORKCLASS_CONTRIBUTION(p) \ + ((p)->sort_priority >= ARTWORKCLASS_CONTRIBUTION_START && \ + (p)->sort_priority <= ARTWORKCLASS_CONTRIBUTION_END) +#define IS_ARTWORKCLASS_LEVEL(p) \ + ((p)->sort_priority >= ARTWORKCLASS_LEVEL_START && \ + (p)->sort_priority <= ARTWORKCLASS_LEVEL_END) +#define IS_ARTWORKCLASS_USER(p) \ + ((p)->sort_priority >= ARTWORKCLASS_USER_START && \ + (p)->sort_priority <= ARTWORKCLASS_USER_END) + +#define ARTWORKCLASS(n) (IS_ARTWORKCLASS_CLASSICS(n) ? ARTWORKCLASS_CLASSICS :\ + IS_ARTWORKCLASS_CONTRIBUTION(n) ? ARTWORKCLASS_CONTRIBUTION : \ + IS_ARTWORKCLASS_LEVEL(n) ? ARTWORKCLASS_LEVEL : \ + IS_ARTWORKCLASS_USER(n) ? ARTWORKCLASS_USER : \ + ARTWORKCLASS_UNDEFINED) + char *getLevelFilename(int); char *getTapeFilename(int);