1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2024-12-16 10:21:15 +01:00

"Minor bugfix in query_cup_begins."

This commit is contained in:
gyboth 2005-11-26 16:52:51 +00:00
parent 31b2729c4e
commit 6f61b20f96
155 changed files with 533 additions and 93 deletions

View File

@ -11,6 +11,9 @@
reality
- added some nice pictures to the progress bar shown when
calculating results or loading/saving games
- added search popup to the teams list in the startup window (just
type a few letters to begin search)
09/10/2005: v1.9.1

File diff suppressed because one or more lines are too long

View File

@ -23,6 +23,42 @@ dnl Add the languages which your application supports here.
ALL_LINGUAS="de nl fr pl ro bg zh es da"
AM_GLIB_GNU_GETTEXT
dnl gstreamer checking
AC_ARG_ENABLE(gstreamer,
AC_HELP_STRING([--enable-gstreamer],[use GStreamer for media]),
[case "${enableval}" in
yes) ENABLE_GST=yes ;;
no) ENABLE_GST=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-gstreamer) ;;
esac],
[ENABLE_GST=no]) dnl Default value
if test x$ENABLE_GST = xyes; then
HAVE_GSTREAMER=0
dnl start with 0.8
GST_MAJORMINOR=0.8
GSTREAMER_REQUIRED=0.8
PKG_CHECK_MODULES(GST, \
gstreamer-$GST_MAJORMINOR >= $GSTREAMER_REQUIRED,
HAVE_GSTREAMER=1,HAVE_GSTREAMER=0)
if test "x$HAVE_GSTREAMER" = "x0"; then
AC_MSG_ERROR(you need gstreamer development packages installed !)
fi
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_LIBS)
AC_SUBST(HAVE_GSTREAMER)
AC_DEFINE_UNQUOTED(HAVE_GSTREAMER, $HAVE_GSTREAME,[gstreamer])
AC_MSG_RESULT(GStreamer)
fi
AC_OUTPUT([
Makefile
src/Makefile

View File

@ -4,11 +4,12 @@ AM_CFLAGS = -Wall #-fprofile-arcs -ftest-coverage -pg
INCLUDES = \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
@PACKAGE_CFLAGS@
@PACKAGE_CFLAGS@ @GST_CFLAGS@
bin_PROGRAMS = bygfoot
bygfoot_SOURCES = \
mediaplayer.c mediaplayer.h \
bet.c bet.h bet_struct.h \
callback_func.c callback_func.h callbacks.h cup.h finance.h fixture.h game_gui.h gui.h league.h live_game.h maths.h misc.h option.h player.h start_end.h team.h transfer.h treeview.h treeview_helper.h user.h window.h \
callbacks.c callback_func.h callbacks.h debug.h free.h game_gui.h game.h gui.h league.h load_save.h main.h option.h player.h table.h team.h transfer.h treeview2.h treeview.h treeview_helper.h user.h window.h \
@ -80,5 +81,5 @@ bygfoot_SOURCES = \
xml_team.c file.h free.h main.h misc.h option.h player.h team.h variables.h xml_team.h \
youth_academy.c free.h maths.h name.h option.h player.h team.h user.h youth_academy.h
bygfoot_LDADD = @PACKAGE_LIBS@ $(INTLLIBS)
bygfoot_LDADD = @PACKAGE_LIBS@ @GST_LIBS@ $(INTLLIBS)

View File

@ -1,4 +1,6 @@
/*
bet.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -213,8 +215,9 @@ bet_is_user(const BetMatch *bet)
return NULL;
}
/** Place a new bet. */
void
/** Place a new bet.
@return TRUE on success, FALSE otherwise. */
gboolean
bet_place(gint fix_id, gint outcome, gint wager)
{
gfloat max_wager = finance_wage_unit(current_user.tm) *
@ -223,19 +226,19 @@ bet_place(gint fix_id, gint outcome, gint wager)
gchar buf[SMALL];
if(wager <= 0)
return;
return TRUE;
if(wager > BUDGET(cur_user))
{
game_gui_show_warning(_("You don't have the money."));
return;
return FALSE;
}
if(wager > max_wager)
{
misc_print_grouped_int((gint)rint(max_wager), buf);
game_gui_show_warning(_("The betting office doesn't allow you to wager more than %s."), buf);
return;
return FALSE;
}
new_bet.fix_id = fix_id;
@ -246,6 +249,8 @@ bet_place(gint fix_id, gint outcome, gint wager)
if(window.bets != NULL)
treeview2_show_bets();
return TRUE;
}
/** Remove the bet on the given fixture. */

View File

@ -1,4 +1,6 @@
/*
bet.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -46,7 +48,7 @@ bet_round_odd(gfloat odd);
BetUser*
bet_is_user(const BetMatch *bet);
void
gboolean
bet_place(gint fix_id, gint outcome, gint wager);
void

View File

@ -1,4 +1,6 @@
/*
bet_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
bygfoot.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
callback_func.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -99,6 +101,14 @@ callback_player_clicked(gint idx, GdkEventButton *event)
if(event->type != GDK_BUTTON_PRESS)
return;
/*d*/
gint i;
for(i=0;i<lig(1).teams->len;i++)
printf("%d %s %d\n", i, g_array_index(lig(1).teams,
Team, i).name,
g_array_index(lig(1).teams,
Team, i).id);
if(event->button == 1)
{
if(selected_row == -1)

View File

@ -1,4 +1,6 @@
/*
callback_func.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
callbacks.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
callbacks.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
cup.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -230,7 +232,7 @@ cup_get_team_pointers(Cup *cup, gint round)
GPtrArray *teams = cup_round->team_ptrs;
if(debug > 60)
printf("cup_get_team_pointers %s \n", cup->name);
printf("cup_get_team_pointers %s round %d\n", cup->name, round);
if(teams->len > 0)
g_warning("cup_get_team_pointers: round %d in cup %s has non-empty team pointers array.",
@ -238,11 +240,13 @@ cup_get_team_pointers(Cup *cup, gint round)
for(i=0;i<cup_round->choose_teams->len;i++)
if(g_array_index(cup_round->choose_teams, CupChooseTeam, i).generate)
cup_load_choose_team_generate(cup, cup_round,
&g_array_index(cup_round->choose_teams, CupChooseTeam, i));
cup_load_choose_team_generate(
cup, cup_round,
&g_array_index(cup_round->choose_teams, CupChooseTeam, i));
else
cup_load_choose_team(cup, teams,
&g_array_index(cup_round->choose_teams, CupChooseTeam, i));
cup_load_choose_team(
cup, teams,
&g_array_index(cup_round->choose_teams, CupChooseTeam, i));
if(cup_round->teams->len > 0)
while(teams->len + cup_round->teams->len > cup_round->new_teams)
@ -260,7 +264,10 @@ cup_get_team_pointers(Cup *cup, gint round)
if(debug > 70)
for(i=0;i<teams->len;i++)
printf("cup_get_team_pointers: %d %s \n", i, ((Team*)g_ptr_array_index(teams, i))->name);
printf("cup_get_team_pointers: %d %s (%d) %s\n", i,
((Team*)g_ptr_array_index(teams, i))->name,
((Team*)g_ptr_array_index(teams, i))->clid,
cup->name);
}
/** Get the pointers to the teams (already generated, in one of the leagues or cups)
@ -964,55 +971,33 @@ cup_get_winner(const Cup *cup)
gboolean
query_cup_begins(const Cup *cup)
{
gint i;
gint i, j;
const League *league = NULL;
const Cup *cup_temp = NULL;
gboolean proceed = FALSE;
const CupRound *cup_round = &g_array_index(cup->rounds, CupRound, 0);
const CupRound *cup_round = NULL;
for(i=0;i<cup_round->choose_teams->len;i++)
if(!g_array_index(cup_round->choose_teams,CupChooseTeam, i).generate)
{
cup_get_choose_team_league_cup(
&g_array_index(cup_round->choose_teams,
CupChooseTeam, i), &league, &cup_temp);
for(j=0;j<cup->rounds->len;j++)
{
cup_round = &g_array_index(cup->rounds, CupRound, j);
if((cup_temp == NULL &&
(!league->active ||
(g_array_index(league->fixtures, Fixture,
league->fixtures->len - 1).week_number == week &&
g_array_index(league->fixtures, Fixture,
league->fixtures->len - 1).week_round_number == week_round))) ||
(league == NULL &&
(cup_temp->fixtures->len > 0 &&
g_array_index(cup_temp->fixtures, Fixture,
cup_temp->fixtures->len - 1).week_number == week &&
g_array_index(cup_temp->fixtures, Fixture,
cup_temp->fixtures->len - 1).week_round_number == week_round)))
proceed = TRUE;
}
if(!proceed)
return FALSE;
for(i=0;i<cup_round->choose_teams->len;i++)
if(!g_array_index(cup_round->choose_teams,CupChooseTeam, i).generate)
{
cup_get_choose_team_league_cup(
&g_array_index(cup_round->choose_teams,
CupChooseTeam, i), &league, &cup_temp);
if((cup_temp == NULL &&
(league->active &&
g_array_index(league->fixtures, Fixture,
league->fixtures->len - 1).attendance == -1)) ||
(league == NULL &&
(cup_temp->fixtures->len == 0 ||
(cup_temp->fixtures->len > 0 &&
g_array_index(cup_temp->fixtures, Fixture,
cup_temp->fixtures->len - 1).attendance == -1))))
return FALSE;
}
for(i=0;i<cup_round->choose_teams->len;i++)
if(!g_array_index(cup_round->choose_teams,CupChooseTeam, i).generate)
{
cup_get_choose_team_league_cup(
&g_array_index(cup_round->choose_teams,
CupChooseTeam, i), &league, &cup_temp);
if((cup_temp == NULL &&
(!league->active ||
g_array_index(league->fixtures, Fixture,
league->fixtures->len - 1).attendance == -1)) ||
(league == NULL &&
cup_temp->fixtures->len > 0 &&
g_array_index(cup_temp->fixtures, Fixture,
cup_temp->fixtures->len - 1).attendance == -1))
return FALSE;
}
}
return TRUE;
}

View File

@ -1,4 +1,6 @@
/*
cup.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
cup_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
debug.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -168,3 +170,23 @@ debug_calibrate_betting_odds(gint skilldiffmax, gint matches_per_skilldiff)
(gfloat)res[1] / (gfloat)matches, (gfloat)res[2] / (gfloat)matches);
}
}
/** Check whether the 4 forwards, boost on, style all-out-attack
easter egg should be activated. */
gboolean
debug_egg_forwards_boost_style(void)
{
gint i, fwds = 0;
if(current_user.tm->boost != 1 ||
current_user.tm->style != 2 ||
current_user.tm->players->len < 11)
return FALSE;
for(i=0;i<11;i++)
if(g_array_index(current_user.tm->players, Player, i).cpos == 3 &&
g_array_index(current_user.tm->players, Player, i).cskill > 0)
fwds++;
return (fwds > 3);
}

View File

@ -1,4 +1,6 @@
/*
debug.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -35,5 +37,8 @@ debug_reset_counter(gpointer data);
void
debug_calibrate_betting_odds(gint skilldiffmax, gint matches_per_skilldiff);
gboolean
debug_egg_forwards_boost_style(void);
#endif

View File

@ -1,4 +1,6 @@
/*
enums.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
file.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
file.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
finance.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
finance.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
fixture.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -524,6 +526,10 @@ fixture_write_knockout_round(Cup *cup, gint cup_round, GPtrArray *teams)
gint bye_len = (round->byes == -1) ?
math_get_bye_len(len) : round->byes;
if(debug > 60)
printf("fixture_write_knockout_round: %s %d byelen %d\n",
cup->name, cup_round, bye_len);
if(bye_len != 0)
{
cup->bye = g_ptr_array_new();
@ -556,7 +562,8 @@ fixture_write_knockout_round(Cup *cup, gint cup_round, GPtrArray *teams)
fixture_get_free_round(first_week + cup->week_gap, teams, -1, -1);
for(i=0; i<=(teams->len - 2) / 2; i++)
fixture_write(cup->fixtures, (Team*)g_ptr_array_index(teams, 2 * i + 1),
(Team*)g_ptr_array_index(teams, 2 * i), first_week + cup->week_gap,
(Team*)g_ptr_array_index(teams, 2 * i),
first_week + cup->week_gap,
week_round_number, cup->id, cup_round, 0,
!round->neutral, TRUE, TRUE);
}
@ -564,11 +571,14 @@ fixture_write_knockout_round(Cup *cup, gint cup_round, GPtrArray *teams)
g_array_sort_with_data(cup->fixtures, fixture_compare_func,
GINT_TO_POINTER(FIXTURE_COMPARE_DATE + 100));
cup->next_fixture_update_week = (cup_round < cup->rounds->len - 1 || round->replay > 0) ?
cup->next_fixture_update_week =
(cup_round < cup->rounds->len - 1 || round->replay > 0) ?
g_array_index(cup->fixtures, Fixture, cup->fixtures->len - 1).week_number : -1;
cup->next_fixture_update_week_round = (cup_round < cup->rounds->len - 1 || round->replay > 0) ?
cup->next_fixture_update_week_round =
(cup_round < cup->rounds->len - 1 || round->replay > 0) ?
g_array_index(cup->fixtures, Fixture, cup->fixtures->len - 1).week_round_number : -1;
g_ptr_array_free(teams, TRUE);
}

View File

@ -1,4 +1,6 @@
/*
fixture.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
fixture_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
free.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
free.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
game.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
game.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
game_gui.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
game_gui.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
gettext_macros.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
gui.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
gui.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
language.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
language.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
league.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -349,6 +351,9 @@ league_remove_team_with_id(League *league, gint id)
{
gint i;
/*d*/
printf("lrm %s %d\n", league->name, id);
for(i=0;i<league->teams->len;i++)
if(g_array_index(league->teams, Team, i).id == id)
{
@ -496,6 +501,9 @@ league_get_team_movements_prom_rel(const League *league, GArray *team_movements)
new_move.dest_idcs = dest_idcs;
new_move.dest_assigned = FALSE;
g_array_append_val(team_movements, new_move);
printf("tmov1 %s tm %s %d\n", league->name, new_move.tm.name,
new_move.tm.id);
}
free_gchar_array(&dest_sids);
@ -544,6 +552,9 @@ league_get_team_movements_prom_games(const League *league, GArray *team_movement
new_move.dest_idcs = dest_idcs;
new_move.dest_assigned = FALSE;
g_array_append_val(team_movements, new_move);
printf("tmov2 %s tm %s %d\n", league->name, new_move.tm.name,
new_move.tm.id);
}
free_gchar_array(&dest_sids);

View File

@ -1,4 +1,6 @@
/*
league.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
league_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
lg_commentary.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
lg_commentary.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
lg_commentary_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
live_game.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -60,8 +62,7 @@ gboolean show;
/** Calculate the result of a fixture using
the live game variable.
@param fix The fixture we calculate.
@see live_game_create_unit(), live_game_evaluate_unit(),
treeview_live_game_show_game_unit() */
*/
void
live_game_calculate_fixture(Fixture *fix)
{
@ -81,7 +82,7 @@ live_game_calculate_fixture(Fixture *fix)
do
{
live_game_create_unit();
live_game_create_unit();
live_game_evaluate_unit(&last_unit);
}
while(last_unit.event.type != LIVE_GAME_EVENT_END_MATCH &&
@ -728,6 +729,8 @@ live_game_event_general(gboolean create_new)
last_unit.event.type == LIVE_GAME_EVENT_STADIUM_BREAKDOWN ||
last_unit.event.type == LIVE_GAME_EVENT_STADIUM_FIRE ||
last_unit.event.type == LIVE_GAME_EVENT_STADIUM_RIOTS ||
(last_unit.event.type >= LIVE_GAME_EVENT_STRUCTURE_CHANGE &&
last_unit.event.type <= LIVE_GAME_EVENT_BOOST_CHANGE_ON) ||
((last_unit.event.type == LIVE_GAME_EVENT_POST ||
last_unit.event.type == LIVE_GAME_EVENT_CROSS_BAR) &&
math_rnd(0, 1) < const_float("float_live_game_possession_after_post")))
@ -780,6 +783,10 @@ live_game_event_general(gboolean create_new)
if(team_is_user(tm1) == -1)
strategy_live_game_check(match, 1);
if(last_unit.event.type >= LIVE_GAME_EVENT_STRUCTURE_CHANGE &&
last_unit.event.type <= LIVE_GAME_EVENT_BOOST_CHANGE_ON)
live_game_event_general(TRUE);
}
/** Fill in the players values in a general unit. */

View File

@ -1,4 +1,6 @@
/*
live_game.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
live_game_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -67,14 +69,14 @@ enum LiveGameEventType
LIVE_GAME_EVENT_STADIUM_FIRE, /* 27 */
LIVE_GAME_EVENT_SUBSTITUTION, /* 28 */
LIVE_GAME_EVENT_STRUCTURE_CHANGE, /* 29 */
LIVE_GAME_EVENT_STYLE_CHANGE_ALL_OUT_DEFEND,
LIVE_GAME_EVENT_STYLE_CHANGE_DEFEND,
LIVE_GAME_EVENT_STYLE_CHANGE_BALANCED,
LIVE_GAME_EVENT_STYLE_CHANGE_ATTACK,
LIVE_GAME_EVENT_STYLE_CHANGE_ALL_OUT_ATTACK,
LIVE_GAME_EVENT_BOOST_CHANGE_ANTI,
LIVE_GAME_EVENT_BOOST_CHANGE_OFF,
LIVE_GAME_EVENT_BOOST_CHANGE_ON,
LIVE_GAME_EVENT_STYLE_CHANGE_ALL_OUT_DEFEND, /* 30 */
LIVE_GAME_EVENT_STYLE_CHANGE_DEFEND, /* 31 */
LIVE_GAME_EVENT_STYLE_CHANGE_BALANCED, /* 32 */
LIVE_GAME_EVENT_STYLE_CHANGE_ATTACK, /* 33 */
LIVE_GAME_EVENT_STYLE_CHANGE_ALL_OUT_ATTACK, /* 34 */
LIVE_GAME_EVENT_BOOST_CHANGE_ANTI, /* 35 */
LIVE_GAME_EVENT_BOOST_CHANGE_OFF, /* 36 */
LIVE_GAME_EVENT_BOOST_CHANGE_ON, /* 37 */
LIVE_GAME_EVENT_END
};

View File

@ -1,4 +1,6 @@
/*
load_save.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
load_save.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
main.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -38,6 +40,7 @@
#include "live_game.h"
#include "load_save.h"
#include "main.h"
#include "mediaplayer.h"
#include "misc.h"
#include "misc_callbacks.h"
#include "name_struct.h"
@ -76,7 +79,7 @@ main_parse_cl_arguments(gint *argc, gchar ***argv)
{ "last-save", 'l', 0, G_OPTION_ARG_NONE, &load_last_save, _("Load last savegame"), NULL },
{ "testcom", 't', 0, G_OPTION_ARG_NONE, &testcom, _("Test an XML commmentary file"), NULL },
{ "testcom", 't', 0, G_OPTION_ARG_NONE, &testcom, _("Test an XML commentary file"), NULL },
{ "commentary-file", 'c', 0, G_OPTION_ARG_STRING, &testcom_file,
_("Commentary file name (may be in a support dir)"), "FILE" },
@ -276,9 +279,12 @@ main (gint argc, gchar *argv[])
gtk_set_locale ();
gtk_init (&argc, &argv);
mediaplayer_init(&argc, &argv);
main_init(&argc, &argv);
/* mediaplayer_play_media("file://receive.ogg"); */
if((load_last_save && !load_game_from_command_line("last_save")) ||
(!load_last_save && (argc == 1 ||
(argc > 1 && !load_game_from_command_line(argv[1])))))

View File

@ -1,4 +1,6 @@
/*
main.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
maths.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
maths.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc2_callback_func.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc2_callback_func.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc2_callbacks.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -148,7 +150,8 @@ on_button_digits_ok_clicked (GtkButton *button,
current_user.youth_academy.percentage = values[1];
break;
case STATUS_PLACE_BET:
bet_place(stat2, stat3, values[0]);
if(!bet_place(stat2, stat3, values[0]))
destroy_window = FALSE;
break;
}

View File

@ -1,4 +1,6 @@
/*
misc2_callbacks.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc3_callbacks.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc3_callbacks.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc_callback_func.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc_callback_func.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc_callbacks.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
misc_callbacks.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
name.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
name.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
name_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
nonsourcestrings.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
option.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
option.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
option_gui.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
option_gui.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
option_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
options_callbacks.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
options_callbacks.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
player.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
player.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
player_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
start_end.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -567,6 +569,12 @@ start_new_season_league_changes(void)
for(i=0;i<ligs->len;i++)
league_size[i] = lig(i).teams->len;
/*d*/
for(i=0;i<lig(1).teams->len;i++)
printf("# %d %s %d\n", i,
g_array_index(lig(1).teams, Team, i).name,
g_array_index(lig(1).teams, Team, i).id);
for(i=0;i<team_movements->len;i++)
league_remove_team_with_id(
league_from_clid(g_array_index(team_movements, TeamMove, i).tm.clid),

View File

@ -1,4 +1,6 @@
/*
start_end.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
stat.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
stat.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
stat_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
strategy.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
strategy.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
strategy_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
support.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
support.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
table.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
table.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
table_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
team.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -668,8 +670,10 @@ team_compare_func(gconstpointer a, gconstpointer b, gpointer data)
league_from_clid(tm1->clid)->layer);
}
else if(type == TEAM_COMPARE_LEAGUE_LAYER)
return_value = misc_int_compare(league_from_clid(tm2->clid)->layer,
league_from_clid(tm1->clid)->layer);
return_value =
(tm1->clid >= ID_CUP_START || tm2->clid >= ID_CUP_START) ?
0 : misc_int_compare(league_from_clid(tm2->clid)->layer,
league_from_clid(tm1->clid)->layer);
else if(type == TEAM_COMPARE_OFFENSIVE)
{
gint gf1 = team_get_table_value(tm1, TABLE_GF),

View File

@ -1,4 +1,6 @@
/*
team.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
team_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
transfer.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
transfer.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
transfer_struct.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
treeview.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
@ -123,6 +125,11 @@ treeview_set_up_team_selection_treeview(GtkTreeView *treeview)
gtk_tree_view_set_headers_visible(treeview, TRUE);
gtk_tree_view_set_rules_hint(treeview, TRUE);
gtk_tree_view_set_search_column(treeview, 2);
gtk_tree_view_set_search_equal_func(treeview,
treeview_helper_search_equal,
NULL, NULL);
/* Numbering the teams */
col = gtk_tree_view_column_new();
gtk_tree_view_append_column(treeview, col);

View File

@ -1,4 +1,6 @@
/*
treeview.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
treeview2.c
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

View File

@ -1,4 +1,6 @@
/*
treeview2.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.

Some files were not shown because too many files have changed in this diff Show More