rubidium
2283b8038f
(svn r14825) -Fix: pay the correct amount of interest instead of a few percent too little a year
2009-01-04 14:32:30 +00:00
smatz
254e19da91
(svn r14807) -Codechange: use INVALID_TILE instead of 0 to mark invalid depots, industries, towns and waypoints
2009-01-03 16:06:58 +00:00
rubidium
87e5a8b52b
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
2008-12-28 14:37:19 +00:00
smatz
53679122af
(svn r14753) -Fix (r1): after buying a company, one could have more vehicles with the same UnitID
2008-12-26 23:53:07 +00:00
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.
2008-12-26 21:49:00 +00:00
rubidium
3ebe66a5e4
(svn r14748) -Codechange: unduplicate window updating when deleting vehicles.
2008-12-26 21:08:51 +00:00
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.
2008-12-26 20:45:02 +00:00
smatz
5b26afbd6b
(svn r14734) -Codechange: type of bankrupt_asked is CompanyMask, not byte
2008-12-24 00:25:17 +00:00
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.
2008-12-20 17:21:22 +00:00
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).
2008-12-13 18:25:42 +00:00
smatz
28028cf755
(svn r14670) -Codechange: use better readable (I hope) and branchless (for some archs/compilers) code for cargo value computation
2008-12-13 16:16:44 +00:00
frosch
896841403f
(svn r14536) -Fix (r14530): Do not expect uints to become negative.
2008-10-25 22:00:51 +00:00
frosch
ac281ed35c
(svn r14530) -Fix [FS#2138]: Do not deliver cargo to industries not inside station catchment area.
2008-10-25 14:24:50 +00:00
rubidium
272b2ef0e9
(svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus)
2008-10-14 18:38:51 +00:00
rubidium
b650a86e58
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
2008-09-30 20:51:04 +00:00
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.
2008-09-30 20:39:50 +00:00
smatz
7ae255a553
(svn r14348) -Fix (r1667): signs were not updated on company bankrupcy/sell, they have colour of invalid player
2008-09-16 20:57:49 +00:00
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
2008-09-15 17:18:22 +00:00
belugas
db58c25af2
(svn r14254) -Codechange: Code style and breathing room
2008-09-06 02:53:18 +00:00
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 :)
2008-08-20 01:38:12 +00:00
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.
2008-07-26 14:58:08 +00:00
rubidium
3a799389eb
(svn r13731) -Codechange: make a pool of the array of players.
2008-07-18 16:40:29 +00:00
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.
2008-07-18 16:26:51 +00:00
rubidium
d06529ef4d
(svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool.
2008-07-17 20:13:01 +00:00
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.
2008-07-07 09:23:54 +00:00
skidd13
9335a28cb5
(svn r13647) -Codechange: replace MAX_UVALUE() for std types with the equivalent constant
2008-06-27 17:46:43 +00:00
peter1138
10b494d260
(svn r13356) -Codechange: Incorrect documentation and variable type for inflation rates
2008-06-02 06:42:27 +00:00
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.
2008-05-30 18:20:26 +00:00
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.
2008-05-29 15:13:28 +00:00
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.
2008-05-26 00:31:36 +00:00
rubidium
8c9cc415e3
(svn r13255) -Codechange: move _opt to _settings.
2008-05-25 22:36:44 +00:00
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.
2008-05-25 19:17:03 +00:00
rubidium
9defec7876
(svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData.
2008-05-18 16:51:44 +00:00
rubidium
152e82ba92
(svn r13147) -Codechange: move the code to draw bankruptcy news to news_gui.cpp.
2008-05-17 21:13:05 +00:00
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.
2008-05-17 13:01:30 +00:00
rubidium
5ede3da220
(svn r13123) -Codechange: passing the bankrupt type via data_b is not needed anymore. Patch by Cirdan.
2008-05-16 20:04:17 +00:00
rubidium
d94bef9d5c
(svn r13102) -Codechange: make a class of the NewsWindow.
2008-05-15 13:47:55 +00:00
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.
2008-05-15 13:39:36 +00:00
rubidium
d0c79e1164
(svn r13065) -Codechange: remove the need for the news string callbacks. Patch by Cirdan.
2008-05-13 10:17:04 +00:00
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.
2008-05-08 22:53:49 +00:00
rubidium
402a1e24ba
(svn r12977) -Codechange: remove quite some redundant (duplicate) function declarations.
2008-05-06 22:17:12 +00:00
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.
2008-05-06 15:11:33 +00:00
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)
2008-04-26 14:20:39 +00:00
smatz
9fc355fca5
(svn r12862) -Codechange: reduce code duplication for VehicleType -> WindowClass lookup
2008-04-24 09:55:20 +00:00
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.
2008-04-21 14:33:33 +00:00
peter1138
210d757499
(svn r12798) -Feature: Add some support for NewGRF station animation. (Thanks to mart3p for samples and fixes)
2008-04-19 23:19:12 +00:00
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.
2008-04-10 17:23:51 +00:00
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.
2008-04-10 10:18:03 +00:00
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.
2008-04-09 18:26:19 +00:00
rubidium
d74c6ffb62
(svn r12617) -Codechange: add type safety to the Order's load and unload types.
2008-04-07 20:03:46 +00:00
rubidium
fb1c4eccd8
(svn r12593) -Codechange: hide Order's flags in most of the code.
2008-04-06 15:09:45 +00:00
rubidium
630d5ad766
(svn r12585) -Fix (r12584): assumption that assertions were enabled during compilation/testing was flawed.
2008-04-05 23:46:01 +00:00
smatz
42ed287506
(svn r12560) -Cleanup: town_cmd.cpp and header files - variable scope and a bit of coding style
2008-04-04 14:53:06 +00:00
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.
2008-03-31 00:17:39 +00:00
rubidium
2edd403656
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
2008-03-31 00:06:17 +00:00
rubidium
eeabab4555
(svn r12459) -Codechange: split news.h into news_type.h and news_func.h.
2008-03-28 08:53:36 +00:00
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.
2008-02-21 19:09:10 +00:00
peter1138
577b0cc260
(svn r12207) -Change: rail running costs are engine class, not rail type
2008-02-21 14:30:36 +00:00
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
2008-02-20 17:06:58 +00:00
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
2008-02-13 19:24:40 +00:00
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.
2008-01-27 17:32:12 +00:00
smatz
0b3db1a92d
(svn r11913) -Fix (r11871): update signals after company bankrupt and disaster too
2008-01-18 02:16:39 +00:00
smatz
822242f411
(svn r11908) -Fix: update crossing when merging a company, when building a crossing and after loading older savegame
2008-01-17 19:49:06 +00:00
smatz
9556623281
(svn r11871) -Fix [FS#1074]: do not update signals after each tile when building/removing a large block of track/signals/station
2008-01-16 01:18:15 +00:00
rubidium
576f8ad93e
(svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*.
2008-01-15 18:44:22 +00:00
smatz
245f05a7cc
(svn r11864) -Codechange: pass owner whose signals we will update instead of complex detection later
2008-01-15 15:00:01 +00:00
rubidium
d4e6a6bf57
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
2008-01-13 01:21:35 +00:00
rubidium
ac528411df
(svn r11818) -Codechange: split player.h into smaller pieces.
2008-01-12 14:10:35 +00:00
frosch
930f875c51
(svn r11805) -Fix [FS#1620]: VEHICLE_TRIGGER_EMPTY was triggered continuously while train waiting in station.
2008-01-10 13:13:18 +00:00
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
2008-01-09 23:00:59 +00:00
glx
d133edd026
(svn r11794) -Fix [FS#1632]: reversing a train when loading at a station with an adjacent station in the same axis crashed.
2008-01-09 17:09:53 +00:00
rubidium
46650c54b6
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
2008-01-09 16:55:48 +00:00
rubidium
0e517fe023
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
2008-01-09 09:45:45 +00:00
smatz
e165aad4db
(svn r11763) -Fix: update signal states after merging a company
2008-01-05 22:04:11 +00:00
glx
42bddcf723
(svn r11749) -Fix (r11352): when a bankrupted company is bought, reset vehicle color mapping so the vehicles use the new owner color
2008-01-03 23:50:58 +00:00
rubidium
e5e75bd8f8
(svn r11719) -Codechange: split sound.h in a header with types and one with functions.
2007-12-29 09:24:26 +00:00
smatz
108ab3b910
(svn r11717) -Fix [FS#1590]: make sure invalid players have all shares owned by PLAYER_SPECTATOR
2007-12-28 18:25:30 +00:00
rubidium
384503e7d3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
2007-12-27 13:35:39 +00:00
rubidium
b9046c97fb
(svn r11702) -Codechange: move all date related stuff to date*.
2007-12-26 13:50:40 +00:00
rubidium
2786d789a1
(svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h).
2007-12-26 11:45:43 +00:00
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'
2007-12-25 11:26:07 +00:00
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.
2007-12-22 23:30:28 +00:00
rubidium
6a9e77e079
(svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
2007-12-21 22:50:51 +00:00
rubidium
9e9cfe6e59
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
2007-12-21 21:50:46 +00:00
rubidium
433a9f3c09
(svn r11675) -Codechange: split the string types from the string functions.
2007-12-21 19:49:27 +00:00
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.
2007-12-19 19:44:29 +00:00
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.
2007-11-27 16:02:13 +00:00
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
2007-11-25 15:35:25 +00:00
skidd13
bf959f926f
(svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style
2007-11-24 10:38:43 +00:00
skidd13
eeaa348f8b
(svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style
2007-11-20 13:35:54 +00:00
skidd13
5c31a973a1
(svn r11482) -Codechange: Remove the doubled function ClrBitT and rename the remaining to fit with the naming style
2007-11-19 21:32:20 +00:00
skidd13
71c4325c50
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
2007-11-19 21:02:30 +00:00
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
2007-11-19 20:18:27 +00:00
skidd13
8be526e499
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
2007-11-19 18:38:10 +00:00
rubidium
af5c2a785f
(svn r11410) -Codechange: implement random triggers for industries.
2007-11-11 17:56:37 +00:00
truelight
69b1d97c03
(svn r11382) -Codechange: renamed COUNTBITS to CountBits, as it is no longer a macro (skidd13)
2007-11-04 22:47:34 +00:00
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)
2007-11-04 00:08:57 +00:00
rubidium
af9521ff14
(svn r11331) -Fix: do not misuse CommandCost for overflow safe stuff as Money supports that now too.
2007-10-21 16:44:19 +00:00
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.
2007-10-20 14:51:09 +00:00
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.
2007-10-14 19:13:38 +00:00
glx
5e45e73037
(svn r11176) -Revert (r9867): as it is needed for newgrf callbacks 14B and 14C
2007-09-27 21:39:13 +00:00
rubidium
127c7c9b0f
(svn r11173) -Codechange: rename some callback enums so they are more uniform.
2007-09-26 17:33:32 +00:00
glx
7b7c66fb6b
(svn r11088) -Fix (r11063, r11067): MSVC warning C4804: '>' : unsafe use of type 'bool' in operation
2007-09-11 17:42:46 +00:00
rubidium
3243b07542
(svn r11063) -Codechange: make it possible for people to view the loading indicators of everyone. Patch by SmatZ.
2007-09-08 22:04:49 +00:00
rubidium
b1effc466e
(svn r11039) -Fix [FS#1191]: underflow that caused overflows in the performance rating calculation.
2007-09-02 20:41:46 +00:00
rubidium
56ab253307
(svn r11031) -Codechange: reduce the amount of duplication of bit counting functions. Based on patches by skidd13, SmatZ and Belugas.
2007-09-01 08:31:36 +00:00
rubidium
0df355bbda
(svn r11030) -Revert r11016, Fix [FS#1178]: the way to determine whether a station should get goods was not done properly.
2007-09-01 08:04:08 +00:00
rubidium
7f21de5ea9
(svn r11018) -Fix [FS#1169]: Disallow buying/selling shares in your own company or a bankrupted/non-existant company.
2007-08-31 17:15:46 +00:00
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.
2007-08-30 13:03:56 +00:00
rubidium
a0d37ea7b9
(svn r10981) -Fix [FS#1156] (r10970): stations gave ratings for accepted cargo too.
2007-08-26 13:55:36 +00:00
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.
2007-08-20 20:29:22 +00:00
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.
2007-08-16 10:10:59 +00:00
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)
2007-08-11 22:57:23 +00:00
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.
2007-08-03 19:36:00 +00:00
rubidium
715c5566a3
(svn r10692) -Fix (r10691): those good old days that LT_NORMAL was still called LT_NORMAL :)
2007-07-25 19:36:51 +00:00
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.
2007-07-25 19:26:33 +00:00
peter1138
d93fcea1f8
(svn r10628) -Fix (r10606,FS#1055): Revert r10606 and fix the plural problem another way.
2007-07-19 17:28:55 +00:00
rubidium
efc7fdf2fd
(svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
2007-07-16 09:16:58 +00:00
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.
2007-07-13 12:08:37 +00:00
rubidium
79d04412b0
(svn r10508) -Codechange: allow customizable animation schemes for industries.
2007-07-11 15:03:29 +00:00
rubidium
283a06e4a1
(svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
2007-07-08 17:40:04 +00:00
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.
2007-07-08 00:25:05 +00:00
rubidium
9a55c79fd1
(svn r10460) -Codechange: add some more variables needed for newindustries regarding to the creation of the industries.
2007-07-07 08:53:19 +00:00
rubidium
86c14c239f
(svn r10442) -Codechange: implement the industry production callback.
2007-07-05 05:41:56 +00:00
rubidium
9bc6a1cc8e
(svn r10441) -Fix (r10440): something went wrong "porting" fixes from one place to another; like compiling the wrong checkout.
2007-07-04 22:24:57 +00:00
rubidium
997871063f
(svn r10440) -Fix: CBM_IND defines bits to be set, not bitsets.
2007-07-04 22:18:33 +00:00
rubidium
1bdb72ebd4
(svn r10439) -Codechange: initial steps for customized industry productions.
2007-07-04 18:27:21 +00:00
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.
2007-06-30 08:26:34 +00:00
rubidium
3c3c02d0fb
(svn r10332) -Fix [FS#940]: ratings where also shown on drop-off stations.
2007-06-25 21:15:17 +00:00
peter1138
eb6594caa8
(svn r10323) -Codechange: reference company name, number and player (president) name
...
by index
2007-06-25 13:30:38 +00:00
rubidium
117368a5a9
(svn r10287) -Fix (r10266): some surprises from that (almost always) complaining compiler...
2007-06-22 22:28:15 +00:00
truelight
f80fa33cc5
(svn r10270) -Add: prefixed the loading indicator with an arrow, up meaning vehicle is loading, down meaning vehicle is unloading
2007-06-22 18:28:44 +00:00
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.
2007-06-22 11:58:59 +00:00
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.
2007-06-21 17:25:17 +00:00
truelight
56eb1738ee
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
2007-06-21 16:17:47 +00:00
rubidium
eb1472a82d
(svn r10247) -Fix (r10210): *always* call SetDParamMoney when you want to place money in some string.
2007-06-21 14:54:51 +00:00
rubidium
f806b46cc9
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
2007-06-21 14:32:27 +00:00
rubidium
16ce2192e4
(svn r10212) -Fix [FS#723]: money overflow bugs in many locations.
2007-06-19 00:05:26 +00:00
rubidium
7d6c255044
(svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder.
2007-06-18 22:49:55 +00:00
rubidium
fbb22487fc
(svn r10209) -Fix/Codechange: forgot a few changes of int32 -> Money in the previous commit
2007-06-18 22:09:54 +00:00
rubidium
2ee73b50b8
(svn r10208) -Codechange: replace int32 with Money where appropriate.
2007-06-18 21:44:47 +00:00
rubidium
7a72dcb3b5
(svn r10207) -Codechange: remove the redundant player_money in favour of the money64, which is now renamed to player_money.
2007-06-18 21:00:14 +00:00
rubidium
49220cc6f1
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
2007-06-18 19:53:50 +00:00
rubidium
966e2738b9
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
2007-06-18 10:48:15 +00:00
rubidium
031565527e
(svn r10125) -Fix [FS#865]: under some circumstances the wagons of a train didn't get loaded properly.
2007-06-12 23:35:10 +00:00
maedhros
12be876131
(svn r10122) -Codechange: Add a CountBitsSet function and use it to replace some less efficient loops.
2007-06-12 22:13:49 +00:00
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.
2007-06-12 17:10:52 +00:00
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.
2007-06-11 14:00:16 +00:00
rubidium
77b06e922f
(svn r10084) -Fix [FS#855]: reversing a train when loading at a station crashed.
2007-06-10 20:27:28 +00:00
peter1138
9c66082b07
(svn r10062) -Codechange: Don't redraw all station tiles when cargo is added or removed if the station has no custom graphics.
2007-06-08 09:35:39 +00:00
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).
2007-06-07 14:38:45 +00:00
maedhros
4acf3e4c3f
(svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type.
2007-06-01 12:03:10 +00:00
rubidium
932a968af2
(svn r9930) -Fix (r9838): obiwan could cause vehicles to way a long time (2.5 years) at stations.
2007-05-26 09:13:59 +00:00
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.
2007-05-19 09:40:18 +00:00
belugas
49570edfe9
(svn r9870) -Codechange: Silence two compiler warnings and give proper type to the "type" member of industry struct
2007-05-18 17:55:07 +00:00
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.
2007-05-18 00:33:47 +00:00
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.
2007-05-17 20:19:55 +00:00
rubidium
23492f1f34
(svn r9841) -Codechange: add a little more type strictness to the vehicle types.
2007-05-15 11:28:22 +00:00
rubidium
a390db6941
(svn r9840) -Fix (r9838): MSVC is complaining about signedness again (Belugas).
2007-05-15 06:20:16 +00:00
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 ....).
2007-05-14 20:12:32 +00:00
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.
2007-05-14 16:07:05 +00:00
rubidium
d78651f7b1
(svn r9831) -Codechange: more refactoring of the loading/unloading.
2007-05-13 21:24:58 +00:00
rubidium
c46a00aba7
(svn r9829) -Codechange: more refactoring of the unloading algorithm.
2007-05-12 09:09:10 +00:00
rubidium
2d86e87a3d
(svn r9815) -Fix (r9761) [FS#769): transfers weren't accounted in the vehicle profits.
2007-05-08 16:42:48 +00:00
rubidium
abbaa1691e
(svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle.
2007-05-06 14:59:01 +00:00
rubidium
981bf52bdd
(svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station.
2007-05-02 18:29:11 +00:00
rubidium
f25a168c98
(svn r9761) -Codechange: refactor cargo payment out of LoadUnloadVehicle.
2007-05-01 16:45:03 +00:00
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.
2007-04-20 08:00:30 +00:00
peter1138
49eb9b6fad
(svn r9638) -Feature: Increase cargo types from 12 to 32 and enable newcargo flag in NewGRF loader.
2007-04-15 16:20:35 +00:00
peter1138
b5b7b489ce
(svn r9617) -Codechange: Implement callback for cargo profit calculation
2007-04-12 19:33:05 +00:00
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.
2007-04-12 13:07:15 +00:00
belugas
d4d5ce7ee5
(svn r9568) -Documentation: doxygen and comment changes: Root of src is finally done. Now, time to start clearing as much as possible
2007-04-06 04:10:19 +00:00
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
2007-04-01 10:55:31 +00:00
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.
2007-03-31 12:19:22 +00:00
peter1138
d53e16131d
(svn r9427) -Codechange: remove redundant variable
2007-03-24 14:42:11 +00:00
belugas
06d3669bb5
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
2007-03-22 03:42:43 +00:00
peter1138
d7f56f1550
(svn r9388) -Codechange: variable scope and type, and standardify all CargoID loops.
2007-03-21 13:19:01 +00:00
peter1138
1014c82180
(svn r9257) -Codechange: Use cargo's town effect property for determining subsidy source/target type.
2007-03-16 17:40:31 +00:00
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
2007-03-08 21:05:05 +00:00
rubidium
ce919e8c71
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
2007-03-08 16:27:54 +00:00
rubidium
24c4d5b06d
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
2007-03-07 12:11:48 +00:00
rubidium
36bb92ae24
(svn r9050) -Codechange: Foo(void) -> Foo()
2007-03-07 11:47:46 +00:00
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.
2007-03-06 19:12:56 +00:00
rubidium
517f2bcc57
(svn r8979) -Fix (r8978): unsigned vs signed comparisons.
2007-03-02 18:57:54 +00:00
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. :)
2007-03-02 18:49:11 +00:00
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
2007-03-02 01:17:11 +00:00
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.
2007-02-28 17:18:36 +00:00
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
2007-02-23 18:55:07 +00:00
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
2007-02-23 08:03:30 +00:00
tron
2e4844abad
(svn r8847) -Fix
...
There is not much point in hiding a normal 64bit multiplication in a function, so do not do it
2007-02-22 19:05:26 +00:00
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.
2007-02-20 22:09:21 +00:00
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.
2007-02-13 16:36:38 +00:00
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
2007-02-07 19:10:19 +00:00
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.
2007-01-31 22:33:24 +00:00
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.
2007-01-27 12:29:55 +00:00
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)
2007-01-15 14:42:24 +00:00
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.
2007-01-14 19:57:49 +00:00
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).
2007-01-14 19:18:50 +00:00
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.
2007-01-12 20:19:49 +00:00
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().
2007-01-11 11:05:01 +00:00
rubidium
f35ed4bbc2
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
2007-01-10 18:56:51 +00:00
KUDr
e373ea7096
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
2007-01-10 18:12:09 +00:00