From 3b23bb353f7e29c744e1af8ec8caf81f019d761f Mon Sep 17 00:00:00 2001 From: gyboth Date: Mon, 24 Oct 2005 20:50:48 +0000 Subject: [PATCH] "CPU strategies, first draft." --- ChangeLog | 4 + Makefile.am | 4 +- bygfoot.glade | 125 +- bygfoot_misc.glade | 45 + configure.in | 4 +- po/POTFILES.in | 2 + po/da.po | 2944 +++++++++++++++++ src/Makefile.am | 8 +- src/bygfoot.h | 1 + src/cup.c | 81 +- src/file.c | 12 +- src/fixture.c | 93 +- src/fixture.h | 3 + src/free.c | 39 +- src/free.h | 3 + src/game.c | 52 +- src/game_gui.c | 14 + src/game_gui.h | 3 + src/interface.c | 439 +-- src/league.c | 34 +- src/lg_commentary.c | 486 ++- src/lg_commentary.h | 9 - src/live_game.c | 64 +- src/main.c | 25 +- src/main.h | 5 +- src/misc.c | 182 +- src/misc.h | 23 +- src/misc_callback_func.c | 1 - src/misc_interface.c | 19 + src/name.c | 6 +- src/nonsourcestrings.c | 6 + src/option.c | 41 +- src/options_callbacks.c | 6 +- src/player.c | 96 +- src/player.h | 3 + src/start_end.c | 33 +- src/start_end.h | 4 +- src/strategy.c | 574 ++++ src/strategy.h | 92 + src/strategy_struct.h | 80 + src/team.c | 198 +- src/team.h | 7 +- src/team_struct.h | 2 + src/treeview.c | 10 +- src/treeview_helper.c | 12 +- src/user.c | 7 +- src/variables.h | 7 +- src/window.c | 7 +- src/xml.c | 20 +- src/xml_country.c | 2 +- src/xml_loadsave_cup.c | 4 +- src/xml_loadsave_leagues_cups.c | 2 +- src/xml_loadsave_misc.c | 2 +- src/xml_loadsave_season_stats.c | 4 +- src/xml_loadsave_teams.c | 9 +- src/xml_loadsave_users.c | 2 +- src/xml_strategy.c | 560 ++++ src/xml_strategy.h | 58 + src/xml_team.c | 8 +- support_files/bygfoot_constants | 10 +- support_files/bygfoot_help | 3 +- support_files/bygfoot_lg_tokens | 70 - support_files/bygfoot_tokens | 81 + .../definitions/germany/league_germany1.xml | 2 +- .../definitions/germany/league_germany2.xml | 2 +- .../definitions/germany/league_germany3a.xml | 2 +- .../definitions/germany/league_germany3b.xml | 4 +- support_files/pixmaps/menu_save_geometry.png | Bin 0 -> 367 bytes 68 files changed, 5700 insertions(+), 1060 deletions(-) create mode 100644 po/da.po create mode 100644 src/nonsourcestrings.c create mode 100644 src/strategy.c create mode 100644 src/strategy.h create mode 100644 src/strategy_struct.h create mode 100644 src/xml_strategy.c create mode 100644 src/xml_strategy.h delete mode 100644 support_files/bygfoot_lg_tokens create mode 100644 support_files/bygfoot_tokens create mode 100644 support_files/pixmaps/menu_save_geometry.png diff --git a/ChangeLog b/ChangeLog index addb6bb1..75c73708 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +11/16/2005: v1.9.3 + - updated German country definition (thanks to Sebastian Vöcking) + + 10/16/2005: v1.9.2 - fixed some minor bugs - updated translations diff --git a/Makefile.am b/Makefile.am index 85275b44..0dcf61a5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,9 +11,9 @@ EXTRA_DIST = \ bygfoot.glade \ bygfoot.gladep -SUPPORT_DIRS = support_files support_files/names support_files/pixmaps support_files/pixmaps/history support_files/pixmaps/symbols support_files/pixmaps/live_game support_files/definitions support_files/definitions/argentina support_files/definitions/australia support_files/definitions/aus_victoria support_files/definitions/belgium support_files/definitions/brazil support_files/definitions/bulgaria support_files/definitions/england support_files/definitions/europe support_files/definitions/france support_files/definitions/germany support_files/definitions/ireland support_files/definitions/italy support_files/definitions/misc support_files/definitions/poland support_files/definitions/romania support_files/definitions/scg support_files/definitions/scotland support_files/definitions/short_leagues support_files/definitions/short_leagues_south_america support_files/definitions/spain support_files/definitions/usa support_files/definitions/wales support_files/definitions/wc06 support_files/definitions/netherlands support_files/lg_commentary +SUPPORT_DIRS = support_files support_files/names support_files/pixmaps support_files/pixmaps/history support_files/pixmaps/symbols support_files/pixmaps/live_game support_files/definitions support_files/definitions/argentina support_files/definitions/australia support_files/definitions/aus_victoria support_files/definitions/belgium support_files/definitions/brazil support_files/definitions/bulgaria support_files/definitions/england support_files/definitions/europe support_files/definitions/france support_files/definitions/germany support_files/definitions/ireland support_files/definitions/italy support_files/definitions/misc support_files/definitions/poland support_files/definitions/romania support_files/definitions/scg support_files/definitions/scotland support_files/definitions/short_leagues support_files/definitions/short_leagues_south_america support_files/definitions/spain support_files/definitions/usa support_files/definitions/wales support_files/definitions/wc06 support_files/definitions/netherlands support_files/lg_commentary support_files/strategy support_files/strategy/tmp -SUPPORT_FILES = support_files/names/player_names_brazil.xml support_files/names/player_names_england.xml support_files/names/player_names_belgium.xml support_files/names/player_names_usa.xml support_files/names/player_names_general.xml support_files/names/player_names_germany.xml support_files/names/player_names_romania.xml support_files/names/player_names_scotland.xml support_files/names/player_names_france.xml support_files/names/player_names_scg.xml support_files/names/player_names_italy.xml support_files/names/player_names_australia.xml support_files/names/player_names_poland.xml support_files/names/player_names_bulgaria.xml support_files/names/player_names_netherlands.xml support_files/names/player_names_sweden.xml support_files/names/player_names_hungary.xml support_files/names/player_names_denmark.xml support_files/names/player_names_latinoamerica.xml support_files/bygfoot.conf support_files/pixmaps/history/champion.png support_files/pixmaps/history/start_game.png support_files/pixmaps/history/fire_finance.png support_files/pixmaps/history/fire_failure.png support_files/pixmaps/history/job_offer.png support_files/pixmaps/history/end_season.png support_files/pixmaps/history/promoted.png support_files/pixmaps/history/relegated.png support_files/pixmaps/history/win_final.png support_files/pixmaps/history/lose_final.png support_files/pixmaps/history/reach_cup_round.png support_files/pixmaps/menu_history.png support_files/pixmaps/bygfoot_icon.png support_files/pixmaps/menu_league_stats.png support_files/pixmaps/new_week.png support_files/pixmaps/preview.png support_files/pixmaps/symbols/flag_germany.png support_files/pixmaps/symbols/flag_ch.png support_files/pixmaps/symbols/flag_cz.png support_files/pixmaps/symbols/flag_usa.png support_files/pixmaps/symbols/flag_dk.png support_files/pixmaps/symbols/flag_scg.png support_files/pixmaps/symbols/flag_es.png support_files/pixmaps/symbols/flag_eu.png support_files/pixmaps/symbols/flag_gr.png support_files/pixmaps/symbols/flag_hu.png support_files/pixmaps/symbols/flag_wales.png support_files/pixmaps/symbols/flag_bh.png support_files/pixmaps/symbols/flag_pt.png support_files/pixmaps/symbols/flag_ru.png support_files/pixmaps/symbols/flag_tr.png support_files/pixmaps/symbols/flag_uk.png support_files/pixmaps/symbols/flag_belgium.png support_files/pixmaps/symbols/flag_england.png support_files/pixmaps/symbols/flag_france.png support_files/pixmaps/symbols/flag_romania.png support_files/pixmaps/symbols/flag_brazil.png support_files/pixmaps/symbols/flag_scotland.png support_files/pixmaps/symbols/flag_ecuador.png support_files/pixmaps/symbols/flag_argentina.png support_files/pixmaps/symbols/flag_bolivia.png support_files/pixmaps/symbols/flag_chile.png support_files/pixmaps/symbols/flag_colombia.png support_files/pixmaps/symbols/flag_peru.png support_files/pixmaps/symbols/flag_paraguay.png support_files/pixmaps/symbols/flag_uruguay.png support_files/pixmaps/symbols/flag_venezuela.png support_files/pixmaps/symbols/flag_mexico.png support_files/pixmaps/symbols/flag_italy.png support_files/pixmaps/symbols/flag_ireland.png support_files/pixmaps/symbols/flag_n_ireland.png support_files/pixmaps/symbols/map_ireland.png support_files/pixmaps/symbols/flag_poland.png support_files/pixmaps/symbols/flag_australia.png support_files/pixmaps/symbols/flag_spain.png support_files/pixmaps/symbols/flag_aus_victoria.png support_files/pixmaps/symbols/flag_bulgaria.png support_files/pixmaps/symbols/flag_china.png support_files/pixmaps/symbols/flag_cdi.png support_files/pixmaps/symbols/flag_netherlands.png support_files/pixmaps/symbols/flag_albania.png support_files/pixmaps/symbols/flag_algeria.png support_files/pixmaps/symbols/flag_angola.png support_files/pixmaps/symbols/flag_armenia.png support_files/pixmaps/symbols/flag_austria.png support_files/pixmaps/symbols/flag_azerbaijan.png support_files/pixmaps/symbols/flag_bahrain.png support_files/pixmaps/symbols/flag_belarus.png support_files/pixmaps/symbols/flag_benin.png support_files/pixmaps/symbols/flag_botswana.png support_files/pixmaps/symbols/flag_burkina_faso.png support_files/pixmaps/symbols/flag_cameroon.png support_files/pixmaps/symbols/flag_canada.png support_files/pixmaps/symbols/flag_chtaipei.png support_files/pixmaps/symbols/flag_congodr.png support_files/pixmaps/symbols/flag_congo.png support_files/pixmaps/symbols/flag_costa_rica.png support_files/pixmaps/symbols/flag_cpv.png support_files/pixmaps/symbols/flag_croatia.png support_files/pixmaps/symbols/flag_cyprus.png support_files/pixmaps/symbols/flag_egypt.png support_files/pixmaps/symbols/flag_el_salvador.png support_files/pixmaps/symbols/flag_estonia.png support_files/pixmaps/symbols/flag_fiji.png support_files/pixmaps/symbols/flag_finland.png support_files/pixmaps/symbols/flag_fi.png support_files/pixmaps/symbols/flag_gabon.png support_files/pixmaps/symbols/flag_georgia.png support_files/pixmaps/symbols/flag_ghana.png support_files/pixmaps/symbols/flag_guatemala.png support_files/pixmaps/symbols/flag_guinea.png support_files/pixmaps/symbols/flag_honduras.png support_files/pixmaps/symbols/flag_hongkong.png support_files/pixmaps/symbols/flag_iceland.png support_files/pixmaps/symbols/flag_india.png support_files/pixmaps/symbols/flag_indonesia.png support_files/pixmaps/symbols/flag_iran.png support_files/pixmaps/symbols/flag_iraq.png support_files/pixmaps/symbols/flag_israel.png support_files/pixmaps/symbols/flag_jamaica.png support_files/pixmaps/symbols/flag_japan.png support_files/pixmaps/symbols/flag_jordan.png support_files/pixmaps/symbols/flag_kazakhstan.png support_files/pixmaps/symbols/flag_kenya.png support_files/pixmaps/symbols/flag_kittsnev.png support_files/pixmaps/symbols/flag_korea_dpr.png support_files/pixmaps/symbols/flag_korea.png support_files/pixmaps/symbols/flag_kuwait.png support_files/pixmaps/symbols/flag_kyrgyzstan.png support_files/pixmaps/symbols/flag_laos.png support_files/pixmaps/symbols/flag_latvia.png support_files/pixmaps/symbols/flag_lebanon.png support_files/pixmaps/symbols/flag_liberia.png support_files/pixmaps/symbols/flag_libya.png support_files/pixmaps/symbols/flag_lithuania.png support_files/pixmaps/symbols/flag_lux.png support_files/pixmaps/symbols/flag_macedonia.png support_files/pixmaps/symbols/flag_malawi.png support_files/pixmaps/symbols/flag_malaysia.png support_files/pixmaps/symbols/flag_maldives.png support_files/pixmaps/symbols/flag_mali.png support_files/pixmaps/symbols/flag_malta.png support_files/pixmaps/symbols/flag_moldova.png support_files/pixmaps/symbols/flag_morocco.png support_files/pixmaps/symbols/flag_nigeria.png support_files/pixmaps/symbols/flag_norway.png support_files/pixmaps/symbols/flag_nz.png support_files/pixmaps/symbols/flag_oman.png support_files/pixmaps/symbols/flag_palestine.png support_files/pixmaps/symbols/flag_panama.png support_files/pixmaps/symbols/flag_qatar.png support_files/pixmaps/symbols/flag_rsa.png support_files/pixmaps/symbols/flag_rwanda.png support_files/pixmaps/symbols/flag_saudi_arabia.png support_files/pixmaps/symbols/flag_senegal.png support_files/pixmaps/symbols/flag_singapore.png support_files/pixmaps/symbols/flag_slovakia.png support_files/pixmaps/symbols/flag_slovenia.png support_files/pixmaps/symbols/flag_sm.png support_files/pixmaps/symbols/flag_solomon.png support_files/pixmaps/symbols/flag_sri_lanka.png support_files/pixmaps/symbols/flag_sudan.png support_files/pixmaps/symbols/flag_sweden.png support_files/pixmaps/symbols/flag_syria.png support_files/pixmaps/symbols/flag_tahiti.png support_files/pixmaps/symbols/flag_tajikistan.png support_files/pixmaps/symbols/flag_thailand.png support_files/pixmaps/symbols/flag_togo.png support_files/pixmaps/symbols/flag_tritob.png support_files/pixmaps/symbols/flag_tunisia.png support_files/pixmaps/symbols/flag_turkmenistan.png support_files/pixmaps/symbols/flag_uae.png support_files/pixmaps/symbols/flag_uganda.png support_files/pixmaps/symbols/flag_uzbekistan.png support_files/pixmaps/symbols/flag_vanuatu.png support_files/pixmaps/symbols/flag_vietnam.png support_files/pixmaps/symbols/flag_vingren.png support_files/pixmaps/symbols/flag_wc06.png support_files/pixmaps/symbols/flag_yemen.png support_files/pixmaps/symbols/flag_zambia.png support_files/pixmaps/symbols/flag_zimbabwe.png support_files/pixmaps/symbols/flag_lie.png support_files/pixmaps/symbols/flag_andorra.png support_files/pixmaps/symbols/wc_africa.png support_files/pixmaps/symbols/wc_asia.png support_files/pixmaps/symbols/wc_europe.png support_files/pixmaps/symbols/wc_oceania.png support_files/pixmaps/symbols/wc_namerica.png support_files/pixmaps/symbols/wc_samerica.png support_files/pixmaps/transfers.png support_files/pixmaps/menu_league_results.png support_files/pixmaps/menu_table.png support_files/pixmaps/menu_fixtures_comp.png support_files/pixmaps/menu_fixtures.png support_files/pixmaps/menu_boost.png support_files/pixmaps/menu_browse_tms.png support_files/pixmaps/menu_finances.png support_files/pixmaps/menu_last_match.png support_files/pixmaps/live_game/sub.png support_files/pixmaps/live_game/red.png support_files/pixmaps/live_game/save.png support_files/pixmaps/live_game/goal.png support_files/pixmaps/live_game/yellow.png support_files/pixmaps/live_game/scoring_chance.png support_files/pixmaps/live_game/injury_temp.png support_files/pixmaps/live_game/injury.png support_files/pixmaps/live_game/structure_change.png support_files/pixmaps/live_game/whistle.png support_files/pixmaps/live_game/miss.png support_files/pixmaps/live_game/foul.png support_files/pixmaps/live_game/cross_bar.png support_files/pixmaps/live_game/post.png support_files/pixmaps/live_game/penalty.png support_files/pixmaps/live_game/stadium_brkn.png support_files/pixmaps/live_game/stadium_fire.png support_files/pixmaps/live_game/stadium_riot.png support_files/pixmaps/live_game/header.png support_files/pixmaps/live_game/goal_own.png support_files/pixmaps/live_game/lost_possession.png support_files/pixmaps/menu_match_stats.png support_files/pixmaps/menu_physio.png support_files/pixmaps/boost_anti.png support_files/pixmaps/boost_off.png support_files/pixmaps/boost_on.png support_files/pixmaps/menu_player_browse.png support_files/pixmaps/style_def.png support_files/pixmaps/style_atk.png support_files/pixmaps/style_bal.png support_files/pixmaps/style_all_atk.png support_files/pixmaps/style_all_def.png support_files/pixmaps/menu_player_contract.png support_files/pixmaps/menu_player_fire.png support_files/pixmaps/menu_player_info.png support_files/pixmaps/menu_player_put_transfer.png support_files/pixmaps/menu_player_remove_transfer.png support_files/pixmaps/table_up.png support_files/pixmaps/table_down.png support_files/pixmaps/table_stay.png support_files/pixmaps/menu_player_shoots.png support_files/pixmaps/menu_rearrange.png support_files/pixmaps/menu_scout.png support_files/pixmaps/menu_stadium.png support_files/pixmaps/menu_structure.png support_files/pixmaps/menu_style.png support_files/pixmaps/menu_youth_academy.png support_files/pixmaps/menu_mmatches.png support_files/pixmaps/player_status_injury.png support_files/pixmaps/player_status_hot.png support_files/pixmaps/player_status_ban.png support_files/pixmaps/player_status_yellow.png support_files/pixmaps/player_status_cold.png support_files/pixmaps/menu_player_move_to_ya.png support_files/pixmaps/menu_season_res.png support_files/pixmaps/menu_player_move_to_team.png support_files/definitions/argentina/league_argentina1.xml support_files/definitions/australia/league_australia1.xml support_files/definitions/australia/cup_australia_a_league.xml support_files/definitions/australia/country_australia.xml support_files/definitions/australia/cup_australia_playoffs.xml support_files/definitions/aus_victoria/country_aus_victoria.xml support_files/definitions/aus_victoria/cup_aus_vic_league.xml support_files/definitions/aus_victoria/cup_aus_vic_playoff1.xml support_files/definitions/aus_victoria/cup_aus_vic_playoff2.xml support_files/definitions/aus_victoria/league_aus_vic1.xml support_files/definitions/aus_victoria/league_aus_vic2nw.xml support_files/definitions/aus_victoria/league_aus_vic2se.xml support_files/definitions/aus_victoria/league_aus_vic3nw.xml support_files/definitions/aus_victoria/league_aus_vic3se.xml support_files/definitions/aus_victoria/league_aus_vic4nw.xml support_files/definitions/aus_victoria/league_aus_vic4se.xml support_files/definitions/aus_victoria/league_aus_vic5nw.xml support_files/definitions/aus_victoria/league_aus_vic5se.xml support_files/definitions/aus_victoria/league_aus_vic6nw.xml support_files/definitions/aus_victoria/league_aus_vic6se.xml support_files/definitions/aus_victoria/league_aus_vicprem.xml support_files/definitions/belgium/country_belgium.xml support_files/definitions/belgium/cup_belgium.xml support_files/definitions/belgium/cup_belgium_eindronde2.xml support_files/definitions/belgium/league_belgium1.xml support_files/definitions/belgium/league_belgium2.xml support_files/definitions/belgium/league_belgium3a.xml support_files/definitions/belgium/league_belgium3b.xml support_files/definitions/belgium/league_belgium4a.xml support_files/definitions/belgium/league_belgium4b.xml support_files/definitions/belgium/league_belgium4c.xml support_files/definitions/belgium/league_belgium4d.xml support_files/definitions/belgium/cup_belgium_eindronde3.xml support_files/definitions/belgium/cup_belgium_eindronde4.xml support_files/definitions/belgium/cup_belgium_beker.xml support_files/definitions/brazil/country_brazil.xml support_files/definitions/brazil/cup_brazil_copa_do_brasil.xml support_files/definitions/brazil/cup_brazil_prom_games2.xml support_files/definitions/brazil/cup_brazil_prom_games3.xml support_files/definitions/brazil/cup_brazil_prom_games4.xml support_files/definitions/brazil/cup_brazil_prom_games5.xml support_files/definitions/brazil/cup_brazil_prom_games6.xml support_files/definitions/brazil/league_brazil1.xml support_files/definitions/brazil/league_brazil2.xml support_files/definitions/brazil/league_brazil3.xml support_files/definitions/brazil/league_brazil4.xml support_files/definitions/brazil/league_brazil5.xml support_files/definitions/brazil/league_brazil6.xml support_files/definitions/brazil/cup_brazil_sul_am_ar.xml support_files/definitions/brazil/cup_brazil_sul_am_bo_ve.xml support_files/definitions/brazil/cup_brazil_sul_am_br1.xml support_files/definitions/brazil/cup_brazil_sul_am_br2.xml support_files/definitions/brazil/cup_brazil_sul_am_br3.xml support_files/definitions/brazil/cup_brazil_sul_am_br4.xml support_files/definitions/brazil/cup_brazil_sul_am_ch_pe.xml support_files/definitions/brazil/cup_brazil_sul_am_co_ec.xml support_files/definitions/brazil/cup_brazil_sul_am_knockout.xml support_files/definitions/brazil/cup_brazil_sul_am_pa_ur.xml support_files/definitions/brazil/cup_brazil_libertadores.xml support_files/definitions/brazil/cup_supercup_brazil_intercontinental.xml support_files/definitions/bulgaria/country_bulgaria.xml support_files/definitions/bulgaria/cup_bulgaria_national.xml support_files/definitions/bulgaria/cup_bulgaria_prom_games2.xml support_files/definitions/bulgaria/cup_supercup_bulgaria.xml support_files/definitions/bulgaria/league_bulgaria1.xml support_files/definitions/bulgaria/league_bulgaria2a.xml support_files/definitions/bulgaria/league_bulgaria2b.xml support_files/definitions/bulgaria/league_bulgaria3a.xml support_files/definitions/bulgaria/league_bulgaria3b.xml support_files/definitions/bulgaria/league_bulgaria3c.xml support_files/definitions/bulgaria/league_bulgaria3d.xml support_files/definitions/england/country_england.xml support_files/definitions/england/cup_england_fa.xml support_files/definitions/england/cup_england_league.xml support_files/definitions/england/cup_england_prom_games2.xml support_files/definitions/england/cup_england_prom_games3.xml support_files/definitions/england/cup_england_prom_games4.xml support_files/definitions/england/league_england1.xml support_files/definitions/england/league_england2.xml support_files/definitions/england/league_england3.xml support_files/definitions/england/league_england4.xml support_files/definitions/england/league_england5.xml support_files/definitions/england/cup_england_prom_games5.xml support_files/definitions/europe/cup_europe_champ_league.xml support_files/definitions/europe/cup_europe_cwc.xml support_files/definitions/europe/cup_europe_uefa.xml support_files/definitions/europe/cup_supercup_europe_uefa.xml support_files/definitions/europe/cup_supercup_europe_intercontinental.xml support_files/definitions/france/country_france.xml support_files/definitions/france/cup_france_coupe.xml support_files/definitions/france/league_france1.xml support_files/definitions/france/league_france2.xml support_files/definitions/france/league_france3.xml support_files/definitions/france/cup_france_ligue.xml support_files/definitions/france/league_france4a.xml support_files/definitions/france/league_france4b.xml support_files/definitions/france/league_france4c.xml support_files/definitions/france/league_france4d.xml support_files/definitions/germany/cup_germany_dfb.xml support_files/definitions/germany/league_germany1.xml support_files/definitions/germany/league_germany2.xml support_files/definitions/germany/league_germany3a.xml support_files/definitions/germany/league_germany3b.xml support_files/definitions/germany/country_germany.xml support_files/definitions/ireland/country_ireland.xml support_files/definitions/ireland/cup_ireland_league.xml support_files/definitions/ireland/cup_ireland_senior.xml support_files/definitions/ireland/league_ireland1.xml support_files/definitions/ireland/league_n_ireland1.xml support_files/definitions/ireland/league_ireland2.xml support_files/definitions/ireland/cup_ireland_prom_games.xml support_files/definitions/ireland/cup_ireland_setanta.xml support_files/definitions/ireland/cup_ireland_cl.xml support_files/definitions/ireland/cup_ireland_cl_q.xml support_files/definitions/ireland/cup_ireland_uefa.xml support_files/definitions/ireland/cup_ireland_uefa_q.xml support_files/definitions/italy/country_italy.xml support_files/definitions/italy/cup_italy_coppa.xml support_files/definitions/italy/league_italy1.xml support_files/definitions/italy/league_italy2.xml support_files/definitions/italy/league_italy3a.xml support_files/definitions/italy/league_italy3b.xml support_files/definitions/misc/cup_supercup_league_vs_cup.xml support_files/definitions/poland/league_poland1.xml support_files/definitions/poland/league_poland2.xml support_files/definitions/poland/league_poland3a.xml support_files/definitions/poland/league_poland3b.xml support_files/definitions/poland/league_poland3c.xml support_files/definitions/poland/league_poland3d.xml support_files/definitions/poland/country_poland.xml support_files/definitions/poland/cup_poland_prom_games1.xml support_files/definitions/poland/cup_poland_prom_games2.xml support_files/definitions/poland/cup_poland_puchar.xml support_files/definitions/romania/country_romania.xml support_files/definitions/romania/league_romania1.xml support_files/definitions/romania/league_romania2.xml support_files/definitions/romania/league_romania3.xml support_files/definitions/romania/cup_supercup_romania.xml support_files/definitions/romania/cup_romania_cupa.xml support_files/definitions/scg/country_scg.xml support_files/definitions/scg/cup_scg.xml support_files/definitions/scg/league_scg2a.xml support_files/definitions/scg/league_scg2b.xml support_files/definitions/scg/league_scg1.xml support_files/definitions/scotland/league_scotland1.xml support_files/definitions/scotland/country_scotland.xml support_files/definitions/scotland/league_scotland2.xml support_files/definitions/scotland/cup_scotland_league.xml support_files/definitions/scotland/league_scotland3.xml support_files/definitions/scotland/league_scotland4.xml support_files/definitions/scotland/cup_scotland_fa.xml support_files/definitions/short_leagues/league_czech1_short.xml support_files/definitions/short_leagues/league_denmark1_short.xml support_files/definitions/short_leagues/league_greece1_short.xml support_files/definitions/short_leagues/league_portugal1_short.xml support_files/definitions/short_leagues/league_russia1_short.xml support_files/definitions/short_leagues/league_switzerland1_short.xml support_files/definitions/short_leagues/league_turkey1_short.xml support_files/definitions/short_leagues/league_ukraine1_short.xml support_files/definitions/short_leagues_south_america/league_bolivia1_short.xml support_files/definitions/short_leagues_south_america/league_chile1_short.xml support_files/definitions/short_leagues_south_america/league_colombia1_short.xml support_files/definitions/short_leagues_south_america/league_ecuador1_short.xml support_files/definitions/short_leagues_south_america/league_mexico1_short.xml support_files/definitions/short_leagues_south_america/league_paraguay1_short.xml support_files/definitions/short_leagues_south_america/league_peru1_short.xml support_files/definitions/short_leagues_south_america/league_uruguay1_short.xml support_files/definitions/short_leagues_south_america/league_venezuela1_short.xml support_files/definitions/spain/country_spain.xml support_files/definitions/spain/cup_spain_cdr.xml support_files/definitions/spain/cup_spain_prom_games_1.xml support_files/definitions/spain/cup_spain_prom_games_2.xml support_files/definitions/spain/cup_spain_prom_games_3.xml support_files/definitions/spain/cup_spain_prom_games_4.xml support_files/definitions/spain/cup_spain_rfef.xml support_files/definitions/spain/league_spain1.xml support_files/definitions/spain/league_spain2.xml support_files/definitions/spain/league_spain3a.xml support_files/definitions/spain/league_spain3b.xml support_files/definitions/spain/league_spain3c.xml support_files/definitions/spain/league_spain3d.xml support_files/definitions/usa/league_usa_econf.xml support_files/definitions/usa/country_usa.xml support_files/definitions/usa/league_usa_wconf.xml support_files/definitions/usa/cup_usa_eplayoff.xml support_files/definitions/usa/cup_usa_wplayoff.xml support_files/definitions/usa/cup_usa_mls_cup.xml support_files/definitions/wales/league_wales1.xml support_files/definitions/wales/league_wales2a.xml support_files/definitions/wales/league_wales2b.xml support_files/definitions/wales/country_wales.xml support_files/definitions/wales/cup_wales_welsh.xml support_files/definitions/wales/cup_wales_challenge.xml support_files/definitions/wales/cup_wales_premier.xml support_files/definitions/wales/league_wales_english.xml support_files/definitions/wales/cup_wales_uefa_q.xml support_files/definitions/wales/cup_wales_uefa.xml support_files/definitions/wales/cup_wales_cl.xml support_files/definitions/wales/cup_wales_cl_q.xml support_files/definitions/wc06/league_wc06_europe_teams.xml support_files/definitions/wc06/league_wc06_asia_teams.xml support_files/definitions/wc06/country_wc06.xml support_files/definitions/wc06/cup_wc06_africa.xml support_files/definitions/wc06/cup_wc06_europe.xml support_files/definitions/wc06/cup_wc06_europe_playoffs.xml support_files/definitions/wc06/cup_wc06_oceania.xml support_files/definitions/wc06/cup_wc06_ncamerica.xml support_files/definitions/wc06/league_wc06_africa_teams.xml support_files/definitions/wc06/league_wc06_samerica_teams.xml support_files/definitions/wc06/league_wc06_ncamerica_teams.xml support_files/definitions/wc06/cup_wc06_samerica.xml support_files/definitions/wc06/league_wc06_oceania_teams.xml support_files/definitions/wc06/cup_wc06_asia.xml support_files/definitions/wc06/cup_wc06_final.xml support_files/definitions/wc06/cup_wc06_oceania_samerica.xml support_files/definitions/wc06/cup_wc06_asia_ncamerica.xml support_files/definitions/wc06/cup_wc06_asia_playoff.xml support_files/definitions/wc06/0,2548,All-Sep-2005,00.html support_files/definitions/wc06/fifa.txt support_files/definitions/netherlands/country_netherlands.xml support_files/definitions/netherlands/cup_netherlands_amstelcup.xml support_files/definitions/netherlands/cup_netherlands_nacompetitie2.xml support_files/definitions/netherlands/cup_netherlands_nacompetitie3.xml support_files/definitions/netherlands/cup_netherlands_nacompetitie4.xml support_files/definitions/netherlands/league_netherlands1.xml support_files/definitions/netherlands/league_netherlands2.xml support_files/definitions/netherlands/league_netherlands3a.xml support_files/definitions/netherlands/league_netherlands3b.xml support_files/definitions/netherlands/league_netherlands3c.xml support_files/bygfoot_constants support_files/bygfoot_user.conf support_files/lg_commentary/lg_commentary_de.xml support_files/lg_commentary/lg_commentary_en.xml support_files/lg_commentary/lg_commentary_nl.xml support_files/lg_commentary/lg_commentary_pl.xml support_files/lg_commentary/lg_commentary_bg.xml support_files/bygfoot_app support_files/bygfoot_help support_files/bygfoot_lg_tokens +SUPPORT_FILES = support_files/names/player_names_brazil.xml support_files/names/player_names_england.xml support_files/names/player_names_belgium.xml support_files/names/player_names_usa.xml support_files/names/player_names_general.xml support_files/names/player_names_germany.xml support_files/names/player_names_romania.xml support_files/names/player_names_scotland.xml support_files/names/player_names_france.xml support_files/names/player_names_scg.xml support_files/names/player_names_italy.xml support_files/names/player_names_australia.xml support_files/names/player_names_poland.xml support_files/names/player_names_bulgaria.xml support_files/names/player_names_netherlands.xml support_files/names/player_names_sweden.xml support_files/names/player_names_hungary.xml support_files/names/player_names_denmark.xml support_files/names/player_names_latinoamerica.xml support_files/bygfoot.conf support_files/pixmaps/history/champion.png support_files/pixmaps/history/start_game.png support_files/pixmaps/history/fire_finance.png support_files/pixmaps/history/fire_failure.png support_files/pixmaps/history/job_offer.png support_files/pixmaps/history/end_season.png support_files/pixmaps/history/promoted.png support_files/pixmaps/history/relegated.png support_files/pixmaps/history/win_final.png support_files/pixmaps/history/lose_final.png support_files/pixmaps/history/reach_cup_round.png support_files/pixmaps/menu_history.png support_files/pixmaps/bygfoot_icon.png support_files/pixmaps/menu_league_stats.png support_files/pixmaps/new_week.png support_files/pixmaps/preview.png support_files/pixmaps/symbols/flag_germany.png support_files/pixmaps/symbols/flag_ch.png support_files/pixmaps/symbols/flag_cz.png support_files/pixmaps/symbols/flag_usa.png support_files/pixmaps/symbols/flag_dk.png support_files/pixmaps/symbols/flag_scg.png support_files/pixmaps/symbols/flag_es.png support_files/pixmaps/symbols/flag_eu.png support_files/pixmaps/symbols/flag_gr.png support_files/pixmaps/symbols/flag_hu.png support_files/pixmaps/symbols/flag_wales.png support_files/pixmaps/symbols/flag_bh.png support_files/pixmaps/symbols/flag_pt.png support_files/pixmaps/symbols/flag_ru.png support_files/pixmaps/symbols/flag_tr.png support_files/pixmaps/symbols/flag_uk.png support_files/pixmaps/symbols/flag_belgium.png support_files/pixmaps/symbols/flag_england.png support_files/pixmaps/symbols/flag_france.png support_files/pixmaps/symbols/flag_romania.png support_files/pixmaps/symbols/flag_brazil.png support_files/pixmaps/symbols/flag_scotland.png support_files/pixmaps/symbols/flag_ecuador.png support_files/pixmaps/symbols/flag_argentina.png support_files/pixmaps/symbols/flag_bolivia.png support_files/pixmaps/symbols/flag_chile.png support_files/pixmaps/symbols/flag_colombia.png support_files/pixmaps/symbols/flag_peru.png support_files/pixmaps/symbols/flag_paraguay.png support_files/pixmaps/symbols/flag_uruguay.png support_files/pixmaps/symbols/flag_venezuela.png support_files/pixmaps/symbols/flag_mexico.png support_files/pixmaps/symbols/flag_italy.png support_files/pixmaps/symbols/flag_ireland.png support_files/pixmaps/symbols/flag_n_ireland.png support_files/pixmaps/symbols/map_ireland.png support_files/pixmaps/symbols/flag_poland.png support_files/pixmaps/symbols/flag_australia.png support_files/pixmaps/symbols/flag_spain.png support_files/pixmaps/symbols/flag_aus_victoria.png support_files/pixmaps/symbols/flag_bulgaria.png support_files/pixmaps/symbols/flag_china.png support_files/pixmaps/symbols/flag_cdi.png support_files/pixmaps/symbols/flag_netherlands.png support_files/pixmaps/symbols/flag_albania.png support_files/pixmaps/symbols/flag_algeria.png support_files/pixmaps/symbols/flag_angola.png support_files/pixmaps/symbols/flag_armenia.png support_files/pixmaps/symbols/flag_austria.png support_files/pixmaps/symbols/flag_azerbaijan.png support_files/pixmaps/symbols/flag_bahrain.png support_files/pixmaps/symbols/flag_belarus.png support_files/pixmaps/symbols/flag_benin.png support_files/pixmaps/symbols/flag_botswana.png support_files/pixmaps/symbols/flag_burkina_faso.png support_files/pixmaps/symbols/flag_cameroon.png support_files/pixmaps/symbols/flag_canada.png support_files/pixmaps/symbols/flag_chtaipei.png support_files/pixmaps/symbols/flag_congodr.png support_files/pixmaps/symbols/flag_congo.png support_files/pixmaps/symbols/flag_costa_rica.png support_files/pixmaps/symbols/flag_cpv.png support_files/pixmaps/symbols/flag_croatia.png support_files/pixmaps/symbols/flag_cyprus.png support_files/pixmaps/symbols/flag_egypt.png support_files/pixmaps/symbols/flag_el_salvador.png support_files/pixmaps/symbols/flag_estonia.png support_files/pixmaps/symbols/flag_fiji.png support_files/pixmaps/symbols/flag_finland.png support_files/pixmaps/symbols/flag_fi.png support_files/pixmaps/symbols/flag_gabon.png support_files/pixmaps/symbols/flag_georgia.png support_files/pixmaps/symbols/flag_ghana.png support_files/pixmaps/symbols/flag_guatemala.png support_files/pixmaps/symbols/flag_guinea.png support_files/pixmaps/symbols/flag_honduras.png support_files/pixmaps/symbols/flag_hongkong.png support_files/pixmaps/symbols/flag_iceland.png support_files/pixmaps/symbols/flag_india.png support_files/pixmaps/symbols/flag_indonesia.png support_files/pixmaps/symbols/flag_iran.png support_files/pixmaps/symbols/flag_iraq.png support_files/pixmaps/symbols/flag_israel.png support_files/pixmaps/symbols/flag_jamaica.png support_files/pixmaps/symbols/flag_japan.png support_files/pixmaps/symbols/flag_jordan.png support_files/pixmaps/symbols/flag_kazakhstan.png support_files/pixmaps/symbols/flag_kenya.png support_files/pixmaps/symbols/flag_kittsnev.png support_files/pixmaps/symbols/flag_korea_dpr.png support_files/pixmaps/symbols/flag_korea.png support_files/pixmaps/symbols/flag_kuwait.png support_files/pixmaps/symbols/flag_kyrgyzstan.png support_files/pixmaps/symbols/flag_laos.png support_files/pixmaps/symbols/flag_latvia.png support_files/pixmaps/symbols/flag_lebanon.png support_files/pixmaps/symbols/flag_liberia.png support_files/pixmaps/symbols/flag_libya.png support_files/pixmaps/symbols/flag_lithuania.png support_files/pixmaps/symbols/flag_lux.png support_files/pixmaps/symbols/flag_macedonia.png support_files/pixmaps/symbols/flag_malawi.png support_files/pixmaps/symbols/flag_malaysia.png support_files/pixmaps/symbols/flag_maldives.png support_files/pixmaps/symbols/flag_mali.png support_files/pixmaps/symbols/flag_malta.png support_files/pixmaps/symbols/flag_moldova.png support_files/pixmaps/symbols/flag_morocco.png support_files/pixmaps/symbols/flag_nigeria.png support_files/pixmaps/symbols/flag_norway.png support_files/pixmaps/symbols/flag_nz.png support_files/pixmaps/symbols/flag_oman.png support_files/pixmaps/symbols/flag_palestine.png support_files/pixmaps/symbols/flag_panama.png support_files/pixmaps/symbols/flag_qatar.png support_files/pixmaps/symbols/flag_rsa.png support_files/pixmaps/symbols/flag_rwanda.png support_files/pixmaps/symbols/flag_saudi_arabia.png support_files/pixmaps/symbols/flag_senegal.png support_files/pixmaps/symbols/flag_singapore.png support_files/pixmaps/symbols/flag_slovakia.png support_files/pixmaps/symbols/flag_slovenia.png support_files/pixmaps/symbols/flag_sm.png support_files/pixmaps/symbols/flag_solomon.png support_files/pixmaps/symbols/flag_sri_lanka.png support_files/pixmaps/symbols/flag_sudan.png support_files/pixmaps/symbols/flag_sweden.png support_files/pixmaps/symbols/flag_syria.png support_files/pixmaps/symbols/flag_tahiti.png support_files/pixmaps/symbols/flag_tajikistan.png support_files/pixmaps/symbols/flag_thailand.png support_files/pixmaps/symbols/flag_togo.png support_files/pixmaps/symbols/flag_tritob.png support_files/pixmaps/symbols/flag_tunisia.png support_files/pixmaps/symbols/flag_turkmenistan.png support_files/pixmaps/symbols/flag_uae.png support_files/pixmaps/symbols/flag_uganda.png support_files/pixmaps/symbols/flag_uzbekistan.png support_files/pixmaps/symbols/flag_vanuatu.png support_files/pixmaps/symbols/flag_vietnam.png support_files/pixmaps/symbols/flag_vingren.png support_files/pixmaps/symbols/flag_wc06.png support_files/pixmaps/symbols/flag_yemen.png support_files/pixmaps/symbols/flag_zambia.png support_files/pixmaps/symbols/flag_zimbabwe.png support_files/pixmaps/symbols/flag_lie.png support_files/pixmaps/symbols/flag_andorra.png support_files/pixmaps/symbols/wc_africa.png support_files/pixmaps/symbols/wc_asia.png support_files/pixmaps/symbols/wc_europe.png support_files/pixmaps/symbols/wc_oceania.png support_files/pixmaps/symbols/wc_namerica.png support_files/pixmaps/symbols/wc_samerica.png support_files/pixmaps/transfers.png support_files/pixmaps/menu_league_results.png support_files/pixmaps/menu_table.png support_files/pixmaps/menu_fixtures_comp.png support_files/pixmaps/menu_fixtures.png support_files/pixmaps/menu_boost.png support_files/pixmaps/menu_browse_tms.png support_files/pixmaps/menu_finances.png support_files/pixmaps/menu_last_match.png support_files/pixmaps/live_game/sub.png support_files/pixmaps/live_game/red.png support_files/pixmaps/live_game/save.png support_files/pixmaps/live_game/goal.png support_files/pixmaps/live_game/yellow.png support_files/pixmaps/live_game/scoring_chance.png support_files/pixmaps/live_game/injury_temp.png support_files/pixmaps/live_game/injury.png support_files/pixmaps/live_game/structure_change.png support_files/pixmaps/live_game/whistle.png support_files/pixmaps/live_game/miss.png support_files/pixmaps/live_game/foul.png support_files/pixmaps/live_game/cross_bar.png support_files/pixmaps/live_game/post.png support_files/pixmaps/live_game/penalty.png support_files/pixmaps/live_game/stadium_brkn.png support_files/pixmaps/live_game/stadium_fire.png support_files/pixmaps/live_game/stadium_riot.png support_files/pixmaps/live_game/header.png support_files/pixmaps/live_game/goal_own.png support_files/pixmaps/live_game/lost_possession.png support_files/pixmaps/menu_match_stats.png support_files/pixmaps/menu_physio.png support_files/pixmaps/boost_anti.png support_files/pixmaps/boost_off.png support_files/pixmaps/boost_on.png support_files/pixmaps/menu_player_browse.png support_files/pixmaps/style_def.png support_files/pixmaps/style_atk.png support_files/pixmaps/style_bal.png support_files/pixmaps/style_all_atk.png support_files/pixmaps/style_all_def.png support_files/pixmaps/menu_player_contract.png support_files/pixmaps/menu_player_fire.png support_files/pixmaps/menu_player_info.png support_files/pixmaps/menu_player_put_transfer.png support_files/pixmaps/menu_player_remove_transfer.png support_files/pixmaps/table_up.png support_files/pixmaps/table_down.png support_files/pixmaps/table_stay.png support_files/pixmaps/menu_player_shoots.png support_files/pixmaps/menu_rearrange.png support_files/pixmaps/menu_scout.png support_files/pixmaps/menu_stadium.png support_files/pixmaps/menu_structure.png support_files/pixmaps/menu_style.png support_files/pixmaps/menu_youth_academy.png support_files/pixmaps/menu_mmatches.png support_files/pixmaps/player_status_injury.png support_files/pixmaps/player_status_hot.png support_files/pixmaps/player_status_ban.png support_files/pixmaps/player_status_yellow.png support_files/pixmaps/player_status_cold.png support_files/pixmaps/menu_player_move_to_ya.png support_files/pixmaps/menu_season_res.png support_files/pixmaps/menu_player_move_to_team.png support_files/pixmaps/menu_save_geometry.png support_files/definitions/argentina/league_argentina1.xml support_files/definitions/australia/league_australia1.xml support_files/definitions/australia/cup_australia_a_league.xml support_files/definitions/australia/country_australia.xml support_files/definitions/australia/cup_australia_playoffs.xml support_files/definitions/aus_victoria/country_aus_victoria.xml support_files/definitions/aus_victoria/cup_aus_vic_league.xml support_files/definitions/aus_victoria/cup_aus_vic_playoff1.xml support_files/definitions/aus_victoria/cup_aus_vic_playoff2.xml support_files/definitions/aus_victoria/league_aus_vic1.xml support_files/definitions/aus_victoria/league_aus_vic2nw.xml support_files/definitions/aus_victoria/league_aus_vic2se.xml support_files/definitions/aus_victoria/league_aus_vic3nw.xml support_files/definitions/aus_victoria/league_aus_vic3se.xml support_files/definitions/aus_victoria/league_aus_vic4nw.xml support_files/definitions/aus_victoria/league_aus_vic4se.xml support_files/definitions/aus_victoria/league_aus_vic5nw.xml support_files/definitions/aus_victoria/league_aus_vic5se.xml support_files/definitions/aus_victoria/league_aus_vic6nw.xml support_files/definitions/aus_victoria/league_aus_vic6se.xml support_files/definitions/aus_victoria/league_aus_vicprem.xml support_files/definitions/belgium/country_belgium.xml support_files/definitions/belgium/cup_belgium.xml support_files/definitions/belgium/cup_belgium_eindronde2.xml support_files/definitions/belgium/league_belgium1.xml support_files/definitions/belgium/league_belgium2.xml support_files/definitions/belgium/league_belgium3a.xml support_files/definitions/belgium/league_belgium3b.xml support_files/definitions/belgium/league_belgium4a.xml support_files/definitions/belgium/league_belgium4b.xml support_files/definitions/belgium/league_belgium4c.xml support_files/definitions/belgium/league_belgium4d.xml support_files/definitions/belgium/cup_belgium_eindronde3.xml support_files/definitions/belgium/cup_belgium_eindronde4.xml support_files/definitions/belgium/cup_belgium_beker.xml support_files/definitions/brazil/country_brazil.xml support_files/definitions/brazil/cup_brazil_copa_do_brasil.xml support_files/definitions/brazil/cup_brazil_prom_games2.xml support_files/definitions/brazil/cup_brazil_prom_games3.xml support_files/definitions/brazil/cup_brazil_prom_games4.xml support_files/definitions/brazil/cup_brazil_prom_games5.xml support_files/definitions/brazil/cup_brazil_prom_games6.xml support_files/definitions/brazil/league_brazil1.xml support_files/definitions/brazil/league_brazil2.xml support_files/definitions/brazil/league_brazil3.xml support_files/definitions/brazil/league_brazil4.xml support_files/definitions/brazil/league_brazil5.xml support_files/definitions/brazil/league_brazil6.xml support_files/definitions/brazil/cup_brazil_sul_am_ar.xml support_files/definitions/brazil/cup_brazil_sul_am_bo_ve.xml support_files/definitions/brazil/cup_brazil_sul_am_br1.xml support_files/definitions/brazil/cup_brazil_sul_am_br2.xml support_files/definitions/brazil/cup_brazil_sul_am_br3.xml support_files/definitions/brazil/cup_brazil_sul_am_br4.xml support_files/definitions/brazil/cup_brazil_sul_am_ch_pe.xml support_files/definitions/brazil/cup_brazil_sul_am_co_ec.xml support_files/definitions/brazil/cup_brazil_sul_am_knockout.xml support_files/definitions/brazil/cup_brazil_sul_am_pa_ur.xml support_files/definitions/brazil/cup_brazil_libertadores.xml support_files/definitions/brazil/cup_supercup_brazil_intercontinental.xml support_files/definitions/bulgaria/country_bulgaria.xml support_files/definitions/bulgaria/cup_bulgaria_national.xml support_files/definitions/bulgaria/cup_bulgaria_prom_games2.xml support_files/definitions/bulgaria/cup_supercup_bulgaria.xml support_files/definitions/bulgaria/league_bulgaria1.xml support_files/definitions/bulgaria/league_bulgaria2a.xml support_files/definitions/bulgaria/league_bulgaria2b.xml support_files/definitions/bulgaria/league_bulgaria3a.xml support_files/definitions/bulgaria/league_bulgaria3b.xml support_files/definitions/bulgaria/league_bulgaria3c.xml support_files/definitions/bulgaria/league_bulgaria3d.xml support_files/definitions/england/country_england.xml support_files/definitions/england/cup_england_fa.xml support_files/definitions/england/cup_england_league.xml support_files/definitions/england/cup_england_prom_games2.xml support_files/definitions/england/cup_england_prom_games3.xml support_files/definitions/england/cup_england_prom_games4.xml support_files/definitions/england/league_england1.xml support_files/definitions/england/league_england2.xml support_files/definitions/england/league_england3.xml support_files/definitions/england/league_england4.xml support_files/definitions/england/league_england5.xml support_files/definitions/england/cup_england_prom_games5.xml support_files/definitions/europe/cup_europe_champ_league.xml support_files/definitions/europe/cup_europe_cwc.xml support_files/definitions/europe/cup_europe_uefa.xml support_files/definitions/europe/cup_supercup_europe_uefa.xml support_files/definitions/europe/cup_supercup_europe_intercontinental.xml support_files/definitions/france/country_france.xml support_files/definitions/france/cup_france_coupe.xml support_files/definitions/france/league_france1.xml support_files/definitions/france/league_france2.xml support_files/definitions/france/league_france3.xml support_files/definitions/france/cup_france_ligue.xml support_files/definitions/france/league_france4a.xml support_files/definitions/france/league_france4b.xml support_files/definitions/france/league_france4c.xml support_files/definitions/france/league_france4d.xml support_files/definitions/germany/cup_germany_dfb.xml support_files/definitions/germany/league_germany1.xml support_files/definitions/germany/league_germany2.xml support_files/definitions/germany/league_germany3a.xml support_files/definitions/germany/league_germany3b.xml support_files/definitions/germany/country_germany.xml support_files/definitions/ireland/country_ireland.xml support_files/definitions/ireland/cup_ireland_league.xml support_files/definitions/ireland/cup_ireland_senior.xml support_files/definitions/ireland/league_ireland1.xml support_files/definitions/ireland/league_n_ireland1.xml support_files/definitions/ireland/league_ireland2.xml support_files/definitions/ireland/cup_ireland_prom_games.xml support_files/definitions/ireland/cup_ireland_setanta.xml support_files/definitions/ireland/cup_ireland_cl.xml support_files/definitions/ireland/cup_ireland_cl_q.xml support_files/definitions/ireland/cup_ireland_uefa.xml support_files/definitions/ireland/cup_ireland_uefa_q.xml support_files/definitions/italy/country_italy.xml support_files/definitions/italy/cup_italy_coppa.xml support_files/definitions/italy/league_italy1.xml support_files/definitions/italy/league_italy2.xml support_files/definitions/italy/league_italy3a.xml support_files/definitions/italy/league_italy3b.xml support_files/definitions/misc/cup_supercup_league_vs_cup.xml support_files/definitions/poland/league_poland1.xml support_files/definitions/poland/league_poland2.xml support_files/definitions/poland/league_poland3a.xml support_files/definitions/poland/league_poland3b.xml support_files/definitions/poland/league_poland3c.xml support_files/definitions/poland/league_poland3d.xml support_files/definitions/poland/country_poland.xml support_files/definitions/poland/cup_poland_prom_games1.xml support_files/definitions/poland/cup_poland_prom_games2.xml support_files/definitions/poland/cup_poland_puchar.xml support_files/definitions/romania/country_romania.xml support_files/definitions/romania/league_romania1.xml support_files/definitions/romania/league_romania2.xml support_files/definitions/romania/league_romania3.xml support_files/definitions/romania/cup_supercup_romania.xml support_files/definitions/romania/cup_romania_cupa.xml support_files/definitions/scg/country_scg.xml support_files/definitions/scg/cup_scg.xml support_files/definitions/scg/league_scg2a.xml support_files/definitions/scg/league_scg2b.xml support_files/definitions/scg/league_scg1.xml support_files/definitions/scotland/league_scotland1.xml support_files/definitions/scotland/country_scotland.xml support_files/definitions/scotland/league_scotland2.xml support_files/definitions/scotland/cup_scotland_league.xml support_files/definitions/scotland/league_scotland3.xml support_files/definitions/scotland/league_scotland4.xml support_files/definitions/scotland/cup_scotland_fa.xml support_files/definitions/short_leagues/league_czech1_short.xml support_files/definitions/short_leagues/league_denmark1_short.xml support_files/definitions/short_leagues/league_greece1_short.xml support_files/definitions/short_leagues/league_portugal1_short.xml support_files/definitions/short_leagues/league_russia1_short.xml support_files/definitions/short_leagues/league_switzerland1_short.xml support_files/definitions/short_leagues/league_turkey1_short.xml support_files/definitions/short_leagues/league_ukraine1_short.xml support_files/definitions/short_leagues_south_america/league_bolivia1_short.xml support_files/definitions/short_leagues_south_america/league_chile1_short.xml support_files/definitions/short_leagues_south_america/league_colombia1_short.xml support_files/definitions/short_leagues_south_america/league_ecuador1_short.xml support_files/definitions/short_leagues_south_america/league_mexico1_short.xml support_files/definitions/short_leagues_south_america/league_paraguay1_short.xml support_files/definitions/short_leagues_south_america/league_peru1_short.xml support_files/definitions/short_leagues_south_america/league_uruguay1_short.xml support_files/definitions/short_leagues_south_america/league_venezuela1_short.xml support_files/definitions/spain/country_spain.xml support_files/definitions/spain/cup_spain_cdr.xml support_files/definitions/spain/cup_spain_prom_games_1.xml support_files/definitions/spain/cup_spain_prom_games_2.xml support_files/definitions/spain/cup_spain_prom_games_3.xml support_files/definitions/spain/cup_spain_prom_games_4.xml support_files/definitions/spain/cup_spain_rfef.xml support_files/definitions/spain/league_spain1.xml support_files/definitions/spain/league_spain2.xml support_files/definitions/spain/league_spain3a.xml support_files/definitions/spain/league_spain3b.xml support_files/definitions/spain/league_spain3c.xml support_files/definitions/spain/league_spain3d.xml support_files/definitions/usa/league_usa_econf.xml support_files/definitions/usa/country_usa.xml support_files/definitions/usa/league_usa_wconf.xml support_files/definitions/usa/cup_usa_eplayoff.xml support_files/definitions/usa/cup_usa_wplayoff.xml support_files/definitions/usa/cup_usa_mls_cup.xml support_files/definitions/wales/league_wales1.xml support_files/definitions/wales/league_wales2a.xml support_files/definitions/wales/league_wales2b.xml support_files/definitions/wales/country_wales.xml support_files/definitions/wales/cup_wales_welsh.xml support_files/definitions/wales/cup_wales_challenge.xml support_files/definitions/wales/cup_wales_premier.xml support_files/definitions/wales/league_wales_english.xml support_files/definitions/wales/cup_wales_uefa_q.xml support_files/definitions/wales/cup_wales_uefa.xml support_files/definitions/wales/cup_wales_cl.xml support_files/definitions/wales/cup_wales_cl_q.xml support_files/definitions/wc06/league_wc06_europe_teams.xml support_files/definitions/wc06/league_wc06_asia_teams.xml support_files/definitions/wc06/country_wc06.xml support_files/definitions/wc06/cup_wc06_africa.xml support_files/definitions/wc06/cup_wc06_europe.xml support_files/definitions/wc06/cup_wc06_europe_playoffs.xml support_files/definitions/wc06/cup_wc06_oceania.xml support_files/definitions/wc06/cup_wc06_ncamerica.xml support_files/definitions/wc06/league_wc06_africa_teams.xml support_files/definitions/wc06/league_wc06_samerica_teams.xml support_files/definitions/wc06/league_wc06_ncamerica_teams.xml support_files/definitions/wc06/cup_wc06_samerica.xml support_files/definitions/wc06/league_wc06_oceania_teams.xml support_files/definitions/wc06/cup_wc06_asia.xml support_files/definitions/wc06/cup_wc06_final.xml support_files/definitions/wc06/cup_wc06_oceania_samerica.xml support_files/definitions/wc06/cup_wc06_asia_ncamerica.xml support_files/definitions/wc06/cup_wc06_asia_playoff.xml support_files/definitions/wc06/0,2548,All-Sep-2005,00.html support_files/definitions/wc06/fifa.txt support_files/definitions/netherlands/country_netherlands.xml support_files/definitions/netherlands/cup_netherlands_amstelcup.xml support_files/definitions/netherlands/cup_netherlands_nacompetitie2.xml support_files/definitions/netherlands/cup_netherlands_nacompetitie3.xml support_files/definitions/netherlands/cup_netherlands_nacompetitie4.xml support_files/definitions/netherlands/league_netherlands1.xml support_files/definitions/netherlands/league_netherlands2.xml support_files/definitions/netherlands/league_netherlands3a.xml support_files/definitions/netherlands/league_netherlands3b.xml support_files/definitions/netherlands/league_netherlands3c.xml support_files/bygfoot_constants support_files/bygfoot_user.conf support_files/lg_commentary/lg_commentary_de.xml support_files/lg_commentary/lg_commentary_en.xml support_files/lg_commentary/lg_commentary_nl.xml support_files/lg_commentary/lg_commentary_pl.xml support_files/lg_commentary/lg_commentary_bg.xml support_files/bygfoot_app support_files/bygfoot_help support_files/strategy/tmp/strategy_attack1.xml support_files/strategy/tmp/strategy_attack2.xml support_files/strategy/tmp/strategy_defend.xml support_files/strategy/tmp/strategy_fit.xml support_files/strategy/tmp/strategy_normal2.xml support_files/strategy/strategy_gy.xml support_files/bygfoot_tokens install-data-local: @$(NORMAL_INSTALL) diff --git a/bygfoot.glade b/bygfoot.glade index 7e34404a..8f2bcfd5 100644 --- a/bygfoot.glade +++ b/bygfoot.glade @@ -68,7 +68,7 @@ - + True gtk-revert-to-saved 1 @@ -136,7 +136,7 @@ - + True gtk-preferences 1 @@ -200,10 +200,9 @@ - + True - gtk-save - 1 + menu_save_geometry.png 0.5 0.5 0 @@ -235,7 +234,7 @@ - + True menu_fixtures.png 0.5 @@ -256,7 +255,7 @@ - + True menu_fixtures_comp.png 0.5 @@ -277,7 +276,7 @@ - + True menu_table.png 0.5 @@ -298,7 +297,7 @@ - + True menu_league_results.png 0.5 @@ -319,7 +318,7 @@ - + True menu_season_res.png 0.5 @@ -346,7 +345,7 @@ - + True menu_league_stats.png 0.5 @@ -367,7 +366,7 @@ - + True menu_history.png 0.5 @@ -399,7 +398,7 @@ True - + True menu_style.png 0.5 @@ -417,7 +416,7 @@ True All Out Defend True - False + True @@ -427,7 +426,7 @@ True Defend True - False + True menu_all_out_defend @@ -438,7 +437,7 @@ True Balanced True - False + True menu_all_out_defend @@ -449,7 +448,7 @@ True Attack True - False + True menu_all_out_defend @@ -477,7 +476,7 @@ True - + True menu_scout.png 0.5 @@ -495,7 +494,7 @@ True Best True - False + True @@ -505,7 +504,7 @@ True Good True - False + True menu_scout_best @@ -516,7 +515,7 @@ True Average True - False + True menu_scout_best @@ -544,7 +543,7 @@ True - + True menu_physio.png 0.5 @@ -562,7 +561,7 @@ True Best True - False + True @@ -572,7 +571,7 @@ True Good True - False + True menu_physio_best @@ -583,7 +582,7 @@ True Average True - False + True menu_physio_best @@ -611,7 +610,7 @@ True - + True menu_youth_academy.png 0.5 @@ -648,7 +647,7 @@ True Best True - False + True @@ -658,7 +657,7 @@ True Good True - False + True menu_yc_best @@ -669,7 +668,7 @@ True Average True - False + True menu_yc_best @@ -704,7 +703,7 @@ True Goalies True - False + True @@ -714,7 +713,7 @@ True Defenders True - False + True menu_recruit0 @@ -725,7 +724,7 @@ True Midfielders True - False + True menu_recruit0 @@ -736,7 +735,7 @@ True Forwards True - False + True menu_recruit0 @@ -778,7 +777,7 @@ True - + True menu_boost.png 0.5 @@ -796,7 +795,7 @@ True On True - False + True @@ -806,7 +805,7 @@ True Off True - False + True menu_boost_on @@ -841,7 +840,7 @@ - + True gtk-undo 1 @@ -862,7 +861,7 @@ - + True menu_structure.png 0.5 @@ -884,7 +883,7 @@ - + True menu_rearrange.png 0.5 @@ -910,7 +909,7 @@ - + True menu_browse_tms.png 0.5 @@ -943,7 +942,7 @@ - + True menu_player_info.png 0.5 @@ -963,7 +962,7 @@ - + True menu_player_put_transfer.png 0.5 @@ -983,7 +982,7 @@ - + True menu_player_remove_transfer.png 0.5 @@ -1003,7 +1002,7 @@ - + True menu_player_contract.png 0.5 @@ -1023,7 +1022,7 @@ - + True menu_player_fire.png 0.5 @@ -1043,7 +1042,7 @@ - + True menu_player_shoots.png 0.5 @@ -1063,7 +1062,7 @@ - + True menu_player_move_to_ya.png 0.5 @@ -1089,7 +1088,7 @@ - + True menu_player_browse.png 0.5 @@ -1123,7 +1122,7 @@ - + True menu_last_match.png 0.5 @@ -1144,7 +1143,7 @@ - + True menu_match_stats.png 0.5 @@ -1165,7 +1164,7 @@ - + True gtk-jump-to 1 @@ -1185,7 +1184,7 @@ True - + True menu_mmatches.png 0.5 @@ -1208,7 +1207,7 @@ - + True gtk-add 1 @@ -1231,7 +1230,7 @@ - + True gtk-preferences 1 @@ -1263,7 +1262,7 @@ - + True menu_history.png 0.5 @@ -1290,7 +1289,7 @@ - + True gtk-media-forward 1 @@ -1312,7 +1311,7 @@ - + True gtk-go-back 1 @@ -1334,7 +1333,7 @@ - + True gtk-justify-fill 1 @@ -1369,7 +1368,7 @@ - + True menu_finances.png 0.5 @@ -1390,7 +1389,7 @@ - + True menu_stadium.png 0.5 @@ -1423,7 +1422,7 @@ - + True gtk-dialog-info 1 @@ -1444,7 +1443,7 @@ - + True gtk-add 1 @@ -1465,7 +1464,7 @@ - + True gtk-help 1 diff --git a/bygfoot_misc.glade b/bygfoot_misc.glade index 5d921a68..d51c6960 100644 --- a/bygfoot_misc.glade +++ b/bygfoot_misc.glade @@ -1075,6 +1075,51 @@ tab + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + + + + + False + True + + + + + + True + Opponent player list + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + tab + + 0 diff --git a/configure.in b/configure.in index 72f751ee..ce10e9a4 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC -pkg_modules="gtk+-2.0 >= 2.4" +pkg_modules="gtk+-2.0 >= 2.6" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) @@ -20,7 +20,7 @@ AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.]) dnl Add the languages which your application supports here. -ALL_LINGUAS="de nl fr pl ro bg zh es" +ALL_LINGUAS="de nl fr pl ro bg zh es da" AM_GLIB_GNU_GETTEXT AC_OUTPUT([ diff --git a/po/POTFILES.in b/po/POTFILES.in index 2341b671..c1fad086 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -10,12 +10,14 @@ src/interface.c src/lg_commentary.c src/live_game.c src/load_save.c +src/main.c src/misc2_callback_func.c src/misc2_callbacks.c src/misc2_interface.c src/misc_callback_func.c src/misc_callbacks.c src/misc_interface.c +src/nonsourcestrings.c src/options_interface.c src/player.c src/support.c diff --git a/po/da.po b/po/da.po new file mode 100644 index 00000000..96a5499e --- /dev/null +++ b/po/da.po @@ -0,0 +1,2944 @@ +msgid "" +msgstr "" +"Project-Id-Version: Bygfoot Football Manager 1.9\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2005-10-21 18:23+0100\n" +"Last-Translator: Kristian Poul Herkild \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Danish\n" +"X-Poedit-Country: DENMARK\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: src/callback_func.c:290 +msgid "The bank doesn't grant you more money." +msgstr "Din bank vil ikke give dig flere penge." + +#: src/callback_func.c:296 +#, c-format +msgid "You can take out at most %s." +msgstr "Du kan højst låne %s" + +#: src/callback_func.c:298 +msgid "Loan" +msgstr "Lån" + +#: src/callback_func.c:310 +msgid "You are not indebted." +msgstr "Du har ingen gæld." + +#: src/callback_func.c:316 +msgid "You don't have enough money to pay back." +msgstr "Du har ikke penge nok til at betale tilbage." + +#: src/callback_func.c:322 +#, c-format +msgid "You can pay back at most %s" +msgstr "Du kan højst tilbagebetale %s" + +#: src/callback_func.c:324 +msgid "Payback" +msgstr "Tilbagebetal" + +#: src/callback_func.c:346 +msgid "There are no offers for the player." +msgstr "Der er ingen tilbud på spilleren." + +#: src/callback_func.c:349 +msgid "There are some offers for the player which you rejected or will see next week." +msgstr "Der er nogle af budene på spilleren, som du har afvist, eller vil få at se næste uge." + +#: src/callback_func.c:358 +msgid " more" +msgstr " mere" + +#: src/callback_func.c:360 +msgid " less" +msgstr " mindre" + +#: src/callback_func.c:362 +#, c-format +msgid "%s would like to buy %s. They offer %s for him, which is %s than the player's value. Do you accept?" +msgstr "%s vil gerne købe spilleren %s. De tilbyder %s for ham, hvilket er %s end spillerens værdi. Accepterer du tilbudet?" + +#: src/callback_func.c:388 +#: src/callbacks.c:597 +msgid "Your offer has been removed." +msgstr "Dit tilbud er blevet fjernet." + +#: src/callback_func.c:395 +msgid "Your roster is already full. You can't buy more players." +msgstr "Du kan ikke købe flere spillere. Din trup er allerede fyldt op." + +#: src/callback_func.c:402 +#, c-format +msgid "You offered a transfer fee of %s and a wage of %s for %s. The owners and the player are satisfied with your offer. Do you still want to buy the player?" +msgstr "Du tilbød en transfersum på %s og en løn på %s for %s. Ejerne og spilleren er tilfredse med dit tilbud. Ønsker du stadig at købe spilleren?" + +#: src/callback_func.c:431 +#, c-format +msgid "User %s didn't consider your offer yet." +msgstr "Bruger %s har endnu ikke overvejet dit tilbud." + +#: src/callback_func.c:438 +msgid "The player is locked (the team owners are considering an offer currently)." +msgstr "Spilleren er låst (klubejerne overvejer et tilbud lige nu)." + +#: src/callback_func.c:445 +#: src/callbacks.c:161 +#: src/transfer.c:441 +msgid "The transfer deadline is over." +msgstr "Tidsfristen for spillerhandler er overskredet." + +#: src/callback_func.c:457 +#, c-format +msgid "You are making an offer for %s. Your scout's recommendations for fee and wage are preset." +msgstr "Du vil give et tilbud på %s. Din spejders anbefalinger for transfersum og løn er indsat." + +#: src/callback_func.c:460 +#: src/callback_func.c:468 +msgid "Fee" +msgstr "Gebyr" + +#: src/callback_func.c:461 +#: src/callback_func.c:468 +#: src/treeview.c:276 +#: src/treeview.c:1854 +msgid "Wage" +msgstr "Løn" + +#: src/callback_func.c:465 +#, c-format +msgid "You are making an offer for %s again. Your previous values for fee and wage are preset." +msgstr "Du vil igen give et tilbud på %s. Dine forrige værdier for transfersum og løn er indsat." + +#: src/callback_func.c:486 +msgid "You can't offer a new contract if the old one is still above 2 years." +msgstr "Du kan ikke tilbyde en ny kontrakt, hvis den gamle gælder for mere end 2 år." + +#: src/callback_func.c:491 +msgid "The player won't negotiate with you anymore." +msgstr "Spilleren vil ikke længere forhandle med dig." + +#: src/callback_func.c:505 +#, c-format +msgid "" +"You are negotiating with %s about a new contract. Pay attention to what you're doing; if you don't come to terms with him within %d offers, he's going to leave your team after his current contract expires (unless you sell him). You may only abort BEFORE making the first offer.\n" +"Your scout's recommendations are preset:" +msgstr "" +"Du forhandler en ny kontrakt med %s. Vær opmærksom på hvad, du foretager dig; hvis du ikke når til enighed med him inden %d tilbud, forlader han dit hold, når kontrakten udløber (med mindre du sælger ham). Du kan kun fortryde FØR, du kommer med det første tilbud.\n" +"Din spejders anbefalinger er følgende:" + +#: src/callback_func.c:631 +#, c-format +msgid "You want to fire %s. Since his contract expires in %.1f years, he demands a compensation of %s. Do you accept?" +msgstr "Du vil gerne fyre %s. Siden hans kontrakt udløber om %.1f år, forlanger han en godtgørelse på %s. Accepterer du dette?" + +#: src/callback_func.c:765 +msgid "Right click to move players to and from the youth academy; left click for context menu." +msgstr "Højreklik for at flytte spillere til og fra ungdomsakademiet; venstreklik for at få en menu." + +#: src/callbacks.c:84 +msgid "The current game state is unsaved and will be lost. Continue?" +msgstr "Dit nuværende spil er ikke gemt og vil derfor gå tabt. Ønsker du at fortsætte?" + +#: src/callbacks.c:149 +#: src/callbacks.c:415 +msgid "Transfers are disabled in this country definition." +msgstr "Transfere er fravalgt i denne landedefinition." + +#: src/callbacks.c:153 +msgid "Left click to make an offer. Right click to remove offer." +msgstr "Venstre klik for at give tilbud. Højreklik for at fjerne tilbud." + +#: src/callbacks.c:154 +#, c-format +msgid "Transfer deadline is Week %d" +msgstr "Tidsfristen for spillerhandler er uge %d" + +#: src/callbacks.c:170 +#: src/callbacks.c:632 +#: src/callbacks.c:649 +msgid "You still have some transfer business to manage." +msgstr "Du mangler stadig at ordne nogle transferhandler." + +#: src/callbacks.c:174 +msgid "At least one user didn't take his turn this week. Continue?" +msgstr "Mindst en bruger brugte ikke sin tur denne uge. Fortsæt alligevel?" + +#: src/callbacks.c:180 +msgid "There are injured or banned players in one of the user teams. Continue?" +msgstr "Der er skadede eller karantæneramte spillere i en af dine klubber. Fortsæt?" + +#: src/callbacks.c:364 +msgid "There are no leagues or cups with tables in this country definition." +msgstr "Der er ingen ligaer eller pokalturneringer i denne landedefinition." + +#: src/callbacks.c:382 +msgid "There are no leagues in this country definition (only cups)." +msgstr "Der er ingen ligaer i denne landedefinition (kun pokalturneringer)." + +#: src/callbacks.c:399 +msgid "This is your first season." +msgstr "Dette er din første sæson." + +#: src/callbacks.c:417 +#: src/callbacks.c:433 +#: src/callbacks.c:449 +#: src/callbacks.c:465 +#: src/callbacks.c:500 +#: src/callbacks.c:863 +#: src/callbacks.c:879 +msgid "You haven't selected a player." +msgstr "Du har ikke valgt en spiller" + +#: src/callbacks.c:419 +msgid "The player is already on the list." +msgstr "Spilleren er allerede på listen." + +#: src/callbacks.c:435 +msgid "The player is not on the list." +msgstr "Spilleren er ikke på listen." + +#: src/callbacks.c:451 +msgid "Your team can't have less than 11 players." +msgstr "Din klub kan ikke have mindre end 11 spillere." + +#: src/callbacks.c:470 +msgid "Penalty/free kick shooter deselected." +msgstr "Straffe- og frisparksskytte fravalgt." + +#: src/callbacks.c:476 +#, c-format +msgid "%s will shoot penalties and free kicks when he plays." +msgstr "%s skyder straffe- og frispark, når han spiller." + +#: src/callbacks.c:495 +#: src/callbacks.c:1047 +#: src/callbacks.c:1062 +#: src/callbacks.c:1079 +msgid "Youth academy is disabled in this country definition." +msgstr "Ungdomsakademiet er slået fra i denne landedefinition." + +#: src/callbacks.c:506 +msgid "The player is too old for the youth academy." +msgstr "Spilleren er for gammel til dit ungdomsakademi." + +#: src/callbacks.c:508 +msgid "You can't move the player, there are too few players in your team." +msgstr "Du kan ikke flytte spilleren. Der er for få spillere i din klub." + +#: src/callbacks.c:511 +msgid "There is no room in your youth academy." +msgstr "Der er ikke plads på dit ungdomsakademi." + +#: src/callbacks.c:599 +msgid "You haven't made an offer for the player." +msgstr "Du har ikke givet et tilbud på spilleren." + +#: src/callbacks.c:665 +msgid "Enter a structure. The digits must sum up to 10." +msgstr "Indtast en formation. Summen af tallene skal give 10." + +#: src/callbacks.c:666 +msgid "Structure" +msgstr "Formation" + +#: src/callbacks.c:699 +#: src/callbacks.c:715 +#: src/callbacks.c:1121 +#: src/misc2_callback_func.c:255 +#: src/misc2_callbacks.c:540 +msgid "No match stored." +msgstr "Ingen gemte kampe." + +#: src/callbacks.c:791 +#: src/game_gui.c:353 +#: src/misc_callbacks.c:438 +msgid "Boost ON is disabled in this country definition." +msgstr "Boost Til er slået fra i denne landedefinition." + +#: src/callbacks.c:812 +msgid "Finances are disabled in this country definition." +msgstr "Økonomi er fravalgt i denne landedefinition." + +#: src/callbacks.c:817 +msgid "Left-click: get loan; Right-click: pay back; Middle click: stadium window." +msgstr "Venstreklik: optag lån; Højreklik: betal tilbage; midterklik: stadionoversigt." + +#: src/callbacks.c:832 +msgid "Stadium management is disabled in this country definition." +msgstr "Stadionhåndtering er slået fra i denne landedefinition." + +#: src/callbacks.c:857 +msgid "Contracts are disabled in this country definition." +msgstr "Kontrakter er fravalgt i denne landedefinition." + +#: src/callbacks.c:1068 +#: src/interface.c:666 +msgid "Set the percentage of your income you want to devote to your youth academy." +msgstr "Sæt procentdelen af dine indtægter, som du vil bruge på dit ungdomsakademi." + +#: src/callbacks.c:1084 +#, c-format +msgid "You can't have more than %d players in the team." +msgstr "Du kan ikke have flere end %d spillere i klubben." + +#: src/callbacks.c:1104 +msgid "Do you really want to kick the poor boy out of your academy?" +msgstr "Vil du virkelig sparke den stakkels dreng ud af dit akademi?" + +#: src/cup.c:879 +msgid " -- Second leg" +msgstr " -- 2. halvleg" + +#: src/cup.c:881 +msgid " -- First leg" +msgstr " -- 1. halvleg" + +#: src/cup.c:884 +msgid " -- Replay matches" +msgstr " -- Afspil kampe igen" + +#: src/cup.c:896 +msgid "Round robin" +msgstr "På skift" + +#. A cup stage, e.g. Last 32 when there are only 32 teams left. +#: src/cup.c:904 +#, c-format +msgid "Last %d" +msgstr "Sidste %d" + +#: src/cup.c:907 +msgid "Final" +msgstr "Finale" + +#: src/cup.c:910 +msgid "Semi-final" +msgstr "Semifinale" + +#: src/cup.c:913 +msgid "Quarter-final" +msgstr "Kvartfinale" + +#: src/finance.c:113 +msgid "You have to pay back your loan this week." +msgstr "Du er nødt til at betale dit lån tilbage denne uge." + +#: src/finance.c:117 +msgid "Your bank account has to be above your drawing credit limit next week." +msgstr "Din bankkonto skal være over din overtræksgrænse i næste uge." + +#: src/finance.c:178 +#, c-format +msgid "You have %d weeks to pay back your loan." +msgstr "Du har %d uger til at tilbagebetale dit lån." + +#: src/finance.c:199 +msgid "You are free from debt." +msgstr "Du er nu gældsfri." + +#: src/finance.c:206 +#, c-format +msgid "You have %d weeks to pay back the rest of your loan." +msgstr "Du har %d uger til tilbagebetale resten af dit lån." + +#. Game was decided in penalty shoot-out. +#: src/fixture.c:824 +msgid " p." +msgstr " str." + +#. Game was decided in extra time. +#: src/fixture.c:827 +msgid " e.t." +msgstr " forl.sp." + +#. A goal scored with penalty. +#. Penalty shooter. +#: src/game.c:917 +#: src/treeview_helper.c:1061 +msgid " (P)" +msgstr "(Straffe)" + +#. A goal scored with a free kick. +#: src/game.c:920 +msgid " (FK)" +msgstr "(Frispark)" + +#: src/game.c:922 +msgid " (OG)" +msgstr "(Selvmål)" + +#: src/game_gui.c:401 +msgid "Next week you'll fire him and hire a new one." +msgstr "Du fyrer ham næste uge, og hyrer en ny." + +#: src/game_gui.c:643 +#, c-format +msgid "The team owners have fired you because of financial mismanagement. Luckily, the owners of %s have heard of your dismissal and offer you a job. Here's some information on %s:" +msgstr "Klubejerne har fyret dig, på grund af økonomisk vanrygt. Heldigvis har ejerne af %s hørt om din fyring og har tilbudt dig et job. Her er nogle informationer om %s:" + +#: src/game_gui.c:646 +#, c-format +msgid "The team owners have fired you because of unsuccessfulness. Luckily, the owners of %s have heard of your dismissal and offer you a job. Here's some information on %s:" +msgstr "Klubejerne har fyret dig, på grund af manglende succes. Heldigvis har ejerne af %s hørt om din fyring, og har tilbudt dig et job. Her er nogle informationer om %s:" + +#: src/game_gui.c:649 +#, c-format +msgid "The owners of %s are deeply impressed by your success with %s and would like to hire you. Here's some information on %s:" +msgstr "Ejerne af %s er dybt imponerede af din succes med %s, og vil gerne ansætte dig. Her er nogle informationer om %s:" + +#: src/game_gui.c:652 +msgid "Accept?" +msgstr "Godkend?" + +#: src/game_gui.c:654 +msgid " (NOTE: If you don't, the game is over for you.)" +msgstr " (NB: Hvis du ikke vælger en ny klub, er spillet ovre.)" + +#: src/game_gui.c:710 +#, c-format +msgid "Job offers set to %s." +msgstr "Jobtilbud sat til %s." + +#: src/game_gui.c:719 +#, c-format +msgid "Live game set to %s." +msgstr "Direkte kamp sat til %s." + +#: src/game_gui.c:728 +#, c-format +msgid "Overwrite set to %s." +msgstr "Overskriv sat til %s." + +#: src/game_gui.c:748 +msgid "Bygfoot is a very intuitive and simple game, so there isn't a full-grown documentation. However, if you have trouble, there are a few places to go.\n" +msgstr "Bygfoot er et meget indlysende og enkelt spil, så der er ikke nogen fuldstændig dokumentation. Men... Hvis du har problemer, er der nogle få steder at gå hen.\n" + +#: src/game_gui.c:750 +msgid "At the Bygfoot forums you can report bugs, ask for help and discuss the game (you don't have to register):\n" +msgstr "I Bygfoot's forum kan du rapportere fejl, spørge om hjælp, og diskutere spillet (der er ikke behov for registrering):\n" + +#: src/game_gui.c:752 +msgid "" +"\n" +"If you feel you've found out something about the game that has to be shared, you can add it to the Bygfoot Wiki:\n" +msgstr "" +"\n" +"Hvis du synes, du har fundet ud af noget om spillet, som det er nødvendigt at dele, kan du tilføje det i Bygfoot Wiki:\n" + +#: src/interface.c:293 +msgid "_File" +msgstr "_Fil" + +#: src/interface.c:308 +msgid "L_oad last save" +msgstr "Ind_læs sidste gemte spil" + +#: src/interface.c:336 +msgid "_Options" +msgstr "_Valgmuligheder" + +#: src/interface.c:343 +msgid "Preferences" +msgstr "Indstillinger" + +#: src/interface.c:359 +msgid "Job offers" +msgstr "Jobtilbud" + +#: src/interface.c:364 +#: src/misc_interface.c:510 +#: src/options_interface.c:489 +msgid "Live game" +msgstr "Direkte kamp" + +#: src/interface.c:368 +msgid "Overwrite" +msgstr "Overskriv" + +#: src/interface.c:378 +msgid "Save window geometry" +msgstr "Gem vinduesgeometri" + +#: src/interface.c:381 +msgid "Save window size, position and vertical divider" +msgstr "Gem vinduesstørrelse, position og lodret skillelinie" + +#: src/interface.c:387 +msgid "F_igures" +msgstr "_Oversigt" + +#: src/interface.c:394 +msgid "Fixtures (week)" +msgstr "Resultater (alle)" + +#: src/interface.c:405 +msgid "Fixtures (competitions)" +msgstr "Resultater (dine turneringer)" + +#: src/interface.c:416 +msgid "Tables" +msgstr "Stillinger" + +#: src/interface.c:427 +msgid "My league results" +msgstr "Mine ligaresultater" + +#: src/interface.c:438 +msgid "Season results" +msgstr "Sæsonresultater" + +#: src/interface.c:454 +msgid "League stats" +msgstr "Ligastatistik" + +#: src/interface.c:465 +msgid "Season history" +msgstr "Sæsonhistorik" + +#: src/interface.c:476 +msgid "_Team" +msgstr "_Klub" + +#: src/interface.c:483 +#: src/treeview.c:1612 +msgid "Playing style" +msgstr "Spillestil" + +#: src/interface.c:494 +msgid "All Out Defend" +msgstr "Ultradefensivt" + +#: src/interface.c:499 +#: src/treeview.c:1508 +msgid "Defend" +msgstr "Defensivt" + +#: src/interface.c:504 +msgid "Balanced" +msgstr "Afbalanceret" + +#: src/interface.c:509 +#: src/treeview.c:1510 +msgid "Attack" +msgstr "Offensivt" + +#: src/interface.c:514 +msgid "All Out Attack" +msgstr "Ultraoffensivt" + +#: src/interface.c:520 +#: src/treeview.c:1313 +msgid "Scout" +msgstr "Spion" + +#: src/interface.c:531 +#: src/interface.c:563 +#: src/interface.c:609 +msgid "Best" +msgstr "Bedst" + +#: src/interface.c:536 +#: src/interface.c:568 +#: src/interface.c:614 +msgid "Good" +msgstr "God" + +#: src/interface.c:541 +#: src/interface.c:573 +#: src/interface.c:619 +msgid "Average" +msgstr "Gennemsnitlig" + +#: src/interface.c:546 +#: src/interface.c:578 +#: src/interface.c:624 +msgid "Bad" +msgstr "Dårlig" + +#: src/interface.c:552 +#: src/treeview.c:1312 +msgid "Physio" +msgstr "Fysioterapeut" + +#: src/interface.c:584 +#: src/treeview.c:1315 +msgid "Youth academy" +msgstr "Ungdomsakademi" + +#: src/interface.c:595 +msgid "Show youth academy" +msgstr "Vis ungdomsakademi" + +#: src/interface.c:602 +#: src/treeview.c:1314 +msgid "Youth coach" +msgstr "Ungdomstræner" + +#: src/interface.c:630 +msgid "Recruiting preference" +msgstr "Spillertype" + +#: src/interface.c:637 +msgid "Goalies" +msgstr "Målmænd" + +#: src/interface.c:642 +msgid "Defenders" +msgstr "Forsvarere" + +#: src/interface.c:647 +msgid "Midfielders" +msgstr "Midtbanespillere" + +#: src/interface.c:652 +msgid "Forwards" +msgstr "Angribere" + +#: src/interface.c:657 +msgid "Any" +msgstr "Hvilken som helst" + +#: src/interface.c:663 +msgid "Set investment" +msgstr "Sæt investeringsniveau" + +#: src/interface.c:668 +msgid "Boost" +msgstr "Boost" + +#: src/interface.c:679 +msgid "On" +msgstr "Til" + +#: src/interface.c:684 +msgid "Off" +msgstr "Fra" + +#: src/interface.c:689 +msgid "Anti" +msgstr "Anti" + +#: src/interface.c:700 +msgid "Reset player list" +msgstr "Nulstil spillerliste" + +#: src/interface.c:702 +#: src/interface.c:1289 +msgid "Reset player list to the formation at the beginning of the live game pause (right click on player list)" +msgstr "Sæt spillerlisten til at være den samme som ved starten af pausen i den direkte kamp (højreklik på spillerlisten)" + +#: src/interface.c:708 +msgid "Enter custom structure" +msgstr "Indtast tilpasset formation" + +#: src/interface.c:716 +msgid "Rearrange team" +msgstr "Omrokér spillere" + +#: src/interface.c:719 +msgid "Try to put the startup players onto their favoured positions and sort the substitutes (Ctrl-R or middle click)" +msgstr "Forsøg at sætte spillere fra startformation på deres foretrukne pladser, og sortér reservespillerne (Ctrl + R eller midterklik)" + +#: src/interface.c:733 +msgid "Browse teams" +msgstr "Gennemse klubber" + +#: src/interface.c:741 +msgid "_Player" +msgstr "_Spiller" + +#: src/interface.c:748 +#: src/interface.c:1886 +msgid "Show info" +msgstr "Vis info" + +#: src/interface.c:756 +#: src/interface.c:1890 +msgid "Put on transfer list" +msgstr "Sæt på transferliste" + +#: src/interface.c:764 +#: src/interface.c:1894 +msgid "Remove from transfer list" +msgstr "Fjern fra transferliste" + +#: src/interface.c:772 +#: src/interface.c:1898 +msgid "Offer new contract" +msgstr "Tilbyd ny kontrakt" + +#: src/interface.c:780 +#: src/interface.c:1902 +msgid "Fire" +msgstr "Fyr spiller" + +#: src/interface.c:788 +#: src/interface.c:1906 +msgid "Shoots penalties" +msgstr "Skyder straffespark" + +#: src/interface.c:796 +#: src/interface.c:1910 +msgid "Move to youth academy" +msgstr "Flyt til ungdomsakademi" + +#: src/interface.c:805 +msgid "Browse players" +msgstr "Gennemse spillere" + +#: src/interface.c:813 +msgid "_User" +msgstr "_Bruger" + +#: src/interface.c:820 +msgid "Show last match" +msgstr "Vis sidste kamp" + +#: src/interface.c:831 +msgid "Show last match stats" +msgstr "Vis statistik for sidste kamp" + +#: src/interface.c:842 +msgid "Show coming matches" +msgstr "Vis kommende kampe" + +#: src/interface.c:853 +#: src/window.c:708 +msgid "Memorable matches" +msgstr "Mindevædige kampe" + +#: src/interface.c:864 +msgid "Add last match" +msgstr "Tilføj sidste kamp" + +#: src/interface.c:867 +msgid "Add last recorded match to the current memorable matches file." +msgstr "Tilføj sidste optagede kamp til den nuværende fil for mindeværdige kampe." + +#: src/interface.c:876 +msgid "Manage matches" +msgstr "Håndtér kampe" + +#: src/interface.c:879 +msgid "Replay, delete or add memorable matches." +msgstr "Afspil, slet eller tilføj mindeværdige kampe." + +#: src/interface.c:893 +msgid "Show history" +msgstr "Vis historik" + +#: src/interface.c:909 +msgid "Next user" +msgstr "Bedste bruger" + +#: src/interface.c:920 +msgid "Previous user" +msgstr "Forrige bruger" + +#: src/interface.c:931 +msgid "Manage users" +msgstr "Håndtér brugere" + +#: src/interface.c:942 +msgid "Fin_Stad" +msgstr "_Økonomi & stadion" + +#: src/interface.c:949 +msgid "Show finances" +msgstr "Vis økonomi" + +#: src/interface.c:960 +msgid "Show stadium" +msgstr "Vis stadion" + +#: src/interface.c:971 +msgid "_Help" +msgstr "_Hjælp" + +#: src/interface.c:978 +#: src/misc2_interface.c:1036 +msgid "About" +msgstr "Om" + +#: src/interface.c:986 +#: src/misc2_interface.c:1050 +msgid "Contributors" +msgstr "Bidragsydere" + +#: src/interface.c:994 +#: src/misc2_interface.c:1076 +msgid "Help" +msgstr "Hjælp" + +#: src/interface.c:1010 +msgid "Load game (Ctrl - O)" +msgstr "Hent spil (Ctrl + O)" + +#: src/interface.c:1020 +msgid "Save game (Ctrl - S)" +msgstr "Gem spil (Ctrl + S)" + +#: src/interface.c:1030 +msgid "Quit (Ctrl - Q)" +msgstr "Afslut (Ctrl + Q)" + +#: src/interface.c:1050 +msgid "Back to main menu (Esc)" +msgstr "Tilbage til hovedmenu (Esc)" + +#: src/interface.c:1063 +msgid "Show transferlist (T)" +msgstr "Vis transferliste (T)" + +#: src/interface.c:1081 +msgid "Begin a new week (Space)" +msgstr "Begynd en ny uge (Mellemrumstast)" + +#: src/interface.c:1112 +msgid " Season " +msgstr " Sæson" + +#: src/interface.c:1122 +msgid " Week " +msgstr " Uge " + +#: src/interface.c:1132 +msgid " Round " +msgstr " Runde" + +#: src/interface.c:1153 +#: src/misc_interface.c:709 +msgid "Right click and left click to change your playing style" +msgstr "Brug højreklik eller venstreklik for at ændre din spillestil" + +#: src/interface.c:1163 +#: src/misc_interface.c:700 +msgid "Right click and left click to change boost state" +msgstr "Brug højreklik eller venstreklik for at ændre boostniveau" + +#: src/interface.c:1193 +msgid "Rank " +msgstr "Placering: " + +#: src/interface.c:1208 +msgid "Money " +msgstr "Beløb " + +#: src/interface.c:1226 +msgid "First value: average current skill of the first 11 players. Second value: average skill of all players." +msgstr "Første værdi: gennemsnitlig nuværende evne for de første 11 spillere. Anden værdi: gennemsnitlig evne for alle spillere." + +#: src/interface.c:1232 +msgid "Av. skills: " +msgstr "Gns. evner: " + +#: src/interface.c:1275 +msgid "Player list 1" +msgstr "Spillerliste 1" + +#: src/interface.c:1283 +msgid "Player list 2" +msgstr "Spillerliste 2" + +#: src/interface.c:1307 +msgid "Previous league/cup (1)" +msgstr "Forrige liga/cup (1)" + +#: src/interface.c:1320 +msgid "Next league/cup (2)" +msgstr "Næste liga/cup (2)" + +#: src/interface.c:1333 +msgid "Previous (Q)" +msgstr "Forrige (Q)" + +#: src/interface.c:1346 +msgid "Next (W)" +msgstr "Næste (W)" + +#: src/interface.c:1960 +msgid "Move to team" +msgstr "Flyt til klub" + +#: src/interface.c:1968 +msgid "Kick out of academy" +msgstr "Smid ud fra akademi" + +#: src/lg_commentary.c:551 +#: src/team.c:528 +msgid "ALL OUT DEFEND" +msgstr "Ultradefensivt" + +#: src/lg_commentary.c:554 +#: src/team.c:530 +msgid "DEFEND" +msgstr "Defensivt" + +#: src/lg_commentary.c:557 +#: src/team.c:532 +msgid "BALANCED" +msgstr "Afbalanceret" + +#: src/lg_commentary.c:560 +#: src/team.c:534 +msgid "ATTACK" +msgstr "Offensivt" + +#: src/lg_commentary.c:563 +#: src/team.c:536 +msgid "ALL OUT ATTACK" +msgstr "Ultraoffensivt" + +#. Boost value. +#: src/lg_commentary.c:566 +#: src/team.c:544 +msgid "ANTI" +msgstr "Modsat" + +#. Boost value. +#: src/lg_commentary.c:569 +#: src/team.c:547 +msgid "OFF" +msgstr "Fra" + +#. Boost value. +#: src/lg_commentary.c:572 +#: src/team.c:550 +msgid "ON" +msgstr "Til" + +#. A result after penalties. +#: src/live_game.c:1612 +#, c-format +msgid "%d : %d p." +msgstr "%d : %d str." + +#. A result after extra time. +#: src/live_game.c:1616 +#, c-format +msgid "%d : %d e.t." +msgstr "%d : %d forl.sp." + +#: src/load_save.c:45 +msgid "Saving options..." +msgstr "Gemmer valgmuligheder..." + +#: src/load_save.c:58 +msgid "Saving leagues..." +msgstr "Gemmer ligaer..." + +#: src/load_save.c:69 +msgid "Saving cups..." +msgstr "Gemmer cup..." + +#: src/load_save.c:80 +msgid "Saving users..." +msgstr "Gemmer brugere..." + +#: src/load_save.c:90 +msgid "Saving transfer list..." +msgstr "Gemmer transferliste..." + +#: src/load_save.c:100 +msgid "Saving season stats..." +msgstr "Gemmer sæsonstatistikker..." + +#: src/load_save.c:110 +msgid "Saving miscellaneous..." +msgstr "Gemmer forskellige..." + +#: src/load_save.c:117 +msgid "Compressing savegame..." +msgstr "Pakker gemt spil..." + +#: src/load_save.c:125 +#: src/load_save.c:257 +msgid "Done." +msgstr "Færdig." + +#: src/load_save.c:168 +msgid "Last save file not found." +msgstr "Sidst gemte fil blev ikke fundet." + +#: src/load_save.c:176 +msgid "Uncompressing savegame..." +msgstr "Udpakker gemt spil..." + +#: src/load_save.c:186 +msgid "Loading options..." +msgstr "Indlæser valgmuligheder..." + +#: src/load_save.c:200 +msgid "Loading leagues..." +msgstr "Indlæser ligaer %s..." + +#: src/load_save.c:210 +msgid "Loading cups..." +msgstr "Indlæser cup..." + +#: src/load_save.c:220 +msgid "Loading users..." +msgstr "Indlæser brugere..." + +#: src/load_save.c:230 +msgid "Loading transfer list..." +msgstr "Indlæser transferliste..." + +#: src/load_save.c:240 +msgid "Loading season stats..." +msgstr "Indlæser sæsonstatistikker..." + +#: src/load_save.c:250 +msgid "Loading miscellaneous..." +msgstr "Indlæser forskellige..." + +#: src/main.c:38 +msgid "Specify additional support directory (takes priority over default ones)" +msgstr "Angiv yderligere hjælpefoldere (disse har højere prioritet end standardfoldere)" + +#: src/main.c:40 +msgid "Debug level to use" +msgstr "Debugniveau, der skal anvendes" + +#: src/main.c:42 +msgid "Language to use (a code like 'de')" +msgstr "Sprog, du ønsker at bruge (en kode som 'da')" + +#: src/main.c:44 +msgid "Load last savegame" +msgstr "Ind_læs sidste gemte spil" + +#: src/main.c:51 +msgid "- a simple and addictive GTK2 football manager" +msgstr "- en enkel og vanedannende GTK2 fodboldmanager" + +#: src/misc2_callback_func.c:50 +#, c-format +msgid "%s couldn't afford to buy %s or his roster was full." +msgstr "%s kunne ikke købe %s, fordi han ikke havde eller ikke havde plads i truppen." + +#: src/misc2_callback_func.c:54 +#, c-format +msgid "You didn't have enough money to buy %s or your roster was full." +msgstr "Du havde ikke penge nok til at købe %s, eller din spillertrup var fyldt." + +#: src/misc2_callback_func.c:82 +msgid "Your player roster is full or you don't enough money." +msgstr "Din spillertrup er fuld, eller også har du ikke penge nok." + +#: src/misc2_callback_func.c:119 +#, c-format +msgid "The structure value %d is invalid." +msgstr "Formationsværdien %d er ugyldig." + +#: src/misc2_callback_func.c:161 +#, c-format +msgid "%s accepts your offer." +msgstr "%s accepterer dit tilbud." + +#: src/misc2_callback_func.c:168 +#, c-format +msgid "%s rejects your offer. You may still make %d offers." +msgstr "%s afviser dit tilbud. Du kan stadig komme med %d tilbud." + +#: src/misc2_callback_func.c:173 +#, c-format +msgid "%s rejects your offer and won't negotiate with you anymore. You should sell him before his contract expires (he'll simply leave your team otherwise)." +msgstr "%s afviser dit tilbud og vil ikke forhandle mere med dig. Du bør sælge ham inden hans kontrakt udløber, da han ellers bare vil forlade din klub." + +#: src/misc2_callbacks.c:114 +msgid "Your offer has been updated." +msgstr "Dit tilbud er blevet fornyet." + +#: src/misc2_callbacks.c:116 +msgid "Your offer will be considered next week." +msgstr "Dit tilbud vil blive taget i betragtning næste uge." + +#: src/misc2_callbacks.c:291 +msgid "You can't play Bygfoot without users!" +msgstr "Du kan ikke spille Bygfoot uden brugere!" + +#: src/misc2_callbacks.c:296 +#, c-format +msgid "Remove user %s from the game?" +msgstr "Fjern bruger %s fra spillet?" + +#: src/misc2_interface.c:71 +#: src/window.c:613 +msgid "Job offer" +msgstr "Jobtilbud" + +#: src/misc2_interface.c:97 +#: src/treeview.c:251 +#: src/treeview.c:652 +#: src/treeview.c:1844 +msgid "Name" +msgstr "Navn" + +#: src/misc2_interface.c:102 +#: src/treeview.c:130 +#: src/treeview.c:279 +#: src/treeview.c:654 +msgid "League" +msgstr "Liga" + +#: src/misc2_interface.c:107 +#: src/treeview.c:1591 +msgid "Rank" +msgstr "Placering" + +#: src/misc2_interface.c:112 +msgid "Money (approx.)" +msgstr "Beløb (ca.)" + +#: src/misc2_interface.c:117 +#: src/treeview.c:1277 +msgid "Stadium capacity" +msgstr "Stadionkapacitet" + +#: src/misc2_interface.c:122 +#: src/treeview.c:1281 +msgid "Stadium safety" +msgstr "Stadionsikkerhed" + +#: src/misc2_interface.c:165 +msgid "Player list" +msgstr "Spillerliste" + +#: src/misc2_interface.c:173 +msgid "Average skill:" +msgstr "Gennemsnitlig evne" + +#. Player health: ok. +#. Player status: ok. +#: src/misc2_interface.c:221 +#: src/player.c:1206 +#: src/treeview_helper.c:951 +#: src/treeview_helper.c:1221 +msgid "OK" +msgstr "O.k." + +#: src/misc2_interface.c:434 +#: src/misc2_interface.c:521 +#: src/misc2_interface.c:1083 +#: src/misc2_interface.c:1178 +#: src/misc_interface.c:263 +#: src/misc_interface.c:1059 +#: src/options_interface.c:984 +msgid "Esc" +msgstr "Esc" + +#: src/misc2_interface.c:604 +msgid "1 year" +msgstr "1 år" + +#: src/misc2_interface.c:612 +msgid "3 years" +msgstr "3 år" + +#: src/misc2_interface.c:620 +msgid "4 years" +msgstr "4 år" + +#: src/misc2_interface.c:628 +msgid "2 years" +msgstr "2 år" + +#: src/misc2_interface.c:691 +msgid "Make offer" +msgstr "Giv et tilbud" + +#: src/misc2_interface.c:786 +msgid "Users -- click to remove" +msgstr "Brugere -- klik for at fjerne" + +#: src/misc2_interface.c:801 +msgid "Click on a user to remove him from the game." +msgstr "Klik på en bruger for at fjerne denne fra spillet." + +#: src/misc2_interface.c:807 +msgid "Available teams" +msgstr "Tilgængelig klubber:" + +#: src/misc2_interface.c:843 +#: src/misc_interface.c:190 +msgid "Add user" +msgstr "Tilføj bruger" + +#: src/misc2_interface.c:919 +msgid "Debug" +msgstr "Fejlfinding" + +#: src/misc2_interface.c:926 +msgid "Bygfoot debug window. If you got here by accident, CLOSE IMMEDIATELY (otherwise your CPU will be destroyed by overheating)." +msgstr "Bygfoot debugvindue. Hvis du er havnet her ved et tilfælde, SÅ LUK DET ØJEBLIKKELIGT (ellers vil din processor blive ødelagt af overophedning)." + +#: src/misc2_interface.c:1166 +#: src/misc_interface.c:1035 +msgid "Return" +msgstr "Retur" + +#: src/misc2_interface.c:1195 +msgid "Decide later" +msgstr "Beslut senere" + +#: src/misc2_interface.c:1281 +msgid "Current file" +msgstr "Nuværende fil" + +#: src/misc2_interface.c:1292 +msgid "Open a memorable matches file" +msgstr "Åben en fil med mindeværdige kampe" + +#: src/misc2_interface.c:1297 +msgid "Reload matches from file" +msgstr "Genindlæs kampe fra fil" + +#: src/misc2_interface.c:1311 +#: src/options_interface.c:349 +msgid "Reload" +msgstr "Genindlæs" + +#: src/misc2_interface.c:1318 +msgid "Import the matches from a memorable matches file" +msgstr "Importér kampene fra en fil over mindeværdige kampe" + +#: src/misc2_interface.c:1332 +msgid "Import file" +msgstr "Importér fil" + +#: src/misc2_interface.c:1354 +msgid "Save changes to file and close" +msgstr "Gem ændringer og luk" + +#: src/misc2_interface.c:1368 +msgid "Save and close" +msgstr "Gem og luk" + +#: src/misc2_interface.c:1375 +msgid "Reload matches from file and close" +msgstr "Genindlæs kampe fra fil og luk" + +#: src/misc2_interface.c:1389 +msgid "Reload and close" +msgstr "Genindlæs og luk" + +#: src/misc_callback_func.c:220 +msgid "Safety improvement too high, reset to highest possible value." +msgstr "Sikkerhedsforbedring er for høj, sætter til højest mulige værdi." + +#: src/misc_callback_func.c:230 +msgid "You don't have the money." +msgstr "Det har du ikke penge til." + +#: src/misc_callbacks.c:183 +msgid "There were too many substitutions. Only 3 per game are allowed. Player list reset." +msgstr "Der var for mange udskiftninger. Kun 3 per kamp er tillade. Spillerlisten er sat tilbage." + +#: src/misc_callbacks.c:360 +msgid "None" +msgstr "Ingen" + +#: src/misc_interface.c:109 +msgid "Click on a user to remove him." +msgstr "Klik på en bruger, for at fjerne denne." + +#: src/misc_interface.c:133 +msgid "Choose country" +msgstr "Vælg et land" + +#: src/misc_interface.c:147 +msgid "Start in" +msgstr "Begynd i" + +#: src/misc_interface.c:164 +msgid "Username" +msgstr "Brugernavn" + +#: src/misc_interface.c:203 +msgid "Load team definitions" +msgstr "Indlæs klubdefinitioner" + +#: src/misc_interface.c:206 +msgid "Load teams from definition files (note that the official Bygfoot package doesn't contain team definition files, you have to get them from the homepage or via the bygfoot-update script)" +msgstr "Indlæs klubber fra definitionsfiler (bemærk, at den officielle Bygfootpakke ikke indeholder klubdefinitionsfiler - du er nødt til at hente dem fra hjemmesiden eller via bygfoot-update-scriptet)" + +#: src/misc_interface.c:210 +msgid "Only names" +msgstr "Kun navne" + +#: src/misc_interface.c:213 +msgid "Load only the player names in the definition files" +msgstr "Indlæs kun spillernavne fra definitionsfiler" + +#: src/misc_interface.c:217 +msgid "Don't load definitions" +msgstr "Indlæs ikke definitioner" + +#: src/misc_interface.c:220 +msgid "Don't load team definitions at all" +msgstr "Indlæs overhovedet ikke klubdefinitioner" + +#: src/misc_interface.c:238 +msgid "Space" +msgstr "Mellemrumstast" + +#: src/misc_interface.c:255 +msgid "Start" +msgstr "Begynd" + +#: src/misc_interface.c:272 +msgid "Ctrl-O" +msgstr "Ctrl+O" + +#: src/misc_interface.c:289 +msgid "Load game" +msgstr "Indlæs spil" + +#: src/misc_interface.c:296 +msgid "Load the last game that was saved or loaded." +msgstr "Indlæs det sidste spil, der blev gemt eller indlæst." + +#: src/misc_interface.c:310 +msgid "_Resume last game" +msgstr "_Genoptag sidste spil" + +#: src/misc_interface.c:409 +#: src/window.c:643 +msgid "Select font" +msgstr "Vælg skrifttype" + +#: src/misc_interface.c:582 +msgid "Commentary" +msgstr "Kommentarer" + +#: src/misc_interface.c:596 +msgid "Statistics" +msgstr "Statistik" + +#: src/misc_interface.c:607 +msgid "Esc / Return / Space" +msgstr "Esc / retur / mellemrumstast" + +#: src/misc_interface.c:624 +msgid "_Pause" +msgstr "_Pause" + +#: src/misc_interface.c:631 +#: src/misc_interface.c:653 +msgid "Return / Space" +msgstr "Retur / mellemrumstast" + +#: src/misc_interface.c:645 +msgid "_Resume" +msgstr "_Genoptag" + +#: src/misc_interface.c:667 +msgid "Change live game speed. The lower the value the faster the live game." +msgstr "Ændr hastighed for 'direkte' kamp. Jo lavere værdi, des hurtige kampafvikling." + +#: src/misc_interface.c:670 +msgid "Speed" +msgstr "Hastighed:" + +#: src/misc_interface.c:677 +msgid "Verbosity" +msgstr "Kommentarniveau" + +#: src/misc_interface.c:689 +msgid "Change commentary verbosity. The higher this value the more events you can see." +msgstr "Ændr kommentarniveau. Jo højere værdi, des flere kommentarer." + +#: src/misc_interface.c:866 +msgid "Status:" +msgstr "Status:" + +#: src/misc_interface.c:880 +msgid "Current capacity" +msgstr "Nuværende stadionkapacitet" + +#: src/misc_interface.c:898 +msgid " seats" +msgstr " sæder" + +#: src/misc_interface.c:902 +msgid "Current safety" +msgstr "Nuværende stadionsikkerhed" + +#: src/misc_interface.c:915 +msgid "Average attendance" +msgstr "Gennemsnitlig tilskuerantal" + +#: src/misc_interface.c:929 +msgid "Average attendance %" +msgstr "Gennemsnitlig tilskuerantal %" + +#: src/misc_interface.c:951 +msgid "Increase" +msgstr "Forøg" + +#: src/misc_interface.c:963 +msgid "Capacity (seats)" +msgstr "Kapacitet (sæder)" + +#: src/misc_interface.c:971 +#: src/misc_interface.c:1005 +msgid "Right-click to set to 0" +msgstr "Højreklik for at nulstille" + +#: src/misc_interface.c:977 +#: src/misc_interface.c:1011 +msgid "Costs" +msgstr "Udgifter" + +#: src/misc_interface.c:981 +#: src/misc_interface.c:989 +#: src/misc_interface.c:1015 +#: src/misc_interface.c:1023 +msgid "0" +msgstr "0" + +#: src/misc_interface.c:985 +#: src/misc_interface.c:1019 +msgid "Expected duration" +msgstr "Forventet varighed" + +#: src/misc_interface.c:997 +msgid "Safety (%)" +msgstr "Sikkerhed (%)" + +#: src/misc_interface.c:1052 +msgid "Improve!" +msgstr "Forbedr!" + +#: src/misc_interface.c:1146 +msgid "Choose file" +msgstr "Vælg fil" + +#: src/misc_interface.c:1214 +msgid "There are a few companies interested in sponsoring your team. Please select one:" +msgstr "Der er nogle selskaber, der er interesserede i at sponsorere din klub. Vælg venligst en:" + +#: src/misc_interface.c:1249 +msgid "Accept" +msgstr "Acceptér" + +#: src/misc_interface.c:1256 +msgid "If you don't like any of the sponsors, you can go a few weeks without sponsor and wait for new offers." +msgstr "Hvis du ikke kan lide nogen af sponsorerne, kan du klare dig i nogle uger uden sponsor, og vente på nogle nye tilbud." + +#: src/misc_interface.c:1270 +msgid "Reject for now" +msgstr "Afvis for nu" + +#: src/options_interface.c:209 +msgid "Confirm quit when not saved" +msgstr "Bekræft afslutning, når der ikke er gemt" + +#: src/options_interface.c:212 +msgid "Whether to show a confirmation popup when you press quit and the game state is not saved" +msgstr "Hvorvidt, der skal vises et bekræftigelsesvindue, når du vil afslutte uden at spillets tilstand er gemt" + +#: src/options_interface.c:214 +msgid "Confirm when unfit" +msgstr "Bekræft, når ude af form" + +#: src/options_interface.c:217 +msgid "Whether to show a confirmation popup if a user team has an injured or banned player in the startup formation" +msgstr "Hvorvidt, der skal vises et bekræftigelsesvindue, hvis et brugerhold har en skadet eller karantænramt spiller i startformationen" + +#: src/options_interface.c:219 +msgid "Save overwrites" +msgstr "Overskriv ved gemning" + +#: src/options_interface.c:222 +msgid "Whether 'Save' overwrites the current save file or pops up a 'Save as' window" +msgstr "Hvorvidt 'Gem' overskriver den nuværende fil, eller dukker op som et 'Gem som'-vindue" + +#: src/options_interface.c:224 +msgid "Maximize main window" +msgstr "Maximér hovedvindue" + +#: src/options_interface.c:227 +msgid "Whether game starts with a maximized main window (doesn't work with all window managers)" +msgstr "Hvorvidt spillet starter med et fuldskærmsvindue (virker ikke med alle vindueshåndterere)" + +#: src/options_interface.c:229 +msgid "Prefer messages" +msgstr "Foretrækker beskeder" + +#: src/options_interface.c:232 +msgid "Whether to show warnings and such in the message area in the main window when possible" +msgstr "Hvorvidt, der skal vises advarsler og lignende i hovedvinduets beskedområde, når dette er muligt." + +#: src/options_interface.c:234 +msgid "Skip weeks without user matches" +msgstr "Spring over uger uden kampe for brugere" + +#: src/options_interface.c:237 +msgid "If checked, weeks without user teams playing are calculated automatically (without the user having to press 'New week')" +msgstr "Hvis der er sat hak i fluebenet, vil uger uden brugerkampe blive beregnet automatisk (uden at brugeren skal trykke på 'Ny uge')" + +#: src/options_interface.c:256 +msgid "Autosave interval " +msgstr "Interval for automatisk gem" + +#: src/options_interface.c:264 +msgid "How often the game is saved automatically" +msgstr "Hvor ofte spillet skal gemmes automatisk" + +#: src/options_interface.c:267 +msgid " Autosave files " +msgstr " Automatisk gemte filer " + +#: src/options_interface.c:275 +msgid "How many files the autosave uses" +msgstr "Hvor mange filer, der vil blive brugt, når der gemmes automatisk" + +#: src/options_interface.c:277 +msgid "Player attribute precision" +msgstr "Præcision for spilleregenskaber" + +#: src/options_interface.c:284 +msgid "Player list refresh rate" +msgstr "Opfriskningshastighed for spillerliste" + +#: src/options_interface.c:291 +msgid "Constants file" +msgstr "Konstantfil" + +#: src/options_interface.c:303 +#: src/options_interface.c:390 +msgid "Font used in treeviews" +msgstr "Skrifttype brugt ved trævisning" + +#: src/options_interface.c:317 +msgid "Font name" +msgstr "Skrifttypenavn" + +#: src/options_interface.c:330 +msgid "File containing settings which determine a lot of aspects of the game behaviour. DON'T CHANGE THIS UNLESS YOU REALLY KNOW WHAT YOU ARE DOING." +msgstr "Fil, der indeholder indstillinger, som bestemmer en masse aspekter i spillets opførsel. FORETAG INGEN ÆNDRINGER MED MINDRE DU VIRKELIG VED, HVAD DU FORETAGER DIG." + +#: src/options_interface.c:335 +msgid "Reload the constants file" +msgstr "Genindlæs konstantfil" + +#: src/options_interface.c:353 +msgid "Language" +msgstr "Sprog" + +#: src/options_interface.c:360 +msgid "Autosave" +msgstr "Gem filer automatisk" + +#: src/options_interface.c:365 +msgid "Whether to automatically save the game regularly" +msgstr "Hvorvidt spillet skal gemmes automatisk med regelmæssige intervaller" + +#: src/options_interface.c:373 +msgid "How many digits after the comma there are for skill etc." +msgstr "Hvor mange cifre, der skal være efter kommaet for evner m.m." + +#: src/options_interface.c:382 +msgid "How often the player list gets refreshed during a live game (in live game minutes)" +msgstr "Hvor ofte spillerlisten bliver opdateret under en direkte kamp (i kampminutter)" + +#: src/options_interface.c:397 +msgid "Choose game language (might not work in Windows versions)" +msgstr "Vælg sprog til at anvende i spillet (virker måske ikke i Windows-udgaver)" + +#: src/options_interface.c:403 +msgid "Global" +msgstr "Global" + +#: src/options_interface.c:415 +msgid "Show live game" +msgstr "Vis 'direkte' kamp" + +#: src/options_interface.c:419 +msgid "Show tendency bar" +msgstr "Vis tendensbjælke" + +#: src/options_interface.c:428 +msgid "Live game speed factor" +msgstr "Hastighedsfaktor for direkte kampe" + +#: src/options_interface.c:435 +msgid "Live game verbosity" +msgstr "Kommentarniveau for direkte kampe" + +#: src/options_interface.c:448 +msgid "The lower this value the faster the live game commentary will scroll." +msgstr "Jo lavere, denne værdi er, des hurtigere vil kommentarerne under 'direkte' kamp blive opdateret." + +#: src/options_interface.c:457 +msgid "The higher this value, the more commentary you'll see." +msgstr "Jo højere værdi, des flere kommentarer vil du se." + +#: src/options_interface.c:460 +msgid "Automatic substitutions" +msgstr "Automatisk udskiftning" + +#: src/options_interface.c:463 +msgid "Whether the subs (e.g. for injured players) are made by the CPU. This is automatically done if the live game is off." +msgstr "Hvorvidt udskiftninger (dvs. af skadede spillere) foretages af computeren. Dette sker automatisk hvis 'direkte kampe' er slået fra." + +#: src/options_interface.c:474 +msgid "Pause when injury" +msgstr "Pause ved skader" + +#: src/options_interface.c:477 +msgid "Whether the live game pauses when a user player is injured" +msgstr "Hvorvidt den direkte kamp skal sættes på pause, når en spiller bliver skadet" + +#: src/options_interface.c:479 +msgid "Pause when red card" +msgstr "Pause ved rødt kort" + +#: src/options_interface.c:482 +msgid "Whether the live game pauses when a user player is sent off" +msgstr "Hvorvidt den direkte kamp skal sættes på pause, når en spiller bliver udvist" + +#: src/options_interface.c:484 +msgid "Pause when break" +msgstr "Pause ved halvleg" + +#: src/options_interface.c:487 +msgid "Whether the live game pauses at half time and extra time" +msgstr "Hvorvidt den direkte kamp skal sættes på pause ved halvleg og forlænget spilletid" + +#: src/options_interface.c:501 +msgid "Confirm removing youths" +msgstr "Bekræft fjernelse af elever" + +#: src/options_interface.c:504 +msgid "Whether a confirmation popup is shown when you kick out a youth from your academy" +msgstr "Hvorvidt et bekræftigelsesvindue skal vises, når du smider en ungdomsspiller ud af dit akademi" + +#: src/options_interface.c:506 +msgid "Show job offers" +msgstr "Vis jobtilbud" + +#: src/options_interface.c:509 +msgid "Whether to show job offers when a user is successful" +msgstr "Hvorvidt at jobtilbud skal vises, når en bruger har succes" + +#: src/options_interface.c:514 +msgid "Set to 0 to switch off warning" +msgstr "Sæt til 0 for at slå advarsel fra" + +#: src/options_interface.c:520 +msgid "Show warning if a player contract gets below " +msgstr "Vis advarsel, hvis en spillerkontrakt kommer under " + +#: src/options_interface.c:530 +msgid " months" +msgstr " måneder" + +#: src/options_interface.c:534 +msgid "Show all leagues in the fixture view" +msgstr "Vis alle ligaer i resultatoversigt" + +#: src/options_interface.c:537 +msgid "Whether in the weekly fixture view all leagues or only the user league is shown" +msgstr "Hvorvidt alle ligaer vises i den ugentlige resultatoversigt, eller der kun vises resultater fra brugerens liga" + +#: src/options_interface.c:548 +msgid "Swap adapts structure" +msgstr "Lad formation følge spillerombytning" + +#: src/options_interface.c:551 +msgid "Whether swapping two players automatically adapts the team structure to the player positions" +msgstr "Hvorvidt ombytning på to spillere automatisk tilpasser holdformationen til spillerpositioner" + +#: src/options_interface.c:553 +msgid "Show overall games/goals" +msgstr "Vis alle typer kampe/mål" + +#: src/options_interface.c:556 +msgid "Whether to show the player games/goals value in all competitions" +msgstr "Hvorvidt spillerens kampe/mål-værdi for alle turneringer skal vises" + +#: src/options_interface.c:558 +msgid "Misc." +msgstr "Forskelligt" + +#: src/options_interface.c:566 +msgid "Name " +msgstr "Navn" + +#: src/options_interface.c:573 +msgid "CPos " +msgstr "Nuv. pos. " + +#: src/options_interface.c:580 +msgid "Pos " +msgstr "Pos. " + +#: src/options_interface.c:587 +msgid "CSkill " +msgstr "Nuv. evne " + +#: src/options_interface.c:594 +msgid "Skill " +msgstr "Evne" + +#: src/options_interface.c:601 +msgid "Fitness " +msgstr "Form" + +#: src/options_interface.c:608 +msgid "Games " +msgstr "Spil" + +#: src/options_interface.c:615 +msgid "Shots " +msgstr "Skud" + +#: src/options_interface.c:622 +msgid "Goals " +msgstr "Mål" + +#: src/options_interface.c:629 +msgid "Status " +msgstr "Status" + +#: src/options_interface.c:636 +msgid "Cards " +msgstr "Kort" + +#: src/options_interface.c:643 +msgid "Age " +msgstr "Alder" + +#: src/options_interface.c:650 +msgid "ETal " +msgstr "Ans. talent " + +#: src/options_interface.c:657 +msgid "Value " +msgstr "Værdi" + +#: src/options_interface.c:664 +msgid "Wage " +msgstr "Løn" + +#: src/options_interface.c:671 +msgid "Contract " +msgstr "Kontrakt" + +#: src/options_interface.c:678 +msgid "League " +msgstr "Liga" + +#: src/options_interface.c:685 +msgid "Team " +msgstr "Klub" + +#: src/options_interface.c:922 +msgid "Attribute " +msgstr "Egenskab " + +#: src/options_interface.c:929 +msgid "List 1 " +msgstr "Liste 1" + +#: src/options_interface.c:936 +msgid "List 2" +msgstr "Liste 2" + +#: src/options_interface.c:950 +msgid "Player attributes shown" +msgstr "Viste spilleregenskaber" + +#: src/options_interface.c:967 +msgid "Save global settings to file" +msgstr "Gem globale indstillinger i fil" + +#: src/options_interface.c:970 +msgid "Whether to save the global settings to file (so that they get loaded next time you start a new game)" +msgstr "Hvorvidt de globale indstillinger skal gemmes i en fil (så de kan indlæses næste gang, du starter et nyt spil)" + +#: src/options_interface.c:972 +msgid "Save user settings to file" +msgstr "Gem brugerindstillinger i fil" + +#: src/options_interface.c:975 +msgid "Whether to save the user settings to file (so that they get loaded next time this user starts a new game)" +msgstr "Hvorvidt brugerindstillingerne skal gemmes i en fil (så de kan indlæses næste gang, brugeren starter et nyt spil)" + +#: src/player.c:579 +msgid "You can't replace a banned player." +msgstr "Du kan ikke erstatte en udelukket spiller." + +#: src/player.c:1079 +#, c-format +msgid "%s's contract expires in %.1f years." +msgstr "%s's kontrakt udløber om %.1f år." + +#: src/player.c:1209 +msgid "Concussion" +msgstr "Hjernerystelse" + +#: src/player.c:1212 +msgid "Pulled muscle" +msgstr "Forstrækket muskel" + +#: src/player.c:1215 +msgid "Hamstring" +msgstr "Beskadiget ledbånd i knæet" + +#: src/player.c:1218 +msgid "Groin injury" +msgstr "Lyskenskade" + +#: src/player.c:1221 +msgid "Fractured ankle" +msgstr "Forstuvet ankel" + +#: src/player.c:1224 +msgid "Broken rib" +msgstr "Brækket ribben" + +#: src/player.c:1227 +msgid "Broken leg" +msgstr "Brækket ben" + +#: src/player.c:1230 +msgid "Broken ankle" +msgstr "Brækket ankel" + +#: src/player.c:1233 +msgid "Broken arm" +msgstr "Brækket arm" + +#: src/player.c:1236 +msgid "Broken shoulder" +msgstr "Brækket skulder" + +#: src/player.c:1239 +msgid "Torn crucial ligament" +msgstr "Beskadiget ledbånd" + +#: src/support.c:90 +#: src/support.c:114 +#, c-format +msgid "Couldn't find pixmap file: %s" +msgstr "Kunne ikke finde pixmapfil: %s" + +#: src/team.c:571 +#, c-format +msgid "Team style changed to %s." +msgstr "Spillestil ændret til %s." + +#: src/team.c:575 +#, c-format +msgid "Boost changed to %s." +msgstr "Boost ændret til %s." + +#. a won match +#: src/team.c:1008 +#, c-format +msgid "W %d : %d" +msgstr "V %d : %d" + +#. a lost match +#: src/team.c:1014 +#, c-format +msgid "L %d : %d" +msgstr "T %d : %d" + +#. a drawn match +#: src/team.c:1019 +#, c-format +msgid "Dw %d : %d" +msgstr "U %d : %d" + +#. a match at home +#: src/team.c:1029 +#, c-format +msgid "%s (H) " +msgstr "%s (H) " + +#. a match away +#: src/team.c:1035 +#, c-format +msgid "%s (A) " +msgstr "%s (U) " + +#. a match on neutral ground +#: src/team.c:1045 +#, c-format +msgid "%s (N) " +msgstr "%s (N) " + +#. draw +#: src/team.c:1095 +msgid "Dw " +msgstr "U" + +#. lost +#: src/team.c:1099 +msgid "L " +msgstr "T" + +#. won +#: src/team.c:1102 +msgid "W " +msgstr "V" + +#: src/transfer.c:434 +#, c-format +msgid "%s has been added to the transfer list for %d weeks." +msgstr "%s er blevet tilføjet transferlisten for %d uger." + +#: src/treeview2.c:35 +msgid "REPLAY" +msgstr "Afspil igen" + +#: src/treeview2.c:36 +msgid "REMOVE" +msgstr "Fjern" + +#: src/treeview2.c:37 +msgid "EXPORT" +msgstr "Eksportér" + +#: src/treeview2.c:54 +msgid "Your team" +msgstr "Din klub" + +#: src/treeview2.c:55 +#: src/treeview2.c:163 +msgid "Opponent" +msgstr "Modstander" + +#: src/treeview2.c:56 +#: src/treeview2.c:165 +msgid "Result" +msgstr "Resultat" + +#: src/treeview2.c:57 +#: src/treeview2.c:162 +msgid "Competition" +msgstr "Konkurrence" + +#: src/treeview2.c:58 +msgid "Country" +msgstr "Land" + +#. Week +#: src/treeview2.c:159 +msgid "We" +msgstr "Uge" + +#. Round +#: src/treeview2.c:161 +msgid "Ro" +msgstr "Runde" + +#: src/treeview.c:121 +#: src/treeview.c:278 +#: src/treeview.c:653 +#: src/treeview.c:1186 +#: src/treeview.c:1585 +#: src/treeview.c:1713 +#: src/treeview.c:2007 +msgid "Team" +msgstr "Klub" + +#. Average skill +#: src/treeview.c:139 +msgid "Av.Sk." +msgstr "Gns. evne" + +#. Current position of a player. +#: src/treeview.c:253 +msgid "CPos" +msgstr "Nuv. pos." + +#. Position of a player. +#: src/treeview.c:255 +msgid "Pos" +msgstr "Pos." + +#. Current skill of a player. +#: src/treeview.c:257 +msgid "CSk" +msgstr "Nuv. evne" + +#. Skill of a player. +#: src/treeview.c:259 +msgid "Sk" +msgstr "Evne" + +#. Fitness of a player. +#: src/treeview.c:261 +msgid "Fit" +msgstr "Form" + +#. Games of a player. +#: src/treeview.c:263 +msgid "Ga" +msgstr "Kampe" + +#. Shots of a player. +#: src/treeview.c:265 +msgid "Sh" +msgstr "Skud" + +#. Goals of a player. +#. Goals. +#: src/treeview.c:267 +#: src/treeview.c:2126 +msgid "Go" +msgstr "Mål" + +#. Status of a player. +#: src/treeview.c:269 +msgid "Status" +msgstr "Status" + +#. Yellow cards of a player. +#: src/treeview.c:271 +msgid "YC" +msgstr "GK" + +#: src/treeview.c:272 +#: src/treeview.c:1851 +msgid "Age" +msgstr "Alder" + +#. Estimated talent of a player. +#: src/treeview.c:274 +msgid "Etal" +msgstr "Ans. talent" + +#: src/treeview.c:275 +#: src/treeview.c:1853 +msgid "Value" +msgstr "Værdi" + +#: src/treeview.c:277 +#: src/treeview.c:1855 +msgid "Contract" +msgstr "Kontrakt" + +#. 'Normal' goals, ie. no penalties or free kicks. +#: src/treeview.c:701 +msgid "Goals (regular)" +msgstr "Mål (almindelige)" + +#: src/treeview.c:702 +#: src/treeview_helper.c:810 +msgid "Shots" +msgstr "Skud" + +#: src/treeview.c:703 +#: src/treeview.c:2071 +msgid "Shot %" +msgstr "Skud %" + +#: src/treeview.c:704 +msgid "Possession" +msgstr "Boldbesiddelse" + +#: src/treeview.c:705 +msgid "Penalties" +msgstr "Straffespark" + +#: src/treeview.c:706 +msgid "Fouls" +msgstr "Frispark" + +#: src/treeview.c:707 +#: src/treeview_helper.c:811 +msgid "Yellows" +msgstr "Gule kort" + +#: src/treeview.c:708 +#: src/treeview_helper.c:812 +msgid "Reds" +msgstr "Røde kort" + +#: src/treeview.c:709 +msgid "Injuries" +msgstr "Skader" + +#: src/treeview.c:763 +#, c-format +msgid "" +"Attendance\n" +"%s" +msgstr "" +"Tilskuertal:\n" +"%s" + +#: src/treeview.c:771 +#, c-format +msgid "" +"There were technical problems\n" +"in the stadium." +msgstr "" +"Der var tekniske problemer\n" +"på stadion." + +#: src/treeview.c:774 +#, c-format +msgid "" +"There were riots\n" +"in the stadium." +msgstr "" +"Der var optøjer\n" +"på stadion." + +#: src/treeview.c:777 +#, c-format +msgid "" +"There was a fire\n" +"in the stadium." +msgstr "" +"Der var ildebrand\n" +"på stadion." + +#: src/treeview.c:863 +#, c-format +msgid "Week %d Round %d" +msgstr "Uge %d, runde %d" + +#. A group of a round robin stage of a cup. +#: src/treeview.c:1073 +#, c-format +msgid "%s Group %d" +msgstr "%s, Gruppe %d" + +#. Games played (a number). +#: src/treeview.c:1188 +msgid "PL" +msgstr "K" + +#. Games won. +#. Won. +#: src/treeview.c:1190 +#: src/treeview_helper.c:1536 +msgid "W" +msgstr "V" + +#. Games drawn. +#. Draw. +#: src/treeview.c:1192 +#: src/treeview_helper.c:1554 +msgid "Dw" +msgstr "U" + +#. Games lost. +#. Lost. +#: src/treeview.c:1194 +#: src/treeview_helper.c:1547 +msgid "L" +msgstr "T" + +#. Goals for. +#: src/treeview.c:1196 +msgid "GF" +msgstr "Mål scoret" + +#. Goals against. +#: src/treeview.c:1198 +msgid "GA" +msgstr "Mål imod" + +#. Goal difference. +#: src/treeview.c:1200 +msgid "GD" +msgstr "Målforskel" + +#. Points. +#: src/treeview.c:1202 +msgid "PTS" +msgstr "P" + +#: src/treeview.c:1271 +msgid "Stadium" +msgstr "Stadion" + +#: src/treeview.c:1287 +#: src/window.c:372 +#, c-format +msgid "" +"Improvement in progress.\n" +"%d seats and %d%% safety still to be done.\n" +"Expected finish: %d weeks." +msgstr "" +"Forbedring i gang.\n" +"%d sæder og %d%% sikkerhed mangler stadig.\n" +"Forventet afslutning: %d uger." + +#: src/treeview.c:1295 +msgid "Stadium status" +msgstr "Stadionstatus" + +#: src/treeview.c:1307 +msgid "Prize money" +msgstr "Præmiepenge" + +#: src/treeview.c:1308 +msgid "Ticket income" +msgstr "Billetsalg" + +#: src/treeview.c:1309 +msgid "Sponsorship" +msgstr "Sponsorering" + +#: src/treeview.c:1311 +msgid "Wages" +msgstr "Lønninger" + +#: src/treeview.c:1316 +msgid "Journey costs" +msgstr "Rejseomkostninger" + +#. Money paid to players a user fired. +#: src/treeview.c:1318 +msgid "Compensations" +msgstr "Godtgørelse" + +#. Finances balance. +#: src/treeview.c:1329 +msgid "Bi-weekly balance" +msgstr "Fjortendagesbalance" + +#. Finances balance. +#: src/treeview.c:1354 +msgid "Balance" +msgstr "Balance" + +#: src/treeview.c:1372 +msgid "Transfers" +msgstr "Transfere" + +#: src/treeview.c:1382 +msgid "Stadium expenses" +msgstr "Stadionudgifter" + +#: src/treeview.c:1395 +msgid "Money" +msgstr "Beløb" + +#: src/treeview.c:1399 +msgid "Drawing credit" +msgstr "Grænse for overtræk" + +#: src/treeview.c:1406 +#, c-format +msgid "Debt (repay in %d weeks)" +msgstr "Gæld (betal inden %d uger)" + +#: src/treeview.c:1415 +msgid "Sponsor" +msgstr "Sponsor" + +#. Contract time and money a sponsor pays. +#: src/treeview.c:1420 +#, c-format +msgid "%.1f months / %s" +msgstr "%.1f måneder / %s" + +#: src/treeview.c:1422 +msgid "Contract / Money" +msgstr "Kontrakt / Beløb" + +#: src/treeview.c:1429 +msgid "Youth acad. invest." +msgstr "Investering i ungdomsakademi" + +#: src/treeview.c:1447 +msgid "Income" +msgstr "Indtægter" + +#: src/treeview.c:1448 +msgid "Expenses" +msgstr "Udgifter" + +#: src/treeview.c:1507 +msgid "Goalie" +msgstr "Målmand" + +#: src/treeview.c:1509 +msgid "Midfield" +msgstr "Midtbane" + +#: src/treeview.c:1557 +msgid "Your next opponent" +msgstr "Din næste modstander" + +#: src/treeview.c:1563 +#: src/treeview.c:1568 +#, c-format +msgid "Week %d Round %d" +msgstr "Uge %d, runde %d" + +#: src/treeview.c:1574 +msgid "Neutral ground" +msgstr "Neutral bane" + +#: src/treeview.c:1576 +msgid "Home" +msgstr "Hjemme" + +#: src/treeview.c:1578 +msgid "Away" +msgstr "Ude" + +#: src/treeview.c:1609 +msgid "Average skill" +msgstr "Gennemsnitlig evne" + +#: src/treeview.c:1617 +msgid "Team structure" +msgstr "Holdformation" + +#: src/treeview.c:1623 +msgid "Latest results" +msgstr "Seneste resultater" + +#: src/treeview.c:1625 +#: src/treeview.c:2094 +#: src/treeview_helper.c:809 +msgid "Goals" +msgstr "Mål" + +#. The user's results against a specific team. +#: src/treeview.c:1630 +msgid "Your results" +msgstr "Dine resultater" + +#: src/treeview.c:1714 +msgid "Results" +msgstr "Resultater" + +#: src/treeview.c:1845 +msgid "Position" +msgstr "Position" + +#: src/treeview.c:1846 +msgid "Current position" +msgstr "Nuværende position" + +#: src/treeview.c:1847 +msgid "Skill" +msgstr "Evne" + +#: src/treeview.c:1848 +msgid "Current skill" +msgstr "Nuværende evne" + +#: src/treeview.c:1849 +msgid "Fitness" +msgstr "Form" + +#: src/treeview.c:1850 +msgid "Estimated talent" +msgstr "Anslået talent" + +#: src/treeview.c:1852 +msgid "Health" +msgstr "Helbred" + +#: src/treeview.c:1856 +msgid "Games/Goals\n" +msgstr "Kampe/måls\n" + +#. 'Limit' is the number of yellow cards until a player gets +#. banned automatically for a match. +#: src/treeview.c:1859 +msgid "Yellow cards (limit)\n" +msgstr "Gule kort (limit)\n" + +#: src/treeview.c:1860 +msgid "Banned\n" +msgstr "Udelukket\n" + +#. Hot streak or cold streak of a player. +#: src/treeview.c:1862 +msgid "Streak" +msgstr "Stime" + +#: src/treeview.c:1863 +msgid "Career values" +msgstr "Karriereværdier" + +#: src/treeview.c:1864 +msgid "" +"New contract\n" +"offers" +msgstr "" +"Nye kontrakt-\n" +"tilbud" + +#. Season. +#: src/treeview.c:2006 +msgid "Sea" +msgstr "Sæson" + +#: src/treeview.c:2007 +msgid "Week" +msgstr "Uge" + +#: src/treeview.c:2035 +msgid "Event" +msgstr "Begivenhed" + +#: src/treeview.c:2067 +msgid "Best offensive teams" +msgstr "Bedste offensive hold" + +#: src/treeview.c:2068 +msgid "Best defensive teams" +msgstr "Bedste defensive hold" + +#: src/treeview.c:2071 +msgid "Best goal scorers" +msgstr "Bedste angribere" + +#: src/treeview.c:2072 +msgid "Best goalkeepers" +msgstr "Bedste målmænd" + +#. % of saves for goalies (#goals / #shots) +#: src/treeview.c:2074 +msgid "Save %" +msgstr "Redninger %" + +#. Goals per game. +#: src/treeview.c:2128 +msgid "Go/Ga" +msgstr "Mål/kamp" + +#: src/treeview.c:2223 +msgid "League champions" +msgstr "Ligavindere" + +#: src/treeview.c:2224 +msgid "Cup champions" +msgstr "Cupvindere" + +#: src/treeview.c:2269 +#, c-format +msgid "Season %d" +msgstr "Sæson %d" + +#: src/treeview.c:2368 +msgid "Current league" +msgstr "Nuværende liga" + +#. Language is system-set (not user chosen). +#: src/treeview.c:2414 +msgid "System" +msgstr "System" + +#: src/treeview.c:2488 +msgid "Company" +msgstr "Company" + +#: src/treeview.c:2489 +msgid "" +"Contract length\n" +"(Months)" +msgstr "" +"Kontraktlængde\n" +"(måneder)" + +#: src/treeview.c:2490 +msgid "Money / week" +msgstr "Beløb / uge" + +#: src/treeview_helper.c:794 +msgid "Player doesn't negotiate anymore" +msgstr "Spilleren forhandler ikke mere" + +#: src/treeview_helper.c:796 +msgid "Player accepts new offers" +msgstr "Spilleren tager imod nye tilbud" + +#: src/treeview_helper.c:808 +msgid "Games" +msgstr "Kampe" + +#: src/treeview_helper.c:828 +#, c-format +msgid "" +"\n" +"Goals/Game %.1f Save %% %.1f" +msgstr "" +"\n" +"Mål/kamp %.1f redninger %% %.1f" + +#: src/treeview_helper.c:835 +#, c-format +msgid "" +"\n" +"Goals/Game %.1f Shot %% %.1f" +msgstr "" +"\n" +"Mål/kamp %.1f skud %% %.1f" + +#. Ban info of a player in the format: +#. 'Cup/league name: Number of weeks banned' +#: src/treeview_helper.c:860 +#, c-format +msgid "%s: %d weeks\n" +msgstr "%s: %d uger\n" + +#. Yellow cards of a player in a cup/league. No limit means there isn't a limit +#. after which the player gets banned for a match automatically. +#: src/treeview_helper.c:897 +#, c-format +msgid "%s: %d (no limit)\n" +msgstr "%s: %d (no limit)\n" + +#: src/treeview_helper.c:932 +msgid "The player is on a hot streak" +msgstr "Spilleren er inde i en god stime" + +#: src/treeview_helper.c:934 +msgid "The player is on a cold streak" +msgstr "Spilleren er inde i en dårlig stime" + +#: src/treeview_helper.c:944 +#, c-format +msgid "%s (expected recovery in %d weeks)" +msgstr "%s (forventet skadesfri om %d uger)" + +#: src/treeview_helper.c:1194 +#, c-format +msgid "INJ(%d)" +msgstr "SKA(%d)" + +#: src/treeview_helper.c:1208 +#, c-format +msgid "BAN(%d)" +msgstr "UDE(%d)" + +#. Goalie +#: src/treeview_helper.c:1317 +msgid "G" +msgstr "M" + +#. Defender +#: src/treeview_helper.c:1325 +msgid "D" +msgstr "F" + +#. Midfielder +#: src/treeview_helper.c:1333 +msgid "M" +msgstr "Mi" + +#. Forward +#: src/treeview_helper.c:1341 +msgid "F" +msgstr "A" + +#: src/treeview_helper.c:1451 +msgid "ADD LAST MATCH" +msgstr "Tilføj sidste kamp" + +#: src/user.c:275 +#, c-format +msgid "The owners of %s are not satisfied with the recent performance of the team. There are rumours they're looking for a new manager." +msgstr "Ejerne af %s er utilfredse med holdets seneste præstationer. Der er rygter om, at de er på jagt efter en ny manager." + +#: src/user.c:429 +#, c-format +msgid "%s has left your team because his contract expired." +msgstr "%s har forladt din klub, fordi kontrakten er udløbet." + +#: src/user.c:452 +#, c-format +msgid "You have overdrawn your bank account. The team owners give you %d weeks to get above your drawing credit limit." +msgstr "Du har overtrukket din bankkonto. Klubejerne har givet dig %d uger til at komme over overtræksgrænsen." + +#: src/user.c:454 +#, c-format +msgid "" +"You have overdrawn your bank account once again. Bear in mind that after the fourth time you get fired.\n" +"The team owners give you %d weeks to get above your drawing credit limit." +msgstr "" +"Du har overtrukket bankkontoen endnu en gang. Husk på, at du bliver fyret efter den fjerde gang.\n" +"Klubejerne giver dig %d uger til at komme over overtræksgrænsen." + +#: src/user.c:457 +#, c-format +msgid "Have a look at the transfer list, there's an offer for %s." +msgstr "Tag et kig på transferlisten. Der er et bud på %s." + +#: src/user.c:461 +#, c-format +msgid "Your offer for %s has been accepted. If you still want to buy him, go to the transfer list and left click on the player." +msgstr "Dit tilbud på %s er blevet accepteret. Hvis du stadig ønsker at købe ham, så gå til transferlisten og klik på spilleren (med venstre museknap)." + +#: src/user.c:467 +#, c-format +msgid "The owners of %s have rejected your offer (%s / %s) for %s. There was a better offer for the player than yours." +msgstr "Ejerne af %s har afvist dit tilbud (%s / %s) på %s. Der var et bedre bud på spilleren end dit." + +#: src/user.c:472 +#, c-format +msgid "The owners of %s have rejected your offer (%s / %s) for %s. Neither the fee nor the wage you offered were acceptable, they say." +msgstr "Ejerne af %s har afvist dit tilbud (%s / %s) på %s. De siger, at hverken transfergebyret eller lønnen, du tilbød, var acceptable." + +#: src/user.c:477 +#, c-format +msgid "The owners of %s have rejected your offer (%s / %s) for %s. The team owners weren't satisfied with the fee you offered." +msgstr "Ejerne af %s har afvist dit tilbud (%s / %s) på %s. Klubejerne var ikke tilfredse med det transfergebyr, du tilbød." + +#. A player from a team has rejected a transfer offer. +#: src/user.c:483 +#, c-format +msgid "%s of %s has rejected your offer (%s / %s). He wasn't satisfied with the wage you offered." +msgstr "%s fra %s har afvist dit tilbud (%s / %s). Han var ikke tilfreds med lønnen, du tilbød." + +#. Buy a player from a team. +#: src/user.c:489 +#, c-format +msgid "You didn't have enough money to buy %s from %s." +msgstr "Du har ikke penge nok til at købe %s from %s." + +#. Buy a player from a team. +#: src/user.c:494 +#, c-format +msgid "Your roster is full. You couldn't buy %s from %s." +msgstr "Din trup er fyldt op. Du kunne derfor ikke købe %s fra %s." + +#: src/user.c:498 +#, c-format +msgid "%s's injury was so severe that he can't play football on a professional level anymore. He leaves your team." +msgstr "%s's skade var så alvorlig, at han ikke længere kan spille fodbold på et professionelt niveau. He forlader derfor din klub." + +#: src/user.c:501 +msgid " Fortunately he's got a cousin who can help your team out." +msgstr " Heldigvis har han en fætter, som kan hjælpe din klub." + +#. Buy a team in a league. +#: src/user.c:689 +#, c-format +msgid "You start the game with %s in the %s." +msgstr "Du begynder spillet med %s i %s." + +#. Team fires, team in a league. +#: src/user.c:695 +#, c-format +msgid "" +"%s fires you because of financial mismanagement.\n" +"You find a new job with %s in the %s." +msgstr "" +"%s har fyret dig på grund af økonomisk vanrygt.\n" +"Du har fået et nyt arbejde hos %s i %s." + +#. Team fires, team in a league. +#: src/user.c:702 +#, c-format +msgid "" +"%s fires you because of unsuccessfulness.\n" +"You find a new job with %s in the %s." +msgstr "" +"%s har fyret dig på grund af manglende succes.\n" +"Du har fået et nyt arbejde hos %s i %s." + +#. Team in a league. Leave team. +#: src/user.c:709 +#, c-format +msgid "" +"%s offer you a job in the %s.\n" +"You accept the challenge and leave %s." +msgstr "" +"%s tilbyder dig et job i %s.\n" +"Du accepterer udfordringen og forlader %s." + +#. League name. +#: src/user.c:716 +#, c-format +msgid "You finish the season in the %s on rank %d." +msgstr "Du slutter sæsonen i %s som nr. %d." + +#. League name. +#: src/user.c:722 +#, c-format +msgid "You get promoted to the %s." +msgstr "Du rykker op i %s." + +#. League name. +#: src/user.c:727 +#, c-format +msgid "You get relegated to the %s." +msgstr "Du rykker ned i %s." + +#. Cup name, team name. +#: src/user.c:732 +#, c-format +msgid "You win the %s final against %s." +msgstr "Du har vundet %s finalen mod %s." + +#. Cup name, team name. +#: src/user.c:738 +#, c-format +msgid "You lose in the %s final against %s." +msgstr "Du har tabt %s finalen mod %s." + +#. Cup round name (e.g. Last 32), number, cup name. +#: src/user.c:745 +#, c-format +msgid "You reach the %s (round %d) of the %s." +msgstr "Du er nået til %s (runde %d) i %sen." + +#. League name. +#: src/user.c:751 +#, c-format +msgid "You are champion of the %s!" +msgstr "Du er vinderen af %s!" + +#. Company name. +#: src/user.c:779 +msgid " Systems" +msgstr " Systems-28" + +#. Company name. +#: src/user.c:781 +msgid " Communications" +msgstr " Communications" + +#. Company name. +#: src/user.c:783 +msgid " Holdings" +msgstr " Holdings" + +#. Company name. +#: src/user.c:785 +msgid " Industries" +msgstr " Industries" + +#. Company name. +#: src/user.c:787 +msgid " Company" +msgstr " Company" + +#. Company name. +#: src/user.c:789 +msgid " Telecommunications" +msgstr " Telecommunications" + +#. Company name. +#: src/user.c:791 +msgid " Labs" +msgstr " Labs" + +#. Company name. +#: src/user.c:793 +msgid " Technologies" +msgstr " Technologies" + +#. Company name. +#: src/user.c:795 +msgid " Chemicals" +msgstr " Chemicals" + +#. Company name. +#: src/user.c:797 +msgid " Energy" +msgstr " Energy" + +#. Company name. +#: src/user.c:799 +msgid " Bank" +msgstr " Bank" + +#. Company name. +#: src/user.c:801 +msgid " Products" +msgstr " Products" + +#. Company name. +#: src/user.c:803 +msgid " Software" +msgstr " Software" + +#. Company name. +#: src/user.c:805 +msgid " Scientific" +msgstr " Scientific" + +#. Company name. +#: src/user.c:807 +msgid " Financial" +msgstr " Financial" + +#. Company name. +#: src/user.c:809 +msgid " Petroleum" +msgstr " Petroleum" + +#. Company name. +#: src/user.c:811 +msgid " Restaurants" +msgstr " Restaurants" + +#. Company name. +#: src/user.c:813 +msgid " Data Systems" +msgstr " Data Systems" + +#. Company short name, leading to things like 'Marshall Data Systems Ltd.' +#: src/user.c:816 +msgid " Ltd." +msgstr " Ltd." + +#. Company short name. +#: src/user.c:818 +msgid " Assoc." +msgstr " Assoc." + +#. Company short name. +#: src/user.c:820 +msgid " Co." +msgstr " Co." + +#. Company short name. +#: src/user.c:822 +msgid " Ent." +msgstr " Ent." + +#. Company short name. Copy the '&'. +#: src/user.c:824 +msgid " & Co." +msgstr " & Co." + +#. Company short name. +#: src/user.c:826 +msgid " Corp." +msgstr " Corp." + +#. Company short name. +#: src/user.c:828 +msgid " Group" +msgstr " Group" + +#. Company addition, leading to 'Marshall & Sons Petroleum Co.'. Copy the '&'. +#: src/user.c:831 +msgid " & Sons" +msgstr " & Sons" + +#. Company addition. Copy the '&'. +#: src/user.c:833 +msgid " & Daughters" +msgstr " & Daughters" + +#. Company addition. +#: src/user.c:835 +msgid " Bros." +msgstr " Bros." + +#: src/user.c:915 +#, c-format +msgid "Your current sponsor is satisfied with your results and would like to renew the contract. Currently they're paying you %d a week." +msgstr "Din nuværende sponsor er tilfreds med dine resultater, og vil gerne forny kontrakten. På nuværende tidspunkt betaler de dig %d om ugen." + +#: src/user.c:992 +msgid "Memorable match added." +msgstr "Mindeværdig kamp tilføjet." + +#: src/window.c:54 +msgid "Didn't find file 'bygfoot_help'." +msgstr "Kunne ikke finde filen 'bygfoot_help'." + +#: src/window.c:141 +msgid "Bygfoot Save Files" +msgstr "Bygfoot Save Files" + +#: src/window.c:147 +msgid "Bygfoot Memorable Matches" +msgstr "Bygfoot Mindeværdige Kampe" + +#: src/window.c:153 +msgid "All Files" +msgstr "Alle filer" + +#: src/window.c:205 +msgid "Not a valid Bygfoot Memorable Matches filename." +msgstr "Dette er ikke en gyldig fil for mindeværdige kampe i Bygfoot." + +#: src/window.c:382 +msgid "No improvements currently in progress." +msgstr "Der foretages ingen forbedringer lige nu." + +#: src/window.c:536 +#, c-format +msgid "Welcome to Bygfoot %s" +msgstr "Velkommen til Bygfoot %s" + +#: src/window.c:572 +msgid "Erm..." +msgstr "Hmm..." + +#: src/window.c:591 +msgid "Numbers..." +msgstr "Numre..." + +#: src/window.c:602 +msgid "Your stadium" +msgstr "Dit stadion" + +#: src/window.c:635 +msgid "Options" +msgstr "Valgmuligheder" + +#: src/window.c:658 +msgid "Contract offer" +msgstr "Kontrakttilbud" + +#: src/window.c:666 +msgid "User management" +msgstr "Brugerhåndtering" + +#: src/window.c:689 +msgid "Transfer offer" +msgstr "Transfertilbud" + +#: src/window.c:697 +msgid "Sponsorship offers" +msgstr "Sponsortilbud" + +#: src/xml.c:80 +#, c-format +msgid "Loading league: %s" +msgstr "Henter ligaen %s..." + +#: src/xml.c:143 +#, c-format +msgid "Loading cup: %s" +msgstr "Henter cuppen %s..." + +#: src/youth_academy.c:173 +#, c-format +msgid "Youth %s will be too old for the youth academy soon. Move him to your team or kick him out of the academy. Otherwise he'll probably look for another team to play in." +msgstr "Ungdomsspilleren %s vil snart være for gammel til dit ungdomsakademi. Sæt ham på dit hold eller spark ham ud af akademiet. Ellers vil han sandsynligvis kigge sig om efter en anden klub at spille i." + +#: src/youth_academy.c:177 +#, c-format +msgid "Youth %s thought he's old enough for a real contract and left your youth academy." +msgstr "Ungdomsspilleren %s mente, han var gammel nok til at få en rigtig kontrakt, og forlod dit akademi." + +#: src/youth_academy.c:208 +msgid "A new youth registered at your youth academy." +msgstr "En ny ungdomsspiller er optaget på dit ungdomsakademi." + +#: src/youth_academy.c:212 +msgid "A new youth wanted to registered at your youth academy but there was no room for him." +msgstr "En ny ungdomsspiller ville gerne optages på dit ungdomsakademi, men der var ikke plads til ham." + diff --git a/src/Makefile.am b/src/Makefile.am index f64c8092..18eb6fd4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,7 @@ bygfoot_SOURCES = \ league.c cup.h free.h league.h main.h maths.h misc.h option.h player.h stat.h table.h team.h user.h variables.h \ live_game.c callbacks.h fixture.h free.h game_gui.h game.h league.h lg_commentary.h live_game.h main.h maths.h misc_callback_func.h misc.h option.h player.h support.h team.h treeview.h user.h variables.h window.h \ load_save.c callbacks.h file.h game_gui.h gui.h language.h load_save.h misc.h option.h support.h user.h variables.h window.h xml.h xml_loadsave_cup.h xml_loadsave_league.h xml_loadsave_leagues_cups.h xml_loadsave_misc.h xml_loadsave_season_stats.h xml_loadsave_transfers.h xml_loadsave_users.h \ - main.c file.h free.h language.h lg_commentary_struct.h live_game.h load_save.h main.h misc_callbacks.h misc.h name_struct.h option.h stat_struct.h transfer_struct.h variables.h window.h \ + main.c file.h free.h language.h lg_commentary_struct.h live_game.h load_save.h main.h misc_callbacks.h misc.h name_struct.h option.h stat_struct.h team_struct.h transfer_struct.h variables.h window.h \ maths.c maths.h misc.h variables.h \ misc.c main.h maths.h misc.h \ misc_callbacks.c callback_func.h callbacks.h game_gui.h game.h gui.h live_game.h load_save.h main.h maths.h misc_callback_func.h misc_callbacks.h option.h user.h variables.h window.h xml_country.h \ @@ -41,11 +41,12 @@ bygfoot_SOURCES = \ options_callbacks.c file.h option_gui.h options_callbacks.h options_interface.h support.h user.h variables.h window.h \ options_interface.c options_callbacks.h options_interface.h support.h \ player.c cup.h fixture.h free.h game_gui.h league.h main.h maths.h misc.h name.h option.h player.h team.h transfer.h user.h \ - start_end.c cup.h file.h finance.h fixture.h free.h game_gui.h gui.h league.h live_game.h load_save.h main.h maths.h misc.h name.h option.h start_end.h stat.h table.h team.h transfer.h user.h variables.h xml_name.h youth_academy.h \ + start_end.c cup.h file.h finance.h fixture.h free.h game_gui.h gui.h league.h live_game.h load_save.h main.h maths.h misc.h name.h option.h start_end.h stat.h table.h team.h transfer.h user.h variables.h xml_name.h xml_strategy.h youth_academy.h \ stat.c cup.h free.h league.h option.h player.h stat.h table_struct.h team.h variables.h \ + strategy.c main.h misc.h player.h strategy.h team.h \ support.c support.h \ table.c cup.h league.h misc.h table.h variables.h \ - team.c cup.h file.h fixture.h game_gui.h game.h league.h main.h maths.h misc.h option.h player.h team.h transfer.h user.h xml_team.h \ + team.c cup.h file.h fixture.h game_gui.h game.h league.h main.h maths.h misc.h option.h player.h strategy.h team.h transfer.h user.h xml_team.h \ transfer.c callbacks.h cup.h finance.h free.h game_gui.h main.h maths.h misc.h option.h player.h support.h team.h transfer.h treeview.h user.h \ treeview.c cup.h finance.h fixture.h free.h game.h language.h league.h live_game.h maths.h misc.h option.h player.h support.h team.h transfer.h treeview.h treeview_helper.h user.h \ treeview2.c fixture.h league.h live_game.h option.h support.h treeview2.h treeview_helper.h user.h \ @@ -72,6 +73,7 @@ bygfoot_SOURCES = \ xml_lg_commentary.c free.h lg_commentary.h live_game.h misc.h variables.h xml_lg_commentary.h \ xml_mmatches.c file.h free.h live_game.h misc.h user.h xml.h xml_loadsave_live_game.h xml_mmatches.h \ xml_name.c file.h free.h misc.h name.h variables.h xml_name.h \ + xml_strategy.c file.h free.h main.h misc.h team_struct.h xml_strategy.h \ 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 diff --git a/src/bygfoot.h b/src/bygfoot.h index 699e8960..6b65a221 100644 --- a/src/bygfoot.h +++ b/src/bygfoot.h @@ -111,6 +111,7 @@ enum ExitCodes EXIT_LOAD_TEAM_DEF, /**< Error loading a team definition file. */ EXIT_DEF_SORT, /**< Error sorting a team after loading the definition. */ EXIT_PROM_REL, /**< Error when executing the promotion/relegation stuff. */ + EXIT_STRATEGY_ERROR, /**< Error related to CPU strategies. */ EXIT_END }; diff --git a/src/cup.c b/src/cup.c index b3a1b73f..7613bb83 100644 --- a/src/cup.c +++ b/src/cup.c @@ -213,11 +213,9 @@ cup_get_choose_team_league_cup(const CupChooseTeam *ct, } if(*league == NULL && *cup == NULL) - { - g_warning("cup_get_choose_team_league_cup: no league nor cup found for chooseteam %s", - ct->sid); - main_exit_program(EXIT_CHOOSE_TEAM_ERROR, NULL); - } + main_exit_program(EXIT_CHOOSE_TEAM_ERROR, + "cup_get_choose_team_league_cup: no league nor cup found for chooseteam %s", + ct->sid); } /** Load the pointers to the teams participating in the @@ -338,22 +336,20 @@ cup_load_choose_team(Cup *cup, GPtrArray *teams, const CupChooseTeam *ct) if(ct->number_of_teams != -1 && number_of_teams != ct->number_of_teams) - { - g_warning("cup_load_choose_team (1): not enough teams (that don't participate in international cups yet) found in chooseteam %s for cup %s (%d specified, %d found) cup group %d.\n ", - ct->sid, cup->name, ct->number_of_teams, number_of_teams, cup->group); - main_exit_program(EXIT_CHOOSE_TEAM_ERROR, NULL); - } + main_exit_program(EXIT_CHOOSE_TEAM_ERROR, + "cup_load_choose_team (1): not enough teams (that don't participate in international cups yet) found in chooseteam %s for cup %s (%d specified, %d found) cup group %d.\n ", + ct->sid, cup->name, ct->number_of_teams, + number_of_teams, cup->group); } else { if(season == 1 && cup->add_week == 0) { if(lig(0).teams->len < ct->number_of_teams) - { - g_warning("cup_load_choose_team: not enough teams in league 0 for chooseteam %s (%d; required: %d) in cup %s\n", - ct->sid, lig(0).teams->len, ct->number_of_teams, cup->name); - main_exit_program(EXIT_CHOOSE_TEAM_ERROR, NULL); - } + main_exit_program(EXIT_CHOOSE_TEAM_ERROR, + "cup_load_choose_team: not enough teams in league 0 for chooseteam %s (%d; required: %d) in cup %s\n", + ct->sid, lig(0).teams->len, + ct->number_of_teams, cup->name); gint permutation[lig(0).teams->len]; math_generate_permutation(permutation, 0, lig(0).teams->len - 1); @@ -377,11 +373,10 @@ cup_load_choose_team(Cup *cup, GPtrArray *teams, const CupChooseTeam *ct) } if(number_of_teams != ct->number_of_teams) - { - g_warning("cup_load_choose_team (2): not enough teams found in league 0 for chooseteam %s (%d; required: %d) in cup %s (group %d)\n", - ct->sid, number_of_teams, ct->number_of_teams, cup->name, cup->group); - main_exit_program(EXIT_CHOOSE_TEAM_ERROR, NULL); - } + main_exit_program(EXIT_CHOOSE_TEAM_ERROR, + "cup_load_choose_team (2): not enough teams found in league 0 for chooseteam %s (%d; required: %d) in cup %s (group %d)\n", + ct->sid, number_of_teams, + ct->number_of_teams, cup->name, cup->group); } else { @@ -417,11 +412,10 @@ cup_load_choose_team(Cup *cup, GPtrArray *teams, const CupChooseTeam *ct) if(ct->number_of_teams != -1 && number_of_teams != ct->number_of_teams) - { - g_warning("cup_load_choose_team(3): not enough teams (that don't participate in international cups yet) found in chooseteam %s for cup %s (%d specified, %d found) cup group %d.\n ", - ct->sid, cup->name, ct->number_of_teams, number_of_teams, cup->group); - main_exit_program(EXIT_CHOOSE_TEAM_ERROR, NULL); - } + main_exit_program(EXIT_CHOOSE_TEAM_ERROR, + "cup_load_choose_team(3): not enough teams (that don't participate in international cups yet) found in chooseteam %s for cup %s (%d specified, %d found) cup group %d.\n ", + ct->sid, cup->name, + ct->number_of_teams, number_of_teams, cup->group); } } @@ -494,11 +488,11 @@ cup_load_choose_team_generate(Cup *cup, CupRound *cup_round, const CupChooseTeam if(teams_local->len < end_idx) { - g_warning("cup_load_choose_team_generate: not enough teams (%d) in chooseteam %s in cup %s (%d are specified) \n", - teams_local->len, ct->sid, cup->name, end_idx); - free_teams_array(&teams_local, FALSE); - main_exit_program(EXIT_CHOOSE_TEAM_ERROR, NULL); + main_exit_program(EXIT_CHOOSE_TEAM_ERROR, + "cup_load_choose_team_generate: not enough teams (%d) in chooseteam %s in cup %s (%d are specified) \n", + teams_local->len, ct->sid, + cup->name, end_idx); } for(j = 0; j < end_idx; j++) @@ -520,11 +514,11 @@ cup_load_choose_team_generate(Cup *cup, CupRound *cup_round, const CupChooseTeam if(((ct->number_of_teams != -1 && number_of_teams != ct->number_of_teams) || (ct->number_of_teams == -1 && number_of_teams != teams_local->len)) && teams_local->len > 0) - { - g_warning("cup_load_choose_team_generate: not enough teams (that don't participate in international cups yet) found in chooseteam %s for cup %s (%d specified, %d found).\n ", ct->sid, cup->name, ct->number_of_teams, number_of_teams); - main_exit_program(EXIT_CHOOSE_TEAM_ERROR, NULL); - } - + main_exit_program(EXIT_CHOOSE_TEAM_ERROR, + "cup_load_choose_team_generate: not enough teams (that don't participate in international cups yet) found in chooseteam %s for cup %s (%d specified, %d found).\n ", + ct->sid, cup->name, + ct->number_of_teams, number_of_teams); + for(j=teams_local->len - 1; j>=0;j--) if(query_team_is_in_cup(&g_array_index(teams_local, Team, j), cup)) g_array_remove_index(teams_local, j); @@ -691,11 +685,10 @@ cup_get_first_week_of_cup_round(const Cup *cup, gint cup_round) cup_get_matchdays_in_cup_round(cup, cup_round) * cup->week_gap; if(week_number <= 0) - { - g_warning("cup_get_first_week_of_cup_round: first week of cup %s cup round %d is not positive (%d).\nPlease lower the week gap or set a later last week.\n", cup->name, cup_round, week_number); - main_exit_program(EXIT_FIRST_WEEK_ERROR, NULL); - } - + main_exit_program(EXIT_FIRST_WEEK_ERROR, + "cup_get_first_week_of_cup_round: first week of cup %s cup round %d is not positive (%d).\nPlease lower the week gap or set a later last week.\n", + cup->name, cup_round, week_number); + return week_number; } @@ -859,9 +852,8 @@ cup_from_clid(gint clid) if(cp(i).id == clid) return &cp(i); - g_warning("cup_from_clid: didn't find cup with id %d\n", clid); - - main_exit_program(EXIT_POINTER_NOT_FOUND, NULL); + main_exit_program(EXIT_POINTER_NOT_FOUND, + "cup_from_clid: didn't find cup with id %d\n", clid); return NULL; } @@ -876,9 +868,8 @@ cup_from_sid(const gchar *sid) if(strcmp(cp(i).sid, sid) == 0) return &cp(i); - g_warning("cup_from_sid: didn't find cup with sid %s \n", sid); - - main_exit_program(EXIT_POINTER_NOT_FOUND, NULL); + main_exit_program(EXIT_POINTER_NOT_FOUND, + "cup_from_sid: didn't find cup with sid %s \n", sid); return NULL; } diff --git a/src/file.c b/src/file.c index e7f798c0..68e6a3ff 100644 --- a/src/file.c +++ b/src/file.c @@ -55,7 +55,6 @@ file_add_support_directory_recursive (const gchar *directo add_pixmap_directory(directory); support_directories = g_list_prepend (support_directories, g_strdup (directory)); - while(TRUE) { file = g_dir_read_name(newdir); @@ -139,7 +138,6 @@ file_my_system(const gchar *command) gboolean file_my_fopen(const gchar *filename, gchar *bits, FILE **fil, gboolean abort_program) { - gchar buf[SMALL]; gchar *support_file = file_find_support_file(filename, FALSE); *fil = fopen(filename, bits); @@ -156,9 +154,7 @@ file_my_fopen(const gchar *filename, gchar *bits, FILE **fil, gboolean abort_pro return TRUE; } - sprintf(buf, "Could not open file '%s' in mode '%s'.\n", filename, bits); - - g_warning(buf); + g_warning("Could not open file '%s' in mode '%s'.\n", filename, bits); if(abort_program) main_exit_program(EXIT_FILE_OPEN_FAILED, NULL); @@ -481,10 +477,10 @@ file_load_conf_files(void) file_load_opt_file(opt_str("string_opt_constants_file"), &constants); file_load_opt_file(opt_str("string_opt_appearance_file"), &constants_app); - file_load_opt_file("bygfoot_lg_tokens", &lg_tokens); + file_load_opt_file("bygfoot_tokens", &tokens); - for(i=0;ilen;i++) - g_array_index(lg_tokens.list, Option, i).value = i; + for(i=0;ilen;i++) + g_array_index(tokens.list, Option, i).value = i; } /** Load a user-specific conf file. diff --git a/src/fixture.c b/src/fixture.c index e8077067..963718fb 100644 --- a/src/fixture.c +++ b/src/fixture.c @@ -105,10 +105,10 @@ fixture_update(Cup *cup) if(round + 1 > cup->rounds->len - 1) { - g_warning("fixture_update: round index %d too high for round array (%d) in cup %s\n", - round + 1, cup->rounds->len - 1, cup->name); g_ptr_array_free(teams, TRUE); - main_exit_program(EXIT_CUP_ROUND_ERROR, NULL); + main_exit_program(EXIT_CUP_ROUND_ERROR, + "fixture_update: round index %d too high for round array (%d) in cup %s\n", + round + 1, cup->rounds->len - 1, cup->name); } new_round = &g_array_index(cup->rounds, CupRound, round + 1); @@ -309,10 +309,9 @@ fixture_write_cup_round_robin(Cup *cup, gint cup_round, GPtrArray *teams) TableElement new_table_element; if(teams->len < number_of_groups) - { - g_warning("fixture_write_cup_round_robin: cup %s round %d: number of teams (%d) less than number of groups (%d)\n", cup->name, cup_round, teams->len, number_of_groups); - main_exit_program(EXIT_FIXTURE_WRITE_ERROR, NULL); - } + main_exit_program(EXIT_FIXTURE_WRITE_ERROR, + "fixture_write_cup_round_robin: cup %s round %d: number of teams (%d) less than number of groups (%d)\n", + cup->name, cup_round, teams->len, number_of_groups); if(cupround->randomise_teams || opt_int("int_opt_randomise_teams")) g_ptr_array_sort_with_data(teams, (GCompareDataFunc)team_compare_func, @@ -421,11 +420,10 @@ fixture_write_round_robin(gpointer league_cup, gint cup_round, GPtrArray *teams, first_fixture = fixtures->len; if(first_week < 1) - { - g_warning("fixture_write_round_robin: first week of %s is not positive (%d).\nPlease lower the week gap or set a later last week.\n", league_cup_get_name_string(clid), first_week); - main_exit_program(EXIT_FIXTURE_WRITE_ERROR, NULL); - } - + main_exit_program(EXIT_FIXTURE_WRITE_ERROR, + "fixture_write_round_robin: first week of %s is not positive (%d).\nPlease lower the week gap or set a later last week.\n", + league_cup_get_name_string(clid), first_week); + if(len % 2 != 0) { team_temp = team_new(FALSE); @@ -1120,9 +1118,8 @@ fixture_from_id(gint id) if(g_array_index(cp(i).fixtures, Fixture, j).id == id) return &g_array_index(cp(i).fixtures, Fixture, j); - g_warning("fixture_from_id: fixture with id %d found \n", id); - - main_exit_program(EXIT_POINTER_NOT_FOUND, NULL); + main_exit_program(EXIT_POINTER_NOT_FOUND, + "fixture_from_id: fixture with id %d found \n", id); return NULL; } @@ -1272,3 +1269,69 @@ fixture_get_season_results(void) return results; } + +/** Calculate how many goals the team has to score to + win the match (also taking into account second leg stuff). */ +gint +fixture_get_goals_to_win(const Fixture *fix, const Team *tm) +{ + const Fixture *first_leg = NULL; + gint idx = (tm == fix->teams[1]), return_value = -100; + gint res[2] = {math_sum_int_array(fix->result[0], 2), + math_sum_int_array(fix->result[1], 2)}; + gint tmp; + + if(!query_fixture_team_involved(fix, tm->id)) + { + g_warning("fixture_get_goals_to_win: team %s doesn't participate in fixture given (%s)\n", + tm->name, league_cup_get_name_string(fix->clid)); + return -100; + } + + if(!fix->second_leg) + return res[!idx] - res[idx] + 1; + + first_leg = fixture_get_first_leg(fix); + + if(res[0] + first_leg->result[1][0] == + res[1] + first_leg->result[0][0]) + { + if(idx == 0) + return_value = (res[1] >= first_leg->result[1][0]) ? + 1 : 0; + else + return_value = (res[1] > first_leg->result[1][0]) ? + 0 : 1; + } + else if(res[0] + first_leg->result[1][0] > + res[1] + first_leg->result[0][0]) + { + tmp = res[1]; + while(res[0] + first_leg->result[1][0] > + res[1] + first_leg->result[0][0]) + res[1]++; + + if(idx == 0) + return_value = (res[1] >= first_leg->result[1][0]) ? + tmp - res[1] + 1 : tmp - res[1]; + else + return_value = (res[1] > first_leg->result[1][0]) ? + res[1] - tmp : res[1] - tmp + 1; + } + else + { + tmp = res[0]; + while(res[0] + first_leg->result[1][0] < + res[1] + first_leg->result[0][0]) + res[0]++; + + if(idx == 0) + return_value = (res[1] >= first_leg->result[1][0]) ? + res[0] - tmp + 1 : res[0] - tmp; + else + return_value = (res[1] > first_leg->result[1][0]) ? + tmp - res[0] : tmp - res[0] + 1; + } + + return return_value; +} diff --git a/src/fixture.h b/src/fixture.h index cebdcc02..be309a34 100644 --- a/src/fixture.h +++ b/src/fixture.h @@ -151,4 +151,7 @@ fixture_get_week_list(gint week_number, gint week_round_number); GPtrArray* fixture_get_season_results(void); +gint +fixture_get_goals_to_win(const Fixture *fix, const Team *tm); + #endif diff --git a/src/free.c b/src/free.c index 30e28ddd..21625803 100644 --- a/src/free.c +++ b/src/free.c @@ -23,6 +23,7 @@ #include "free.h" #include "lg_commentary_struct.h" +#include "strategy_struct.h" #include "transfer.h" #include "user.h" #include "variables.h" @@ -37,6 +38,7 @@ free_memory(void) free_variables(); free_names(FALSE); free_transfer_list(); + free_strategies(); free_country(FALSE); free_users(FALSE); free_live_game(&live_game_temp); @@ -500,7 +502,7 @@ free_variables(void) free_option_list(&settings, FALSE); free_option_list(&constants, FALSE); free_option_list(&constants_app, FALSE); - free_option_list(&lg_tokens, FALSE); + free_option_list(&tokens, FALSE); free_gchar_ptr(save_file); @@ -667,3 +669,38 @@ free_names(gboolean reset) if(reset) name_lists = g_array_new(FALSE, FALSE, sizeof(NameList)); } + +/** Free the array with the CPU strategies. */ +void +free_strategies(void) +{ + gint i, j; + + for(i=0;ilen;i++) + { + g_free(g_array_index(strategies, Strategy, i).sid); + g_free(g_array_index(strategies, Strategy, i).desc); + + for(j=0;jlen;j++) + { + g_free( + g_array_index( + g_array_index( + strategies, Strategy, i).prematch, StrategyPrematch, j).condition); + g_array_free( + g_array_index( + g_array_index(strategies, Strategy, i).prematch, StrategyPrematch, j).formations, + TRUE); + } + g_array_free(g_array_index(strategies, Strategy, i).prematch, TRUE); + + for(j=0;jlen;j++) + g_free( + g_array_index( + g_array_index( + strategies, Strategy, i).match_action, StrategyMatchAction, j).condition); + g_array_free(g_array_index(strategies, Strategy, i).match_action, TRUE); + } + + g_array_free(strategies, TRUE); +} diff --git a/src/free.h b/src/free.h index b5af3a8e..73427ebc 100644 --- a/src/free.h +++ b/src/free.h @@ -125,4 +125,7 @@ free_names(gboolean reset); void free_mmatches(GArray **mmatches, gboolean reset); +void +free_strategies(void); + #endif diff --git a/src/game.c b/src/game.c index bb357c1e..22f0c080 100644 --- a/src/game.c +++ b/src/game.c @@ -67,14 +67,15 @@ game_get_values(const Fixture *fix, gfloat team_values[][GAME_TEAM_VALUE_END], (1 + const_float("float_player_boost_skill_effect") * tm[i]->boost); for(j=1;j<11;j++) - { - team_values[i][GAME_TEAM_VALUE_ATTACK] += - game_get_player_contribution(player_of_idx_team(tm[i], j), GAME_TEAM_VALUE_ATTACK); - team_values[i][GAME_TEAM_VALUE_MIDFIELD] += - game_get_player_contribution(player_of_idx_team(tm[i], j), GAME_TEAM_VALUE_MIDFIELD); - team_values[i][GAME_TEAM_VALUE_DEFEND] += - game_get_player_contribution(player_of_idx_team(tm[i], j), GAME_TEAM_VALUE_DEFEND); - } + if(player_of_idx_team(tm[i], j)->cskill > 0) + { + team_values[i][GAME_TEAM_VALUE_ATTACK] += + game_get_player_contribution(player_of_idx_team(tm[i], j), GAME_TEAM_VALUE_ATTACK); + team_values[i][GAME_TEAM_VALUE_MIDFIELD] += + game_get_player_contribution(player_of_idx_team(tm[i], j), GAME_TEAM_VALUE_MIDFIELD); + team_values[i][GAME_TEAM_VALUE_DEFEND] += + game_get_player_contribution(player_of_idx_team(tm[i], j), GAME_TEAM_VALUE_DEFEND); + } for(j=GAME_TEAM_VALUE_DEFEND;jcpos - 1][type - GAME_TEAM_VALUE_DEFEND] * - (1 + (gfloat)pl->streak * const_float("float_player_streak_influence_skill")); + player_weights[pl->cpos - 1][type - GAME_TEAM_VALUE_DEFEND]; } /** Return a random attacking or defending player @@ -153,10 +153,8 @@ game_get_player(const Team *tm, gint player_type, else if(player_type == GAME_PLAYER_TYPE_PENALTY) return game_get_penalty_taker(tm, last_penalty); else - { - g_warning("game_get_player: unknown player type %d\n", player_type); - main_exit_program(EXIT_INT_NOT_FOUND, NULL); - } + main_exit_program(EXIT_INT_NOT_FOUND, + "game_get_player: unknown player type %d\n", player_type); game_get_player_probs(tm->players, probs, weights, skills); @@ -682,13 +680,6 @@ game_substitute_player(Team *tm, gint player_number) substitute = ((Player*)g_ptr_array_index(substitutes, 0))->id; - player_streak_add_to_prob( - &g_array_index(tm->players, Player, player_number), - const_float("float_player_streak_add_sub_out")); - - player_streak_add_to_prob((Player*)g_ptr_array_index(substitutes, 0), - const_float("float_player_streak_add_sub_in")); - player_swap(tm, player_number, tm, player_id_index(tm, substitute)); g_ptr_array_free(substitutes, TRUE); @@ -845,9 +836,10 @@ game_decrease_fitness(const Fixture *fix) for(i=0;i<2;i++) { - for(j=0;j<11;j++) - if(player_of_idx_team(fix->teams[i], j)->cskill > 0) - player_decrease_fitness(player_of_idx_team(fix->teams[i], j)); + if(debug < 50 || team_is_user(fix->teams[i]) == -1) + for(j=0;j<11;j++) + if(player_of_idx_team(fix->teams[i], j)->cskill > 0) + player_decrease_fitness(player_of_idx_team(fix->teams[i], j)); } } @@ -1007,13 +999,13 @@ game_post_match(Fixture *fix) table_update(fix); for(i=0;i<2;i++) - { - if(team_is_user(fix->teams[i]) == -1) - team_update_cpu_team(fix->teams[i], - (fixture_user_team_involved(fix) != -1)); - else +/* { */ +/* if(team_is_user(fix->teams[i]) == -1) */ +/* team_update_cpu_team(fix->teams[i], */ +/* (fixture_user_team_involved(fix) != -1)); */ +/* else */ team_update_post_match(fix->teams[i], fix); - } +/* } */ if(fix->clid < ID_CUP_START) return; diff --git a/src/game_gui.c b/src/game_gui.c index ee7e4789..2e0f5a84 100644 --- a/src/game_gui.c +++ b/src/game_gui.c @@ -176,6 +176,20 @@ game_gui_live_game_set_hscale(const LiveGameUnit *unit, GtkHScale *hscale) gtk_widget_modify_bg(GTK_WIDGET(hscale), GTK_STATE_NORMAL, &color); } +/** Show the player list of the opposing team in the live game + window. */ +void +game_gui_live_game_show_opponent_players(void) +{ + GtkTreeView *treeview = + GTK_TREE_VIEW(lookup_widget(window.live, "treeview_lg_opponent")); + gint idx = (team_is_user(((LiveGame*)statp)->fix->teams[0]) == -1); + const Team *tm = ((LiveGame*)statp)->fix->teams[!idx]; + gint scout = user_from_team(((LiveGame*)statp)->fix->teams[idx])->scout; + + treeview_show_player_list_team(treeview, tm, scout); +} + /** Look up the widgets in the main window. */ void game_gui_get_radio_items(GtkWidget **style, GtkWidget **scout, diff --git a/src/game_gui.h b/src/game_gui.h index 80669986..f93106f1 100644 --- a/src/game_gui.h +++ b/src/game_gui.h @@ -41,6 +41,9 @@ game_gui_live_game_show_unit(const LiveGameUnit *unit); void game_gui_live_game_set_hscale(const LiveGameUnit *unit, GtkHScale *hscale); +void +game_gui_live_game_show_opponent_players(void); + void game_gui_set_main_window_header(void); diff --git a/src/interface.c b/src/interface.c index 56cba75b..5a6dcb13 100644 --- a/src/interface.c +++ b/src/interface.c @@ -38,7 +38,7 @@ create_main_window (void) GtkWidget *menu_new; GtkWidget *menu_open; GtkWidget *menu_load_last_save; - GtkWidget *image2107; + GtkWidget *image2151; GtkWidget *menu_save; GtkWidget *menu_save_as; GtkWidget *trennlinie1; @@ -46,35 +46,35 @@ create_main_window (void) GtkWidget *menu_options; GtkWidget *menu_options_menu; GtkWidget *menu_preferences; - GtkWidget *image2108; + GtkWidget *image2152; GtkWidget *trennlinie7; GtkWidget *menu_job_offers; GtkWidget *menu_live_game; GtkWidget *menu_overwrite; GtkWidget *trennlinie14; GtkWidget *menu_save_window_geometry; - GtkWidget *image2109; + GtkWidget *image2153; GtkWidget *menu_figures; GtkWidget *menu_figures_menu; GtkWidget *menu_fixtures_week; - GtkWidget *image2110; + GtkWidget *image2154; GtkWidget *menu_fixtures; - GtkWidget *image2111; + GtkWidget *image2155; GtkWidget *menu_tables; - GtkWidget *image2112; + GtkWidget *image2156; GtkWidget *menu_my_league_results; - GtkWidget *image2113; + GtkWidget *image2157; GtkWidget *menu_season_results; - GtkWidget *image2114; + GtkWidget *image2158; GtkWidget *trennlinie13; GtkWidget *menu_league_stats; - GtkWidget *image2115; + GtkWidget *image2159; GtkWidget *menu_season_history; - GtkWidget *image2116; + GtkWidget *image2160; GtkWidget *menu_team; GtkWidget *menu_team_menu; GtkWidget *menu_playing_style; - GtkWidget *image2117; + GtkWidget *image2161; GtkWidget *menu_playing_style_menu; GSList *menu_all_out_defend_group = NULL; GtkWidget *menu_all_out_defend; @@ -83,7 +83,7 @@ create_main_window (void) GtkWidget *menu_attack; GtkWidget *menu_all_out_attack; GtkWidget *menu_scout; - GtkWidget *image2118; + GtkWidget *image2162; GtkWidget *menu_scout_menu; GSList *menu_scout_best_group = NULL; GtkWidget *menu_scout_best; @@ -91,7 +91,7 @@ create_main_window (void) GtkWidget *menu_scout_average; GtkWidget *menu_scout_bad; GtkWidget *menu_physio; - GtkWidget *image2119; + GtkWidget *image2163; GtkWidget *menu_physio_menu; GSList *menu_physio_best_group = NULL; GtkWidget *menu_physio_best; @@ -99,7 +99,7 @@ create_main_window (void) GtkWidget *menu_physio_average; GtkWidget *menu_physio_bad; GtkWidget *menu_youth_academy; - GtkWidget *image2120; + GtkWidget *image2164; GtkWidget *menu_youth_academy_menu; GtkWidget *menu_show_youth_academy; GtkWidget *youth_coach1; @@ -119,7 +119,7 @@ create_main_window (void) GtkWidget *menu_recruit4; GtkWidget *menu_set_investment; GtkWidget *menu_boost; - GtkWidget *image2121; + GtkWidget *image2165; GtkWidget *menu_boost_menu; GSList *menu_boost_on_group = NULL; GtkWidget *menu_boost_on; @@ -127,72 +127,72 @@ create_main_window (void) GtkWidget *menu_boost_anti; GtkWidget *trennlinie11; GtkWidget *menu_reset_players; - GtkWidget *image2122; + GtkWidget *image2166; GtkWidget *menu_custom_structure; - GtkWidget *image2123; + GtkWidget *image2167; GtkWidget *menu_rearrange_team; - GtkWidget *image2124; + GtkWidget *image2168; GtkWidget *trennlinie8; GtkWidget *menu_browse_teams; - GtkWidget *image2125; + GtkWidget *image2169; GtkWidget *menu_player; GtkWidget *menu_player_menu; GtkWidget *menu_show_info; - GtkWidget *image2126; + GtkWidget *image2170; GtkWidget *menu_put_on_transfer_list; - GtkWidget *image2127; + GtkWidget *image2171; GtkWidget *menu_remove_from_transfer_list; - GtkWidget *image2128; + GtkWidget *image2172; GtkWidget *menu_offer_new_contract; - GtkWidget *image2129; + GtkWidget *image2173; GtkWidget *menu_fire; - GtkWidget *image2130; + GtkWidget *image2174; GtkWidget *menu_shoots_penalties; - GtkWidget *image2131; + GtkWidget *image2175; GtkWidget *menu_move_to_youth_academy; - GtkWidget *image2132; + GtkWidget *image2176; GtkWidget *trennlinie10; GtkWidget *menu_browse_players; - GtkWidget *image2133; + GtkWidget *image2177; GtkWidget *menu_user; GtkWidget *menu_user_menu; GtkWidget *menu_user_show_last_match; - GtkWidget *image2134; + GtkWidget *image2178; GtkWidget *menu_user_show_last_stats; - GtkWidget *image2135; + GtkWidget *image2179; GtkWidget *menu_user_show_coming_matches; - GtkWidget *image2136; + GtkWidget *image2180; GtkWidget *memorable_matches; - GtkWidget *image2137; + GtkWidget *image2181; GtkWidget *memorable_matches_menu; GtkWidget *mm_add_last_match; - GtkWidget *image2138; + GtkWidget *image2182; GtkWidget *mm_manage_matches; - GtkWidget *image2139; + GtkWidget *image2183; GtkWidget *trennlinie12; GtkWidget *menu_user_show_history; - GtkWidget *image2140; + GtkWidget *image2184; GtkWidget *trennlinie9; GtkWidget *menu_next_user; - GtkWidget *image2141; + GtkWidget *image2185; GtkWidget *menu_previous_user; - GtkWidget *image2142; + GtkWidget *image2186; GtkWidget *menu_manage_users; - GtkWidget *image2143; + GtkWidget *image2187; GtkWidget *menu_finances_stadium; GtkWidget *menu_finances_stadium_menu; GtkWidget *menu_show_finances; - GtkWidget *image2144; + GtkWidget *image2188; GtkWidget *menu_show_stadium; - GtkWidget *image2145; + GtkWidget *image2189; GtkWidget *menu_help1; GtkWidget *menu_help1_menu; GtkWidget *menu_about; - GtkWidget *image2146; + GtkWidget *image2190; GtkWidget *menu_contributors; - GtkWidget *image2147; + GtkWidget *image2191; GtkWidget *menu_help; - GtkWidget *image2148; + GtkWidget *image2192; GtkWidget *hbox1; GtkWidget *button_load; GtkWidget *image11; @@ -313,9 +313,9 @@ create_main_window (void) GDK_l, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_ACCEL_VISIBLE); - image2107 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2107); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_load_last_save), image2107); + image2151 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2151); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_load_last_save), image2151); menu_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group); gtk_widget_show (menu_save); @@ -348,9 +348,9 @@ create_main_window (void) GDK_p, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image2108 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2108); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_preferences), image2108); + image2152 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2152); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_preferences), image2152); trennlinie7 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie7); @@ -381,9 +381,9 @@ create_main_window (void) gtk_container_add (GTK_CONTAINER (menu_options_menu), menu_save_window_geometry); gtk_tooltips_set_tip (tooltips, menu_save_window_geometry, _("Save window size, position and vertical divider"), NULL); - image2109 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2109); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_window_geometry), image2109); + image2153 = create_pixmap (main_window, "menu_save_geometry.png"); + gtk_widget_show (image2153); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_window_geometry), image2153); menu_figures = gtk_menu_item_new_with_mnemonic (_("F_igures")); gtk_widget_show (menu_figures); @@ -399,9 +399,9 @@ create_main_window (void) GDK_F3, 0, GTK_ACCEL_VISIBLE); - image2110 = create_pixmap (main_window, "menu_fixtures.png"); - gtk_widget_show (image2110); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures_week), image2110); + image2154 = create_pixmap (main_window, "menu_fixtures.png"); + gtk_widget_show (image2154); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures_week), image2154); menu_fixtures = gtk_image_menu_item_new_with_mnemonic (_("Fixtures (competitions)")); gtk_widget_show (menu_fixtures); @@ -410,9 +410,9 @@ create_main_window (void) GDK_F4, 0, GTK_ACCEL_VISIBLE); - image2111 = create_pixmap (main_window, "menu_fixtures_comp.png"); - gtk_widget_show (image2111); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures), image2111); + image2155 = create_pixmap (main_window, "menu_fixtures_comp.png"); + gtk_widget_show (image2155); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures), image2155); menu_tables = gtk_image_menu_item_new_with_mnemonic (_("Tables")); gtk_widget_show (menu_tables); @@ -421,9 +421,9 @@ create_main_window (void) GDK_F5, 0, GTK_ACCEL_VISIBLE); - image2112 = create_pixmap (main_window, "menu_table.png"); - gtk_widget_show (image2112); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_tables), image2112); + image2156 = create_pixmap (main_window, "menu_table.png"); + gtk_widget_show (image2156); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_tables), image2156); menu_my_league_results = gtk_image_menu_item_new_with_mnemonic (_("My league results")); gtk_widget_show (menu_my_league_results); @@ -432,9 +432,9 @@ create_main_window (void) GDK_F6, 0, GTK_ACCEL_VISIBLE); - image2113 = create_pixmap (main_window, "menu_league_results.png"); - gtk_widget_show (image2113); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_my_league_results), image2113); + image2157 = create_pixmap (main_window, "menu_league_results.png"); + gtk_widget_show (image2157); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_my_league_results), image2157); menu_season_results = gtk_image_menu_item_new_with_mnemonic (_("Season results")); gtk_widget_show (menu_season_results); @@ -443,9 +443,9 @@ create_main_window (void) GDK_s, GDK_SHIFT_MASK, GTK_ACCEL_VISIBLE); - image2114 = create_pixmap (main_window, "menu_season_res.png"); - gtk_widget_show (image2114); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_season_results), image2114); + image2158 = create_pixmap (main_window, "menu_season_res.png"); + gtk_widget_show (image2158); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_season_results), image2158); trennlinie13 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie13); @@ -459,9 +459,9 @@ create_main_window (void) GDK_s, 0, GTK_ACCEL_VISIBLE); - image2115 = create_pixmap (main_window, "menu_league_stats.png"); - gtk_widget_show (image2115); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_league_stats), image2115); + image2159 = create_pixmap (main_window, "menu_league_stats.png"); + gtk_widget_show (image2159); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_league_stats), image2159); menu_season_history = gtk_image_menu_item_new_with_mnemonic (_("Season history")); gtk_widget_show (menu_season_history); @@ -470,9 +470,9 @@ create_main_window (void) GDK_h, 0, GTK_ACCEL_VISIBLE); - image2116 = create_pixmap (main_window, "menu_history.png"); - gtk_widget_show (image2116); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_season_history), image2116); + image2160 = create_pixmap (main_window, "menu_history.png"); + gtk_widget_show (image2160); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_season_history), image2160); menu_team = gtk_menu_item_new_with_mnemonic (_("_Team")); gtk_widget_show (menu_team); @@ -485,9 +485,9 @@ create_main_window (void) gtk_widget_show (menu_playing_style); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_playing_style); - image2117 = create_pixmap (main_window, "menu_style.png"); - gtk_widget_show (image2117); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_playing_style), image2117); + image2161 = create_pixmap (main_window, "menu_style.png"); + gtk_widget_show (image2161); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_playing_style), image2161); menu_playing_style_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_playing_style), menu_playing_style_menu); @@ -496,21 +496,25 @@ create_main_window (void) menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_all_out_defend)); gtk_widget_show (menu_all_out_defend); gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_all_out_defend); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_all_out_defend), TRUE); menu_defend = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("Defend")); menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_defend)); gtk_widget_show (menu_defend); gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_defend); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_defend), TRUE); menu_balanced = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("Balanced")); menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_balanced)); gtk_widget_show (menu_balanced); gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_balanced); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_balanced), TRUE); menu_attack = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("Attack")); menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_attack)); gtk_widget_show (menu_attack); gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_attack); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_attack), TRUE); menu_all_out_attack = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("All Out Attack")); menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_all_out_attack)); @@ -522,9 +526,9 @@ create_main_window (void) gtk_widget_show (menu_scout); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_scout); - image2118 = create_pixmap (main_window, "menu_scout.png"); - gtk_widget_show (image2118); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_scout), image2118); + image2162 = create_pixmap (main_window, "menu_scout.png"); + gtk_widget_show (image2162); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_scout), image2162); menu_scout_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_scout), menu_scout_menu); @@ -533,16 +537,19 @@ create_main_window (void) menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_best)); gtk_widget_show (menu_scout_best); gtk_container_add (GTK_CONTAINER (menu_scout_menu), menu_scout_best); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_scout_best), TRUE); menu_scout_good = gtk_radio_menu_item_new_with_mnemonic (menu_scout_best_group, _("Good")); menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_good)); gtk_widget_show (menu_scout_good); gtk_container_add (GTK_CONTAINER (menu_scout_menu), menu_scout_good); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_scout_good), TRUE); menu_scout_average = gtk_radio_menu_item_new_with_mnemonic (menu_scout_best_group, _("Average")); menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_average)); gtk_widget_show (menu_scout_average); gtk_container_add (GTK_CONTAINER (menu_scout_menu), menu_scout_average); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_scout_average), TRUE); menu_scout_bad = gtk_radio_menu_item_new_with_mnemonic (menu_scout_best_group, _("Bad")); menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_bad)); @@ -554,9 +561,9 @@ create_main_window (void) gtk_widget_show (menu_physio); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_physio); - image2119 = create_pixmap (main_window, "menu_physio.png"); - gtk_widget_show (image2119); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_physio), image2119); + image2163 = create_pixmap (main_window, "menu_physio.png"); + gtk_widget_show (image2163); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_physio), image2163); menu_physio_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_physio), menu_physio_menu); @@ -565,16 +572,19 @@ create_main_window (void) menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_best)); gtk_widget_show (menu_physio_best); gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_best); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_physio_best), TRUE); menu_physio_good = gtk_radio_menu_item_new_with_mnemonic (menu_physio_best_group, _("Good")); menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_good)); gtk_widget_show (menu_physio_good); gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_good); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_physio_good), TRUE); menu_physio_average = gtk_radio_menu_item_new_with_mnemonic (menu_physio_best_group, _("Average")); menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_average)); gtk_widget_show (menu_physio_average); gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_average); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_physio_average), TRUE); menu_physio_bad = gtk_radio_menu_item_new_with_mnemonic (menu_physio_best_group, _("Bad")); menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_bad)); @@ -586,9 +596,9 @@ create_main_window (void) gtk_widget_show (menu_youth_academy); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_youth_academy); - image2120 = create_pixmap (main_window, "menu_youth_academy.png"); - gtk_widget_show (image2120); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_youth_academy), image2120); + image2164 = create_pixmap (main_window, "menu_youth_academy.png"); + gtk_widget_show (image2164); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_youth_academy), image2164); menu_youth_academy_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_youth_academy), menu_youth_academy_menu); @@ -611,16 +621,19 @@ create_main_window (void) menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_best)); gtk_widget_show (menu_yc_best); gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_best); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_best), TRUE); menu_yc_good = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Good")); menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_good)); gtk_widget_show (menu_yc_good); gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_good); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_good), TRUE); menu_yc_average = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Average")); menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_average)); gtk_widget_show (menu_yc_average); gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_average); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_average), TRUE); menu_yc_bad = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Bad")); menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_bad)); @@ -639,21 +652,25 @@ create_main_window (void) menu_recruit0_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_recruit0)); gtk_widget_show (menu_recruit0); gtk_container_add (GTK_CONTAINER (recruiting_preference1_menu), menu_recruit0); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_recruit0), TRUE); menu_recruit1 = gtk_radio_menu_item_new_with_mnemonic (menu_recruit0_group, _("Defenders")); menu_recruit0_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_recruit1)); gtk_widget_show (menu_recruit1); gtk_container_add (GTK_CONTAINER (recruiting_preference1_menu), menu_recruit1); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_recruit1), TRUE); menu_recruit2 = gtk_radio_menu_item_new_with_mnemonic (menu_recruit0_group, _("Midfielders")); menu_recruit0_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_recruit2)); gtk_widget_show (menu_recruit2); gtk_container_add (GTK_CONTAINER (recruiting_preference1_menu), menu_recruit2); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_recruit2), TRUE); menu_recruit3 = gtk_radio_menu_item_new_with_mnemonic (menu_recruit0_group, _("Forwards")); menu_recruit0_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_recruit3)); gtk_widget_show (menu_recruit3); gtk_container_add (GTK_CONTAINER (recruiting_preference1_menu), menu_recruit3); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_recruit3), TRUE); menu_recruit4 = gtk_radio_menu_item_new_with_mnemonic (menu_recruit0_group, _("Any")); menu_recruit0_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_recruit4)); @@ -670,9 +687,9 @@ create_main_window (void) gtk_widget_show (menu_boost); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_boost); - image2121 = create_pixmap (main_window, "menu_boost.png"); - gtk_widget_show (image2121); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_boost), image2121); + image2165 = create_pixmap (main_window, "menu_boost.png"); + gtk_widget_show (image2165); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_boost), image2165); menu_boost_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_boost), menu_boost_menu); @@ -681,11 +698,13 @@ create_main_window (void) menu_boost_on_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_boost_on)); gtk_widget_show (menu_boost_on); gtk_container_add (GTK_CONTAINER (menu_boost_menu), menu_boost_on); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_boost_on), TRUE); menu_boost_off = gtk_radio_menu_item_new_with_mnemonic (menu_boost_on_group, _("Off")); menu_boost_on_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_boost_off)); gtk_widget_show (menu_boost_off); gtk_container_add (GTK_CONTAINER (menu_boost_menu), menu_boost_off); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_boost_off), TRUE); menu_boost_anti = gtk_radio_menu_item_new_with_mnemonic (menu_boost_on_group, _("Anti")); menu_boost_on_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_boost_anti)); @@ -702,17 +721,17 @@ create_main_window (void) gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_reset_players); gtk_tooltips_set_tip (tooltips, menu_reset_players, _("Reset player list to the formation at the beginning of the live game pause (right click on player list)"), NULL); - image2122 = gtk_image_new_from_stock ("gtk-undo", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2122); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reset_players), image2122); + image2166 = gtk_image_new_from_stock ("gtk-undo", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2166); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reset_players), image2166); menu_custom_structure = gtk_image_menu_item_new_with_mnemonic (_("Enter custom structure")); gtk_widget_show (menu_custom_structure); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_custom_structure); - image2123 = create_pixmap (main_window, "menu_structure.png"); - gtk_widget_show (image2123); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_custom_structure), image2123); + image2167 = create_pixmap (main_window, "menu_structure.png"); + gtk_widget_show (image2167); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_custom_structure), image2167); menu_rearrange_team = gtk_image_menu_item_new_with_mnemonic (_("Rearrange team")); gtk_widget_show (menu_rearrange_team); @@ -722,9 +741,9 @@ create_main_window (void) GDK_r, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image2124 = create_pixmap (main_window, "menu_rearrange.png"); - gtk_widget_show (image2124); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_rearrange_team), image2124); + image2168 = create_pixmap (main_window, "menu_rearrange.png"); + gtk_widget_show (image2168); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_rearrange_team), image2168); trennlinie8 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie8); @@ -735,9 +754,9 @@ create_main_window (void) gtk_widget_show (menu_browse_teams); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_browse_teams); - image2125 = create_pixmap (main_window, "menu_browse_tms.png"); - gtk_widget_show (image2125); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_teams), image2125); + image2169 = create_pixmap (main_window, "menu_browse_tms.png"); + gtk_widget_show (image2169); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_teams), image2169); menu_player = gtk_menu_item_new_with_mnemonic (_("_Player")); gtk_widget_show (menu_player); @@ -750,57 +769,57 @@ create_main_window (void) gtk_widget_show (menu_show_info); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_show_info); - image2126 = create_pixmap (main_window, "menu_player_info.png"); - gtk_widget_show (image2126); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_info), image2126); + image2170 = create_pixmap (main_window, "menu_player_info.png"); + gtk_widget_show (image2170); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_info), image2170); menu_put_on_transfer_list = gtk_image_menu_item_new_with_mnemonic (_("Put on transfer list")); gtk_widget_show (menu_put_on_transfer_list); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_put_on_transfer_list); - image2127 = create_pixmap (main_window, "menu_player_put_transfer.png"); - gtk_widget_show (image2127); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_put_on_transfer_list), image2127); + image2171 = create_pixmap (main_window, "menu_player_put_transfer.png"); + gtk_widget_show (image2171); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_put_on_transfer_list), image2171); menu_remove_from_transfer_list = gtk_image_menu_item_new_with_mnemonic (_("Remove from transfer list")); gtk_widget_show (menu_remove_from_transfer_list); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_remove_from_transfer_list); - image2128 = create_pixmap (main_window, "menu_player_remove_transfer.png"); - gtk_widget_show (image2128); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_remove_from_transfer_list), image2128); + image2172 = create_pixmap (main_window, "menu_player_remove_transfer.png"); + gtk_widget_show (image2172); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_remove_from_transfer_list), image2172); menu_offer_new_contract = gtk_image_menu_item_new_with_mnemonic (_("Offer new contract")); gtk_widget_show (menu_offer_new_contract); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_offer_new_contract); - image2129 = create_pixmap (main_window, "menu_player_contract.png"); - gtk_widget_show (image2129); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_offer_new_contract), image2129); + image2173 = create_pixmap (main_window, "menu_player_contract.png"); + gtk_widget_show (image2173); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_offer_new_contract), image2173); menu_fire = gtk_image_menu_item_new_with_mnemonic (_("Fire")); gtk_widget_show (menu_fire); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_fire); - image2130 = create_pixmap (main_window, "menu_player_fire.png"); - gtk_widget_show (image2130); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fire), image2130); + image2174 = create_pixmap (main_window, "menu_player_fire.png"); + gtk_widget_show (image2174); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fire), image2174); menu_shoots_penalties = gtk_image_menu_item_new_with_mnemonic (_("Shoots penalties")); gtk_widget_show (menu_shoots_penalties); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_shoots_penalties); - image2131 = create_pixmap (main_window, "menu_player_shoots.png"); - gtk_widget_show (image2131); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_shoots_penalties), image2131); + image2175 = create_pixmap (main_window, "menu_player_shoots.png"); + gtk_widget_show (image2175); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_shoots_penalties), image2175); menu_move_to_youth_academy = gtk_image_menu_item_new_with_mnemonic (_("Move to youth academy")); gtk_widget_show (menu_move_to_youth_academy); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_move_to_youth_academy); - image2132 = create_pixmap (main_window, "menu_player_move_to_ya.png"); - gtk_widget_show (image2132); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_move_to_youth_academy), image2132); + image2176 = create_pixmap (main_window, "menu_player_move_to_ya.png"); + gtk_widget_show (image2176); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_move_to_youth_academy), image2176); trennlinie10 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie10); @@ -811,9 +830,9 @@ create_main_window (void) gtk_widget_show (menu_browse_players); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_browse_players); - image2133 = create_pixmap (main_window, "menu_player_browse.png"); - gtk_widget_show (image2133); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_players), image2133); + image2177 = create_pixmap (main_window, "menu_player_browse.png"); + gtk_widget_show (image2177); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_players), image2177); menu_user = gtk_menu_item_new_with_mnemonic (_("_User")); gtk_widget_show (menu_user); @@ -829,9 +848,9 @@ create_main_window (void) GDK_v, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image2134 = create_pixmap (main_window, "menu_last_match.png"); - gtk_widget_show (image2134); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_match), image2134); + image2178 = create_pixmap (main_window, "menu_last_match.png"); + gtk_widget_show (image2178); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_match), image2178); menu_user_show_last_stats = gtk_image_menu_item_new_with_mnemonic (_("Show last match stats")); gtk_widget_show (menu_user_show_last_stats); @@ -840,9 +859,9 @@ create_main_window (void) GDK_F2, 0, GTK_ACCEL_VISIBLE); - image2135 = create_pixmap (main_window, "menu_match_stats.png"); - gtk_widget_show (image2135); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_stats), image2135); + image2179 = create_pixmap (main_window, "menu_match_stats.png"); + gtk_widget_show (image2179); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_stats), image2179); menu_user_show_coming_matches = gtk_image_menu_item_new_with_mnemonic (_("Show coming matches")); gtk_widget_show (menu_user_show_coming_matches); @@ -851,17 +870,17 @@ create_main_window (void) GDK_F1, 0, GTK_ACCEL_VISIBLE); - image2136 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2136); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_coming_matches), image2136); + image2180 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2180); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_coming_matches), image2180); memorable_matches = gtk_image_menu_item_new_with_mnemonic (_("Memorable matches")); gtk_widget_show (memorable_matches); gtk_container_add (GTK_CONTAINER (menu_user_menu), memorable_matches); - image2137 = create_pixmap (main_window, "menu_mmatches.png"); - gtk_widget_show (image2137); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (memorable_matches), image2137); + image2181 = create_pixmap (main_window, "menu_mmatches.png"); + gtk_widget_show (image2181); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (memorable_matches), image2181); memorable_matches_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (memorable_matches), memorable_matches_menu); @@ -874,9 +893,9 @@ create_main_window (void) GDK_a, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image2138 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2138); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mm_add_last_match), image2138); + image2182 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2182); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mm_add_last_match), image2182); mm_manage_matches = gtk_image_menu_item_new_with_mnemonic (_("Manage matches")); gtk_widget_show (mm_manage_matches); @@ -886,9 +905,9 @@ create_main_window (void) GDK_m, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image2139 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2139); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mm_manage_matches), image2139); + image2183 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2183); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mm_manage_matches), image2183); trennlinie12 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie12); @@ -902,9 +921,9 @@ create_main_window (void) GDK_h, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image2140 = create_pixmap (main_window, "menu_history.png"); - gtk_widget_show (image2140); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_history), image2140); + image2184 = create_pixmap (main_window, "menu_history.png"); + gtk_widget_show (image2184); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_history), image2184); trennlinie9 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie9); @@ -918,9 +937,9 @@ create_main_window (void) GDK_F9, 0, GTK_ACCEL_VISIBLE); - image2141 = gtk_image_new_from_stock ("gtk-media-forward", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2141); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_next_user), image2141); + image2185 = gtk_image_new_from_stock ("gtk-media-forward", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2185); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_next_user), image2185); menu_previous_user = gtk_image_menu_item_new_with_mnemonic (_("Previous user")); gtk_widget_show (menu_previous_user); @@ -929,9 +948,9 @@ create_main_window (void) GDK_F8, 0, GTK_ACCEL_VISIBLE); - image2142 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2142); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_previous_user), image2142); + image2186 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2186); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_previous_user), image2186); menu_manage_users = gtk_image_menu_item_new_with_mnemonic (_("Manage users")); gtk_widget_show (menu_manage_users); @@ -940,9 +959,9 @@ create_main_window (void) GDK_F12, 0, GTK_ACCEL_VISIBLE); - image2143 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2143); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_manage_users), image2143); + image2187 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2187); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_manage_users), image2187); menu_finances_stadium = gtk_menu_item_new_with_mnemonic (_("Fin_Stad")); gtk_widget_show (menu_finances_stadium); @@ -958,9 +977,9 @@ create_main_window (void) GDK_f, 0, GTK_ACCEL_VISIBLE); - image2144 = create_pixmap (main_window, "menu_finances.png"); - gtk_widget_show (image2144); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_finances), image2144); + image2188 = create_pixmap (main_window, "menu_finances.png"); + gtk_widget_show (image2188); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_finances), image2188); menu_show_stadium = gtk_image_menu_item_new_with_mnemonic (_("Show stadium")); gtk_widget_show (menu_show_stadium); @@ -969,9 +988,9 @@ create_main_window (void) GDK_f, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image2145 = create_pixmap (main_window, "menu_stadium.png"); - gtk_widget_show (image2145); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_stadium), image2145); + image2189 = create_pixmap (main_window, "menu_stadium.png"); + gtk_widget_show (image2189); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_stadium), image2189); menu_help1 = gtk_menu_item_new_with_mnemonic (_("_Help")); gtk_widget_show (menu_help1); @@ -984,25 +1003,25 @@ create_main_window (void) gtk_widget_show (menu_about); gtk_container_add (GTK_CONTAINER (menu_help1_menu), menu_about); - image2146 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2146); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_about), image2146); + image2190 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2190); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_about), image2190); menu_contributors = gtk_image_menu_item_new_with_mnemonic (_("Contributors")); gtk_widget_show (menu_contributors); gtk_container_add (GTK_CONTAINER (menu_help1_menu), menu_contributors); - image2147 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2147); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_contributors), image2147); + image2191 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2191); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_contributors), image2191); menu_help = gtk_image_menu_item_new_with_mnemonic (_("Help")); gtk_widget_show (menu_help); gtk_container_add (GTK_CONTAINER (menu_help1_menu), menu_help); - image2148 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2148); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_help), image2148); + image2192 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2192); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_help), image2192); hbox1 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox1); @@ -1646,7 +1665,7 @@ create_main_window (void) GLADE_HOOKUP_OBJECT (main_window, menu_new, "menu_new"); GLADE_HOOKUP_OBJECT (main_window, menu_open, "menu_open"); GLADE_HOOKUP_OBJECT (main_window, menu_load_last_save, "menu_load_last_save"); - GLADE_HOOKUP_OBJECT (main_window, image2107, "image2107"); + GLADE_HOOKUP_OBJECT (main_window, image2151, "image2151"); GLADE_HOOKUP_OBJECT (main_window, menu_save, "menu_save"); GLADE_HOOKUP_OBJECT (main_window, menu_save_as, "menu_save_as"); GLADE_HOOKUP_OBJECT (main_window, trennlinie1, "trennlinie1"); @@ -1654,35 +1673,35 @@ create_main_window (void) GLADE_HOOKUP_OBJECT (main_window, menu_options, "menu_options"); GLADE_HOOKUP_OBJECT (main_window, menu_options_menu, "menu_options_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_preferences, "menu_preferences"); - GLADE_HOOKUP_OBJECT (main_window, image2108, "image2108"); + GLADE_HOOKUP_OBJECT (main_window, image2152, "image2152"); GLADE_HOOKUP_OBJECT (main_window, trennlinie7, "trennlinie7"); GLADE_HOOKUP_OBJECT (main_window, menu_job_offers, "menu_job_offers"); GLADE_HOOKUP_OBJECT (main_window, menu_live_game, "menu_live_game"); GLADE_HOOKUP_OBJECT (main_window, menu_overwrite, "menu_overwrite"); GLADE_HOOKUP_OBJECT (main_window, trennlinie14, "trennlinie14"); GLADE_HOOKUP_OBJECT (main_window, menu_save_window_geometry, "menu_save_window_geometry"); - GLADE_HOOKUP_OBJECT (main_window, image2109, "image2109"); + GLADE_HOOKUP_OBJECT (main_window, image2153, "image2153"); GLADE_HOOKUP_OBJECT (main_window, menu_figures, "menu_figures"); GLADE_HOOKUP_OBJECT (main_window, menu_figures_menu, "menu_figures_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_fixtures_week, "menu_fixtures_week"); - GLADE_HOOKUP_OBJECT (main_window, image2110, "image2110"); + GLADE_HOOKUP_OBJECT (main_window, image2154, "image2154"); GLADE_HOOKUP_OBJECT (main_window, menu_fixtures, "menu_fixtures"); - GLADE_HOOKUP_OBJECT (main_window, image2111, "image2111"); + GLADE_HOOKUP_OBJECT (main_window, image2155, "image2155"); GLADE_HOOKUP_OBJECT (main_window, menu_tables, "menu_tables"); - GLADE_HOOKUP_OBJECT (main_window, image2112, "image2112"); + GLADE_HOOKUP_OBJECT (main_window, image2156, "image2156"); GLADE_HOOKUP_OBJECT (main_window, menu_my_league_results, "menu_my_league_results"); - GLADE_HOOKUP_OBJECT (main_window, image2113, "image2113"); + GLADE_HOOKUP_OBJECT (main_window, image2157, "image2157"); GLADE_HOOKUP_OBJECT (main_window, menu_season_results, "menu_season_results"); - GLADE_HOOKUP_OBJECT (main_window, image2114, "image2114"); + GLADE_HOOKUP_OBJECT (main_window, image2158, "image2158"); GLADE_HOOKUP_OBJECT (main_window, trennlinie13, "trennlinie13"); GLADE_HOOKUP_OBJECT (main_window, menu_league_stats, "menu_league_stats"); - GLADE_HOOKUP_OBJECT (main_window, image2115, "image2115"); + GLADE_HOOKUP_OBJECT (main_window, image2159, "image2159"); GLADE_HOOKUP_OBJECT (main_window, menu_season_history, "menu_season_history"); - GLADE_HOOKUP_OBJECT (main_window, image2116, "image2116"); + GLADE_HOOKUP_OBJECT (main_window, image2160, "image2160"); GLADE_HOOKUP_OBJECT (main_window, menu_team, "menu_team"); GLADE_HOOKUP_OBJECT (main_window, menu_team_menu, "menu_team_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_playing_style, "menu_playing_style"); - GLADE_HOOKUP_OBJECT (main_window, image2117, "image2117"); + GLADE_HOOKUP_OBJECT (main_window, image2161, "image2161"); GLADE_HOOKUP_OBJECT (main_window, menu_playing_style_menu, "menu_playing_style_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_all_out_defend, "menu_all_out_defend"); GLADE_HOOKUP_OBJECT (main_window, menu_defend, "menu_defend"); @@ -1690,21 +1709,21 @@ create_main_window (void) GLADE_HOOKUP_OBJECT (main_window, menu_attack, "menu_attack"); GLADE_HOOKUP_OBJECT (main_window, menu_all_out_attack, "menu_all_out_attack"); GLADE_HOOKUP_OBJECT (main_window, menu_scout, "menu_scout"); - GLADE_HOOKUP_OBJECT (main_window, image2118, "image2118"); + GLADE_HOOKUP_OBJECT (main_window, image2162, "image2162"); GLADE_HOOKUP_OBJECT (main_window, menu_scout_menu, "menu_scout_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_scout_best, "menu_scout_best"); GLADE_HOOKUP_OBJECT (main_window, menu_scout_good, "menu_scout_good"); GLADE_HOOKUP_OBJECT (main_window, menu_scout_average, "menu_scout_average"); GLADE_HOOKUP_OBJECT (main_window, menu_scout_bad, "menu_scout_bad"); GLADE_HOOKUP_OBJECT (main_window, menu_physio, "menu_physio"); - GLADE_HOOKUP_OBJECT (main_window, image2119, "image2119"); + GLADE_HOOKUP_OBJECT (main_window, image2163, "image2163"); GLADE_HOOKUP_OBJECT (main_window, menu_physio_menu, "menu_physio_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_physio_best, "menu_physio_best"); GLADE_HOOKUP_OBJECT (main_window, menu_physio_good, "menu_physio_good"); GLADE_HOOKUP_OBJECT (main_window, menu_physio_average, "menu_physio_average"); GLADE_HOOKUP_OBJECT (main_window, menu_physio_bad, "menu_physio_bad"); GLADE_HOOKUP_OBJECT (main_window, menu_youth_academy, "menu_youth_academy"); - GLADE_HOOKUP_OBJECT (main_window, image2120, "image2120"); + GLADE_HOOKUP_OBJECT (main_window, image2164, "image2164"); GLADE_HOOKUP_OBJECT (main_window, menu_youth_academy_menu, "menu_youth_academy_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_show_youth_academy, "menu_show_youth_academy"); GLADE_HOOKUP_OBJECT (main_window, youth_coach1, "youth_coach1"); @@ -1722,79 +1741,79 @@ create_main_window (void) GLADE_HOOKUP_OBJECT (main_window, menu_recruit4, "menu_recruit4"); GLADE_HOOKUP_OBJECT (main_window, menu_set_investment, "menu_set_investment"); GLADE_HOOKUP_OBJECT (main_window, menu_boost, "menu_boost"); - GLADE_HOOKUP_OBJECT (main_window, image2121, "image2121"); + GLADE_HOOKUP_OBJECT (main_window, image2165, "image2165"); GLADE_HOOKUP_OBJECT (main_window, menu_boost_menu, "menu_boost_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_boost_on, "menu_boost_on"); GLADE_HOOKUP_OBJECT (main_window, menu_boost_off, "menu_boost_off"); GLADE_HOOKUP_OBJECT (main_window, menu_boost_anti, "menu_boost_anti"); GLADE_HOOKUP_OBJECT (main_window, trennlinie11, "trennlinie11"); GLADE_HOOKUP_OBJECT (main_window, menu_reset_players, "menu_reset_players"); - GLADE_HOOKUP_OBJECT (main_window, image2122, "image2122"); + GLADE_HOOKUP_OBJECT (main_window, image2166, "image2166"); GLADE_HOOKUP_OBJECT (main_window, menu_custom_structure, "menu_custom_structure"); - GLADE_HOOKUP_OBJECT (main_window, image2123, "image2123"); + GLADE_HOOKUP_OBJECT (main_window, image2167, "image2167"); GLADE_HOOKUP_OBJECT (main_window, menu_rearrange_team, "menu_rearrange_team"); - GLADE_HOOKUP_OBJECT (main_window, image2124, "image2124"); + GLADE_HOOKUP_OBJECT (main_window, image2168, "image2168"); GLADE_HOOKUP_OBJECT (main_window, trennlinie8, "trennlinie8"); GLADE_HOOKUP_OBJECT (main_window, menu_browse_teams, "menu_browse_teams"); - GLADE_HOOKUP_OBJECT (main_window, image2125, "image2125"); + GLADE_HOOKUP_OBJECT (main_window, image2169, "image2169"); GLADE_HOOKUP_OBJECT (main_window, menu_player, "menu_player"); GLADE_HOOKUP_OBJECT (main_window, menu_player_menu, "menu_player_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_show_info, "menu_show_info"); - GLADE_HOOKUP_OBJECT (main_window, image2126, "image2126"); + GLADE_HOOKUP_OBJECT (main_window, image2170, "image2170"); GLADE_HOOKUP_OBJECT (main_window, menu_put_on_transfer_list, "menu_put_on_transfer_list"); - GLADE_HOOKUP_OBJECT (main_window, image2127, "image2127"); + GLADE_HOOKUP_OBJECT (main_window, image2171, "image2171"); GLADE_HOOKUP_OBJECT (main_window, menu_remove_from_transfer_list, "menu_remove_from_transfer_list"); - GLADE_HOOKUP_OBJECT (main_window, image2128, "image2128"); + GLADE_HOOKUP_OBJECT (main_window, image2172, "image2172"); GLADE_HOOKUP_OBJECT (main_window, menu_offer_new_contract, "menu_offer_new_contract"); - GLADE_HOOKUP_OBJECT (main_window, image2129, "image2129"); + GLADE_HOOKUP_OBJECT (main_window, image2173, "image2173"); GLADE_HOOKUP_OBJECT (main_window, menu_fire, "menu_fire"); - GLADE_HOOKUP_OBJECT (main_window, image2130, "image2130"); + GLADE_HOOKUP_OBJECT (main_window, image2174, "image2174"); GLADE_HOOKUP_OBJECT (main_window, menu_shoots_penalties, "menu_shoots_penalties"); - GLADE_HOOKUP_OBJECT (main_window, image2131, "image2131"); + GLADE_HOOKUP_OBJECT (main_window, image2175, "image2175"); GLADE_HOOKUP_OBJECT (main_window, menu_move_to_youth_academy, "menu_move_to_youth_academy"); - GLADE_HOOKUP_OBJECT (main_window, image2132, "image2132"); + GLADE_HOOKUP_OBJECT (main_window, image2176, "image2176"); GLADE_HOOKUP_OBJECT (main_window, trennlinie10, "trennlinie10"); GLADE_HOOKUP_OBJECT (main_window, menu_browse_players, "menu_browse_players"); - GLADE_HOOKUP_OBJECT (main_window, image2133, "image2133"); + GLADE_HOOKUP_OBJECT (main_window, image2177, "image2177"); GLADE_HOOKUP_OBJECT (main_window, menu_user, "menu_user"); GLADE_HOOKUP_OBJECT (main_window, menu_user_menu, "menu_user_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_user_show_last_match, "menu_user_show_last_match"); - GLADE_HOOKUP_OBJECT (main_window, image2134, "image2134"); + GLADE_HOOKUP_OBJECT (main_window, image2178, "image2178"); GLADE_HOOKUP_OBJECT (main_window, menu_user_show_last_stats, "menu_user_show_last_stats"); - GLADE_HOOKUP_OBJECT (main_window, image2135, "image2135"); + GLADE_HOOKUP_OBJECT (main_window, image2179, "image2179"); GLADE_HOOKUP_OBJECT (main_window, menu_user_show_coming_matches, "menu_user_show_coming_matches"); - GLADE_HOOKUP_OBJECT (main_window, image2136, "image2136"); + GLADE_HOOKUP_OBJECT (main_window, image2180, "image2180"); GLADE_HOOKUP_OBJECT (main_window, memorable_matches, "memorable_matches"); - GLADE_HOOKUP_OBJECT (main_window, image2137, "image2137"); + GLADE_HOOKUP_OBJECT (main_window, image2181, "image2181"); GLADE_HOOKUP_OBJECT (main_window, memorable_matches_menu, "memorable_matches_menu"); GLADE_HOOKUP_OBJECT (main_window, mm_add_last_match, "mm_add_last_match"); - GLADE_HOOKUP_OBJECT (main_window, image2138, "image2138"); + GLADE_HOOKUP_OBJECT (main_window, image2182, "image2182"); GLADE_HOOKUP_OBJECT (main_window, mm_manage_matches, "mm_manage_matches"); - GLADE_HOOKUP_OBJECT (main_window, image2139, "image2139"); + GLADE_HOOKUP_OBJECT (main_window, image2183, "image2183"); GLADE_HOOKUP_OBJECT (main_window, trennlinie12, "trennlinie12"); GLADE_HOOKUP_OBJECT (main_window, menu_user_show_history, "menu_user_show_history"); - GLADE_HOOKUP_OBJECT (main_window, image2140, "image2140"); + GLADE_HOOKUP_OBJECT (main_window, image2184, "image2184"); GLADE_HOOKUP_OBJECT (main_window, trennlinie9, "trennlinie9"); GLADE_HOOKUP_OBJECT (main_window, menu_next_user, "menu_next_user"); - GLADE_HOOKUP_OBJECT (main_window, image2141, "image2141"); + GLADE_HOOKUP_OBJECT (main_window, image2185, "image2185"); GLADE_HOOKUP_OBJECT (main_window, menu_previous_user, "menu_previous_user"); - GLADE_HOOKUP_OBJECT (main_window, image2142, "image2142"); + GLADE_HOOKUP_OBJECT (main_window, image2186, "image2186"); GLADE_HOOKUP_OBJECT (main_window, menu_manage_users, "menu_manage_users"); - GLADE_HOOKUP_OBJECT (main_window, image2143, "image2143"); + GLADE_HOOKUP_OBJECT (main_window, image2187, "image2187"); GLADE_HOOKUP_OBJECT (main_window, menu_finances_stadium, "menu_finances_stadium"); GLADE_HOOKUP_OBJECT (main_window, menu_finances_stadium_menu, "menu_finances_stadium_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_show_finances, "menu_show_finances"); - GLADE_HOOKUP_OBJECT (main_window, image2144, "image2144"); + GLADE_HOOKUP_OBJECT (main_window, image2188, "image2188"); GLADE_HOOKUP_OBJECT (main_window, menu_show_stadium, "menu_show_stadium"); - GLADE_HOOKUP_OBJECT (main_window, image2145, "image2145"); + GLADE_HOOKUP_OBJECT (main_window, image2189, "image2189"); GLADE_HOOKUP_OBJECT (main_window, menu_help1, "menu_help1"); GLADE_HOOKUP_OBJECT (main_window, menu_help1_menu, "menu_help1_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_about, "menu_about"); - GLADE_HOOKUP_OBJECT (main_window, image2146, "image2146"); + GLADE_HOOKUP_OBJECT (main_window, image2190, "image2190"); GLADE_HOOKUP_OBJECT (main_window, menu_contributors, "menu_contributors"); - GLADE_HOOKUP_OBJECT (main_window, image2147, "image2147"); + GLADE_HOOKUP_OBJECT (main_window, image2191, "image2191"); GLADE_HOOKUP_OBJECT (main_window, menu_help, "menu_help"); - GLADE_HOOKUP_OBJECT (main_window, image2148, "image2148"); + GLADE_HOOKUP_OBJECT (main_window, image2192, "image2192"); GLADE_HOOKUP_OBJECT (main_window, hbox1, "hbox1"); GLADE_HOOKUP_OBJECT (main_window, button_load, "button_load"); GLADE_HOOKUP_OBJECT (main_window, image11, "image11"); diff --git a/src/league.c b/src/league.c index 7fc384af..5c7b92dc 100644 --- a/src/league.c +++ b/src/league.c @@ -125,10 +125,9 @@ league_cup_get_index_from_clid(gint clid) } if(index == -1) - { - g_warning("league_cup_get_index_from_clid: couldn't find league or cup with id %d\n", clid); - main_exit_program(EXIT_POINTER_NOT_FOUND, NULL); - } + main_exit_program(EXIT_POINTER_NOT_FOUND, + "league_cup_get_index_from_clid: couldn't find league or cup with id %d\n", + clid); return index; } @@ -145,9 +144,9 @@ league_from_clid(gint clid) if(lig(i).id == clid) return &lig(i); - g_warning("league_from_clid: didn't find league with id %d\n", clid); - - main_exit_program(EXIT_POINTER_NOT_FOUND, NULL); + main_exit_program(EXIT_POINTER_NOT_FOUND, + "league_from_clid: didn't find league with id %d\n", + clid); return NULL; } @@ -337,9 +336,8 @@ league_index_from_sid(const gchar *sid) if(strcmp(lig(i).sid, sid) == 0) return i; - g_warning("league_index_from_sid: no index found for sid '%s'.\n", sid); - - main_exit_program(EXIT_INT_NOT_FOUND, NULL); + main_exit_program(EXIT_INT_NOT_FOUND, + "league_index_from_sid: no index found for sid '%s'.\n", sid); return -1; } @@ -693,11 +691,9 @@ league_team_movements_assign_dest(GArray *team_movements, gint idx, league_cur_size[dest_idx]++; if(league_cur_size[dest_idx] > league_size[dest_idx]) - { - g_warning("league_team_movements_assign_dest: no room in league %s for team %s.", - lig(dest_idx).name, tmove->tm.name); - main_exit_program(EXIT_PROM_REL, NULL); - } + main_exit_program(EXIT_PROM_REL, + "league_team_movements_assign_dest: no room in league %s for team %s.", + lig(dest_idx).name, tmove->tm.name); tmove->dest_assigned = TRUE; @@ -717,11 +713,9 @@ league_team_movements_assign_dest(GArray *team_movements, gint idx, g_array_remove_index(tmove->dest_idcs, j); if(tmove->dest_idcs->len == 0) - { - g_warning("league_team_movements_assign_dest: no destinations left for team %s.", - tmove->tm.name); - main_exit_program(EXIT_PROM_REL, NULL); - } + main_exit_program(EXIT_PROM_REL, + "league_team_movements_assign_dest: no destinations left for team %s.", + tmove->tm.name); } } diff --git a/src/lg_commentary.c b/src/lg_commentary.c index 968ae066..5fe98a8d 100644 --- a/src/lg_commentary.c +++ b/src/lg_commentary.c @@ -40,7 +40,7 @@ #include "xml_lg_commentary.h" /** The replacement strings for the live game commentary tokens. */ -gchar **token_rep; +GPtrArray *token_rep[2]; /** Whether there was a commentary repetition rejection. */ gboolean repetition; @@ -100,16 +100,16 @@ lg_commentary_generate(const LiveGame *live_game, LiveGameUnit *unit) unit->event.commentary_id = (i == (*commentaries)->len) ? -1 : g_array_index(*commentaries, LGCommentary, order[i]).id; - for(i=0;ilen;i++) - if(i != option_int("string_lg_commentary_token_team_home", &lg_tokens) && - i != option_int("string_lg_commentary_token_team_away", &lg_tokens) && - i != option_int("string_lg_commentary_token_attendance", &lg_tokens) && - i != option_int("string_lg_commentary_token_cup_round_name", &lg_tokens) && - i != option_int("string_lg_commentary_token_league_cup_name", &lg_tokens) && - i != option_int("string_lg_commentary_token_yellow_limit", &lg_tokens) && - i != option_int("string_lg_commentary_token_team_layer0", &lg_tokens) && - i != option_int("string_lg_commentary_token_team_layer1", &lg_tokens)) - free_gchar_ptr(token_rep[i]); + for(i=0;ilen;i++) + if(i != option_int("string_token_team_home", &tokens) && + i != option_int("string_token_team_away", &tokens) && + i != option_int("string_token_attendance", &tokens) && + i != option_int("string_token_cup_round_name", &tokens) && + i != option_int("string_token_league_cup_name", &tokens) && + i != option_int("string_token_yellow_limit", &tokens) && + i != option_int("string_token_team_layer0", &tokens) && + i != option_int("string_token_team_layer1", &tokens)) + misc_token_remove(token_rep, i); } /** Check whether the commentary conditions are fulfilled and whether @@ -121,7 +121,7 @@ lg_commentary_check_commentary(const LGCommentary *commentary, gchar *dest) if(strlen(commentary->text) == 0 || (commentary->condition != NULL && - !lg_commentary_parse_condition(commentary->condition)) || + !misc_parse_condition(commentary->condition, token_rep)) || (repetition == FALSE && query_lg_commentary_is_repetition(commentary->id))) return FALSE; @@ -130,14 +130,12 @@ lg_commentary_check_commentary(const LGCommentary *commentary, gchar *dest) do { strcpy(buf, dest); - if(!lg_commentary_replace_tokens(dest)) - return FALSE; - - lg_commentary_replace_expressions(dest); + misc_string_replace_tokens(dest, token_rep); + misc_string_replace_expressions(dest); } while(strcmp(buf, dest) != 0); - return TRUE; + return (g_strrstr(dest, "_") == NULL); } /** Check whether a commentary with given id has been used in the last @@ -156,159 +154,6 @@ query_lg_commentary_is_repetition(gint id) return FALSE; } - - -/** Choose one of strings separated with '|' */ -void lg_commentary_choose_random(gchar* s) -{ - const gchar STR_SEP = '|'; - gint i = 0; - gint count = 1; - const gchar* start; - - for (i = 0; s[i]; i++) - count += (s[i] == STR_SEP); - - if (count == 1) - return; - - count = math_rndi(0, count-1) + 1; - start = s; - for (i = 0; s[i]; i++) - if (s[i] == STR_SEP) - { - count--; - if (count == 1) - start = s + i + 1; - else if (!count) - { - s[i] = '\0'; - break; - } - } - - strcpy(s, start); -} - -/** Replace simple arithmetic expressions like "1 + 2" - and comparisons like "3 < 4" with the appropriate result. */ -void -lg_commentary_replace_expressions(gchar *commentary_text) -{ - gint i, j, last_idx = 0; - gint value = -1; - gchar buf[SMALL], buf2[SMALL]; - - if(debug > 100) - printf("lg_commentary_replace_expressions: #%s#\n", - commentary_text); - - if(!g_strrstr(commentary_text, "[")) - return; - - strcpy(buf, commentary_text); - strcpy(commentary_text, ""); - - for(i=strlen(buf) - 1; i>=0; i--) - if(buf[i] == '[') - { - strncpy(buf2, buf, i); - buf2[i] = '\0'; - strcat(commentary_text, buf2); - - for(j=i + 1;j") || - g_strrstr(buf2, "=") || - g_strrstr(buf2, " G ") || - g_strrstr(buf2, " L ") || - g_strrstr(buf2, " GE ") || - g_strrstr(buf2, " LE ")) - misc_parse(buf2, &value); - else - misc_parse_expression(buf2, &value); - sprintf(buf2, "%d", value); - } - strcat(commentary_text, buf2); - value = -1; - - last_idx = j + 1; - - break; - } - } - - break; - } - - if(last_idx < strlen(buf)) - { - strncpy(buf2, buf + last_idx, strlen(buf) - last_idx); - buf2[strlen(buf) - last_idx] = '\0'; - strcat(commentary_text, buf2); - } -} - -/** Try to replace all special tokens in the string and write the result to dest. - @param commentary The commentary with tokens. - @param dest The destination string. - @return TRUE if we could replace all tokens and the commentary condition - was fulfilled, FALSE otherwise. */ -gboolean -lg_commentary_replace_tokens(gchar *commentary_text) -{ - gint i; - - for(i=0;ilen;i++) - { - if(g_strrstr(commentary_text, - g_array_index(lg_tokens.list, Option, i).string_value)) - { - if(token_rep[i] == NULL) - return FALSE; - else - misc_string_replace_token(commentary_text, - g_array_index(lg_tokens.list, Option, i).string_value, - token_rep[i]); - } - } - - return TRUE; -} - -/** Find out whether the conditions of the commentary are fulfilled. */ -gboolean -lg_commentary_parse_condition(const gchar *condition) -{ - gboolean return_value = FALSE; - gchar buf[SMALL], buf2[SMALL]; - - strcpy(buf, condition); - - do - { - strcpy(buf2, buf); - if(!lg_commentary_replace_tokens(buf)) - return FALSE; - - lg_commentary_replace_expressions(buf); - } - while(strcmp(buf2, buf) != 0); - - misc_parse(buf, &return_value); - - return return_value; -} - /** Write a random order of indices into the integer array (only depending on the priority values of the commentaries). I don't like this implementation of ordering the commentaries @@ -355,43 +200,61 @@ lg_commentary_get_order(const GArray *commentaries, gint *order) void lg_commentary_set_stats_tokens(const LiveGameStats *stats) { - token_rep[option_int("string_lg_commentary_token_stat_shots0", &lg_tokens)] = - misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_SHOTS]); - token_rep[option_int("string_lg_commentary_token_stat_shot_per0", &lg_tokens)] = - misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_SHOT_PERCENTAGE]); - token_rep[option_int("string_lg_commentary_token_stat_poss0", &lg_tokens)] = - misc_int_to_char((gint)rint(100 * ((gfloat)stats->values[0][LIVE_GAME_STAT_VALUE_POSSESSION] / - ((gfloat)stats->values[0][LIVE_GAME_STAT_VALUE_POSSESSION] + - (gfloat)stats->values[1][LIVE_GAME_STAT_VALUE_POSSESSION])))); - token_rep[option_int("string_lg_commentary_token_stat_pen0", &lg_tokens)] = - misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_PENALTIES]); - token_rep[option_int("string_lg_commentary_token_stat_fouls0", &lg_tokens)] = - misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_FOULS]); - token_rep[option_int("string_lg_commentary_token_stat_yellows0", &lg_tokens)] = - misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_CARDS]); - token_rep[option_int("string_lg_commentary_token_stat_reds0", &lg_tokens)] = - misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_REDS]); - token_rep[option_int("string_lg_commentary_token_stat_injs0", &lg_tokens)] = - misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_INJURIES]); + misc_token_add(token_rep, + option_int("string_token_stat_shots0", &tokens), + misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_SHOTS])); - token_rep[option_int("string_lg_commentary_token_stat_shots1", &lg_tokens)] = - misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_SHOTS]); - token_rep[option_int("string_lg_commentary_token_stat_shot_per1", &lg_tokens)] = - misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_SHOT_PERCENTAGE]); - token_rep[option_int("string_lg_commentary_token_stat_poss1", &lg_tokens)] = - misc_int_to_char((gint)rint(100 * ((gfloat)stats->values[1][LIVE_GAME_STAT_VALUE_POSSESSION] / - ((gfloat)stats->values[0][LIVE_GAME_STAT_VALUE_POSSESSION] + - (gfloat)stats->values[1][LIVE_GAME_STAT_VALUE_POSSESSION])))); - token_rep[option_int("string_lg_commentary_token_stat_pen1", &lg_tokens)] = - misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_PENALTIES]); - token_rep[option_int("string_lg_commentary_token_stat_fouls1", &lg_tokens)] = - misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_FOULS]); - token_rep[option_int("string_lg_commentary_token_stat_yellows1", &lg_tokens)] = - misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_CARDS]); - token_rep[option_int("string_lg_commentary_token_stat_reds1", &lg_tokens)] = - misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_REDS]); - token_rep[option_int("string_lg_commentary_token_stat_injs1", &lg_tokens)] = - misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_INJURIES]); + misc_token_add(token_rep, + option_int("string_token_stat_shot_per0", &tokens), + misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_SHOT_PERCENTAGE])); + misc_token_add(token_rep, + option_int("string_token_stat_poss0", &tokens), + misc_int_to_char((gint)rint(100 * + ((gfloat)stats->values[0][LIVE_GAME_STAT_VALUE_POSSESSION] / + ((gfloat)stats->values[0][LIVE_GAME_STAT_VALUE_POSSESSION] + + (gfloat)stats->values[1][LIVE_GAME_STAT_VALUE_POSSESSION]))))); + misc_token_add(token_rep, + option_int("string_token_stat_pen0", &tokens), + misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_PENALTIES])); + misc_token_add(token_rep, + option_int("string_token_stat_fouls0", &tokens), + misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_FOULS])); + misc_token_add(token_rep, + option_int("string_token_stat_yellows0", &tokens), + misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_CARDS])); + misc_token_add(token_rep, + option_int("string_token_stat_reds0", &tokens), + misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_REDS])); + misc_token_add(token_rep, + option_int("string_token_stat_injs0", &tokens), + misc_int_to_char(stats->values[0][LIVE_GAME_STAT_VALUE_INJURIES])); + + misc_token_add(token_rep, + option_int("string_token_stat_shots1", &tokens), + misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_SHOTS])); + misc_token_add(token_rep, + option_int("string_token_stat_shot_per1", &tokens), + misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_SHOT_PERCENTAGE])); + misc_token_add(token_rep, + option_int("string_token_stat_poss1", &tokens), + misc_int_to_char((gint)rint(100 * ((gfloat)stats->values[1][LIVE_GAME_STAT_VALUE_POSSESSION] / + ((gfloat)stats->values[0][LIVE_GAME_STAT_VALUE_POSSESSION] + + (gfloat)stats->values[1][LIVE_GAME_STAT_VALUE_POSSESSION]))))); + misc_token_add(token_rep, + option_int("string_token_stat_pen1", &tokens), + misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_PENALTIES])); + misc_token_add(token_rep, + option_int("string_token_stat_fouls1", &tokens), + misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_FOULS])); + misc_token_add(token_rep, + option_int("string_token_stat_yellows1", &tokens), + misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_CARDS])); + misc_token_add(token_rep, + option_int("string_token_stat_reds1", &tokens), + misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_REDS])); + misc_token_add(token_rep, + option_int("string_token_stat_injs1", &tokens), + misc_int_to_char(stats->values[1][LIVE_GAME_STAT_VALUE_INJURIES])); } /** Fill the tokens that contain general information. */ @@ -404,19 +267,23 @@ lg_commentary_set_basic_tokens(const LiveGameUnit *unit, const Fixture *fix) avskill1 = (gint)rint(team_get_average_skill(fix->teams[1], TRUE)); sprintf(buf, "%d : %d", unit->result[0], unit->result[1]); - token_rep[option_int("string_lg_commentary_token_result", &lg_tokens)] = - g_strdup(buf); + misc_token_add(token_rep, + option_int("string_token_result", &tokens), + g_strdup(buf)); - token_rep[option_int("string_lg_commentary_token_time", &lg_tokens)] = - misc_int_to_char(unit->time); - token_rep[option_int("string_lg_commentary_token_minute", &lg_tokens)] = - misc_int_to_char(live_game_unit_get_minute(unit)); + misc_token_add(token_rep, + option_int("string_token_time", &tokens), + misc_int_to_char(unit->time)); + misc_token_add(token_rep, + option_int("string_token_minute", &tokens), + misc_int_to_char(current_min)); tmp_int = live_game_get_minutes_remaining(unit); if(tmp_int > 0) - token_rep[option_int("string_lg_commentary_token_minute_remaining", &lg_tokens)] = - misc_int_to_char(tmp_int); + misc_token_add(token_rep, + option_int("string_token_minute_remaining", &tokens), + misc_int_to_char(tmp_int)); if(query_fixture_is_draw(fix)) tmp_int = 120 - current_min; @@ -424,29 +291,39 @@ lg_commentary_set_basic_tokens(const LiveGameUnit *unit, const Fixture *fix) tmp_int = 90 - current_min; if(tmp_int > 0) - token_rep[option_int("string_lg_commentary_token_minute_total", &lg_tokens)] = - misc_int_to_char(tmp_int); + misc_token_add(token_rep, + option_int("string_token_minute_total", &tokens), + misc_int_to_char(tmp_int)); - token_rep[option_int("string_lg_commentary_token_goals0", &lg_tokens)] = - misc_int_to_char(unit->result[0]); - token_rep[option_int("string_lg_commentary_token_goals1", &lg_tokens)] = - misc_int_to_char(unit->result[1]); - token_rep[option_int("string_lg_commentary_token_goal_diff", &lg_tokens)] = - misc_int_to_char(ABS(unit->result[0] - unit->result[1])); - token_rep[option_int("string_lg_commentary_token_extra", &lg_tokens)] = - lg_commentary_get_extra_data(unit, fix); + misc_token_add(token_rep, + option_int("string_token_goals0", &tokens), + misc_int_to_char(unit->result[0])); + misc_token_add(token_rep, + option_int("string_token_goals1", &tokens), + misc_int_to_char(unit->result[1])); + misc_token_add(token_rep, + option_int("string_token_goal_diff", &tokens), + misc_int_to_char(ABS(unit->result[0] - unit->result[1]))); + misc_token_add(token_rep, + option_int("string_token_extra", &tokens), + lg_commentary_get_extra_data(unit, fix)); - token_rep[option_int("string_lg_commentary_token_possession", &lg_tokens)] = - misc_int_to_char(unit->possession); - token_rep[option_int("string_lg_commentary_token_no_possession", &lg_tokens)] = - misc_int_to_char(!unit->possession); + misc_token_add(token_rep, + option_int("string_token_possession", &tokens), + misc_int_to_char(unit->possession)); + misc_token_add(token_rep, + option_int("string_token_no_possession", &tokens), + misc_int_to_char(!unit->possession)); - token_rep[option_int("string_lg_commentary_token_team_avskill0", &lg_tokens)] = - misc_int_to_char(avskill0); - token_rep[option_int("string_lg_commentary_token_team_avskill1", &lg_tokens)] = - misc_int_to_char(avskill1); - token_rep[option_int("string_lg_commentary_token_team_avskilldiff", &lg_tokens)] = - misc_int_to_char(ABS(avskill0 - avskill1)); + misc_token_add(token_rep, + option_int("string_token_team_avskill0", &tokens), + misc_int_to_char(avskill0)); + misc_token_add(token_rep, + option_int("string_token_team_avskill1", &tokens), + misc_int_to_char(avskill1)); + misc_token_add(token_rep, + option_int("string_token_team_avskilldiff", &tokens), + misc_int_to_char(ABS(avskill0 - avskill1))); } /** Set the tokens containing team data. */ @@ -455,19 +332,24 @@ lg_commentary_set_team_tokens(const LiveGameUnit *unit, const Fixture *fix) { if(unit->result[0] != unit->result[1]) { - token_rep[option_int("string_lg_commentary_token_team_losing", &lg_tokens)] = - g_strdup(fix->teams[(unit->result[0] > unit->result[1])]->name); - token_rep[option_int("string_lg_commentary_token_team_winning", &lg_tokens)] = - g_strdup(fix->teams[(unit->result[0] < unit->result[1])]->name); - token_rep[option_int("string_lg_commentary_token_team_losingn", &lg_tokens)] = - misc_int_to_char((unit->result[0] > unit->result[1])); - token_rep[option_int("string_lg_commentary_token_team_winningn", &lg_tokens)] = - misc_int_to_char((unit->result[0] < unit->result[1])); + misc_token_add(token_rep, + option_int("string_token_team_losing", &tokens), + g_strdup(fix->teams[(unit->result[0] > unit->result[1])]->name)); + misc_token_add(token_rep, + option_int("string_token_team_winning", &tokens), + g_strdup(fix->teams[(unit->result[0] < unit->result[1])]->name)); + misc_token_add(token_rep, + option_int("string_token_team_losingn", &tokens), + misc_int_to_char((unit->result[0] > unit->result[1]))); + misc_token_add(token_rep, + option_int("string_token_team_winningn", &tokens), + misc_int_to_char((unit->result[0] < unit->result[1]))); } if(unit->event.team != -1) - token_rep[option_int("string_lg_commentary_token_team", &lg_tokens)] = - misc_int_to_char(unit->event.team); + misc_token_add(token_rep, + option_int("string_token_team", &tokens), + misc_int_to_char(unit->event.team)); } /** Set the player tokens. */ @@ -529,24 +411,31 @@ lg_commentary_set_player_tokens(const LiveGameUnit *unit, const Fixture *fix) if(pl1 != NULL) { - token_rep[option_int("string_lg_commentary_token_player0", &lg_tokens)] = - player_get_last_name(pl1->name); - token_rep[option_int("string_lg_commentary_token_player_goals0", &lg_tokens)] = - misc_int_to_char(player_games_goals_get(pl1, fix->clid, PLAYER_VALUE_GOALS)); - token_rep[option_int("string_lg_commentary_token_player_goals_all0", &lg_tokens)] = - misc_int_to_char(player_all_games_goals(pl1, PLAYER_VALUE_GOALS)); + misc_token_add(token_rep, + option_int("string_token_player0", &tokens), + player_get_last_name(pl1->name)); + misc_token_add(token_rep, + option_int("string_token_player_goals0", &tokens), + misc_int_to_char(player_games_goals_get(pl1, fix->clid, PLAYER_VALUE_GOALS))); + misc_token_add(token_rep, + option_int("string_token_player_goals_all0", &tokens), + misc_int_to_char(player_all_games_goals(pl1, PLAYER_VALUE_GOALS))); } if(pl2 != NULL) { - token_rep[option_int("string_lg_commentary_token_player1", &lg_tokens)] = - player_get_last_name(pl2->name); - token_rep[option_int("string_lg_commentary_token_player_goals1", &lg_tokens)] = - misc_int_to_char(player_games_goals_get(pl2, fix->clid, PLAYER_VALUE_GOALS)); - token_rep[option_int("string_lg_commentary_token_player_goals_all1", &lg_tokens)] = - misc_int_to_char(player_all_games_goals(pl2, PLAYER_VALUE_GOALS)); - token_rep[option_int("string_lg_commentary_token_player_yellows", &lg_tokens)] = - misc_int_to_char(player_card_get(pl2, fix->clid, PLAYER_VALUE_CARD_YELLOW)); + misc_token_add(token_rep, + option_int("string_token_player1", &tokens), + player_get_last_name(pl2->name)); + misc_token_add(token_rep, + option_int("string_token_player_goals1", &tokens), + misc_int_to_char(player_games_goals_get(pl2, fix->clid, PLAYER_VALUE_GOALS))); + misc_token_add(token_rep, + option_int("string_token_player_goals_all1", &tokens), + misc_int_to_char(player_all_games_goals(pl2, PLAYER_VALUE_GOALS))); + misc_token_add(token_rep, + option_int("string_token_player_yellows", &tokens), + misc_int_to_char(player_card_get(pl2, fix->clid, PLAYER_VALUE_CARD_YELLOW))); } } @@ -599,58 +488,70 @@ lg_commentary_get_extra_data(const LiveGameUnit *unit, const Fixture *fix) void lg_commentary_initialize(const Fixture *fix) { - gint i; gchar buf[SMALL]; - token_rep = (gchar**)g_malloc(sizeof(gchar*) * lg_tokens.list->len); + token_rep[0] = g_ptr_array_new(); + token_rep[1] = g_ptr_array_new(); - for(i=0;ilen;i++) - token_rep[i] = NULL; - - token_rep[option_int("string_lg_commentary_token_team_home", &lg_tokens)] = - g_strdup(fix->teams[0]->name); - token_rep[option_int("string_lg_commentary_token_team_away", &lg_tokens)] = - g_strdup(fix->teams[1]->name); + misc_token_add(token_rep, + option_int("string_token_team_home", &tokens), + g_strdup(fix->teams[0]->name)); + misc_token_add(token_rep, + option_int("string_token_team_away", &tokens), + g_strdup(fix->teams[1]->name)); if(fix->teams[0]->clid < ID_CUP_START) - token_rep[option_int("string_lg_commentary_token_team_layer0", &lg_tokens)] = - misc_int_to_char(league_from_clid(fix->teams[0]->clid)->layer); + misc_token_add(token_rep, + option_int("string_token_team_layer0", &tokens), + misc_int_to_char(league_from_clid(fix->teams[0]->clid)->layer)); if(fix->teams[1]->clid < ID_CUP_START) - token_rep[option_int("string_lg_commentary_token_team_layer1", &lg_tokens)] = - misc_int_to_char(league_from_clid(fix->teams[1]->clid)->layer); + misc_token_add(token_rep, + option_int("string_token_team_layer1", &tokens), + misc_int_to_char(league_from_clid(fix->teams[1]->clid)->layer)); - token_rep[option_int("string_lg_commentary_token_league_cup_name", &lg_tokens)] = - g_strdup(league_cup_get_name_string(fix->clid)); + if(fix->teams[0]->clid < ID_CUP_START && + fix->teams[1]->clid < ID_CUP_START) + misc_token_add(token_rep, + option_int("string_token_team_layerdiff", &tokens), + misc_int_to_char(league_from_clid(fix->teams[0]->clid)->layer - + league_from_clid(fix->teams[1]->clid)->layer)); + + misc_token_add(token_rep, + option_int("string_token_league_cup_name", &tokens), + g_strdup(league_cup_get_name_string(fix->clid))); if(fix->clid >= ID_CUP_START) { cup_get_round_name(cup_from_clid(fix->clid), fix->round, buf); - token_rep[option_int("string_lg_commentary_token_cup_round_name", &lg_tokens)] = - g_strdup(buf); + misc_token_add(token_rep, + option_int("string_token_cup_round_name", &tokens), + g_strdup(buf)); } misc_print_grouped_int(fix->attendance, buf); - token_rep[option_int("string_lg_commentary_token_attendance", &lg_tokens)] = - g_strdup(buf); + misc_token_add(token_rep, + option_int("string_token_attendance", &tokens), + g_strdup(buf)); - token_rep[option_int("string_lg_commentary_token_yellow_limit", &lg_tokens)] = - misc_int_to_char(league_cup_get_yellow_red(fix->clid)); + misc_token_add(token_rep, + option_int("string_token_yellow_limit", &tokens), + misc_int_to_char(league_cup_get_yellow_red(fix->clid))); } /** Free the memory occupied by the tokens array and the permanent tokens. */ void lg_commentary_post_match(void) { - g_free(token_rep[option_int("string_lg_commentary_token_team_home", &lg_tokens)]); - g_free(token_rep[option_int("string_lg_commentary_token_team_away", &lg_tokens)]); - g_free(token_rep[option_int("string_lg_commentary_token_attendance", &lg_tokens)]); - g_free(token_rep[option_int("string_lg_commentary_token_league_cup_name", &lg_tokens)]); - g_free(token_rep[option_int("string_lg_commentary_token_cup_round_name", &lg_tokens)]); - g_free(token_rep[option_int("string_lg_commentary_token_yellow_limit", &lg_tokens)]); - g_free(token_rep[option_int("string_lg_commentary_token_team_layer0", &lg_tokens)]); - g_free(token_rep[option_int("string_lg_commentary_token_team_layer1", &lg_tokens)]); + gint i; - g_free(token_rep); + for(i=token_rep[0]->len - 1;i >= 0; i--) + { + g_free(g_ptr_array_index(token_rep[0], i)); + g_free(g_ptr_array_index(token_rep[1], i)); + } + + g_ptr_array_free(token_rep[0], TRUE); + g_ptr_array_free(token_rep[1], TRUE); } /** Load the appropriate commentary file by evaluating @@ -686,7 +587,6 @@ void lg_commentary_load_commentary_file(const gchar *commentary_file, gboolean abort) { gchar *file_name = file_find_support_file(commentary_file, FALSE); - gchar buf[SMALL]; if(file_name != NULL) { @@ -696,11 +596,9 @@ lg_commentary_load_commentary_file(const gchar *commentary_file, gboolean abort) else { if(abort) - { - sprintf(buf, "lg_commentary_load_commentary_file: file %s not found \n", - file_name); - main_exit_program(EXIT_FILE_NOT_FOUND, buf); - } + main_exit_program(EXIT_FILE_NOT_FOUND, + "lg_commentary_load_commentary_file: file %s not found \n", + file_name); else lg_commentary_load_commentary_file("lg_commentary_en.xml", TRUE); } diff --git a/src/lg_commentary.h b/src/lg_commentary.h index 1182b36c..4ec767c2 100644 --- a/src/lg_commentary.h +++ b/src/lg_commentary.h @@ -41,15 +41,6 @@ lg_commentary_check_commentary(const LGCommentary *commentary, gchar *dest); gboolean query_lg_commentary_is_repetition(gint id); -gboolean -lg_commentary_replace_tokens(gchar *commentary_text); - -void -lg_commentary_replace_expressions(gchar *commentary_text); - -gboolean -lg_commentary_parse_condition(const gchar *condition); - void lg_commentary_get_order(const GArray *commentaries, gint *order); diff --git a/src/live_game.c b/src/live_game.c index caaaa686..11c17a21 100644 --- a/src/live_game.c +++ b/src/live_game.c @@ -35,6 +35,7 @@ #include "misc_callback_func.h" #include "option.h" #include "player.h" +#include "strategy.h" #include "support.h" #include "team.h" #include "treeview.h" @@ -122,11 +123,12 @@ live_game_initialize(Fixture *fix) gtk_window_set_title(GTK_WINDOW(window.live), league_cup_get_name_string(((LiveGame*)statp)->fix->clid)); window_live_set_up(); + game_gui_live_game_show_opponent_players(); } game_initialize(fix); - if(fixture_user_team_involved(match->fix) != -1 || stat5 < -1000) + if(fixture_user_team_involved(fix) != -1 || stat5 < -1000) lg_commentary_initialize(fix); } @@ -503,8 +505,6 @@ live_game_event_injury(gint team, gint player, gboolean create_new) last_unit.event.player)), last_unit.event.player); - match->subs_left[last_unit.event.team]--; - if(old_structure != tm[last_unit.event.team]->structure) live_game_event_team_change(last_unit.event.team, LIVE_GAME_EVENT_STRUCTURE_CHANGE); @@ -701,9 +701,6 @@ live_game_event_general(gboolean create_new) debug > 130) printf("\t\tlive_game_event_general\n"); -/* if(team_is_user(tm0) == -1 || team_is_user(tm1) == -1) */ -/* game_check_cpu_strategy(match); */ - if(create_new) { new.minute = live_game_get_minute(); @@ -761,11 +758,9 @@ live_game_event_general(gboolean create_new) new.area = LIVE_GAME_UNIT_AREA_MIDFIELD; } else - { - g_warning("live_game_event_general: unknown event type: %d\n", - last_unit.event.type); - main_exit_program(EXIT_INT_NOT_FOUND, NULL); - } + main_exit_program(EXIT_INT_NOT_FOUND, + "live_game_event_general: unknown event type: %d\n", + last_unit.event.type); g_array_append_val(unis, new); } @@ -773,6 +768,13 @@ live_game_event_general(gboolean create_new) live_game_event_general_get_players(); live_game_finish_unit(); + + /** First, check whether CPU strategy changes are made. */ + if(team_is_user(tm0) == -1) + strategy_live_game_check(match, 0); + + if(team_is_user(tm1) == -1) + strategy_live_game_check(match, 1); } /** Fill in the players values in a general unit. */ @@ -914,10 +916,7 @@ live_game_event_send_off(gint team, gint player, gboolean second_yellow) &to_substitute, &substitute); if(to_substitute != -1) - { live_game_event_substitution(team, substitute, to_substitute); - match->subs_left[team]--; - } else { tm[team]->structure = team_find_appropriate_structure(tm[team]); @@ -957,10 +956,23 @@ live_game_event_substitution(gint team_number, gint sub_in, gint sub_out) if(player_of_id_team(tm[team_number], sub_in)->cskill > 0) { + match->subs_left[team_number]--; + + player_streak_add_to_prob( + player_of_id_team(tm[team_number], sub_in), + const_float("float_player_streak_add_sub_out")); + + player_streak_add_to_prob( + player_of_id_team(tm[team_number], sub_in), + const_float("float_player_streak_add_sub_in")); + player_games_goals_set(player_of_id_team(tm[team_number], sub_in), match->fix->clid, PLAYER_VALUE_GAMES, 1); player_of_id_team(tm[team_number], sub_in)->career[PLAYER_VALUE_GAMES]++; player_of_id_team(tm[team_number], sub_in)->participation = TRUE; + + if(show) + game_gui_live_game_show_opponent_players(); } g_array_append_val(unis, new); @@ -1251,10 +1263,8 @@ live_game_get_minutes_remaining(const LiveGameUnit *unit) if(unit->time == LIVE_GAME_UNIT_TIME_EXTRA_TIME) return_value = 120 - current_min; - else if(unit->time == LIVE_GAME_UNIT_TIME_SECOND_HALF) + else return_value = 90 - current_min; - else if(unit->time == LIVE_GAME_UNIT_TIME_FIRST_HALF) - return_value = 45 - current_min; return return_value; } @@ -1393,14 +1403,13 @@ live_game_finish_unit(void) unit->event.player, unit->event.player2); - if(unit->minute != -1 && unit->time != LIVE_GAME_UNIT_TIME_PENALTIES && - fixture_user_team_involved(match->fix) != -1) + if(unit->minute != -1 && unit->time != LIVE_GAME_UNIT_TIME_PENALTIES) { - if(debug < 50) - game_decrease_fitness(match->fix); + game_decrease_fitness(match->fix); game_get_values(match->fix, match->team_values, match->home_advantage); - if(stat2 == cur_user && show && + if(fixture_user_team_involved(match->fix) != -1 && + stat2 == cur_user && show && unit->minute % opt_int("int_opt_live_game_player_list_refresh") == 0) treeview_show_user_player_list(); } @@ -1513,10 +1522,7 @@ live_game_resume(void) for(j=0;j<3;j++) { if(subs_in[j] != -1) - { - usr(stat2).live_game.subs_left[i]--; live_game_event_substitution(i, subs_in[j], subs_out[j]); - } } if(tm[i]->structure != usr(stat2).live_game.team_state[i].structure) @@ -1635,11 +1641,9 @@ live_game_event_get_verbosity(gint event_type) else if(event_type == LIVE_GAME_EVENT_GENERAL) return_value = 6; else - { - g_warning("live_game_event_get_verbosity: unknown event type %d \n", - event_type); - main_exit_program(EXIT_INT_NOT_FOUND, NULL); - } + main_exit_program(EXIT_INT_NOT_FOUND, + "live_game_event_get_verbosity: unknown event type %d \n", + event_type); return return_value; } diff --git a/src/main.c b/src/main.c index 3e1a43d6..94f74fd1 100644 --- a/src/main.c +++ b/src/main.c @@ -27,6 +27,7 @@ */ #include +#include #include "file.h" #include "free.h" @@ -40,9 +41,11 @@ #include "name_struct.h" #include "option.h" #include "stat_struct.h" +#include "strategy_struct.h" #include "transfer_struct.h" #include "variables.h" #include "window.h" +#include "xml_strategy.h" /** Whether the last save gets loaded at startup (cl switch -l). */ @@ -131,13 +134,14 @@ main_init_variables(void) transfer_list = g_array_new(FALSE, FALSE, sizeof(Transfer)); season_stats = g_array_new(FALSE, FALSE, sizeof(SeasonStat)); name_lists = g_array_new(FALSE, FALSE, sizeof(NameList)); + strategies = g_array_new(FALSE, FALSE, sizeof(Strategy)); save_file = NULL; constants_app.list = settings.list = - constants.list = options.list = lg_tokens.list = NULL; + constants.list = options.list = tokens.list = NULL; constants_app.datalist = settings.datalist = - constants.datalist = options.datalist = lg_tokens.datalist = NULL; + constants.datalist = options.datalist = tokens.datalist = NULL; popups_active = 0; selected_row = -1; @@ -148,6 +152,7 @@ main_init_variables(void) lg_commentary[i] = g_array_new(FALSE, FALSE, sizeof(LGCommentary)); file_load_conf_files(); + xml_strategy_load_strategies(); language_set(language_get_code_index(opt_str("string_opt_language_code")) + 1); @@ -248,15 +253,23 @@ main (gint argc, gchar *argv[]) @param exit_message The message we print. @return The exit code of the program. */ void -main_exit_program(gint exit_code, gchar *exit_message) +main_exit_program(gint exit_code, gchar *format, ...) { + gchar text[SMALL]; + va_list args; + + if(format != NULL) + { + va_start (args, format); + g_vsprintf(text, format, args); + va_end (args); + g_warning(text); + } + if(gtk_main_level() > 0) gtk_main_quit(); free_memory(); - - if(exit_message != NULL) - g_warning(exit_message); if(!os_is_unix) { diff --git a/src/main.h b/src/main.h index 96dc50fe..d1c7c8e4 100644 --- a/src/main.h +++ b/src/main.h @@ -33,9 +33,8 @@ void main_init_variables(void); void -main_exit_program(gint exit_code, gchar *exit_message) -__attribute__ ((noreturn)); - +main_exit_program(gint exit_code, gchar *format, ...) +__attribute__ ((noreturn, format (printf, 2, 3))); void main_parse_cl_arguments(gint *argc, gchar ***argv); diff --git a/src/misc.c b/src/misc.c index 6e958a1d..3778b211 100644 --- a/src/misc.c +++ b/src/misc.c @@ -26,6 +26,8 @@ #include "main.h" #include "maths.h" #include "misc.h" +#include "option.h" +#include "variables.h" /** Print the contents of a GError (if it was set). @@ -37,14 +39,10 @@ void misc_print_error(GError **error, gboolean abort_program) { - gchar buf[SMALL]; - if(*error == NULL) return; - sprintf(buf, "%s", (*error)->message); - - g_warning("error message: %s\n", buf); + g_warning("error message: %s\n", (*error)->message); g_error_free(*error); *error = NULL; @@ -487,3 +485,177 @@ misc_string_assign(gchar **string, const gchar *contents) *string = g_strdup(contents); } + +/** Choose one of strings separated with '|' */ +void +misc_string_choose_random(gchar *string) +{ + const gchar STR_SEP = '|'; + gint i = 0; + gint count = 1; + const gchar* start; + + for (i = 0; string[i]; i++) + count += (string[i] == STR_SEP); + + if (count == 1) + return; + + count = math_rndi(0, count - 1) + 1; + start = string; + for (i = 0; string[i]; i++) + if (string[i] == STR_SEP) + { + count--; + if (count == 1) + start = string + i + 1; + else if (!count) + { + string[i] = '\0'; + break; + } + } + + strcpy(string, start); +} + +/** Replace simple arithmetic expressions like "1 + 2" + and comparisons like "3 < 4" with the appropriate result. */ +void +misc_string_replace_expressions(gchar *string) +{ + gint i, j, last_idx = 0; + gint value = -1; + gchar buf[SMALL], buf2[SMALL]; + + if(debug > 100) + printf("misc_string_replace_expressions: #%s#\n", + string); + + if(!g_strrstr(string, "[")) + return; + + strcpy(buf, string); + strcpy(string, ""); + + for(i=strlen(buf) - 1; i>=0; i--) + if(buf[i] == '[') + { + strncpy(buf2, buf, i); + buf2[i] = '\0'; + strcat(string, buf2); + + for(j=i + 1;j") || + g_strrstr(buf2, "=") || + g_strrstr(buf2, " G ") || + g_strrstr(buf2, " L ") || + g_strrstr(buf2, " GE ") || + g_strrstr(buf2, " LE ")) + misc_parse(buf2, &value); + else + misc_parse_expression(buf2, &value); + sprintf(buf2, "%d", value); + } + strcat(string, buf2); + value = -1; + + last_idx = j + 1; + + break; + } + } + + break; + } + + if(last_idx < strlen(buf)) + { + strncpy(buf2, buf + last_idx, strlen(buf) - last_idx); + buf2[strlen(buf) - last_idx] = '\0'; + strcat(string, buf2); + } +} + +/** Try to replace all special tokens in the string and write the result to dest. + @param string The string containing tokens. + @param token_rep The arrays with the tokens and replacements. + @return TRUE if we could replace all tokens and the commentary condition + was fulfilled, FALSE otherwise. */ +void +misc_string_replace_tokens(gchar *string, GPtrArray **token_rep) +{ + gint i; + + for(i=0;ilen;i++) + if(g_strrstr(string, + (gchar*)g_ptr_array_index(token_rep[0], i))) + misc_string_replace_token(string, + (gchar*)g_ptr_array_index(token_rep[0], i), + (gchar*)g_ptr_array_index(token_rep[1], i)); +} + +/** Find out whether the conditions in the string are fulfilled. */ +gboolean +misc_parse_condition(const gchar *condition, GPtrArray **token_rep) +{ + gboolean return_value = FALSE; + gchar buf[SMALL], buf2[SMALL]; + + strcpy(buf, condition); + + do + { + strcpy(buf2, buf); + misc_string_replace_tokens(buf, token_rep); + misc_string_replace_expressions(buf); + } + while(strcmp(buf2, buf) != 0); + + if(g_strrstr(buf, "_") != NULL) + return FALSE; + + misc_parse(buf, &return_value); + + return return_value; +} + +/** Add a replacement rule to the token array. + The string should be in allocated as it will + get freed later. */ +void +misc_token_add(GPtrArray **token_rep, gint token_idx, + gchar *replacement) +{ + g_ptr_array_add(token_rep[0], + (gpointer)g_strdup(g_array_index(tokens.list, Option, token_idx).string_value)); + g_ptr_array_add(token_rep[1], (gpointer)replacement); +} + +/** Remove the replacement rule given by the index. */ +void +misc_token_remove(GPtrArray **token_rep, gint idx) +{ + gint i; + + for(i=token_rep[0]->len - 1; i >= 0; i--) + if(strcmp((gchar*)g_ptr_array_index(token_rep[0], i), + g_array_index(tokens.list, Option, idx).string_value) == 0) + { + g_free(g_ptr_array_index(token_rep[0], i)); + g_free(g_ptr_array_index(token_rep[1], i)); + + g_ptr_array_remove_index_fast(token_rep[0], i); + g_ptr_array_remove_index_fast(token_rep[1], i); + } +} diff --git a/src/misc.h b/src/misc.h index 773e938c..d8253099 100644 --- a/src/misc.h +++ b/src/misc.h @@ -65,7 +65,8 @@ gboolean query_misc_integer_is_in_g_array(gint item, GArray *array); void -misc_string_replace_token(gchar *string, const gchar *token, const gchar *replacement); +misc_string_replace_token(gchar *string, const gchar *token, + const gchar *replacement); void misc_replace_sums(gchar *string); @@ -97,4 +98,24 @@ misc_copy_ptr_array(const GPtrArray *array); void misc_string_assign(gchar **string, const gchar *contents); +void +misc_string_choose_random(gchar *string); + +void +misc_string_replace_expressions(gchar *string); + +void +misc_string_replace_tokens(gchar *string, GPtrArray **token_rep); + +gboolean +misc_parse_condition(const gchar *condition, GPtrArray **token_rep); + +void +misc_token_add(GPtrArray **token_rep, gint token_idx, + gchar *replacement); + +void +misc_token_remove(GPtrArray **token_rep, gint idx); + + #endif diff --git a/src/misc_callback_func.c b/src/misc_callback_func.c index fd3a9bca..03d09d00 100644 --- a/src/misc_callback_func.c +++ b/src/misc_callback_func.c @@ -183,7 +183,6 @@ misc_callback_pause_live_game(void) gtk_widget_set_sensitive(lookup_widget(window.live, "button_pause"), FALSE); gtk_widget_set_sensitive(button_resume, TRUE); -/* gui_set_sensitive_lg_meters(FALSE); */ gtk_widget_grab_focus(button_resume); game_gui_set_main_window_sensitivity(TRUE); diff --git a/src/misc_interface.c b/src/misc_interface.c index 483fb54e..289381da 100644 --- a/src/misc_interface.c +++ b/src/misc_interface.c @@ -488,6 +488,9 @@ create_window_live (void) GtkWidget *scrolledwindow11; GtkWidget *treeview_stats; GtkWidget *label81; + GtkWidget *scrolledwindow13; + GtkWidget *treeview_lg_opponent; + GtkWidget *label118; GtkWidget *hbox48; GtkWidget *button_pause; GtkWidget *alignment16; @@ -611,6 +614,19 @@ create_window_live (void) gtk_widget_show (label81); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label81); + scrolledwindow13 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (scrolledwindow13); + gtk_container_add (GTK_CONTAINER (notebook1), scrolledwindow13); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow13), GTK_SHADOW_IN); + + treeview_lg_opponent = gtk_tree_view_new (); + gtk_widget_show (treeview_lg_opponent); + gtk_container_add (GTK_CONTAINER (scrolledwindow13), treeview_lg_opponent); + + label118 = gtk_label_new (_("Opponent player list")); + gtk_widget_show (label118); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label118); + hbox48 = gtk_hbox_new (FALSE, 4); gtk_widget_show (hbox48); gtk_box_pack_start (GTK_BOX (vbox36), hbox48, FALSE, TRUE, 5); @@ -775,6 +791,9 @@ create_window_live (void) GLADE_HOOKUP_OBJECT (window_live, scrolledwindow11, "scrolledwindow11"); GLADE_HOOKUP_OBJECT (window_live, treeview_stats, "treeview_stats"); GLADE_HOOKUP_OBJECT (window_live, label81, "label81"); + GLADE_HOOKUP_OBJECT (window_live, scrolledwindow13, "scrolledwindow13"); + GLADE_HOOKUP_OBJECT (window_live, treeview_lg_opponent, "treeview_lg_opponent"); + GLADE_HOOKUP_OBJECT (window_live, label118, "label118"); GLADE_HOOKUP_OBJECT (window_live, hbox48, "hbox48"); GLADE_HOOKUP_OBJECT (window_live, button_pause, "button_pause"); GLADE_HOOKUP_OBJECT (window_live, alignment16, "alignment16"); diff --git a/src/name.c b/src/name.c index b366f99a..fe05c5b2 100644 --- a/src/name.c +++ b/src/name.c @@ -123,10 +123,8 @@ name_get_list_from_sid(const gchar *sid) xml_name_read(sid, &new); if(new.sid == NULL) - { - g_warning("name_get_list_from_sid: namelist with sid %s not found", sid); - main_exit_program(EXIT_POINTER_NOT_FOUND, NULL); - } + main_exit_program(EXIT_POINTER_NOT_FOUND, + "name_get_list_from_sid: namelist with sid %s not found", sid); else { name_shorten_list(&new); diff --git a/src/nonsourcestrings.c b/src/nonsourcestrings.c new file mode 100644 index 00000000..a4ef6d3f --- /dev/null +++ b/src/nonsourcestrings.c @@ -0,0 +1,6 @@ +//i18n: file support_files/strategy/strategy_fit.xml line 4 +// xgettext: no-c-format +_("442, defend, fittest players play"); +//i18n: file support_files/strategy/strategy_normal1.xml line 4 +// xgettext: no-c-format +_("442, balanced, best players play"); diff --git a/src/option.c b/src/option.c index f07586d0..1b59cba1 100644 --- a/src/option.c +++ b/src/option.c @@ -36,12 +36,11 @@ option_string(const gchar *name, OptionList *optionlist) { gpointer element = g_datalist_get_data(&optionlist->datalist, name); - if(element == NULL) - g_warning("option_string: option named %s not found\nMaybe you should delete the .bygfoot directory from your home dir", name); - else + if(element != NULL) return ((Option*)element)->string_value; - main_exit_program(EXIT_OPTION_NOT_FOUND, NULL); + main_exit_program(EXIT_OPTION_NOT_FOUND, + "option_string: option named %s not found\nMaybe you should delete the .bygfoot directory from your home dir", name); return NULL; } @@ -52,12 +51,11 @@ option_string_pointer(const gchar *name, OptionList *optionlist) { gpointer element = g_datalist_get_data(&optionlist->datalist, name); - if(element == NULL) - g_warning("option_string: option named %s not found\nMaybe you should delete the .bygfoot directory from your home dir", name); - else + if(element != NULL) return &((Option*)element)->string_value; - main_exit_program(EXIT_OPTION_NOT_FOUND, NULL); + main_exit_program(EXIT_OPTION_NOT_FOUND, + "option_string: option named %s not found\nMaybe you should delete the .bygfoot directory from your home dir", name); return NULL; } @@ -72,12 +70,11 @@ option_int(const gchar *name, OptionList *optionlist) { gpointer element = g_datalist_get_data(&optionlist->datalist, name); - if(element == NULL) - g_warning("option_int: option named %s not found\nMaybe you should delete the .bygfoot directory from your home dir", name); - else + if(element != NULL) return ((Option*)element)->value; - main_exit_program(EXIT_OPTION_NOT_FOUND, NULL); + main_exit_program(EXIT_OPTION_NOT_FOUND, + "option_int: option named %s not found\nMaybe you should delete the .bygfoot directory from your home dir", name); return -1; } @@ -88,12 +85,11 @@ option_int_pointer(const gchar *name, OptionList *optionlist) { gpointer element = g_datalist_get_data(&optionlist->datalist, name); - if(element == NULL) - g_warning("option_int: option named %s not found\nMaybe you should delete the .bygfoot directory from your home dir", name); - else + if(element != NULL) return &((Option*)element)->value; - main_exit_program(EXIT_OPTION_NOT_FOUND, NULL); + main_exit_program(EXIT_OPTION_NOT_FOUND, + "option_int: option named %s not found\nMaybe you should delete the .bygfoot directory from your home dir", name); return NULL; } @@ -108,12 +104,11 @@ option_float(const gchar *name, OptionList *optionlist) { gpointer element = g_datalist_get_data(&optionlist->datalist, name); - if(element == NULL) - g_warning("option_float: option named %s not found\nMaybe you should delete the .bygfoot directory from your home dir", name); - else + if(element != NULL) return (gfloat)((Option*)element)->value / 100000; - main_exit_program(EXIT_OPTION_NOT_FOUND, NULL); + main_exit_program(EXIT_OPTION_NOT_FOUND, + "option_float: option named %s not found\nMaybe you should delete the .bygfoot directory from your home dir", name); return -1; } @@ -162,10 +157,8 @@ option_add(OptionList *optionlist, const gchar *name, g_datalist_get_data(&optionlist->datalist, name); if(element != NULL) - { - g_warning("Option named '%s' already contained in optionlist.", name); - main_exit_program(EXIT_GENERAL, NULL); - } + main_exit_program(EXIT_OPTION_NOT_FOUND, + "Option named '%s' already contained in optionlist.", name); new.name = g_strdup(name); new.value = int_value; diff --git a/src/options_callbacks.c b/src/options_callbacks.c index 88b3e934..789c17bf 100644 --- a/src/options_callbacks.c +++ b/src/options_callbacks.c @@ -47,16 +47,16 @@ on_button_options_ok_clicked (GtkButton *button, if(save_global) { - sprintf(buf, "%s/bygfoot.conf", conf_dir); + sprintf(buf, "%s%sbygfoot.conf", conf_dir, G_DIR_SEPARATOR_S); file_save_opt_file(buf, &options); } if(save_user) { if(strcmp(current_user.name, "NONAME") == 0) - sprintf(buf, "%s/bygfoot_user.conf", conf_dir); + sprintf(buf, "%s%sbygfoot_user.conf", conf_dir, G_DIR_SEPARATOR_S); else - sprintf(buf, "%s/bygfoot_%s.conf", conf_dir, current_user.name); + sprintf(buf, "%s%sbygfoot_%s.conf", conf_dir, G_DIR_SEPARATOR_S, current_user.name); file_save_opt_file(buf, ¤t_user.options); } diff --git a/src/player.c b/src/player.c index f68823c1..2278d8ee 100644 --- a/src/player.c +++ b/src/player.c @@ -55,22 +55,22 @@ player_new(Team *tm, gfloat average_talent, gboolean new_id) new.id = (new_id) ? player_id_new : -1; new.pos = player_get_position_from_structure(tm->structure, tm->players->len); new.cpos = new.pos; - new.age = math_gauss_dist(const_float("float_player_age_lower"), - const_float("float_player_age_upper")); - new.peak_age = - math_rnd(const_float("float_player_peak_age_lower") + - (new.pos == PLAYER_POS_GOALIE) * - const_float("float_player_peak_age_goalie_addition"), - const_float("float_player_peak_age_upper") + - (new.pos == PLAYER_POS_GOALIE) * - const_float("float_player_peak_age_goalie_addition")); + new.age = 30;/* math_gauss_dist(const_float("float_player_age_lower"), */ +/* const_float("float_player_age_upper")); */ + new.peak_age = 30; +/* math_rnd(const_float("float_player_peak_age_lower") + */ +/* (new.pos == PLAYER_POS_GOALIE) * */ +/* const_float("float_player_peak_age_goalie_addition"), */ +/* const_float("float_player_peak_age_upper") + */ +/* (new.pos == PLAYER_POS_GOALIE) * */ +/* const_float("float_player_peak_age_goalie_addition")); */ - new.peak_region = - math_gauss_dist(const_float("float_player_peak_region_lower"), - const_float("float_player_peak_region_upper")); +new.peak_region = 2; +/* math_gauss_dist(const_float("float_player_peak_region_lower"), */ +/* const_float("float_player_peak_region_upper")); */ - new.talent = CLAMP(average_talent * skill_factor, 0, - const_float("float_player_max_skill")); + new.talent = 85;/* CLAMP(average_talent * skill_factor, 0, */ +/* const_float("float_player_max_skill")); */ new.skill = player_skill_from_talent(&new); new.cskill = new.skill; @@ -312,9 +312,9 @@ player_id_index(const Team *tm, gint player_id) if(g_array_index(tm->players, Player, i).id == player_id) return i; - g_warning("player_id_index: didn't find player with id %d of team %s\n", player_id, tm->name); - - main_exit_program(EXIT_INT_NOT_FOUND, NULL); + main_exit_program(EXIT_INT_NOT_FOUND, + "player_id_index: didn't find player with id %d of team %s\n", + player_id, tm->name); return -1; } @@ -327,14 +327,9 @@ Player* player_of_idx_team(const Team *tm, gint number) { if(tm->players->len <= number) - { - g_warning("player_of_idx_team: Player list of team %s too short for number %d.\n", - tm->name, number); - - main_exit_program(EXIT_POINTER_NOT_FOUND, NULL); - - return NULL; - } + main_exit_program(EXIT_POINTER_NOT_FOUND, + "player_of_idx_team: Player list of team %s too short for number %d.\n", + tm->name, number); return &g_array_index(tm->players, Player, number); } @@ -353,9 +348,9 @@ player_of_id_team(const Team *tm, gint id) if(g_array_index(tm->players, Player, i).id == id) return &g_array_index(tm->players, Player, i); - g_warning("player_of_id_team: didn't find player with id %d of team %s\n", id, tm->name); - - main_exit_program(EXIT_POINTER_NOT_FOUND, NULL); + main_exit_program(EXIT_POINTER_NOT_FOUND, + "player_of_id_team: didn't find player with id %d of team %s\n", + id, tm->name); return NULL; } @@ -587,13 +582,11 @@ player_move(Team *tm1, gint player_number, Team *tm2, gint insert_at) void player_swap(Team *tm1, gint player_number1, Team *tm2, gint player_number2) { - gint clid = -1; gint move = (tm1 == tm2 && player_number1 < player_number2) ? -1 : 1; if(stat0 == STATUS_LIVE_GAME_PAUSE) { - clid = usr(stat2).live_game.fix->clid; if((player_number1 < 11 && player_is_banned(player_of_idx_team(tm1, player_number1)) > 0 && player_of_idx_team(tm1, player_number1)->participation) || (player_number2 < 11 && player_is_banned(player_of_idx_team(tm2, player_number2)) > 0 && @@ -699,10 +692,12 @@ player_is_banned(const Player *pl) gfloat player_get_game_skill(const Player *pl, gboolean skill) { - if(skill) - return pl->skill * powf(pl->fitness, const_float("float_player_fitness_exponent")); - - return pl->cskill * powf(pl->fitness, const_float("float_player_fitness_exponent")); + return (skill) ? pl->skill * + powf(pl->fitness, const_float("float_player_fitness_exponent")) * + (1 + (gfloat)pl->streak * const_float("float_player_streak_influence_skill")) : + pl->cskill * + powf(pl->fitness, const_float("float_player_fitness_exponent")) * + (1 + (gfloat)pl->streak * const_float("float_player_streak_influence_skill")); } /** Decrease a player's fitness during a match. @@ -861,10 +856,8 @@ player_games_goals_get(const Player *pl, gint clid, gint type) else if(type == PLAYER_VALUE_SHOTS) return_value = g_array_index(pl->games_goals, PlayerGamesGoals, i).shots; else - { - g_warning("player_games_goals_get: unknown type %d.\n", type); - main_exit_program(EXIT_INT_NOT_FOUND, NULL); - } + main_exit_program(EXIT_INT_NOT_FOUND, + "player_games_goals_get: unknown type %d.\n", type); } return return_value; @@ -974,7 +967,8 @@ player_update_injury(Player *pl) { gint i, j; gfloat rndom; - gint physio = user_from_team(pl->team)->physio; + gint physio = (query_player_is_cpu(pl)) ? + QUALITY_GOOD : user_from_team(pl->team)->physio; gfloat injury_decrease_probs[4][3] = {{const_float("float_player_injury_recovery_best0"), const_float("float_player_injury_recovery_best1"), @@ -1084,10 +1078,18 @@ player_update_streak(Player *pl) } } -/** Update a player in a user team (age, skill etc.). */ +/** Update a player in a team (age, skill etc.). */ void player_update_weekly(Player *pl) { + if(pl->health > 0) + player_update_injury(pl); + else + player_update_streak(pl); + + if(query_player_is_cpu(pl)) + return; + pl->age += 0.0192; if(debug < 50) @@ -1106,11 +1108,6 @@ player_update_weekly(Player *pl) player_remove_contract(pl); player_update_skill(pl); - - if(pl->health > 0) - player_update_injury(pl); - else - player_update_streak(pl); } /** Remove a player from a user team after the contract expired. @@ -1135,7 +1132,7 @@ player_remove_from_team(Team *tm, gint idx) } /** Make some player updates after a match - for user players. + for players. @param pl The player we update. @param clid The fixture clid. */ void @@ -1197,10 +1194,9 @@ player_replace_by_new(Player *pl, gboolean free_player) g_array_insert_val(tm->players, idx, new); } -/** Update players in user teams. +/** Update players in teams. @param tm The team of the player. @param idx The index in the players array. */ -/*d maybe argument player pointer?*/ void player_update_week_roundly(Team *tm, gint idx) { @@ -1384,10 +1380,6 @@ player_move_from_ya(gint idx) void player_streak_add_to_prob(Player *pl, gfloat add) { - /** No streaks for CPU players (yet). */ - if(team_is_user(pl->team) == -1) - return; - pl->streak_prob += add; pl->streak_prob = CLAMP(pl->streak_prob, -1, 1); } diff --git a/src/player.h b/src/player.h index 9d6ab90f..06142ae9 100644 --- a/src/player.h +++ b/src/player.h @@ -38,7 +38,10 @@ enum PlayerCompareAttrib PLAYER_COMPARE_ATTRIBUTE_END }; +/** Whether or not a player is a youth according to his age. */ #define query_player_is_youth(pl) (pl->age <= const_float("float_player_age_lower")) +/** Whether the player belongs to a cpu team. */ +#define query_player_is_cpu(pl) (team_is_user(pl->team) == -1) /** Reset the streak counter. */ #define player_streak_reset_count(pl) pl->streak_count = -math_rnd((gfloat)const_int("int_player_streak_lock_length_lower"), (gfloat)const_int("int_player_streak_lock_length_upper")) diff --git a/src/start_end.c b/src/start_end.c index ad0182d0..ae754db8 100644 --- a/src/start_end.c +++ b/src/start_end.c @@ -59,13 +59,13 @@ WeekFunc end_week_round_funcs[] = /** Array of functions called when a week round is started. */ WeekFunc start_week_round_funcs[] = -{start_week_round_update_user_teams , NULL}; +{start_week_round_update_teams , NULL}; /** Array of functions called when a week is started. */ WeekFunc start_week_funcs[] = {start_week_add_cups, start_week_update_users, - start_week_update_user_teams, start_week_update_user_finances, + start_week_update_teams, start_week_update_user_finances, youth_academy_update_weekly, transfer_update, NULL}; WeekFunc end_week_funcs[] = {stat_update_leagues, end_week_hide_cups, NULL}; @@ -75,6 +75,7 @@ void start_new_game(void) { start_write_variables(); + start_generate_league_teams(); start_new_season(); } @@ -185,7 +186,7 @@ start_generate_league_teams(void) if(ligs->len == 0) main_exit_program(EXIT_NO_LEAGUES, - "start_generate_league_teams: no leagues found. there must be at least one league in the game.\n"); + "start_generate_league_teams: no leagues found. There must be at least one league in the game.\n"); for(i=0;ilen;i++) for(j=0;jlen;j++) @@ -461,23 +462,33 @@ 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_user_teams(void) +start_week_update_teams(void) { - gint i; + gint i, j; - for(i=0;ilen;i++) - team_update_user_team_weekly(usr(i).tm); + for(i=0;ilen;i++) + for(j=0;jlen;j++) + team_update_team_weekly(&g_array_index(lig(i).teams, Team, j)); + + for(i=0;ilen;i++) + for(j=0;jlen;j++) + team_update_team_weekly((Team*)g_ptr_array_index(cp(i).teams, j)); } /** Do some things at the beginning of each new round for the user teams. */ void -start_week_round_update_user_teams(void) +start_week_round_update_teams(void) { - gint i; + gint i, j; - for(i=0;ilen;i++) - team_update_user_team_week_roundly(usr(i).tm); + for(i=0;ilen;i++) + for(j=0;jlen;j++) + team_update_team_week_roundly(&g_array_index(lig(i).teams, Team, j)); + + for(i=0;ilen;i++) + for(j=0;jlen;j++) + team_update_team_week_roundly((Team*)g_ptr_array_index(cp(i).teams, j)); } /** Deduce wages etc. */ diff --git a/src/start_end.h b/src/start_end.h index 56519a1b..67c4f35e 100644 --- a/src/start_end.h +++ b/src/start_end.h @@ -57,10 +57,10 @@ void start_week(void); void -start_week_update_user_teams(void); +start_week_update_teams(void); void -start_week_round_update_user_teams(void); +start_week_round_update_teams(void); void start_week_update_user_finances(void); diff --git a/src/strategy.c b/src/strategy.c new file mode 100644 index 00000000..0e83e29d --- /dev/null +++ b/src/strategy.c @@ -0,0 +1,574 @@ +/* + Bygfoot Football Manager -- a small and simple GTK2-based + football management game. + + http://bygfoot.sourceforge.net + + Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com) + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#include "fixture.h" +#include "league.h" +#include "live_game.h" +#include "main.h" +#include "misc.h" +#include "option.h" +#include "player.h" +#include "strategy.h" +#include "team.h" + +GPtrArray *token_strat[2]; + +/** Return the sid of a random strategy from the + strategies array (also dependent on the priorities + of the strategies). */ +gchar* +strategy_get_random(void) +{ + gint i, rndom = + math_rndi(1, g_array_index(strategies, Strategy, strategies->len - 1).priority); + + if(rndom <= g_array_index(strategies, Strategy, 0).priority) + return g_strdup(g_array_index(strategies, Strategy, 0).sid); + + for(i=1;ilen;i++) + if(rndom <= g_array_index(strategies, Strategy, i).priority) + return g_strdup(g_array_index(strategies, Strategy, i).sid); + + main_exit_program(EXIT_STRATEGY_ERROR, "team_strategy_get_random: no strategy found."); + + return NULL; +} + +/** Compare function for sorting the players given a specific + strategy. */ +gint +strategy_compare_players(gconstpointer a, + gconstpointer b, + gpointer user_data) +{ + const Player *pl1 = *(const Player**)a; + const Player *pl2 = *(const Player**)b; + const StrategyPrematch *strat = (StrategyPrematch*)user_data; + gint return_value = 0; + + if(pl1->pos != pl2->pos) + return_value = misc_int_compare(pl2->pos, pl1->pos); + else if(pl1->cskill == 0 && pl2->cskill > 0) + return_value = 1; + else if(pl2->cskill == 0 && pl1->cskill > 0) + return_value = -1; + else if(strat->min_fitness != 0 && + pl1->fitness < strat->min_fitness && + pl2->fitness >= strat->min_fitness) + return_value = 1; + else if(strat->min_fitness != 0 && + pl1->fitness >= strat->min_fitness && + pl2->fitness < strat->min_fitness) + return_value = -1; + else + { + gfloat skill1 = player_get_game_skill(pl1, TRUE), + skill2 = player_get_game_skill(pl2, TRUE); + + if(strat->lineup == STRAT_LINEUP_BEST) + return_value = misc_float_compare(skill1, skill2); + else if(strat->lineup == STRAT_LINEUP_WEAKEST) + return_value = misc_float_compare(skill2, skill1); + else if(strat->lineup == STRAT_LINEUP_FITTEST) + { + return_value = misc_float_compare(pl1->fitness, pl2->fitness); + if(pl1->fitness == pl2->fitness) + return_value = misc_float_compare(skill1, skill2); + } + else + g_warning("strategy_compare_players: unknown lineup type %d\n", strat->lineup); + } + + return return_value; +} + +/** Check whether a lineup described in the prematch using the given + formation can be made with the players. */ +gboolean +query_strategy_formation_possible(const GPtrArray *players, const StrategyPrematch *prematch, + gint formation) +{ + gint i, pos[3] = {0, 0, 0}; + + for(i=0;ilen;i++) + if(((Player*)g_ptr_array_index(players, i))->pos > 0 && + ((Player*)g_ptr_array_index(players, i))->cskill > 0 && + ((Player*)g_ptr_array_index(players, i))->fitness >= + prematch->min_fitness) + pos[((Player*)g_ptr_array_index(players, i))->pos - 1]++; + + if(pos[2] >= math_get_place(formation, 1) && + pos[1] >= math_get_place(formation, 2) && + pos[0] >= math_get_place(formation, 3)) + return TRUE; + + return FALSE; +} + +/** Make the necessary substitutions to satisfy the given prematch + and formation requirements. */ +void +strategy_update_lineup(Team *tm, const GPtrArray *players, + const StrategyPrematch *prematch, gint formation) +{ + gint i; + GArray *ids = g_array_new(FALSE, FALSE, sizeof(gint)); + GArray *new_players = g_array_new(FALSE, FALSE, sizeof(Player)); + gint form[3] = {math_get_place(formation, 3), + math_get_place(formation, 2), + math_get_place(formation, 1)}, + pos[3] = {0, 0, 0}; + + /* Repair goalie if necessary. */ + if(((Player*)g_ptr_array_index(players, 0))->cskill == 0) + strategy_repair_player((Player*)g_ptr_array_index(players, 0)); + + g_array_append_val(ids, ((Player*)g_ptr_array_index(players, 0))->id); + + for(i=0;ilen;i++) + if(((Player*)g_ptr_array_index(players, i))->pos > 0 && + pos[((Player*)g_ptr_array_index(players, i))->pos - 1] < + form[((Player*)g_ptr_array_index(players, i))->pos - 1]) + { + g_array_append_val(ids, ((Player*)g_ptr_array_index(players, i))->id); + pos[((Player*)g_ptr_array_index(players, i))->pos - 1]++; + } + + for(i=0;ilen;i++) + g_array_append_val(new_players, + *(player_of_id_team(tm, g_array_index(ids, gint, i)))); + + for(i=0;iplayers->len;i++) + if(!query_misc_integer_is_in_g_array( + g_array_index(tm->players, Player, i).id, ids)) + g_array_append_val(new_players, g_array_index(tm->players, Player, i)); + + g_array_free(tm->players, TRUE); + tm->players = new_players; + g_array_free(ids, TRUE); + + tm->structure = formation; + team_rearrange(tm); +} + +/** Delete red cards, cure injuries etc. Used to + make sure a CPU team doesn't break. */ +void +strategy_repair_player(Player *pl) +{ + gint i; + + for(i=0;icards->len;i++) + g_array_index(pl->cards, PlayerCard, i).red = 0; + + pl->health = + pl->recovery = 0; + pl->cskill = + player_get_cskill(pl, pl->pos, FALSE); + + pl->fitness = + math_rnd(const_float("float_player_fitness_lower"), + const_float("float_player_fitness_upper")); +} + +/** 'Repair' exactly as many players as are required to be able + to make a lineup of healthy players with the primary formation + of the given prematch. */ +void +strategy_repair_players(GPtrArray *players, + const StrategyPrematch *prematch) +{ + gint i, j; + gint form[3] = + {math_get_place(g_array_index(prematch->formations, gint, 0), 3), + math_get_place(g_array_index(prematch->formations, gint, 0), 2), + math_get_place(g_array_index(prematch->formations, gint, 0), 1)}; + gint pos[3] = {0, 0, 0}; + + for(i=0;ilen;i++) + if(((Player*)g_ptr_array_index(players, i))->pos > 0 && + ((Player*)g_ptr_array_index(players, i))->cskill > 0) + pos[((Player*)g_ptr_array_index(players, i))->pos - 1]++; + + for(i=0;i<3;i++) + { + while(pos[i] < form[i]) + for(j=0;jlen;j++) + if(((Player*)g_ptr_array_index(players, j))->pos == i + 1 && + ((Player*)g_ptr_array_index(players, j))->cskill == 0) + { + strategy_repair_player((Player*)g_ptr_array_index(players, j)); + pos[i]++; + } + } + + g_ptr_array_sort_with_data(players, (GCompareDataFunc)strategy_compare_players, + (gpointer)prematch); +} + +/** Make team changes according to the rules in the prematch. */ +void +strategy_apply_prematch(Team *tm, const StrategyPrematch *prematch) +{ + gint i; + GPtrArray *players = player_get_pointers_from_array(tm->players); + + tm->style = prematch->style; + tm->boost = prematch->boost; + + g_ptr_array_sort_with_data(players, (GCompareDataFunc)strategy_compare_players, + (gpointer)prematch); + + for(i=0;iformations->len;i++) + if(query_strategy_formation_possible( + players, prematch, + g_array_index(prematch->formations, gint, i))) + { + strategy_update_lineup( + tm, players,prematch, + g_array_index(prematch->formations, gint, i)); + break; + } + + /* We have to repair players to be able to satisfy + a formation. */ + if(i == prematch->formations->len) + { + strategy_repair_players(players, prematch); + strategy_update_lineup(tm, players, prematch, + g_array_index(prematch->formations, gint, 0)); + } + + g_ptr_array_free(players, TRUE); +} + +/** Make necessary subs etc. for a CPU team. */ +void +strategy_update_team_pre_match(Team *tm) +{ + gint i; + const GArray *prematches = + strategy_from_sid(tm->strategy_sid)->prematch; + + strategy_set_tokens(tm, NULL); + + for(i=prematches->len - 1; i >= 0; i--) + if(g_array_index(prematches, StrategyPrematch, i).condition == NULL || + misc_parse_condition(g_array_index(prematches, StrategyPrematch, i).condition, + token_strat)) + { + strategy_apply_prematch(tm, &g_array_index(prematches, StrategyPrematch, i)); + break; + } + + strategy_free_tokens(); + + if(i == -1) + main_exit_program(EXIT_STRATEGY_ERROR, + "strategy_update_team_pre_match: none of the prematch conditions of strategy %s for team %s are fulfilled. remember that a strategy should contain an unconditional prematch.", + tm->strategy_sid, tm->name); +} + +/** Get the strategy going with the sid. */ +Strategy* +strategy_from_sid(const gchar *sid) +{ + gint i; + + for(i=0;ilen;i++) + if(strcmp(g_array_index(strategies, Strategy, i).sid, sid) == 0) + return &g_array_index(strategies, Strategy, i); + + main_exit_program(EXIT_STRATEGY_ERROR, + "strategy_from_sid: strategy '%s' not found.", sid); + + return NULL; +} + +/** Add tokens that will be evaluated when checking + strategy conditions. */ +void +strategy_set_tokens(const Team *tm, const Fixture *fixture) +{ + const Fixture *fix = (fixture == NULL) ? + team_get_fixture(tm, FALSE) : fixture; + const Team *opp = (fix == NULL) ? NULL : + fix->teams[fix->teams[0] == tm]; + + token_strat[0] = g_ptr_array_new(); + token_strat[1] = g_ptr_array_new(); + + if(opp == NULL) + return; + + misc_token_add(token_strat, + option_int("string_token_homeadv", &tokens), + misc_int_to_char(((fix->teams[0] == tm) ? 1 : -1) * + fix->home_advantage)); + + misc_token_add(token_strat, + option_int("string_token_cup", &tokens), + misc_int_to_char(fix->clid >= ID_CUP_START)); + + misc_token_add(token_strat, + option_int("string_token_avskilldiff", &tokens), + misc_int_to_char((gint)rint(team_get_average_skill(tm, FALSE) - + team_get_average_skill(opp, FALSE)))); + if(tm->clid < ID_CUP_START && + opp->clid < ID_CUP_START) + misc_token_add(token_strat, + option_int("string_token_team_layerdiff", &tokens), + misc_int_to_char(league_from_clid(tm->clid)->layer - + league_from_clid(opp->clid)->layer)); + + misc_token_add(token_strat, + option_int("string_token_goals_to_win", &tokens), + misc_int_to_char(fixture_get_goals_to_win(fix, tm))); +} + +/** Free the token arrays. */ +void +strategy_free_tokens(void) +{ + gint i; + + for(i=0;ilen;i++) + { + g_free(g_ptr_array_index(token_strat[0], i)); + g_free(g_ptr_array_index(token_strat[1], i)); + } + + g_ptr_array_free(token_strat[0], TRUE); + g_ptr_array_free(token_strat[1], TRUE); +} + +/** Fill the necessary tokens during a live game. */ +void +strategy_live_game_set_tokens(const LiveGame *match, gint team_idx) +{ + gint tmp_int, + current_min = live_game_unit_get_minute( + &g_array_index(match->units, LiveGameUnit, match->units->len - 1)); + const Team *tm = match->fix->teams[team_idx]; + + strategy_set_tokens(tm, match->fix); + + misc_token_add(token_strat, + option_int("string_token_subs_left", &tokens), + misc_int_to_char(match->subs_left[team_idx])); + misc_token_add(token_strat, + option_int("string_token_num_def", &tokens), + misc_int_to_char(math_get_place(tm->structure, 3))); + misc_token_add(token_strat, + option_int("string_token_num_mid", &tokens), + misc_int_to_char(math_get_place(tm->structure, 2))); + misc_token_add(token_strat, + option_int("string_token_num_att", &tokens), + misc_int_to_char(math_get_place(tm->structure, 1))); + misc_token_add(token_strat, + option_int("string_token_form", &tokens), + misc_int_to_char(tm->structure)); + misc_token_add(token_strat, + option_int("string_token_time", &tokens), + misc_int_to_char( + g_array_index(match->units, LiveGameUnit, match->units->len - 1).time)); + misc_token_add(token_strat, + option_int("string_token_minute", &tokens), + misc_int_to_char(current_min)); + + tmp_int = live_game_get_minutes_remaining( + &g_array_index(match->units, LiveGameUnit, match->units->len - 1)); + + if(tmp_int > 0) + misc_token_add(token_strat, + option_int("string_token_minute_remaining", &tokens), + misc_int_to_char(tmp_int)); + + if(query_fixture_is_draw(match->fix)) + tmp_int = 120 - current_min; + else + tmp_int = 90 - current_min; + + if(tmp_int > 0) + misc_token_add(token_strat, + option_int("string_token_minute_total", &tokens), + misc_int_to_char(tmp_int)); +} + +/** Compare function for sorting the players when + looking for substitutes. */ +gint +strategy_compare_players_sub(gconstpointer a, + gconstpointer b, + gpointer user_data) +{ + gfloat skill1, skill2; + const Player *pl1 = *(const Player**)a; + const Player *pl2 = *(const Player**)b; + gint type = GPOINTER_TO_INT(user_data); + gint return_value = 0; + + switch(type) + { + default: + g_warning("strategy_compare_players_sub: unknown type %d\n", + type); + return_value = 0; + break; + case STRAT_LINEUP_FITTEST: + return_value = misc_float_compare(pl1->fitness, + pl2->fitness); + break; + case STRAT_LINEUP_UNFITTEST: + return_value = misc_float_compare(pl2->fitness, + pl1->fitness); + break; + case STRAT_LINEUP_BEST: + skill1 = player_get_game_skill(pl1, TRUE); + skill2 = player_get_game_skill(pl2, TRUE); + return_value = misc_float_compare(skill1, skill2); + break; + case STRAT_LINEUP_WEAKEST: + skill1 = player_get_game_skill(pl1, TRUE); + skill2 = player_get_game_skill(pl2, TRUE); + return_value = misc_float_compare(skill2, skill1); + break; + } + + return return_value; +} + +/** Find an appropriate player to send out or in. + @param tm The team we work with. + @param position The position of the player we seek. + @param property According to which property to sort players. + @param sub_in Whether we look for a player to send in or out. */ +gint +strategy_get_sub(const Team *tm, gint position, + gint property, gboolean sub_in) +{ + gint i, start = (sub_in) ? 11 : 0, + stop = (sub_in) ? tm->players->len : 11; + GPtrArray *players = g_ptr_array_new(); + gint return_value = -1; + + for(i=start;ipos == position && + player_of_idx_team(tm, i)->cskill > 0 && + (i > 10 || player_is_banned(player_of_idx_team(tm, i)) <= 0)) + g_ptr_array_add(players, (gpointer)player_of_idx_team(tm, i)); + + if(players->len == 0) + { + g_ptr_array_free(players, TRUE); + return -1; + } + + g_ptr_array_sort_with_data(players, + (GCompareDataFunc)strategy_compare_players_sub, + GINT_TO_POINTER(property)); + + return_value = ((Player*)g_ptr_array_index(players, 0))->id; + + g_ptr_array_free(players, TRUE); + + return return_value; +} + +/** Apply the strategy actions specified to the given team. */ +void +strategy_live_game_apply_action(LiveGame *match, gint team_idx, + const StrategyMatchAction *action) +{ + gint sub_in_id = -1, sub_out_id = -1; + Team *tm = match->fix->teams[team_idx]; + gint old_form = tm->structure; + + if(action->style != -100 && tm->style != action->style) + { + tm->style = action->style; + live_game_event_team_change(team_idx, + LIVE_GAME_EVENT_STYLE_CHANGE_ALL_OUT_DEFEND + + tm->style + 2); + } + + if(action->boost != -100 && tm->boost != action->boost) + { + tm->boost = action->boost; + live_game_event_team_change(team_idx, + LIVE_GAME_EVENT_BOOST_CHANGE_ANTI + + tm->boost + 1); + } + + if(action->sub_in_pos != -1 && match->subs_left[team_idx] > 0) + { + sub_in_id = strategy_get_sub(tm, action->sub_in_pos, + action->sub_in_prop, TRUE); + sub_out_id = strategy_get_sub(tm, action->sub_out_pos, + action->sub_in_prop, FALSE); + + if(sub_in_id > 0 && sub_out_id > 0) + { + player_swap(tm, player_id_index(tm, sub_out_id), + tm, player_id_index(tm, sub_in_id)); + + team_change_structure(tm, team_find_appropriate_structure(tm)); + team_rearrange(tm); + + live_game_event_substitution(team_idx, sub_in_id, sub_out_id); + + if(tm->structure != old_form) + live_game_event_team_change(team_idx, + LIVE_GAME_EVENT_STRUCTURE_CHANGE); + } + } +} + +/** Take match actions specified in the team's strategy + if necessary. */ +void +strategy_live_game_check(LiveGame *match, gint team_idx) +{ + gint i; + Team *tm = match->fix->teams[team_idx]; + const Strategy *strat = strategy_from_sid(tm->strategy_sid); + + strategy_live_game_set_tokens(match, team_idx); + + for(i=strat->match_action->len - 1; i >= 0; i--) + { + if((match->subs_left[team_idx] > 0 || + g_array_index(strat->match_action, StrategyMatchAction, i).sub_in_pos == -1) && + misc_parse_condition( + g_array_index(strat->match_action, StrategyMatchAction, i).condition, + token_strat)) + { + strategy_live_game_apply_action( + match, team_idx, + &g_array_index(strat->match_action, StrategyMatchAction, i)); + break; + } + } + + strategy_free_tokens(); +} diff --git a/src/strategy.h b/src/strategy.h new file mode 100644 index 00000000..3f79fc6e --- /dev/null +++ b/src/strategy.h @@ -0,0 +1,92 @@ +/* + Bygfoot Football Manager -- a small and simple GTK2-based + football management game. + + http://bygfoot.sourceforge.net + + Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com) + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef STRATEGY_H +#define STRATEGY_H + +#include "bygfoot.h" +#include "strategy_struct.h" +/* #include "team_struct.h" */ +#include "variables.h" + +void +strategy_update_team_pre_match(Team *tm); + +gint +strategy_compare_players(gconstpointer a, + gconstpointer b, + gpointer user_data); +gchar* +strategy_get_random(void); + +Strategy* +strategy_from_sid(const gchar *sid); + +gboolean +query_strategy_formation_possible(const GPtrArray *players, + const StrategyPrematch *prematch, + gint formation); + +void +strategy_update_lineup(Team *tm, const GPtrArray *players, + const StrategyPrematch *prematch, gint formation); + +void +strategy_repair_player(Player *pl); + +void +strategy_repair_players(GPtrArray *players, + const StrategyPrematch *prematch); + +void +strategy_set_tokens(const Team *tm, const Fixture *fix); + +void +strategy_free_tokens(void); + +void +strategy_apply_prematch(Team *tm, const StrategyPrematch *prematch); + +void +strategy_live_game_set_tokens(const LiveGame *match, gint team_idx); + +void +strategy_live_game_check(LiveGame *match, gint team_idx); + +void +strategy_live_game_apply_action(LiveGame *match, gint team_idx, + const StrategyMatchAction *action); + +void +strategy_live_game_initialize(const Fixture *fix); + +gint +strategy_compare_players_sub(gconstpointer a, + gconstpointer b, + gpointer user_data); + +gint +strategy_get_sub(const Team *tm, gint position, + gint property, gboolean sub_in); + +#endif diff --git a/src/strategy_struct.h b/src/strategy_struct.h new file mode 100644 index 00000000..5754d6e8 --- /dev/null +++ b/src/strategy_struct.h @@ -0,0 +1,80 @@ +/* + Bygfoot Football Manager -- a small and simple GTK2-based + football management game. + + http://bygfoot.sourceforge.net + + Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com) + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef STRATEGY_STRUCT_H +#define STRATEGY_STRUCT_H + +/** Lineup types for a CPU team (ie. which players + are preferred when putting together the first 11). */ +enum StratLineupType +{ + STRAT_LINEUP_BEST = 0, + STRAT_LINEUP_WEAKEST, + STRAT_LINEUP_FITTEST, + STRAT_LINEUP_UNFITTEST, + STRAT_LINEUP_END +}; + +/** A struct describing the pre-match strategy settings + of a CPU team. */ +typedef struct +{ + /** A condition describing when the strategy should be applied. */ + gchar *condition; + /** Array of possible formations, sorted by preference. */ + GArray *formations; + /** Boost, style values and lineup type. */ + gint boost, style, lineup; + /** The fitness value below which a player gets substituted + if there's a sub with better fitness. */ + gfloat min_fitness; +} StrategyPrematch; + +typedef struct +{ + /** A condition describing when the action should be taken. */ + gchar *condition; + /** New boost and style values. */ + gint boost, style; + /** Substitution specifiers (position and property). + Property is taken from #StratLineupType. */ + gint sub_in_pos, sub_in_prop, + sub_out_pos, sub_out_prop; + +} StrategyMatchAction; + +/** A CPU strategy. */ +typedef struct +{ + /** String id and description of the strategy. */ + gchar *sid, *desc; + /** How often this strategy gets picked, relative + to the other strategies. */ + gint priority; + /** Array with prematch settings. */ + GArray *prematch; + /** Array with match settings. */ + GArray *match_action; +} Strategy; + +#endif diff --git a/src/team.c b/src/team.c index 4e3d635e..d9c8fdc6 100644 --- a/src/team.c +++ b/src/team.c @@ -32,6 +32,7 @@ #include "misc.h" #include "option.h" #include "player.h" +#include "strategy.h" #include "team.h" #include "transfer.h" #include "user.h" @@ -48,16 +49,14 @@ team_new(gboolean new_id) { Team new; - new.name = NULL; - new.names_file = NULL; - new.symbol = NULL; - new.def_file = NULL; - new.stadium.name = NULL; + new.name = new.names_file = + new.symbol = new.def_file = + new.stadium.name = new.strategy_sid = NULL; new.clid = -1; new.id = (new_id) ? team_id_new : -1; - new.structure = team_assign_playing_structure(); - new.style = team_assign_playing_style(); + new.structure = 442; ///*dteam_assign_playing_structure(); + new.style = 0; ///*dteam_assign_playing_style(); new.boost = 0; new.average_talent = 0; @@ -126,6 +125,8 @@ team_generate_players_stadium(Team *tm) gfloat wages = 0, average_talent; gchar *def_file = team_has_def_file(tm); + tm->strategy_sid = strategy_get_random(); + tm->stadium.average_attendance = tm->stadium.possible_attendance = tm->stadium.games = 0; tm->stadium.safety = @@ -246,9 +247,8 @@ team_of_id(gint id) if(((Team*)g_ptr_array_index(cp(i).teams, j))->id == id) return (Team*)g_ptr_array_index(cp(i).teams, j); - g_warning("team_of_id: team with id %d not found.", id); - - main_exit_program(EXIT_POINTER_NOT_FOUND, NULL); + main_exit_program(EXIT_POINTER_NOT_FOUND, + "team_of_id: team with id %d not found.", id); return NULL; } @@ -271,21 +271,22 @@ team_get_fixture(const Team *tm, gboolean last_fixture) if(!last_fixture) { - for(i=0;ilen;i++) - { - if(lig(i).active && lig(i).id == tm->clid) + if(tm->clid < ID_CUP_START) + for(i=0;ilen;i++) { - for(j=0;jlen;j++) - if(g_array_index(lig(i).fixtures, Fixture, j).attendance == -1 && - query_fixture_team_involved((&g_array_index(lig(i).fixtures, Fixture, j)), tm->id)) - { - fix = &g_array_index(lig(i).fixtures, Fixture, j); - break; - } + if(lig(i).active && lig(i).id == tm->clid) + { + for(j=0;jlen;j++) + if(g_array_index(lig(i).fixtures, Fixture, j).attendance == -1 && + query_fixture_team_involved((&g_array_index(lig(i).fixtures, Fixture, j)), tm->id)) + { + fix = &g_array_index(lig(i).fixtures, Fixture, j); + break; + } - break; + break; + } } - } for(i=0;ilen;i++) if(fix == NULL || @@ -309,21 +310,22 @@ team_get_fixture(const Team *tm, gboolean last_fixture) } else { - for(i=0;ilen;i++) - { - if(lig(i).active && lig(i).id == tm->clid) + if(tm->clid < ID_CUP_START) + for(i=0;ilen;i++) { - for(j=lig(i).fixtures->len - 1;j>=0;j--) - if(g_array_index(lig(i).fixtures, Fixture, j).attendance != -1 && - query_fixture_team_involved((&g_array_index(lig(i).fixtures, Fixture, j)), tm->id)) - { - fix = &g_array_index(lig(i).fixtures, Fixture, j); - break; - } + if(lig(i).active && lig(i).id == tm->clid) + { + for(j=lig(i).fixtures->len - 1;j>=0;j--) + if(g_array_index(lig(i).fixtures, Fixture, j).attendance != -1 && + query_fixture_team_involved((&g_array_index(lig(i).fixtures, Fixture, j)), tm->id)) + { + fix = &g_array_index(lig(i).fixtures, Fixture, j); + break; + } - break; + break; + } } - } for(i=0;ilen;i++) if(fix == NULL || @@ -434,10 +436,9 @@ team_get_league_rank(const Team *tm) if(g_array_index(elements, TableElement, i).team_id == tm->id) return i + 1; - g_warning("team_get_league_rank: no rank found for team %s in league %s. \n", - tm->name, league_cup_get_name_string(tm->clid)); - - main_exit_program(EXIT_INT_NOT_FOUND, NULL); + main_exit_program(EXIT_INT_NOT_FOUND, + "team_get_league_rank: no rank found for team %s in league %s. \n", + tm->name, league_cup_get_name_string(tm->clid)); return -1; } @@ -457,11 +458,9 @@ team_get_cup_rank(const Team *tm, const CupRound *cupround, gboolean abort) } if(abort) - { - g_warning("team_get_cup_rank: no rank found for team %s. \n ", tm->name); - - main_exit_program(EXIT_INT_NOT_FOUND, NULL); - } + main_exit_program(EXIT_INT_NOT_FOUND, + "team_get_cup_rank: no rank found for team %s. \n ", + tm->name); return -1; } @@ -541,8 +540,9 @@ team_attribute_to_char(gint attribute, gint value) switch(attribute) { default: - g_warning("team_attribute_to_char: unknown attribute %d\n", attribute); - main_exit_program(EXIT_INT_NOT_FOUND, NULL); + main_exit_program(EXIT_INT_NOT_FOUND, + "team_attribute_to_char: unknown attribute %d\n", + attribute); break; case TEAM_ATTRIBUTE_STYLE: switch(value) @@ -600,6 +600,7 @@ team_change_attribute_with_message(Team *tm, gint attribute, gint new_value) } } +/*d remove*/ /** Make cpu players healthy etc. @param tm The cpu team. @param reset_fitness Whether to reset the fitness values of playes. */ @@ -651,6 +652,7 @@ team_update_cpu_corrections(Team *tm, gboolean reset_fitness) } } +/*d remove*/ /** Make some random substitutions in the cpu team. */ void team_update_cpu_subs(Team *tm) @@ -671,6 +673,7 @@ team_update_cpu_subs(Team *tm) game_substitute_player(tm, 0); } +/*d remove*/ /** Change a cpu team's structure. */ void team_update_cpu_structure(Team *tm) @@ -705,6 +708,7 @@ team_update_cpu_new_players(Team *tm) } } +/*d remove*/ /** Heal players, re-set fitnesses, make some random subs and replace some players with new ones. @param tm The team we examine. @@ -728,12 +732,16 @@ team_update_cpu_team(Team *tm, gboolean reset_fitness) /** Increase player ages etc. @param tm The user team we examine. */ void -team_update_user_team_weekly(Team *tm) +team_update_team_weekly(Team *tm) { gint i; for(i=tm->players->len - 1;i>=0;i--) player_update_weekly(&g_array_index(tm->players, Player, i)); + + if(team_is_user(tm) == -1 && + math_rnd(0, 1) < const_float("float_team_new_player_probability")) + team_update_cpu_new_players(tm); } /** Regenerate player fitness etc. after a match. @@ -751,12 +759,15 @@ team_update_post_match(Team *tm, const Fixture *fix) /** Some updates each round. @param tm The user team we examine. */ void -team_update_user_team_week_roundly(Team *tm) +team_update_team_week_roundly(Team *tm) { gint i; for(i=0;iplayers->len;i++) player_update_week_roundly(tm, i); + + if(team_is_user(tm) == -1) + strategy_update_team_pre_match(tm); } /** Return a value from the league table element going with the team. @@ -768,13 +779,9 @@ team_get_table_value(const Team *tm, gint type) const GArray *elements = NULL; if(tm->clid >= ID_CUP_START) - { - g_warning("team_get_table_value: team is not a league team: %s \n", tm->name); - - main_exit_program(EXIT_INT_NOT_FOUND, NULL); - - return -1; - } + main_exit_program(EXIT_INT_NOT_FOUND, + "team_get_table_value: team is not a league team: %s \n", + tm->name); elements = league_from_clid(tm->clid)->table.elements; @@ -783,13 +790,9 @@ team_get_table_value(const Team *tm, gint type) break; if(i == elements->len) - { - g_warning("team_get_table_value: table entry not found for team %s \n", tm->name); - - main_exit_program(EXIT_INT_NOT_FOUND, NULL); - - return -1; - } + main_exit_program(EXIT_INT_NOT_FOUND, + "team_get_table_value: table entry not found for team %s \n", + tm->name); return g_array_index(elements, TableElement, i).values[type]; } @@ -951,9 +954,8 @@ team_get_index(const Team *tm) return i; } - g_warning("team_get_index: team %s not found.\n", tm->name); - - main_exit_program(EXIT_INT_NOT_FOUND, NULL); + main_exit_program(EXIT_INT_NOT_FOUND, + "team_get_index: team %s not found.\n", tm->name); return -1; } @@ -985,22 +987,26 @@ query_team_plays(const Team *tm, gint week_number, gint week_round_number) { gint i, j; - for(i=0;ilen;i++) - for(j=0;jlen;j++) - if(g_array_index(lig(i).fixtures, Fixture, j).week_number == week_number && - g_array_index(lig(i).fixtures, Fixture, j).week_round_number == week_round_number && - (g_array_index(lig(i).fixtures, Fixture, j).teams[0] == tm || - g_array_index(lig(i).fixtures, Fixture, j).teams[1] == tm)) - return TRUE; - + if(tm->clid < ID_CUP_START) + for(i=0;ilen;i++) + if(lig(i).id == tm->clid) + for(j=0;jlen;j++) + if(g_array_index(lig(i).fixtures, Fixture, j).week_number == week_number && + g_array_index(lig(i).fixtures, Fixture, j).week_round_number == week_round_number && + (g_array_index(lig(i).fixtures, Fixture, j).teams[0] == tm || + g_array_index(lig(i).fixtures, Fixture, j).teams[1] == tm)) + return TRUE; + for(i=0;ilen;i++) - for(j=0;jfixtures->len;j++) - if(g_array_index(acp(i)->fixtures, Fixture, j).week_number == week_number && - g_array_index(acp(i)->fixtures, Fixture, j).week_round_number == week_round_number && - (g_array_index(acp(i)->fixtures, Fixture, j).teams[0] == tm || - g_array_index(acp(i)->fixtures, Fixture, j).teams[1] == tm)) - return TRUE; - + if(query_cup_is_national(acp(i)->id) || + query_team_is_in_cup(tm, acp(i))) + for(j=0;jfixtures->len;j++) + if(g_array_index(acp(i)->fixtures, Fixture, j).week_number == week_number && + g_array_index(acp(i)->fixtures, Fixture, j).week_round_number == week_round_number && + (g_array_index(acp(i)->fixtures, Fixture, j).teams[0] == tm || + g_array_index(acp(i)->fixtures, Fixture, j).teams[1] == tm)) + return TRUE; + return FALSE; } @@ -1219,7 +1225,6 @@ team_complete_def_sort(Team *tm) math_get_place(tm->structure, 2), math_get_place(tm->structure, 1)}; Player player_tmp, player_tmp2; - gchar buf[SMALL]; for(i=0;i<11;i++) positions[g_array_index(tm->players, Player, i).pos]++; @@ -1247,11 +1252,9 @@ team_complete_def_sort(Team *tm) } if(j == tm->players->len) - { - sprintf(buf, "team_complete_def_sort (1): cannot sort according to structure %d (team %s).", - tm->structure, tm->name); - main_exit_program(EXIT_DEF_SORT, buf); - } + main_exit_program(EXIT_DEF_SORT, + "team_complete_def_sort (1): cannot sort according to structure %d (team %s).", + tm->structure, tm->name); positions[i]--; positions[player_tmp2.pos]++; @@ -1271,11 +1274,9 @@ team_complete_def_sort(Team *tm) } if(j == 11) - { - sprintf(buf, "team_complete_def_sort (2): cannot sort according to structure %d (team %s).", - tm->structure, tm->name); - main_exit_program(EXIT_DEF_SORT, buf); - } + main_exit_program(EXIT_DEF_SORT, + "team_complete_def_sort (2): cannot sort according to structure %d (team %s).", + tm->structure, tm->name); for(j=10;jplayers->len;j++) if(g_array_index(tm->players, Player, j).pos == i) @@ -1286,11 +1287,9 @@ team_complete_def_sort(Team *tm) } if(j == tm->players->len) - { - sprintf(buf, "team_complete_def_sort (3): cannot sort according to structure %d (team %s).", - tm->structure, tm->name); - main_exit_program(EXIT_DEF_SORT, buf); - } + main_exit_program(EXIT_DEF_SORT, + "team_complete_def_sort (3): cannot sort according to structure %d (team %s).", + tm->structure, tm->name); positions[i]++; positions[player_tmp.pos]--; @@ -1321,3 +1320,12 @@ team_get_table_clid(const Team *tm) return tm->clid; } + +const Team* +team_get_next_opponent(const Team *tm) +{ + const Fixture *fix = team_get_fixture(tm, FALSE); + + return (fix == NULL) ? NULL : + fix->teams[fix->teams[0] == tm]; +} diff --git a/src/team.h b/src/team.h index afe244ec..aba83dfd 100644 --- a/src/team.h +++ b/src/team.h @@ -102,7 +102,7 @@ void team_change_attribute_with_message(Team * tm, gint attribute, gint new_value); void -team_update_user_team_weekly(Team *tm); +team_update_team_weekly(Team *tm); void team_update_cpu_team(Team *tm, gboolean reset_fitness); @@ -123,7 +123,7 @@ void team_update_cpu_new_players(Team *tm); void -team_update_user_team_week_roundly(Team *tm); +team_update_team_week_roundly(Team *tm); Team* team_get_new(const Team *tm, gboolean fire); @@ -167,4 +167,7 @@ team_complete_def_sort(Team *tm); gint team_get_table_clid(const Team *tm); +const Team* +team_get_next_opponent(const Team *tm); + #endif diff --git a/src/team_struct.h b/src/team_struct.h index 244292b3..b26ca495 100644 --- a/src/team_struct.h +++ b/src/team_struct.h @@ -75,6 +75,8 @@ typedef struct player names from. */ gchar *names_file; gchar *def_file; + /** The sid of the strategy if it's a CPU team. */ + gchar *strategy_sid; gint clid, /**< Numerical id of the league or cup the team belongs to. */ id, /**< Id of the team. */ diff --git a/src/treeview.c b/src/treeview.c index 62d381f5..cc5264db 100644 --- a/src/treeview.c +++ b/src/treeview.c @@ -1145,8 +1145,12 @@ treeview_create_single_table(GtkListStore *ls, const Table *table, gint number) colour_bg, colour_fg, i + 1); treeview_helper_get_table_element_colours(table, i, &colour_fg, &colour_bg, TRUE); - sprintf(buf[1], "%s", - colour_bg, colour_fg, elem->team->name); + if(debug < 50) + sprintf(buf[1], "%s", + colour_bg, colour_fg, elem->team->name); + else + sprintf(buf[1], "%s (%s)", + colour_bg, colour_fg, elem->team->name, elem->team->strategy_sid); gtk_list_store_set(ls, &iter, 1, buf[0], 3, buf[1], -1); @@ -1568,6 +1572,8 @@ treeview_create_next_opponent(void) if(opp == NULL) return NULL; + ls = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); + if(fix->clid < ID_CUP_START) strcpy(buf, league_cup_get_name_string(fix->clid)); else diff --git a/src/treeview_helper.c b/src/treeview_helper.c index ade870d7..3b479d56 100644 --- a/src/treeview_helper.c +++ b/src/treeview_helper.c @@ -669,7 +669,12 @@ treeview_helper_get_attributes_from_scout(gint scout) attribute.on_off[PLAYER_LIST_ATTRIBUTE_AGE] = TRUE; if(scout < 1) attribute.on_off[PLAYER_LIST_ATTRIBUTE_GAMES] = - attribute.on_off[PLAYER_LIST_ATTRIBUTE_GOALS] = TRUE; + attribute.on_off[PLAYER_LIST_ATTRIBUTE_GOALS] = + attribute.on_off[PLAYER_LIST_ATTRIBUTE_STATUS] = + /*d*/ + attribute.on_off[PLAYER_LIST_ATTRIBUTE_FITNESS] = + attribute.on_off[PLAYER_LIST_ATTRIBUTE_CSKILL] = + attribute.on_off[PLAYER_LIST_ATTRIBUTE_CPOS] = TRUE; return attribute; } @@ -1058,7 +1063,10 @@ treeview_helper_player_to_cell(GtkTreeViewColumn *col, treeview_helper_player_contract_to_cell(renderer, buf, pl->contract); break; case PLAYER_LIST_ATTRIBUTE_TEAM: - sprintf(buf, "%s", pl->team->name); + if(debug < 50) + sprintf(buf, "%s", pl->team->name); + else + sprintf(buf, "%s (%s)", pl->team->name, pl->team->strategy_sid); break; case PLAYER_LIST_ATTRIBUTE_LEAGUE_CUP: strcpy(buf, league_cup_get_name_string(pl->team->clid)); diff --git a/src/user.c b/src/user.c index 69d6e981..5a330206 100644 --- a/src/user.c +++ b/src/user.c @@ -272,10 +272,9 @@ user_from_team(const Team *tm) if(usr(i).tm == tm) return &usr(i); - g_warning("User going with team %s not found.\n", - tm->name); - - main_exit_program(EXIT_POINTER_NOT_FOUND, NULL); + main_exit_program(EXIT_POINTER_NOT_FOUND, + "User going with team %s not found.\n", + tm->name); return NULL; } diff --git a/src/variables.h b/src/variables.h index 40e80b73..a395c4ab 100644 --- a/src/variables.h +++ b/src/variables.h @@ -54,8 +54,8 @@ OptionList constants; OptionList constants_app; /** Array with internal settings. */ OptionList settings; -/* Array holding live game tokens. */ -OptionList lg_tokens; +/* Array holding string replacement tokens. */ +OptionList tokens; /** The array containing the live game commentary strings. */ GArray *lg_commentary[LIVE_GAME_EVENT_END]; @@ -68,6 +68,9 @@ GArray *transfer_list; end of each season. */ GArray *season_stats; +/** Array of available CPU strategies. */ +GArray *strategies; + /** Some counters we use. */ gint counters[COUNT_END]; diff --git a/src/window.c b/src/window.c index 160dd954..a2636849 100644 --- a/src/window.c +++ b/src/window.c @@ -115,7 +115,8 @@ window_show_startup(void) country_files = file_get_country_files(); if(country_files->len == 0) - main_exit_program(EXIT_NO_COUNTRY_FILES, "Didn't find any country definition files in the support directories."); + main_exit_program(EXIT_NO_COUNTRY_FILES, + "Didn't find any country definition files in the support directories."); gtk_cell_layout_clear(GTK_CELL_LAYOUT(combo_country)); @@ -547,8 +548,8 @@ window_create(gint window_type) switch(window_type) { default: - g_warning("window_create: unknown window type %d\n", window_type); - main_exit_program(EXIT_INT_NOT_FOUND, NULL); + main_exit_program(EXIT_INT_NOT_FOUND, + "window_create: unknown window type %d\n", window_type); break; case WINDOW_MAIN: if(window.main == NULL) diff --git a/src/xml.c b/src/xml.c index 9b027883..93b28daa 100644 --- a/src/xml.c +++ b/src/xml.c @@ -56,10 +56,10 @@ xml_load_users(const gchar *dirname, const gchar *basename) for(i=0;ilen;i++) { - sprintf(buf, "%s/%s___user_%02d_options", dirname, basename, i); + sprintf(buf, "%s%s%s___user_%02d_options", dirname, G_DIR_SEPARATOR_S, basename, i); file_load_opt_file(buf, &usr(i).options); - sprintf(buf, "%s/%s___user_%02d_live_game.xml", dirname, basename, i); + sprintf(buf, "%s%s%s___user_%02d_live_game.xml", dirname, G_DIR_SEPARATOR_S, basename, i); xml_loadsave_live_game_read(buf, &usr(i).live_game); } } @@ -71,7 +71,7 @@ xml_load_league(const gchar *dirname, const gchar *basename) League new = league_new(FALSE); gchar *prefix = g_strndup(basename, strlen(basename) - 4); - sprintf(buf, "%s/%s", dirname, basename); + sprintf(buf, "%s%s%s", dirname, G_DIR_SEPARATOR_S, basename); xml_loadsave_league_read(buf, &new); g_array_append_val(ligs, new); @@ -85,16 +85,16 @@ xml_load_league(const gchar *dirname, const gchar *basename) if(debug > 80) printf("%s\n", buf); - sprintf(buf, "%s/%s_teams.xml", dirname, prefix); + sprintf(buf, "%s%s%s_teams.xml", dirname, G_DIR_SEPARATOR_S, prefix); xml_loadsave_teams_read(buf, lig(ligs->len - 1).teams); - sprintf(buf, "%s/%s_fixtures.xml", dirname, prefix); + sprintf(buf, "%s%s%s_fixtures.xml", dirname, G_DIR_SEPARATOR_S, prefix); xml_loadsave_fixtures_read(buf, lig(ligs->len - 1).fixtures); - sprintf(buf, "%s/%s_table.xml", dirname, prefix); + sprintf(buf, "%s%s%s_table.xml", dirname, G_DIR_SEPARATOR_S, prefix); xml_loadsave_table_read(buf, &lig(ligs->len - 1).table); - sprintf(buf, "%s/%s_stat.xml", dirname, prefix); + sprintf(buf, "%s%s%s_stat.xml", dirname, G_DIR_SEPARATOR_S, prefix); xml_loadsave_league_stat_read(buf, &lig(ligs->len - 1).stats); g_free(prefix); @@ -106,7 +106,7 @@ xml_load_cup(Cup *cup, const gchar *dirname, const gchar *basename) gchar buf[SMALL]; gchar *prefix = g_strndup(basename, strlen(basename) - 4); - sprintf(buf, "%s/%s", dirname, basename); + sprintf(buf, "%s%s%s", dirname, G_DIR_SEPARATOR_S, basename); xml_loadsave_cup_read(buf, cup); sprintf(buf, _("Loading cup: %s"), @@ -118,7 +118,7 @@ xml_load_cup(Cup *cup, const gchar *dirname, const gchar *basename) if(debug > 80) printf("%s\n", buf); - sprintf(buf, "%s/%s_fixtures.xml", dirname, prefix); + sprintf(buf, "%s%s%s_fixtures.xml", dirname, G_DIR_SEPARATOR_S, prefix); xml_loadsave_fixtures_read(buf, cup->fixtures); g_free(prefix); @@ -129,7 +129,7 @@ xml_load_transfers(const gchar *dirname, const gchar *basename) { gchar buf[SMALL]; - sprintf(buf, "%s/%s___transfer_list.xml", dirname, basename); + sprintf(buf, "%s%s%s___transfer_list.xml", dirname, G_DIR_SEPARATOR_S, basename); free_g_array(&transfer_list); transfer_list = g_array_new(FALSE, FALSE, sizeof(Transfer)); diff --git a/src/xml_country.c b/src/xml_country.c index ff186de6..6ffc1160 100644 --- a/src/xml_country.c +++ b/src/xml_country.c @@ -132,7 +132,7 @@ xml_country_read_end_element (GMarkupParseContext *context, state = STATE_CUPS; else if(strcmp(element_name, TAG_COUNTRY) != 0) - g_warning("xml_country_read_start_element: unknown tag: %s; I'm in state %d\n", + g_warning("xml_country_read_end_element: unknown tag: %s; I'm in state %d\n", element_name, state); } diff --git a/src/xml_loadsave_cup.c b/src/xml_loadsave_cup.c index cfa96a35..6ea29888 100644 --- a/src/xml_loadsave_cup.c +++ b/src/xml_loadsave_cup.c @@ -240,7 +240,7 @@ xml_loadsave_cup_text (GMarkupParseContext *context, new_round.byes = int_value; else if(state == TAG_CUP_ROUND_TEAMS_FILE) { - sprintf(buf2, "%s/%s", dirname, buf); + sprintf(buf2, "%s%s%s", dirname, G_DIR_SEPARATOR_S, buf); xml_loadsave_teams_read(buf2, new_round.teams); for(i=0;ilen;i++) @@ -253,7 +253,7 @@ xml_loadsave_cup_text (GMarkupParseContext *context, { new_table = table_new(); - sprintf(buf2, "%s/%s", dirname, buf); + sprintf(buf2, "%s%s%s", dirname, G_DIR_SEPARATOR_S, buf); xml_loadsave_table_read(buf2, &new_table); g_array_append_val(new_round.tables, new_table); diff --git a/src/xml_loadsave_leagues_cups.c b/src/xml_loadsave_leagues_cups.c index c94c96aa..a8189a1f 100644 --- a/src/xml_loadsave_leagues_cups.c +++ b/src/xml_loadsave_leagues_cups.c @@ -118,7 +118,7 @@ xml_loadsave_leagues_cups_read(const gchar *dirname, const gchar *prefix) guint length; GError *error = NULL; - sprintf(file, "%s/%s___leagues_cups.xml", dirname, prefix); + sprintf(file, "%s%s%s___leagues_cups.xml", dirname, G_DIR_SEPARATOR_S, prefix); context = g_markup_parse_context_new(&parser, 0, NULL, NULL); diff --git a/src/xml_loadsave_misc.c b/src/xml_loadsave_misc.c index 342904df..99943ce3 100644 --- a/src/xml_loadsave_misc.c +++ b/src/xml_loadsave_misc.c @@ -150,7 +150,7 @@ xml_loadsave_misc_read(const gchar *dirname, const gchar *basename) guint length; GError *error = NULL; - sprintf(file, "%s/%s___misc.xml", dirname, basename); + sprintf(file, "%s%s%s___misc.xml", dirname, G_DIR_SEPARATOR_S, basename); context = g_markup_parse_context_new(&parser, 0, NULL, NULL); diff --git a/src/xml_loadsave_season_stats.c b/src/xml_loadsave_season_stats.c index a3a41a01..9984d898 100644 --- a/src/xml_loadsave_season_stats.c +++ b/src/xml_loadsave_season_stats.c @@ -148,7 +148,7 @@ xml_loadsave_season_stats_text (GMarkupParseContext *context, else if(state == TAG_LEAGUE_STAT_FILE) { new_league_stat = stat_league_new(-1); - sprintf(buf2, "%s/%s", dirname2, buf); + sprintf(buf2, "%s%s%s", dirname2, G_DIR_SEPARATOR_S, buf); xml_loadsave_league_stat_read(buf2, &new_league_stat); g_array_append_val(new_season_stat.league_stats, new_league_stat); } @@ -169,7 +169,7 @@ xml_loadsave_season_stats_read(const gchar *dirname, const gchar *prefix) context = g_markup_parse_context_new(&parser, 0, NULL, NULL); - sprintf(filename, "%s/%s___season_stats.xml", dirname, prefix); + sprintf(filename, "%s%s%s___season_stats.xml", dirname, G_DIR_SEPARATOR_S, prefix); if(!g_file_get_contents(filename, &file_contents, &length, &error)) { diff --git a/src/xml_loadsave_teams.c b/src/xml_loadsave_teams.c index 7aad40a4..e42a9b11 100644 --- a/src/xml_loadsave_teams.c +++ b/src/xml_loadsave_teams.c @@ -38,6 +38,7 @@ enum TAG_TEAM_STYLE, TAG_TEAM_BOOST, TAG_TEAM_CLID, + TAG_TEAM_STRATEGY_SID, TAG_TEAM_STADIUM, TAG_TEAM_STADIUM_NAME, TAG_TEAM_STADIUM_CAPACITY, @@ -113,6 +114,7 @@ xml_loadsave_teams_end_element (GMarkupParseContext *context, tag == TAG_TEAM_NAMES_FILE || tag == TAG_TEAM_ID || tag == TAG_TEAM_CLID || + tag == TAG_TEAM_STRATEGY_SID || tag == TAG_TEAM_STRUCTURE || tag == TAG_TEAM_STYLE || tag == TAG_TEAM_BOOST || @@ -161,6 +163,8 @@ xml_loadsave_teams_text (GMarkupParseContext *context, misc_string_assign(&new_team.names_file, buf); else if(state == TAG_TEAM_CLID) new_team.clid = int_value; + else if(state == TAG_TEAM_STRATEGY_SID) + misc_string_assign(&new_team.strategy_sid, buf); else if(state == TAG_TEAM_ID) new_team.id = int_value; else if(state == TAG_TEAM_STRUCTURE) @@ -251,13 +255,14 @@ xml_loadsave_teams_write_team(FILE *fil, const Team* team) xml_write_string(fil, team->name, TAG_NAME, I1); xml_write_string(fil, team->symbol, TAG_SYMBOL, I1); xml_write_string(fil, team->names_file, TAG_TEAM_NAMES_FILE, I1); - + xml_write_string(fil, team->strategy_sid, TAG_TEAM_STRATEGY_SID, I1); + xml_write_int(fil, team->clid, TAG_TEAM_CLID, I1); xml_write_int(fil, team->id, TAG_TEAM_ID, I1); xml_write_int(fil, team->structure, TAG_TEAM_STRUCTURE, I1); xml_write_int(fil, team->style, TAG_TEAM_STYLE, I1); xml_write_int(fil, team->boost, TAG_TEAM_BOOST, I1); - + fprintf(fil, "%s<_%d>\n", I1, TAG_TEAM_STADIUM); if(team->stadium.name != NULL) diff --git a/src/xml_loadsave_users.c b/src/xml_loadsave_users.c index f1249890..9cf96dc5 100644 --- a/src/xml_loadsave_users.c +++ b/src/xml_loadsave_users.c @@ -305,7 +305,7 @@ xml_loadsave_users_read(const gchar *dirname, const gchar *basename) GError *error = NULL; gchar file[SMALL]; - sprintf(file, "%s/%s___users.xml", dirname, basename); + sprintf(file, "%s%s%s___users.xml", dirname, G_DIR_SEPARATOR_S, basename); context = g_markup_parse_context_new(&parser, 0, NULL, NULL); diff --git a/src/xml_strategy.c b/src/xml_strategy.c new file mode 100644 index 00000000..fe1d1160 --- /dev/null +++ b/src/xml_strategy.c @@ -0,0 +1,560 @@ +/* + Bygfoot Football Manager -- a small and simple GTK2-based + football management game. + + http://bygfoot.sourceforge.net + + Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com) + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#include "file.h" +#include "free.h" +#include "main.h" +#include "misc.h" +#include "strategy_struct.h" +#include "xml_strategy.h" + +#define TAG_STRATEGY "strategy" +#define TAG_STRATEGY_SID "sid" +#define TAG_STRATEGY_DESC "desc" +#define TAG_STRATEGY_PRIORITY "priority" + +#define TAG_STRATEGY_PREMATCH "prematch" +#define TAG_STRATEGY_PREMATCH_FORMATION "formation" +#define TAG_STRATEGY_PREMATCH_LINEUP "lineup" +#define TAG_STRATEGY_PREMATCH_BOOST "prematch_boost" +#define TAG_STRATEGY_PREMATCH_STYLE "prematch_style" + +#define TAG_STRATEGY_MATCH_ACTION "match_action" +#define TAG_STRATEGY_MATCH_ACTION_BOOST "boost" +#define TAG_STRATEGY_MATCH_ACTION_STYLE "style" +#define TAG_STRATEGY_MATCH_ACTION_SUB "sub" +#define TAG_STRATEGY_MATCH_ACTION_SUB_IN_POS "in" +#define TAG_STRATEGY_MATCH_ACTION_SUB_OUT_POS "out" + +#define ATT_NAME_MIN_FITNESS "min_fitness" +#define ATT_NAME_COND "cond" +#define ATT_NAME_SUB_PROPERTY "prop" + +#define LINEUP_NAME_BEST "best" +#define LINEUP_NAME_WEAKEST "weakest" +#define LINEUP_NAME_FITTEST "fittest" +#define LINEUP_NAME_UNFITTEST "unfittest" + +#define BOOST_NAME_ON "on" +#define BOOST_NAME_OFF "off" +#define BOOST_NAME_ANTI "anti" + +#define STYLE_NAME_ALL_OUT_DEFEND "all-out-defend" +#define STYLE_NAME_DEFEND "defend" +#define STYLE_NAME_BALANCED "balanced" +#define STYLE_NAME_ATTACK "attack" +#define STYLE_NAME_ALL_OUT_ATTACK "all-out-attack" + +#define POS_NAME_GOALIE "goalie" +#define POS_NAME_DEFENDER "defender" +#define POS_NAME_MIDFIELDER "midfielder" +#define POS_NAME_FORWARD "forward" + +enum +{ + STATE_STRATEGY = 0, + STATE_STRATEGY_SID, + STATE_STRATEGY_DESC, + STATE_STRATEGY_PRIORITY, + STATE_STRATEGY_PREMATCH, + STATE_STRATEGY_PREMATCH_FORMATION, + STATE_STRATEGY_PREMATCH_LINEUP, + STATE_STRATEGY_PREMATCH_BOOST, + STATE_STRATEGY_PREMATCH_STYLE, + STATE_STRATEGY_MATCH_ACTION, + STATE_STRATEGY_MATCH_ACTION_BOOST, + STATE_STRATEGY_MATCH_ACTION_STYLE, + STATE_STRATEGY_MATCH_ACTION_SUB, + STATE_STRATEGY_MATCH_ACTION_SUB_IN_POS, + STATE_STRATEGY_MATCH_ACTION_SUB_OUT_POS, +}; + +gint state; + +#define curstrat g_array_index(strategies, Strategy, strategies->len - 1) +#define curprematch g_array_index(curstrat.prematch, StrategyPrematch, curstrat.prematch->len - 1) +#define curmatchaction g_array_index(curstrat.match_action, StrategyMatchAction, curstrat.match_action->len - 1) + +void +xml_strategy_read_start_element (GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error) +{ + gint atidx = 0; + + if(strcmp(element_name, TAG_STRATEGY) == 0) + state = STATE_STRATEGY; + else if(strcmp(element_name, TAG_STRATEGY_SID) == 0) + state = STATE_STRATEGY_SID; + else if(strcmp(element_name, TAG_STRATEGY_DESC) == 0) + state = STATE_STRATEGY_DESC; + else if(strcmp(element_name, TAG_STRATEGY_PRIORITY) == 0) + state = STATE_STRATEGY_PRIORITY; + else if(strcmp(element_name, TAG_STRATEGY_PREMATCH) == 0) + { + StrategyPrematch new_prematch; + + state = STATE_STRATEGY_PREMATCH; + + new_prematch.condition = NULL; + new_prematch.lineup = new_prematch.boost = + new_prematch.style = -100; + new_prematch.min_fitness = 0; + new_prematch.formations = g_array_new(FALSE, FALSE, sizeof(gint)); + + while(attribute_names[atidx] != NULL) + { + if(strcmp(attribute_names[atidx], ATT_NAME_COND) == 0) + new_prematch.condition = + g_strdup(attribute_values[atidx]); + else + g_warning("xml_strategy_read_start_element: unknown attribute %s\n", + attribute_names[atidx]); + + atidx++; + } + + g_array_append_val(curstrat.prematch, new_prematch); + } + else if(strcmp(element_name, TAG_STRATEGY_PREMATCH_FORMATION) == 0) + state = STATE_STRATEGY_PREMATCH_FORMATION; + else if(strcmp(element_name, TAG_STRATEGY_PREMATCH_LINEUP) == 0) + { + state = STATE_STRATEGY_PREMATCH_LINEUP; + + while(attribute_names[atidx] != NULL) + { + if(strcmp(attribute_names[atidx], ATT_NAME_MIN_FITNESS) == 0) + curprematch.min_fitness = + g_ascii_strtod(attribute_values[atidx], NULL) / 100; + else + g_warning("xml_strategy_read_start_element: unknown attribute %s\n", + attribute_names[atidx]); + + atidx++; + } + } + else if(strcmp(element_name, TAG_STRATEGY_PREMATCH_BOOST) == 0) + state = STATE_STRATEGY_PREMATCH_BOOST; + else if(strcmp(element_name, TAG_STRATEGY_PREMATCH_STYLE) == 0) + state = STATE_STRATEGY_PREMATCH_STYLE; + else if(strcmp(element_name, TAG_STRATEGY_MATCH_ACTION) == 0) + { + StrategyMatchAction new_match_action; + + state = STATE_STRATEGY_MATCH_ACTION; + + new_match_action.condition = NULL; + new_match_action.boost = + new_match_action.style = -100; + new_match_action.sub_in_pos = -1; + + while(attribute_names[atidx] != NULL) + { + if(strcmp(attribute_names[atidx], ATT_NAME_COND) == 0) + new_match_action.condition = + g_strdup(attribute_values[atidx]); + else + g_warning("xml_strategy_read_start_element: unknown attribute %s\n", + attribute_names[atidx]); + + atidx++; + } + + g_array_append_val(curstrat.match_action, new_match_action); + } + else if(strcmp(element_name, TAG_STRATEGY_MATCH_ACTION_BOOST) == 0) + state = STATE_STRATEGY_MATCH_ACTION_BOOST; + else if(strcmp(element_name, TAG_STRATEGY_MATCH_ACTION_STYLE) == 0) + state = STATE_STRATEGY_MATCH_ACTION_STYLE; + else if(strcmp(element_name, TAG_STRATEGY_MATCH_ACTION_SUB) == 0) + state = STATE_STRATEGY_MATCH_ACTION_SUB; + else if(strcmp(element_name, TAG_STRATEGY_MATCH_ACTION_SUB_IN_POS) == 0) + { + state = STATE_STRATEGY_MATCH_ACTION_SUB_IN_POS; + + while(attribute_names[atidx] != NULL) + { + if(strcmp(attribute_names[atidx], ATT_NAME_SUB_PROPERTY) == 0) + { + if(strcmp(attribute_values[atidx], LINEUP_NAME_BEST) == 0) + curmatchaction.sub_in_prop = STRAT_LINEUP_BEST; + else if(strcmp(attribute_values[atidx], LINEUP_NAME_WEAKEST) == 0) + curmatchaction.sub_in_prop = STRAT_LINEUP_WEAKEST; + else if(strcmp(attribute_values[atidx], LINEUP_NAME_FITTEST) == 0) + curmatchaction.sub_in_prop = STRAT_LINEUP_FITTEST; + else if(strcmp(attribute_values[atidx], LINEUP_NAME_UNFITTEST) == 0) + curmatchaction.sub_in_prop = STRAT_LINEUP_UNFITTEST; + else + g_warning("xml_strategy_read_start_element: unknown property value %s\n", + attribute_values[atidx]); + } + else + g_warning("xml_strategy_read_start_element: unknown attribute %s\n", + attribute_names[atidx]); + + atidx++; + } + } + else if(strcmp(element_name, TAG_STRATEGY_MATCH_ACTION_SUB_OUT_POS) == 0) + { + state = STATE_STRATEGY_MATCH_ACTION_SUB_OUT_POS; + + while(attribute_names[atidx] != NULL) + { + if(strcmp(attribute_names[atidx], ATT_NAME_SUB_PROPERTY) == 0) + { + if(strcmp(attribute_values[atidx], LINEUP_NAME_BEST) == 0) + curmatchaction.sub_out_prop = STRAT_LINEUP_BEST; + else if(strcmp(attribute_values[atidx], LINEUP_NAME_WEAKEST) == 0) + curmatchaction.sub_out_prop = STRAT_LINEUP_WEAKEST; + else if(strcmp(attribute_values[atidx], LINEUP_NAME_FITTEST) == 0) + curmatchaction.sub_out_prop = STRAT_LINEUP_FITTEST; + else if(strcmp(attribute_values[atidx], LINEUP_NAME_UNFITTEST) == 0) + curmatchaction.sub_out_prop = STRAT_LINEUP_UNFITTEST; + else + g_warning("xml_strategy_read_start_element: unknown property value %s\n", + attribute_values[atidx]); + } + else + g_warning("xml_strategy_read_start_element: unknown attribute %s\n", + attribute_names[atidx]); + + atidx++; + } + } + else + g_warning("xml_strategy_read_start_element: unknown tag: %s; I'm in state %d\n", + element_name, state); +} + +/** + * The function called by the parser when a closing tag is read. + * The state variable is changed in this function. + * @see The GLib manual (Simple XML parser). + */ +void +xml_strategy_read_end_element (GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error) +{ + if(strcmp(element_name, TAG_STRATEGY_SID) == 0 || + strcmp(element_name, TAG_STRATEGY_DESC) == 0 || + strcmp(element_name, TAG_STRATEGY_PRIORITY) == 0 || + strcmp(element_name, TAG_STRATEGY_MATCH_ACTION) == 0 || + strcmp(element_name, TAG_STRATEGY_PREMATCH) == 0) + state = STATE_STRATEGY; + else if(strcmp(element_name, TAG_STRATEGY_PREMATCH_FORMATION) == 0 || + strcmp(element_name, TAG_STRATEGY_PREMATCH_LINEUP) == 0 || + strcmp(element_name, TAG_STRATEGY_PREMATCH_BOOST) == 0 || + strcmp(element_name, TAG_STRATEGY_PREMATCH_STYLE) == 0) + state = STATE_STRATEGY_PREMATCH; + else if(strcmp(element_name, TAG_STRATEGY_MATCH_ACTION_SUB) == 0 || + strcmp(element_name, TAG_STRATEGY_MATCH_ACTION_STYLE) == 0 || + strcmp(element_name, TAG_STRATEGY_MATCH_ACTION_BOOST) == 0) + state = STATE_STRATEGY_MATCH_ACTION; + else if(strcmp(element_name, TAG_STRATEGY_MATCH_ACTION_SUB_IN_POS) == 0 || + strcmp(element_name, TAG_STRATEGY_MATCH_ACTION_SUB_OUT_POS) == 0) + state = STATE_STRATEGY_MATCH_ACTION_SUB; + else if(strcmp(element_name, TAG_STRATEGY) != 0) + g_warning("xml_strategy_read_end_element: unknown tag: %s; I'm in state %d\n", + element_name, state); +} + +/** + * The function called by the parser when the text between tags is read. + * This function is responsible for filling in the variables (e.g. team names) + * when a file gets loaded. + * @see The GLib manual (Simple XML parser). + */ +void +xml_strategy_read_text (GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error) +{ + gchar buf[text_len + 1]; + gint int_value; + + strncpy(buf, text, text_len); + buf[text_len] = '\0'; + + int_value = (gint)g_ascii_strtod(buf, NULL); + + if(state == STATE_STRATEGY_SID) + misc_string_assign(&curstrat.sid, buf); + else if(state == STATE_STRATEGY_DESC) + misc_string_assign(&curstrat.desc, buf); + else if(state == STATE_STRATEGY_PRIORITY) + { + if(strategies->len == 1) + curstrat.priority = int_value; + else + curstrat.priority = + g_array_index(strategies, Strategy, strategies->len - 2).priority + + int_value; + } + else if(state == STATE_STRATEGY_PREMATCH_FORMATION) + g_array_append_val(curprematch.formations, int_value); + else if(state == STATE_STRATEGY_PREMATCH_LINEUP) + { + if(strcmp(buf, LINEUP_NAME_BEST) == 0) + curprematch.lineup = STRAT_LINEUP_BEST; + else if(strcmp(buf, LINEUP_NAME_WEAKEST) == 0) + curprematch.lineup = STRAT_LINEUP_WEAKEST; + else if(strcmp(buf, LINEUP_NAME_FITTEST) == 0) + curprematch.lineup = STRAT_LINEUP_FITTEST; + else + g_warning( + "xml_strategy_read_text: unknown lineup type %s\n", buf); + } + else if(state == STATE_STRATEGY_PREMATCH_BOOST) + { + if(strcmp(buf, BOOST_NAME_ON) == 0) + curprematch.boost = 1; + else if(strcmp(buf, BOOST_NAME_OFF) == 0) + curprematch.boost = 0; + else if(strcmp(buf, BOOST_NAME_ANTI) == 0) + curprematch.boost = -1; + else + g_warning( + "xml_strategy_read_text: unknown boost type %s\n", buf); + } + else if(state == STATE_STRATEGY_PREMATCH_STYLE) + { + if(strcmp(buf, STYLE_NAME_ALL_OUT_DEFEND) == 0) + curprematch.style = -2; + else if(strcmp(buf, STYLE_NAME_DEFEND) == 0) + curprematch.style = -1; + else if(strcmp(buf, STYLE_NAME_BALANCED) == 0) + curprematch.style = 0; + else if(strcmp(buf, STYLE_NAME_ATTACK) == 0) + curprematch.style = 1; + else if(strcmp(buf, STYLE_NAME_ALL_OUT_ATTACK) == 0) + curprematch.style = 2; + else + g_warning( + "xml_strategy_read_text: unknown style type %s\n", buf); + } + else if(state == STATE_STRATEGY_MATCH_ACTION_STYLE) + { + if(strcmp(buf, STYLE_NAME_ALL_OUT_DEFEND) == 0) + curmatchaction.style = -2; + else if(strcmp(buf, STYLE_NAME_DEFEND) == 0) + curmatchaction.style = -1; + else if(strcmp(buf, STYLE_NAME_BALANCED) == 0) + curmatchaction.style = 0; + else if(strcmp(buf, STYLE_NAME_ATTACK) == 0) + curmatchaction.style = 1; + else if(strcmp(buf, STYLE_NAME_ALL_OUT_ATTACK) == 0) + curmatchaction.style = 2; + else + g_warning( + "xml_strategy_read_text: unknown style type %s\n", buf); + } + else if(state == STATE_STRATEGY_MATCH_ACTION_BOOST) + { + if(strcmp(buf, BOOST_NAME_ON) == 0) + curmatchaction.boost = 1; + else if(strcmp(buf, BOOST_NAME_OFF) == 0) + curmatchaction.boost = 0; + else if(strcmp(buf, BOOST_NAME_ANTI) == 0) + curmatchaction.boost = -1; + else + g_warning( + "xml_strategy_read_text: unknown boost type %s\n", buf); + } + else if(state == STATE_STRATEGY_MATCH_ACTION_SUB_IN_POS) + { + if(strcmp(buf, POS_NAME_GOALIE) == 0) + curmatchaction.sub_in_pos = 0; + else if(strcmp(buf, POS_NAME_DEFENDER) == 0) + curmatchaction.sub_in_pos = 1; + else if(strcmp(buf, POS_NAME_MIDFIELDER) == 0) + curmatchaction.sub_in_pos = 2; + else if(strcmp(buf, POS_NAME_FORWARD) == 0) + curmatchaction.sub_in_pos = 3; + else + g_warning( + "xml_strategy_read_text: unknown position %s\n", buf); + } + else if(state == STATE_STRATEGY_MATCH_ACTION_SUB_OUT_POS) + { + if(strcmp(buf, POS_NAME_GOALIE) == 0) + curmatchaction.sub_out_pos = 0; + else if(strcmp(buf, POS_NAME_DEFENDER) == 0) + curmatchaction.sub_out_pos = 1; + else if(strcmp(buf, POS_NAME_MIDFIELDER) == 0) + curmatchaction.sub_out_pos = 2; + else if(strcmp(buf, POS_NAME_FORWARD) == 0) + curmatchaction.sub_out_pos = 3; + else + g_warning( + "xml_strategy_read_text: unknown position %s\n", buf); + } +} + +/** Add the strategy described in the file + to the strategies array. */ +void +xml_strategy_read(const gchar *filename) +{ + gint i; + Strategy new_strat; + GMarkupParser parser = {xml_strategy_read_start_element, + xml_strategy_read_end_element, + xml_strategy_read_text, NULL, NULL}; + GMarkupParseContext *context; + gchar *file_contents; + gint length; + GError *error = NULL; + + context = + g_markup_parse_context_new(&parser, 0, NULL, NULL); + + if(!g_file_get_contents(filename, &file_contents, &length, &error)) + { + g_warning("xml_strategy_read: error reading file %s\n", filename); + misc_print_error(&error, TRUE); + return; + } + + new_strat.sid = new_strat.desc = NULL; + new_strat.priority = 1; + new_strat.prematch = g_array_new(FALSE, FALSE, sizeof(StrategyPrematch)); + new_strat.match_action = g_array_new(FALSE, FALSE, sizeof(StrategyMatchAction)); + + g_array_append_val(strategies, new_strat); + + if(g_markup_parse_context_parse(context, file_contents, length, &error)) + { + g_markup_parse_context_end_parse(context, NULL); + g_markup_parse_context_free(context); + g_free(file_contents); + } + else + { + g_critical("xml_strategy_read: error parsing file %s\n", filename); + misc_print_error(&error, TRUE); + } + + + for(i=0;ilen;i++) + { + if(g_array_index(curstrat.match_action, StrategyMatchAction, i).condition == NULL) + main_exit_program(EXIT_STRATEGY_ERROR, "xml_strategy_read: unconditional match action encountered in file %s. match actions MUST have conditions.", filename); + +/* /\*d*\/ */ +/* printf("bo %d st %d subinpos %d subinprop %d suboutpos %d suboutprop %d\n", */ +/* g_array_index(curstrat.match_action, StrategyMatchAction, i).boost, */ +/* g_array_index(curstrat.match_action, StrategyMatchAction, i).style, */ +/* g_array_index(curstrat.match_action, StrategyMatchAction, i).sub_in_pos, */ +/* g_array_index(curstrat.match_action, StrategyMatchAction, i).sub_in_prop, */ +/* g_array_index(curstrat.match_action, StrategyMatchAction, i).sub_out_pos, */ +/* g_array_index(curstrat.match_action, StrategyMatchAction, i).sub_out_prop); */ + } +} + +/** Load all strategy files found in the appropriate folder. */ +void +xml_strategy_load_strategies(void) +{ + gint i, j, k; + GList *elem = support_directories; + const gchar *strategydir = NULL; + GPtrArray *files = NULL; + gchar buf[SMALL]; + + while (elem) + { + if(g_str_has_suffix((gchar*)elem->data, "strategy")) + { + strategydir = (const gchar*)elem->data; + break; + } + elem = elem->next; + } + + if(strategydir == NULL) + main_exit_program(EXIT_STRATEGY_ERROR, + "xml_strategy_load_strategies: strategy directory not found."); + + files = file_dir_get_contents(strategydir, "strategy_", ".xml"); + + if(files->len == 0) + { + g_ptr_array_free(files, TRUE); + main_exit_program(EXIT_STRATEGY_ERROR, + "xml_strategy_load_strategies: no CPU strategies found."); + } + + for(i=0;ilen;i++) + { + sprintf(buf, "%s%s%s", strategydir, G_DIR_SEPARATOR_S, + (const gchar*)g_ptr_array_index(files, i)); + xml_strategy_read(buf); + } + + free_gchar_array(&files); + + /* Fill secondary prematches with default values. */ + for(i=0;ilen;i++) + { + StrategyPrematch *prem0 = &g_array_index( + g_array_index(strategies, Strategy, i).prematch, + StrategyPrematch, 0), + *premcur = NULL; + + if(prem0->formations->len == 0) + main_exit_program(EXIT_STRATEGY_ERROR, + "xml_strategy_read (%s): The primary prematch should have at least one formation.", + g_array_index(strategies, Strategy, i).sid); + + for(j=1;jlen;j++) + { + premcur = &g_array_index( + g_array_index(strategies, Strategy, i).prematch, + StrategyPrematch, j); + + if(premcur->formations->len == 0) + for(k=0;kformations->len;k++) + g_array_append_val(premcur->formations, + g_array_index(prem0->formations, gint, k)); + + + if(premcur->boost == -100) + premcur->boost = prem0->boost; + if(premcur->style == -100) + premcur->style = prem0->style; + if(premcur->lineup == -100) + premcur->lineup = prem0->lineup; + if(premcur->min_fitness == -100) + premcur->min_fitness = prem0->min_fitness; + } + } +} diff --git a/src/xml_strategy.h b/src/xml_strategy.h new file mode 100644 index 00000000..3b78ca0b --- /dev/null +++ b/src/xml_strategy.h @@ -0,0 +1,58 @@ +/* + Bygfoot Football Manager -- a small and simple GTK2-based + football management game. + + http://bygfoot.sourceforge.net + + Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com) + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef XML_STRATEGY_H +#define XML_STRATEGY_H + +#include "bygfoot.h" +#include "variables.h" + +void +xml_strategy_read_start_element (GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error); + +void +xml_strategy_read_end_element (GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error); + +void +xml_strategy_read_text (GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error); + +void +xml_strategy_read(const gchar *filename); + +void +xml_strategy_load_strategies(void); + +#endif + diff --git a/src/xml_team.c b/src/xml_team.c index 372d0848..5a984c1c 100644 --- a/src/xml_team.c +++ b/src/xml_team.c @@ -129,8 +129,6 @@ xml_team_read_end_element (GMarkupParseContext *context, gpointer user_data, GError **error) { - gchar buf[SMALL]; - if(strcmp(element_name, TAG_TEAM_NAME) == 0 || strcmp(element_name, TAG_STADIUM_NAME) == 0 || strcmp(element_name, TAG_SYMBOL) == 0 || @@ -145,9 +143,9 @@ xml_team_read_end_element (GMarkupParseContext *context, if(team->players->len == const_int("int_team_cpu_players")) { free_player(&new_player); - sprintf(buf, "xml_team_read_end_element: too many players in team definition '%s' (only %d allowed).", - d_file, const_int("int_team_cpu_players")); - main_exit_program(EXIT_LOAD_TEAM_DEF, buf); + main_exit_program(EXIT_LOAD_TEAM_DEF, + "xml_team_read_end_element: too many players in team definition '%s' (only %d allowed).", + d_file, const_int("int_team_cpu_players")); } else g_array_append_val(team->players, new_player); diff --git a/support_files/bygfoot_constants b/support_files/bygfoot_constants index df19c6ba..89007fe1 100644 --- a/support_files/bygfoot_constants +++ b/support_files/bygfoot_constants @@ -335,8 +335,8 @@ int_game_gui_live_game_speed_max 3500010 # factor changing the speed when penalties float_game_gui_live_game_speed_penalties_factor 200000 -# How much a player's skill can deviate from -# the average skill in his team. +# How much a player's talent can deviate from +# the average talent in his team. float_player_average_talent_variance 7500 # these determine the value calculation of players. @@ -721,9 +721,9 @@ int_name_max_product 2000 # list instead of the specified one float_name_random_list_prob 20000 -string_language_names English Deutsch Français Spanish Nederlands Polski Romanian Bulgarian Chinese -string_language_codes C de fr es nl pl ro bg zh -string_language_symbols flag_england.png flag_germany.png flag_france.png flag_spain.png flag_netherlands.png flag_poland.png flag_romania.png flag_bulgaria.png flag_china.png +string_language_names English Deutsch Français Spanish Nederlands Polski Danish Romanian Bulgarian Chinese +string_language_codes C de fr es nl pl da ro bg zh +string_language_symbols flag_england.png flag_germany.png flag_france.png flag_spain.png flag_netherlands.png flag_poland.png flag_dk.png flag_romania.png flag_bulgaria.png flag_china.png # lower and upper limits of which percentage # of the player wages a sponsor pays; the actual diff --git a/support_files/bygfoot_help b/support_files/bygfoot_help index 4b848209..a022175f 100644 --- a/support_files/bygfoot_help +++ b/support_files/bygfoot_help @@ -29,7 +29,8 @@ string_contrib_title Translations string_contrib_entry Alexandre Beraud (French) string_contrib_entry Győző Both (German) string_contrib_entry Tobe & Arne Deprez (Dutch) -string_contrib_entry Marcelo Garrone (Spanish) +string_contrib_entry Marcelo Garrone, Carlos Garces (Spanish) +string_contrib_entry Kristian Poul Herkild (Danish) string_contrib_entry Benyuan Liu (Chinese) string_contrib_entry Rostislav "zbrox" Raykov (Bulgarian) string_contrib_entry Michal Rudolf (Polish) diff --git a/support_files/bygfoot_lg_tokens b/support_files/bygfoot_lg_tokens deleted file mode 100644 index e9f2e33a..00000000 --- a/support_files/bygfoot_lg_tokens +++ /dev/null @@ -1,70 +0,0 @@ -################# -# tokens for the live game commentary -################## - -#todo minutes total, avskills - -# see -# http://bygfoot.sourceforge.net/doc/1.9/definitions_howto.html - -# tokens in the live game commentary - -# general -string_lg_commentary_token_league_cup_name _LEAGUECUPNAME_ -string_lg_commentary_token_cup_round_name _CUPROUNDNAME_ -string_lg_commentary_token_attendance _AT_ -string_lg_commentary_token_result _RE_ -string_lg_commentary_token_time _TIME_ -string_lg_commentary_token_minute _MI_ -string_lg_commentary_token_minute_remaining _MR_ -string_lg_commentary_token_minute_total _MT_ -string_lg_commentary_token_yellow_limit _YELLOWLIMIT_ -string_lg_commentary_token_goals0 _GOALS0_ -string_lg_commentary_token_goals1 _GOALS1_ -string_lg_commentary_token_goal_diff _GD_ -string_lg_commentary_token_possession _POSS_ -string_lg_commentary_token_no_possession _NPOSS_ - -# misc -string_lg_commentary_token_extra _EX_ - -# team -string_lg_commentary_token_team_home _T0_ -string_lg_commentary_token_team_away _T1_ -string_lg_commentary_token_team_losing _TL_ -string_lg_commentary_token_team_winning _TW_ -string_lg_commentary_token_team_winningn _TWN_ -string_lg_commentary_token_team_losingn _TLN_ -string_lg_commentary_token_team _TT_ -string_lg_commentary_token_team_layer0 _TLAYER0_ -string_lg_commentary_token_team_layer1 _TLAYER1_ -string_lg_commentary_token_team_avskill0 _TAVSKILL0_ -string_lg_commentary_token_team_avskill1 _TAVSKILL1_ -string_lg_commentary_token_team_avskilldiff _TAVSKILLDIFF_ - -# player -string_lg_commentary_token_player0 _P0_ -string_lg_commentary_token_player1 _P1_ -string_lg_commentary_token_player_goals0 _PLGOALS0_ -string_lg_commentary_token_player_goals_all0 _PLGOALSALL0_ -string_lg_commentary_token_player_goals1 _PLGOALS1_ -string_lg_commentary_token_player_goals_all1 _PLGOALSALL1_ -string_lg_commentary_token_player_yellows _PLYELLOWS_ - -# stat tokens -string_lg_commentary_token_stat_shots0 _SHOTS0_ -string_lg_commentary_token_stat_shots1 _SHOTS1_ -string_lg_commentary_token_stat_shot_per0 _SHOTPER0_ -string_lg_commentary_token_stat_shot_per1 _SHOTPER1_ -string_lg_commentary_token_stat_poss0 _POSS0_ -string_lg_commentary_token_stat_poss1 _POSS1_ -string_lg_commentary_token_stat_pen0 _PEN0_ -string_lg_commentary_token_stat_pen1 _PEN1_ -string_lg_commentary_token_stat_fouls0 _FOULS0_ -string_lg_commentary_token_stat_fouls1 _FOULS1_ -string_lg_commentary_token_stat_yellows0 _YELLOWS0_ -string_lg_commentary_token_stat_yellows1 _YELLOWS1_ -string_lg_commentary_token_stat_reds0 _REDS0_ -string_lg_commentary_token_stat_reds1 _REDS1_ -string_lg_commentary_token_stat_injs0 _INJS0_ -string_lg_commentary_token_stat_injs1 _INJS1_ diff --git a/support_files/bygfoot_tokens b/support_files/bygfoot_tokens new file mode 100644 index 00000000..c344bb65 --- /dev/null +++ b/support_files/bygfoot_tokens @@ -0,0 +1,81 @@ +################# +# tokens for the live game commentary +################## + +# see +# http://bygfoot.sourceforge.net/doc/1.9/def_howto.html + +# tokens in the live game commentary +#------------------------------------ + +# general +string_token_league_cup_name _LEAGUECUPNAME_ +string_token_cup_round_name _CUPROUNDNAME_ +string_token_attendance _AT_ +string_token_result _RE_ +string_token_time _TIME_ +string_token_minute _MI_ +string_token_minute_remaining _MR_ +string_token_minute_total _MT_ +string_token_yellow_limit _YELLOWLIMIT_ +string_token_goals0 _GOALS0_ +string_token_goals1 _GOALS1_ +string_token_goal_diff _GD_ +string_token_possession _POSS_ +string_token_no_possession _NPOSS_ +# misc +string_token_extra _EX_ +# team +string_token_team_home _T0_ +string_token_team_away _T1_ +string_token_team_losing _TL_ +string_token_team_winning _TW_ +string_token_team_winningn _TWN_ +string_token_team_losingn _TLN_ +string_token_team _TT_ +string_token_team_layer0 _TLAYER0_ +string_token_team_layer1 _TLAYER1_ +string_token_team_layerdiff _LAYERDIFF_ +string_token_team_avskill0 _TAVSKILL0_ +string_token_team_avskill1 _TAVSKILL1_ +string_token_team_avskilldiff _TAVSKILLDIFF_ +# player +string_token_player0 _P0_ +string_token_player1 _P1_ +string_token_player_goals0 _PLGOALS0_ +string_token_player_goals_all0 _PLGOALSALL0_ +string_token_player_goals1 _PLGOALS1_ +string_token_player_goals_all1 _PLGOALSALL1_ +string_token_player_yellows _PLYELLOWS_ +# stat tokens +string_token_stat_shots0 _SHOTS0_ +string_token_stat_shots1 _SHOTS1_ +string_token_stat_shot_per0 _SHOTPER0_ +string_token_stat_shot_per1 _SHOTPER1_ +string_token_stat_poss0 _POSS0_ +string_token_stat_poss1 _POSS1_ +string_token_stat_pen0 _PEN0_ +string_token_stat_pen1 _PEN1_ +string_token_stat_fouls0 _FOULS0_ +string_token_stat_fouls1 _FOULS1_ +string_token_stat_yellows0 _YELLOWS0_ +string_token_stat_yellows1 _YELLOWS1_ +string_token_stat_reds0 _REDS0_ +string_token_stat_reds1 _REDS1_ +string_token_stat_injs0 _INJS0_ +string_token_stat_injs1 _INJS1_ + +# tokens for CPU strategy +#-------------------------- + +# prematch +string_token_avskilldiff _AVSKILLDIFF_ +string_token_homeadv _HOMEADV_ +string_token_cup _CUP_ +string_token_goals_to_win _GOALSTOWIN_ +# match +string_token_subs_left _SUBSLEFT_ +string_token_num_def _NUMDEF_ +string_token_num_mid _NUMMID_ +string_token_num_att _NUMATT_ +string_token_form _FORMATION_ diff --git a/support_files/definitions/germany/league_germany1.xml b/support_files/definitions/germany/league_germany1.xml index 56231d10..82a51b50 100644 --- a/support_files/definitions/germany/league_germany1.xml +++ b/support_files/definitions/germany/league_germany1.xml @@ -43,7 +43,7 @@ Dortmund - Hamburger + Hamburg Wolfsburg diff --git a/support_files/definitions/germany/league_germany2.xml b/support_files/definitions/germany/league_germany2.xml index 5405bd0a..960f81d8 100644 --- a/support_files/definitions/germany/league_germany2.xml +++ b/support_files/definitions/germany/league_germany2.xml @@ -39,7 +39,7 @@ Freiburg - München + T. München Fürth diff --git a/support_files/definitions/germany/league_germany3a.xml b/support_files/definitions/germany/league_germany3a.xml index beee2827..6f438f3f 100644 --- a/support_files/definitions/germany/league_germany3a.xml +++ b/support_files/definitions/germany/league_germany3a.xml @@ -49,7 +49,7 @@ Düsseldorf - Kiel + Kiel Münster diff --git a/support_files/definitions/germany/league_germany3b.xml b/support_files/definitions/germany/league_germany3b.xml index 7ff1a3e6..cdb51b78 100644 --- a/support_files/definitions/germany/league_germany3b.xml +++ b/support_files/definitions/germany/league_germany3b.xml @@ -43,7 +43,7 @@ Regensburg - Stuttgarter K. + Stuttgart K. Elversberg @@ -67,7 +67,7 @@ Bayreuth - Karlsruher SC + Karlsruhe (A) Kaiserslautern (A) diff --git a/support_files/pixmaps/menu_save_geometry.png b/support_files/pixmaps/menu_save_geometry.png new file mode 100644 index 0000000000000000000000000000000000000000..ed462388e1823601b04fe999309417f6ae985eb0 GIT binary patch literal 367 zcmV-#0g(QQP)!KBY}5s-&&d&wKg^WM+G^V>F7$QOqv)G8eCac^7zpsd`fTKyqTAs zIeX@e`}gi;q$FWi`u_d<8`rNvMB$o&g0Eh^L{WPF+}Zr>tXb2ip(zEbOG%7hIDZ~g zX;fHmQ5Rb zx;hC&!Lg%9fxaos%lVHAuqXwBthCg