Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save atc1441/e0a84541e821681b3c0866b5f596ecbd to your computer and use it in GitHub Desktop.

Select an option

Save atc1441/e0a84541e821681b3c0866b5f596ecbd to your computer and use it in GitHub Desktop.
int __fastcall ShouldTheDisplayTurnOn(signed int a1, signed int a2, signed int a3)
{
signed int v3; // r5
signed int v4; // r6
signed int v5; // r7
int result; // r0
int v7; // r3
v3 = a1;
v4 = a2;
v5 = a3;
if ( GetCurrentHandsUpMode() && GetIfDisplayIsOn() && !WasDisplayAllreadyTurnedOnByMovement )
{
result = sub_2D45C(v3, v4, v5);
if ( result )
{
result = (unsigned __int8)WasDisplayAllreadyTurnedOnByMovement;
if ( !WasDisplayAllreadyTurnedOnByMovement )
{
sub_33D10(0, 0, (int)PrintTimeWhenMovementistDetected, v7);
result = 1;
WasDisplayAllreadyTurnedOnByMovement = 1;
}
}
}
else
{
result = GetIfDisplayIsOn();
if ( result )
{
result = 0;
WasDisplayAllreadyTurnedOnByMovement = 0;
}
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment