14
#include "gettext_macros.h"
17
* Program version number.
22
#define HOMEDIRNAME ".bygfoot-1.9"
25
* Convenience macros, used for string sizes (typically buf[SMALL]).
30
/** Starting numbers of league, cup and supercup numerical ids. */
31
#define ID_LEAGUE_START 1000
32
#define ID_CUP_START 2000
33
#define ID_PROM_CUP_START 3000
34
#define ID_SUPERCUP_START 4000
36
#define player_id_new (counters[COUNT_PLAYER_ID]++)
37
#define team_id_new (counters[COUNT_TEAM_ID]++)
38
#define cup_id_new (counters[COUNT_CUP_ID]++)
39
#define league_id_new (counters[COUNT_LEAGUE_ID]++)
40
#define fixture_id_new (counters[COUNT_FIX_ID]++)
42
/** Convenience abbreviation. */
43
#define ligs country.leagues
44
/** Convenience abbreviation. */
45
#define lig(i) g_array_index(country.leagues, League, i)
47
/** Convenience abbreviation. */
48
#define cps country.cups
49
/** Convenience abbreviation. */
50
#define cp(i) g_array_index(country.cups, Cup, i)
52
/** Convenience abbreviation. */
53
#define acps country.allcups
54
/** Convenience abbreviation. */
55
#define acp(i) ((Cup*)g_ptr_array_index(country.allcups, i))
57
/** Convenience abbrevs. */
58
#define stat0 status[0]
59
#define stat1 status[1]
60
#define stat2 status[2]
61
#define stat3 status[3]
62
#define stat4 status[4]
63
#define stat5 status[5]
65
#define debug opt_int("int_opt_debug")
72
EXIT_OK = 0, /**< Normal exit. */
73
EXIT_NO_COUNTRY_FILES, /**< Exit when no country files have been found. */
74
EXIT_FILE_OPEN_FAILED, /**< A file could not be opened. */
75
EXIT_PRINT_ERROR, /**< Exit when the print_error function is called on a set error.*/
76
EXIT_NO_LEAGUES, /**< The game must contain at least one league. */
77
EXIT_CHOOSE_TEAM_ERROR, /**< There was a problem loading the choose_teams. @see cup_load_choose_teams() */
78
EXIT_FIXTURE_WRITE_ERROR, /**< There was an error writing the fixtures. */
79
EXIT_USER_FIRED, /**< Single user was fired and didn't accept the new offer. */
80
EXIT_FIRST_WEEK_ERROR, /**< First week of cup was negative. */
81
EXIT_OPTION_NOT_FOUND, /**< An option couldn't be found. */
82
EXIT_POINTER_NOT_FOUND, /**< We didn't find a pointer needed. */
83
EXIT_INT_NOT_FOUND, /**< We didn't find an integer value (mostly indices). */
84
EXIT_NO_SUPPORT_DIR, /**< No support directory found. */
85
EXIT_CUP_ROUND_ERROR, /**< Too few cup rounds. */
90
* A struct representing a country.
94
GString *name, /**< Name of the country. */
95
*symbol, /**< Symbol of the country, eg a flag pixmap. */
96
*sid; /**< Id of the country, eg 'england'. */
98
/** Leagues and cups arrays. */
99
GArray *leagues, *cups;
101
/** Pointer array holding all cups. */
105
/** Struct used for having all the windows