Difference between revisions of "Callback: Decide drawing default foundations"
From GRFSpecs
Jump to navigationJump to search (grf version 8) |
(use new grf templates) |
||
Line 23: | Line 23: | ||
{{ttdp|}} Please note that TTDPatch and OpenTTD up to 0.7 do not have suitable foundation graphics for steep slopes. In any way, variable 60 comes in handy when selecting the correct foundation to draw. |
{{ttdp|}} Please note that TTDPatch and OpenTTD up to 0.7 do not have suitable foundation graphics for steep slopes. In any way, variable 60 comes in handy when selecting the correct foundation to draw. |
||
− | {{ |
+ | {{grfTill|7}} Note that GRF versions 7 and lower only distinguished zero and non-zero return values. |
[[Category:Callbacks]] |
[[Category:Callbacks]] |
Latest revision as of 13:28, 1 April 2012
Decide drawing default foundations (30/14E/150)
This callback is called when TTD starts drawing the industry/house/airport tile on sloped land. It should return 0 to disable the default slope graphics and 1 to enable them.
If you chose to disable the foundation, you can draw your own by specifying
- no ground sprite, i.e. a sprite number 00 00 00 00,
- then a foundation sprite with bit 30 set to make foundations visible even in transparent mode, and the normal TTD foundation height of 7px,
- then the normal graphics with bounding boxes adjusted with regards to the foundation sprite:
100 * 4 01 09 02 01 // foundation 101 C:\ttdlx\newgrf\sprites\slope.pcx 220 130 09 40 63 -30 -9 // building 102 C:\ttdlx\newgrf\sprites\slope.pcx 80 130 09 31 64 -31 0 103 * 28 02 09 00 02 00 00 00 00 // no groundsprite 00 00 00 C0 00 00 00 10 10 07 // foundation 01 00 00 80 00 00 08 10 10 10 // building
Please note that TTDPatch and OpenTTD up to 0.7 do not have suitable foundation graphics for steep slopes. In any way, variable 60 comes in handy when selecting the correct foundation to draw.
GRFv≤7 Note that GRF versions 7 and lower only distinguished zero and non-zero return values.