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

Method pool

SourceX/controls/plrctrls.cpp:850–861  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

848
849struct RightStickAccumulator {
850 void pool(int *x, int *y, int slowdown)
851 {
852 DWORD tc = SDL_GetTicks();
853 hiresDX += rightStickX * (tc - lastTc);
854 hiresDY += rightStickY * (tc - lastTc);
855 *x += hiresDX / slowdown;
856 *y += -hiresDY / slowdown;
857 lastTc = tc;
858 // keep track of remainder for sub-pixel motion
859 hiresDX %= slowdown;
860 hiresDY %= slowdown;
861 }
862
863 void clear()
864 {

Callers 1

HandleRightStickMotionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected