Commit Graph

150 Commits

Author SHA1 Message Date
yexo 9373ee71d9 (svn r20996) -Change: [NewGRF] the X and Y offsets in the parameter for industry vars 60,61,62,63 are unsigned instead of signed 2010-10-19 21:00:45 +00:00
rubidium 0b67a7ccd5 (svn r20942) -Feature [NewGRF]: make it possible to distinguish player built/randomly placed industries in the location and land slope check callbacks 2010-10-16 13:15:54 +00:00
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 2010-08-26 22:01:16 +00:00
rubidium 08a41c6ee5 (svn r20631) -Codechange: generalise IsIndustryTileOnWater + simplify so related code 2010-08-26 19:29:20 +00:00
rubidium ddf1510a23 (svn r20627) -Codechange: unify the animation code of station, airport, house and industry tiles 2010-08-26 17:01:17 +00:00
rubidium e2e26190d5 (svn r20623) -Codechange: unify the storing of animation related information 2010-08-26 15:31:40 +00:00
rubidium 4efa2efdbb (svn r20622) -Codechange: unify [GS]et[Statation|Object|Industry|House]AnimationFrame 2010-08-26 14:45:45 +00:00
rubidium ca7a067b7a (svn r20435) -Codechange: move spritegroup to GRFFilePropsBase and prepare it for more spritegroups 2010-08-10 15:49:35 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +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
rubidium 644deff9d2 (svn r20191) -Codechange: unVARDEF _tick_counter and move it to a more logical location 2010-07-19 17:24:33 +00:00
frosch e296eeb20c (svn r19901) -Add: [NewGRF] Access to industry founder (var A7) during callbacks 28 and 2F. (yexo) 2010-05-29 13:08:50 +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 1da0086a45 (svn r19707) -Add: helper functions to instantiate/fill ResolverObjects 2010-04-24 13:35:18 +00:00
rubidium bc925c0016 (svn r19565) -Fix: some NewGRF callbacks were named incorrectly 2010-04-05 21:01:02 +00:00
alberth b33264f30f (svn r19269) -Codechange: PerformIndustryTileSlopeCheck() returns a succeeded or failed command. 2010-02-27 10:21:59 +00:00
yexo 880fedc192 (svn r19195) -Codechange: actually draw newgrf airport tiles 2010-02-22 14:16:41 +00:00
frosch fb9b833dc4 (svn r19053) -Codechange: Add an enum for the special flags of industry tiles. (based on andythenorth' work) 2010-02-07 12:04:44 +00:00
yexo e80f4f20af (svn r18878) -Fix [NewGRF]: crash when a newgrf used var62 in an industry tile chain when the industry tile was part of an original industry 2010-01-21 18:32:44 +00:00
rubidium f94c83a387 (svn r18872) -Codechange: introduce PaletteID and use it 2010-01-21 01:38:13 +00:00
frosch 24e0945bc4 (svn r18846) -Codechange: Merge DrawTileSeq into DrawCommonTileSeq. 2010-01-17 15:05:25 +00:00
frosch d9d75c83d5 (svn r18842) -Codechange: Rename SPRITE_MODIFIER_USE_OFFSET to SPRITE_MODIFIER_CUSTOM_SPRITE, invert its meaning, and also use it for industry/house layouts instead of IS_CUSTOM_SPRITE(). 2010-01-17 01:01:56 +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
yexo 7f6016031e (svn r18762) -Codechange: unduplicate sprite layout drawing between industries and houses 2010-01-08 22:42:00 +00:00
frosch 5b422d0c64 (svn r18761) -Fix [FS#3497]: Spritelayouts do not need an Action 1 if only using default sprites. 2010-01-08 20:42:12 +00:00
rubidium 3e131e2fec (svn r18718) -Codechange: make a wrapper macro for looping TileAreas 2010-01-04 18:30:10 +00:00
rubidium 87466a4ed0 (svn r18717) -Codechange: use TileArea in industry instead of three separate variables. Also make use of TileArea functions for determining the 'width' and 'height' of an industry. 2010-01-04 18:21:07 +00:00
rubidium d46127a723 (svn r18514) -Codechange: make it a bit clearer that for tile layouts num_sprites (as in number of sprite sets) is not the same as num_sprites (as in number of building sprites) 2009-12-16 11:35:05 +00:00
rubidium f0728ca1d1 (svn r18513) -Fix [FS#3379]: sometimes NewGRFs throw invalid data at OpenTTD and that triggered a check... that if a has to be between b and c (inclusive) then c must be bigger than or equal to b (and definitely not smaller) 2009-12-16 00:06:51 +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
rubidium 64bafcbe18 (svn r17534) -Codechange: unify the naming of callback masks/flags 2009-09-14 12:22:57 +00:00
smatz ee685c8287 (svn r17316) -Codechange: use Industry::GetByTile() instead of GetIndustryByTile() 2009-08-30 11:47:41 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
frosch 134c5f3f9a (svn r17118) -Fix: Mark industry tiles dirty when trigger are triggered. 2009-08-08 18:24:48 +00:00
rubidium 2ec12a3f58 (svn r16966) -Codechange: BEGIN_TILE_LOOP and END_TILE_LOOP reworked into TILE_LOOP, which means no more duplication of parameters between BEGIN_TILE_LOOP and END_TILE_LOOP 2009-07-26 21:50:30 +00:00
rubidium f2317d0d9d (svn r16402) -Codechange: make Resolve a function of SpriteGroup 2009-05-23 15:25:52 +00:00
rubidium f490394aa8 (svn r16396) -Codechange: split NewGRF spritegroup into multiple subclasses instead of using a big union 2009-05-23 12:13:42 +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
peter1138 fd6a480004 (svn r15513) -Cleanup: Unavailable varaction variable value does not matter, but at least it can be consistent. 2009-02-18 09:14:41 +00:00
peter1138 fe5acb59f7 (svn r15512) -Cleanup: Codestyle fixes. 2009-02-18 09:10:02 +00:00
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 2009-02-09 02:57:15 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
frosch 259a073f0c (svn r14606) -Codechange: Unify usage of PALETTE_MODIFIER_TRANSPARENT and PALETTE_MODIFIER_COLOR in spritelayout drawing.
-Fix [FS#2419]: The modifiers were not applied in all cases.
2008-11-22 16:04:11 +00:00
rubidium 39450b6e4e (svn r14563) -Fix [FS#2395]: in the case that an industry NewGRF, a shared TTDPatch and
OpenTTD feature with it's origin in TTDPatch to replace/add/change vehicles
(including e.g. maximum speed, graphics and introduction year), stations,
bridges, industries, town houses or any other graphics used by either
TTDPatch or OpenTTD, would tell that building an industry is okay, which
is queried using a so-called callback that allows the NewGRF author to
test all kinds of information about the neighbourhood where the industry
might get build, it would corrupt, i.e. overwrite with invalid data, the
structure that is used to build up an error message. This then might result
in trying to resolve an invalid StringID, an internal numeric representation
of all translateable strings, which would in it's turn trigger a safety
check that is added to ensure invalid StringIDs are never resolved.
2008-11-03 23:42:07 +00:00
frosch 5a1df325e2 (svn r14488) -Fix: Synchronize drawing of spritelayouts in DrawTileLayout (Houses), IndustryDrawTileLayout, DrawStationTile, DrawTile_Station and DrawTile_Track (Waypoint).
Now transparency options, PALETTE_MODIFIER_TRANSPARENT and SPRITE_MODIFIER_OPAQUE should work for all of them.
2008-10-18 17:21:56 +00:00
rubidium 272b2ef0e9 (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 2008-10-14 18:38:51 +00:00
frosch 93d0ca8731 (svn r13885) -Fix [FS#2168]: Var 0x7F is not feature-specific. 2008-07-30 18:23:12 +00:00
frosch 16c80d031c (svn r13838) -Codechange: Make industry tiles aware of WaterClasses. 2008-07-26 16:14:10 +00:00
smatz 29985b768c (svn r13565) -Change [FS#2077]: when invisibility is set, sprite sequences are now drawn until first non-opaque sprite is found (bit 14 not set)
This is to balance performance, code complexity and NewGRF requirements
2008-06-18 16:48:58 +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
rubidium 2d860049a7 (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 a40bba8bac (svn r12817) -Feature: the ability to play NewGRF sounds for industries and stations. 2008-04-21 11:29:01 +00:00
rubidium 15680e477a (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
belugas 8e4b259352 (svn r12759) -Fix(r12358): There is no need to mask callback result for pre-version7 since CBID_INDTILE_SHAPE_CHECK (cb2F) is really 15 bits. 2008-04-18 03:17:22 +00:00
smatz febc5150c9 (svn r12547) -Feature: invisibility options to make objects invisible instead of transparent 2008-04-03 19:55:40 +00:00
glx bbdb831301 (svn r12452) -Feature: [NewGRF] Add random action 2 type 84. For vehicles only. 2008-03-27 21:36:16 +00:00
frosch ec59843136 (svn r12358) -Fix: Callback 2F returns 15 bit results starting from grf version 7. 2008-03-11 12:55:41 +00:00
frosch a40d761d7f (svn r12149) -Codechange: Merge 'ground_sprite' and 'ground_pal' of DrawTileSprites into one PalSpriteID 2008-02-15 18:40:42 +00:00
frosch fd0f57a794 (svn r12148) -Codechange: Merge 'image' and 'pal' of DrawTileSeqStruct into one PalSpriteID 2008-02-15 18:34:26 +00:00
frosch fe9891c8ec (svn r12028) -Codechange: Split common part of station var 0x67, house var 0x62, indtile var 0x60 and industry var 0x62 to 'newgrf_commons.cpp'. 2008-01-31 17:46:08 +00:00
rubidium 3ca95f2a85 (svn r11839) -Codechange: move some variables from variables.h to a more logical location. 2008-01-13 21:41:24 +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
belugas 0181678cde (svn r11804) -Fix(r11797,FS#1636): Industry tiles should receive the same medecine as indstries themselves regarding the resolver's object 2008-01-10 00:53:17 +00:00
rubidium b4b3190b62 (svn r11788) -Fix (11787): makedepend doesn't mark delete files as changed... 2008-01-09 09:57:48 +00:00
rubidium 38115acf5a (svn r11776) -Codechange: more header splittings to reduce the dependencies. 2008-01-07 14:02:26 +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 9ecda0a97a (svn r11651) -Codechange [FS#1555]: implement GRF parameter querying for industries and fix a 'bug' as side effect. 2007-12-16 23:10:30 +00:00
rubidium c3ea7e4dc4 (svn r11608) -Fix: do not trigger industries, but only the industry's tiles. 2007-12-09 18:27:40 +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 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
belugas f55fdfb7c4 (svn r11399) -Feature(ette): transparency settings can now be saved and thus remembered.
-Codechange: Wrap all transparency settings in accessors, hiding the implementation
-Change: Clicking "transparent building" menu will toggle Houses And Trees only.  The other options can be used in the transparency gui.
Initial patch by Smatz (FS#1349), with some rework by BigBB and your humble servant.
2007-11-10 01:17:15 +00:00
rubidium 91af1d6bca (svn r11375) -Fix [FS#1397]: the industry recolour map was always applied when recolouring was turned on, instead of only applying it when the colour translation is '0'. 2007-11-04 11:28:36 +00:00
rubidium e21b7634bf (svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka. 2007-10-17 20:09:16 +00:00
belugas c446c5ffb3 (svn r11241) -Fix: Obiwan error on industry animated tiles. Spotted and fixed by Csaboka 2007-10-10 00:42:52 +00:00
rubidium 9d8c8c200e (svn r11225) -Fix: if a sprite shares the bounding box of another sprite, the offset is unsigned instead of signed. 2007-10-07 15:26:20 +00:00
rubidium 531fe3e070 (svn r11193) -Fix: be more compliant with the specifications of callback #2F (and undocumented side effects in TTDP in corner cases). 2007-10-02 16:56:45 +00:00
rubidium a2256f6b0f (svn r11190) -Fix: make snowy roofs of (newgrf) houses also transparent. 2007-09-30 19:33:40 +00:00
rubidium c952f3d5ef (svn r11187) -Fix: what holds for houses in r11149 also holds for industries. 2007-09-30 15:37:24 +00:00
rubidium e61f197dba (svn r11158) -Codechange: reduce the amount of Random calls needed when we do not have NewGRF industries that actually need the random bits. 2007-09-24 20:56:33 +00:00
rubidium fc371ad994 (svn r11152) -Fix: GetIndustryIDAtOffset crashed when translation of the GFX ID would be needed. Fix by Belugas.
-Fix: GetIndustryIDAtOffset crashed when the industry->xy tile was not an industry tile.
2007-09-23 19:55:42 +00:00
rubidium 4dca543135 (svn r11151) -Codechange: add (partial) support for randomizing industry triggers (part of the backend for it). Furthermore update the documentation of the map's bits wrt to industries. 2007-09-23 19:27:35 +00:00
rubidium 60f1eb21fa (svn r11139) -Codechange: add support for persistent storage for NewGRFs. 2007-09-22 13:56:38 +00:00
rubidium c5cfb281ad (svn r11042) -Fix [FS#1196]: so newgrf callbacks returned slightly wrong heights (height of nothern corner instead of height of lowest corner). Patch by frosch. 2007-09-04 12:06:38 +00:00
belugas 1b329b1bd9 (svn r10904) -Fix: When using a temporary industry, make sure you do not clear some unreachable tiles upon its destruction.
-Codechange: do not perform something that by all means will not change. A zero offset is really meaningless...
2007-08-15 01:50:13 +00:00
rubidium d624f66c79 (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 02ab86631e (svn r10696) -Codechange: remove duplication of the "make sprite transparent" code. 2007-07-26 14:07:11 +00:00
rubidium 9e3ee0e689 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer. 2007-07-25 19:06:29 +00:00
rubidium 07a1d4379e (svn r10520) -Fix: when a "can I build this industry tile here" callback did not fail, it doesn't automatically mean that the industry tile can be built there. 2007-07-12 09:15:57 +00:00
rubidium 5f7f99e381 (svn r10515) -Codechange: allow getting some more data about the environment of an industry. 2007-07-11 23:10:22 +00:00
rubidium 57268fa7e3 (svn r10514) -Codechange: add support for getting the nearest industry with a given type. 2007-07-11 22:57:47 +00:00
rubidium 79d04412b0 (svn r10508) -Codechange: allow customizable animation schemes for industries. 2007-07-11 15:03:29 +00:00
rubidium 09eb6623ab (svn r10494) -Fix (r10490): possible null dereference in some exotic newgrfs. 2007-07-09 20:08:25 +00:00
rubidium 25511e0e26 (svn r10490) -Codechange: add support for industries on non-flat surfaces. 2007-07-09 18:53:43 +00:00
rubidium 6cf2aad165 (svn r10486) -Fix: do not draw foundations when the "should I draw foundations" callbacks says to do so. 2007-07-09 13:59:07 +00:00
belugas 2ad0d708cc (svn r10226) -Codechange: Add support for newindustry tiles drawing.
Heavily based on Maedhros's newhouses implementation
2007-06-19 17:33:12 +00:00
belugas 0b2b435c44 (svn r10172) -Fix(r10127): Wrong evaluation order on variable 0x41 for industry tile.
The industry's xy (northernmost tile) should be checked against the relative tile, not the other way around.
2007-06-17 01:01:15 +00:00
belugas 0b65070b36 (svn r10146) -Codechange: Silence a compiler warning
-Codechange: Comment style beautifying
-Codechange: define (tentatively) var 0x44 and 0x61 for industry tiles
2007-06-13 18:35:06 +00:00
belugas 30863358f9 (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished).
-Codechange: ResolverObject receives member gfx, making it compatible for both industries and industry tiles
-Codechange: NewIndustryResolver now has his randombits and triggers (even if not implemented)
2007-06-13 02:29:08 +00:00