1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2025-03-13 01:00:15 +01:00

1598 Commits

Author SHA1 Message Date
Tom Stellard
22ec7046b8 cmake: Silence warnings in gtk headers 2020-09-13 20:27:04 -07:00
Tom Stellard
2a560b8454 Fix unused variable from d195a59c80e1275ad076905eb1626265dd6fc6bc 2020-09-13 20:27:04 -07:00
Tom Stellard
4696053c95 Optimize team_get_fixture()
When searching for a team's next fixture, only search in leagues that the team
is actually in.  This improves performance a lot in countries with many leagues.
I see about a 7x speed up simulating the first 6 weeks of English leagues using
billys_boots 2019/2020 definitions from the forums.
2020-09-13 20:27:04 -07:00
Tom Stellard
49236a28ac Simplify team_get_fixture() with an early continue 2020-09-13 20:27:04 -07:00
Tom Stellard
15ba7a7c45 Simplify code in team_get_fixture() to make it more readable 2020-09-13 20:27:04 -07:00
Tom Stellard
6e9fe763da Make team_get_fixture() return const pointer 2020-09-13 20:27:04 -07:00
Tom Stellard
df651177e0 Make fixture_get() return const pointer 2020-09-13 20:27:04 -07:00
Tom Stellard
0a1e3c22b6 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-09-13 20:27:04 -07:00
Tom Stellard
ef27c38c68 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-09-02 20:00:08 -07:00
Tom Stellard
8bdeffc4d8 Remove references to some cups that have no definitions 2020-09-02 20:00:08 -07:00
Tom Stellard
12becea290 Fix invalid xml in algeria and angola league definitions 2020-09-02 20:00:08 -07:00
Tom Stellard
a14046e21f Remove Byte Order Mark and No-Break Space characters from xml files
The xml parser does not know how to parse these.
2020-09-02 20:00:08 -07:00
Tom Stellard
086334ba16 Fix African cup names 2020-09-02 19:27:33 -07:00
Tom Stellard
d195a59c80 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-09-01 20:24:30 -07:00
Tom Stellard
5a87b99e17 cmake: Add some fixes to get a minimal build/install working 2020-08-28 20:27:36 -07:00
Tom Stellard
c536e8cc85 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-08-28 20:27:36 -07:00
gunnar_g
c5fca3d502 add CmakeList files 2020-08-28 20:27:35 -07:00
Tom Stellard
b17d84a053 Add rules files that were used to convert SVN repo to git 2020-08-28 20:27:32 -07:00
gunnar_g
0514e23c80 Updated README file 2014-04-30 07:10:33 +00:00
gunnar_g
83a9539d9f Updated Serbian definiton to 2013 2013-08-22 11:17:35 +00:00
gunnar_g
d89c98b1b4 Fix the changelog 2012-02-14 13:24:29 +00:00
gunnar_g
1fcb60007a Fix the changelog 2012-02-14 12:32:27 +00:00
gunnar_g
5bab007a7d Remove the old links to _short leagues. These do not exist anymore 2012-02-14 12:17:57 +00:00
gunnar_g
7cfc8e4ba8 Fixed bug request 3257236, always show news after a match 2012-02-07 11:56:55 +00:00
gunnar_g
e32729e901 update changelog 2012-02-02 15:43:10 +00:00
gunnar_g
0a42744e2e Add the boost and style to the default team (ticket 2778645 ) 2012-02-02 15:40:22 +00:00
filipemb
b1149ba75e updated cameroon elite one and two to 10/11 season 2011-09-23 10:19:49 +00:00
filipemb
1d6dcfc28d updated cameroon elite one and two to 10/11 season 2011-09-23 10:19:35 +00:00
filipemb
2f981c556f updated cameroon elite one and two to 10/11 season 2011-09-23 10:18:19 +00:00
filipemb
b4616c28c2 updated angolan 1st and 2nd division to 2011 season 2011-09-23 10:09:20 +00:00
filipemb
6fa132d163 updated angolan 1st and 2nd division to 2011 season 2011-09-23 10:09:06 +00:00
filipemb
7ae7504e6a updated angolan 1st and 2nd division to 2011 season 2011-09-23 10:08:05 +00:00
filipemb
47de987d35 updated algerian ligue 1 and 2 defs for 11/12 season 2011-09-22 14:07:14 +00:00
filipemb
b1dad20cd8 updated algerian ligue 1 and 2 defs for 11/12 season 2011-09-22 14:07:00 +00:00
filipemb
185704b823 updated algerian ligue 1 and 2 defs for 11/12 season 2011-09-22 14:06:14 +00:00
filipemb
49faa46b3c included slovenian player names - thanks slo. 2011-09-22 12:57:47 +00:00
filipemb
76aa1d65d3 updated slovenian 3rd tier definitions to 10/11 season 2011-09-22 12:55:30 +00:00
filipemb
d045db21aa updated slovenian 3rd tier definitions to 10/11 season 2011-09-22 12:55:16 +00:00
filipemb
450c43c902 updated european definitions to 10/11 season 2011-09-22 12:53:58 +00:00
filipemb
1d1b849c4e updated european definitions to 10/11 season 2011-09-22 12:44:52 +00:00
filipemb
814e0166d2 updated andorra definition to 2011 - thanks to pietro 2011-09-22 12:35:02 +00:00
filipemb
2c5519c315 updated andorra definition to 2011 - thanks to pietro 2011-09-22 12:33:20 +00:00
filipemb
8cd5878ffb updated andorra definition to 2011 - thanks to pietro 2011-09-22 12:32:01 +00:00
filipemb
f4e8f230b6 updated andorra definition to 2011 - thanks to pietro 2011-09-22 12:30:42 +00:00
filipemb
4aef1cea5f updated andorra definition to 2011 - thanks to pietro 2011-09-22 12:29:58 +00:00
filipemb
5a8dcbadb2 updated albania definition to 2011 - thanks to pietro 2011-09-22 12:26:16 +00:00
filipemb
f71a2219a4 updated albania definition to 2011 - thanks to pietro 2011-09-22 12:23:12 +00:00
gunnar_g
52aff7359c 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
f6d3aa60e0 Continue on windres integration for windows 2011-08-05 11:57:21 +00:00
gunnar_g
fabdf79cef windres configuration in the makefile. Hope this works on windows 2011-08-05 10:52:29 +00:00