Commit Graph

620 Commits

Author SHA1 Message Date
Tom Stellard 3b54d38578 Add --random-seed option
This flag can be used to set the seed for the random number generator.  This
is mainly meant for testing.
2020-12-24 10:43:39 -08:00
Tom Stellard 981cd51ef2 Validate country definitions on startup
Try to load all the country definitions on startup to ensure that they
are all valid.  Invalid XML can cause bygfoot to abort when simulating
matches and make users lose any unsaved progress.
2020-12-24 10:43:39 -08:00
Tom Stellard bfa6430bef Speed up game simulations by using g_datalist_id_get_data()
g_datalist_id_get_data() performs much better than g_datalist_get_data()
because it uses a hash based lookup instead of string compare.
I tested this by starting a game with an English Premier league team
and then simulating to week 6.  According to perf's cycle counts, this
patch makes this test case about 10 times faster.

There is still room for improvement.  We currently re-compute the GQuark
value for every lookup, but we could pre-compute the GQuark once for each
option key and then use that value when looking up the data.
2020-12-24 10:43:39 -08:00
Tom Stellard 315689583c zip: Remove usage of OF macros
These are only needed to support very old K&R C compilers[1].  gentoo has also
renamed these macros in its zlib package[2] which means this code was failing
to compile there.

