alright so I've been modding android to learn it. Today I tried setting a function pointer. Im using the lgl menu. Heres my pointer:
here is my hook:
here is the hook for the update, yes its in the right place:
here is the case section:
I made the menu with a different function without using function pointers and it worked fine, as soon as I use pointers the menu fucks up and the game freezes, I even tried setting a pointer to the function I used when the menu worked, and it would freeze. idk if its the way I did it or if Its the pointers, but I need help
C++:
bool (*get_isMine)(void *instance) = (bool (*)(void *))getAbsoluteAddress(targetLibName, 0x914014);
bool test;
C++:
void (*old_Update)(void *instance);
void Update(void *instance) {
bool isMine = get_isMine(instance);
if (test) {
if (isMine == true){ //separated cuz on ios the game didnt work using if(test && isMine){
*(bool *) ((uint32_t) instance + 0xA9) = true;
}
}
return old_Update(instance);
}
C++:
HOOK("0x8463E1", Update, old_Update);
C++:
switch (featNum) {
case 0:
test = boolean;
break;
}
}
}