SMOKREF.DAT

From UFOpaedia
Revision as of 21:23, 6 March 2007 by Sfnhltb (talk | contribs) (→‎General Information: slight rearrangement, link)
Jump to navigation Jump to search

SMOKEREF.DAT contains 400 records of 9 values of one byte each for a total of 3600 bytes.

There are a total of 12 sprites available for displaying smoke. Any given patch will animate through 4 consecutive sprites. The first sprite is (int)(smokeref[3] / 6 + 8) in SMOKE.PCK.

That is to say, if the smoke is due to last for less then six turns, smoke sprites 0 to 3 will be used. If the smoke is due to last less the twelve but more then five turns, sprites 1 to 4 will be used, and so forth.

This allows for nine different densities of displayable smoke. If the smoke is due to last fifty four or more turns, however, then rank badges will be included in the smoke animation. Values higher still will include bullet animations.

Structure

0: Y position of smoke/fire.

1: X position of smoke/fire.

2: Z position of smoke/fire.

3: Time smoke will last.

4: Time fire will last.

5: Un-used? Never seen it flag.

6: Fire or smoke?

0 Record unused
1 Fire
2 Smoke

7: Flags 1 sometimes. Smoke will not render if set to 0. Possibly something to do with smoke spreading around.

8: Animation frame offset. Set at random, to break tile pattern in cloud of smoke. Ranges from 0 to 3.

See Also