X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibgame%2Fmisc.c;h=f487175728d274d820630ec09a205d9d7a2c846e;hb=2ff21518535f914abaacf8ffc72bfbd2f319dcd5;hp=60aff1cca96ed5772fbe1475ddb86091a56c853e;hpb=2a5c67b00174b07749ca8bef96ba3281e6839dba;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 60aff1cc..f4871757 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -981,26 +981,28 @@ void putFileChunk(FILE *file, char *chunk_name, int chunk_size, int getFileVersion(FILE *file) { - int version_major, version_minor, version_patch; + int version_major, version_minor, version_patch, version_release; - version_major = fgetc(file); - version_minor = fgetc(file); - version_patch = fgetc(file); - fgetc(file); /* not used */ + version_major = fgetc(file); + version_minor = fgetc(file); + version_patch = fgetc(file); + version_release = fgetc(file); - return VERSION_IDENT(version_major, version_minor, version_patch); + return RELEASE_IDENT(version_major, version_minor, version_patch, + version_release); } void putFileVersion(FILE *file, int version) { - int version_major = VERSION_MAJOR(version); - int version_minor = VERSION_MINOR(version); - int version_patch = VERSION_PATCH(version); + int version_major = VERSION_MAJOR(version); + int version_minor = VERSION_MINOR(version); + int version_patch = VERSION_PATCH(version); + int version_release = VERSION_RELEASE(version); - fputc(version_major, file); - fputc(version_minor, file); - fputc(version_patch, file); - fputc(0, file); /* not used */ + fputc(version_major, file); + fputc(version_minor, file); + fputc(version_patch, file); + fputc(version_release, file); } void ReadUnusedBytesFromFile(FILE *file, unsigned long bytes) @@ -2280,6 +2282,11 @@ static void replaceArtworkListEntry(struct ArtworkListInfo *artwork_info, ListNode *node; char *filename = getCustomArtworkFilename(basename, artwork_info->type); +#if 1 + if (strcmp(basename, "RocksScreen.pcx") == 0) + printf("::: got filename '%s'\n", filename); +#endif + if (filename == NULL) { int error_mode = ERR_WARN; @@ -2299,8 +2306,11 @@ static void replaceArtworkListEntry(struct ArtworkListInfo *artwork_info, This usually means that this artwork does not exist in this artwork set and a fallback to the existing artwork is done. */ -#if 0 - printf("[artwork '%s' already exists (same list entry)]\n", filename); +#if 1 +#if 1 + if (strcmp(basename, "RocksScreen.pcx") == 0) +#endif + printf("[artwork '%s' already exists (same list entry)]\n", filename); #endif return;