/**
 * \file ParamStructs.h
 * \date 12.04.2003
 * \author Matus Horvath
 *
 * Server parameters in the world model
 */

#ifndef COMMON_WORLD_PARAMETERS_H
#define COMMON_WORLD_PARAMETERS_H

/// Maximum string size to store in SERVER_PARAMS strings
#define SERVER_PARAMS_STRING_SIZE 32

/// Soccer server parameters
struct SERVER_PARAMS
{
	// Poznamka: Tieto nazvy mali roztoce o dost ine (napriklad
	// "psize" namiesto "player_size". Zmenil som ich na oficialne
	// nazvy, aby v tom bol mensi chaos, ked som to prerabal na 
	// server 9.x. V komentari je vzdy povodny nazov; ak nebol
	// predtym parameter pouzity, je tam cislo verzie servera,
	// ktory ho prvy podporuje.

	int catch_ban_cycle;		// cban_cycle
	int clang_advice_win;		// clang_advice_win
	int clang_define_win;		// clang_define_win
	int clang_del_win;			// - (8.05rel7)
	int clang_info_win;			// clang_info_win
	int clang_mess_delay;		// clang_mess_delay
	int clang_mess_per_cycle;	// clang_mess_per_cycle
	int clang_meta_win;			// clang_meta_win
	int clang_rule_win;			// - (8.05rel7)
	int clang_win_size;			// clang_win_size
	int coach_port;				// - ?
	int drop_ball_time;			// drop_time
	int freeform_send_period;	// - (8.05rel2)
	int freeform_wait_period;	// - (8.05rel2)
	int game_log_compression;	// - (8.02)
	int game_log_version;		// - (8.02)
	int goalie_max_moves;		// goalie_max_moves
	int half_time;				// half_time
	int hear_decay;				// hear_decay
	int hear_inc;				// hear_inc
	int hear_max;				// hear_max
	int max_goal_kicks;			// - (8.05rel5)
	int olcoach_port;			// - ?
	int point_to_ban;			// - (8.03)
	int point_to_duration;		// - (8.03)
	int port;					// - ?
	int recv_step;				// recv_st
	int say_coach_cnt_max;		// say_cnt_max
	int say_coach_msg_size;		// SayCoachMsgSize
	int say_msg_size;			// SayMsgSize
	int send_step;				// send_st
	int send_vi_step;			// sv_st
	int sense_body_step;		// sb_step
	int simulator_step;			// sim_st
	int slow_down_factor;		// slow_down_factor
	int start_goal_l;			// start_goal_l
	int start_goal_r;			// start_goal_r
	int synch_micro_sleep;		// - (7.11)
	int synch_offset;			// - (7.11)
	int tackle_cycles;			// - (8.05rel3)
	int text_log_compression;	// - (8.02)
	char game_log_dir[SERVER_PARAMS_STRING_SIZE];			// - (8.02)
	char game_log_fixed_name[SERVER_PARAMS_STRING_SIZE];	// - (8.02)
	char landmark_file[SERVER_PARAMS_STRING_SIZE];			// - ?
	char log_date_format[SERVER_PARAMS_STRING_SIZE];		// - (8.02)
	char text_log_dir[SERVER_PARAMS_STRING_SIZE];			// - (8.02)
	char text_log_fixed_name[SERVER_PARAMS_STRING_SIZE];	// - (8.02)
	int coach;					// CoachMode
	int coach_w_referee;		// CwRMode
	int old_coach_hear;			// old_hear
	int wind_none;				// win_no
	int wind_random;			// win_random
	int back_passes;			// - (8.05rel5)
	int forbid_kick_off_offside;	// kickoffoffside
	int free_kick_faults;		// - (8.05rel5)
	int fullstate_l;			// fullstate_l
	int fullstate_r;			// fullstate_r
	int game_log_dated;			// - (8.02)
	int game_log_fixed;			// - (8.02)
	int game_logging;			// - (8.02)
	int log_times;				// - ?
	int profile;				// - ?
	int proper_goal_kicks;		// - (8.05rel5)
	int record_messages;		// - (8.02)
	int send_comms;				// - (8.02)
	int synch_mode;				// - (7.11)
	int team_actuator_noise;	// - ?
	int text_log_dated;			// - (8.02)
	int text_log_fixed;			// - (8.02)
	int text_logging;			// - (8.02)
	int use_offside;			// useoffside
	int verbose;				// - ?
	float audio_cut_dist;		// audio_dist
	float ball_accel_max;		// baccel_max
	float ball_decay;			// bdecay
	float ball_rand;			// brand
	float ball_size;			// bsize
	float ball_speed_max;		// bspeed_max
	float ball_weight;			// bweight
	float catch_probability;	// catch_prob
	float catchable_area_l;		// catch_area_l
	float catchable_area_w;		// catch_area_w
	float ckick_margin;			// ckmargin
	float control_radius;		// ctlradius
	float dash_power_rate;		// dprate
	float effort_inc;			// effort_inc
	float effort_inc_thr;		// effort_ithr
	float effort_dec;			// effort_dec
	float effort_dec_thr;		// effort_dthr;
	float effort_init;			// effort_init
	float effort_min;			// effort_min
	float goal_width;			// gwidth
	float inertia_moment;		// inertia_moment
	float kick_power_rate;		// kprate
	float kick_rand;			// kick_rand
	float kick_rand_factor_l;	// kick_rand_factor_l
	float kick_rand_factor_r;	// kick_rand_factor_r
	float kickable_margin;		// kmargin
	float maxmoment;			// maxm
	float maxneckang;			// maxn
	float maxneckmoment;		// maxnm
	float maxpower;				// maxp
	float minmoment;			// minm
	float minneckang;			// minn
	float minneckmoment;		// minnm
	float minpower;				// minp
	float offside_active_area_size;	// offside_area
	float offside_kick_margin;	// offside_kick_margin
	float player_accel_max;		// paccel_max
	float player_decay;			// pdecay
	float player_rand;			// prand
	float player_size;			// psize
	float player_speed_max;		// pspeed_max
	float player_weight;		// pweight
	float prand_factor_l;		// prand_factor_l
	float prand_factor_r;		// prand_factor_r
	float quantize_step;		// - ?
	float quantize_step_l;		// - ?
	float recover_dec;			// recover_dec
	float recover_dec_thr;		// recover_dthr
	float recover_min;			// recover_min
	float slowness_on_top_for_left_team;	// slowness_on_top_for_left_team
	float slowness_on_top_for_right_team;	// slowness_on_top_for_right_team
	float stamina_inc_max;		// stamina_inc
	float stamina_max;			// stamina_max
	float stopped_ball_vel;		// - (8.05rel5)
	float tackle_back_dist;		// - (8.05rel3)
	float tackle_dist;			// - (8.05rel3)
	float tackle_exponent;		// - (8.05rel3)
	float tackle_power_rate;	// - (8.05rel3)
	float tackle_width;			// - (8.05rel3)
	float visible_angle;		// visangle
	float visible_distance;		// visdist
	float wind_ang;				// winang
	float wind_dir;				// windir
	float wind_force;			// winforce
	float wind_rand;			// winrand
	// Increment SERVER_PARAMS_COUNT if adding parameters!!!
	
/*
 * Nasledujuce parametre povodnych Roztocov neviem co znamenaju
 *
	float recover_init;
	float team_actuator_noise;
	float ctlradius_width;
	float kickable_area;
	int lcm_st;
	int kickoffoffside;

	float dist_qstep;
	float land_qstep;
	float dir_qstep;
	float dist_qstep_l;
	float dist_qstep_r;
	float land_qstep_l;
	float land_qstep_r;
	float dir_qstep_l;
	float dir_qstep_r;
 */
};

/// How many parameters does SERVER_PARAMS have?
#define SERVER_PARAMS_COUNT 137


/// Player parameters
struct PLAYER_PARAMS
{
	int player_types;
	int pt_max;
	int random_seed;						// new
	int subs_max;
	float dash_power_rate_delta_max;
	float dash_power_rate_delta_min;
	float effort_max_delta_factor;
	float effort_min_delta_factor;
	float extra_stamina_delta_max;
	float extra_stamina_delta_min;
	float inertia_moment_delta_factor;
	float kick_rand_delta_factor;
	float kickable_margin_delta_max;
	float kickable_margin_delta_min;
	float new_dash_power_rate_delta_max;	// new
	float new_dash_power_rate_delta_min;	// new
	float new_stamina_inc_max_delta_factor;	// new
	float player_decay_delta_max;
	float player_decay_delta_min;
	float player_size_delta_factor;
	float player_speed_max_delta_max;
	float player_speed_max_delta_min;
	float stamina_inc_max_delta_factor;
};

/// How many parameters does PLAYER_PARAMS have?
#define PLAYER_PARAMS_COUNT 23


/// Player type
struct PLAYER_TYPE
{
	int id;
	float player_speed_max;
	float stamina_inc_max;
	float player_decay;
	float inertia_moment;
	float dash_power_rate;
	float player_size;
	float kickable_margin;
	float kick_rand;
	float extra_stamina;
	float effort_max;
	float effort_min;
};

/// How many parameters does PLAYER_TYPE have?
#define PLAYER_TYPE_PARAMS_COUNT 11

#endif // COMMON_WORLD_PARAMETERS_H
