Variable:sprites

From TTWiki
Revision as of 17:35, 7 December 2010 by Orudge (talk | contribs) (Reverted edits by Apedizivif (Talk) to last version by Repiv)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This is an array with variables about sprites

numdir = Amount of sprites used for the direction
field_1 = Amount of sprites used for the direction on slopes
field_2 = Number of movement frames
vehtype = Number of cargo loading frames
numunits = Number of cargo sprites = (number of cargo types)*(vehtype-1)+1 (?)
field_5 = Number of banking frames (only 1 and 3 valid; Vehicles with 3 are 25% faster in corners)
bogeypos = Half the length of the sprite/vehicle, that means: 2*value = distance between the preceding and the succeeding (coupled) vehicle (where size of one tile = 128).
flags[array] = See below
spritenum = always 0 for all vehicles

Flags Array

A number of flags for the sprites:

hassprites = If it has sprites
bit_1 = The vehicle is symmetrical (and has only half of the direction sprites set in numdirs).
bit_3 = The vehicle has sprites for normal slopes.
bit_4 = The vehicle has sprites for steep slopes.
reversed = The vehicle has brake lights.
bit_6 = Insted of a movement animation, individual frames are shown depending on the speed of the vehicle. This is used to make Jet- and Hydrofoil foilborne.