summaryrefslogtreecommitdiff
path: root/misc.c
AgeCommit message (Collapse)Author
2006-10-21(svn r6884) -Codechange: Add strict bounds checking in string formatting system.Darkvater
The last parameter should point to the end of the buffer (eg lastof(buf)) Courtesy of Tron.
2006-10-16(svn r6788) - Codechange: Add and use a function to test if a string ID is a ↵peter1138
custom name.
2006-08-26(svn r6136) -Fix: _cur_year wasn't converting when reading pre-31 savegames, ↵truelight
causing nasty desyncs -Fix: _date, which is a Date, which is int32, was saved as uint32
2006-08-22(svn r6048) -Codechange: all InitializeXXX are plural, just not Depottruelight
2006-08-22(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. ↵rubidium
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
2006-08-20(svn r5999) -Feature: change the original date format to a 32 bits format ↵rubidium
based at the year 0. The game date subsystem now allows someone to start in the year 0 and continue up to the year 5 000 000. However, you currently cannot build anything before 1920 as there is no newgrf support for dates before 1920 or after 2090 yet.
2006-08-20(svn r5974) -Codechange: added casts all around the place to make Windows ↵truelight
64bit happy (michi_cc)
2006-08-19(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:truelight
- New optional landscape generator (TerraGenesis Perlin) - Load heightmaps (either BMP or PNG) - Progress dialog while generating worlds (no longer a 'hanging' screen) - New dialogs for NewGame, Create Scenario and Play Heightmap - Easier to configure your landscape - More things to configure (tree-placer, ..) - Speedup of world generation - New console command 'restart': restart the map EXACTLY as it was when you first started it (needs a game made after or with this commit) - New console command 'getseed': get the seed of your map and share it with others (of course only works with generated maps) - Many new, world generation related, things - Many internal cleanups and rewrites Many tnx to those people who helped making this: Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic) Many tnx to those who helped testing: Arnau, Bjarni, and tokai (alfabetic) And to all other people who helped testing and sending comments / bugs Stats: 673 lines changed, 3534 new lines, 79 new strings
2006-08-16(svn r5928) -Cleanup: remove ConvertIntDate and use ConvertYMDToDate as ↵rubidium
ConvertIntDate was only called with Years.
2006-08-15(svn r5915) -Cleanup: some variables were named *_date while they were only ↵rubidium
holding years; rename these variables to match this.
2006-08-14(svn r5887) -Cleanup: move date related functions, defines and variables to ↵rubidium
date.[ch] -Cleanup: fix whitespace related coding style issues in date.[ch] -Cleanup: make original comments doxygen compatible and remove/change outdated comments
2006-06-07(svn r5155) - Remove the bridge branch merge (revision r5070)tron
2006-06-02(svn r5070) Merged the bridge branchcelestar
-Feature: Bridges can now be placed above: Any railway track combination (excluding depots and waypoints) Any road combination (excluding depots) Clear tiles (duh), including fields Tunnel entrances Bridge heads Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing There are still a number of visual problems remaining, especially when electric railways are on or under the bridge. DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
2006-05-21(svn r4940) Remove the dubious feature of remembering the last built depot. ↵tron
It serves no real purpose except causing confusion
2006-04-22(svn r4520) -Fix: Did last commit in the wrong branch. Repair and shame on me.celestar
2006-04-22(svn r4514) Cleanup of a cleanup ... lines left behindbelugas
2006-04-22(svn r4513) Codechange : Assemble a bit the scattered parts of Cargo types.belugas
2006-03-29(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of ↵celestar
code and proofreading, thanks to peter1138 for another lot of code and ideas.
2006-03-03(svn r3748) Remove bubblesort(), it's unusedtron
2006-03-02(svn r3726) - [6/6] Finalize conversion, finally save the patches struct.Darkvater
- Remove the temporary synchronisation in during the map-transfer as this is no longer needed - The saved patches work just like the saved gameoptions. You have a _patches and a _patches_newgame struct. The _patches_newgame struct contains the values from the configuration file and thus the defaults for new games. When a new game is started or an older game is loaded, the default values are copied over to _patches to be used. When you load a game that has PATS saved, the default values are also loaded, but immediately overwritten by the values from the savegame. This ensures that player-based values are always taken from your personal preferences. - The current implementation also changes the default values if you change player-based settings in the game. For example changing window_snap_radius in a certain game will also change it for all next OpenTTD sessions. - The savegame version has been increased to 22. - The last 6 orso patches close the following reports: [ 1366446 ] different names for patches: all patch settings have the same name as in the configuration file and are reachable from the console. [ 1288024 ] Strange string on OTTD initial screen: configuration (and this includes patches) inputs are validated and clamped to their minimum/maximum values. [ 1423198 ] Make "Signals on Drive side" player, not server, based: this is only visual so current setting is to save it with the savegame but not synchronise in multiplayer. [ 1208070 ] Patches and New GRF options saved: apart from newgrf this is done
2006-03-01(svn r3716) - Move the option settings (_game_opt_desc) from misc.c into ↵Darkvater
settings.c. This will be merged with SettingDesc misc_settings above as they are actually the same. No functionality has changed beside the fact that the settings are now in a different Chunkhandler.
2006-02-20(svn r3626) - Merge the SlGlobVarList (global variables) and SaveLoad ↵Darkvater
(offset in struct, variable determined runtime) structs. The only difference between these two is the last element that either holds the address or the offset in the struct. Which one to take is determined by which function is called; SlObject or SlGlobList.
2006-02-18(svn r3613) Some more const, indentation, whitespace and similar stufftron
2006-02-06(svn r3564) Several smaller changes:tron
- Don't treat non-booleans as booleans - Reduce variable scope - Bracing - Use DeMorgan's law to make conditionals easier to read - if cascade -> switch - Replace some magic numbers by symbolic names - Avoid assignments within other statements
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2006-02-01(svn r3510) Fiddle with whitespace and parenthesestron
2006-01-19(svn r3409) - Change the server advertisement interval to use the frame ↵peter1138
counter instead of game days. This allows a paused server to continue to advertise itself. This also fixes advertising for games that start before 1922.
2006-01-12(svn r3396) - Autoreplace changes:peter1138
- Change fixed array per player to a single pool. This avoids future problems with vehicle numbers and decreases savegame size. Engine replacements from previous savegames will be lost. - Move engine replacement code from players.c to engine.c. (thanks to blathijs for rewriting this)
2006-01-06(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'truelight
-Fix: [ FS#30 ] don't reset date in SE when pressing RandomLand (rewrote patch of MeusH, but Peter warned me I should put his name in, so... oh well)
2005-11-30(svn r3250) -Fix: AIs weren't uninitialized when a new game was loadedtruelight
2005-11-22(svn r3227) -Codechange: [Savegame] removed 'minor' version, and renamed ↵truelight
'major' version to just: version.
2005-10-22(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in ↵tron
comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up
2005-10-03(svn r3010) Get rid of quite some dubious casts, either by using GB(), ↵tron
proper types or just removing them
2005-09-16(svn r2956) - Fix: [ 1253736 ] creating many town crash to desktop. Now it ↵Darkvater
'dies' with an ingame error message informing the gamer if it couldn't generate any towns in user-space. Still if it happens during new-game generation it crashes since we don't yet have actions to do in such a circumstance.
2005-08-23(svn r2886) Rename the "owner" attribute to "m1", because when it stores an ↵tron
owner it is accessed by [GS]etOwner anyway and when it doesn't store an owner, but arbitrary data, accessing a field called "owner" is confusing.
2005-08-07(svn r2832) Missing #includetron
2005-08-06(svn r2819) Make variables, which are exclusive for internal use of the ↵tron
save/load code, static in saveload.c
2005-08-06(svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to ↵bjarni
serverside -This means that one company can only have one setting for renew and replacing more clients will not fight due to different settings anymore -This is a needed step in the line to fix autoreplacing dualheaded locomotives NOTE: savegame revision bump (peter1138 + me in coop)
2005-08-05(svn r2812) Move variables, which only vehicle_gui.c needs to know about, theretron
2005-07-30(svn r2759) Remove unused #includes and filestron
2005-07-25(svn r2706) Fix !WITH_NETWORK buildtron
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-17(svn r2622) Fix: remove _cargoc.names_p, it was never used.ludde
2005-07-17(svn r2600) Fix: [vehicles] Fix problem with vehicle loop not distributing ↵ludde
the calls evenly over the day.
2005-07-17(svn r2596) Add macros ROL and ROR to ROtate values Left/Right. Also shorten ↵tron
the parameter names for GB and SB to increase readability
2005-07-16(svn r2594) Fix: [strgen] Misc updates to the string system.ludde
- Renamed the plural command to "P" instead of "PLURAL". Now write something like this to append an s on plural: {P "" s}. (You can optionally still add an argument index to explicitly specifiy which number that's used) - Removed the pluralized cargo strings from the string files. The new method is to use the plural specifier {P} - Added support for genders. First add "##gender der das die" on top, then use {G=der} on a cargoname/industry to set the gender, and to switch between genders do something like {G neu neu neue} {STRING} - Updated the swedish/english translation with P strings.
2005-07-16(svn r2588) Codechange: Remove PLAYER_SEED_RANDOMludde
2005-07-15(svn r2583) Move OS specific code out of misc.cludde
Added support for Mersenne Twister random number generator (not implemented in network yet) Wrap player randoms around #ifdef