Difference between revisions of "Action0/Canals"

From GRFSpecs
Jump to navigationJump to search
m (8 revisions)
(fix tables and stuff lost in conversion)
Line 1: Line 1:
  +
=Introduction=
 
'''''Action 0 - Properties for canals / rivers'''''
 
 
=Action 0 - Properties for canals / rivers=
 
   
 
Defining properties of canals / rivers.
 
Defining properties of canals / rivers.
   
{maketoc}
 
   
-=Properties=-
+
==Properties==
   
  +
{| |-
||Number|Version|Size|Description
+
!Number!!Version!!Size!!Description
 
  +
|-
08|a|B|Canals / Rivers Callback flags, see below|
+
|08||a||B||Canals / Rivers Callback flags, see below||
 
  +
|-
09|b|B|Canals / Rivers Graphic flags||
+
|09||b||B||Canals / Rivers Graphic flags
  +
|}
   
 
(a) 2.6 r1560, OpenTTD r20353
 
(a) 2.6 r1560, OpenTTD r20353
Line 20: Line 18:
 
(b) 2.6 r1573, OpenTTD r20352
 
(b) 2.6 r1573, OpenTTD r20352
   
  +
==Descriptions==
-=Comments=-
 
   
==Canals callback (08)==
+
===Canals callback (08)===
  +
|-
 
|For canals and rivers, the following [[Callbacks|callbacks]] can be defined by setting the corresponding bit in property 08:
   
  +
{| |-
For canals and rivers, the following [[Callbacks|callbacks]] can be defined by setting the corresponding bit in property 08:
 
 
!Bit!!Value!!Variable 0C value!!Callback
  +
|-
 
|0||1||0x147||Enable add sprite offset callback*
  +
|}
   
 
<nowiki>*</nowiki> Please note that not all feature ids support this callback
||Bit|Value|Variable 0C value|Callback
 
   
 
===Graphic flags (09)===
0|1|0x147|Enable add sprite offset callback*||
 
 
<nowiki><nowiki>*</nowiki></nowiki> Please note that not all feature ids support this callback
 
 
==Graphic flags (09)==
 
   
 
For canals and rivers, describes the provided format and features in the sprite block
 
For canals and rivers, describes the provided format and features in the sprite block
Line 38: Line 38:
 
If bit 0 of graphic flags is enabled, the way Sprites and the count of sprites will change.
 
If bit 0 of graphic flags is enabled, the way Sprites and the count of sprites will change.
   
  +
{| |-
||'''ID'''|'''Description'''|'''Sprites'''|'''Sprites when Bit 0 is set'''
+
!'''ID'''!!'''Description'''!!'''Sprites'''!!'''Sprites when Bit 0 is set'''
 
  +
|-
00|Watercliffs|4 slope sprites|1 flat ground sprite followed by 4 slope sprites
+
|00||Watercliffs||4 slope sprites||1 flat ground sprite followed by 4 slope sprites
 
  +
|-
01|Locks|24|undefined
+
|01||Locks||24||undefined
 
  +
|-
02|Dikes|12|undefined
+
|02||Dikes||12||undefined
 
  +
|-
03|Icons|1|undefined
+
|03||Icons||1||undefined
 
  +
|-
04|Flat docks|4|undefined
+
|04||Flat docks||4||undefined
 
  +
|-
05|River Slope|4|1 flat ground sprite followed by 4 slope sprites
+
|05||River Slope||4||1 flat ground sprite followed by 4 slope sprites
 
  +
|-
06|River waterside|12*5 (Last 4 for slopes)|undefined
+
|06||River waterside||12*5 (Last 4 for slopes)||undefined
 
  +
|-
07|River GUI|2|undefined||
+
|07||River GUI||2||undefined
 
  +
|}
<span style='color:#FF0000'>It's not allowed to set bit 0 for undefined entries!</span>
 

Revision as of 21:03, 13 June 2011

Introduction

Defining properties of canals / rivers.


Properties

Number Version Size Description
08 a B Canals / Rivers Callback flags, see below
09 b B Canals / Rivers Graphic flags

(a) 2.6 r1560, OpenTTD r20353

(b) 2.6 r1573, OpenTTD r20352

Descriptions

Canals callback (08)

|- |For canals and rivers, the following callbacks can be defined by setting the corresponding bit in property 08:

Bit Value Variable 0C value Callback
0 1 0x147 Enable add sprite offset callback*

* Please note that not all feature ids support this callback

Graphic flags (09)

For canals and rivers, describes the provided format and features in the sprite block

If bit 0 of graphic flags is enabled, the way Sprites and the count of sprites will change.

ID Description Sprites Sprites when Bit 0 is set
00 Watercliffs 4 slope sprites 1 flat ground sprite followed by 4 slope sprites
01 Locks 24 undefined
02 Dikes 12 undefined
03 Icons 1 undefined
04 Flat docks 4 undefined
05 River Slope 4 1 flat ground sprite followed by 4 slope sprites
06 River waterside 12*5 (Last 4 for slopes) undefined
07 River GUI 2 undefined