Commit Graph

63 Commits (7e4d0f112edbe2acb8ceebdf3161fa7c90cd66f9)

Author SHA1 Message Date
bjarni 965693bdce (svn r6393) -Fix: [autoreplace] now refit costs are added to the estimated costs (could spend more than allowed when estimate and actual cost were not the same)
-Fix: [autoreplace] fixed a very rare failure when building an engine could cost more than the player could pay before selling the old one
   this happened when the replacing the front cost so much that the the rear end didn't have enough money to build as expected
   now the estimate keeps track of the price for the wagons/engines in front of the unit it's currently looking at
-Codechange: [autoreplace] added function to learn if and what cargo type to refit to. Needed to allow the estimation to tell refit costs
18 years ago
tron d5e5a78cf4 (svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
DestinationID being a union of these types is just hassle without benefit and cannot be handled correctly everywhere because of local lack of information
18 years ago
rubidium 86dc219b4b (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 18 years ago
truelight 5d3ed62e46 (svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others 18 years ago
truelight 5e7528e9cb (svn r6150) -Codechange: introduced and used RoadStopID where needed 18 years ago
truelight 8dcae588e8 (svn r6147) -Fix: I don't know how to write Destination :( 18 years ago
truelight 43f53ca4fd (svn r6145) -Codechange: added OrderID to indicate Order indexes out of the pool 18 years ago
truelight b17d389667 (svn r6144) -Codechange: renamed OrderID to VehicleOrderID, because it had nothing to do
with the Order-pool, but with the place of the order within the vehicle-order 
 (hence its name) (part of FS#13, blathijs)
18 years ago
truelight 65f5ec13f6 (svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)
-Codechange: introduced DestinationID, which is in fact an union of several types
  Used in Order struct, so no longer StationID is abused for all targets.
  Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
18 years ago
truelight 4d43389c28 (svn r6141) -Codechange: introduced DepotID and used it as much as possible
-Codechange: DeleteDepot removes a depot from the pool
-Codechange: DestroyDepot is called by DeleteDepot to remove all things where a depot depends on.
  Last 2 changes to prepare for new pool system. Not pretty now, will be soon.
-Codechange: Removed DoDeleteDepot as it was stupid
18 years ago
truelight f16d3f2b8b (svn r6050) -Codechange: mass-renamed SignStruct -> Sign and ss -> si. Now functions and variables all match eachother 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
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 43af0ced5f (svn r6005) -Cleanup: introduce IndustryID and use it
-Cleanup: use TownID and StationID for two instances of uint16
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
truelight fb76d2530a (svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
dualcore can be faster then you want, and therefor create 2 threads, while
  you made the bool to make sure there is never more then 1 thread of this type.
18 years ago
bjarni 5787ae7ed9 (svn r5965) -Feature: FS#261 Catalan Town Names generator (arnau) 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
tron c3d407a5ba (svn r5896) Remove pointless indirection similar to r5894 and remove an unnecessary global variable 18 years ago
rubidium aea7cf5dd9 (svn r5892) -Fix (r5887): silence MSVC warning(s) about signedness of some comparisons with _date. 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
tron 82ccd01914 (svn r5806) Inline FindLandscapeHeight() into its only remaining caller and remove the attribute "type" from struct TileInfo 18 years ago
tron d8b8035f9f (svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo 18 years ago
belugas ea8e05320c (svn r5504) Feature : Added Italian town name generator. (sidew) 18 years ago
belugas 2ea90251d0 (svn r4838) Newgrf : Add empty base for newcargos 18 years ago
celestar d76279144d (svn r4639) -Feature: Turkish town names (jnmbk) 18 years ago
tron b57640e28a (svn r4572) Remove vehicle_leave_tile_proc
There's exactly one implemented function (unbarring a level crossing) and one place where it can be triggered (a train leaves a level crossing)
It's a bit overkill, so just handle this one case where it can happen
18 years ago
tron dd180a1e18 (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums 18 years ago
celestar 093984ea30 (svn r4385) -Codechange: remove map5 from the TileInfo struct as it is now unused. This effort is starting to pay off ... 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
tron 7163a64c25 (svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo 19 years ago
tron dd688cecdd (svn r4231) Remove ModifyTile(), it's not used anymore, yay! 19 years ago
Darkvater d155f182ac (svn r4131) - CodeChange: Add proper semantics for StationID for such variables instead of using the general uint16-type. StationID was added for depots, waypoints and stations where necessary. We probably need to change GetDepot(), IsDepotIndex(), IsStationIndex(), GetWaypoint() and IsWaypointIndex() as well to use StationID. 19 years ago
Darkvater 0df4339941 (svn r4130) - CodeChange: Add proper semantics for TownID for such variables instead of using the general uint16-type. We probably need to change GetTown() and IsTownIndex() as well to use TownID. 19 years ago
Darkvater e91fa54a15 (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 19 years ago
tron d0a445db41 (svn r4111) Fix/Remove some stale comments 19 years ago
peter1138 fca5823238 (svn r3805) - [FS#62] Fix doxygen comments to refer to the correct parameter. (sulai) 19 years ago
tron 5352e9fbcb (svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff 19 years ago
truelight 45a0cc607c (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
-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)
19 years ago
tron 05ed2a8d8c (svn r3342) Remove some cruft 19 years ago
tron e840c17fef (svn r3334) Remove 2 unused window classes 19 years ago
tron 71d293f2a3 (svn r3066) Constify the parameter of GetSlopeZ_*() 19 years ago
celestar ab049c7bca (svn r3065) -Codechange/Add: Modified the bridge drawing code so that the basic offset is read from the RailTypeInfo struct. This is (hopefully) the last DrawTile change on the way to electrified railways. While being at it, de-mystified the function a bit and added some asserts. 19 years ago
tron c042fd3de3 (svn r3055) Give the savegame/scenarion sort order flags symbolic names 19 years ago
Darkvater 4a58250cb9 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
19 years ago
Darkvater 4d7e916a09 (svn r2957) - Feature: [ 1263280 ] Danish town names (fey_dk) 19 years ago
truelight 6145b99c22 (svn r2921) -Codechange: moved all AI-code to 1 central place (ai/ai.c)
-Fix: removed the ability for the oldAI to cheat (this will criple him somewhat)
-Add: base-code for many improvements to come in the AI-system
-Add: added base-code for multiplayer AIs (DOES NOT WORK YET!)
19 years ago
Darkvater a948fcb605 (svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop. 19 years ago