MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Mouse_Inputs_Check

Method Mouse_Inputs_Check

Source/Fodder.cpp:19461–19622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19459}
19460
19461void cFodder::Mouse_Inputs_Check() {
19462 int16 Data0 = 0;
19463 int16 Data4 = 0;
19464
19465 if (mMouseDisabled)
19466 return;
19467
19468 if (mPhase_In_Progress)
19469 Mouse_Cursor_Update();
19470
19471 if (dword_3A030) {
19472 // TODO: Function pointer call, but appears not to be used
19473 //dword_3A030();
19474 return;
19475 }
19476
19477 for (sGUI_Element* Loop_Element = mGUI_Elements;; ++Loop_Element) {
19478
19479 if (Loop_Element->field_0 == 0)
19480 break;
19481
19482 if ((*this.*Loop_Element->field_0)() < 0)
19483 return;
19484
19485 Data0 = mGUI_Mouse_Modifier_X + Loop_Element->mX;
19486
19487 int16 Data4 = mMouseX + 0x20;
19488
19489 if (Data0 > Data4)
19490 continue;
19491
19492 Data0 += Loop_Element->mWidth;
19493 if (Data0 < Data4)
19494 continue;
19495
19496 Data0 = mGUI_Mouse_Modifier_Y;
19497 Data0 += Loop_Element->mY;
19498 if (Data0 > mMouseY)
19499 continue;
19500
19501 Data0 += Loop_Element->mHeight;
19502 if (Data0 < mMouseY)
19503 continue;
19504
19505 (*this.*Loop_Element->mMouseInsideFuncPtr)();
19506 return;
19507 }
19508
19509 if (!mButtonPressRight)
19510 goto loc_30814;
19511
19512 if (mSquad_Selected < 0)
19513 return;
19514
19515 if (mMouseSpriteNew < 0) {
19516 mMouseSpriteNew = eSprite_pStuff_Mouse_Target;
19517 mMouseX_Offset = -8;
19518 mMouseY_Offset = -8;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected