Commit Graph

288 Commits

Author SHA1 Message Date
rubidium
2f89fef353 (svn r10759) -Codechange: make the industry struct use the pool item class as super class. 2007-08-02 23:21:52 +00:00
belugas
05a5967fbb (svn r10701) -Codechange: Make sure to not use an out of bound index when the index is specified by a grf file. It has a different meaning then. 2007-07-27 03:07:05 +00:00
belugas
3880be2fa8 (svn r10700) -Codechange: Enable to jump (by default) to the overriding industry tile spec of the one been queried.
Only on certain very specific circumstances do we need the original spec
2007-07-27 02:41:29 +00:00
rubidium
903a0a08c2 (svn r10698) -Codechange [FS#1082]: simplify the code related to foundations. Primarily removal of (duplicated|magic) code and introduction of few helper functions to ease foundation determination. Patch by frosch. 2007-07-26 16:51:10 +00:00
rubidium
a67957866a (svn r10697) -Codechange: give a more sensible names to some of the unkX variables. 2007-07-26 15:37:19 +00:00
rubidium
a26ef1ee3a (svn r10696) -Codechange: remove duplication of the "make sprite transparent" code. 2007-07-26 14:07:11 +00:00
rubidium
151262c1eb (svn r10675) -Codechange: unhardcode the industry types used in several locations of the source code. 2007-07-24 19:56:43 +00:00
belugas
b6ba945486 (svn r10641) -Fix(r10638): Forgotten Son... err...include 2007-07-20 17:32:27 +00:00
belugas
79c94729b5 (svn r10640) -Fix(r10638): little typo... 2007-07-20 17:25:07 +00:00
belugas
71637303a9 (svn r10639) -Codechange: Give meaninfull name to a magic number 2007-07-20 17:14:03 +00:00
belugas
1dd61a2249 (svn r10638) -Codechange: Save the mapping of the industries and tiles, making them persistent. 2007-07-20 16:50:11 +00:00
belugas
05e4b47613 (svn r10635) -Codechange: Correct some typos and code beautifying (a little bit) 2007-07-20 14:49:41 +00:00
rubidium
df009178d4 (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h 2007-07-16 09:16:58 +00:00
glx
9f2ca45987 (svn r10575) -Fix r10573: misplaced ) 2007-07-15 00:45:02 +00:00
belugas
1bee873376 (svn r10573) -Codechange: Use function CheckIfCallBackAllowsAvailability for random map generation as well as for ingame random industry creation 2007-07-15 00:26:12 +00:00
rubidium
d1ef87f914 (svn r10508) -Codechange: allow customizable animation schemes for industries. 2007-07-11 15:03:29 +00:00
rubidium
a9249181c7 (svn r10506) -Fix: the (manual) building of banks was always rejected. 2007-07-11 08:20:57 +00:00
rubidium
e84363b4db (svn r10494) -Fix (r10490): possible null dereference in some exotic newgrfs. 2007-07-09 20:08:25 +00:00
rubidium
f183f46561 (svn r10490) -Codechange: add support for industries on non-flat surfaces. 2007-07-09 18:53:43 +00:00
rubidium
e207ba425f (svn r10485) -Codechange: add a callback mechanism to determine whether building an industry is allowed at a given location. 2007-07-09 13:21:49 +00:00
rubidium
37748a3152 (svn r10483) -Codechange: add support for callbacks to manipulate the building chance of farm fields and chopping chance for lumber mills. 2007-07-08 19:54:51 +00:00
maedhros
44db937929 (svn r10481) -Codechange: Show a news message with the new industry when primary industry prospecting succeeds. 2007-07-08 18:41:34 +00:00
rubidium
95ea8fd2f1 (svn r10477) -Codechange: add some callbacks to customise the acceptance of industries. 2007-07-08 17:40:04 +00:00
rubidium
cd702d049e (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
b0a8409200 (svn r10459) -Codechange: add helper functions to determine whether an industry is a primary industry and how much it costs to build such an industry. 2007-07-06 22:33:16 +00:00
rubidium
b8f658db94 (svn r10451) -Add: support for "prospecting" raw industries, i.e. you pay an amount of money and then it might (with a given chance) build a raw industry somewhere on the map. 2007-07-06 07:24:10 +00:00
rubidium
4c356457e6 (svn r10442) -Codechange: implement the industry production callback. 2007-07-05 05:41:56 +00:00
rubidium
c0ba3dba9d (svn r10439) -Codechange: initial steps for customized industry productions. 2007-07-04 18:27:21 +00:00
belugas
2bedfcd3bf (svn r10425) -Fix (r10418): do not compare bitmasks with HASBIT. Strike two. Forgotten code :) 2007-07-04 00:54:38 +00:00
rubidium
2f14d622ae (svn r10419) -Fix (r10418): do not compare bitmasks with HASBIT. Thanks to Maedhros for spotting this. 2007-07-03 19:25:06 +00:00
rubidium
9534c9795b (svn r10418) -Codechange: implement/resurrect the industry production flags. 2007-07-03 19:16:34 +00:00
rubidium
0debbfd73d (svn r10406) -Fix [FS#968]: only industries in the temperate climate should be affected by the "do not increase production" flag. 2007-07-01 17:21:25 +00:00
rubidium
ab52e3da52 (svn r10348) -Fix (r10347): compile errors; do not think it compiles fine when you run make on the wrong working copy. 2007-06-26 21:17:51 +00:00
rubidium
89a4ee256e (svn r10347) -Fix [FS#948]: industries with a very low production could never recover when using smooth economy.
-Fix: in smooth economy producing industries could not close, whereas they could close in non-smooth economy.
-Fix: in smooth economy the "do not increase production" flag of industries was ignored.
2007-06-26 21:11:17 +00:00
truelight
65455f5e07 (svn r10340) -Fix: make sure no industry production can ever hit < 32 with smooth_economy 2007-06-26 13:46:56 +00:00
rubidium
5ee292d806 (svn r10299) -Codechange [FS#931]: industry foundations should be drawn as all other foundations, i.e. with DrawFoundation, instead of writing the same functionality itself. 2007-06-24 10:20:05 +00:00
truelight
b1f60c582f (svn r10290) -Fix: with smooth_economy, when industry production hit 32, it stayed there for ever. Give it some chance to get out of that uber-lowness (although it is a very slim chance, at least it has one) 2007-06-22 23:53:16 +00:00
belugas
d4632dee67 (svn r10232) -Fix(r1): _numof_industry_table never was composed of 12 entries. Only 11.
It never hurt before, but it would have...
2007-06-20 03:03:00 +00:00
belugas
c492167f74 (svn r10226) -Codechange: Add support for newindustry tiles drawing.
Heavily based on Maedhros's newhouses implementation
2007-06-19 17:33:12 +00:00
rubidium
773a7c9cb6 (svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified. 2007-06-18 19:53:50 +00:00
rubidium
3ccc83e640 (svn r10197) -Codechange: replace int32 with CommandCost where appropriate. 2007-06-18 10:48:15 +00:00
belugas
0dc6ed160c (svn r10163) -Fix(r8128): Industries had lost their random recoloring. A test was removed and is now reintroduced in another way. 2007-06-15 01:53:43 +00:00
rubidium
d88f4bc78c (svn r10140) -Fix [FS#867]: an industry could overbuild a bridge. 2007-06-13 15:22:28 +00:00
belugas
cb65217069 (svn r10099) -Fix(r9867, FS860): Use the specs of the to-be-created industry instead of the scanned industry
Spotted by Oxygene
2007-06-11 14:25:38 +00:00
belugas
a8e4af3c52 (svn r10078) -Codechange: Centralize all industry counts data and access 2007-06-10 01:25:21 +00:00
belugas
256ee60545 (svn r10063) -Codechange: Change VARDEF for extern
-CodeChange: Add the count of industries, basic support for variable 67, var action02 forindustries
2007-06-08 15:48:48 +00:00
rubidium
d255041365 (svn r10058) -Codechange: give some industry variable sensible names (like not telling "last_mo_production" when it is the production of the current month). 2007-06-07 14:38:45 +00:00
rubidium
b0421273f2 (svn r10054) -Codechange: make the industries cost modifier look more like the original one, so it's much easier to support industries that use this original format. 2007-06-07 09:20:04 +00:00
rubidium
eab80301fc (svn r9993) -Fix (r9992): smallish typos resulting in compile time errors. 2007-05-30 20:34:16 +00:00
belugas
06bc9866aa (svn r9992) -Codechange: Remove some hardcoded references to Industry IDs.
A few more to go
2007-05-30 20:20:58 +00:00
belugas
c3f8c58157 (svn r9984) -Codechange: Remove an obsolete structure and a now meaningless enum, in favor of the "real thing" 2007-05-30 02:08:18 +00:00
belugas
0a3ebbbc22 (svn r9983) -Codechange: Use the "enabled" property of the industry spec. 2007-05-30 01:55:11 +00:00
belugas
e4785e0376 (svn r9976) -Codechange: Declare a writable array of specs for industry and industry tiles.
It will be initialized by the original data upon game start.
Rename some enums to be more consistent too
2007-05-29 17:41:59 +00:00
belugas
e7bbb79ff5 (svn r9969) -Codechange: Cleanup of industries (Step-14). Remove hardcoded-run-time tile acceptance and put in corresponding tile 2007-05-29 00:15:34 +00:00
rubidium
821e58ac95 (svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile. 2007-05-24 22:41:50 +00:00
peter1138
72972a1712 (svn r9887) -Fix (r9867): Industry production statistics messed up... 2007-05-20 05:53:19 +00:00
belugas
2e65d6e4e7 (svn r9886) -Codechange: Cleanup of industries (Step-13). Include the sounds table into the industry's spec. 2007-05-20 00:50:06 +00:00
belugas
662bee5b12 (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
c4b90f3137 (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
belugas
7de20df379 (svn r9762) -Feature: Two new difficulty settings : Very low number of towns and very low number of industries
Based on FS#289, by pitt2
2007-05-01 17:16:51 +00:00
belugas
cd97dec5a7 (svn r9705) -Codechange: Merge some data arrays together, making a bit more logical units.
Calculate with a macro (for _industry_anim_offs_toys) the value of x, instead of doing it at run time.
And give some more descriptive names too...
2007-04-21 02:47:33 +00:00
belugas
0532eb2515 (svn r9676) -Codechange: introduce NUM_INDUSTRYTYPES instead of IT_END.
This makes the code clearer.
2007-04-19 14:50:01 +00:00
rubidium
7577954ced (svn r9672) -Cleanup: lots of coding style fixes around operands. 2007-04-18 22:10:36 +00:00
belugas
cfaaad6384 (svn r9644) -Codechange: if else cascade into a switch case 2007-04-16 02:56:48 +00:00
belugas
436cb4296b (svn r9643) -Codechange: Simplify a test. 2007-04-16 02:53:55 +00:00
belugas
2f6f7b1984 (svn r9579) -Codechange: Cleanup of industry_cmd (Step-11). Use industry's spec appear_creation during random map creation. 2007-04-09 01:43:29 +00:00
belugas
e824e5e892 (svn r9574) -Fix(r9520, FS#721): Oil Rig ( or industry with behaviour INDUSTRYBEH_BUILT_ONWATER) should check all tiles before leaving the test. A tile in water does not ensure that all required tiles will necessary be on water. 2007-04-08 00:29:12 +00:00
belugas
e4fe1cb119 (svn r9569) -Fix(r9567): testing mode leftover... 2007-04-06 12:57:15 +00:00
belugas
a8bedd18a5 (svn r9567) -Fix(9555, FS#718): The industry ID been collected was just an index in a out of phase array. Now, ensure that the ID will really be an IndustryType 2007-04-06 02:12:15 +00:00
peter1138
51d72c11c8 (svn r9563) -Feature: Add more finer control to transparency options, including a new toolbar, accessible from the map menu or Ctrl X. Patch by Wolf01. 2007-04-05 07:49:04 +00:00
belugas
9dd844def2 (svn r9555) -Codechange: Cleanup of industry_cmd (Step-9). Use in-game appearing chances for industry creation. 2007-04-04 00:32:40 +00:00
belugas
7a0952a5bc (svn r9520) -Codechange: Add the notion of Industry behaviour. It means what an industry can do (plant fields, cut trees, do not change production), what can be done to it (disasters like mine subsidence, jet/chopper attack), when it can be built etc... 2007-03-28 20:06:28 +00:00
belugas
691f8578fd (svn r9400) -Codechange: Use some more representative enum names for landscape types. 2007-03-22 03:42:43 +00:00
maedhros
94db6aa1a2 (svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
by newgrf files. When this is enabled forests cannot be built below the highest
snow line, and farms can't be built above it. Houses still use the
_opt.snow_line so they are all consistent, so to make them respect the snowline
you may want to use some newhouses features as well.
2007-03-20 13:47:00 +00:00
belugas
9e90282712 (svn r9190) -Fix: Little typo in an enum. 2007-03-15 01:17:20 +00:00
belugas
ee945d2375 (svn r9162) -Codechange: Cleanup of industry_cmd (Step-8). Gather tile animation data into IndustryTileSpec array
Added a few documentation on remaining animation arrays (mostly ToyLand ones)
2007-03-14 02:52:50 +00:00
truelight
de5beec61c (svn r9097) -Fix [FS#525]: open and close messages now have their own setting, so you can hide economy changes, but do show open/close of industries
-Change: store news_display_opt in his own section, so it is no longer stored as uint in openttd.cfg (allows adding news-types easier)
2007-03-10 12:10:00 +00:00
belugas
b95daaf434 (svn r9075) -Codechange: Cleanup of industry_cmd (Step-7). Small step that is. The new industry messages do not need a series of tests. Only one property to use. 2007-03-09 02:04:07 +00:00
rubidium
4169bfba06 (svn r9050) -Codechange: Foo(void) -> Foo() 2007-03-07 11:47:46 +00:00
belugas
5792aa85c7 (svn r8987) -Cleanup: doxygen changes. Again. Mostly (still) @files missing tags and (more than just) a few comments style. 2007-03-03 04:04:22 +00:00
belugas
011ef28e47 (svn r8827) -Codechange: Cleanup of industry_cmd (Step-6). Implementation of IndustryTileSPec, the alter ego of IndustrySpec.
It offers identification of the different industry tiles in a more distinct manner, as well as regrouping scattered pieces of data across the sources.  More to come
2007-02-21 02:22:43 +00:00
peter1138
3d581f4f89 (svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels. 2007-02-20 22:09:21 +00:00
belugas
22a22a7d3f (svn r8535) -Feature: Allow lumbermill to cut trees only when they are full grown.
This does not affect output of the mill, but make the visual aspect of it more accurate.
Prior of this, the mill produced cargo of the same amount even if the trees are on their first stages of growth.
2007-02-02 15:14:28 +00:00
tron
c846b28d40 (svn r8485) -Fix
-Fix (since the dawn of time): Remove phantom oil rigs sometimes present in old savegames
2007-01-31 10:50:12 +00:00
belugas
4c18106f9a (svn r8145) -Featurette: Allow for Tropic Farm to plant fields after producing cargo, like its counterpart in temperate climate. 2007-01-15 16:31:46 +00:00
peter1138
ca9843424b (svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
This lets us increase the sprite width from 14 to up to 29 bits, 
effectively nulling the old sprite limit. Table changes in next commit.
2007-01-14 19:57:49 +00:00
rubidium
a7d0cdf95f (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 2007-01-10 18:56:51 +00:00
KUDr
07c30785ab (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 2007-01-10 18:12:09 +00:00