Commit Graph

542 Commits

Author SHA1 Message Date
frosch b8c401f644 (svn r20469) -Fix (r20227): Building statues used different companys for CMD_LANDSCAPE_CLEAR during testrun and DC_EXEC. 2010-08-12 14:20:02 +00:00
rubidium 3da3d131c6 (svn r20411) -Codechange: rename unmovables as quite a lot of them are actually movable; e.g. HQ and owned land are pretty movable. 2010-08-08 10:59:30 +00:00
rubidium 412bb37f59 (svn r20409) -Codechange: reduce the number of includes needed by newgrf.h 2010-08-08 09:07:40 +00:00
rubidium 6d6939f844 (svn r20401) -Codechange: let HouseSpec use GRFFileProps 2010-08-07 21:03:38 +00:00
rubidium 3bfe26c69d (svn r20337) -Codechange: unify the construction of objects on the map 2010-08-03 08:58:12 +00:00
terkhen 7a6df202d0 (svn r20323) -Codechange: Move Delete town code to a command. 2010-08-02 21:07:23 +00:00
terkhen ca0751adb8 (svn r20322) -Codechange: Move Expand town code to a command. 2010-08-02 21:06:06 +00:00
alberth 0e900039f3 (svn r20320) -Doc: Small Doxygen and normal comment fixes, and an missed addition. 2010-08-02 20:47:27 +00:00
frosch 4bd32799f1 (svn r20286) -Codechange: Unify end of doxygen comments. 2010-08-01 19:44:49 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
alberth dc6ed2c2c0 (svn r20279) -Doc: Doxygen additions/improvements. 2010-08-01 17:45:53 +00:00
alberth a825b4fa5f (svn r20266) -Doc: Mostly typo fixes, a few doxygen-related improvements. 2010-07-31 21:02:56 +00:00
terkhen 4f9b49653b (svn r20227) -Fix [FS#3985]: Don't spend cash when building a statue fails. 2010-07-27 16:40:16 +00:00
alberth be6c058424 (svn r20211) -Codechange: Indented code should have curly braces around it. 2010-07-24 10:14:39 +00:00
rubidium b8487afe54 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 2010-07-19 17:28:27 +00:00
michi_cc a75583bbb6 (svn r20048) -Feature: Add a setting to forbid towns building level crossings. 2010-07-02 16:34:07 +00:00
michi_cc ffdbb7ec81 (svn r20047) -Fix (rUnknown): Towns were not able to build level crossings when using original or better town layout. 2010-07-02 16:34:03 +00:00
frosch 1d3adb2b66 (svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation. 2010-06-05 12:16:12 +00:00
frosch 9db3cde73a (svn r19914) -Codechange: Wrap a helper class around temporary assignments of _current_company to ensure proper restoration. 2010-05-31 20:22:57 +00:00
frosch 910aade284 (svn r19744) -Add [FS#3477]: [NewGRF] Access to random bits of houses and industries from construction callbacks 17, 28 and 2F. That is: The randombits the house/industry will start with, if construction succeeds. 2010-05-01 13:09:49 +00:00
frosch 7795303227 (svn r19743) -Fix: NewGrfs could access map bits of not yet constructed industries and houses during construction callbacks. 2010-05-01 13:01:21 +00:00
rubidium f56ebd81c3 (svn r19709) -Feature: NewGRF debugging/inspecting of (primarily) enabled callbacks and values of variables 2010-04-24 13:39:11 +00:00
frosch 75d4bc947d (svn r19654) -Codechange: Use Extract<> in more places. 2010-04-17 13:31:41 +00:00
smatz 0ef33548c2 (svn r19614) -Codechange: "it's" => "its" where appropriate 2010-04-12 14:12:47 +00:00
alberth 073f627930 (svn r19482) -Doc: Doxygen additions/updates. 2010-03-20 15:23:26 +00:00
alberth 7ef97932d9 (svn r19479) -Codechange: Test range of town size and layout instead of against the current last value. 2010-03-20 10:59:06 +00:00
alberth e89f154c0d (svn r19478) -Codechange: Resolve TS_ prefix clash between TileSource and TownSize enums. 2010-03-20 10:55:08 +00:00
alberth 6b6ff9c52b (svn r19400) -Codechange: CheckforTownRating returns a CommandCost. 2010-03-13 15:33:07 +00:00
yexo 404df87b1f (svn r19295) -Codechange: introduce wrapper functions for GRFConfig::name/info 2010-02-28 20:28:08 +00:00
alberth 566f87b2de (svn r19279) -Codechange: CheckIfAuthorityAllowsNewStation() returns CommandCost. 2010-02-27 17:42:55 +00:00
alberth 2ac558494c (svn r19272) -Doc: successfull -> successful. 2010-02-27 12:29:44 +00:00
smatz f051066bc4 (svn r19224) -Codechange: change parameters passed to ShowErrorMessage() a bit 2010-02-24 14:46:15 +00:00
rubidium 4d93b704d9 (svn r18866) -Codechange: remove the CmdFailed(ret)/CmdSucceeded(ret) wrapper functions 2010-01-18 22:57:21 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium 31b325baaf (svn r18715) -Codechange: make StationFinder a subclass of TileArea 2010-01-04 18:12:10 +00:00
rubidium ee3a44e74f (svn r18567) -Fix [FS#2613]: [NewGRF] House property 15 did not work 2009-12-20 14:53:32 +00:00
smatz a62f16c86d (svn r18550) -Fix (r18281): show expected price of town construction even when the company doesn't have enough money 2009-12-19 21:42:19 +00:00
rubidium a68849fb56 (svn r18415) -Fix [FS#3332]: on slopes the original and better road layouts did not check their minimum distance requirements 2009-12-06 16:14:13 +00:00
smatz 421a24001c (svn r18302) -Fix [FS#3328](r18281): city size multiplier was ignored when generating new game 2009-11-26 22:04:11 +00:00
frosch 830231e2bd (svn r18283) -Feature: [NewGRF] Add new price bases for removing industries, building/removing unmovables (new objects), building/removing rail-waypoints/buoys, interacting with town-authority, building foundations, funding primary industries (when not prospecting) and towns.
If a GRF does not set price multipliers for these new prices, but for the previously used ones, the old modifiers will be propagated to the new bases.
2009-11-24 22:15:42 +00:00
smatz f0c64208cf (svn r18281) -Feature: founding towns in-game (based on work by Belugas, TheJosh, GeekToo, Terkhen and others) 2009-11-24 21:18:11 +00:00
smatz 47660b984b (svn r18110) -Codechange [FS#3316]: search for stations nearby only once per producer (instead of once pre produced cargo type) (fonsinchen) 2009-11-15 21:06:13 +00:00
rubidium c2221885f4 (svn r18027) -Codechange: make some unneededly global variables static and remove some unused variables 2009-11-09 09:59:35 +00:00
frosch ba1fc280e3 (svn r18005) -Codechange: Convert the Prices struct into an array and an enum. 2009-11-07 22:47:54 +00:00
alberth 44aacfc59f (svn r17928) -Codechange: ShowErrorMessage() now takes the summary string before the details string.
Gentlemen, swap your string parameters.
2009-10-31 19:46:51 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
smatz 8f45efa8dd (svn r17615) -Fix (r17612): town sign could be glitchy when creating town with custom name (Terkhen) 2009-09-22 18:55:15 +00:00
smatz de96f4d309 (svn r17614) -Fix: crash when deleting town while TownDirectory is open 2009-09-22 18:50:58 +00:00
smatz 1da745c9ad (svn r17612) -Feature: possibility to choose (randomise or enter custom) town name before its creation (original patch by Terkhen) 2009-09-22 13:54:54 +00:00
smatz 665864e5b0 (svn r17611) -Fix: buffers used for verifying company and president name length were too short, possibly causing false positives 2009-09-22 12:42:56 +00:00
smatz 93d275f1be (svn r17608) -Codechange: use CmdFoundTown when founding 'Random town' too 2009-09-21 20:22:56 +00:00
smatz 15511678e3 (svn r17603) -Codechange: since now, towns are 'founded' instead of 'built' 2009-09-21 18:16:00 +00:00
smatz 9225b3ba03 (svn r17589) -Codechange: rename town_acc to always_accepted 2009-09-20 17:44:33 +00:00
alberth 17a52eb852 (svn r17582) -Codechange: Move TownActions and _town_action_costs[] to a header file to allow sharing. 2009-09-20 10:08:10 +00:00
rubidium ca91a97826 (svn r17579) -Fix: remove doxygen docs for removed parameters, or change @param to @tparam if necessary 2009-09-19 15:17:47 +00:00
rubidium e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 2009-09-19 09:51:14 +00:00
rubidium 04d5b67eb6 (svn r17567) -Fix: some doxygen warnings 2009-09-18 14:23:58 +00:00
rubidium 430ce19418 (svn r17558) -Feature [NewGRF]: callbacks for houses to disable drawing foundations and to disable slope changes, like industry tile callbacks 30 and 3C. 2009-09-16 19:10:50 +00:00
frosch ebd916be3d (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 2009-09-13 19:15:59 +00:00
rubidium 55ddce8da2 (svn r17493) -Codechange: store the depot index on the map 2009-09-10 14:33:07 +00:00
rubidium 1474be7ea7 (svn r17444) -Fix [FS#3173]: when building roads isn't allowed for town, then don't build the initial piece either 2009-09-07 08:36:52 +00:00
smatz 22e9d59559 (svn r17439) -Fix (r17436): you weren't paid for cargo delivered to houses and headquarters anymore 2009-09-07 07:39:08 +00:00
rubidium c539b59da3 (svn r17268) -Fix [FS#3143]: Station/Town window titles weren't updated when they got renamed 2009-08-22 20:28:30 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
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
2009-08-08 16:42:55 +00:00
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 2009-08-07 22:23:34 +00:00
rubidium 1fe3ad3288 (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 2009-08-05 17:59:21 +00:00
belugas bc1e027d16 (svn r16978) -Fix(r16977): tab indentation instead of space indentation at beginning of a line, please 2009-07-29 12:45:15 +00:00
belugas 482732c08a (svn r16977) -Fix(r1772)[FS#3059]: make it so that failing to generate many random towns in scenario editor returns a failing message.
Fix by therken
Doxygen comments by me
2009-07-29 03:02:13 +00:00
rubidium cb0409fe52 (svn r16912) -Codechange: split waypoint.h in waypoint_base.h and waypoint_func.h 2009-07-22 10:18:19 +00:00
rubidium e3053660c6 (svn r16886) -Codechange: unify naming of some string IDs related to string codes and group them logically 2009-07-20 11:21:57 +00:00
rubidium 8c17c6cb2b (svn r16868) -Codechange: unify UpdateAll[Station|Waypoint]VirtCoords 2009-07-18 08:41:58 +00:00
smatz 1f29e38b83 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 2009-07-16 19:00:13 +00:00
rubidium fd589b90e8 (svn r16841) -Cleanup: spaces/tabs where they don't belong 2009-07-16 10:01:32 +00:00
rubidium 2b1c43f81f (svn r16825) -Codechange: unify dirtying when updating the viewport signs. 2009-07-13 23:15:13 +00:00
rubidium e067d4a4b8 (svn r16821) -Codechange: unify the naming of type::UpdateVirtCoord and UpdateAll[Type]VirtCoords. 2009-07-13 22:33:25 +00:00
rubidium b5b743bcba (svn r16795) -Fix [FS#3025]: houses wouldn't get build on the map edge. 2009-07-12 09:39:30 +00:00
rubidium 8275a98e1f (svn r16764) -Codechange: unify the way viewport signs are marked dirty 2009-07-08 08:30:35 +00:00
rubidium 3086383cdc (svn r16761) -Codechange: make UpdateViewportSignPos(ition) a class function of ViewportSign 2009-07-07 16:51:20 +00:00
smatz 59f94619c7 (svn r16746) -Codechange: use Town::PostDestructor() instead of not very clean construct for invalidating nearest town for road tiles 2009-07-05 13:21:51 +00:00
smatz 76a50ce94d (svn r16714) -Codechange: use pool-like accessors for Subsidy 2009-07-01 18:45:05 +00:00
frosch a288e4d82f (svn r16678) -Codechange: Turn CargoArray into a class, so one does not have to deal with sizeof() wrt. typedef-ed arrays. 2009-06-27 21:06:58 +00:00
frosch 812ad41f23 (svn r16676) -Codechange: Rename AcceptedCargo to CargoArray and its instances to more meaningful names. 2009-06-27 18:26:50 +00:00
smatz 50b5678e26 (svn r16673) -Codechange: rename GetProducedCargo() to AddProducedCargo() and change its behaviour accordingly 2009-06-27 17:05:20 +00:00
smatz ff33ed94ce (svn r16667) -Codechange: replace GetRandomTown() and GetRandomIndustry() by Town::GetRandom() and Industry::GetRandom() 2009-06-26 15:08:54 +00:00
smatz b668c24d46 (svn r16666) -Codechange: replace GetHouseSpecs() by HouseSpec::Get(), hide _house_specs[] 2009-06-26 14:02:27 +00:00
smatz af78d6a9bb (svn r16665) -Codechange: replace GetTownByTile() by Town::GetByTile() 2009-06-26 13:46:23 +00:00
smatz e6a165881c (svn r16664) -Codechange: move house-related stuff from town.h and town_type.h to separate files 2009-06-26 13:44:14 +00:00
smatz c0ac230e3e (svn r16660) -Codechange: get rid of more dummy tile_type_procs 2009-06-25 20:08:59 +00:00
smatz c30a87758f (svn r16659) -Codechange: rename GetAcceptedCargo() to AddAcceptedCargo() and change its behaviour accordingly
-Codechange: remove dummy GetAcceptedCargo_*() handlers
2009-06-25 19:23:09 +00:00
smatz a50ba1b8c1 (svn r16632) -Codechange: rename Town::flags12 to Town::flags 2009-06-23 09:52:26 +00:00
frosch 0d782b0f96 (svn r16498) -Codechange: Remove hardly used HASBITS. 2009-06-01 15:01:54 +00:00
alberth bab70a823d (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 2009-06-01 11:43:36 +00:00
frosch a4557c7da4 (svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted. 2009-05-24 16:52:42 +00:00
smatz b2aed51f8e (svn r16403) -Codechange: move code related to subsidies to separate file 2009-05-23 15:46:00 +00:00
smatz 10d1ef5447 (svn r16379) -Codechange: remove GetNumTowns(), GetNumIndustries() and GetActiveCompanyCount(), use PoolItem::GetNumItems() instead 2009-05-22 15:23:47 +00:00
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 2009-05-22 15:13:50 +00:00
smatz 8808f3beea (svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get() 2009-05-18 16:21:28 +00:00
rubidium f457cff73c (svn r16329) -Fix: possible desync when removing lots of towns in-game (not that we allow removing towns now, but better not have desync prone code lingering around) 2009-05-17 10:35:13 +00:00
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 2009-05-17 01:00:56 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
smatz 683a6ca039 (svn r16308) -Fix: parameter is invalid when it's equal to length of an array (Yexo) 2009-05-14 23:40:03 +00:00
smatz e1e6687bfd (svn r16277) -Codechange: enumerize values and remove unneeded values used for testing town rating 2009-05-11 11:55:41 +00:00
frosch 552f10bb09 (svn r16268) -Fix (r9876): When callback 2E returns an amount of 0, do not transport 1 unit to the station. 2009-05-10 15:42:59 +00:00
rubidium dec40e5501 (svn r16147) -Feature [FS#2635]: give the town generator a slight tendency to build towns near water by not discarding watery random tiles but by searching for near land (db48x) 2009-04-25 22:12:59 +00:00
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. 2009-04-21 23:40:56 +00:00
frosch f0a4bbda6d (svn r16101) -Cleanup (r14591): Remove an assertion to increase performance. 2009-04-20 17:42:14 +00:00
smatz a052191aca (svn r15890) -Codechange: unify the way 'can a town be placed here?' checks are done
-Change: the requirements for location of 'random' town are now a bit less strict
2009-03-29 15:06:44 +00:00
smatz abff5eacbc (svn r15831) -Fix: make sure house class/ID counters don't overflow 2009-03-23 14:09:05 +00:00
smatz f62e71ba8e (svn r15744) -Fix (r9667): when town generator failed to create requested number of towns, there were too many cities 2009-03-16 18:38:28 +00:00
rubidium 5648ea3058 (svn r15729) -Fix: silence MSVC warning 2009-03-15 21:16:07 +00:00
smatz 8585aa71ed (svn r15726) -Codechange: unify coding style for const pointers 2009-03-15 16:04:39 +00:00
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 2009-03-15 00:32:18 +00:00
rubidium 2adbf67968 (svn r15697) -Fix (r15695): warning about comparing signed vs unsigned. 2009-03-13 00:48:03 +00:00
belugas f6e4bc765a (svn r15695) -Feature [FS#2672]: Allow the number of towns that will be generated in the generate world window to be customized.
Some warnings: 
-the maximum number of towns to be accepted is set to 5000
-the minimum number of towns to be accepted is set to 1
-the number that is specified is NOT guaranteed to be the exact number of towns generated.  The normal mechanism of town creation has not been modified.  So town placement can still fail.
-setting a custom number of town will change your difficulty settings to custom as well
2009-03-12 23:54:20 +00:00
rubidium d5a2dc1d0b (svn r15689) -Fix [FS#2720]: do not crash when the generate map doesn't contain a suitable location for a town. 2009-03-12 15:14:22 +00:00
peter1138 0564d52d99 (svn r15662) -Fix (r11795): Don't mark a company as having ratings in a town when querying the cost of a command. 2009-03-10 06:53:00 +00:00
smatz 7c8474da13 (svn r15642) -Codechange: use a default parameter value in CalcClosestTownFromTile 2009-03-08 01:20:11 +00:00
yexo 3f73152b7f (svn r15639) -Change: When you disable "Towns are allowed to build roads", pressing "Expand" in the town window in the scenario editor will no longer build roads. 2009-03-07 21:36:13 +00:00
rubidium f1a96c5577 (svn r15604) -Fix [FS#2661]: towns would only build houses where the grid would not be, even when they aren't allowed to build roads and the user 'implements' another layout. 2009-03-03 22:46:08 +00:00
yexo a0c4f1156a (svn r15585) -Codechange: Remove TILE_ASSERT and replace all instances with assert(tile < MapSize()). 2009-02-25 21:50:54 +00:00
yexo fb7b0536e7 (svn r15584) -Codechange: Move several variables from variables.h to more appropriate headers. 2009-02-25 21:45:14 +00:00
smatz 13f390be3e (svn r15572) -Fix (r13730): theoretical buffer overflow when company with too long name funded a road reconstruction 2009-02-24 22:57:02 +00:00
smatz 0878541cf2 (svn r15505) -Codechange: pass name of new town as parameter to CMD_BUILD_TOWN 2009-02-16 23:23:33 +00:00
rubidium e8dbf62761 (svn r15454) -Fix [FS#2614]: towns did not know about build_on_slopes in some cases, or made decisions on the 'original' slope instead the slope after applying the foundation.. 2009-02-11 20:41:17 +00:00
frosch 032346cf8a (svn r15452) -Codechange: Add DC_NO_MODIFY_TOWN_RATING. 2009-02-11 18:50:47 +00:00
frosch 3e3a158610 (svn r15449) -Codechange: Rename DC_NO_TOWN_RATING to DC_NO_TEST_TOWN_RATING as that is what it does. 2009-02-11 18:33:27 +00:00
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 2009-02-09 21:20:05 +00:00
rubidium e31e514474 (svn r15397) -Fix [FS#2618]: a town could build a statue under a bridge. 2009-02-07 16:02:29 +00:00
frosch c52680a131 (svn r15381) -Fix (r11091): When testing for parallel road two tiles away, do not move more than one tile along the road. 2009-02-06 20:51:24 +00:00
frosch 5a369e1b50 (svn r15380) -Fix (r15190)[FS#2603]: Do not use TileY() on negative TileIndexDiffs. But the test was not needed anyway, as those tiles were already tested in previous iterations. 2009-02-06 20:24:44 +00:00
smatz aa692a99a9 (svn r15352) -Codechange: make the arguments passed around while founding a town a bit more readable 2009-02-05 13:33:37 +00:00
smatz df2a387fc3 (svn r15342) -Feature: allow changing town layout in the 'Found new town' window 2009-02-04 22:52:34 +00:00
smatz 832e392855 (svn r15340) -Fix [FS#2121]: changing town road layout in-game caused ugly road networks
-Fix: use a flag instead of TL_NO_ROADS to forbid towns to build roads. The flag is ignored during world generation, so there won't be 'ghost' towns anymore
-Feature: town layout is now stored per town, so it is possible to (manually) set different layout for each town
2009-02-04 20:17:25 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
Yexo db3ee34b44 (svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map. 2009-01-21 02:31:55 +00:00
belugas cef4103137 (svn r15172) -Feature: Allow a grf to customize house name via callback 0x14D, during Tile Inquiry process 2009-01-20 16:06:57 +00:00
peter1138 481c2164d0 (svn r15149) -Codechange: GetMaskOfTownActions() is used by a Cmd handler, therefore it does not belong in _gui. 2009-01-19 12:07:01 +00:00
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
2009-01-12 17:11:45 +00:00
frosch f5cff71284 (svn r14992) -Codechange: Rename 'CheckIfAuthorityAllows' to 'CheckIfAuthorityAllowsNewStation' and unduplicate a tiny bit of code. 2009-01-11 14:26:11 +00:00
smatz 0cd41d1dc6 (svn r14958) -Codechange [FS#1923]: when checking for unique names, compare only with manually set names
There are situations that aren't solvable (because of different language files), so if the user really wants to have duplicated name, allow him to do so. It solves desyncs between server and clients using different languages. It behaves the same in SP and MP, so users won't see the different behaviour as a bug (and even checking in SP could be worked around by the user).
2009-01-10 15:54:07 +00:00
rubidium f0b0691bfe (svn r14933) -Codechange: check the whether a pool item can be constructed instead of trying to make it and check for NULL. 2009-01-09 14:59:02 +00:00
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 2009-01-04 15:32:25 +00:00
rubidium e15231c4a4 (svn r14821) -Change [FS#2390]: make the road grids of town match, when all are using the same road layout ofcourse (cirdan) 2009-01-04 10:50:24 +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 1357b0a4c2 (svn r14789) -Feature: allow scrolling with the left mouse button pressed (if enabled). Primarily useful for systems with touch screen (aapo) 2009-01-02 22:42:05 +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 2e2086f3f8 (svn r14742) -Codechange: use SmallMap in two cases to reduce compilation time and binary size 2008-12-26 13:50:46 +00:00
rubidium d1bb5e5f36 (svn r14735) -Codechange: remove a bit of bit-waste in the map array (without changing the map array) and make the CompanyIDs contiguous.
-Note: 15 should be enough for now... making it any more means adding more bytes to the map array and thus wasting more bits instead of reducing the bit waste.
2008-12-24 09:53:15 +00:00
frosch 3d467cabe5 (svn r14611) -Fix (r13437)[FS#2421]: Store the age of a house in the map array instead of the construction year.
Note: Savegames from r13437 to now are broken and have a age of 255 years for a lot houses.
2008-11-23 14:17:41 +00:00
frosch 1e991548ac (svn r14596) -Fix (r14591): Missing 'return'. 2008-11-19 16:53:24 +00:00
smatz 07e3c096b3 (svn r14591) -Fix [FS#2388](r14528): cached nearest town could be invalid after importing older savegame and during town generation
-Codechange: rewrite parts of code responsible for caching index of nearest town
2008-11-18 22:43:59 +00:00
rubidium a14ad77a36 (svn r14528) -Codechange: cache the closest town for all road tiles instead of only roads owned by tiles. This replaces a O(n) search over all towns from the road's tileloop with a O(1) lookup (PhilSophus) 2008-10-25 13:51:47 +00:00
michi_cc 02c99bdf66 (svn r14504) -Cleanup: Use the right variable type for tile offsets. 2008-10-20 19:35:48 +00:00
rubidium d832626bb9 (svn r14491) -Documentation: updates/additions of doxygen docs (Alberth) 2008-10-19 15:39:12 +00:00
rubidium 15eb140d28 (svn r14490) -Codechange: fix comment style on a few locations (Alberth) 2008-10-19 09:51:19 +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
rubidium 257f7a229b (svn r14404) -Change [FS#2176]: don't make the town flatten land unconditionally when build on slopes is turned on. Based on a patch by Eddi. 2008-09-26 19:11:15 +00:00
frosch bffc5717bc (svn r14335) -Codechange: Remove some magic numbers. 2008-09-15 19:55:00 +00:00
smatz 1266b1a73f (svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies) 2008-09-15 19:02:50 +00:00
rubidium 2d94337e1a (svn r14064) -Fix [FS#1752]: check for the length of strings (in bytes) in the command. Checking for the length in pixels is impossible because that differs per client. 2008-08-13 06:22:04 +00:00
smatz 05c2a8eba4 (svn r13830) -Feature: show additional NewGRF info in the Tile Info window for stations, houses and industries 2008-07-25 22:37:34 +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
frosch 17de6f9ced (svn r13634) -Codechange: Let house var 0x65 ignore the house, the variable is queried for. 2008-06-25 20:04:27 +00:00
frosch 4e6d827ea6 (svn r13632) -Codechange: Use 'void *' for user-data of CircularTileSearch(). 2008-06-25 18:46:05 +00:00
smatz fee2adb299 (svn r13618) -Codechange: move tar-specific declarations to separate file
Removes indirect dependency on <string> and <map> for over 40 files
2008-06-24 09:05:24 +00:00
frosch 8bc42a8c2f (svn r13518) -Fix [FS#2083]: Properly count number of non-north housetiles. 2008-06-14 19:13:23 +00:00
rubidium a5486e626d (svn r13489) -Fix: first determine where to *exactly* build a house before asking a NewGRF whether the location is good instead of possibly moving the house a tile after the NewGRF said the location is good. 2008-06-12 14:41:29 +00:00
glx ee256e770a (svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror(). 2008-06-05 20:54:52 +00:00
belugas 4f3eb7f3cd (svn r13383) -Codechange: Put the cost of house removal in a class member 2008-06-05 01:43:03 +00:00
belugas 4b4e73c1dd (svn r13368) -Codechange: give house's min/max_date a better name, as it is really year, not date 2008-06-03 03:06:16 +00:00
belugas b0ada3fbbf (svn r13367) -Codechange: Allow CircularTileSearch function to return the tile where search has been successful, or INVALID_TILE if it has not 2008-06-03 02:20:27 +00:00
smatz 2e8b9a70ec (svn r13362) -Fix: make the town authority window a bit less glitchy 2008-06-02 14:34:23 +00:00
smatz ed462507b2 (svn r13351) -Codechange: disable warnings about unused variable for builds without asserts 2008-06-01 15:08:14 +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
peter1138 cfb962c7f1 (svn r13297) -Codechange: Use GUIList for the town directory window 2008-05-27 20:05: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
frosch 6e7a7412cd (svn r13233) -Fix: Replace some (incorrect) evaluations of TileOwner by RoadOwner.
-Fix: Before evaluating RoadOwner, check if the roadtype is present.
-Fix: Some places assumed that MP_ROAD means normal street.
2008-05-24 19:36:20 +00:00
belugas fc35ad9ee9 (svn r13226) -Feature: Allow to have more than only two airports per town. The number of airports is now controlled by the noise each of them generates, the distance from town's center and how tolerant the town is.
Initial concept : TTDPatch (moreairpots),  Initial code : Pasky
Thanks to BigBB (help coding), Smatz Skidd13 and frosch for bugcatches and advices
2008-05-24 02:54:47 +00:00
frosch eca692ef90 (svn r13206) -Feature(ette): Display all owners of a tile in the tile-info-window. 2008-05-21 22:15:39 +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 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 c76b2be644 (svn r12929) -Fix [FS#1967](r12560): town rating was too often reset to Mediocre 2008-04-29 23:11:55 +00:00
smatz a870a66877 (svn r12920) -Fix (r12859): town rating was affected even after the test run 2008-04-29 18:08:14 +00:00
rubidium 9c675afb91 (svn r12859) -Fix: make the town rating tests use less memory and much quicker; from 13% to unnoticable in the profile in games with lots of towns and lots of very active AIs. 2008-04-23 22:55:11 +00:00
rubidium 6939569362 (svn r12855) -Codechange: do not use autoptr's for testing whether certain objects can be build, but check it directly in the pool so we do not have to call destructors in the testing phase. Stations still use the autoptr though. 2008-04-23 20:56:08 +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
rubidium a40bba8bac (svn r12817) -Feature: the ability to play NewGRF sounds for industries and stations. 2008-04-21 11:29:01 +00:00
rubidium 181b36ca0b (svn r12801) -Codechange: remove the dependency of function.h in town_map.h 2008-04-20 08:43:31 +00:00
rubidium acafc26426 (svn r12762) -Fix: tabs after the first non-tab character are generally not okay (or lines starting with a space and then tabs). 2008-04-18 04:54:09 +00:00
rubidium 9d8fa486af (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 2008-04-18 04:37:06 +00:00
rubidium b1d1a4ac66 (svn r12757) -Codechange: move all cheat related stuff from all over the place to a single location. 2008-04-17 21:21:01 +00:00
rubidium 02cdf01507 (svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h. 2008-04-17 19:10:30 +00:00
smatz dccf5b4509 (svn r12731) -Fix (r12726): copying a 16bit array into 32bit wouldn't work 2008-04-15 23:07:06 +00:00
rubidium 9d3a08523a (svn r12726) -Fix [FS#1877]: overflow causing strange building behaviour in towns. 2008-04-15 22:27:28 +00:00
frosch 9346e067f3 (svn r12717) -Fix (r11107): Check the TILE_NOT_SLOPED flag of the _north_ tile of multi-tile houses to decide if autoslope is allowed. 2008-04-15 13:10:01 +00:00
smatz 6af1fb2bdd (svn r12599) -Codechange: force AllocateSafeRaw() to be linked to simplify compiler's decisions about inlining 2008-04-06 23:49:45 +00:00
rubidium 1bd5a29df5 (svn r12596) -Feature: show what cargos a station could be supplied with. Patch by Roujin. 2008-04-06 22:32:20 +00:00
smatz 8a2762978c (svn r12564) -Fix: towns couldn't terraform when inflation rised terraform prices enough 2008-04-04 16:52:29 +00:00
smatz 0aeefe164d (svn r12562) -Cleanup: variable scope in terraform_cmd.cpp 2008-04-04 15:48:15 +00:00
smatz 99b2536351 (svn r12561) -Fix: do not affect town rating change by the order in which we examine stations 2008-04-04 15:10:54 +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
smatz febc5150c9 (svn r12547) -Feature: invisibility options to make objects invisible instead of transparent 2008-04-03 19:55:40 +00:00
skidd13 584bbfd7e7 (svn r12534) -Feature: Add a new type of town road layouts - random for each town 2008-04-01 16:27:01 +00:00
skidd13 4cc6140619 (svn r12513) -Codechange: rename OriginalTileRandomiser something more descriptive 2008-03-31 15:10:24 +00:00
rubidium 6f15d34fe5 (svn r12495) -Codechange: reduce the dependency on newgrf_station.h (especially because newgrf_station.h includes a lot of stuff). 2008-03-31 06:42:26 +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
skidd13 a887b79f90 (svn r12381) -Fix [FS1835] [FS1535] (r11855): The number of houses wasn't computed right. A few other things regaring the updating had to be changed. Big thanks for support to frosch123 and SmatZ, to name just a few. (Inspired by a patch of bilbo) 2008-03-18 12:28:21 +00:00
smatz a47b4631ea (svn r12201) -Fix (r12060): compilation warnings - uninitialized variable when compiling with assert disabled 2008-02-20 19:34:53 +00:00
frosch b7993793c8 (svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus(). 2008-02-20 17:49:50 +00:00
smatz 29125c0e68 (svn r12177) -Codechange: use 'side' parameter in GetTileTrackStatus so there can be less checks in pathfinders for depots/stations/tunnels/bridges 2008-02-18 16:11:31 +00:00
smatz ebe03109ad (svn r12162) -Fix [FS#1757]: towns shouldn't build over houses owned by another town 2008-02-16 17:54:29 +00:00
smatz 4b7a812e55 (svn r12161) -Fix: towns will no longer build houses > 1x1 there where should be road (with 2x2, 3x3 grid town layouts) 2008-02-16 17:10:14 +00:00
smatz c261218cf5 (svn r12063) -Cleanup: use C++ indenting and variable scope/declaration in BuildTownHouse() 2008-02-05 00:30:58 +00:00
smatz 146779b158 (svn r12062) -Fix: possible deadlock when there are no houses available to build at given tile
-Fix: houses with zero probability could be built
2008-02-04 23:24:22 +00:00
smatz dbfdc5df94 (svn r12060) -Fix: do not clear tiles when the town won't be able to build any buildings anyway
-Fix: allow building 2x2 building on slopes if not explicitly forbidden
-Fix: it was possible to build 2x1 and 1x2 buildings on slopes even if it was not allowed
2008-02-04 22:15:48 +00:00
peter1138 be548ee224 (svn r12031) -Fix [FS#1689,FS#1719]: Prevent towns from removing or claiming ownership of player owned tiles when growing. 2008-01-31 21:16:40 +00:00
skidd13 953c3cb6df (svn r12021) -Cleanup: Make some parts of the town growth a bit more descriptive
-Codechange: Remove some needless checks
2008-01-30 17:31:39 +00:00
rubidium aa0412e0bc (svn r11925) -Fix (r122, r9867): loading old, pre savegame version 2, savegames. 2008-01-19 14:00:04 +00:00
belugas 7a66d5e21d (svn r11873) -Codechange: less a few magical numbers and a tiny bit more comments on town zones 2008-01-16 02:53:55 +00:00
glx 8c13852373 (svn r11855) -Fix [FS#1335]: recompute town population when removing a 'newhouses' grf, or when loading a game with missing 'newhouses' grfs 2008-01-15 00:03:48 +00:00
belugas e789ee83ab (svn r11851) -Codechange: A few magic numbers removal, plus a little code style 2008-01-14 18:19:29 +00:00
rubidium 5c4150d304 (svn r11832) -Codechange: get rid of (quite) some VARDEFs. 2008-01-13 13:36: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
peter1138 ab8382c0db (svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
2008-01-12 19:58:06 +00:00
rubidium ac528411df (svn r11818) -Codechange: split player.h into smaller pieces. 2008-01-12 14:10:35 +00:00
glx 785572ea32 (svn r11795) -Fix [FS#1616]: take town rating into account when testing if a command can be executed. 2008-01-09 17:47:05 +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
rubidium a3ccdcea36 (svn r11777) -Codechange: split the string header and make do not include it when it's not necessary. 2008-01-07 14:23:25 +00:00
smatz 7302d8c88b (svn r11760) -Codechange: unify the way how other end of a tunnel/bridge is determined at some places
-Fix: adding road/tram to tram/road bridge was cheaper by one tile
2008-01-04 19:45:29 +00:00
glx 72afdb8d34 (svn r11750) -Revert (r11749): commited too much 2008-01-03 23:54:23 +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 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 970fd6220a (svn r11685) -Codechange: remove a few 'useless' includes. 2007-12-23 11:20:41 +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 5b49e75453 (svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h 2007-12-19 23:26:02 +00:00
rubidium e4ef359f47 (svn r11663) -Codechange: moving of the road related types and functions. 2007-12-18 20:38:16 +00:00