Action3/Canals

From GRFSpecs
< Action3
Revision as of 17:52, 27 August 2011 by Planetmaker (talk | contribs) (Action3 specific to canals/rivers)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Introduction

Action 3 assigns graphics sets (referenced to by (chains of) action 2(s) to feature IDs.

Format

The format of the data is feature-dependent, canals use specific ids which define the graphics being provided.

The data is:

 <Sprite-number> * <Length> 03 05 01 <id> 00 <set-ID>
Element Size Description
<Sprite-number> dec A sequential sprite number
<length> dec The total number of bytes used in this action
03 B Defines action 03
05 B Feature 05 "Canals"
01 B Canals and rivers can only provide one "ID" at a time
<id> B/B* IDs of the current feature this action 3 associates graphics with. There must be as many IDs as <n-id> specifies
00 B Canals support no cargo types
<set-ID> W Default set-ID to use if none of the above matches

Description

Sprite-number

This is just the number you are at.

Length

Count the number of bytes in this action.

Feature

This sets the type of feature that you wish to change, 05 for canals in this case

id

In the case of canals or rivers this differs by the type of sprites provided in the real sprite:

ID Description Sprites Sprites when prop. 09 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 Riverbanks 12*5 (Last 4 for slopes) undefined
07 River GUI 2 undefined

Watercliffs (00)

File:Riversprites 00.png

Dikes (Canals) (02)

Riversprites 02.png

River slopes (05)

Riversprites 05.png

Riverbanks (06)

File:Riversprites 06.png

set-ID

set-ID (or Action2 ID)

Example