This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| functions:a_getcvarfixed [2017/03/13 16:46] – created korshun | functions:a_getcvarfixed [2017/06/16 10:25] (current) – korshun | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | # | + | ====== a_GetCVarFixed ====== |
| + | {{tag> | ||
| + | '' | ||
| + | |||
| + | <note important> | ||
| + | |||
| + | ===== Description ===== | ||
| + | Returns the value of an int or float CVar as a fixed-point number. | ||
| + | |||
| + | Returns 0 if the CVar doesn' | ||
| + | |||
| + | The function works by calling [[zdoom> | ||
| + | |||
| + | ===== Examples ===== | ||
| + | < | ||
| + | int mul = a_GetCVarFixed(" | ||
| + | int value = FixedMul(x, mul); | ||
| + | </ | ||
| + | |||
| + | From [[UpdateCursor]] source: | ||
| + | < | ||
| + | int sensitivity = a_GetCVarFixed(" | ||
| + | int speedX = FixedDiv(CursorSpeedX, | ||
| + | int speedY = FixedDiv(CursorSpeedY, | ||
| + | </ | ||
| + | |||
| + | ===== See also ===== | ||
| + | * [[GetUserCVarFixed]] | ||