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

Function updateCursorPosition

src/OpenLoco/src/Input/MouseInput.cpp:284–310  ·  view source on GitHub ↗

0x004C6E65

Source from the content-addressed store, hash-verified

282
283 // 0x004C6E65
284 void updateCursorPosition()
285 {
286 switch (Tutorial::state())
287 {
288 case Tutorial::State::none:
289 {
290 _cursor2 = _cursor;
291 break;
292 }
293
294 case Tutorial::State::playing:
295 {
296 _cursor2.x = Tutorial::nextInput();
297 _cursor2.y = Tutorial::nextInput();
298 Ui::setCursorPosScaled(_cursor2.x, _cursor2.y);
299 break;
300 }
301
302 case Tutorial::State::recording:
303 {
304 // Vanilla had tutorial recording here at 0x004C6EC3
305 // as tutorials are fixed mouse position there isn't much
306 // point implementing this code as per vanilla.
307 break;
308 }
309 }
310 }
311
312 StationId getHoveredStationId()
313 {

Callers 2

handleInputFunction · 0.85
minimalHandleInputFunction · 0.85

Calls 3

nextInputFunction · 0.85
setCursorPosScaledFunction · 0.85
stateFunction · 0.50

Tested by

no test coverage detected