Ares
|
Functions | |
DEFINE_HOOK (4A3B4B, FetchResource, 9) | |
DEFINE_HOOK (60411B, Game_DialogFunc_Subtext_Load, 5) | |
DEFINE_HOOK (604136, Game_DialogFunc_Subtext_Propagate, 5) |
DEFINE_HOOK | ( | 4A3B4B | , |
FetchResource | , | ||
9 | |||
) |
{ HMODULE hModule = (HMODULE)Ares::hInstance; //hModule and hInstance are technically the same... GET(LPCTSTR, lpName, ECX); GET(LPCTSTR, lpType, EDX); if(HRSRC hResInfo = FindResource(hModule, lpName, lpType)) { if(HGLOBAL hResData = LoadResource(hModule, hResInfo)) { LockResource(hResData); R->EAX(hResData); return 0x4A3B73; //Resource locked and loaded (omg what a pun), return! } } return 0; //Nothing was found, try the game's own resources. }
DEFINE_HOOK | ( | 604136 | , |
Game_DialogFunc_Subtext_Propagate | , | ||
5 | |||
) |
{ if(Dialogs::StatusString) { R->EAX(Dialogs::StatusString); return 0x60413B; } return 0; }
DEFINE_HOOK | ( | 60411B | , |
Game_DialogFunc_Subtext_Load | , | ||
5 | |||
) |
{ GET(int, DlgItemID, EAX); Dialogs::StatusString = NULL; if(DlgItemID == -1) { return 0x604120; } if(DlgItemID >= ARES_GUI_START) { switch(DlgItemID) { case ARES_CHK_RMG_URBAN_AREAS: Dialogs::StatusString = "STT:RMGUrbanAreas"; break; case ARES_CHK_MULTIENGINEER: Dialogs::StatusString = "STT:MultiEngineer"; break; default: Dialogs::StatusString = "GUI:Debug"; } return 0x604135; } return 0x604126; }