[1] https://trac.osgeo.org/gdal/ticket/6220
[2] https://bugs.gentoo.org/383179
2020-12-24 10:43:39 -08:00
gunnar_g bde900dfdd Fixed bug request 3257236, always show news after a match 2012-02-07 11:56:55 +00:00
gunnar_g 8bafb64b70 Add the boost and style to the default team (ticket 2778645 ) 2012-02-02 15:40:22 +00:00
gunnar_g 974b4b357e Added G_MODULE_EXPORT to all callbacks methods. Otherwise they are not useable on windows 2011-08-29 11:17:53 +00:00
gunnar_g b48c14cc9a Continue on windres integration for windows 2011-08-05 11:57:21 +00:00
gunnar_g 0d42794ca2 windres configuration in the makefile. Hope this works on windows 2011-08-05 10:52:29 +00:00
gunnar_g c209f635c0 link the zip sources in directly without making a library. Let\'s hope windows knows how to cope with this 2011-07-29 11:17:24 +00:00
gunnar_g 4e7d92c61c Correctly call pkg-config to set gmodule CFLAGS 2011-07-26 11:44:14 +00:00
gunnar_g 89bba29615 delete autosave files with the same autosave number 2011-05-19 21:44:05 +00:00
gunnar_g cd4a2283d7 the default team was restored even if no match was played 2011-05-19 19:26:11 +00:00
gunnar_g 3b04f321d1 Don't try to free up memory when you use that data later to tell the user why the application forcibly quits 2011-05-17 12:19:50 +00:00
gunnar_g a9a928c5b9 fixed the automatic storing of the default team 2011-05-04 20:29:44 +00:00
gunnar_g 439a047ba6 Fixed memorable matches. They were broken after the zipfile changes 2011-05-04 10:45:32 +00:00
gunnar_g 58de9d0540 remove unused form item 2011-02-19 22:12:15 +00:00
gunnar_g 1645c4a264 Put the zip debug messages in between ifdef debug 2011-02-19 21:55:47 +00:00
gunnar_g 8d9b2e203a The new zip file implementation is ready, still need to put the messages returned by it in debug mode 2011-02-16 20:57:48 +00:00
gunnar_g 72910b1f55 switching to a zip library instead of an executed command - there are still issues 2011-01-22 21:30:21 +00:00
gunnar_g a00650e7fe Show the flags also for non international competitions 2011-01-21 12:09:57 +00:00
gunnar_g 4d8cdd4869 Switched to internal zipping/unzipping routines. 2010-11-26 12:22:35 +00:00
gunnar_g e7f38d6064 Switched to internal zipping/unzipping routines. 2010-11-26 12:16:10 +00:00
gunnar_g 3e447a0b31 Fixed the makefile so that english news and lg_commentary are updated 2010-10-28 10:39:51 +00:00
gunnar_g e732612baf Pushed xml translations to the po files 2010-10-27 20:25:13 +00:00
gunnar_g 8f0e6bcd96 Pushed xml translations to the po files 2010-10-27 19:44:27 +00:00
gunnar_g c3bbc78a4c Fixed the memorable match seg fault, bug 2857927 2010-04-12 11:28:32 +00:00
gunnar_g e52918edf2 Removed the glade refence (this code is not generated anymore) 2010-04-02 10:51:14 +00:00
gunnar_g 5d13f20683 Now with the format really changed 2010-04-02 10:49:15 +00:00
gunnar_g e5121fe3c3 Updated the formatting 2010-04-02 10:45:33 +00:00
gunnar_g ebad6522ca Remove the interface header file as it doesn't exist anymore 2010-04-02 10:41:19 +00:00
gunnar_g cad59262ce Fix for tracker id 2942033: Spectator Bugs in Multiplayer-Games
Patch by rookie86
2010-01-29 07:38:11 +00:00
gunnar_g 8e7917bd5f Improved the corner kick actions, the next action after a corner was only in the next minute 2010-01-29 07:33:11 +00:00
gunnar_g c425e0a697 Solved the commentary issue 2010-01-19 15:10:15 +00:00
gunnar_g ca5f5a9d9e Implemented corners. TODO: The LG_commentary is not working yet. I have to verify why 2010-01-19 13:11:31 +00:00
gunnar_g 2528503a01 updated the header. Previously these files were generated 2009-11-19 15:38:13 +00:00
gunnar_g db281f78d9 Gui updates, spin buttons missing (again) 2009-11-19 12:35:45 +00:00
gunnar_g 25d4da4dd9 ng up loose ends, some buttons where not defined in the code yet, spinbuttons that weren't working,... 2009-11-13 12:02:11 +00:00
gunnar_g 88b85b32ff Improved the error message when problems occur at load_ui 2009-11-04 13:46:37 +00:00
gunnar_g 3e4dbf0fbf Converted the last part of bygfoot_misc2.glade and bygfoot_options.glade to GtkBuilder format 2009-10-29 13:11:23 +00:00
gunnar_g 0fba0675e0 Updated bygfoot_misc2 to GtkBuilder format. TODO: fix the spinbuttons 2009-10-28 13:33:46 +00:00
gunnar_g 37c05c5f61 Renamed the ui files again to glade as intltool doesn't try to translate .ui files. Updated the autogen chain so intltool is used instead of gettext (it also translate glade files)
Made the menu translatable again (at least partly)
2009-10-28 08:08:27 +00:00
gunnar_g 504a852258 Fixed the spinbutton issues (we should use a GtkAdjustment to define the steps used etc)
bygfoot_misc is now fully converted to GtkBuilder format
2009-10-27 12:34:33 +00:00
gunnar_g 2b9d03da27 Remove unused files 2009-10-27 12:33:05 +00:00
gunnar_g c8fd13e0d8 Continued on transforming bygfoot_misc.ui to GtkBuilder format. There is a problem with spinbuttons in the stadium window and automatic repayment 2009-10-26 12:49:49 +00:00
gunnar_g 603f6aacd9 Updated bygfoot_training.ui to GtkBuilder format, first changes on bygfoot_misc.ui (not finished) 2009-10-26 12:06:40 +00:00
gunnar_g ddb973c8ab Converted bygfoot_misc3.ui to GTKBuilderFormat instead of code generated 2009-10-21 12:10:45 +00:00
gunnar_g 923b269455 fixed the "Gtk-CRITICAL **: gtk_widget_ref: assertion `GTK_IS_WIDGET (widget)' failed" errors use gtkbuilder for the right click menu's too
TODO: check how to do the translations
2009-10-20 11:52:17 +00:00
gunnar_g f0ae9f71cd The main_window is ported to GtkBuilder instead of using generated code, the other screens will follow. The old glade files have been converted to GtkBuilder format and renamed to *.ui 2009-10-16 11:52:32 +00:00
gunnar_g ca195b5e51 Updated the default team implementation 2009-09-15 12:02:44 +00:00
gunnar_g cff47a96a9 finished the default team implementation, you're now able to use a default team without using the option to store/rest
ore your default team after a match
2009-08-31 12:31:24 +00:00
gunnar_g 6f389198c6 there is an option to store the order of your team, this order will be restored after a match 2009-06-24 20:02:50 +00:00
gyboth e73f113c77 Mac build changes. 2009-05-01 12:19:16 +00:00
gyboth 2e123bbd1c Mac build changes. 2009-04-30 08:38:36 +00:00
gyboth 078b70a1ea Added debug logging. 2009-04-29 17:18:54 +00:00
gyboth 8441cb596e Live game status bugfix. 2009-04-28 08:06:37 +00:00
gyboth 411c52092d UEFA cup correction. 2009-04-20 07:26:04 +00:00
gunnar_g 62feabe631 Undo last commit. It wasn't the good fix. 2009-04-17 09:34:28 +00:00
gunnar_g a052bee355 Fix valgrind warnings 2009-04-15 14:31:14 +00:00
gunnar_g 1a4d5cd62f Fix valgrind issues 2009-04-15 14:26:39 +00:00
gunnar_g 57be13e0b0 Fixed the bug in news/live_game/... where the value in something|something1|something3 was returned instead of picking one of them 2009-04-10 12:43:19 +00:00
gunnar_g 7a2135ef66 Initialize the user->debt_interest to 0. Calculations are done with this later on. 2009-03-26 15:19:25 +00:00
gyboth e3a0d31cd1 German translation updated. 2009-03-24 19:18:17 +00:00
gunnar_g a1b1904660 fix compiler warnings 2009-03-23 13:20:59 +00:00
gunnar_g de771d0e47 fix compiler warnings 2009-03-16 17:05:03 +00:00
gunnar_g 960ceff3d7 fixed compiler warnings 2009-03-14 07:05:06 +00:00
gyboth 285530ce8f Constants editing done. 2009-03-11 20:54:15 +00:00
gyboth 1692d228c4 Constants editing done. 2009-03-11 20:25:26 +00:00
gyboth e4e16947c7 Constants editing. 2009-03-10 20:58:34 +00:00
gunnar_g a707c3805e Solving valgrind issues 2009-03-10 15:58:48 +00:00
gunnar_g f847ec357a initialize LiveGame->started_game to -1 (valgrind complaints) 2009-03-10 13:29:51 +00:00
gyboth 499e206fc3 Constants editing. 2009-03-09 20:56:16 +00:00
gyboth 70d42221ca Constants editing. 2009-03-09 20:20:26 +00:00
gyboth 78fc4a8af7 Live game foul probabilities reworked. 2009-03-08 11:34:30 +00:00
gunnar_g 5bcf6086e7 Solving valgrind errors. Player->peak_region was not yet defined before being used. 2009-03-03 22:23:37 +00:00
gunnar_g cf77cb8b46 Solving valgrind errors. The error was:"Source and destination overlap in mempcpy" 2009-03-02 23:06:44 +00:00
gyboth cd45686fa2 Player name editing callback. 2009-02-24 20:40:44 +00:00
gyboth 18901260a4 Failed player name editing callback. 2009-02-23 13:03:22 +00:00
gyboth 7e6150688e Callbacks.c reordered to reflect in-game menu order. 2009-02-23 11:32:54 +00:00
gyboth 6cf432a00b Player name editing. 2009-02-22 19:33:35 +00:00
gyboth dd7c288da9 Added won/lost/drawn display in match preview. 2009-02-21 16:43:53 +00:00
gyboth 88ce988b8d Autosave names. 2009-02-21 14:45:25 +00:00
mihaitza 243a9b9b43 Updated icon (1.9 is obsolete) 2009-02-16 21:24:37 +00:00
gunnar_g 806b66df98 Moved the windows files 2009-01-29 21:38:46 +00:00
gyboth 8a684b2f1d Joined league scheduling fix. 2009-01-25 14:01:44 +00:00
gyboth 2eafaebc4b Def correction. 2009-01-25 10:32:52 +00:00
gyboth 5e2c67c570 Load save bugfix. 2009-01-13 21:47:52 +00:00
gyboth 9ac3481a6d Fixed the horses problem. 2009-01-11 15:24:26 +00:00
gyboth 9d67ab30bd Fixed the horses problem. 2009-01-11 14:51:12 +00:00
gyboth 760bd79239 Country file sorting. 2009-01-11 10:23:55 +00:00
gyboth 1532a1ffef Team pointer load/save bugfix. 2009-01-10 10:41:27 +00:00
gyboth f519321108 European defs, goto convenience. 2009-01-09 14:32:34 +00:00
gyboth 327f38f594 Fixture scheduling adjustment. 2009-01-09 10:00:23 +00:00
gyboth a04940877b European cups. 2009-01-08 22:20:26 +00:00
gyboth d1bbb23e11 Skip weeks removed. 2009-01-08 08:41:37 +00:00
gyboth d24f785128 English news (translated from German). 2009-01-06 14:13:11 +00:00
gyboth c75b4f1327 Def system changes, cup round names. 2009-01-04 10:53:09 +00:00
gyboth 0f0f75f000 Inactive leagues re-enabled in team selections. 2009-01-04 09:09:05 +00:00
gyboth e3f2897bc4 Table highlighting bug fixed. 2009-01-04 08:54:54 +00:00
gyboth 070847ef1d Cup scheduling bugfix. 2009-01-03 18:01:27 +00:00