Ares
|
Functions | |
DEFINE_HOOK (4AB44A, Actions_CustomCursor_NonShrouded, 9) | |
DEFINE_HOOK (4AB366, Actions_CustomCursor_Shrouded, 9) | |
DEFINE_HOOK (5BDC8C, Actions_PrepareCursor, 7) | |
DEFINE_HOOK (5BDD9F, Actions_SetCursor, 6) | |
DEFINE_HOOK (5BDADF, Actions_UseCursor, 0) | |
DEFINE_HOOK (5BDDC8, Actions_AnimateCursor, 6) | |
DEFINE_HOOK (5BDE64, Actions_AnimateCursor2, 6) | |
DEFINE_HOOK (4D7524, Actions_AllowForFootClass, 9) | |
DEFINE_HOOK (653CA6, Actions_AllowMinimap, 5) | |
DEFINE_HOOK (5BDDC0, Actions_Reset, 5) | |
DEFINE_HOOK (6929FC, DisplayClass_ChooseAction_CanSell, 7) | |
* | |
DEFINE_HOOK (4ABFBE, DisplayClass_LeftMouseButtonUp_ExecPowerToggle, 7) |
DEFINE_HOOK | ( | 4AB44A | , |
Actions_CustomCursor_NonShrouded | , | ||
9 | |||
) |
{ MouseCursor* pCursor = Actions::MPCustom; if(pCursor) { GET(MouseClass *, Mouse, ESI); //don't try this at home Mouse->QueryCursor((int)pCursor, R->Stack32(0x34)); return 0x4AB78F; } //overwrote the ja, need to replicate it unsigned int CursorIndex = R->EAX(); return (CursorIndex > 0x47) ? 0x4AB781 : 0x4AB453 ; }
DEFINE_HOOK | ( | 4ABFBE | , |
DisplayClass_LeftMouseButtonUp_ExecPowerToggle | , | ||
7 | |||
) |
{
GET(TechnoClass *, Target, ESI);
return (Target && Target->Owner->IsHumanoid() && Target->WhatAmI() == abs_Building)
? 0x4ABFCE
: 0x4AC294
;
}
DEFINE_HOOK | ( | 6929FC | , |
DisplayClass_ChooseAction_CanSell | , | ||
7 | |||
) |
*
* * *
{ GET(TechnoClass *, Target, ESI); switch(Target->WhatAmI()) { case abs_Aircraft: case abs_Unit: R->Stack<DWORD>(0x10, act_SellUnit); return 0x692B06; case abs_Building: R->Stack<DWORD>(0x10, Target->IsStrange() ? act_NoSell : act_Sell); return 0x692B06; default: return 0x692AFE; } }
DEFINE_HOOK | ( | 5BDDC0 | , |
Actions_Reset | , | ||
5 | |||
) |
{ Actions::MPCustom = NULL; return 0; }
DEFINE_HOOK | ( | 653CA6 | , |
Actions_AllowMinimap | , | ||
5 | |||
) |
{ MouseCursor* pCursor = Actions::MPCustom; if(pCursor) { if(pCursor->MiniFrame >= 0) { return 0x653CC0; } else { return 0x653CBA; } } else { unsigned int CursorIndex = R->EAX(); //overwrote the ja, need to replicate it if(CursorIndex > 0x47) { return 0x653CBA; } else { return 0x653CAB; } } }
DEFINE_HOOK | ( | 4D7524 | , |
Actions_AllowForFootClass | , | ||
9 | |||
) |
{ //overwrote the ja, need to replicate it unsigned int CursorIndex = R->EAX(); if(CursorIndex > 0x46) { if(CursorIndex == (SW_YES_CURSOR - 1) || CursorIndex == (SW_NO_CURSOR - 1)) { return 0x4D769F; } else { return 0x4D7CC0; } } else { return 0x4D752D; } }
DEFINE_HOOK | ( | 5BDE64 | , |
Actions_AnimateCursor2 | , | ||
6 | |||
) |
{ R->ECX(&Actions::MP); // TODO: MouseClass GET(byte *, pMouse, ESI); return (pMouse[0x555C]) ? 0x5BDE84 //minimap : 0x5BDE92 ; }
DEFINE_HOOK | ( | 5BDDC8 | , |
Actions_AnimateCursor | , | ||
6 | |||
) |
{ R->EBX(&Actions::MP); return (Actions::MP.Interval == 0) ? 0x5BDF13 //no animation : 0x5BDDED ; }
DEFINE_HOOK | ( | 5BDADF | , |
Actions_UseCursor | , | ||
0 | |||
) |
{ R->EBP(&Actions::MP); return R->DL() ? 0x5BDAEC : 0x5BDAFA ; }
DEFINE_HOOK | ( | 5BDD9F | , |
Actions_SetCursor | , | ||
6 | |||
) |
{ Actions::MPCurrent = Actions::TempCursor; //got set in Actions_UseCustomCursor Actions::MP = *Actions::MPCurrent; return 0; }
DEFINE_HOOK | ( | 5BDC8C | , |
Actions_PrepareCursor | , | ||
7 | |||
) |
{ MouseCursor* pCursor; unsigned int CursorIndex = R->EAX(); if(CursorIndex > 0x56) { //no idea why it's 0x56... //don't try this at home pCursor = (MouseCursor*)CursorIndex; } else { pCursor = MouseCursor::First + CursorIndex; } Actions::TempCursor = pCursor; //setting temp cursor for use in Actions_SetCursor! R->ESI(pCursor); R->ECX(pCursor->MiniFrame); return 0x5BDCA3; }
DEFINE_HOOK | ( | 4AB366 | , |
Actions_CustomCursor_Shrouded | , | ||
9 | |||
) |
{ MouseCursor* pCursor = Actions::MPCustom; if(pCursor) { if(Actions::MPCustomAllowShroud) { GET(GScreenClass *, Mouse, ESI); //don't try this at home Mouse->QueryCursor((int)pCursor, R->Stack32(0x34)); return 0x4AB78F; } else { return 0x4AB781; } } //overwrote the ja, need to replicate it unsigned int CursorIndex = R->EAX(); return (CursorIndex > 0x48) ? 0x4AB781 : 0x4AB36F ; }