2005-10-20 17:45:00 +02:00
|
|
|
/*
|
2005-11-26 17:52:51 +01:00
|
|
|
user.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 USER_H
|
|
|
|
#define USER_H
|
|
|
|
|
|
|
|
#include "bygfoot.h"
|
2005-12-01 12:50:54 +01:00
|
|
|
#include "cup_struct.h"
|
2005-03-03 13:46:48 +01:00
|
|
|
#include "user_struct.h"
|
2005-01-09 21:21:22 +01:00
|
|
|
#include "variables.h"
|
|
|
|
|
2005-03-03 13:46:48 +01:00
|
|
|
/** Convenience abbrevs. */
|
|
|
|
#define usr(i) g_array_index(users, User, i)
|
2005-04-07 18:44:33 +02:00
|
|
|
#define query_user_games_this_week_round() query_user_games_in_week_round(week, week_round)
|
2005-03-18 23:03:23 +01:00
|
|
|
#define current_user usr(cur_user)
|
2005-03-03 13:46:48 +01:00
|
|
|
|
|
|
|
void
|
|
|
|
user_set_up_team_new_game(User *user);
|
|
|
|
|
2005-01-09 21:21:22 +01:00
|
|
|
void
|
2005-03-03 13:46:48 +01:00
|
|
|
user_set_up_team(User *user);
|
|
|
|
|
|
|
|
void
|
|
|
|
user_set_up_finances(User *user);
|
|
|
|
|
|
|
|
User
|
|
|
|
user_new(void);
|
2005-01-09 21:21:22 +01:00
|
|
|
|
|
|
|
void
|
2005-03-03 13:46:48 +01:00
|
|
|
user_remove(gint idx, gboolean regenerate_team);
|
2005-01-09 21:21:22 +01:00
|
|
|
|
|
|
|
void
|
2005-03-03 13:46:48 +01:00
|
|
|
user_set_player_list_attributes(const User *user, PlayerListAttribute *attribute, gint list_number);
|
2005-01-09 21:21:22 +01:00
|
|
|
|
2005-03-13 16:46:15 +01:00
|
|
|
gboolean
|
2005-04-07 18:44:33 +02:00
|
|
|
query_user_game_in_week_round(gint usr_idx, gint week_number, gint week_round_number);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
query_user_games_in_week_round(gint week_number, gint week_round_number);
|
2005-03-13 16:46:15 +01:00
|
|
|
|
2005-03-14 18:47:27 +01:00
|
|
|
User*
|
|
|
|
user_from_team(const Team *tm);
|
|
|
|
|
2005-03-17 21:26:01 +01:00
|
|
|
void
|
|
|
|
user_weekly_update_counters(User *user);
|
|
|
|
|
2005-03-18 23:03:23 +01:00
|
|
|
Event
|
|
|
|
user_event_new(void);
|
|
|
|
|
2006-02-28 23:17:08 +01:00
|
|
|
#ifdef G_OS_UNIX
|
2005-03-18 23:03:23 +01:00
|
|
|
void
|
|
|
|
user_event_add(User *user, gint type, gint value1, gint value2,
|
2005-07-08 11:26:00 +02:00
|
|
|
gpointer value_pointer, gchar *format, ...)
|
|
|
|
__attribute__ ((format (printf, 6, 7)));
|
2006-02-28 23:17:08 +01:00
|
|
|
#else
|
|
|
|
void
|
|
|
|
user_event_add(User *user, gint type, gint value1, gint value2,
|
|
|
|
gpointer value_pointer, gchar *format, ...);
|
|
|
|
#endif
|
2005-03-18 23:03:23 +01:00
|
|
|
|
|
|
|
void
|
|
|
|
user_event_remove(User *user, gint idx);
|
|
|
|
|
|
|
|
void
|
|
|
|
user_event_show_next(void);
|
|
|
|
|
|
|
|
void
|
|
|
|
user_change_team(User *user, Team *tm);
|
|
|
|
|
|
|
|
void
|
|
|
|
user_set_up_counters(User *user);
|
|
|
|
|
2005-04-07 18:44:33 +02:00
|
|
|
gboolean
|
|
|
|
query_user_teams_have_unfit(void);
|
|
|
|
|
2005-04-16 09:46:04 +02:00
|
|
|
void
|
2005-12-01 12:50:54 +01:00
|
|
|
user_history_add(User *user, gint type, const gchar *team_name,
|
|
|
|
const gchar* string0, const gchar *string1,
|
|
|
|
const gchar *string2);
|
2005-04-16 09:46:04 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
user_history_to_string(const UserHistory *history, gchar *buf);
|
|
|
|
|
|
|
|
gint
|
|
|
|
user_history_compare(gconstpointer a, gconstpointer b);
|
|
|
|
|
2005-12-01 12:50:54 +01:00
|
|
|
void
|
|
|
|
user_add_cup_success(User *user, const Cup *cup, gint round, gint type);
|
|
|
|
|
2005-04-25 18:49:54 +02:00
|
|
|
void
|
|
|
|
user_job_offer(User *user);
|
|
|
|
|
2005-05-30 17:54:20 +02:00
|
|
|
gboolean
|
|
|
|
query_user_no_turn(void);
|
|
|
|
|
2005-06-20 14:46:57 +02:00
|
|
|
void
|
|
|
|
user_show_sponsors(void);
|
|
|
|
|
|
|
|
UserSponsor
|
|
|
|
user_get_sponsor(const User *user);
|
|
|
|
|
|
|
|
void
|
|
|
|
user_show_sponsor_continue(void);
|
|
|
|
|
2005-08-20 21:39:36 +02:00
|
|
|
void
|
2005-08-21 21:58:51 +02:00
|
|
|
user_mm_set_filename(const gchar *filename, gchar *dest);
|
2005-08-20 21:39:36 +02:00
|
|
|
|
|
|
|
void
|
2005-08-21 21:58:51 +02:00
|
|
|
user_mm_save_file(const gchar *filename, const GArray *mmatches);
|
2005-08-20 21:39:36 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
user_mm_add_last_match(gboolean load_file, gboolean save_file);
|
|
|
|
|
|
|
|
void
|
2005-08-21 21:58:51 +02:00
|
|
|
user_mm_import_file(const gchar *filename);
|
|
|
|
|
|
|
|
void
|
|
|
|
user_mm_load_file(const gchar *filename, GArray *mmatches);
|
|
|
|
|
|
|
|
void
|
|
|
|
user_mm_export_file(const gchar *filename);
|
2005-06-20 14:46:57 +02:00
|
|
|
|
2005-01-09 21:21:22 +01:00
|
|
|
#endif
|