fix codegen base classes not all being public + CCApplication members

This commit is contained in:
HJfod 2023-03-25 20:31:11 +02:00
parent 52c308e65d
commit 8c969a8628
4 changed files with 29 additions and 15 deletions

View file

@ -97,7 +97,10 @@ class AppDelegate : cocos2d::CCApplication, cocos2d::CCSceneDelegate {
void resumeSound() = win 0x3d4d0;
void setupGLView() = win 0x3c950;
PAD = win 0x4;
cocos2d::CCScene* m_runningScene;
bool m_loadingFinished;
// there's 0x18 more on Windows
}
class ArtistCell : TableViewCell {

View file

@ -168,7 +168,7 @@ std::string generateBindingHeader(Root& root, ghc::filesystem::path const& singl
}
std::string supers = str_if(
fmt::format(" : public {}", fmt::join(cls.superclasses, ", ")),
fmt::format(" : public {}", fmt::join(cls.superclasses, ", public ")),
!cls.superclasses.empty()
);

View file

@ -990,9 +990,9 @@ public:
GEODE_DLL void swapChildIndices(CCNode* first, CCNode* second);
template <class Filter, class... Args>
geode::EventListenerProtocol* addEventListener(typename Filter::Callback listener, Args&&... args) {
geode::EventListenerProtocol* addEventListener(typename Filter::Callback callback, Args&&... args) {
auto listener = new geode::EventListener<Filter>(
listener, Filter(this, std::forward<Args>(args)...)
callback, Filter(this, std::forward<Args>(args)...)
);
this->addEventListenerInternal(listener);
return listener;

View file

@ -42,14 +42,11 @@ public:
*/
virtual TargetPlatform getTargetPlatform();
RT_ADD(
virtual void openURL(const char* url);
virtual int run();
virtual void setupGLView();
virtual void platformShutdown();
void toggleVerticalSync(bool);
bool getVerticalSyncEnabled() const;
)
virtual void openURL(const char* url);
virtual int run();
virtual void setupGLView();
virtual void platformShutdown();
void toggleVerticalSync(bool);
/**
* Sets the Resource root path.
@ -65,8 +62,6 @@ public:
void setStartupScriptFilename(const gd::string& startupScriptFile);
bool getControllerConnected() const;
const gd::string& getStartupScriptFilename(void)
{
return m_startupScriptFilename;
@ -76,8 +71,24 @@ protected:
HINSTANCE m_hInstance;
HACCEL m_hAccelTable;
LARGE_INTEGER m_nAnimationInterval;
gd::string m_resourceRootPath;
gd::string m_startupScriptFilename;
PAD(4);
std::string m_resourceRootPath;
std::string m_startupScriptFilename;
void* m_pUnknown;
bool m_bUpdateController;
CC_SYNTHESIZE_NV(bool, m_bShutdownCalled, ShutdownCalled);
INPUT m_iInput;
CCPoint m_obUnknown1;
CCPoint m_obUnknown2;
bool m_bMouseControl;
float m_fOldAnimationInterval;
float m_fAnimationInterval;
CC_SYNTHESIZE_READONLY_NV(bool, m_bVerticalSyncEnabled, VerticalSyncEnabled);
CC_SYNTHESIZE_READONLY_NV(bool, m_bControllerConnected, ControllerConnected);
CC_SYNTHESIZE_NV(bool, m_bSleepMode, SleepMode);
CC_SYNTHESIZE_NV(bool, m_bForceTimer, ForceTimer);
CC_SYNTHESIZE_NV(bool, m_bSmoothFix, SmoothFix);
CC_SYNTHESIZE_NV(bool, m_bFullscreen, Fullscreen);
static CCApplication * sm_pSharedApplication;
};