projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed compiler warnings (after adding "-Wmissing-prototypes")
[rocksndiamonds.git]
/
src
/
files.c
diff --git
a/src/files.c
b/src/files.c
index eb9d37e304878de634d0df8f435989f73d730d3d..4ca23663e68e4bfbd4101ec9aa522a6e57a94b37 100644
(file)
--- a/
src/files.c
+++ b/
src/files.c
@@
-1404,7
+1404,7
@@
static boolean check_special_flags(char *flag)
return FALSE;
}
return FALSE;
}
-static struct DateInfo getCurrentDate()
+static struct DateInfo getCurrentDate(
void
)
{
time_t epoch_seconds = time(NULL);
struct tm *now = localtime(&epoch_seconds);
{
time_t epoch_seconds = time(NULL);
struct tm *now = localtime(&epoch_seconds);
@@
-1427,7
+1427,7
@@
static void resetEventFlags(struct ElementChangeInfo *change)
change->has_event[i] = FALSE;
}
change->has_event[i] = FALSE;
}
-static void resetEventBits()
+static void resetEventBits(
void
)
{
int i;
{
int i;
@@
-1868,7
+1868,7
@@
static void setFileInfoToDefaults(struct LevelFileInfo *level_file_info)
int getMappedElement_SB(int, boolean);
int getMappedElement_SB(int, boolean);
-static void ActivateLevelTemplate()
+static void ActivateLevelTemplate(
void
)
{
int x, y;
{
int x, y;
@@
-2159,12
+2159,12
@@
static int getFiletypeFromID(char *filetype_id)
return filetype;
}
return filetype;
}
-char *getLocalLevelTemplateFilename()
+char *getLocalLevelTemplateFilename(
void
)
{
return getDefaultLevelFilename(-1);
}
{
return getDefaultLevelFilename(-1);
}
-char *getGlobalLevelTemplateFilename()
+char *getGlobalLevelTemplateFilename(
void
)
{
/* global variable "leveldir_current" must be modified in the loop below */
LevelDirTree *leveldir_current_last = leveldir_current;
{
/* global variable "leveldir_current" must be modified in the loop below */
LevelDirTree *leveldir_current_last = leveldir_current;
@@
-2311,7
+2311,7
@@
static void copyLevelFileInfo(struct LevelFileInfo *lfi_from,
/* functions for loading R'n'D level */
/* ------------------------------------------------------------------------- */
/* functions for loading R'n'D level */
/* ------------------------------------------------------------------------- */
-int getMappedElement(int element)
+
static
int getMappedElement(int element)
{
/* remap some (historic, now obsolete) elements */
{
/* remap some (historic, now obsolete) elements */
@@
-2362,7
+2362,7
@@
int getMappedElement(int element)
return element;
}
return element;
}
-int getMappedElementByVersion(int element, int game_version)
+
static
int getMappedElementByVersion(int element, int game_version)
{
/* remap some elements due to certain game version */
{
/* remap some elements due to certain game version */
@@
-3484,7
+3484,7
@@
static void LoadLevelFromFileInfo_RND(struct LevelInfo *level,
/* functions for loading EM level */
/* ------------------------------------------------------------------------- */
/* functions for loading EM level */
/* ------------------------------------------------------------------------- */
-void CopyNativeLevel_RND_to_EM(struct LevelInfo *level)
+
static
void CopyNativeLevel_RND_to_EM(struct LevelInfo *level)
{
static int ball_xy[8][2] =
{
{
static int ball_xy[8][2] =
{
@@
-3612,7
+3612,7
@@
void CopyNativeLevel_RND_to_EM(struct LevelInfo *level)
}
}
}
}
-void CopyNativeLevel_EM_to_RND(struct LevelInfo *level)
+
static
void CopyNativeLevel_EM_to_RND(struct LevelInfo *level)
{
static int ball_xy[8][2] =
{
{
static int ball_xy[8][2] =
{
@@
-3713,7
+3713,7
@@
void CopyNativeLevel_EM_to_RND(struct LevelInfo *level)
/* functions for loading SP level */
/* ------------------------------------------------------------------------- */
/* functions for loading SP level */
/* ------------------------------------------------------------------------- */
-void CopyNativeLevel_RND_to_SP(struct LevelInfo *level)
+
static
void CopyNativeLevel_RND_to_SP(struct LevelInfo *level)
{
struct LevelInfo_SP *level_sp = level->native_sp_level;
LevelInfoType *header = &level_sp->header;
{
struct LevelInfo_SP *level_sp = level->native_sp_level;
LevelInfoType *header = &level_sp->header;
@@
-3797,7
+3797,7
@@
void CopyNativeLevel_RND_to_SP(struct LevelInfo *level)
}
}
}
}
-void CopyNativeLevel_SP_to_RND(struct LevelInfo *level)
+
static
void CopyNativeLevel_SP_to_RND(struct LevelInfo *level)
{
struct LevelInfo_SP *level_sp = level->native_sp_level;
LevelInfoType *header = &level_sp->header;
{
struct LevelInfo_SP *level_sp = level->native_sp_level;
LevelInfoType *header = &level_sp->header;
@@
-3957,7
+3957,7
@@
static void CopyNativeTape_RND_to_SP(struct LevelInfo *level)
demo->is_available = TRUE;
}
demo->is_available = TRUE;
}
-static void setTapeInfoToDefaults();
+static void setTapeInfoToDefaults(
void
);
static void CopyNativeTape_SP_to_RND(struct LevelInfo *level)
{
static void CopyNativeTape_SP_to_RND(struct LevelInfo *level)
{
@@
-4010,7
+4010,7
@@
static void CopyNativeTape_SP_to_RND(struct LevelInfo *level)
/* functions for loading MM level */
/* ------------------------------------------------------------------------- */
/* functions for loading MM level */
/* ------------------------------------------------------------------------- */
-void CopyNativeLevel_RND_to_MM(struct LevelInfo *level)
+
static
void CopyNativeLevel_RND_to_MM(struct LevelInfo *level)
{
struct LevelInfo_MM *level_mm = level->native_mm_level;
int x, y;
{
struct LevelInfo_MM *level_mm = level->native_mm_level;
int x, y;
@@
-4047,7
+4047,7
@@
void CopyNativeLevel_RND_to_MM(struct LevelInfo *level)
level_mm->field[x][y] = map_element_RND_to_MM(level->field[x][y]);
}
level_mm->field[x][y] = map_element_RND_to_MM(level->field[x][y]);
}
-void CopyNativeLevel_MM_to_RND(struct LevelInfo *level)
+
static
void CopyNativeLevel_MM_to_RND(struct LevelInfo *level)
{
struct LevelInfo_MM *level_mm = level->native_mm_level;
int x, y;
{
struct LevelInfo_MM *level_mm = level->native_mm_level;
int x, y;
@@
-4093,7
+4093,8
@@
void CopyNativeLevel_MM_to_RND(struct LevelInfo *level)
#define DC_LEVEL_HEADER_SIZE 344
#define DC_LEVEL_HEADER_SIZE 344
-unsigned short getDecodedWord_DC(unsigned short data_encoded, boolean init)
+static unsigned short getDecodedWord_DC(unsigned short data_encoded,
+ boolean init)
{
static int last_data_encoded;
static int offset1;
{
static int last_data_encoded;
static int offset1;
@@
-4132,7
+4133,7
@@
unsigned short getDecodedWord_DC(unsigned short data_encoded, boolean init)
return data_decoded;
}
return data_decoded;
}
-int getMappedElement_DC(int element)
+
static
int getMappedElement_DC(int element)
{
switch (element)
{
{
switch (element)
{
@@
-6606,7
+6607,7
@@
static void LoadLevel_InitNativeEngines(struct LevelInfo *level)
CopyNativeLevel_RND_to_Native(level);
}
CopyNativeLevel_RND_to_Native(level);
}
-static void LoadLevelTemplate_LoadAndInit()
+static void LoadLevelTemplate_LoadAndInit(
void
)
{
LoadLevelFromFileInfo(&level_template, &level_template.file_info, FALSE);
{
LoadLevelFromFileInfo(&level_template, &level_template.file_info, FALSE);
@@
-7514,7
+7515,7
@@
void SaveLevel(int nr)
SaveLevelFromFilename(&level, filename, FALSE);
}
SaveLevelFromFilename(&level, filename, FALSE);
}
-void SaveLevelTemplate()
+void SaveLevelTemplate(
void
)
{
char *filename = getLocalLevelTemplateFilename();
{
char *filename = getLocalLevelTemplateFilename();
@@
-7584,7
+7585,7
@@
void DumpLevel(struct LevelInfo *level)
/* tape file functions */
/* ========================================================================= */
/* tape file functions */
/* ========================================================================= */
-static void setTapeInfoToDefaults()
+static void setTapeInfoToDefaults(
void
)
{
int i;
{
int i;
@@
-7784,7
+7785,7
@@
static int LoadTape_BODY(File *file, int chunk_size, struct TapeInfo *tape)
return chunk_size;
}
return chunk_size;
}
-void LoadTape_SokobanSolution(char *filename)
+
static
void LoadTape_SokobanSolution(char *filename)
{
File *file;
int move_delay = TILESIZE / level.initial_player_stepsize[0];
{
File *file;
int move_delay = TILESIZE / level.initial_player_stepsize[0];
@@
-9278,7
+9279,7
@@
void LoadSetupFromFilename(char *filename)
}
}
}
}
-static void LoadSetup_SpecialPostProcessing()
+static void LoadSetup_SpecialPostProcessing(
void
)
{
char *player_name_new;
{
char *player_name_new;
@@
-9299,7
+9300,7
@@
static void LoadSetup_SpecialPostProcessing()
MIN(MAX(MIN_SCROLL_DELAY, setup.scroll_delay_value), MAX_SCROLL_DELAY);
}
MIN(MAX(MIN_SCROLL_DELAY, setup.scroll_delay_value), MAX_SCROLL_DELAY);
}
-void LoadSetup()
+void LoadSetup(
void
)
{
char *filename;
{
char *filename;
@@
-9320,7
+9321,7
@@
void LoadSetup()
LoadSetup_SpecialPostProcessing();
}
LoadSetup_SpecialPostProcessing();
}
-void LoadSetup_AutoSetup()
+void LoadSetup_AutoSetup(
void
)
{
char *filename = getPath2(getSetupDir(), AUTOSETUP_FILENAME);
SetupFileHash *setup_file_hash = NULL;
{
char *filename = getPath2(getSetupDir(), AUTOSETUP_FILENAME);
SetupFileHash *setup_file_hash = NULL;
@@
-9340,7
+9341,7
@@
void LoadSetup_AutoSetup()
free(filename);
}
free(filename);
}
-void LoadSetup_EditorCascade()
+void LoadSetup_EditorCascade(
void
)
{
char *filename = getPath2(getSetupDir(), EDITORCASCADE_FILENAME);
SetupFileHash *setup_file_hash = NULL;
{
char *filename = getPath2(getSetupDir(), EDITORCASCADE_FILENAME);
SetupFileHash *setup_file_hash = NULL;
@@
-9409,7
+9410,7
@@
static void LoadSetup_ReadGameControllerMappings(SetupFileHash *mappings_hash,
fclose(file);
}
fclose(file);
}
-void SaveSetup()
+void SaveSetup(
void
)
{
char *filename = getSetupFilename();
FILE *file;
{
char *filename = getSetupFilename();
FILE *file;
@@
-9522,7
+9523,7
@@
void SaveSetup()
SetFilePermissions(filename, PERMS_PRIVATE);
}
SetFilePermissions(filename, PERMS_PRIVATE);
}
-void SaveSetup_AutoSetup()
+void SaveSetup_AutoSetup(
void
)
{
char *filename = getPath2(getSetupDir(), AUTOSETUP_FILENAME);
FILE *file;
{
char *filename = getPath2(getSetupDir(), AUTOSETUP_FILENAME);
FILE *file;
@@
-9550,7
+9551,7
@@
void SaveSetup_AutoSetup()
free(filename);
}
free(filename);
}
-void SaveSetup_EditorCascade()
+void SaveSetup_EditorCascade(
void
)
{
char *filename = getPath2(getSetupDir(), EDITORCASCADE_FILENAME);
FILE *file;
{
char *filename = getPath2(getSetupDir(), EDITORCASCADE_FILENAME);
FILE *file;
@@
-9619,7
+9620,7
@@
void SaveSetup_AddGameControllerMapping(char *mapping)
free(filename);
}
free(filename);
}
-void LoadCustomElementDescriptions()
+void LoadCustomElementDescriptions(
void
)
{
char *filename = getCustomArtworkConfigFilename(ARTWORK_TYPE_GRAPHICS);
SetupFileHash *setup_file_hash;
{
char *filename = getCustomArtworkConfigFilename(ARTWORK_TYPE_GRAPHICS);
SetupFileHash *setup_file_hash;
@@
-9681,7
+9682,7
@@
static int get_token_parameter_value(char *token, char *value_raw)
return get_parameter_value(value_raw, suffix, TYPE_INTEGER);
}
return get_parameter_value(value_raw, suffix, TYPE_INTEGER);
}
-void InitMenuDesignSettings_Static()
+void InitMenuDesignSettings_Static(
void
)
{
int i;
{
int i;
@@
-9696,7
+9697,7
@@
void InitMenuDesignSettings_Static()
}
}
}
}
-static void InitMenuDesignSettings_SpecialPreProcessing()
+static void InitMenuDesignSettings_SpecialPreProcessing(
void
)
{
int i;
{
int i;
@@
-9788,7
+9789,7
@@
static void InitMenuDesignSettings_SpecialPreProcessing()
}
}
}
}
-static void InitMenuDesignSettings_SpecialPostProcessing()
+static void InitMenuDesignSettings_SpecialPostProcessing(
void
)
{
static struct
{
{
static struct
{
@@
-9817,7
+9818,7
@@
static void InitMenuDesignSettings_SpecialPostProcessing()
*game_buttons_xy[i].dst = *game_buttons_xy[i].src;
}
*game_buttons_xy[i].dst = *game_buttons_xy[i].src;
}
-static void InitMenuDesignSettings_SpecialPostProcessing_AfterGraphics()
+static void InitMenuDesignSettings_SpecialPostProcessing_AfterGraphics(
void
)
{
static struct
{
{
static struct
{
@@
-10251,7
+10252,7
@@
static void LoadMenuDesignSettingsFromFilename(char *filename)
freeSetupFileHash(setup_file_hash);
}
freeSetupFileHash(setup_file_hash);
}
-void LoadMenuDesignSettings()
+void LoadMenuDesignSettings(
void
)
{
char *filename_base = UNDEFINED_FILENAME, *filename_local;
{
char *filename_base = UNDEFINED_FILENAME, *filename_local;
@@
-10275,7
+10276,7
@@
void LoadMenuDesignSettings()
InitMenuDesignSettings_SpecialPostProcessing();
}
InitMenuDesignSettings_SpecialPostProcessing();
}
-void LoadMenuDesignSettings_AfterGraphics()
+void LoadMenuDesignSettings_AfterGraphics(
void
)
{
InitMenuDesignSettings_SpecialPostProcessing_AfterGraphics();
}
{
InitMenuDesignSettings_SpecialPostProcessing_AfterGraphics();
}
@@
-10477,7
+10478,7
@@
static boolean sound_info_listed(struct MusicFileInfo *list, char *basename)
return music_info_listed_ext(list, basename, TRUE);
}
return music_info_listed_ext(list, basename, TRUE);
}
-void LoadMusicInfo()
+void LoadMusicInfo(
void
)
{
char *music_directory = getCustomMusicDirectory();
int num_music = getMusicListSize();
{
char *music_directory = getCustomMusicDirectory();
int num_music = getMusicListSize();
@@
-10604,8
+10605,8
@@
void LoadMusicInfo()
}
}
}
}
-
void add_helpanim_entry(int element, int action, int direction, int delay
,
- int *num_list_entries)
+
static void add_helpanim_entry(int element, int action, int direction
,
+
int delay,
int *num_list_entries)
{
struct HelpAnimInfo *new_list_entry;
(*num_list_entries)++;
{
struct HelpAnimInfo *new_list_entry;
(*num_list_entries)++;
@@
-10621,7
+10622,7
@@
void add_helpanim_entry(int element, int action, int direction, int delay,
new_list_entry->delay = delay;
}
new_list_entry->delay = delay;
}
-void print_unknown_token(char *filename, char *token, int token_nr)
+
static
void print_unknown_token(char *filename, char *token, int token_nr)
{
if (token_nr == 0)
{
{
if (token_nr == 0)
{
@@
-10633,13
+10634,13
@@
void print_unknown_token(char *filename, char *token, int token_nr)
Error(ERR_INFO, "- token: '%s'", token);
}
Error(ERR_INFO, "- token: '%s'", token);
}
-void print_unknown_token_end(int token_nr)
+
static
void print_unknown_token_end(int token_nr)
{
if (token_nr > 0)
Error(ERR_INFO_LINE, "-");
}
{
if (token_nr > 0)
Error(ERR_INFO_LINE, "-");
}
-void LoadHelpAnimInfo()
+void LoadHelpAnimInfo(
void
)
{
char *filename = getHelpAnimFilename();
SetupFileList *setup_file_list = NULL, *list;
{
char *filename = getHelpAnimFilename();
SetupFileList *setup_file_list = NULL, *list;
@@
-10849,7
+10850,7
@@
void LoadHelpAnimInfo()
#endif
}
#endif
}
-void LoadHelpTextInfo()
+void LoadHelpTextInfo(
void
)
{
char *filename = getHelpTextFilename();
int i;
{
char *filename = getHelpTextFilename();
int i;
@@
-10891,7
+10892,7
@@
void LoadHelpTextInfo()
#define MAX_NUM_CONVERT_LEVELS 1000
#define MAX_NUM_CONVERT_LEVELS 1000
-void ConvertLevels()
+void ConvertLevels(
void
)
{
static LevelDirTree *convert_leveldir = NULL;
static int convert_level_nr = -1;
{
static LevelDirTree *convert_leveldir = NULL;
static int convert_level_nr = -1;
@@
-11003,7
+11004,7
@@
void ConvertLevels()
/* create and save images for use in level sketches (raw BMP format) */
/* ------------------------------------------------------------------------- */
/* create and save images for use in level sketches (raw BMP format) */
/* ------------------------------------------------------------------------- */
-void CreateLevelSketchImages()
+void CreateLevelSketchImages(
void
)
{
#if defined(TARGET_SDL)
Bitmap *bitmap1;
{
#if defined(TARGET_SDL)
Bitmap *bitmap1;