Definitions

From ZDoom Wiki

Jump to: navigation, search

Contents

Fixed point numbers

ZDoom commonly represents fixed point numbers as 32-bit integers with the integer part of the represented number stored in the top 16 bits, and with the fractional part (65536ths) stored the lower 16 bits.

In other words, the fixed point representation of a number = that number * 65536.

See Fixed point numbers for more information.

Byte Angles

This is a value between 0 and 255 representing a direction and is used with some line specials. Some useful values are:

96
Northwest
64
North
32
Northeast
128
West
  0
East
160
Southwest
192
South
224
Southeast

Fixed point angles

This angles are similar to above but the value lies between 0.0 and 1.0 and is represented as a fixed point number. This means the value lies between 0 and 65536, with 0 representing 0.0 and 65536 representing 1.0. It is therefore possible to represent these kind of angles like fractions (e.g. 0.5 is west, 0.25 is north), and use FixedMul and other commands on them.

Converting angles

To convert fixed point angles to byte angles, you can use the following formula:

byte_angle = fixed_point_angle >> 8 

And to convert byte to fixed point angles you use the opposite:

fixed_point_angle = byte_angle << 8

Sprite angles

See Sprite article

Units of time

Tic
A time interval of 1/35 second. There are 35 tics in one second.
Octic
A time interval of 1/8 second. There are 8 octics in one second. (This may not be the same as Hexen, since the Hexen specs weren't clear on this.)
Personal tools