truelight
61659b67d5
(svn r6178) -Fix r5886: only setting ->money64 isn't enough, as some routines still use ->player_money.
...
Because of this, when a player went bankrupt, still not all stuff was removed.
2006-08-27 21:20:29 +00:00
truelight
a21b2750bd
(svn r6057) -Codechange: made a function GetRandomXXX, that _always_ returns a valid XXX, unless there are none to pick from. Then NULL is returned.
2006-08-22 21:14:45 +00:00
truelight
15aff22c96
(svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
...
It isn't the best name, but we couldn't find any better.
This unifies the pool-system even more.
2006-08-22 20:41:26 +00:00
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.
2006-08-22 15:33:35 +00:00
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.
2006-08-22 14:38:37 +00:00
rubidium
43af0ced5f
(svn r6005) -Cleanup: introduce IndustryID and use it
...
-Cleanup: use TownID and StationID for two instances of uint16
2006-08-20 19:31:58 +00:00
rubidium
db397d5a75
(svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant.
2006-08-20 19:05:28 +00:00
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
2006-08-16 11:39:55 +00:00
rubidium
c55962f8a2
(svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and BASE_YEAR when comparing _cur_year with a 'full' year.
...
-Cleanup: replace some magic '1920' values with BASE_YEAR.
2006-08-15 15:18:03 +00:00
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
2006-08-14 14:21:15 +00:00
Darkvater
e6e42cd5f3
(svn r5886) -Fix [FS#273]: Incomplete removal of player owned property due to lack of money.
2006-08-14 11:44:19 +00:00
tron
772fbda3e3
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
2006-06-27 21:25:53 +00:00
peter1138
4dc68326d9
(svn r4570) - Fix: subsidy calculation was too high, broken in r3564
2006-04-25 06:56:22 +00:00
celestar
42059d45ea
(svn r4508) -Fix: (FS#125) Fixed a problem that caused DeliverGoodsToIndustry to not work as intended. Note: write something better for this entire function
2006-04-21 20:25:34 +00:00
celestar
277f8cbda2
(svn r4466) -Fix: (FS#71) Game no longer crashes when the last vehicle serving a station has been deleted.
...
-Negative side effect: upon loading old games, stations whose last vehicle was a station have (temporarily) lower ratings.
-Positive side effect: station.h no longer includes vehicle.h (breaks the station.h->vehicle.h->rail.h chain)
2006-04-18 08:50:17 +00:00
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()
2006-04-10 07:15:58 +00:00
celestar
6443c14ebd
(svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE
2006-04-03 05:32:11 +00:00
celestar
e875be1a44
(svn r4194) -Codechange: Renamed UpdatePlayerHouse to UpdateCompanyHQ because the rest of the code calls it Comapany HQ. Moved it to unmovable_cmd.c because CompanyHQ is an unmovable and has nothing to do with economy.
2006-03-31 08:59:19 +00:00
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.
2006-03-26 22:55:27 +00:00
Darkvater
e91fa54a15
(svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type.
2006-03-26 22:23:32 +00:00
Darkvater
bf27f0c77b
(svn r3627) - Change all hardcoded 255 max-saveload versions with the define SL_MAX_VERSION
2006-02-20 19:43:26 +00:00
tron
7692556c62
(svn r3613) Some more const, indentation, whitespace and similar stuff
2006-02-18 14:41:24 +00:00
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
2006-02-13 21:15:00 +00:00
tron
087fe86ed2
(svn r3564) Several smaller changes:
...
- 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-06 09:18:04 +00:00
peter1138
6c28b1cec7
(svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files.
2006-02-03 12:55:21 +00:00
tron
1c3e8630fe
(svn r3511) More whitespace ([FS#46] by Rubidium)
2006-02-01 07:36:15 +00:00
tron
9712d6f639
(svn r3510) Fiddle with whitespace and parentheses
2006-02-01 06:32:03 +00:00
truelight
336a58e797
(svn r3377) -Fix: [ FS#24 ] Min. profit in detail performance rating gave you full points if you had no vehicles, and was limited to 20k. Solved both. (Partly based on Graphite his patch)
2006-01-06 22:16:17 +00:00
truelight
e427dbcad2
(svn r3363) -Fix: 'fixed' the transfer problem. This doesn't really fix it, but gives a bit more fair amount of money. Can only be fixed correctly with CargoPackets as suggested in branch.
2006-01-05 11:18:58 +00:00
truelight
e4cb8ed457
(svn r3226) -Fix: GPMI implementation had minor glitches
...
-Fix: the AI speed control is done by the AI-core, individual AIs don't have to do it (so, AIs were delayed twice ;)
-Add: Support for AI-network-clients (an AI, connecting to a remote server)
-Fix: minor AI-core problems
2005-11-22 15:55:38 +00:00
bjarni
16e65960b9
(svn r3218) -Feature: Multiheaded train engines will now stay in the same train
...
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
This fixes the assert when moving multiheaded engines (introduced in r3144)
Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs
-Codechange: train subtype is now a bitmask
This allows fast access to info like if it is a wagon or engine and if it is in front and so on
Note: savegame version bump
2005-11-18 23:41:03 +00:00
tron
84a16a0b30
(svn r3184) GB/SB
2005-11-15 08:49:46 +00:00
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
2005-11-14 19:48:04 +00:00
tron
81e5b16d71
(svn r3172) static, const
2005-11-13 13:43:55 +00:00
peter1138
44f06c8bf0
(svn r3124) Alter train loading/unloading time to use the actual length of the train instead of the number of wagons. The actual length is cached in the first vehicle of the train.
2005-11-03 09:22:24 +00:00
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
2005-10-22 06:39:32 +00:00
tron
d7cbd0d4c3
(svn r3073) int/byte -> EngineID/PlayerID/VehicleID
...
0/-1 -> INVALID_ENGINE
0x10 -> OWNER_NONE
2005-10-20 17:43:13 +00:00
tron
24250c6a3a
(svn r3051) Remove the unused function RemoteSubsidyAdd()
2005-10-16 14:07:11 +00:00
peter1138
ec28f947aa
(svn r3034) -NewGRF: Improve error checking of setting price bases.
2005-10-12 09:54:29 +00:00
peter1138
95857f2026
(svn r3032) -NewGRF, Feature: Add support for changing base prices.
2005-10-12 07:27:56 +00:00
tron
f556128dde
(svn r3030) More work for GB/SB, this time concerning the waiting_acceptance attribute of stations
2005-10-11 13:54:21 +00:00
tron
8980891b09
(svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants
2005-10-07 07:35:15 +00:00
tron
980808dac2
(svn r3001) s/Player*/const Player*/
...
s/byte/PlayerID/
s/int/PlayerID/
and related changes
2005-09-30 20:37:25 +00:00
tron
90e33aed22
(svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate
2005-09-28 19:35:36 +00:00
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
2005-09-18 20:56:44 +00:00
Darkvater
c0c75ef16e
(svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
...
- Add IsLocalPlayer() which substitutes _local_player == _current_player
2005-09-14 18:03:38 +00:00
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!)
2005-09-07 15:10:11 +00:00
tron
3f162fc49a
(svn r2830) Move CheckSwitchToEuro() to currency.[ch] and hide the truth about the custom currency behind a #define
2005-08-07 12:41:57 +00:00
tron
b62887b973
(svn r2815) Store the currency information in one central place instead of scattering it in several unrelated files
2005-08-06 14:59:54 +00:00
tron
4eb0158629
(svn r2794) Fix a comment and get rid of some parentheses using DeMorgan's law
2005-08-02 20:04:09 +00:00