bygfoot/src/team.h

170 lines
3.6 KiB
C
Raw Normal View History

2005-10-20 17:45:00 +02:00
/*
2005-11-26 17:52:51 +01:00
team.h
2005-10-20 17:45:00 +02:00
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.
*/
2004-12-23 13:58:39 +01:00
#ifndef TEAM_H
#define TEAM_H
#include "bygfoot.h"
2005-01-09 21:21:22 +01:00
#include "cup_struct.h"
#include "fixture_struct.h"
#include "team_struct.h"
2005-03-18 23:03:23 +01:00
/** Possibilities for team comparison. */
enum TeamCompare
{
2005-03-19 21:04:08 +01:00
TEAM_COMPARE_LEAGUE_RANK = 0,
2005-05-24 20:31:07 +02:00
TEAM_COMPARE_LEAGUE_LAYER,
2005-03-19 21:04:08 +01:00
TEAM_COMPARE_UNSORTED,
2005-03-25 21:18:35 +01:00
TEAM_COMPARE_AV_SKILL,
2005-04-29 21:48:02 +02:00
TEAM_COMPARE_OFFENSIVE,
TEAM_COMPARE_DEFENSE,
2005-03-18 23:03:23 +01:00
TEAM_COMPARE_END
};
2004-12-23 13:58:39 +01:00
Team
2005-04-14 21:07:25 +02:00
team_new(gboolean new_id);
2004-12-23 13:58:39 +01:00
gboolean
2005-01-09 21:21:22 +01:00
query_is_my_team(const Team *tm);
void
team_generate_players_stadium(Team *tm, gfloat av_talent);
gboolean
2005-09-07 21:33:03 +02:00
query_team_is_in_cups(const Team *tm, gint group);
2005-01-09 21:21:22 +01:00
gboolean
2005-05-08 19:56:26 +02:00
query_team_is_in_cup(const Team *tm, const Cup *cup);
2005-01-09 21:21:22 +01:00
GPtrArray*
team_get_pointers_from_array(const GArray *teams, GPtrArray *team_ptrs);
2005-01-09 21:21:22 +01:00
Team*
2005-04-13 15:01:59 +02:00
team_of_id(gint id);
2005-01-09 21:21:22 +01:00
Team*
team_of_sid(const char *sid, const Country *country);
const Fixture*
2005-03-14 18:47:27 +01:00
team_get_fixture(const Team *tm, gboolean last_fixture);
2005-01-09 21:21:22 +01:00
gfloat
team_get_average_skill(const Team *tm, gboolean cskill);
gfloat
team_get_average_talent(const Team *tm);
gint
team_name_is_user(const gchar *team_name);
gint
team_is_user(const Team *tm);
gint
2005-09-22 18:41:07 +02:00
team_get_cup_rank(const Team *tm, const CupRound *cupround, gboolean abort);
gint
team_get_league_rank(const Team *tm, gint clid);
void
team_change_structure(Team *tm, gint new_structure);
gint
team_find_appropriate_structure(const Team *tm);
void
team_rearrange(Team *tm);
2005-03-11 18:18:51 +01:00
gchar*
team_attribute_to_char(gint attribute, gint value);
void
team_change_attribute_with_message(Team * tm, gint attribute, gint new_value);
2005-03-13 16:46:15 +01:00
void
2005-10-24 22:50:48 +02:00
team_update_team_weekly(Team *tm);
2005-03-13 16:46:15 +01:00
void
team_update_post_match(Team *tm, const Fixture *fix);
2005-03-13 16:46:15 +01:00
2005-03-13 22:10:19 +01:00
void
team_update_cpu_new_players(Team *tm);
2005-03-14 10:29:39 +01:00
void
2005-10-24 22:50:48 +02:00
team_update_team_week_roundly(Team *tm);
2005-03-14 10:29:39 +01:00
2005-03-18 23:03:23 +01:00
Team*
team_get_new(const Team *tm, gboolean fire);
GPtrArray*
2005-03-19 21:04:08 +01:00
team_get_sorted(GCompareDataFunc compare_function, gint type, gboolean cup);
2005-03-18 23:03:23 +01:00
gint
team_compare_func(gconstpointer a, gconstpointer b, gpointer data);
2005-03-25 21:18:35 +01:00
gint
team_get_index(const Team *tm);
gfloat
2005-09-14 23:16:22 +02:00
team_get_average_talents(const GArray *teams);
2005-03-25 21:18:35 +01:00
2005-04-13 15:01:59 +02:00
gboolean
query_team_plays(const Team *tm, gint week_number, gint week_round_number);
2005-04-29 21:48:02 +02:00
gint
team_get_table_value(const Team *tm, gint type);
2005-05-30 19:50:53 +02:00
void
team_write_results(const Team *tm, gchar *result_buf, gchar *goals_buf);
void
team_write_overall_results(const Team *tm, gint clid, gchar *results);
2005-05-30 19:50:53 +02:00
void
2005-08-21 21:58:51 +02:00
team_write_own_results(const Team *tm, gchar *buf, gboolean sort, gboolean cup_matches);
2005-05-30 19:50:53 +02:00
2005-05-31 16:42:20 +02:00
gboolean
query_team_is_in_teams_array(const Team *tm, const GPtrArray *teams);
gboolean
query_team_id_is_in_teams_array(const Team *tm, const GArray *teams);
2005-06-21 15:33:16 +02:00
gchar*
team_has_def_file(const Team *tm);
void
2005-09-21 19:42:41 +02:00
team_complete_def(Team *tm);
2005-06-21 15:33:16 +02:00
void
team_complete_def_sort(Team *tm);
2005-09-21 19:42:41 +02:00
gint
team_get_table_clid(const Team *tm);
gboolean
team_is_reserve_team(const Team *tm);
2004-12-23 13:58:39 +01:00
#endif