Sly 1:LM: Difference between revisions
Updated info and added navbox
TheOnlyZac (talk | contribs) (Created article for data structure) Tags: Mobile edit Mobile web edit |
TheOnlyZac (talk | contribs) (Updated info and added navbox) |
||
Line 1:
==
The LM struct is declared as follows:
<syntaxhighlight lang="c++">
Line 11:
</syntaxhighlight>
==
The most common way the game uses limits is clamping a value to fall within a certain range. The helper function <code>GLimitLm</code> exists for this purpose; it takes a pointer to
There are some limits that are so commonly used they are defined as global values in the game’s code. One example is <code>g_lmZeroOne</code> which defines a limit by the interval [0,1].
==
{{todo|Add more examples}}
* When updating the player’s <code>uSuck</code> in the function <code>ChangeSuck</code>, the new suck is clamped to the range allowed by the current [[difficulty]] level. For the easy and medium difficulties the limit is [0,1], but for the hard difficulty the limit is [0,0].
{{Navbox Sly 1}}
[[Category:Data structures]]
[[Category:Data structures in Sly 1]]
|