Add Bygfoot* parameter to start_week* functions

In the future, this structure will hold the bygfoot global state.
This commit is contained in:
Tom Stellard 2020-12-31 10:42:58 -08:00 committed by Tom Stellard
parent b060b141cc
commit b76f817c93
10 changed files with 24 additions and 24 deletions

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -42,7 +42,7 @@
/** Weekly update of the transfer list. */
void
transfer_update(void)
transfer_update(Bygfoot *bygfoot)
{
#ifdef DEBUG
printf("transfer_update\n");

View File

@ -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);

View File

@ -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");

View File

@ -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