rubidium
64bafcbe18
(svn r17534) -Codechange: unify the naming of callback masks/flags
15 years ago
frosch
0e36260337
(svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability.
15 years ago
frosch
ebd916be3d
(svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability.
15 years ago
rubidium
97d1314a47
(svn r17485) -Change [FS2459]: make the performance ratings harder to exploit; only count profitable vehicles and recently serviced stations.
15 years ago
rubidium
f1cc044a40
(svn r17485) -Change [FS2459]: make the performance ratings harder to exploit; only count profitable vehicles and recently serviced stations.
15 years ago
rubidium
ab935f3085
(svn r17449) -Fix (r17436): MSVC compile warning about comparing signed and unsigned values
15 years ago
rubidium
8186dd616b
(svn r17449) -Fix (r17436): MSVC compile warning about comparing signed and unsigned values
15 years ago
smatz
5d622fd840
(svn r17439) -Fix (r17436): you weren't paid for cargo delivered to houses and headquarters anymore
15 years ago
smatz
22e9d59559
(svn r17439) -Fix (r17436): you weren't paid for cargo delivered to houses and headquarters anymore
15 years ago
smatz
587ae07799
(svn r17437) -Change: don't accept cargo produced in the same industry (generalise and improve the check used only for valuables)
15 years ago
smatz
e292112319
(svn r17437) -Change: don't accept cargo produced in the same industry (generalise and improve the check used only for valuables)
15 years ago
smatz
7c978ce5cd
(svn r17436) -Change: pay only for cargo actually delivered, not for all cargo unloaded at station (can differ with 'stockpiling' industries)
15 years ago
smatz
25817f1fe7
(svn r17436) -Change: pay only for cargo actually delivered, not for all cargo unloaded at station (can differ with 'stockpiling' industries)
15 years ago
frosch
d7bf8b74c7
(svn r17435) -Codechange: Move _cargo_payment_rates[] to CargoSpec::current_payment.
15 years ago
frosch
eb1306110a
(svn r17435) -Codechange: Move _cargo_payment_rates[] to CargoSpec::current_payment.
15 years ago
frosch
64f5f1d02c
(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.
15 years ago
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.
15 years ago
smatz
6572bce9c1
(svn r17426) -Fix (r1): economy recession would never end when economy is set to Steady while in recession
15 years ago
smatz
1776a4ecc1
(svn r17426) -Fix (r1): economy recession would never end when economy is set to Steady while in recession
15 years ago
smatz
dc73d5432d
(svn r17420) -Codechange: replace assert() by assert_compile() where possible
15 years ago
smatz
0bfea0646c
(svn r17420) -Codechange: replace assert() by assert_compile() where possible
15 years ago
rubidium
62e990823d
(svn r17345) -Fix [FS#2769]: one wasn't offered to take over bankrupt companies anymore; caused by the introduction NoAI, although NewAI had the same problem too.
15 years ago
rubidium
4c84db1636
(svn r17345) -Fix [FS#2769]: one wasn't offered to take over bankrupt companies anymore; caused by the introduction NoAI, although NewAI had the same problem too.
15 years ago
rubidium
c1fe2ce4bc
(svn r17343) -Codechange: it's bankruptcy, not bankrupcy, according to my Oxford Dictionary of English and Merriam-Webster.
15 years ago
rubidium
b1d4594fa7
(svn r17343) -Codechange: it's bankruptcy, not bankrupcy, according to my Oxford Dictionary of English and Merriam-Webster.
15 years ago
rubidium
94867f3052
(svn r17342) -Fix: reset bankruptcy checks when bankruptcy has been averted and don't set an unused timeout with a magic number
15 years ago
rubidium
dd3fa7f1d1
(svn r17342) -Fix: reset bankruptcy checks when bankruptcy has been averted and don't set an unused timeout with a magic number
15 years ago
rubidium
846cd79ada
(svn r17341) -Fix: memory leak when trying to bankrupt the local company
15 years ago
rubidium
50e794849a
(svn r17341) -Fix: memory leak when trying to bankrupt the local company
15 years ago
smatz
09e1ecc8ac
(svn r17316) -Codechange: use Industry::GetByTile() instead of GetIndustryByTile()
15 years ago
smatz
ee685c8287
(svn r17316) -Codechange: use Industry::GetByTile() instead of GetIndustryByTile()
15 years ago
rubidium
99d46e0ad7
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
rubidium
2612f46a20
(svn r17222) -Fix [FS#3129, FS#3130]: with time tables vehicles would stay in the 'loading' state after they have finished loading
15 years ago
rubidium
0780dc8138
(svn r17222) -Fix [FS#3129, FS#3130]: with time tables vehicles would stay in the 'loading' state after they have finished loading
15 years ago
smatz
d59b687f65
(svn r17124) -Codechange: store subsidies in a pool (instead of an array)
15 years ago
smatz
13e23141b4
(svn r17124) -Codechange: store subsidies in a pool (instead of an array)
15 years ago
smatz
0502a6df42
(svn r17113) -Change [FS#265][FS#2094][FS#2589]: apply the subsidy when subsidy's destination is in station's catchment area and cargo packets originate from subsidy's source
...
-Change [FS#1134]: subsidies aren't bound to stations after awarding anymore, they still apply to town or industry, no matter what station is used for loading and unloading. Awarded subsidies from older savegames are lost
-Change [NoAI]: due to these changes, AISubsidy::GetSource and AISubsidy::GetDestination now return STATION_INVALID for awarded subsidies
15 years ago
smatz
2a430d981f
(svn r17113) -Change [FS#265][FS#2094][FS#2589]: apply the subsidy when subsidy's destination is in station's catchment area and cargo packets originate from subsidy's source
...
-Change [FS#1134]: subsidies aren't bound to stations after awarding anymore, they still apply to town or industry, no matter what station is used for loading and unloading. Awarded subsidies from older savegames are lost
-Change [NoAI]: due to these changes, AISubsidy::GetSource and AISubsidy::GetDestination now return STATION_INVALID for awarded subsidies
15 years ago
smatz
738d7fde53
(svn r17107) -Codechange: store type of subsidy source and destination in the Subsidy struct instead of determining it every time it's needed
15 years ago
smatz
74d3382b94
(svn r17107) -Codechange: store type of subsidy source and destination in the Subsidy struct instead of determining it every time it's needed
15 years ago
smatz
fcae906575
(svn r17086) -Cleanup (r16654): remove code used only for debugging
15 years ago
smatz
a3e69a5b3c
(svn r17086) -Cleanup (r16654): remove code used only for debugging
15 years ago
rubidium
d61be2637e
(svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives
15 years ago
rubidium
1fe3ad3288
(svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives
15 years ago
belugas
00338562b9
(svn r17058) -Codechange: magic numbers removal.
...
Two values used intead of just one, as it gives more possibilities to those who dare...
15 years ago
belugas
a2b996106e
(svn r17058) -Codechange: magic numbers removal.
...
Two values used intead of just one, as it gives more possibilities to those who dare...
15 years ago
frosch
29d4316064
(svn r17037) -Fix (r17036): 'Polygonal Capabilities' are a core feature of windows.
15 years ago
frosch
7f49d3b45c
(svn r17037) -Fix (r17036): 'Polygonal Capabilities' are a core feature of windows.
15 years ago
frosch
8b50754b19
(svn r17036) -Codechange: Split price bases from economy.cpp to table/pricebase.h.
15 years ago
frosch
a6cbf0d419
(svn r17036) -Codechange: Split price bases from economy.cpp to table/pricebase.h.
15 years ago
rubidium
fb36ebd9dd
(svn r16933) -Fix [FS#3054] (r16694): vehicles would wait "very long" when they had nothing to unload and gradual loading was disabled.
15 years ago
rubidium
c1ffbc3bce
(svn r16933) -Fix [FS#3054] (r16694): vehicles would wait "very long" when they had nothing to unload and gradual loading was disabled.
15 years ago
rubidium
6435dc89fe
(svn r16912) -Codechange: split waypoint.h in waypoint_base.h and waypoint_func.h
15 years ago
rubidium
cb0409fe52
(svn r16912) -Codechange: split waypoint.h in waypoint_base.h and waypoint_func.h
15 years ago
rubidium
84dec43208
(svn r16901) -Fix [FS#3046] (rpbs): when marking trains stuck don't reset the unload counter/stuck when the vehicle is unloading. It'll be automatically reset once the vehicle wants to leave the station
15 years ago
rubidium
f7b3067fb3
(svn r16901) -Fix [FS#3046] (rpbs): when marking trains stuck don't reset the unload counter/stuck when the vehicle is unloading. It'll be automatically reset once the vehicle wants to leave the station
15 years ago
smatz
3564579dc4
(svn r16877) -Codechange: use Subsidy::IsAwarded() instead of testing subsidy's age
15 years ago
smatz
af13707e00
(svn r16877) -Codechange: use Subsidy::IsAwarded() instead of testing subsidy's age
15 years ago
smatz
cb13cf2543
(svn r16852) -Codechange: use FOR_ALL_CARGOSPECS for iterating over all valid CargoSpecs
15 years ago
smatz
77d13eae61
(svn r16852) -Codechange: use FOR_ALL_CARGOSPECS for iterating over all valid CargoSpecs
15 years ago
smatz
8718babe90
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
15 years ago
smatz
1f29e38b83
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
15 years ago
smatz
64de470917
(svn r16814) -Codechange: make IsNormalAircraft() member of Aircraft
15 years ago
smatz
b6960e4e17
(svn r16814) -Codechange: make IsNormalAircraft() member of Aircraft
15 years ago
smatz
98b8479f56
(svn r16813) -Codechange: make IsEngineCountable() member of Vehicle
15 years ago
smatz
868c21cbcc
(svn r16813) -Codechange: make IsEngineCountable() member of Vehicle
15 years ago
rubidium
c5a44ce99e
(svn r16736) -Codechange: give some station enums a name and use that instead of 'byte'.
15 years ago
rubidium
571dfb9055
(svn r16736) -Codechange: give some station enums a name and use that instead of 'byte'.
15 years ago
smatz
93557ba4e9
(svn r16714) -Codechange: use pool-like accessors for Subsidy
15 years ago
smatz
76a50ce94d
(svn r16714) -Codechange: use pool-like accessors for Subsidy
15 years ago
smatz
d04750ff87
(svn r16711) -Codechange: use FOR_ALL_SUBSIDIES macro when iterating over all subsidies
15 years ago
smatz
f4d0d94184
(svn r16711) -Codechange: use FOR_ALL_SUBSIDIES macro when iterating over all subsidies
15 years ago
rubidium
ff4326d6a3
(svn r16707) -Fix [FS#3007] (r16693): under some circumstances vehicles would skip loading as they thought nothing could be unloaded or loaded.
15 years ago
rubidium
3884221a94
(svn r16707) -Fix [FS#3007] (r16693): under some circumstances vehicles would skip loading as they thought nothing could be unloaded or loaded.
15 years ago
rubidium
e189037662
(svn r16706) -Fix (r16694): acquiring a subsidy resulted in an assertion.
15 years ago
rubidium
8e804a4b6c
(svn r16706) -Fix (r16694): acquiring a subsidy resulted in an assertion.
15 years ago
rubidium
4f99508114
(svn r16694) -Fix [FS#2995] (rgradual loading, rnewindustries): only pay for whatever has been actually unloaded and perform the payment when unloading has finished. This fixes, amongst others:
...
* cheating by starting to unload and after getting paid rushing to the depot to get sold (or unloading, loading and getting paid again for the remainder)
* cargo being dropped onto a station at the moment a stockpiling industry doesn't accept it anymore
* industries getting cargo that has not been unloaded yet and subsequently dumping it back on the station in one go
Note: you will now get paid after the unloading has finished, so you'll have to wait a bit longer for 'your' money.
15 years ago
rubidium
985608c713
(svn r16694) -Fix [FS#2995] (rgradual loading, rnewindustries): only pay for whatever has been actually unloaded and perform the payment when unloading has finished. This fixes, amongst others:
...
* cheating by starting to unload and after getting paid rushing to the depot to get sold (or unloading, loading and getting paid again for the remainder)
* cargo being dropped onto a station at the moment a stockpiling industry doesn't accept it anymore
* industries getting cargo that has not been unloaded yet and subsequently dumping it back on the station in one go
Note: you will now get paid after the unloading has finished, so you'll have to wait a bit longer for 'your' money.
15 years ago
rubidium
025cf4b546
(svn r16693) -Fix [FS#3004] (r16883): cargo income was not added to the vehicle's profit.
15 years ago
rubidium
80043e688e
(svn r16693) -Fix [FS#3004] (r16883): cargo income was not added to the vehicle's profit.
15 years ago
rubidium
2c478d1b6d
(svn r16683) -Codechange: move the cargo payment handling to a seperate class. Based on ideas of fonso/fonsinchen.
15 years ago
rubidium
18bc39d00b
(svn r16683) -Codechange: move the cargo payment handling to a seperate class. Based on ideas of fonso/fonsinchen.
15 years ago
rubidium
e6ac18cd57
(svn r16682) -Codechange: make (static) industry list used to trigger the industries' production compile unit static instead of passing it around as pointer
15 years ago
rubidium
043af83a03
(svn r16682) -Codechange: make (static) industry list used to trigger the industries' production compile unit static instead of passing it around as pointer
15 years ago
rubidium
7f117cf256
(svn r16681) -Codechange: only resolve the company once for vehicle payment instead of each time a cargo packet is delivered
15 years ago
rubidium
778e92cf54
(svn r16681) -Codechange: only resolve the company once for vehicle payment instead of each time a cargo packet is delivered
15 years ago
rubidium
5140f4261b
(svn r16680) -Codechange: don't go through all the station unloading stuff when there is no vehicle at the station
15 years ago
rubidium
eb4380f5ea
(svn r16680) -Codechange: don't go through all the station unloading stuff when there is no vehicle at the station
15 years ago
smatz
72bee4ad2d
(svn r16654) -Codechange: cache industries in station's coverage area instead of searching them everytime payment is made
16 years ago
smatz
fa1ad0fd3c
(svn r16654) -Codechange: cache industries in station's coverage area instead of searching them everytime payment is made
16 years ago
smatz
f6a4d61cca
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
16 years ago
smatz
8343340acb
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
16 years ago
smatz
a2567c84a0
(svn r16559) -Codechange: introduce Company::IsValidAiID() and Company::IsValidHumanID(), don't use IsHumanCompany() where possible
16 years ago
smatz
bea3fe2b8b
(svn r16559) -Codechange: introduce Company::IsValidAiID() and Company::IsValidHumanID(), don't use IsHumanCompany() where possible
16 years ago
smatz
af85994f7f
(svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check
16 years ago
smatz
0c10006907
(svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check
16 years ago
alberth
580e478e4e
(svn r16491) -Codechange: Added parentheses around bitwise operators for code style.
16 years ago
alberth
bab70a823d
(svn r16491) -Codechange: Added parentheses around bitwise operators for code style.
16 years ago
yexo
e7a087b08b
(svn r16453) -Fix: Move some code around so a company is no longer used after deleting it
16 years ago
yexo
df7786f789
(svn r16453) -Fix: Move some code around so a company is no longer used after deleting it
16 years ago
frosch
eeb3f75cfe
(svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted.
16 years ago
frosch
a4557c7da4
(svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted.
16 years ago
smatz
bebab3cd79
(svn r16407) -Fix [FS#2913]: set CargoPacket::source to INVALID_STATION when source station is deleted
16 years ago
smatz
7854e68b95
(svn r16407) -Fix [FS#2913]: set CargoPacket::source to INVALID_STATION when source station is deleted
16 years ago
smatz
1eb48cdded
(svn r16403) -Codechange: move code related to subsidies to separate file
16 years ago
smatz
b2aed51f8e
(svn r16403) -Codechange: move code related to subsidies to separate file
16 years ago
rubidium
4c0542c17f
(svn r16393) -Codechange: move VehicleRail to Train.
16 years ago
rubidium
da5661a0c8
(svn r16393) -Codechange: move VehicleRail to Train.
16 years ago
rubidium
789999ecf3
(svn r16360) -Codechange: don't use _network_playas as a 'second' _local_company, but only as a storage location for the company you want to join in MP.
16 years ago
rubidium
9f4d64bda0
(svn r16360) -Codechange: don't use _network_playas as a 'second' _local_company, but only as a storage location for the company you want to join in MP.
16 years ago
smatz
512db5248e
(svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get()
16 years ago
smatz
8808f3beea
(svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get()
16 years ago
smatz
0c10daa243
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
16 years ago
smatz
871107f529
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
16 years ago
smatz
d495dc5dbc
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
16 years ago
smatz
6221d74644
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
16 years ago
rubidium
5c5b357043
(svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible.
16 years ago
rubidium
59d45a04d6
(svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible.
16 years ago
smatz
e0fe28fdc9
(svn r15726) -Codechange: unify coding style for const pointers
16 years ago
smatz
8585aa71ed
(svn r15726) -Codechange: unify coding style for const pointers
16 years ago
rubidium
c3e87f345d
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
16 years ago
rubidium
b25a4f8231
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
16 years ago
rubidium
f3e0fd7416
(svn r15711) -Codechange: lots of whitespace cleanup/fixes
16 years ago
rubidium
9d018723b7
(svn r15711) -Codechange: lots of whitespace cleanup/fixes
16 years ago
smatz
e7c2479216
(svn r15588) -Fix: change owner of waypoints and deleted stations when merging companies or when a company benkrupts
16 years ago
smatz
3fdac6f702
(svn r15588) -Fix: change owner of waypoints and deleted stations when merging companies or when a company benkrupts
16 years ago
rubidium
a23818b146
(svn r15574) -Fix [FS#2680]: force unload not working when trying to force unload at the station where you received the cargo
16 years ago
rubidium
d86ae1fde6
(svn r15574) -Fix [FS#2680]: force unload not working when trying to force unload at the station where you received the cargo
16 years ago
frosch
7e925a5781
(svn r15547) -Codechange: Eliminate all == and != comparisons between v->cargo_cap and v->cargo.Count() to improve behaviour wrt. broken/incompatible grfs.
16 years ago
frosch
6390ece34f
(svn r15547) -Codechange: Eliminate all == and != comparisons between v->cargo_cap and v->cargo.Count() to improve behaviour wrt. broken/incompatible grfs.
16 years ago
rubidium
5c8cf85613
(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.
16 years ago
rubidium
d846eef0b6
(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.
16 years ago
rubidium
89e1afdaa0
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
16 years ago
rubidium
c0a8d09ca7
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
16 years ago
smatz
d5e2154e90
(svn r15396) -Fix [FS#2601](r15027): since AIs can have vehicle groups now, convert the groups correctly
16 years ago
smatz
abb17d64a1
(svn r15396) -Fix [FS#2601](r15027): since AIs can have vehicle groups now, convert the groups correctly
16 years ago
smatz
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
16 years ago
smatz
0d3f5e6e74
(svn r15299) -Cleanup: remove many redundant includes
16 years ago
truebrain
c2406cd42d
(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
...
NoAI is an API (a framework) to build your own AIs in. See:
http://wiki.openttd.org/wiki/index.php/AI:Main_Page
With many thanks to:
- glx and Rubidium for their syncing, feedback and hard work
- Yexo for his feedback, patches, and AIs which tested the system very deep
- Morloth for his feedback and patches
- TJIP for hosting a challenge which kept NoAI on track
- All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago
truebrain
a3dd7506d3
(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
...
NoAI is an API (a framework) to build your own AIs in. See:
http://wiki.openttd.org/wiki/index.php/AI:Main_Page
With many thanks to:
- glx and Rubidium for their syncing, feedback and hard work
- Yexo for his feedback, patches, and AIs which tested the system very deep
- Morloth for his feedback and patches
- TJIP for hosting a challenge which kept NoAI on track
- All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago
rubidium
28ea38ae55
(svn r14949) -Cleanup: pointer coding style
16 years ago
rubidium
11da45ee55
(svn r14949) -Cleanup: pointer coding style
16 years ago
smatz
91233ea596
(svn r14828) -Codechange: move most of save/load-specific code to separate files
16 years ago
smatz
7368c740a6
(svn r14828) -Codechange: move most of save/load-specific code to separate files
16 years ago
rubidium
1900ba908b
(svn r14825) -Fix: pay the correct amount of interest instead of a few percent too little a year
16 years ago
rubidium
2283b8038f
(svn r14825) -Fix: pay the correct amount of interest instead of a few percent too little a year
16 years ago
smatz
b00e510140
(svn r14807) -Codechange: use INVALID_TILE instead of 0 to mark invalid depots, industries, towns and waypoints
16 years ago
smatz
254e19da91
(svn r14807) -Codechange: use INVALID_TILE instead of 0 to mark invalid depots, industries, towns and waypoints
16 years ago
rubidium
e83cca7d13
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
16 years ago
rubidium
87e5a8b52b
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
16 years ago
smatz
9c2c1dea06
(svn r14753) -Fix (r1): after buying a company, one could have more vehicles with the same UnitID
16 years ago
smatz
53679122af
(svn r14753) -Fix (r1): after buying a company, one could have more vehicles with the same UnitID
16 years ago
rubidium
027e431b99
(svn r14750) -Fix [FS#1993]: in an MP game in SP mode no company would go bankrupt. Furthermore companies that passed the "bankrupt" period (4 quarters) wouldn't go bankrupt when loading the game back in MP. Now any company that is in MP or not "currently controlled by the player" in SP will bankrupt.
16 years ago
rubidium
21fa036c21
(svn r14750) -Fix [FS#1993]: in an MP game in SP mode no company would go bankrupt. Furthermore companies that passed the "bankrupt" period (4 quarters) wouldn't go bankrupt when loading the game back in MP. Now any company that is in MP or not "currently controlled by the player" in SP will bankrupt.
16 years ago
rubidium
0c6c3311c9
(svn r14748) -Codechange: unduplicate window updating when deleting vehicles.
16 years ago
rubidium
3ebe66a5e4
(svn r14748) -Codechange: unduplicate window updating when deleting vehicles.
16 years ago
rubidium
c34ce32f26
(svn r14747) -Codechange: remove DeleteVehicleChain in favour of the vehicle destructor as that was already doing the same for a few vehicle types.
16 years ago
rubidium
f18043ee21
(svn r14747) -Codechange: remove DeleteVehicleChain in favour of the vehicle destructor as that was already doing the same for a few vehicle types.
16 years ago
smatz
8a06e67067
(svn r14734) -Codechange: type of bankrupt_asked is CompanyMask, not byte
16 years ago
smatz
5b26afbd6b
(svn r14734) -Codechange: type of bankrupt_asked is CompanyMask, not byte
16 years ago
frosch
98a865370d
(svn r14705) -Fix [FS#2460]: First transfer the whole load of a vehicle chain to industries before triggering any processing.
...
This reduces callback usage and resolves critical rounding errors when using input-cargo-multipliers instead of production callbacks.
16 years ago
frosch
f1900768c0
(svn r14705) -Fix [FS#2460]: First transfer the whole load of a vehicle chain to industries before triggering any processing.
...
This reduces callback usage and resolves critical rounding errors when using input-cargo-multipliers instead of production callbacks.
16 years ago
frosch
c1d1ba22cc
(svn r14672) -Fix [FS#2444]: Property 7 and callback 12 were broken for aircraft.
...
Now callback 12 is properly called also for 'mail'.
If the callback is not used, 'mail' uses 1/4 of property 7 (rounded up).
16 years ago
frosch
fab1a52963
(svn r14672) -Fix [FS#2444]: Property 7 and callback 12 were broken for aircraft.
...
Now callback 12 is properly called also for 'mail'.
If the callback is not used, 'mail' uses 1/4 of property 7 (rounded up).
16 years ago
smatz
9514b0b9b7
(svn r14670) -Codechange: use better readable (I hope) and branchless (for some archs/compilers) code for cargo value computation
16 years ago
smatz
28028cf755
(svn r14670) -Codechange: use better readable (I hope) and branchless (for some archs/compilers) code for cargo value computation
16 years ago
frosch
e0a66cf7a9
(svn r14536) -Fix (r14530): Do not expect uints to become negative.
16 years ago
frosch
896841403f
(svn r14536) -Fix (r14530): Do not expect uints to become negative.
16 years ago
frosch
b79174454e
(svn r14530) -Fix [FS#2138]: Do not deliver cargo to industries not inside station catchment area.
16 years ago
frosch
ac281ed35c
(svn r14530) -Fix [FS#2138]: Do not deliver cargo to industries not inside station catchment area.
16 years ago
rubidium
b5e467978b
(svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus)
16 years ago
rubidium
272b2ef0e9
(svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus)
16 years ago
rubidium
e589c7e580
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
16 years ago
rubidium
b650a86e58
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
16 years ago
rubidium
f56e630e5c
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
16 years ago
rubidium
3b798599b6
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
16 years ago
smatz
74892fbdf6
(svn r14348) -Fix (r1667): signs were not updated on company bankrupcy/sell, they have colour of invalid player
16 years ago
smatz
7ae255a553
(svn r14348) -Fix (r1667): signs were not updated on company bankrupcy/sell, they have colour of invalid player
16 years ago
belugas
9419a28a4b
(svn r14332) -Fix[FS#1885]: Balance the monthly random industry changes, by introducing a daily random industry change.
...
This will allow to perform more changes per month on big maps and less on smaller maps, while not overtaxing the IndustryMonthlyLoop process.
Thanks to frosch, for nice code ideas and rewrites
16 years ago
belugas
0682dc3a0d
(svn r14332) -Fix[FS#1885]: Balance the monthly random industry changes, by introducing a daily random industry change.
...
This will allow to perform more changes per month on big maps and less on smaller maps, while not overtaxing the IndustryMonthlyLoop process.
Thanks to frosch, for nice code ideas and rewrites
16 years ago
belugas
521afee044
(svn r14254) -Codechange: Code style and breathing room
16 years ago
belugas
db58c25af2
(svn r14254) -Codechange: Code style and breathing room
16 years ago
belugas
9506434539
(svn r14105) -Fix: Some typos that are more grammatical errors, as it seems.
...
Provided by ln
I've added a little fix on currency.cpp too, why not :)
16 years ago
belugas
f2f2bcf23c
(svn r14105) -Fix: Some typos that are more grammatical errors, as it seems.
...
Provided by ln
I've added a little fix on currency.cpp too, why not :)
16 years ago
peter1138
c64e3b4882
(svn r13836) -Fix [FS#2074]: Automatically recalculate inflation if NewGRFs are changed and cargo types are added, so that cargo payment rates are correct.
16 years ago
peter1138
ea7ed286a6
(svn r13836) -Fix [FS#2074]: Automatically recalculate inflation if NewGRFs are changed and cargo types are added, so that cargo payment rates are correct.
16 years ago
rubidium
cde65455ac
(svn r13731) -Codechange: make a pool of the array of players.
16 years ago
rubidium
3a799389eb
(svn r13731) -Codechange: make a pool of the array of players.
16 years ago
rubidium
56ad26a3aa
(svn r13730) -Fix: make a copy of the names for news messages about the deletion of companies as the removal of a company could lead to wrong names in the news messages.
16 years ago
rubidium
891bec7e23
(svn r13730) -Fix: make a copy of the names for news messages about the deletion of companies as the removal of a company could lead to wrong names in the news messages.
16 years ago
rubidium
6898a76c5f
(svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool.
16 years ago
rubidium
d06529ef4d
(svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool.
16 years ago
rubidium
4db7c4f549
(svn r13679) -Fix [FS#2131]: saving TTD imported games in recession failed due to wrong (and unneeded) type conversions in the saveload code.
16 years ago
rubidium
fbdc1c0476
(svn r13679) -Fix [FS#2131]: saving TTD imported games in recession failed due to wrong (and unneeded) type conversions in the saveload code.
16 years ago
skidd13
0a178274e2
(svn r13647) -Codechange: replace MAX_UVALUE() for std types with the equivalent constant
17 years ago
skidd13
9335a28cb5
(svn r13647) -Codechange: replace MAX_UVALUE() for std types with the equivalent constant
17 years ago
peter1138
24562da11b
(svn r13356) -Codechange: Incorrect documentation and variable type for inflation rates
17 years ago
peter1138
10b494d260
(svn r13356) -Codechange: Incorrect documentation and variable type for inflation rates
17 years ago
rubidium
bae02e8c67
(svn r13343) -Codechange: reorder/move variable/functions in the network headers so that nothing from the network directory needs to include basically all network headers.
17 years ago
rubidium
2f3b88ef9a
(svn r13343) -Codechange: reorder/move variable/functions in the network headers so that nothing from the network directory needs to include basically all network headers.
17 years ago
rubidium
e7a501100a
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
17 years ago
rubidium
923e21129c
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
17 years ago
rubidium
c4c440cc20
(svn r13256) -Codechange: merge the OPTS and PATS chuncks.
...
-Codechange: split the diff_custom variable.
-Feature: allow changing some of the diff_custom variables via the console in network games.
17 years ago
rubidium
cd8e589fa9
(svn r13256) -Codechange: merge the OPTS and PATS chuncks.
...
-Codechange: split the diff_custom variable.
-Feature: allow changing some of the diff_custom variables via the console in network games.
17 years ago
rubidium
d289464d69
(svn r13255) -Codechange: move _opt to _settings.
17 years ago
rubidium
8c9cc415e3
(svn r13255) -Codechange: move _opt to _settings.
17 years ago
rubidium
dc77647ea4
(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
...
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
17 years ago
rubidium
4625695653
(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
...
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
17 years ago
rubidium
3ee2556585
(svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData.
17 years ago
rubidium
9defec7876
(svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData.
17 years ago
rubidium
4db10034fd
(svn r13147) -Codechange: move the code to draw bankruptcy news to news_gui.cpp.
17 years ago
rubidium
152e82ba92
(svn r13147) -Codechange: move the code to draw bankruptcy news to news_gui.cpp.
17 years ago
rubidium
ad6e52080c
(svn r13140) -Codechange: move the gui-list-sorting out of window_gui.h so window_gui.h only needs to be included in *_gui.cpp.
17 years ago
rubidium
87015f5b63
(svn r13140) -Codechange: move the gui-list-sorting out of window_gui.h so window_gui.h only needs to be included in *_gui.cpp.
17 years ago
rubidium
483ad8d02a
(svn r13123) -Codechange: passing the bankrupt type via data_b is not needed anymore. Patch by Cirdan.
17 years ago
rubidium
5ede3da220
(svn r13123) -Codechange: passing the bankrupt type via data_b is not needed anymore. Patch by Cirdan.
17 years ago
rubidium
ca8d282eff
(svn r13102) -Codechange: make a class of the NewsWindow.
17 years ago
rubidium
d94bef9d5c
(svn r13102) -Codechange: make a class of the NewsWindow.
17 years ago
rubidium
373343cef6
(svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls.
17 years ago
rubidium
76b8970a33
(svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls.
17 years ago
rubidium
5d7851e8d6
(svn r13065) -Codechange: remove the need for the news string callbacks. Patch by Cirdan.
17 years ago
rubidium
d0c79e1164
(svn r13065) -Codechange: remove the need for the news string callbacks. Patch by Cirdan.
17 years ago
rubidium
ee0a49c91a
(svn r13021) -Codechange: free data_b for other uses when it is not used to store a second tile to skip to (in news messages). Patch by cirdan.
17 years ago
rubidium
2ba05f8987
(svn r13021) -Codechange: free data_b for other uses when it is not used to store a second tile to skip to (in news messages). Patch by cirdan.
17 years ago
rubidium
c27f3cfa62
(svn r12977) -Codechange: remove quite some redundant (duplicate) function declarations.
17 years ago
rubidium
402a1e24ba
(svn r12977) -Codechange: remove quite some redundant (duplicate) function declarations.
17 years ago
rubidium
1ce0b03bf0
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
17 years ago
rubidium
d03994098b
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
17 years ago
smatz
bf3542e9f7
(svn r12906) -Fix: vehicle groups, engine replacement rules and player/company names were not properly reset/freed after bankrupt (before new player start)
17 years ago
smatz
9e1b8b69e3
(svn r12906) -Fix: vehicle groups, engine replacement rules and player/company names were not properly reset/freed after bankrupt (before new player start)
17 years ago
smatz
26206fa116
(svn r12862) -Codechange: reduce code duplication for VehicleType -> WindowClass lookup
17 years ago
smatz
9fc355fca5
(svn r12862) -Codechange: reduce code duplication for VehicleType -> WindowClass lookup
17 years ago
rubidium
e947fde701
(svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits.
17 years ago
rubidium
5ef8c01ce7
(svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits.
17 years ago
peter1138
3b7558b89c
(svn r12798) -Feature: Add some support for NewGRF station animation. (Thanks to mart3p for samples and fixes)
17 years ago
peter1138
210d757499
(svn r12798) -Feature: Add some support for NewGRF station animation. (Thanks to mart3p for samples and fixes)
17 years ago
rubidium
4ad8b95dcc
(svn r12652) -Codechange: rework the order GUI a little more to make it a little more clear that 'transfer' is just an unload type.
17 years ago
rubidium
ba0a5814c2
(svn r12652) -Codechange: rework the order GUI a little more to make it a little more clear that 'transfer' is just an unload type.
17 years ago
rubidium
2964ba2d34
(svn r12650) -Feature: ability to force a vehicle to not load at a station.
...
-Feature: ability to force a vehicle to not unload at a station.
17 years ago
rubidium
6379c30d26
(svn r12650) -Feature: ability to force a vehicle to not load at a station.
...
-Feature: ability to force a vehicle to not unload at a station.
17 years ago
rubidium
2e4044ac81
(svn r12640) -Codechange: let GetLoadType make a difference between full load and full load any based on the patch setting instead of using the patch setting directly.
17 years ago
rubidium
82155367f6
(svn r12640) -Codechange: let GetLoadType make a difference between full load and full load any based on the patch setting instead of using the patch setting directly.
17 years ago
rubidium
973997e896
(svn r12617) -Codechange: add type safety to the Order's load and unload types.
17 years ago
rubidium
d74c6ffb62
(svn r12617) -Codechange: add type safety to the Order's load and unload types.
17 years ago
rubidium
53d101cc99
(svn r12593) -Codechange: hide Order's flags in most of the code.
17 years ago
rubidium
fb1c4eccd8
(svn r12593) -Codechange: hide Order's flags in most of the code.
17 years ago
rubidium
84e3fa75e1
(svn r12585) -Fix (r12584): assumption that assertions were enabled during compilation/testing was flawed.
17 years ago
rubidium
630d5ad766
(svn r12585) -Fix (r12584): assumption that assertions were enabled during compilation/testing was flawed.
17 years ago
smatz
39dc3d3eda
(svn r12560) -Cleanup: town_cmd.cpp and header files - variable scope and a bit of coding style
17 years ago
smatz
42ed287506
(svn r12560) -Cleanup: town_cmd.cpp and header files - variable scope and a bit of coding style
17 years ago
rubidium
df1d9bd880
(svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h.
17 years ago
rubidium
ef2be7d0fc
(svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h.
17 years ago
rubidium
c51b81c247
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
17 years ago
rubidium
2edd403656
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
17 years ago
rubidium
2426f5342f
(svn r12459) -Codechange: split news.h into news_type.h and news_func.h.
17 years ago
rubidium
eeabab4555
(svn r12459) -Codechange: split news.h into news_type.h and news_func.h.
17 years ago
peter1138
f6e4dc4d8c
(svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it.
17 years ago
peter1138
dda6cab17a
(svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it.
17 years ago
peter1138
29e4c60348
(svn r12207) -Change: rail running costs are engine class, not rail type
17 years ago
peter1138
577b0cc260
(svn r12207) -Change: rail running costs are engine class, not rail type
17 years ago
smatz
9bdb194b2a
(svn r12197) -Fix [FS#1788](r12134): show correct last year profit when the train had negative income
...
-Codechange: use GetDisplayProfitThisYear() to convert vehicle profit to readable form
17 years ago
smatz
a190606f2e
(svn r12197) -Fix [FS#1788](r12134): show correct last year profit when the train had negative income
...
-Codechange: use GetDisplayProfitThisYear() to convert vehicle profit to readable form
17 years ago
smatz
fe48d0be21
(svn r12134) -Change: count the number of ticks a vehicle was running this day to calculate running cost
...
-Fix [FS#1739]: vehicle profit is now counted with 8bit fract, so it is now shown properly in the vehicle details window
17 years ago
smatz
a0ddc43e92
(svn r12134) -Change: count the number of ticks a vehicle was running this day to calculate running cost
...
-Fix [FS#1739]: vehicle profit is now counted with 8bit fract, so it is now shown properly in the vehicle details window
17 years ago
maedhros
f95fb570ad
(svn r11994) -Codechange: Remove numbers from string names where the strings aren't present in TTD, since they don't correspond to either TTD's TextIDs or OpenTTD's StringIDs.
17 years ago
maedhros
21eef65e77
(svn r11994) -Codechange: Remove numbers from string names where the strings aren't present in TTD, since they don't correspond to either TTD's TextIDs or OpenTTD's StringIDs.
17 years ago
smatz
91cb42fa73
(svn r11913) -Fix (r11871): update signals after company bankrupt and disaster too
17 years ago
smatz
0b3db1a92d
(svn r11913) -Fix (r11871): update signals after company bankrupt and disaster too
17 years ago
smatz
b20d1eee6c
(svn r11908) -Fix: update crossing when merging a company, when building a crossing and after loading older savegame
17 years ago
smatz
822242f411
(svn r11908) -Fix: update crossing when merging a company, when building a crossing and after loading older savegame
17 years ago
smatz
61e40b1aa5
(svn r11871) -Fix [FS#1074]: do not update signals after each tile when building/removing a large block of track/signals/station
17 years ago
smatz
9556623281
(svn r11871) -Fix [FS#1074]: do not update signals after each tile when building/removing a large block of track/signals/station
17 years ago
rubidium
736640fd87
(svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*.
17 years ago
rubidium
576f8ad93e
(svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*.
17 years ago
smatz
81cad58c68
(svn r11864) -Codechange: pass owner whose signals we will update instead of complex detection later
17 years ago
smatz
245f05a7cc
(svn r11864) -Codechange: pass owner whose signals we will update instead of complex detection later
17 years ago
rubidium
90acd52f22
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
17 years ago
rubidium
d4e6a6bf57
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
17 years ago
rubidium
2fc62eab05
(svn r11818) -Codechange: split player.h into smaller pieces.
17 years ago
rubidium
ac528411df
(svn r11818) -Codechange: split player.h into smaller pieces.
17 years ago
frosch
9629b26677
(svn r11805) -Fix [FS#1620]: VEHICLE_TRIGGER_EMPTY was triggered continuously while train waiting in station.
17 years ago
frosch
930f875c51
(svn r11805) -Fix [FS#1620]: VEHICLE_TRIGGER_EMPTY was triggered continuously while train waiting in station.
17 years ago
smatz
bc4ed3eafd
(svn r11802) -Fix [FS#716]: do not crash trains when leaving depot to a very long track
...
-Codechange: use dedicated pathfinder for signal updating, resulting in better performance and possible future improvements
17 years ago
smatz
f44a9a5d5b
(svn r11802) -Fix [FS#716]: do not crash trains when leaving depot to a very long track
...
-Codechange: use dedicated pathfinder for signal updating, resulting in better performance and possible future improvements
17 years ago
glx
55d8f7ed72
(svn r11794) -Fix [FS#1632]: reversing a train when loading at a station with an adjacent station in the same axis crashed.
17 years ago
glx
d133edd026
(svn r11794) -Fix [FS#1632]: reversing a train when loading at a station with an adjacent station in the same axis crashed.
17 years ago
rubidium
0365c1f33b
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
17 years ago
rubidium
46650c54b6
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
17 years ago
rubidium
64d691bacc
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
17 years ago
rubidium
0e517fe023
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
17 years ago
smatz
4023920f22
(svn r11763) -Fix: update signal states after merging a company
17 years ago
smatz
e165aad4db
(svn r11763) -Fix: update signal states after merging a company
17 years ago
glx
e9a35fd75d
(svn r11749) -Fix (r11352): when a bankrupted company is bought, reset vehicle color mapping so the vehicles use the new owner color
17 years ago
glx
42bddcf723
(svn r11749) -Fix (r11352): when a bankrupted company is bought, reset vehicle color mapping so the vehicles use the new owner color
17 years ago
rubidium
445a733eb6
(svn r11719) -Codechange: split sound.h in a header with types and one with functions.
17 years ago
rubidium
e5e75bd8f8
(svn r11719) -Codechange: split sound.h in a header with types and one with functions.
17 years ago
smatz
13ffc5b581
(svn r11717) -Fix [FS#1590]: make sure invalid players have all shares owned by PLAYER_SPECTATOR
17 years ago
smatz
108ab3b910
(svn r11717) -Fix [FS#1590]: make sure invalid players have all shares owned by PLAYER_SPECTATOR
17 years ago
rubidium
722613f7f3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
17 years ago
rubidium
384503e7d3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
17 years ago
rubidium
db73addb43
(svn r11702) -Codechange: move all date related stuff to date*.
17 years ago
rubidium
b9046c97fb
(svn r11702) -Codechange: move all date related stuff to date*.
17 years ago
rubidium
f82aeb82c5
(svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h).
17 years ago
rubidium
2786d789a1
(svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h).
17 years ago
rubidium
81bf9f8503
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
17 years ago
rubidium
429521a7d1
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
17 years ago
rubidium
1f6043458c
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
17 years ago
rubidium
8f0e68285b
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
17 years ago
rubidium
3074bca136
(svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
17 years ago
rubidium
6a9e77e079
(svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
17 years ago
rubidium
766551b0bc
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
17 years ago
rubidium
9e9cfe6e59
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
17 years ago
rubidium
8427b8bad2
(svn r11675) -Codechange: split the string types from the string functions.
17 years ago
rubidium
433a9f3c09
(svn r11675) -Codechange: split the string types from the string functions.
17 years ago
rubidium
8bfbfd0031
(svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps.
17 years ago
rubidium
8896bea306
(svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps.
17 years ago
belugas
e07925a5cb
(svn r11533) -Codechange: Rename some unclear clear_x prices member names.
...
While at it, remove one unused entry on the clear_price_table array.
It is based on ground type, and the unused one was referencing a non existing one.
17 years ago
belugas
1682d5d679
(svn r11533) -Codechange: Rename some unclear clear_x prices member names.
...
While at it, remove one unused entry on the clear_price_table array.
It is based on ground type, and the unused one was referencing a non existing one.
17 years ago
skidd13
e36dba227b
(svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
...
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
17 years ago
skidd13
bdc7fd2d76
(svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
...
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
17 years ago
skidd13
815b8d8df1
(svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style
17 years ago
skidd13
bf959f926f
(svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style
17 years ago
skidd13
3ae50673a3
(svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style
17 years ago
skidd13
eeaa348f8b
(svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style
17 years ago
skidd13
6801cceda1
(svn r11482) -Codechange: Remove the doubled function ClrBitT and rename the remaining to fit with the naming style
17 years ago
skidd13
5c31a973a1
(svn r11482) -Codechange: Remove the doubled function ClrBitT and rename the remaining to fit with the naming style
17 years ago
skidd13
c0a2c0c23e
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
17 years ago
skidd13
71c4325c50
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
17 years ago
skidd13
26224adf78
(svn r11479) -Codechange: Move the BIGMUL functions to the file of their usage
...
-Codechange: Rename the BIGMUL functions to the fitting naming style
17 years ago
skidd13
d076ea8697
(svn r11479) -Codechange: Move the BIGMUL functions to the file of their usage
...
-Codechange: Rename the BIGMUL functions to the fitting naming style
17 years ago
skidd13
98f66552be
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
17 years ago
skidd13
8be526e499
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
17 years ago
rubidium
c1cf9f3396
(svn r11410) -Codechange: implement random triggers for industries.
17 years ago
rubidium
af5c2a785f
(svn r11410) -Codechange: implement random triggers for industries.
17 years ago
truelight
f1df43ec21
(svn r11382) -Codechange: renamed COUNTBITS to CountBits, as it is no longer a macro (skidd13)
17 years ago
truelight
69b1d97c03
(svn r11382) -Codechange: renamed COUNTBITS to CountBits, as it is no longer a macro (skidd13)
17 years ago
belugas
e2c0f1faf7
(svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
...
Patch heavily based on BiBB's work (FS#1383)
17 years ago
belugas
56e6282f2f
(svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
...
Patch heavily based on BiBB's work (FS#1383)
17 years ago
rubidium
9a0d2de5cf
(svn r11331) -Fix: do not misuse CommandCost for overflow safe stuff as Money supports that now too.
17 years ago
rubidium
af9521ff14
(svn r11331) -Fix: do not misuse CommandCost for overflow safe stuff as Money supports that now too.
17 years ago
rubidium
eadd6765e1
(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.
17 years ago
rubidium
8212088c03
(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.
17 years ago
rubidium
3d4bc58dc4
(svn r11258) -Fix [FS#1325]: if a Load Amount callback returns 0, it means (according to TTDP's source code, not "the" specs) that it should take the "default" one.
17 years ago
rubidium
edc2a62669
(svn r11258) -Fix [FS#1325]: if a Load Amount callback returns 0, it means (according to TTDP's source code, not "the" specs) that it should take the "default" one.
17 years ago
glx
18de82b000
(svn r11176) -Revert (r9867): as it is needed for newgrf callbacks 14B and 14C
17 years ago
glx
5e45e73037
(svn r11176) -Revert (r9867): as it is needed for newgrf callbacks 14B and 14C
17 years ago
rubidium
a28b307c95
(svn r11173) -Codechange: rename some callback enums so they are more uniform.
17 years ago
rubidium
127c7c9b0f
(svn r11173) -Codechange: rename some callback enums so they are more uniform.
17 years ago
glx
ccf13f3ccc
(svn r11088) -Fix (r11063, r11067): MSVC warning C4804: '>' : unsafe use of type 'bool' in operation
17 years ago
glx
7b7c66fb6b
(svn r11088) -Fix (r11063, r11067): MSVC warning C4804: '>' : unsafe use of type 'bool' in operation
17 years ago
rubidium
211b8dea39
(svn r11063) -Codechange: make it possible for people to view the loading indicators of everyone. Patch by SmatZ.
17 years ago
rubidium
3243b07542
(svn r11063) -Codechange: make it possible for people to view the loading indicators of everyone. Patch by SmatZ.
17 years ago
rubidium
d5e3e4c66e
(svn r11039) -Fix [FS#1191]: underflow that caused overflows in the performance rating calculation.
17 years ago
rubidium
b1effc466e
(svn r11039) -Fix [FS#1191]: underflow that caused overflows in the performance rating calculation.
17 years ago
rubidium
6f76bc2449
(svn r11031) -Codechange: reduce the amount of duplication of bit counting functions. Based on patches by skidd13, SmatZ and Belugas.
17 years ago
rubidium
56ab253307
(svn r11031) -Codechange: reduce the amount of duplication of bit counting functions. Based on patches by skidd13, SmatZ and Belugas.
17 years ago
rubidium
766d6d420e
(svn r11030) -Revert r11016, Fix [FS#1178]: the way to determine whether a station should get goods was not done properly.
17 years ago
rubidium
0df355bbda
(svn r11030) -Revert r11016, Fix [FS#1178]: the way to determine whether a station should get goods was not done properly.
17 years ago
rubidium
0cf6a3f1ef
(svn r11018) -Fix [FS#1169]: Disallow buying/selling shares in your own company or a bankrupted/non-existant company.
17 years ago
rubidium
7f21de5ea9
(svn r11018) -Fix [FS#1169]: Disallow buying/selling shares in your own company or a bankrupted/non-existant company.
17 years ago
rubidium
235ad4ab6b
(svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that.
17 years ago
rubidium
cb7eaff353
(svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that.
17 years ago
rubidium
d5bc4d8b2a
(svn r10981) -Fix [FS#1156] (r10970): stations gave ratings for accepted cargo too.
17 years ago
rubidium
a0d37ea7b9
(svn r10981) -Fix [FS#1156] (r10970): stations gave ratings for accepted cargo too.
17 years ago
rubidium
8807a47f31
(svn r10953) -Fix [FS#1139, FS#1143]: stations would not get a rating when there were already two stations with a "more than default" rating as no cargo would be moved to the station to be picked up.
17 years ago
rubidium
8ef0cbbdf5
(svn r10953) -Fix [FS#1139, FS#1143]: stations would not get a rating when there were already two stations with a "more than default" rating as no cargo would be moved to the station to be picked up.
17 years ago
rubidium
11b7931cb0
(svn r10921) -Fix [FS#1130] (r10323): the company related news messages still thought that companies were described by two parameters instead of one.
17 years ago
rubidium
ada36e7122
(svn r10921) -Fix [FS#1130] (r10323): the company related news messages still thought that companies were described by two parameters instead of one.
17 years ago
truelight
6f68d876b8
(svn r10857) -Fix: feeder-income was broken; substract the feeder-costs from the vehicle-income, not from the route-income (tnx to RichK for all the info)
17 years ago
truelight
81810ad391
(svn r10857) -Fix: feeder-income was broken; substract the feeder-costs from the vehicle-income, not from the route-income (tnx to RichK for all the info)
17 years ago
rubidium
b21f29c38f
(svn r10770) -Codechange: use the pool item class as super class for the vehicle struct.
...
-Codechange: do not force "special" vehicles to be allocated in the low 1024 vehicle slots and non "special" vehicles in the rest of the slots.
17 years ago
rubidium
836105864c
(svn r10770) -Codechange: use the pool item class as super class for the vehicle struct.
...
-Codechange: do not force "special" vehicles to be allocated in the low 1024 vehicle slots and non "special" vehicles in the rest of the slots.
17 years ago
rubidium
e6c864f26e
(svn r10692) -Fix (r10691): those good old days that LT_NORMAL was still called LT_NORMAL :)
17 years ago
rubidium
715c5566a3
(svn r10692) -Fix (r10691): those good old days that LT_NORMAL was still called LT_NORMAL :)
17 years ago
rubidium
e8ecf501c0
(svn r10691) -Codechange [FS#509]: simplify GetTransportedGoodsIncome to make it more obvious and less hidden what actually happens. Based on a patch by rfalke.
17 years ago
rubidium
aa36c607b4
(svn r10691) -Codechange [FS#509]: simplify GetTransportedGoodsIncome to make it more obvious and less hidden what actually happens. Based on a patch by rfalke.
17 years ago
peter1138
a6aba9c83d
(svn r10628) -Fix (r10606,FS#1055): Revert r10606 and fix the plural problem another way.
17 years ago
peter1138
d93fcea1f8
(svn r10628) -Fix (r10606,FS#1055): Revert r10606 and fix the plural problem another way.
17 years ago
rubidium
df009178d4
(svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
17 years ago
rubidium
efc7fdf2fd
(svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
17 years ago
rubidium
9b105c28bd
(svn r10541) -Fix [FS#1028]: cargo payment rates overflow.
...
-Fix: cargo payment rates diverge from cost rates making it impossible to make any profit after a certain number of years.
Both are solved by stopping the inflation after 170 years; there is absolutely no point in continueing the inflation after that as it only makes the game have overflows at some point that cannot be solved; using larger variables only delays the inevitable.
17 years ago
rubidium
5ed3482aac
(svn r10541) -Fix [FS#1028]: cargo payment rates overflow.
...
-Fix: cargo payment rates diverge from cost rates making it impossible to make any profit after a certain number of years.
Both are solved by stopping the inflation after 170 years; there is absolutely no point in continueing the inflation after that as it only makes the game have overflows at some point that cannot be solved; using larger variables only delays the inevitable.
17 years ago
rubidium
d1ef87f914
(svn r10508) -Codechange: allow customizable animation schemes for industries.
17 years ago
rubidium
79d04412b0
(svn r10508) -Codechange: allow customizable animation schemes for industries.
17 years ago
rubidium
95ea8fd2f1
(svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
17 years ago
rubidium
283a06e4a1
(svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
17 years ago
rubidium
db16c33194
(svn r10473) -Codechange: make the industry "window", the one that shows when you click on an industry, more flexible to allow easier integration with newindustries.
17 years ago
rubidium
8b54aab214
(svn r10473) -Codechange: make the industry "window", the one that shows when you click on an industry, more flexible to allow easier integration with newindustries.
17 years ago
rubidium
cd702d049e
(svn r10460) -Codechange: add some more variables needed for newindustries regarding to the creation of the industries.
18 years ago
rubidium
9a55c79fd1
(svn r10460) -Codechange: add some more variables needed for newindustries regarding to the creation of the industries.
18 years ago
rubidium
4c356457e6
(svn r10442) -Codechange: implement the industry production callback.
18 years ago
rubidium
86c14c239f
(svn r10442) -Codechange: implement the industry production callback.
18 years ago
rubidium
aa04ad59f1
(svn r10441) -Fix (r10440): something went wrong "porting" fixes from one place to another; like compiling the wrong checkout.
18 years ago
rubidium
9bc6a1cc8e
(svn r10441) -Fix (r10440): something went wrong "porting" fixes from one place to another; like compiling the wrong checkout.
18 years ago
rubidium
3a73d47351
(svn r10440) -Fix: CBM_IND defines bits to be set, not bitsets.
18 years ago
rubidium
997871063f
(svn r10440) -Fix: CBM_IND defines bits to be set, not bitsets.
18 years ago
rubidium
c0ba3dba9d
(svn r10439) -Codechange: initial steps for customized industry productions.
18 years ago
rubidium
1bdb72ebd4
(svn r10439) -Codechange: initial steps for customized industry productions.
18 years ago
peter1138
b8927cb1d9
(svn r10397) -Fix [FS#969]: subsidy awarded messages broken due to {COMPANY} now taking 1 (not 2) parameters. also remove an unnecessary dereference.
18 years ago
peter1138
2bd72b978b
(svn r10397) -Fix [FS#969]: subsidy awarded messages broken due to {COMPANY} now taking 1 (not 2) parameters. also remove an unnecessary dereference.
18 years ago
rubidium
0dd445a827
(svn r10332) -Fix [FS#940]: ratings where also shown on drop-off stations.
18 years ago
rubidium
3c3c02d0fb
(svn r10332) -Fix [FS#940]: ratings where also shown on drop-off stations.
18 years ago
peter1138
8ee9e8bf1e
(svn r10323) -Codechange: reference company name, number and player (president) name
...
by index
18 years ago
peter1138
eb6594caa8
(svn r10323) -Codechange: reference company name, number and player (president) name
...
by index
18 years ago
rubidium
37e3cbb980
(svn r10287) -Fix (r10266): some surprises from that (almost always) complaining compiler...
18 years ago
rubidium
117368a5a9
(svn r10287) -Fix (r10266): some surprises from that (almost always) complaining compiler...
18 years ago
truelight
80bcbce62b
(svn r10270) -Add: prefixed the loading indicator with an arrow, up meaning vehicle is loading, down meaning vehicle is unloading
18 years ago
truelight
f80fa33cc5
(svn r10270) -Add: prefixed the loading indicator with an arrow, up meaning vehicle is loading, down meaning vehicle is unloading
18 years ago
rubidium
fc201d4ad8
(svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it.
18 years ago
rubidium
e5c352818d
(svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it.
18 years ago
rubidium
d0fa4eb9de
(svn r10258) -Codechange: as we are now using int64 all over the place, it's better to use int64 variables in the string generating too instead of packing them into two int32s.
...
-Fix: some displays of money were wrong.
18 years ago
rubidium
9c0944aa09
(svn r10258) -Codechange: as we are now using int64 all over the place, it's better to use int64 variables in the string generating too instead of packing them into two int32s.
...
-Fix: some displays of money were wrong.
18 years ago
truelight
66a136be09
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
18 years ago
truelight
56eb1738ee
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
18 years ago
rubidium
1b27095c83
(svn r10247) -Fix (r10210): *always* call SetDParamMoney when you want to place money in some string.
18 years ago
rubidium
eb1472a82d
(svn r10247) -Fix (r10210): *always* call SetDParamMoney when you want to place money in some string.
18 years ago
rubidium
0d8e82b7d7
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
18 years ago
rubidium
f806b46cc9
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
18 years ago
rubidium
f765b3d6aa
(svn r10212) -Fix [FS#723]: money overflow bugs in many locations.
18 years ago
rubidium
16ce2192e4
(svn r10212) -Fix [FS#723]: money overflow bugs in many locations.
18 years ago
rubidium
8220153e6b
(svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder.
18 years ago
rubidium
7d6c255044
(svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder.
18 years ago
rubidium
6900de65b9
(svn r10209) -Fix/Codechange: forgot a few changes of int32 -> Money in the previous commit
18 years ago
rubidium
fbb22487fc
(svn r10209) -Fix/Codechange: forgot a few changes of int32 -> Money in the previous commit
18 years ago
rubidium
23727da96f
(svn r10208) -Codechange: replace int32 with Money where appropriate.
18 years ago
rubidium
2ee73b50b8
(svn r10208) -Codechange: replace int32 with Money where appropriate.
18 years ago
rubidium
7dda2d93da
(svn r10207) -Codechange: remove the redundant player_money in favour of the money64, which is now renamed to player_money.
18 years ago
rubidium
7a72dcb3b5
(svn r10207) -Codechange: remove the redundant player_money in favour of the money64, which is now renamed to player_money.
18 years ago
rubidium
773a7c9cb6
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
18 years ago
rubidium
49220cc6f1
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
18 years ago
rubidium
3ccc83e640
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
18 years ago
rubidium
966e2738b9
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
18 years ago
rubidium
0b90d5319d
(svn r10125) -Fix [FS#865]: under some circumstances the wagons of a train didn't get loaded properly.
18 years ago
rubidium
031565527e
(svn r10125) -Fix [FS#865]: under some circumstances the wagons of a train didn't get loaded properly.
18 years ago
maedhros
f8ae742da4
(svn r10122) -Codechange: Add a CountBitsSet function and use it to replace some less efficient loops.
18 years ago
maedhros
12be876131
(svn r10122) -Codechange: Add a CountBitsSet function and use it to replace some less efficient loops.
18 years ago
maedhros
12b359fa32
(svn r10117) -Fix [FS#863]: When deleting the vehicles of bankrupt players, delete trains as
...
a whole rather than each part individually, as that leads to invalid tests on
parts that have already been deleted.
18 years ago
maedhros
49ba521e77
(svn r10117) -Fix [FS#863]: When deleting the vehicles of bankrupt players, delete trains as
...
a whole rather than each part individually, as that leads to invalid tests on
parts that have already been deleted.
18 years ago
maedhros
c186f91cbd
(svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for
...
road vehicles for those who prefer the technical explanation.
18 years ago
maedhros
3e326085fa
(svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for
...
road vehicles for those who prefer the technical explanation.
18 years ago
rubidium
f73956888f
(svn r10084) -Fix [FS#855]: reversing a train when loading at a station crashed.
18 years ago
rubidium
77b06e922f
(svn r10084) -Fix [FS#855]: reversing a train when loading at a station crashed.
18 years ago
peter1138
f2e0912ce9
(svn r10062) -Codechange: Don't redraw all station tiles when cargo is added or removed if the station has no custom graphics.
18 years ago
peter1138
9c66082b07
(svn r10062) -Codechange: Don't redraw all station tiles when cargo is added or removed if the station has no custom graphics.
18 years ago
rubidium
d255041365
(svn r10058) -Codechange: give some industry variable sensible names (like not telling "last_mo_production" when it is the production of the current month).
18 years ago
rubidium
8a74b2ebe1
(svn r10058) -Codechange: give some industry variable sensible names (like not telling "last_mo_production" when it is the production of the current month).
18 years ago
maedhros
fa548f1a6f
(svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type.
18 years ago
maedhros
4acf3e4c3f
(svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type.
18 years ago
rubidium
76b1a66498
(svn r9930) -Fix (r9838): obiwan could cause vehicles to way a long time (2.5 years) at stations.
18 years ago
rubidium
932a968af2
(svn r9930) -Fix (r9838): obiwan could cause vehicles to way a long time (2.5 years) at stations.
18 years ago
rubidium
8f0f090c51
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
18 years ago
rubidium
7d4be11516
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
18 years ago
belugas
662bee5b12
(svn r9870) -Codechange: Silence two compiler warnings and give proper type to the "type" member of industry struct
18 years ago
belugas
49570edfe9
(svn r9870) -Codechange: Silence two compiler warnings and give proper type to the "type" member of industry struct
18 years ago
belugas
c4b90f3137
(svn r9867) -Codechange: Remove data duplication. The exact same values can be found in the industry spec, so take it from there instead.
18 years ago
belugas
380d18fb69
(svn r9867) -Codechange: Remove data duplication. The exact same values can be found in the industry spec, so take it from there instead.
18 years ago
rubidium
b007a3419c
(svn r9866) -Codechange: remove the technical one-input-cargo-creates-one-output-cargo limit in the factories, sawmills, steelmills and the ones I'm forgetting to mention right now. Use of this functionality will come later.
18 years ago
rubidium
44ddf033ed
(svn r9866) -Codechange: remove the technical one-input-cargo-creates-one-output-cargo limit in the factories, sawmills, steelmills and the ones I'm forgetting to mention right now. Use of this functionality will come later.
18 years ago
rubidium
08be68e0b4
(svn r9841) -Codechange: add a little more type strictness to the vehicle types.
18 years ago
rubidium
23492f1f34
(svn r9841) -Codechange: add a little more type strictness to the vehicle types.
18 years ago
rubidium
0f81140b59
(svn r9840) -Fix (r9838): MSVC is complaining about signedness again (Belugas).
18 years ago
rubidium
a390db6941
(svn r9840) -Fix (r9838): MSVC is complaining about signedness again (Belugas).
18 years ago
rubidium
49476d46e6
(svn r9838) -Fix: make "improved loading" a proper improved loading instead of loading one (semi-)random vehicle at a time:
...
- Now it is really FIFO.
- When there is enough cargo to fill the first vehicle in the queue, the next vehicle in the queue start loading (and the next when ....).
18 years ago
rubidium
72662e15f9
(svn r9838) -Fix: make "improved loading" a proper improved loading instead of loading one (semi-)random vehicle at a time:
...
- Now it is really FIFO.
- When there is enough cargo to fill the first vehicle in the queue, the next vehicle in the queue start loading (and the next when ....).
18 years ago
rubidium
07bdd6c3cc
(svn r9836) -Codechange: make non-improved loading happen FIFO-ish; generally loading/unloading will happen fifo, but there are no guarantees on the FIFO-ness. For (better) FIFO guarantees you still need to use improved loading.
18 years ago
rubidium
c7d57379fb
(svn r9836) -Codechange: make non-improved loading happen FIFO-ish; generally loading/unloading will happen fifo, but there are no guarantees on the FIFO-ness. For (better) FIFO guarantees you still need to use improved loading.
18 years ago
rubidium
5ae882a184
(svn r9831) -Codechange: more refactoring of the loading/unloading.
18 years ago
rubidium
d78651f7b1
(svn r9831) -Codechange: more refactoring of the loading/unloading.
18 years ago
rubidium
82ca197a10
(svn r9829) -Codechange: more refactoring of the unloading algorithm.
18 years ago
rubidium
c46a00aba7
(svn r9829) -Codechange: more refactoring of the unloading algorithm.
18 years ago
rubidium
e6a6d7ef31
(svn r9815) -Fix (r9761) [FS#769): transfers weren't accounted in the vehicle profits.
18 years ago
rubidium
2d86e87a3d
(svn r9815) -Fix (r9761) [FS#769): transfers weren't accounted in the vehicle profits.
18 years ago
rubidium
9a893ebe20
(svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle.
18 years ago
rubidium
abbaa1691e
(svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle.
18 years ago
rubidium
cc9d811f53
(svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station.
18 years ago
rubidium
981bf52bdd
(svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station.
18 years ago
rubidium
53485da02c
(svn r9761) -Codechange: refactor cargo payment out of LoadUnloadVehicle.
18 years ago
rubidium
f25a168c98
(svn r9761) -Codechange: refactor cargo payment out of LoadUnloadVehicle.
18 years ago
rubidium
1951817f3b
(svn r9683) -Fix [FS#423]: improved loading does not use a huge amount of processing power anymore when having a lot of trains.
18 years ago
rubidium
fdf86bb4a2
(svn r9683) -Fix [FS#423]: improved loading does not use a huge amount of processing power anymore when having a lot of trains.
18 years ago
peter1138
7df3a94d8f
(svn r9638) -Feature: Increase cargo types from 12 to 32 and enable newcargo flag in NewGRF loader.
18 years ago
peter1138
49eb9b6fad
(svn r9638) -Feature: Increase cargo types from 12 to 32 and enable newcargo flag in NewGRF loader.
18 years ago
peter1138
e7cd92f06f
(svn r9617) -Codechange: Implement callback for cargo profit calculation
18 years ago
peter1138
b5b7b489ce
(svn r9617) -Codechange: Implement callback for cargo profit calculation
18 years ago
maedhros
3d81de8d7e
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
18 years ago
maedhros
ccaaa7d33a
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
18 years ago
belugas
7ad3bb257e
(svn r9568) -Documentation: doxygen and comment changes: Root of src is finally done. Now, time to start clearing as much as possible
18 years ago
belugas
d4d5ce7ee5
(svn r9568) -Documentation: doxygen and comment changes: Root of src is finally done. Now, time to start clearing as much as possible
18 years ago
celestar
6f49e4c644
(svn r9541) -Codechange: Safeguard the company-buying routines so that the buying player and the bought player need to be two different entities
18 years ago
celestar
191ea4b1ba
(svn r9541) -Codechange: Safeguard the company-buying routines so that the buying player and the bought player need to be two different entities
18 years ago
truelight
fb116653c6
(svn r9533) -Fix [FS#274]: when a company is removed (either via auto-clean, bankrupt, or take over), sell all the shares he has first, then sell the shares all people have on this company, and then remove the company.
18 years ago
truelight
32c3ba6604
(svn r9533) -Fix [FS#274]: when a company is removed (either via auto-clean, bankrupt, or take over), sell all the shares he has first, then sell the shares all people have on this company, and then remove the company.
18 years ago
peter1138
5a73caa0f7
(svn r9427) -Codechange: remove redundant variable
18 years ago
peter1138
d53e16131d
(svn r9427) -Codechange: remove redundant variable
18 years ago
belugas
691f8578fd
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
18 years ago
belugas
06d3669bb5
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
18 years ago
peter1138
93fe91cc8c
(svn r9388) -Codechange: variable scope and type, and standardify all CargoID loops.
18 years ago
peter1138
d7f56f1550
(svn r9388) -Codechange: variable scope and type, and standardify all CargoID loops.
18 years ago
peter1138
28717b6bc5
(svn r9257) -Codechange: Use cargo's town effect property for determining subsidy source/target type.
18 years ago
peter1138
1014c82180
(svn r9257) -Codechange: Use cargo's town effect property for determining subsidy source/target type.
18 years ago
truelight
e2eeac06f8
(svn r9071) -Fix [FS#459]: when in networking an other player takes over an AI which is also controlled by a player, move the player with the company to the company who bought out the AI
18 years ago
truelight
daeac3d310
(svn r9071) -Fix [FS#459]: when in networking an other player takes over an AI which is also controlled by a player, move the player with the company to the company who bought out the AI
18 years ago
rubidium
36cea84b11
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
18 years ago
rubidium
ce919e8c71
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
18 years ago
rubidium
979ccd45ba
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
18 years ago
rubidium
24c4d5b06d
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
18 years ago
rubidium
4169bfba06
(svn r9050) -Codechange: Foo(void) -> Foo()
18 years ago
rubidium
36bb92ae24
(svn r9050) -Codechange: Foo(void) -> Foo()
18 years ago
maedhros
878b6fcf37
(svn r9029) -Fix (r7326): Only call the gradual loading amount callback if the bit for it is set in the vehicle's callbackmask.
18 years ago
maedhros
60703d3691
(svn r9029) -Fix (r7326): Only call the gradual loading amount callback if the bit for it is set in the vehicle's callbackmask.
18 years ago
rubidium
5ec31ebc2b
(svn r8979) -Fix (r8978): unsigned vs signed comparisons.
18 years ago
rubidium
517f2bcc57
(svn r8979) -Fix (r8978): unsigned vs signed comparisons.
18 years ago
richk
cd7b71092b
(svn r8978) -Feature: Rewrite of transfer system.
...
This major feature-fix keeps track of the value of transfers offloaded at a station, and hands on to a loading vehicle a credit note proportionate to the cargo loaded. The transferring vehicle is paid only for the distance it has travelled. eg. B-C in a transfer chain A-B-C-D.
When the final cargo is delivered, these credit notes are cashed, and the final vehicle is paid for A-D minus any credit notes it is carrying. The company bank balance increases by the value of the A-D route.
You still need to set up a profitable route; it is still easy to make a loss on transfers by bad planning. :)
18 years ago
richk
d11e36e477
(svn r8978) -Feature: Rewrite of transfer system.
...
This major feature-fix keeps track of the value of transfers offloaded at a station, and hands on to a loading vehicle a credit note proportionate to the cargo loaded. The transferring vehicle is paid only for the distance it has travelled. eg. B-C in a transfer chain A-B-C-D.
When the final cargo is delivered, these credit notes are cashed, and the final vehicle is paid for A-D minus any credit notes it is carrying. The company bank balance increases by the value of the A-D route.
You still need to set up a profitable route; it is still easy to make a loss on transfers by bad planning. :)
18 years ago
rubidium
5b4b9cbd5c
(svn r8969) -Codechange: rework of the player face bits.
...
- introduce a new format (with backward compatability) that is more clear and needs a much simpler face drawer
- replace tons of ifs/switches/magic numbers by table lookups
18 years ago
rubidium
ea319b78f8
(svn r8969) -Codechange: rework of the player face bits.
...
- introduce a new format (with backward compatability) that is more clear and needs a much simpler face drawer
- replace tons of ifs/switches/magic numbers by table lookups
18 years ago
maedhros
2f557f7dc0
(svn r8945) -Codechange: Rename v->load_status to v->vehicle_flags so it can be used for more than just the gradual loading status.
18 years ago
maedhros
aadd8a4b44
(svn r8945) -Codechange: Rename v->load_status to v->vehicle_flags so it can be used for more than just the gradual loading status.
18 years ago
belugas
0f090a0c1d
(svn r8862) -Cleanup: doxygen changes, again. Mostly @files missing tags and a few comments style.
...
Some documentation addition, when i can easily supply them
18 years ago
belugas
6dbf9f2f41
(svn r8862) -Cleanup: doxygen changes, again. Mostly @files missing tags and a few comments style.
...
Some documentation addition, when i can easily supply them
18 years ago
tron
92159b7afd
(svn r8855) -Fix
...
Change some shift and cast mumbo jumbo for inflation calculation to something remotly comprehensible and explain what the magic number "54" means
18 years ago
tron
9cbc49b65b
(svn r8855) -Fix
...
Change some shift and cast mumbo jumbo for inflation calculation to something remotly comprehensible and explain what the magic number "54" means
18 years ago
tron
fef1922705
(svn r8847) -Fix
...
There is not much point in hiding a normal 64bit multiplication in a function, so do not do it
18 years ago
tron
2e4844abad
(svn r8847) -Fix
...
There is not much point in hiding a normal 64bit multiplication in a function, so do not do it
18 years ago
peter1138
3d581f4f89
(svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels.
18 years ago
peter1138
ef2daa5060
(svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels.
18 years ago
celestar
72e74c29d4
(svn r8709) -Fix/Codechange: Rename the function GetStationPlatforms into GetPlatformLength because that is what it really does. Overload it because there is already a GetPlatformLength (one gives the length of the whole platform, the other gives the remaining length in a given direction). Turned both functions into methods of Station. While messing around with it, fix a problem where loading times for overhanging trains are miscomputed.
18 years ago
celestar
d9385f2798
(svn r8709) -Fix/Codechange: Rename the function GetStationPlatforms into GetPlatformLength because that is what it really does. Overload it because there is already a GetPlatformLength (one gives the length of the whole platform, the other gives the remaining length in a given direction). Turned both functions into methods of Station. While messing around with it, fix a problem where loading times for overhanging trains are miscomputed.
18 years ago
bjarni
d40886903d
(svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that VEH_Train is 0, VEH_Road is 1 and so on
...
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places)
Surprisingly this can be done without changing the savegame format
18 years ago
bjarni
037d636734
(svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that VEH_Train is 0, VEH_Road is 1 and so on
...
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places)
Surprisingly this can be done without changing the savegame format
18 years ago
maedhros
913558797b
(svn r8501) -Fix (r7377) [FS#539]: Keep track of how much cargo has been paid for, so that cargo cannot be paid for more than once.
18 years ago
maedhros
d8edc2bb98
(svn r8501) -Fix (r7377) [FS#539]: Keep track of how much cargo has been paid for, so that cargo cannot be paid for more than once.
18 years ago
Darkvater
2ff4492abc
(svn r8428) -Codechange: Add proper names to aircraft subtypes instead of magic numbers and add a function IsNormalAircraft() which tells us whether the aircraft is in fact some flying device or a rotor/shadow.
18 years ago
Darkvater
50ca901b40
(svn r8428) -Codechange: Add proper names to aircraft subtypes instead of magic numbers and add a function IsNormalAircraft() which tells us whether the aircraft is in fact some flying device or a rotor/shadow.
18 years ago
celestar
f69794b8c1
(svn r8144) -Fix: [FS#163] When a station is removed, vehicles do not get excessive payment any longer, as the origin TILE is now stored as long as the origin STATION for the transported cargos. Basically this is only a temporary fix until cargopackets are implemented, but it fixes one of the oldest known bugs (Special Thanks to Darkvater for lots of testing)
18 years ago
celestar
05b783e551
(svn r8144) -Fix: [FS#163] When a station is removed, vehicles do not get excessive payment any longer, as the origin TILE is now stored as long as the origin STATION for the transported cargos. Basically this is only a temporary fix until cargopackets are implemented, but it fixes one of the oldest known bugs (Special Thanks to Darkvater for lots of testing)
18 years ago
peter1138
ca9843424b
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
...
This lets us increase the sprite width from 14 to up to 29 bits,
effectively nulling the old sprite limit. Table changes in next commit.
18 years ago
peter1138
92d418b031
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
...
This lets us increase the sprite width from 14 to up to 29 bits,
effectively nulling the old sprite limit. Table changes in next commit.
18 years ago
KUDr
3ad14cc7a8
(svn r8125) -Codechange: Station is now constructed/destroyed using new/delete operators (don't worry, they still use the same memory pool). Few station related functions turned into Station::methods (just first step). All this new stuff moved from station_cmd.cpp to the new file (station.cpp).
18 years ago
KUDr
8b65342449
(svn r8125) -Codechange: Station is now constructed/destroyed using new/delete operators (don't worry, they still use the same memory pool). Few station related functions turned into Station::methods (just first step). All this new stuff moved from station_cmd.cpp to the new file (station.cpp).
18 years ago
rubidium
98e462e564
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
18 years ago
rubidium
f66b373b52
(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
18 years ago
celestar
08de6b082a
(svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max().
18 years ago
celestar
2ac0410767
(svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max().
18 years ago
rubidium
a7d0cdf95f
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
18 years ago
rubidium
f35ed4bbc2
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
18 years ago
KUDr
07c30785ab
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
18 years ago
KUDr
e373ea7096
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
18 years ago