Commit Graph

115 Commits (76736281616fdac9f2017f9054b5b5ca6d26bb9c)

Author SHA1 Message Date
peter1138 db7d474b0f (svn r7079) -Codechange: Move an array to the only place it is used. 18 years ago
tron 160f126d00 (svn r6977) Use the pool macros for the EngineRenew pool 18 years ago
Darkvater a85d679f54 (svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to PLAYER_SPECTATOR and
put it into player.h where it belongs (instead of map.h)
18 years ago
Darkvater 68c0320be6 (svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
IS_INTERACTIVE_PLAYER
18 years ago
bjarni 3dfe48b189 (svn r6714) -Codechange: replaced a direct manipulation of windows with InvalidateWindowData() in rail_cmd.c
Moved the actual modification of railtype to WE_INVALIDATE_DATA in the train depot handler
-Codechange: added SetWindowDirty() to WE_INVALIDATE_DATA as it made no sense to update the list without making the window dirty
18 years ago
bjarni 2bb7f1da6c (svn r6681) -Fix: when vehicles never expire they will stay at peak reliability instead of the lowest to make them useful even when old
-Fix: when retiring an engine design, invalidate the build windows and invalidate the build window data
-Fix: mark build windows dirty when engine reliability changes
18 years ago
bjarni bc1070654a (svn r6680) -Codechange r6679: [train build window] only generate the list when the window data is invalidated or the window is generated, not on each redraw 18 years ago
rubidium 21ac20aeca (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
-Cleanup: whitespace alignment of a few tables.
18 years ago
rubidium 0ce4de99dc (svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments. 18 years ago
truelight 44e5e7f0e4 (svn r6137) -Codechange: some very minor cleanups:
- Start using DeleteXXX for every pool item, not manually doing it
  - Use some wrapper to improve logic
  - Rewrote some pieces to improve logic
18 years ago
glx f0e00996e0 (svn r6059) -Fix(r6049): FOR_ALL was not use to not skip invalid items, so really don't skip invalid items :) 18 years ago
truelight b7cce084e2 (svn r6049) -Codechange: forgot EngineRenew in r6047
-Codechange: cleaned up the EngineRenew code a bit (coding style mostly)
-Codechange: forgot the correct comment in station_cmd
-Codechange: move pool-stuff to engine.h, like we always do
18 years ago
truelight 505566da5c (svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
-Codechange: use IsValidXXX where ever possible
  Note: both changes to prepare for new pool system, which needs those changes.
  For every pool there are 2 ugly lines, which will be removed when done
  implementing new pool system.
  Based on FS#13 by blathijs, partly implemented.
18 years ago
rubidium 908d3bcfe6 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 18 years ago
rubidium 6fb092aa7a (svn r5999) -Feature: change the original date format to a 32 bits format 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.
18 years ago
rubidium b7a3352009 (svn r5975) -Cleanup: use ORIGINAL_BASE_YEAR & ORIGINAL_MAX_YEAR where the functions really depend on the original date format.
-Cleanup: use DAYS_TILL_ORIGINAL_BASE_YEAR where the date variables are in the old date format and conversions are needed.
-Cleanup: replace one (forgotten) instance of uint16 with Date.
18 years ago
truelight 7abad2b20e (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- 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
18 years ago
rubidium 894d9fc12f (svn r5934) -Cleanup: forgot some conversions to Year and to Date
-Cleanup: use _cur_year instead of _date for some (year based) comparisons
-Cleanup: remove a magic number in favour of another (less) magic number
18 years ago
rubidium e87e065e41 (svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
-Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
18 years ago
rubidium 9fc837ad85 (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
18 years ago
belugas 40a8964911 (svn r5609) CodeChange : Apply coding style 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
belugas 69f47611db (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
Clearing engine and newgrf_engine from cargo related structures.
Apart from moving stuff cargo related, there is nothing really newcargo for now.
18 years ago
peter1138 0194a3da1e (svn r4901) - Codechange: change 'SpriteGroup *' to 'struct SpriteGroup *' within StationSpec and GRFFile struct declarations. Now only code which actually references those pointers needs to know about the SpriteGroup struct. Remove some unnecessary lingering header dependencies. 18 years ago
peter1138 100cc6fea7 (svn r4471) - Pools: Add a facility for calling a custom function during pool block clean up. 18 years ago
tron 35e93e451f (svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
18 years ago
Darkvater 650b1b0c93 (svn r3895) - Add proper SLE(G)_CONDNULL macros for the empty space reservation in savegames and update where used
- Also add this capability to settings
19 years ago
Darkvater bf27f0c77b (svn r3627) - Change all hardcoded 255 max-saveload versions with the define SL_MAX_VERSION 19 years ago
peter1138 abcde6bd9c (svn r3565) - Fix: On loading a game, GetPlayerRailtypes() didn't account for the fact that vehicles are introduced a year after their introduction date. This will also relieve possible (rare) network desyncs. 19 years ago
peter1138 6c28b1cec7 (svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files. 19 years ago
tron 9712d6f639 (svn r3510) Fiddle with whitespace and parentheses 19 years ago
peter1138 c2479bbccc (svn r3423) - NewGRF: Update the base_intro age at which an engine will have a randomized intro date, as per (the now updated) spec. 19 years ago
peter1138 4f394f6a63 (svn r3410) - NewGRF fix: Only add a random number of days to an engine's base introduction date if that date is not 0. 19 years ago
peter1138 2222907a40 (svn r3396) - Autoreplace changes:
- 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)
19 years ago
peter1138 5e68953907 (svn r3378) - NewGRF Fix: Use order status to determine whether a vehicle is loading instead
of speed, and get that state from first vehicle in a train consist.
19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
peter1138 0fbb9815ba (svn r3316) - NewGRF: Unload engine names before loading grf files. This fixes names in climates where the engines don't get loaded. Renamed function to reflect its purpose. 19 years ago
tron 49f0691c1a (svn r3308) BAD
foo.h: int bar;

GOOD
foo.h: extern int bar;
foo.c: int bar;
19 years ago
peter1138 e426787c14 (svn r3252) - NewGRF: Map new train subtypes to old types for rail vehicles. 19 years ago
tron 9d0e7b6458 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
19 years ago
peter1138 34c503cabf (svn r3148) -NewGRF, Feature: Add support for cargo refitting specification by cargo classes. 19 years ago
peter1138 0d9379f904 (svn r3139) -NewGRF, Feature: support for articulated rail vehicles. This is used, for example, by coal tenders. 19 years ago
peter1138 4f5dee9e58 (svn r3126) Autoreplace: Only the first vehicle in a chain should be marked as entering a depot, so call moved out of DoVehicleTrigger loop. 19 years ago
bjarni fa5ca040e9 (svn r3111) -Fix: [autoreplace] [ 1341783 ] Assertion failure in vehicle.c line 378
running MaybeReplaceVehicle() is now delayed until after the loop in CallVehicleTicks()
	This avoids selling the vehicle the loop currently works with (and continues to work with afterwards)
19 years ago
tron 0b936c3222 (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
19 years ago
tron 24253c17cc (svn r3059) Use bitfields to encode railtype and climates of engines instead of manual shifting/anding 19 years ago
peter1138 13d02ca965 (svn r3017) -NewGRF: Implement sprite group unreferencing and unloading. 19 years ago
peter1138 f614b86114 (svn r3016) -NewGRF: Implement the start of reference counting for sprite groups. This will allow unloading. 19 years ago
peter1138 4879e04986 (svn r3015) -NewGRF: Add a new sprite group result type, and support loading of callbacks results within random and "real" groups. (Not fully supported yet.) 19 years ago
peter1138 e8bca26b74 (svn r3014) -NewGRF, Codechange: Make all sprite group references be pointers instead of copying the data around. 19 years ago