fix cocos ccs for windows

This commit is contained in:
altalk23 2022-03-04 00:02:33 +03:00
parent 5724284e61
commit f4b65e19d7
3 changed files with 10 additions and 3 deletions

2
bin

@ -1 +1 @@
Subproject commit 47afa9c346d0513acbe76d10a11e5bf790aa557d
Subproject commit fa7935ecdf58e388e58ad6031db5ffb02050610b

View file

@ -16,13 +16,13 @@
// #define CLASSPARAM(type, getter, offset) \
// [[deprecated]] \
// inline type& __##getter() { \
// inline type& _##getter() { \
// return *((type*)((uintptr_t)this + offset)); \
// }
// #define STRUCTPARAM(type, getter, offset) \
// [[deprecated]] \
// inline type __##getter() { \
// inline type _##getter() { \
// return *(type*)((uintptr_t)this+offset); \
// }

View file

@ -44,6 +44,10 @@ struct CacShare {
return parseTokens(lexStream(s));
}
static bool isCocos(Function const& f) {
return f.parent_class->name.rfind("cocos2d", 0) != 0;
}
static string getAddress(Function const& f) {
switch (CacShare::platform) {
case kMac:
@ -228,11 +232,14 @@ struct CacShare {
case kConstructor: [[fallthrough]];
case kDestructor: [[fallthrough]];
case kRegularFunction:
if (isCocos(f)) return "Thiscall";
if (f.args.size() == 0) return "Thiscall";
return "Membercall";
case kVirtualFunction:
if (isCocos(f)) return "Thiscall";
return "Thiscall";
case kStaticFunction:
if (isCocos(f)) return "Cdecl";
if (f.args.size() == 0) return "Cdecl";
return "Optcall";
}