mirror of https://github.com/tstellar/bygfoot.git
Add Bygfoot* parameter to start_week* functions
In the future, this structure will hold the bygfoot global state.
This commit is contained in:
parent
c6bf95c2cc
commit
bb835e7fb5
|
@ -419,7 +419,7 @@ finance_assign_game_money(const Fixture *fix)
|
|||
|
||||
/** Change the current interest on the market (random walk with three possibilities). */
|
||||
void
|
||||
finance_update_current_interest(void)
|
||||
finance_update_current_interest(Bygfoot *bygfoot)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("finance_update_current_interest\n");
|
||||
|
|
|
@ -57,7 +57,7 @@ void
|
|||
finance_assign_game_money(const Fixture *fix);
|
||||
|
||||
void
|
||||
finance_update_current_interest(void);
|
||||
finance_update_current_interest(Bygfoot *bygfoot);
|
||||
|
||||
gint
|
||||
finance_calculate_alr_weekly_installment(gint start_week);
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
/** Update the job exchange: remove expired offers and add new ones. */
|
||||
void
|
||||
job_update(void)
|
||||
job_update(Bygfoot *bygfoot)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("job_update\n");
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "user_struct.h"
|
||||
|
||||
void
|
||||
job_update(void);
|
||||
job_update(Bygfoot *bygfoot);
|
||||
|
||||
void
|
||||
job_add_new_international(gint num_of_new);
|
||||
|
|
|
@ -70,7 +70,7 @@ WeekFunc start_week_round_funcs[] =
|
|||
|
||||
/** Array of functions called when a week
|
||||
is started. */
|
||||
WeekFunc start_week_funcs[] =
|
||||
WeekFuncBygfoot start_week_funcs[] =
|
||||
{start_week_update_leagues, start_week_add_cups, start_week_update_users,
|
||||
start_week_update_teams, start_week_update_user_finances,
|
||||
youth_academy_update_weekly, transfer_update, job_update,
|
||||
|
@ -337,7 +337,7 @@ end_week_round(Bygfoot *bygfoot)
|
|||
week++;
|
||||
|
||||
week_round = 1;
|
||||
start_week();
|
||||
start_week(bygfoot);
|
||||
}
|
||||
|
||||
start_week_round(bygfoot);
|
||||
|
@ -586,17 +586,17 @@ start_week_round(Bygfoot *bygfoot)
|
|||
|
||||
/** Start a new week. */
|
||||
void
|
||||
start_week(void)
|
||||
start_week(Bygfoot *bygfoot)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("start_week\n");
|
||||
#endif
|
||||
|
||||
WeekFunc *start_func = start_week_funcs;
|
||||
WeekFuncBygfoot *start_func = start_week_funcs;
|
||||
|
||||
while(*start_func != NULL)
|
||||
{
|
||||
(*start_func)();
|
||||
(*start_func)(bygfoot);
|
||||
start_func++;
|
||||
}
|
||||
}
|
||||
|
@ -640,7 +640,7 @@ end_week_hide_cups(void)
|
|||
|
||||
/** Add the cups that begin later in the season to the acps array. */
|
||||
void
|
||||
start_week_add_cups(void)
|
||||
start_week_add_cups(Bygfoot *bygfoot)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("start_week_add_cups\n");
|
||||
|
@ -660,7 +660,7 @@ start_week_add_cups(void)
|
|||
CPU teams get updated at the end of their matches
|
||||
(to avoid cup teams getting updated too often). */
|
||||
void
|
||||
start_week_update_teams(void)
|
||||
start_week_update_teams(Bygfoot *bygfoot)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("start_week_update_teams\n");
|
||||
|
@ -699,7 +699,7 @@ start_week_round_update_teams(void)
|
|||
|
||||
/** Deduce wages etc. */
|
||||
void
|
||||
start_week_update_user_finances(void)
|
||||
start_week_update_user_finances(Bygfoot *bygfoot)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("start_week_update_user_finances\n");
|
||||
|
@ -716,7 +716,7 @@ start_week_update_user_finances(void)
|
|||
|
||||
/** Some general user update. */
|
||||
void
|
||||
start_week_update_users(void)
|
||||
start_week_update_users(Bygfoot *bygfoot)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("start_week_update_users\n");
|
||||
|
@ -741,7 +741,7 @@ start_week_update_users(void)
|
|||
|
||||
/** Create new tables if necessary etc. */
|
||||
void
|
||||
start_week_update_leagues(void)
|
||||
start_week_update_leagues(Bygfoot *bygfoot)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("start_week_update_leagues\n");
|
||||
|
|
|
@ -56,19 +56,19 @@ void
|
|||
start_week_round(Bygfoot *bygfoot);
|
||||
|
||||
void
|
||||
start_week(void);
|
||||
start_week(Bygfoot *bygfoot);
|
||||
|
||||
void
|
||||
start_week_update_teams(void);
|
||||
start_week_update_teams(Bygfoot *bygfoot);
|
||||
|
||||
void
|
||||
start_week_round_update_teams(void);
|
||||
|
||||
void
|
||||
start_week_update_user_finances(void);
|
||||
start_week_update_user_finances(Bygfoot *bygfoot);
|
||||
|
||||
void
|
||||
start_week_update_users(void);
|
||||
start_week_update_users(Bygfoot *bygfoot);
|
||||
|
||||
gboolean
|
||||
query_start_end_season_end(void);
|
||||
|
@ -83,7 +83,7 @@ void
|
|||
end_season(void);
|
||||
|
||||
void
|
||||
start_week_add_cups(void);
|
||||
start_week_add_cups(Bygfoot *bygfoot);
|
||||
|
||||
void
|
||||
end_week_hide_cups(void);
|
||||
|
@ -92,7 +92,7 @@ void
|
|||
start_new_season_reset_ids(void);
|
||||
|
||||
void
|
||||
start_week_update_leagues(void);
|
||||
start_week_update_leagues(Bygfoot *bygfoot);
|
||||
|
||||
void
|
||||
end_week_round_generate_news(Bygfoot *bygfoot);
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
/** Weekly update of the transfer list. */
|
||||
void
|
||||
transfer_update(void)
|
||||
transfer_update(Bygfoot *bygfoot)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("transfer_update\n");
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#define transoff(i, j) g_array_index(g_array_index(transfer_list, Transfer, i).offers, TransferOffer, j)
|
||||
|
||||
void
|
||||
transfer_update(void);
|
||||
transfer_update(Bygfoot *bygfoot);
|
||||
|
||||
void
|
||||
transfer_add_cpu_offers(void);
|
||||
|
|
|
@ -177,7 +177,7 @@ youth_academy_add_new_player(YouthAcademy *youth_academy)
|
|||
|
||||
/** Update the users' youth academies. */
|
||||
void
|
||||
youth_academy_update_weekly(void)
|
||||
youth_academy_update_weekly(Bygfoot *bygfoot)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("youth_academy_update_weekly\n");
|
||||
|
|
|
@ -36,7 +36,7 @@ void
|
|||
youth_academy_add_new_player(YouthAcademy *youth_academy);
|
||||
|
||||
void
|
||||
youth_academy_update_weekly(void);
|
||||
youth_academy_update_weekly(Bygfoot *bygfoot);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue