mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-02-16 03:21:05 +01:00
"Lg commentary testing."
This commit is contained in:
parent
8ec2405e2e
commit
4d584b34fb
@ -1262,7 +1262,7 @@
|
||||
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||
<property name="snap_to_ticks">False</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="adjustment">0 -10 20 1 10 10</property>
|
||||
<property name="adjustment">0 0 30 1 10 10</property>
|
||||
<signal name="value_changed" handler="on_spinbutton_speed_value_changed" last_modification_time="Mon, 10 Jan 2005 15:04:50 GMT"/>
|
||||
<signal name="button_press_event" handler="on_spinbutton_speed_button_press_event" last_modification_time="Thu, 19 May 2005 18:01:49 GMT"/>
|
||||
</widget>
|
||||
|
@ -66,6 +66,12 @@ debug_action(const gchar *text, gint value)
|
||||
while(week < value)
|
||||
on_button_new_week_clicked(NULL, NULL);
|
||||
}
|
||||
else if(g_str_has_prefix(text, "testcom") ||
|
||||
g_str_has_prefix(text, "tc"))
|
||||
{
|
||||
stat5 = -value;
|
||||
game_gui_print_message("Commentary type displayed: %d.", value);
|
||||
}
|
||||
else if(g_str_has_prefix(text, "help"))
|
||||
{
|
||||
printf("Debug options:\n"
|
||||
@ -80,6 +86,9 @@ debug_action(const gchar *text, gint value)
|
||||
"pospref \t change recruiting pref\n"
|
||||
"goto \t Press 'new week' automatically until\n"
|
||||
" \t the appropriate week is reached\n"
|
||||
"testcom|tc \t Test a specific live game commentary.\n"
|
||||
" \t Find the numbers in live_game_struct.h (LiveGameEventType)\n"
|
||||
" \t Use 'goto' afterwards.\n"
|
||||
"help \t display this help\n");
|
||||
}
|
||||
|
||||
|
@ -56,9 +56,9 @@ game_gui_live_game_show_unit(const LiveGameUnit *unit)
|
||||
gtk_progress_bar_set_fraction(progress_bar, (fraction > 1) ? 1 : fraction);
|
||||
gtk_progress_bar_set_text(progress_bar, buf);
|
||||
g_usleep((gint)rint(sleep_factor *
|
||||
(gfloat)(const_int("int_game_gui_live_game_speed_base") +
|
||||
(gfloat)(const_int("int_game_gui_live_game_speed_max") +
|
||||
(option_int("int_opt_user_live_game_speed", &usr(stat2).options) *
|
||||
const_int("int_game_gui_live_game_speed_step")))));
|
||||
const_int("int_game_gui_live_game_speed_grad")))));
|
||||
|
||||
while(gtk_events_pending())
|
||||
gtk_main_iteration();
|
||||
|
@ -63,7 +63,7 @@ live_game_calculate_fixture(Fixture *fix)
|
||||
|
||||
if(last_unit.event.type == LIVE_GAME_EVENT_END_MATCH)
|
||||
{
|
||||
if(fixture_user_team_involved(match->fix) != -1)
|
||||
if(fixture_user_team_involved(match->fix) != -1 || stat5 < 0)
|
||||
lg_commentary_post_match();
|
||||
game_post_match(fix);
|
||||
}
|
||||
@ -98,7 +98,7 @@ live_game_initialize(Fixture *fix)
|
||||
|
||||
game_initialize(fix);
|
||||
|
||||
if(fixture_user_team_involved(match->fix) != -1)
|
||||
if(fixture_user_team_involved(match->fix) != -1 || stat5 < 0)
|
||||
lg_commentary_initialize(fix);
|
||||
}
|
||||
|
||||
@ -1310,7 +1310,7 @@ live_game_finish_unit(void)
|
||||
treeview_show_user_player_list();
|
||||
}
|
||||
|
||||
if(fixture_user_team_involved(match->fix) != -1)
|
||||
if(fixture_user_team_involved(match->fix) != -1 || stat5 < 0)
|
||||
{
|
||||
if(unit->time != LIVE_GAME_UNIT_TIME_PENALTIES)
|
||||
{
|
||||
@ -1322,6 +1322,21 @@ live_game_finish_unit(void)
|
||||
|
||||
lg_commentary_generate(match, unit);
|
||||
|
||||
if(stat5 == -unit->event.type)
|
||||
{
|
||||
printf("type %d com **%s**", unit->event.type, unit->event.commentary->str);
|
||||
if(g_strrstr(unit->event.commentary->str, "[") ||
|
||||
g_strrstr(unit->event.commentary->str, "]") ||
|
||||
g_strrstr(unit->event.commentary->str, "<") ||
|
||||
g_strrstr(unit->event.commentary->str, ">") ||
|
||||
g_strrstr(unit->event.commentary->str, "=") ||
|
||||
g_strrstr(unit->event.commentary->str, " G ") ||
|
||||
g_strrstr(unit->event.commentary->str, " L "))
|
||||
printf(" ERROR?\n");
|
||||
else
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
unit->event.verbosity = live_game_event_get_verbosity(unit->event.type);
|
||||
}
|
||||
|
||||
|
@ -12,38 +12,38 @@ enum LiveGameEventType
|
||||
/** This is the 'main' event, nothing in
|
||||
particular is happening; one of the teams
|
||||
is in possession of the ball. */
|
||||
LIVE_GAME_EVENT_GENERAL = 0,
|
||||
LIVE_GAME_EVENT_START_MATCH,
|
||||
LIVE_GAME_EVENT_HALF_TIME,
|
||||
LIVE_GAME_EVENT_EXTRA_TIME,
|
||||
LIVE_GAME_EVENT_END_MATCH,
|
||||
LIVE_GAME_EVENT_LOST_POSSESSION,
|
||||
LIVE_GAME_EVENT_SCORING_CHANCE,
|
||||
LIVE_GAME_EVENT_HEADER,
|
||||
LIVE_GAME_EVENT_PENALTY,
|
||||
LIVE_GAME_EVENT_FREE_KICK,
|
||||
LIVE_GAME_EVENT_GOAL,
|
||||
LIVE_GAME_EVENT_OWN_GOAL,
|
||||
LIVE_GAME_EVENT_POST,
|
||||
LIVE_GAME_EVENT_MISS,
|
||||
LIVE_GAME_EVENT_SAVE,
|
||||
LIVE_GAME_EVENT_CROSS_BAR,
|
||||
LIVE_GAME_EVENT_FOUL,
|
||||
LIVE_GAME_EVENT_FOUL_YELLOW,
|
||||
LIVE_GAME_EVENT_FOUL_RED,
|
||||
LIVE_GAME_EVENT_FOUL_RED_INJURY,
|
||||
LIVE_GAME_EVENT_SEND_OFF,
|
||||
LIVE_GAME_EVENT_INJURY,
|
||||
LIVE_GAME_EVENT_GENERAL = 0, /* 0 */
|
||||
LIVE_GAME_EVENT_START_MATCH, /* 1 */
|
||||
LIVE_GAME_EVENT_HALF_TIME, /* 2 */
|
||||
LIVE_GAME_EVENT_EXTRA_TIME, /* 3 */
|
||||
LIVE_GAME_EVENT_END_MATCH, /* 4 */
|
||||
LIVE_GAME_EVENT_LOST_POSSESSION, /* 5 */
|
||||
LIVE_GAME_EVENT_SCORING_CHANCE, /* 6 */
|
||||
LIVE_GAME_EVENT_HEADER, /* 7 */
|
||||
LIVE_GAME_EVENT_PENALTY, /* 8 */
|
||||
LIVE_GAME_EVENT_FREE_KICK, /* 9 */
|
||||
LIVE_GAME_EVENT_GOAL, /* 10 */
|
||||
LIVE_GAME_EVENT_OWN_GOAL, /* 11 */
|
||||
LIVE_GAME_EVENT_POST, /* 12 */
|
||||
LIVE_GAME_EVENT_MISS, /* 13 */
|
||||
LIVE_GAME_EVENT_SAVE, /* 14 */
|
||||
LIVE_GAME_EVENT_CROSS_BAR, /* 15 */
|
||||
LIVE_GAME_EVENT_FOUL, /* 16 */
|
||||
LIVE_GAME_EVENT_FOUL_YELLOW, /* 17 */
|
||||
LIVE_GAME_EVENT_FOUL_RED, /* 18 */
|
||||
LIVE_GAME_EVENT_FOUL_RED_INJURY, /* 19 */
|
||||
LIVE_GAME_EVENT_SEND_OFF, /* 20 */
|
||||
LIVE_GAME_EVENT_INJURY, /* 21 */
|
||||
/** An injury that permits the player to
|
||||
continue after some brief time. */
|
||||
LIVE_GAME_EVENT_TEMP_INJURY,
|
||||
LIVE_GAME_EVENT_PENALTIES,
|
||||
LIVE_GAME_EVENT_STADIUM,
|
||||
LIVE_GAME_EVENT_STADIUM_BREAKDOWN,
|
||||
LIVE_GAME_EVENT_STADIUM_RIOTS,
|
||||
LIVE_GAME_EVENT_STADIUM_FIRE,
|
||||
LIVE_GAME_EVENT_SUBSTITUTION,
|
||||
LIVE_GAME_EVENT_STRUCTURE_CHANGE,
|
||||
LIVE_GAME_EVENT_TEMP_INJURY, /* 22 */
|
||||
LIVE_GAME_EVENT_PENALTIES, /* 23 */
|
||||
LIVE_GAME_EVENT_STADIUM, /* 24 */
|
||||
LIVE_GAME_EVENT_STADIUM_BREAKDOWN, /* 25 */
|
||||
LIVE_GAME_EVENT_STADIUM_RIOTS, /* 26 */
|
||||
LIVE_GAME_EVENT_STADIUM_FIRE, /* 27 */
|
||||
LIVE_GAME_EVENT_SUBSTITUTION, /* 28 */
|
||||
LIVE_GAME_EVENT_STRUCTURE_CHANGE, /* 29 */
|
||||
LIVE_GAME_EVENT_STYLE_CHANGE_ALL_OUT_DEFEND,
|
||||
LIVE_GAME_EVENT_STYLE_CHANGE_DEFEND,
|
||||
LIVE_GAME_EVENT_STYLE_CHANGE_BALANCED,
|
||||
|
@ -297,12 +297,12 @@ on_spinbutton_speed_button_press_event (GtkWidget *widget,
|
||||
{
|
||||
if(event->button == 3)
|
||||
{
|
||||
if(option_int("int_opt_user_live_game_speed", &usr(stat2).options) == -10)
|
||||
if(option_int("int_opt_user_live_game_speed", &usr(stat2).options) == 0)
|
||||
option_set_int("int_opt_user_live_game_speed", &usr(stat2).options, 30);
|
||||
else if(option_int("int_opt_user_live_game_speed", &usr(stat2).options) == 30)
|
||||
option_set_int("int_opt_user_live_game_speed", &usr(stat2).options, 20);
|
||||
else if(option_int("int_opt_user_live_game_speed", &usr(stat2).options) == 20)
|
||||
option_set_int("int_opt_user_live_game_speed", &usr(stat2).options, 0);
|
||||
else
|
||||
option_set_int("int_opt_user_live_game_speed", &usr(stat2).options, -10);
|
||||
option_set_int("int_opt_user_live_game_speed", &usr(stat2).options, 0);
|
||||
|
||||
gtk_spin_button_set_value(
|
||||
GTK_SPIN_BUTTON(lookup_widget(window.live, "spinbutton_speed")),
|
||||
|
@ -653,7 +653,7 @@ create_window_live (void)
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table2), 1);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table2), 3);
|
||||
|
||||
spinbutton_speed_adj = gtk_adjustment_new (0, -10, 20, 1, 10, 10);
|
||||
spinbutton_speed_adj = gtk_adjustment_new (0, 0, 30, 1, 10, 10);
|
||||
spinbutton_speed = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_speed_adj), 1, 0);
|
||||
gtk_widget_show (spinbutton_speed);
|
||||
gtk_table_attach (GTK_TABLE (table2), spinbutton_speed, 1, 2, 1, 2,
|
||||
|
@ -333,8 +333,8 @@ float_game_gui_live_game_scale_chance 4500
|
||||
float_game_gui_live_game_scale_range 100000
|
||||
|
||||
# live game speed (milliseconds
|
||||
int_game_gui_live_game_speed_base 1000500
|
||||
int_game_gui_live_game_speed_step 100000
|
||||
int_game_gui_live_game_speed_grad -66683
|
||||
int_game_gui_live_game_speed_max 3000000
|
||||
|
||||
# factor changing the speed when penalties
|
||||
float_game_gui_live_game_speed_penalties_factor 20000
|
||||
|
@ -7,7 +7,7 @@
|
||||
int_opt_user_confirm_youth 0
|
||||
|
||||
int_opt_user_show_live_game 0
|
||||
int_opt_user_live_game_speed 0
|
||||
int_opt_user_live_game_speed 20
|
||||
int_opt_user_live_game_verbosity 7
|
||||
int_opt_user_show_tendency_bar 1
|
||||
int_opt_user_pause_injury 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user