Commit Graph

124 Commits

Author SHA1 Message Date
Peter Nelson 3e83dcedfd Codechange: Allocate houses dynamically instead of from a fixed array.
This uses vectors for HouseSpecs and global/town building counts.
2024-03-28 23:23:00 +01:00
Patric Stout 3e625b5b1a
Add: track savegame size to report with survey (#12304) 2024-03-16 08:58:56 +01:00
Tyler Trahan fd9e72a7e7
Feature: Use real-time "wallclock" timekeeping units (#11341) 2024-01-23 11:36:09 -05:00
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 2024-01-22 09:04:34 -05:00
Patric Stout bd85f61a40 Change: use a stronger hash and actual random information to generate Uids 2024-01-20 14:23:03 +01:00
Rubidium acec34a0fe Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex 2023-05-19 11:24:44 +02:00
Rubidium d9a04ba446 Codechange: make the MD5 hash/digest/checksum variables a std::array 2023-05-19 11:24:44 +02:00
Patric Stout 7634553d22 Feature: opt-in survey when exiting a game
On first start-up, the game will ask if you want to participate
in our automated survey. You have to opt-in, and can easily opt-out
(via the Options) at any time.

When opt-in, whenever you exit a game, a JSON blob will be send
to the survey server hosted by OpenTTD. This JSON blob contains
information that gives a global picture of the game just played:
- What settings were used
- How many humans vs AIs
- How long the game has been played
- Basic information about the OS / CPU

All this information is kept very generic, so there is no
chance we send private information to our survey server.
Nothing in the JSON blob could identify you as a person; it
mostly tells about the game played. At any time you can see
what the JSON blob includes, by pressing the "Preview Survey
Results" button in-game.
2023-05-14 23:22:02 +02:00
Tyler Trahan 6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar (#10753) 2023-05-04 13:14:12 +00:00
Peter Nelson 00bf42353a Codechange: Place gamelog into its own class, along with internal data.
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
2023-05-02 19:47:55 +01:00
Patric Stout 31ad990831
Codechange: move tick-counter into TimerGameTick (#10712) 2023-04-24 16:55:40 +00:00
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
glx22 b080f24bd8 Codechange: move windows common to AI and GS out of ai_gui 2023-02-05 19:27:25 +01:00
Rubidium 7cdc23fd64 Codechange: hide the map's size related fields in the Map structure 2023-01-21 17:11:40 +01:00
Patric Stout c3dc27e37e Add: settings to limit your fast-forward game speed
By default this setting is set to 2500% normal game speed.
2021-02-28 18:04:51 +00:00
Niels Martin Hansen c8779fb311
Feature: NewGRF callback profiling (#7868)
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
2020-01-26 13:45:51 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Gabda b870596f15 Add #6887: Option to show zone inside local authority boundary of towns
Can be found at town information > local authority window
Layout for button is same as Graph Keys
Turn on/off for every town individually
2019-08-17 21:45:20 +01:00
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
2019-03-20 19:24:55 +01:00
Niels Martin Hansen e8d397e4ee Codechange: Make a merged k-d tree index of all viewport signs 2019-03-09 20:27:11 +01:00
Niels Martin Hansen d84b67e54d Codechange: Make a k-d tree index of stations 2019-03-09 20:27:11 +01:00
Niels Martin Hansen 7b56be0f3a Codechange: Make a k-d tree index of towns 2019-03-09 20:27:11 +01:00
Gabda 5e4f76f2f9 Fix #5654: (Re)initialise graph GUI on game (re)start (#7191) 2019-02-07 20:17:32 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
fonsinchen c32eea02dd (svn r25354) -Add: link graph schedule and typedefs for LinkGraph and related classes 2013-06-09 12:58:37 +00:00
michi_cc 6f9668330e (svn r24132) -Change [FS#4713]: Improve randomness of tile order in the tile loop. (monoid) 2012-04-17 19:43:43 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
truebrain 12aa5b6a58 (svn r23604) -Add: initial support for GameScripts 2011-12-19 20:50:54 +00:00
rubidium 47c5d30b5d (svn r23084) -Codechange: get rid of a redundant variable 2011-11-03 22:49:03 +00:00
frosch c9e920f1eb (svn r22693) -Fix [FS#4691]: The override managers were not reset in some cases like creating a new scenario. 2011-07-29 22:23:17 +00:00
smatz 756cc6cf65 (svn r22116) -Codechange: use PoolBase::Clean() at more places 2011-02-19 23:05:47 +00:00
terkhen 03088dadda (svn r21733) -Codechange: Clarify the update owner legend code.
-Fix: Prevent crashes caused by deleted companies.
2011-01-05 11:04:29 +00:00
terkhen b890bcb840 (svn r21730) -Fix (r21718): The smallmap owner legend would not be properly initialized in games without companies. 2011-01-04 22:59:42 +00:00
rubidium 7b16c7650b (svn r20670) -Add: support for action F
-Add: a window to select (NewGRF) objects
2010-08-28 19:43:41 +00:00
rubidium 56a263070f (svn r20591) -Codechange: make sure _date_fract is set when SetDate is called. Some places wouldn't reset _date_fract correctly at all 2010-08-22 09:18:01 +00:00
rubidium 38ca44594f (svn r20539) -Codechange: make order backups more self-contained. 2010-08-18 15:15:59 +00:00
rubidium 89b2b9370a (svn r20482) -Codechange: move some object related information off the map and unify the relation objects have to towns 2010-08-13 12:45:26 +00:00
rubidium b8487afe54 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 2010-07-19 17:28:27 +00:00
rubidium 34764feac2 (svn r20186) -Codechange: remove VARDEF from _realtime_tick and _rightclick_emulate 2010-07-19 16:21:49 +00:00
rubidium ede670918a (svn r19426) -Fix: compilation with AIs disabled 2010-03-15 11:45:15 +00:00
rubidium e3fb793a8a (svn r19388) -Fix [FS#3666]: [NoAI] When reloading a savegame, an AI failing to compile could trigger (trying) to read the not yet loaded information of another AI via the AI Debug window and its "open with the most recently used AI" feature 2010-03-11 21:55:37 +00:00
rubidium a8d6d18b22 (svn r18608) -Change: add the concept of music sets 2009-12-22 21:40:29 +00:00
rubidium b00a5f1069 (svn r18330) -Cleanup: remove some unneeded includes 2009-11-28 20:35:25 +00:00
rubidium a274cc6a60 (svn r18207) -Fix [FS#3324] (r11961): [NewGRF] When starting a new game the values of action D variable 13 were incorrect 2009-11-21 16:39:36 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
frosch 438a429549 (svn r17433) -Codechange: Store cumulated inflation in savegame and compute all prices from that instead of storing all prices separately.
Note: Savegame conversion computes the inflation from max loan. Prices from modified savegames will get lost. TTO savegames will also behave slightly different.
-Change: NewGRF price modifiers now take effect everytime when loading NewGRFs instead of once on gamestart.
2009-09-06 18:53:57 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 9ee2a66c86 (svn r17139) -Change: add the concept of sound sets 2009-08-09 19:50:44 +00:00
rubidium ba4fd897b8 (svn r17097) -Fix [FS#3092] (r13256): make restart command work again and make the help show how it works and how it doesn't work 2009-08-06 22:00:32 +00:00
smatz 9c25f1bdb7 (svn r17084) -Codechange: _age_cargo_skip_counter is common to all vehicle types 2009-08-06 12:33:13 +00:00