bygfoot/src/game.h

129 lines
3.0 KiB
C
Raw Normal View History

2005-10-20 17:45:00 +02:00
/*
2005-11-26 17:52:51 +01:00
game.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.
*/
2005-01-09 21:21:22 +01:00
#ifndef GAME_H
#define GAME_H
#include "bygfoot.h"
#include "fixture_struct.h"
#include "player_struct.h"
2005-03-21 11:16:37 +01:00
#include "live_game_struct.h"
2005-01-09 21:21:22 +01:00
/** Player types. @see game_get_player() */
enum GamePlayerType
{
2005-03-21 11:16:37 +01:00
GAME_PLAYER_TYPE_DEFEND = LIVE_GAME_UNIT_AREA_DEFEND,
GAME_PLAYER_TYPE_MIDFIELD = LIVE_GAME_UNIT_AREA_MIDFIELD,
GAME_PLAYER_TYPE_ATTACK = LIVE_GAME_UNIT_AREA_ATTACK,
2005-01-09 21:21:22 +01:00
GAME_PLAYER_TYPE_PENALTY,
GAME_PLAYER_TYPE_END
};
void
game_get_values(const Fixture *fix, gfloat team_values[][GAME_TEAM_VALUE_END],
gfloat home_advantage);
gfloat
game_get_player_contribution(const Player *pl, gboolean attack, gboolean special);
2005-01-09 21:21:22 +01:00
gint
2005-01-24 19:01:55 +01:00
game_get_player(const Team *tm, gint player_type,
gint number_of_penalty, gint not_this_one,
gboolean skills);
2005-01-09 21:21:22 +01:00
void
2005-01-24 19:01:55 +01:00
game_get_player_probs(GArray *players, gfloat *probs, gfloat *weights, gboolean skills);
2005-01-09 21:21:22 +01:00
gint
game_get_penalty_taker(const Team *tm, gint last_penalty);
void
2005-03-08 09:25:46 +01:00
game_initialize(Fixture *fix);
void
game_save_team_states(void);
gboolean
game_check_live_game_resume_state(void);
void
game_get_subs(gint team_number, gint *subs_in, gint *subs_out);
gint
game_substitute_player(Team *tm, gint player_number);
2005-03-09 14:10:28 +01:00
void
game_player_injury(Player *pl);
gfloat
game_get_foul_possession_factor(gboolean boost1, gboolean boost2);
gint
2005-05-16 16:44:13 +02:00
game_find_to_substitute(gint clid, const Team *tm);
2005-03-09 14:10:28 +01:00
void
2005-05-16 16:44:13 +02:00
game_substitute_player_send_off(gint clid, Team *tm, gint player_number,
2005-03-09 14:10:28 +01:00
gint *to_substitute, gint *substitute);
2005-03-09 15:02:49 +01:00
void
game_decrease_fitness(const Fixture *fix);
2005-03-10 21:59:39 +01:00
gint
game_player_get_ban_duration(void);
2005-03-11 13:17:48 +01:00
void
2005-10-20 17:45:00 +02:00
game_update_stats(LiveGame *lg, const LiveGameUnit *unit);
2005-03-11 13:17:48 +01:00
void
2005-10-20 17:45:00 +02:00
game_update_stats_player(LiveGame *lg, const LiveGameUnit *unit);
2005-03-11 13:17:48 +01:00
2005-03-13 16:46:15 +01:00
void
game_post_match(Fixture *fix);
2005-03-16 21:48:25 +01:00
void
game_assign_attendance(Fixture *fix);
2005-06-04 12:28:49 +02:00
void
game_assign_attendance_neutral(Fixture *fix);
2005-03-16 21:48:25 +01:00
void
game_stadium_event(Stadium *stadium, gint type);
2005-03-25 11:54:54 +01:00
void
game_get_max_values(gfloat max_values[3]);
2005-04-26 17:00:26 +02:00
void
game_reset_players(gint idx);
2005-05-18 18:00:49 +02:00
gint
game_get_default_penalty_shooter(const Team *tm);
2005-11-01 22:20:24 +01:00
void
game_boost_cost(void);
2005-10-21 15:45:58 +02:00
2009-03-08 12:34:30 +01:00
gfloat
game_get_foul_prob(const LiveGame *live_game, const LiveGameUnit *unit);
2005-01-09 21:21:22 +01:00
#endif