MCPcopy Create free account
hub / github.com/diasurgical/devilution / gmenu_slider_get

Function gmenu_slider_get

Source/gmenu.cpp:392–401  ·  view source on GitHub ↗

* @brief Get the current value for the slider */

Source from the content-addressed store, hash-verified

390 * @brief Get the current value for the slider
391 */
392int gmenu_slider_get(TMenuItem *pItem, int min, int max)
393{
394 int nSteps, step;
395
396 step = pItem->dwFlags & 0xFFF;
397 nSteps = (int)(pItem->dwFlags & 0xFFF000) >> 12;
398 if (nSteps < 2)
399 nSteps = 2;
400 return min + (step * (max - min) + (nSteps - 1) / 2) / nSteps;
401}
402
403/**
404 * @brief Set the number of steps for the slider

Callers 2

gamemenu_slider_gammaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected