MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ddio_MouseGetState

Function ddio_MouseGetState

ddio/lnxmouse.cpp:504–529  ·  view source on GitHub ↗

x, y = absolute mouse position dx, dy = mouse deltas since last call return value is mouse button mask */

Source from the content-addressed store, hash-verified

502 return value is mouse button mask
503*/
504int ddio_MouseGetState(int *x, int *y, int *dx, int *dy, int *z, int *dz) {
505 // update mouse timer.
506 int btn_mask = DDIO_mouse_state.btn_mask;
507
508 // get return values.
509 if (x)
510 *x = DDIO_mouse_state.x;
511 if (y)
512 *y = DDIO_mouse_state.y;
513 if (z)
514 *z = 0;
515 if (dx)
516 *dx = DDIO_mouse_state.dx;
517 if (dy)
518 *dy = DDIO_mouse_state.dy;
519 if (dz)
520 *dz = 0;
521
522 DDIO_mouse_state.dx = 0;
523 DDIO_mouse_state.dy = 0;
524
525 // unset the mouse wheel "button" once it's been retrieved.
526 DDIO_mouse_state.btn_mask &= ~(MOUSE_B5|MOUSE_B6);
527
528 return btn_mask;
529}
530
531// resets mouse queue and button info only.
532void ddio_MouseQueueFlush() {

Callers 11

OnIdleMethod · 0.85
MoveWorldFunction · 0.85
SelManager.cppFile · 0.85
DeferMethod · 0.85
ui_MousePollFunction · 0.85
mouse_getevalMethod · 0.85
mouse_getevalMethod · 0.85
PostLevelResultsFunction · 0.85
TelComHandleAllEventsFunction · 0.85
TCGoalsRenderCallbackFunction · 0.85
ShowStaticScreenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected