projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20040205-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
misc.c
diff --git
a/src/libgame/misc.c
b/src/libgame/misc.c
index 06ca9357c65f87d792349e44d0fcacaf074098c7..3612ba045fcd649f9b4ec9a52dcf4b1762ad7f9d 100644
(file)
--- a/
src/libgame/misc.c
+++ b/
src/libgame/misc.c
@@
-850,27
+850,27
@@
inline void swap_number_pairs(int *x1, int *y1, int *x2, int *y2)
*y2 = help_y;
}
*y2 = help_y;
}
-
shor
t getFile16BitInteger(FILE *file, int byte_order)
+
in
t getFile16BitInteger(FILE *file, int byte_order)
{
if (byte_order == BYTE_ORDER_BIG_ENDIAN)
{
if (byte_order == BYTE_ORDER_BIG_ENDIAN)
- return ((fgetc(file) <<
8) |
- (fgetc(file) <<
0));
+ return ((fgetc(file) << 8) |
+ (fgetc(file) << 0));
else /* BYTE_ORDER_LITTLE_ENDIAN */
else /* BYTE_ORDER_LITTLE_ENDIAN */
- return ((fgetc(file) <<
0) |
- (fgetc(file) <<
8));
+ return ((fgetc(file) << 0) |
+ (fgetc(file) << 8));
}
}
-void putFile16BitInteger(FILE *file,
shor
t value, int byte_order)
+void putFile16BitInteger(FILE *file,
in
t value, int byte_order)
{
if (byte_order == BYTE_ORDER_BIG_ENDIAN)
{
{
if (byte_order == BYTE_ORDER_BIG_ENDIAN)
{
- fputc((value >>
8) & 0xff, file);
- fputc((value >>
0) & 0xff, file);
+ fputc((value >> 8) & 0xff, file);
+ fputc((value >> 0) & 0xff, file);
}
else /* BYTE_ORDER_LITTLE_ENDIAN */
{
}
else /* BYTE_ORDER_LITTLE_ENDIAN */
{
- fputc((value >>
0) & 0xff, file);
- fputc((value >>
8) & 0xff, file);
+ fputc((value >> 0) & 0xff, file);
+ fputc((value >> 8) & 0xff, file);
}
}
}
}
@@
-1880,6
+1880,7
@@
static void add_dynamic_file_list_entry(struct FileInfo **list,
new_list_entry = &(*list)[*num_list_entries - 1];
new_list_entry->token = getStringCopy(token);
new_list_entry = &(*list)[*num_list_entries - 1];
new_list_entry->token = getStringCopy(token);
+ new_list_entry->default_filename = NULL;
new_list_entry->filename = NULL;
new_list_entry->parameter = checked_calloc(parameter_array_size);
new_list_entry->filename = NULL;
new_list_entry->parameter = checked_calloc(parameter_array_size);
@@
-2549,9
+2550,17
@@
void ReloadCustomArtworkList(struct ArtworkListInfo *artwork_info)
#endif
for (i = 0; i < num_dynamic_file_list_entries; i++)
#endif
for (i = 0; i < num_dynamic_file_list_entries; i++)
+ {
LoadArtworkToList(artwork_info, &artwork_info->dynamic_artwork_list[i],
dynamic_file_list[i].filename, i);
LoadArtworkToList(artwork_info, &artwork_info->dynamic_artwork_list[i],
dynamic_file_list[i].filename, i);
+#if 0
+ printf("::: '%s', '0x%08x'\n",
+ dynamic_file_list[i].filename,
+ dynamic_file_list[i].default_filename);
+#endif
+ }
+
#if 0
dumpList(artwork_info->content_list);
#endif
#if 0
dumpList(artwork_info->content_list);
#endif