Commit Graph

269 Commits (7c978ce5cdecf02df9e7b7d69b388a4274832b43)

Author SHA1 Message Date
smatz 512db5248e (svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get() 15 years ago
smatz 0c10daa243 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 15 years ago
smatz d495dc5dbc (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 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. 15 years ago
smatz e0fe28fdc9 (svn r15726) -Codechange: unify coding style for const pointers 15 years ago
rubidium c3e87f345d (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 15 years ago
rubidium f3e0fd7416 (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
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
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
rubidium 5c8cf85613 (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
smatz d5e2154e90 (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
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
rubidium 28ea38ae55 (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
rubidium 1900ba908b (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
rubidium e83cca7d13 (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
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 0c6c3311c9 (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
smatz 8a06e67067 (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 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
smatz 9514b0b9b7 (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 b79174454e (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 e589c7e580 (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
smatz 74892fbdf6 (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 521afee044 (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
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
rubidium cde65455ac (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 6898a76c5f (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
skidd13 0a178274e2 (svn r13647) -Codechange: replace MAX_UVALUE() for std types with the equivalent constant 16 years ago
peter1138 24562da11b (svn r13356) -Codechange: Incorrect documentation and variable type for inflation rates 16 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. 16 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. 16 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.
16 years ago
rubidium d289464d69 (svn r13255) -Codechange: move _opt to _settings. 16 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.
16 years ago
rubidium 3ee2556585 (svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData. 16 years ago
rubidium 4db10034fd (svn r13147) -Codechange: move the code to draw bankruptcy news to news_gui.cpp. 16 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. 16 years ago
rubidium 483ad8d02a (svn r13123) -Codechange: passing the bankrupt type via data_b is not needed anymore. Patch by Cirdan. 16 years ago
rubidium ca8d282eff (svn r13102) -Codechange: make a class of the NewsWindow. 16 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. 16 years ago
rubidium 5d7851e8d6 (svn r13065) -Codechange: remove the need for the news string callbacks. Patch by Cirdan. 16 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. 16 years ago
rubidium c27f3cfa62 (svn r12977) -Codechange: remove quite some redundant (duplicate) function declarations. 16 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. 16 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) 16 years ago
smatz 26206fa116 (svn r12862) -Codechange: reduce code duplication for VehicleType -> WindowClass lookup 16 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. 16 years ago
peter1138 3b7558b89c (svn r12798) -Feature: Add some support for NewGRF station animation. (Thanks to mart3p for samples and fixes) 16 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. 16 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.
16 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. 16 years ago
rubidium 973997e896 (svn r12617) -Codechange: add type safety to the Order's load and unload types. 16 years ago
rubidium 53d101cc99 (svn r12593) -Codechange: hide Order's flags in most of the code. 16 years ago
rubidium 84e3fa75e1 (svn r12585) -Fix (r12584): assumption that assertions were enabled during compilation/testing was flawed. 16 years ago
smatz 39dc3d3eda (svn r12560) -Cleanup: town_cmd.cpp and header files - variable scope and a bit of coding style 16 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. 16 years ago
rubidium c51b81c247 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h. 16 years ago
rubidium 2426f5342f (svn r12459) -Codechange: split news.h into news_type.h and news_func.h. 16 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 29e4c60348 (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 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
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
smatz 91cb42fa73 (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 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
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
smatz 81cad58c68 (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 2fc62eab05 (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
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
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
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 64d691bacc (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
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
rubidium 445a733eb6 (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
rubidium 722613f7f3 (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 f82aeb82c5 (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 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 3074bca136 (svn r11680) -Codechange: refactor more out of openttd.h and functions.h. 17 years ago