Commit Graph

78 Commits

Author SHA1 Message Date
Peter Nelson 879f06540f
Feature: [NewGRF] Allow fixed layout up to 256 tiles per NewGRF rail station.
Allow using up to 256 tile layouts in property 0E or callback 24, which defines the layout to be saved into the map.

This was originally limited to 8, because station graphics above 8 referred to other station types but that was changed in 2007.

1) More efficient than using callback 14, as that needs to be checked every time a station tile is rendered.
2) The layout does not get changed when the station is changed (this may or may not be desirable!)

Using more than 256 layouts still requires callback 14.
2024-04-21 15:45:49 +01:00
Peter Nelson 6e98c5c26a
Codechange: Rename CBID_STATION_SPRITE_LAYOUT and CBID_STATION_TILE_LAYOUT.
These callbacks both select rail station tile layouts, the difference is one happens when drawing, the other happens when building. Change the names to make this clearer.
2024-04-21 14:53:19 +01:00
Peter Nelson ddd609ce9b
Feature: Randomize direction of rail vehicle on build based on probability callback. (#11489)
This allows NewGRF authors to indicate that the game should randomly flip rail vehicles on build, without needing to use random bits nor duplicate sprites to handle it themselves.

To use this functionality, test for callback 162 (CBID_VEHICLE_BUILD_PROBABILITY)  and var10 = 0 (values other than 0 are reserved for future use), and return a value between 0 and 100 inclusive.

The return value is a percentage chance of reversing the vehicle. A value of 0 will always build a forward facing vehicle, and 100 will always build a reverse facing vehicle.
2023-11-29 22:40:09 +00:00
Jonathan G Rennison 4c1406a4b5 Add: NewGRF road stops 2023-02-26 21:28:30 +01:00
Michael Lutz 05ed9f56fd Feature: [NewGRF] Engine name callback. 2023-01-30 22:00:56 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
frosch c30e137685 (svn r26747) -Feature: [NewGRF] Advanced visual effects with multiple effect sprites independent of spawning model. 2014-08-17 14:53:11 +00:00
frosch 16b310d8ce (svn r24186) -Feature: [NewGRF] Callback to set industry production level on construction. (andythenorth) 2012-04-28 16:44:01 +00:00
rubidium fd559171b4 (svn r23527) -Codechange: unify colo(u)r as far as it goes 2011-12-15 22:02:00 +00:00
rubidium 3d88c74389 (svn r23526) -Codechange: unify cargos vs cargoes 2011-12-15 21:56:00 +00:00
frosch b98c7763de (svn r23146) -Change: [NewGRF v8] Make callback 22 return a probability to use instead of property 18. 2011-11-08 17:26:13 +00:00
frosch f97fa89f1a (svn r23137) -Change: [NewGRF v8] New result format for callback 16. 2011-11-08 17:22:49 +00:00
michi_cc 707b0f48e6 (svn r23114) -Feature: [NewGRF] Ambient sound effect callback. 2011-11-04 21:05:08 +00:00
michi_cc b9841bba81 (svn r23086) -Feature: [NewGRF] Callback to change refit cost depending on old and new cargo type. 2011-11-04 00:35:05 +00:00
michi_cc e094d7db62 (svn r23072) -Feature: [NewGRF] House callback 0x148. 2011-10-31 22:31:40 +00:00
michi_cc d579af11e8 (svn r22659) -Add: [NewGRF] Support for the land slope check callback for stations. 2011-07-11 16:32:35 +00:00
terkhen 4d7a413eda (svn r22591) -Doc: Callback 0x18 (AI purchase selection) is implemented for stations. 2011-06-15 18:52:21 +00:00
rubidium 61ff042460 (svn r21238) -Feature: [NewGRF] Support callback 0x10 for RVs and ships (Hirundo) 2010-11-18 14:17:55 +00:00
rubidium 5a503d505b (svn r21231) -Codechange: Generalize the naming of some settings and variables related to visual effects (Hirundo) 2010-11-18 14:01:20 +00:00
rubidium 7b16c7650b (svn r20670) -Add: support for action F
-Add: a window to select (NewGRF) objects
2010-08-28 19:43:41 +00:00
rubidium 3e67b4fe5f (svn r20667) -Codechange: implement the autoslope callback for objects 2010-08-28 19:00:21 +00:00
rubidium ca7fe458a2 (svn r20664) -Codechange: implement the land slope callback for objects 2010-08-28 18:55:20 +00:00
rubidium 60fe27db50 (svn r20662) -Codechange: implement object animation 2010-08-28 18:51:47 +00:00
rubidium ee8c37c3d9 (svn r20661) -Codechange: implement the "decide colour" callback for objects 2010-08-28 18:50:32 +00:00
rubidium 34da98f2b1 (svn r20647) -Codechange: update some of the object spec information 2010-08-28 17:29:12 +00:00
yexo 00902294b3 (svn r20373) -Feature: [NewGRF] callback 0x156 to use another name for airport layouts than the default "Layout x" 2010-08-05 12:05:56 +00:00
yexo d6fa76b044 (svn r20372) -Feature; [NewGRF] callback 0x155 to display extra information about an airport in the build gui 2010-08-05 12:05:15 +00:00
michi_cc fff8524fb9 (svn r20355) -Fix (r20353): Stale comment. 2010-08-03 18:29:26 +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
rubidium 398418b8fa (svn r19812) -Codechange: give some unnamed enums a name or, in case they consisted of unrelated values use static const (u)int 2010-05-13 09:44:44 +00:00
rubidium bc925c0016 (svn r19565) -Fix: some NewGRF callbacks were named incorrectly 2010-04-05 21:01:02 +00:00
yexo 7ca4c31cf5 (svn r19197) -Codechange: introduce animation callbacks for airport tiles 2010-02-22 14:16:57 +00:00
yexo 880fedc192 (svn r19195) -Codechange: actually draw newgrf airport tiles 2010-02-22 14:16:41 +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 962598451b (svn r17553) -Update: some documentation about the callbacks 2009-09-16 10:10:12 +00:00
rubidium 23252c99bb (svn r17547) -Feature: [NewGRF] Implement callback 145 (custom station rating) 2009-09-15 17:24:18 +00:00
rubidium 64bafcbe18 (svn r17534) -Codechange: unify the naming of callback masks/flags 2009-09-14 12:22:57 +00:00
rubidium 50e424ba24 (svn r17518) -Document: some of the callback 'masks' 2009-09-13 07:48:47 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +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
peter1138 43121fc2cb (svn r15280) -Cleanup: ancient and vastly out of date comment... 2009-01-26 23:41:45 +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
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 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
frosch 173ac52da5 (svn r12820) -Documentation: Mark callbacks as 8 or 15 bit in 'newgrf_callbacks.h'. 2008-04-21 17:04:17 +00:00
peter1138 210d757499 (svn r12798) -Feature: Add some support for NewGRF station animation. (Thanks to mart3p for samples and fixes) 2008-04-19 23:19:12 +00:00
glx 226e48cf83 (svn r12455) -Codechange: Implement NewGRF callback 37 (cargo sub-type display for industries) 2008-03-28 02:30:10 +00:00
frosch 51bbf0c84f (svn r12352) -Fix: Some callback-results were treated as 8 bit, when they were 15 bit, and vice versa.
Var 0x7E procedure-results are always 15 bit.
  Callbacks 0x2A, 0x2C, 0x36 (sometimes), 0x39 and 0x145 are 15 bit.
  Non-varaction2-calculated callback-results are also affected by the 8bit masking.
2008-03-10 15:31:07 +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