return (unsigned int) seed;
}
+#if 1
unsigned int get_random_number(int nr, unsigned int max)
{
return (max > 0 ? random_linux_libc(nr) % max : 0);
}
+#else
+unsigned int get_random_number(int nr, unsigned int max)
+{
+ unsigned int rnd = (max > 0 ? random_linux_libc(nr) % max : 0);
+
+ if (nr == 0 && FrameCounter < 2)
+ printf("::: %d [%d]\n", rnd, FrameCounter);
+
+#if 0
+ if (nr == 0 && FrameCounter < 2 && rnd == 8)
+ rnd /= 0;
+#endif
+
+ return rnd;
+}
+#endif
/* ------------------------------------------------------------------------- */
int getFileVersion(FILE *file)
{
- int version_major, version_minor, version_patch, version_release;
-
- version_major = fgetc(file);
- version_minor = fgetc(file);
- version_patch = fgetc(file);
- version_release = fgetc(file);
+ int version_major = fgetc(file);
+ int version_minor = fgetc(file);
+ int version_patch = fgetc(file);
+ int version_build = fgetc(file);
- return RELEASE_IDENT(version_major, version_minor, version_patch,
- version_release);
+ return VERSION_IDENT(version_major, version_minor, version_patch,
+ version_build);
}
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_release = VERSION_RELEASE(version);
+ int version_major = VERSION_MAJOR(version);
+ int version_minor = VERSION_MINOR(version);
+ int version_patch = VERSION_PATCH(version);
+ int version_build = VERSION_BUILD(version);
- fputc(version_major, file);
- fputc(version_minor, file);
- fputc(version_patch, file);
- fputc(version_release, file);
+ fputc(version_major, file);
+ fputc(version_minor, file);
+ fputc(version_patch, file);
+ fputc(version_build, file);
}
void ReadUnusedBytesFromFile(FILE *file, unsigned long bytes)
printf("GOT CUSTOM ARTWORK CONFIG FILE '%s'\n", filename);
#endif
+ DrawInitText("Loading artwork config:", 120, FC_GREEN);
+ DrawInitText(ARTWORKINFO_FILENAME(artwork_info->type), 150, FC_YELLOW);
+
/* always start with reliable default values */
for (i=0; i<num_file_list_entries; i++)
{