fix hooking callback functions

This commit is contained in:
HJfod 2023-03-20 19:08:42 +02:00
parent d7f8a0248a
commit 94138f32ad
2 changed files with 3 additions and 3 deletions

View file

@ -3692,7 +3692,7 @@ class LevelEditorLayer : GJBaseGameLayer, LevelSettingsDelegate {
}
void updateOptions() = mac 0x91ed0, win 0x15fcc0;
void updateToggledGroups() = mac 0x9bb10;
void updateVisibility(float) = mac 0x92c70, win 0x1632b0;
callback void updateVisibility(float delta) = mac 0x92c70, win 0x1632b0;
void groupStickyObjects(cocos2d::CCArray* objects) = mac 0x99dd0, win 0x164860;
void ungroupStickyObjects(cocos2d::CCArray* objects) = mac 0x99ee0, win 0x164950;

View file

@ -184,7 +184,7 @@ namespace codegen {
if (status == BindStatus::Binded) return "tulip::hook::CdeclConvention";
else return "tulip::hook::OptcallConvention";
}
else if (fn->is_virtual) {
else if (fn->is_virtual || fn->is_callback) {
return "tulip::hook::ThiscallConvention";
}
else {
@ -205,7 +205,7 @@ namespace codegen {
if (status == BindStatus::Binded) return "Cdecl";
else return "Optcall";
}
else if (fn->is_virtual) {
else if (fn->is_virtual || fn->is_callback) {
return "Thiscall";
}
else {