-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
- 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]
-----------------------------------
endif
ifeq ($(PLATFORM),macosx)
-# PROGNAME = ../Rocks\'n\'Diamonds.app/Contents/MacOS/$(PROGBASE)
PLATFORM = unix
TARGET=sdl
endif
CONFIG = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES) $(JOYSTICK)
-DEBUG = -DDEBUG -g
+# DEBUG = -DDEBUG -g
# PROFILING = $(PROFILING_FLAGS)
# OPTIONS = $(DEBUG) -Wall # only for debugging purposes
-#define COMPILE_DATE_STRING "[2002-07-31 22:20]"
+#define COMPILE_DATE_STRING "[2002-08-05 02:26]"
{
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)
{
printf("\n");
printf("%s\n", getFormattedSetupEntry("name", "Classic Sounds"));
printf("\n");
+ printf("%s\n", getFormattedSetupEntry("sort_priority", "100"));
+ printf("\n");
for (i=0; i<NUM_SOUND_EFFECTS; i++)
printf("# %s\n",
}
else if (strcmp(command, "create musicinfo.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 Music"));
printf("\n");
+ printf("%s\n", getFormattedSetupEntry("sort_priority", "100"));
}
}
return;
}
- if (Mix_OpenAudio(DEFAULT_AUDIO_SAMPLE_RATE, AUDIO_S16,
+ if (Mix_OpenAudio(DEFAULT_AUDIO_SAMPLE_RATE, MIX_DEFAULT_FORMAT,
AUDIO_NUM_CHANNELS_STEREO,
DEFAULT_AUDIO_FRAGMENT_SIZE) < 0)
{
IS_LEVELCLASS_USER(n) ? 7 : \
9)
+#define ARTWORKCOLOR(n) (IS_ARTWORKCLASS_CLASSICS(n) ? FC_RED : \
+ IS_ARTWORKCLASS_CONTRIBUTION(n) ? FC_YELLOW : \
+ IS_ARTWORKCLASS_LEVEL(n) ? FC_GREEN : \
+ IS_ARTWORKCLASS_USER(n) ? FC_RED : \
+ FC_BLUE)
+
+#define ARTWORKSORTING(n) (IS_ARTWORKCLASS_CLASSICS(n) ? 0 : \
+ IS_ARTWORKCLASS_CONTRIBUTION(n) ? 1 : \
+ IS_ARTWORKCLASS_LEVEL(n) ? 2 : \
+ IS_ARTWORKCLASS_USER(n) ? 3 : \
+ 9)
+
#define TOKEN_VALUE_POSITION 40
#define TOKEN_COMMENT_POSITION 60
for (i=0; i<(depth + 1) * 3; i++)
printf(" ");
- printf("filename == '%s' (%s) [%s]\n",
- node->filename, 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);
{
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)
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;
}
(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") */
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
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);