projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2da0cf3
)
changed handling artwork info cache to allow partial (default) entries
author
Holger Schemel
<info@artsoft.org>
Fri, 24 Nov 2017 20:12:42 +0000
(21:12 +0100)
committer
Holger Schemel
<info@artsoft.org>
Fri, 23 Mar 2018 22:21:16 +0000
(23:21 +0100)
src/libgame/setup.c
patch
|
blob
|
history
diff --git
a/src/libgame/setup.c
b/src/libgame/setup.c
index f28df34f30713cc103e0ce83b88a854fb85fd243..f2f5984f702ce2947bfa4c77bc4a4b1ff9086f8b 100644
(file)
--- a/
src/libgame/setup.c
+++ b/
src/libgame/setup.c
@@
-2820,22
+2820,13
@@
static TreeInfo *getArtworkInfoCacheEntry(LevelDirTree *level_node, int type)
char *token = getCacheToken(token_prefix, artworkinfo_tokens[i].text);
char *value = getHashEntry(artworkinfo_cache_old, token);
char *token = getCacheToken(token_prefix, artworkinfo_tokens[i].text);
char *value = getHashEntry(artworkinfo_cache_old, token);
- setSetupInfo(artworkinfo_tokens, i, value);
-
- /* check if cache entry for this item is invalid or incomplete */
- if (value == NULL)
- {
- Error(ERR_WARN, "cache entry '%s' invalid", token);
-
- cached = FALSE;
- }
+ /* if defined, use value from cache, else keep default value */
+ if (value != NULL)
+ setSetupInfo(artworkinfo_tokens, i, value);
}
*artwork_info = ldi;
}
*artwork_info = ldi;
- }
- if (cached)
- {
char *filename_levelinfo = getPath2(getLevelDirFromTreeInfo(level_node),
LEVELINFO_FILENAME);
char *filename_artworkinfo = getPath2(getSetupArtworkDir(artwork_info),
char *filename_levelinfo = getPath2(getLevelDirFromTreeInfo(level_node),
LEVELINFO_FILENAME);
char *filename_artworkinfo = getPath2(getSetupArtworkDir(artwork_info),