projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20061019-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
misc.c
diff --git
a/src/libgame/misc.c
b/src/libgame/misc.c
index c4b351e7a72bf00e791c6fda8ae1c711d54fbf32..ec16eeee4568f1b7c95a23b5d810a64c1edfcad9 100644
(file)
--- a/
src/libgame/misc.c
+++ b/
src/libgame/misc.c
@@
-1544,7
+1544,7
@@
void deleteNodeFromList(ListNode **node_first, char *key,
if (strEqual((*node_first)->key, key))
{
if (strEqual((*node_first)->key, key))
{
- free((*node_first)->key);
+
checked_
free((*node_first)->key);
if (destructor_function)
destructor_function((*node_first)->content);
*node_first = (*node_first)->next;
if (destructor_function)
destructor_function((*node_first)->content);
*node_first = (*node_first)->next;
@@
-1761,6
+1761,12
@@
int get_parameter_value(char *value_raw, char *suffix, int type)
strEqual(value, "up") ? MV_UP :
strEqual(value, "down") ? MV_DOWN : MV_NONE);
}
strEqual(value, "up") ? MV_UP :
strEqual(value, "down") ? MV_DOWN : MV_NONE);
}
+ else if (strEqual(suffix, ".align"))
+ {
+ result = (strEqual(value, "left") ? ALIGN_LEFT :
+ strEqual(value, "right") ? ALIGN_RIGHT :
+ strEqual(value, "center") ? ALIGN_CENTER : ALIGN_DEFAULT);
+ }
else if (strEqual(suffix, ".anim_mode"))
{
result = (string_has_parameter(value, "none") ? ANIM_NONE :
else if (strEqual(suffix, ".anim_mode"))
{
result = (string_has_parameter(value, "none") ? ANIM_NONE :
@@
-1774,6
+1780,7
@@
int get_parameter_value(char *value_raw, char *suffix, int type)
string_has_parameter(value, "ce_delay") ? ANIM_CE_DELAY :
string_has_parameter(value, "horizontal") ? ANIM_HORIZONTAL :
string_has_parameter(value, "vertical") ? ANIM_VERTICAL :
string_has_parameter(value, "ce_delay") ? ANIM_CE_DELAY :
string_has_parameter(value, "horizontal") ? ANIM_HORIZONTAL :
string_has_parameter(value, "vertical") ? ANIM_VERTICAL :
+ string_has_parameter(value, "centered") ? ANIM_CENTERED :
ANIM_DEFAULT);
if (string_has_parameter(value, "reverse"))
ANIM_DEFAULT);
if (string_has_parameter(value, "reverse"))
@@
-2726,14
+2733,11
@@
char *getErrorFilename(char *basename)
void openErrorFile()
{
void openErrorFile()
{
- /* always start with reliable default values */
- program.error_file = stderr;
+ InitUserDataDirectory();
-#if defined(PLATFORM_WIN32) || defined(PLATFORM_MSDOS)
if ((program.error_file = fopen(program.error_filename, MODE_WRITE)) == NULL)
fprintf_newline(stderr, "ERROR: cannot open file '%s' for writing!",
program.error_filename);
if ((program.error_file = fopen(program.error_filename, MODE_WRITE)) == NULL)
fprintf_newline(stderr, "ERROR: cannot open file '%s' for writing!",
program.error_filename);
-#endif
}
void closeErrorFile()
}
void closeErrorFile()