Commit Graph

288 Commits

Author SHA1 Message Date
rubidium
5c8cf85613 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 2009-02-09 21:20:05 +00:00
rubidium
89e1afdaa0 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 2009-02-09 02:57:15 +00:00
rubidium
283b3d16ab (svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability. 2009-02-08 12:25:13 +00:00
smatz
9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
Yexo
e3c69b7c4e (svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map. 2009-01-21 02:31:55 +00:00
frosch
3980e2739a (svn r15119) -Fix: several issues with result 0x4 (standard production change of primary industries) of callbacks 0x29 and 0x35. 2009-01-17 14:49:31 +00:00
frosch
5d585dcb4d (svn r15103) -Change: Keep industry variables 8E and 8F in sync with 93, when changing production using results 0D, 0E or 0F of callback 29 or 35. 2009-01-16 11:32:35 +00:00
peter1138
4585d9785d (svn r15073) -Fix (r15067) [FS#2532]: Default copy constructors don't necessarily do what you want. Instead of creating one, we now pass a pointer around as that avoids additional allocations. 2009-01-13 20:43:53 +00:00
peter1138
afb94c252d (svn r15067) -Fix [FS#2531]: Possible compiler bug, alleviated by using SmallVector instead of using std::set. SmallVector does everything needed anyway. 2009-01-13 18:18:53 +00:00
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
2009-01-12 17:11:45 +00:00
rubidium
28ea38ae55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
frosch
b0b6285c26 (svn r14936) -Fix: INDUSTRYBEH_ONLY_NEARTOWN bypassed the clear-test and could e.g. result in incomplete clearing of protected houses. 2009-01-09 15:11:35 +00:00
smatz
91233ea596 (svn r14828) -Codechange: move most of save/load-specific code to separate files 2009-01-04 15:32:25 +00:00
rubidium
f16427fbe0 (svn r14823) -Document: some variables/structs (Alberth) 2009-01-04 11:32:26 +00:00
smatz
b00e510140 (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
d3144b6f04 (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
e83cca7d13 (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 2008-12-28 14:37:19 +00:00
smatz
7fbd5beb0f (svn r14746) -Fix: don't let any disaster vehicle (Helicopter or Airplane) target invalid industry 2008-12-26 19:37:50 +00:00
frosch
aaf21df68b (svn r14613) -Fix [FS#2420]: When building industries, clear the tiles as OWNER_TOWN instead of the founder to take care of protected buildings and to not get stressed by town ratings. 2008-11-23 16:34:27 +00:00
frosch
c7b062e92f (svn r14604) -Codechange: Simplify a function and rename it, and fix some comments. 2008-11-22 15:48:43 +00:00
frosch
e061107b68 (svn r14562) -Fix (r14561): 8 bits are enough. The rest stays reserved. 2008-11-03 20:23:51 +00:00
frosch
29c4c2d618 (svn r14561) -Feature(ette)[FS#2334]: Add result 0x0F to callbacks 0x29/0x35. (Yexo) 2008-11-03 19:25:52 +00:00
rubidium
b5e467978b (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 2008-10-14 18:38:51 +00:00
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. 2008-09-30 20:39:50 +00:00
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
2008-09-15 17:18:22 +00:00
rubidium
e4e563afc2 (svn r14093) -Fix [FS#2230]: don't flood a NewGRF industry when it implicitly tells that it wants to be build on water (land shape flags bit 5). 2008-08-17 13:56:11 +00:00
belugas
7e4b1e2d84 (svn r13872) -Feature: Split the news message announcing opening and closure of industries into two news of their own 2008-07-30 01:53:03 +00:00
belugas
72344adce7 (svn r13864) -Feature(FS #2164): All industry creations are now generating a news event, even those funded by a real player. 2008-07-28 23:37:19 +00:00
frosch
6684bc12d5 (svn r13838) -Codechange: Make industry tiles aware of WaterClasses. 2008-07-26 16:14:10 +00:00
smatz
abea03fb89 (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
frosch
2b071f84ea (svn r13632) -Codechange: Use 'void *' for user-data of CircularTileSearch(). 2008-06-25 18:46:05 +00:00
frosch
90507de6e4 (svn r13499) -Codechange: Allow drawing (ugly) leveled foundations on steep slopes, just in case someone needs them for fallback. 2008-06-12 21:36:56 +00:00
belugas
f7b79916e8 (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
rubidium
723792cf08 (svn r13348) -Fix: an industry does not always need foundations; in the case of NewGRFs an industry can be built on a steep slope, however when 'querying' the foundation type of an industry we neglected the fact that these steep slope tiles do not have a foundation. As a result of this when one built a structure requiring foundations on a tile SW or SE of a steep slope industry tile it would try to apply the foundation on the steep slope to determine whether to draw the wall of the foundation and trigger an assert. 2008-05-31 22:43:42 +00:00
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. 2008-05-29 15:13:28 +00:00
rubidium
d289464d69 (svn r13255) -Codechange: move _opt to _settings. 2008-05-25 22:36:44 +00:00
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.
2008-05-25 19:17:03 +00:00
frosch
7f80552293 (svn r13206) -Feature(ette): Display all owners of a tile in the tile-info-window. 2008-05-21 22:15:39 +00:00
peter1138
42f78d2fc3 (svn r13205) -Codechange: Remove unnecessary code-style-buggering-up macro. 2008-05-21 12:06:05 +00:00
glx
dc1c529a31 (svn r13174) -Codechange: make a class of the IndustryDirectoryWindow. 2008-05-18 23:36:33 +00:00
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. 2008-05-15 13:39:36 +00:00
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. 2008-05-06 15:11:33 +00:00
glx
5bd8b6adb0 (svn r12933) -Fix: minor errors related to industries accepted/produced cargo 2008-05-01 22:51:53 +00:00
rubidium
d56827a9a9 (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
97f78133d2 (svn r12844) -Fix: the industry tick trigger should only be triggered once every 256 ticks, not every tick... Also bail out of the triggers a little earlier if you know they are not going to happen anyway. 2008-04-23 00:14:49 +00:00
rubidium
8186344628 (svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp 2008-04-20 11:12:07 +00:00
rubidium
40b19f3997 (svn r12803) -Cleanup: rename SpecialVehicle to EffectVehicle to have a uniform naming of the thing instead of using both names for the same thing. 2008-04-20 10:13:54 +00:00
rubidium
ba0532b595 (svn r12800) -Codechange: move the animated tile related functions out of texteff.cpp (it isn't a text effect after all). Also remove a few more functions from functions. 2008-04-20 08:22:59 +00:00
rubidium
18e64b28e2 (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
973997e896 (svn r12617) -Codechange: add type safety to the Order's load and unload types. 2008-04-07 20:03:46 +00:00
smatz
76eaed68a0 (svn r12599) -Codechange: force AllocateSafeRaw() to be linked to simplify compiler's decisions about inlining 2008-04-06 23:49:45 +00:00
rubidium
53d101cc99 (svn r12593) -Codechange: hide Order's flags in most of the code. 2008-04-06 15:09:45 +00:00
rubidium
935b562074 (svn r12588) -Codechange: do not access the destination of an order directly. 2008-04-06 07:48:51 +00:00
rubidium
3b0e3d8d30 (svn r12584) -Codechange: do not access the order type directly. 2008-04-05 23:36:54 +00:00
smatz
fcf4a7067d (svn r12547) -Feature: invisibility options to make objects invisible instead of transparent 2008-04-03 19:55:40 +00:00
rubidium
c51b81c247 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h. 2008-03-31 00:06:17 +00:00
rubidium
2426f5342f (svn r12459) -Codechange: split news.h into news_type.h and news_func.h. 2008-03-28 08:53:36 +00:00
peter1138
e40b66861c (svn r12317) -Fix [FS#1815]: Map string IDs that are embedded from other strings. 2008-02-29 08:48:01 +00:00
frosch
7f3d56041b (svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus(). 2008-02-20 17:49:50 +00:00
smatz
9f619f91b3 (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
belugas
83de4db1c0 (svn r12092) -Fix(r11532)[FS#1755]: Make sure the production level will not get out of delimited boundaries, while using var result 0D/0E and than multiplying/dividing it.
And use multiply/divide operations instead of shifting.  It does the same, just adds a bit more readability
2008-02-09 03:12:05 +00:00
belugas
f26bd05b99 (svn r12091) -Codechange : remove all production level magic numbers and replace them by enums 2008-02-09 03:03:09 +00:00
peter1138
c05d10dd35 (svn r12042) -Fix [FS#1676]: Reimplement how rivers and canals are stored in the map, allowing the sea/river/canal status to also be
stored for buoys, docks, locks and depots. All these are now allowed on rivers and removal of them will revert to the 
original water type.
2008-02-02 09:28:43 +00:00
frosch
23e6411fb7 (svn r12029) -Feature: Allow trees on shore. 2008-01-31 17:54:13 +00:00
rubidium
3b20e4d09a (svn r12006) -Fix: implement FS#1697 without the nasty side effects as specified in FS#1712. 2008-01-29 00:36:55 +00:00
belugas
7c50416d64 (svn r11977) -Fix(r11976): not a typo, not a bug. Just a removal that should have been done.
Would help to compile first...
2008-01-24 18:28:52 +00:00
belugas
e918b8d31b (svn r11976) -Fix: It seems that industries using results 0D/0E on callback cb29/35 were a bit too eager to close down. 2008-01-24 18:16:04 +00:00
peter1138
b5534e42a0 (svn r11952) -Fix (r11926): Prevent industries from being built on rivers, unless they require water. 2008-01-22 22:17:28 +00:00
rubidium
8b90809718 (svn r11925) -Fix (r122, r9867): loading old, pre savegame version 2, savegames. 2008-01-19 14:00:04 +00:00
frosch
9a9a1dcb6c (svn r11876) -Fix: Start industry tile animation also for overridden industry tiles. (Will only apply to new games or newly build industries.) 2008-01-16 15:06:48 +00:00
rubidium
736640fd87 (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
rubidium
90acd52f22 (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
belugas
1bfe4e0e02 (svn r11798) -Codechange: add comments and give a more representative function's name 2008-01-09 18:35:18 +00:00
rubidium
0365c1f33b (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
285a4a106f (svn r11788) -Fix (11787): makedepend doesn't mark delete files as changed... 2008-01-09 09:57:48 +00:00
belugas
578390ada7 (svn r11766) -Codechange: Last fine tunings on smooth economy, by Sirkoz. 2008-01-06 01:06:12 +00:00
rubidium
445a733eb6 (svn r11719) -Codechange: split sound.h in a header with types and one with functions. 2007-12-29 09:24:26 +00:00
glx
40b5641eb4 (svn r11716) -Fix [FS#1561]: don't put more than one Random() in function calls because parameter evaluation order is not guaranteed in the c++ standard (can lead to desyncs) 2007-12-28 16:21:29 +00:00
rubidium
722613f7f3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 2007-12-27 13:35:39 +00:00
rubidium
db73addb43 (svn r11702) -Codechange: move all date related stuff to date*. 2007-12-26 13:50:40 +00:00
rubidium
f82aeb82c5 (svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h). 2007-12-26 11:45:43 +00:00
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' 2007-12-25 11:26:07 +00:00
rubidium
3074bca136 (svn r11680) -Codechange: refactor more out of openttd.h and functions.h. 2007-12-21 22:50:51 +00:00
rubidium
766551b0bc (svn r11677) -Codechange: move price and command related types/functions to their respective places. 2007-12-21 21:50:46 +00:00
rubidium
8427b8bad2 (svn r11675) -Codechange: split the string types from the string functions. 2007-12-21 19:49:27 +00:00
rubidium
be923601bf (svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h 2007-12-19 23:26:02 +00:00
glx
4320447aef (svn r11615) -Fix (r11609): temperate banks can only be built in towns (over a house) 2007-12-10 17:26:49 +00:00
rubidium
a510606144 (svn r11609) -Fix [FS#1524]: wrong error messages were shown when trying to build some industries in the scenario editor. 2007-12-09 18:51:25 +00:00
glx
7e7606b0d3 (svn r11590) -Fix (r11193): IsSlopeRefused() result was half wrong 2007-12-07 21:16:38 +00:00
belugas
4f5ae3b66f (svn r11545) -Revert(r11543): The result is not what was expected. Looks like more work might be needed 2007-12-01 02:59:22 +00:00
belugas
aeb90dfab4 (svn r11543) -Codechange: Give a more adequate message when trying to place an industry required to be built over a house on any other type of tiles.
In reference to FS#1492, and other "bugs" like that one
2007-12-01 01:31:05 +00:00
belugas
b98847e489 (svn r11534) -Feature(newgrf): Implement property 23h for Industries.
This will add a cost to the removal of an industry using the cheat magic bulldozer.
Note that the removal of regular or newgrf industries without specified removal cost will have no cost applied to.
This is a difference from original spec, where a default base cost is added.
2007-11-27 17:13:49 +00:00
belugas
a22bdeb8e3 (svn r11532) -Feature[newgrf]: Add decrement(0x0D) / increment(0x0E) production operations from result of production callback cb29/35.
Only var 0x93 will be affected by these operations
2007-11-27 04:16:08 +00:00
maedhros
24a5dd3ca2 (svn r11528) -Fix (r11500): With smooth economy enabled, industries that should only decrease production would always increase it when more than 60% was transported. 2007-11-26 19:23:53 +00:00
skidd13
f56579e0d9 (svn r11526) -Codechange: Rename the function delta fitting to the naming style 2007-11-26 16:01:29 +00:00
skidd13
e36dba227b (svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
2007-11-25 15:35:25 +00:00
rubidium
7f72e5573a (svn r11504) -Fix [FS#1467]: removing docks/ship depots could result in non-canal water where canals should have been build. 2007-11-24 08:45:04 +00:00
glx
b38d2e8dbb (svn r11502) -Fix (r11144): don't do standard production change if callbacks 29/35 failed
-Fix (r11144): disable smooth economy for industries using callbacks 29/35
2007-11-23 16:50:54 +00:00
belugas
0ed5570eb4 (svn r11500) -Codechange: Smooth economy fine-tuning, making industries more responsive. Patch by Sirkoz. 2007-11-23 12:12:07 +00:00
glx
74cf54910a (svn r11499) -Fix (r11144): mul/div factor were wrong (off by two) 2007-11-23 04:17:41 +00:00