fix windows build + fix fields

This commit is contained in:
HJfod 2022-10-05 16:08:54 +03:00
parent b6b138953d
commit a262ad63d4
3 changed files with 6 additions and 3 deletions
codegen/src
loader/include/Geode/modify

View file

@ -93,8 +93,6 @@ namespace codegen {
if (fb->type == FunctionType::Normal) {
if (field.parent.rfind("fmod::", 0) == 0)
return BindStatus::Binded;
if (field.parent.rfind("cocos2d::", 0) == 0 && platform == Platform::Windows)
return BindStatus::Binded;
}
return BindStatus::Unbindable;

View file

@ -87,6 +87,11 @@ std::string generateGDSource(Root& root) {
if (codegen::getStatus(f) != BindStatus::Unbindable)
continue;
// no cocos2d definitions on windows
if (codegen::platform == Platform::Windows && f.parent.rfind("cocos2d::", 0) == 0) {
continue;
}
switch (fn->beginning.type) {
case FunctionType::Ctor:
case FunctionType::Dtor:

View file

@ -41,7 +41,7 @@ namespace geode::modifier {
class FieldIntermediate {
// Padding used for guaranteeing any member of parents
// will be in between sizeof(Intermediate) and sizeof(Parent)
std::max_align_t m_padding;
uintptr_t m_padding;
public:
static void fieldConstructor(void* offsetField) {
std::array<std::byte, sizeof(Parent)> parentContainer;