/* maximal allowed length of a command line option */
#define MAX_OPTION_LEN 256
-static unsigned int getCurrentMS()
+static unsigned int getCurrentMS(void)
{
return SDL_GetTicks();
}
}
#endif
-char *getLoginName()
+char *getLoginName(void)
{
static char *login_name = NULL;
return login_name;
}
-char *getRealName()
+char *getRealName(void)
{
static char *real_name = NULL;
va_end(ap);
}
-char *GetError()
+char *GetError(void)
{
return internal_error;
}
char *name;
} translate_key[] =
{
+ /* return and escape keys */
+ { KSYM_Return, "XK_Return", "return" },
+ { KSYM_Escape, "XK_Escape", "escape" },
+
/* normal cursor keys */
{ KSYM_Left, "XK_Left", "cursor left" },
{ KSYM_Right, "XK_Right", "cursor right" },
return result;
}
+int get_player_nr_from_string(char *s)
+{
+ static char *player_text[] =
+ {
+ "player_1",
+ "player_2",
+ "player_3",
+ "player_4",
+
+ NULL
+ };
+
+ char *s_lower = getStringToLower(s);
+ int result = 0;
+ int i;
+
+ for (i = 0; player_text[i] != NULL; i++)
+ if (strEqual(s_lower, player_text[i]))
+ result = i;
+
+ free(s_lower);
+
+ return result;
+}
+
/* ------------------------------------------------------------------------- */
/* functions for generic lists */
/* ------------------------------------------------------------------------- */
-ListNode *newListNode()
+ListNode *newListNode(void)
{
return checked_calloc(sizeof(ListNode));
}
checked_free(gfx_token);
}
+ if (result == -1)
+ {
+ Key key = getKeyFromX11KeyName(token);
+
+ if (key != KSYM_UNDEFINED)
+ result = -(int)key;
+ }
+
if (result == -1)
result = ANIM_EVENT_ACTION_NONE;
else if (strEqual(suffix, ".init_event_action") ||
strEqual(suffix, ".anim_event_action"))
{
- result = get_anim_action_parameter_value(value);
+ result = get_anim_action_parameter_value(value_raw);
}
else if (strEqual(suffix, ".class"))
{
return getPath2(getUserGameDataDir(), basename);
}
-void OpenLogFiles()
+void OpenLogFiles(void)
{
int i;
}
}
-void CloseLogFiles()
+void CloseLogFiles(void)
{
int i;
fclose(log_file);
}
-void NotifyUserAboutErrorFile()
+void NotifyUserAboutErrorFile(void)
{
#if defined(PLATFORM_WIN32)
char *title_text = getStringCat2(program.program_title, " Error Message");
#define DEBUG_TIME_IN_MICROSECONDS 0
#if DEBUG_TIME_IN_MICROSECONDS
-static double Counter_Microseconds()
+static double Counter_Microseconds(void)
{
static struct timeval base_time = { 0, 0 };
struct timeval current_time;