MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / getCursorPosScaled

Function getCursorPosScaled

src/OpenLoco/src/Ui.cpp:398–407  ·  view source on GitHub ↗

0x00407FCD

Source from the content-addressed store, hash-verified

396
397 // 0x00407FCD
398 Point getCursorPosScaled()
399 {
400 auto unscaledPos = getCursorPos();
401
402 auto scale = Config::get().scaleFactor;
403
404 auto x = unscaledPos.x / scale;
405 auto y = unscaledPos.y / scale;
406 return { static_cast<int32_t>(std::round(x)), static_cast<int32_t>(std::round(y)) };
407 }
408
409 Point getCursorPos()
410 {

Callers 2

viewportZoomSetMethod · 0.85
edgeScrollFunction · 0.85

Calls 2

getCursorPosFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected