![]() |
![]() |
![]() |
GNOME Video Arcade Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
gboolean gva_nplayers_init (GError **error
); gboolean gva_nplayers_lookup (const gchar *game
,gint *max_alternating
,gint *max_simultaneous
,GError **error
); const gchar * gva_nplayers_describe (gint max_alternating
,gint max_simultaneous
);
These functions provide a the maximum number of players for a game
and whether the play is alternating or simultaneous. The information
is read from a nplayers.ini
file.
gboolean gva_nplayers_init (GError **error
);
Loads the number of players file. If an error occurs, it returns
FALSE
and sets error
.
This function should be called once when the application starts.
|
return location for a GError, or NULL
|
Returns : |
TRUE on success, FALSE if an error occurred |
gboolean gva_nplayers_lookup (const gchar *game
,gint *max_alternating
,gint *max_simultaneous
,GError **error
);
Returns the maximum number of alternating and/or simultaneous players for
game
. If game
only allows alternating players, max_simultaneous
will
be zero. If game
only allows simultaneous players, max_alternating
will
be zero. If game
is listed in the file but the number of players is
unknown or cannot be parsed, both max_alternating
and max_simultaneous
will be zero. In all of these cases the function returns TRUE
.
If an error occurs, the function returns FALSE
and sets error
, leaving
max_alternating
and max_simultaneous
unaltered.
|
the name of a game |
|
return location for the maximum alternating players |
|
return location for the maximum simultaneous players |
|
return location for a GError, or NULL
|
Returns : |
TRUE on success, FALSE if an error occurred |
const gchar * gva_nplayers_describe (gint max_alternating
,gint max_simultaneous
);
Returns a human-readable description of the number of players a game
supports and whether the players alternate, play simultaneously, or
both. If a description can not be formed, the function returns NULL
.
|
the maximum alternating players |
|
the maximum simultaneous players |
Returns : |
a human-readable description |