ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:a_getcvarfixed

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
functions:a_getcvarfixed [2017/04/15 17:18] korshunfunctions:a_getcvarfixed [2017/06/16 13:25] (current) korshun
Line 3: Line 3:
 ''fixed a_GetCVarFixed(str name)'' ''fixed a_GetCVarFixed(str name)''
  
-<note important>The function is called ''a_GetCVarFixed()'' because it conflicts with [[:GDCC]]'s unrelated ''GetCVarFixed()''.</note>+<note important>This function is called ''a_GetCVarFixed()'' because it conflicts with [[:GDCC]]'s unrelated ''GetCVarFixed()''.</note>
  
 ===== Description ===== ===== Description =====
Line 16: Line 16:
 int mul = a_GetCVarFixed("mymod_multiplier"); // declared as float in CVARINFO int mul = a_GetCVarFixed("mymod_multiplier"); // declared as float in CVARINFO
 int value = FixedMul(x, mul); int value = FixedMul(x, mul);
 +</code>
 +
 +From [[UpdateCursor]] source:
 +<code>
 +int sensitivity = a_GetCVarFixed("mouse_sensitivity");
 +int speedX = FixedDiv(CursorSpeedX, FixedMul(a_GetCVarFixed("m_yaw"), sensitivity));
 +int speedY = FixedDiv(CursorSpeedY, FixedMul(a_GetCVarFixed("m_pitch"), sensitivity));
 </code> </code>
  
 ===== See also ===== ===== See also =====
   * [[GetUserCVarFixed]]   * [[GetUserCVarFixed]]
functions/a_getcvarfixed.1492265894.txt.gz · Last modified: 2017/04/15 17:18 by korshun