X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ffiles.c;h=9e4db60cde8fabb739f415d60c304bc1b9f14923;hb=6e9813476a7d45f1f6fba23357e10b3aff33c0c2;hp=29847d9649fbe9b3546a14120734378e8594f46e;hpb=115ce6f2da1914d68b0fe0e5f9082973190dacdd;p=rocksndiamonds.git diff --git a/src/files.c b/src/files.c index 29847d96..9e4db60c 100644 --- a/src/files.c +++ b/src/files.c @@ -2311,7 +2311,7 @@ static void copyLevelFileInfo(struct LevelFileInfo *lfi_from, /* functions for loading R'n'D level */ /* ------------------------------------------------------------------------- */ -int getMappedElement(int element) +static int getMappedElement(int element) { /* remap some (historic, now obsolete) elements */ @@ -2362,7 +2362,7 @@ int getMappedElement(int 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 */ @@ -3484,7 +3484,7 @@ static void LoadLevelFromFileInfo_RND(struct LevelInfo *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] = { @@ -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] = { @@ -3713,7 +3713,7 @@ void CopyNativeLevel_EM_to_RND(struct LevelInfo *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; @@ -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; @@ -4010,7 +4010,7 @@ static void CopyNativeTape_SP_to_RND(struct LevelInfo *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; @@ -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]); } -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; @@ -4093,7 +4093,8 @@ void CopyNativeLevel_MM_to_RND(struct LevelInfo *level) #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; @@ -4132,7 +4133,7 @@ unsigned short getDecodedWord_DC(unsigned short data_encoded, boolean init) return data_decoded; } -int getMappedElement_DC(int element) +static int getMappedElement_DC(int element) { switch (element) { @@ -7784,7 +7785,7 @@ static int LoadTape_BODY(File *file, int chunk_size, struct TapeInfo *tape) 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]; @@ -8352,6 +8353,7 @@ enum SETUP_TOKEN_WINDOW_SCALING_PERCENT, SETUP_TOKEN_WINDOW_SCALING_QUALITY, SETUP_TOKEN_SCREEN_RENDERING_MODE, + SETUP_TOKEN_VSYNC_MODE, SETUP_TOKEN_ASK_ON_ESCAPE, SETUP_TOKEN_ASK_ON_ESCAPE_EDITOR, SETUP_TOKEN_QUICK_SWITCH, @@ -8372,6 +8374,7 @@ enum SETUP_TOKEN_VOLUME_MUSIC, SETUP_TOKEN_NETWORK_MODE, SETUP_TOKEN_NETWORK_PLAYER_NR, + SETUP_TOKEN_NETWORK_SERVER_HOSTNAME, SETUP_TOKEN_TOUCH_CONTROL_TYPE, SETUP_TOKEN_TOUCH_MOVE_DISTANCE, SETUP_TOKEN_TOUCH_DROP_DISTANCE, @@ -8593,6 +8596,7 @@ static struct TokenInfo global_setup_tokens[] = { TYPE_INTEGER,&si.window_scaling_percent, "window_scaling_percent" }, { TYPE_STRING, &si.window_scaling_quality, "window_scaling_quality" }, { TYPE_STRING, &si.screen_rendering_mode, "screen_rendering_mode" }, + { TYPE_STRING, &si.vsync_mode, "vsync_mode" }, { TYPE_SWITCH, &si.ask_on_escape, "ask_on_escape" }, { TYPE_SWITCH, &si.ask_on_escape_editor, "ask_on_escape_editor" }, { TYPE_SWITCH, &si.quick_switch, "quick_player_switch" }, @@ -8613,6 +8617,7 @@ static struct TokenInfo global_setup_tokens[] = { TYPE_INTEGER,&si.volume_music, "volume_music" }, { TYPE_SWITCH, &si.network_mode, "network_mode" }, { TYPE_PLAYER, &si.network_player_nr, "network_player" }, + { TYPE_STRING, &si.network_server_hostname, "network_server_hostname" }, { TYPE_STRING, &si.touch.control_type, "touch.control_type" }, { TYPE_INTEGER,&si.touch.move_distance, "touch.move_distance" }, { TYPE_INTEGER,&si.touch.drop_distance, "touch.drop_distance" }, @@ -8813,6 +8818,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->window_scaling_percent = STD_WINDOW_SCALING_PERCENT; si->window_scaling_quality = getStringCopy(SCALING_QUALITY_DEFAULT); si->screen_rendering_mode = getStringCopy(STR_SPECIAL_RENDERING_DEFAULT); + si->vsync_mode = getStringCopy(STR_VSYNC_MODE_DEFAULT); si->ask_on_escape = TRUE; si->ask_on_escape_editor = TRUE; si->quick_switch = FALSE; @@ -8837,6 +8843,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->network_mode = FALSE; si->network_player_nr = 0; /* first player */ + si->network_server_hostname = getStringCopy(STR_NETWORK_AUTO_DETECT); si->touch.control_type = getStringCopy(TOUCH_CONTROL_DEFAULT); si->touch.move_distance = TOUCH_MOVE_DISTANCE_DEFAULT; /* percent */ @@ -10604,8 +10611,8 @@ void LoadMusicInfo(void) } } -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)++; @@ -10621,7 +10628,7 @@ void add_helpanim_entry(int element, int action, int direction, int 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) { @@ -10633,7 +10640,7 @@ void print_unknown_token(char *filename, char *token, int token_nr) 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, "-");