Utilities¶
Here we document the helpers functions that are not part of any object.
They mostly help to deal with conversion of Doom’s engine types.
The declarations of all the enums can be found in the include/ViZDoomUtils.h
header file.
Time conversion functions¶
doomTicsToMs
¶
C++ |
|
---|---|
Python |
|
Calculates how many tics will be made during given number of milliseconds.
Note: changed in 1.1.0
msToDoomTics
¶
C++ |
|
---|---|
Python |
|
Calculates the number of milliseconds that will pass during specified number of tics.
Note: changed in 1.1.0
doomTicsToSec
¶
C++ |
|
---|---|
Python |
|
Calculates how many tics will be made during given number of seconds.
Note: added in 1.1.0
secToDoomTics
¶
C++ |
|
---|---|
Python |
|
Calculates the number of seconds that will pass during specified number of tics.
Note: added in 1.1.0
Doom fixed point conversion functions¶
doomFixedToDouble
¶
C++ |
|
---|---|
Python |
`doom_fixed_to_double(doom_fixed: int |
Converts fixed point numeral to a floating point value.
Doom engine internally use fixed point numbers.
If you assign fixed point numeral to USER1
- USER60
GameVariables,
you can convert them to floating point by using this function.
Python alias (added in 1.1.0): doom_fixed_to_float(doomFixed: int | float) -> float