geode/loader/include/Geode/cocos/platform/android/CCApplication.h
qimiko 041a98ee4d
implement loader for android
compilation still won't work, pending implementations for gdstl/codegen/tuliphook. the first two should be mostly done already. may also be good to get FileWatcher, crashlog, and the file picker implemented but they aren't necessary

the libcurl.a and libssl.a files were built using
https://github.com/ibaoger/libcurl-android. they are placed in the link/android folder because putting them in the link folder confused the macOS build.

once built, the geode binary should be loaded after nativeSetApkPath is ran (otherwise the directory setup crashes). in the future it would be nice if the internal mod also did save data path redirection, as base GD is incapable of doing this

Co-authored-by: mat <26722564+matcool@users.noreply.github.com>
2023-06-05 17:42:22 -07:00

57 lines
1.3 KiB
C++
Vendored

#ifndef __CC_APPLICATION_ANDROID_H__
#define __CC_APPLICATION_ANDROID_H__
#include "../CCCommon.h"
#include "../CCApplicationProtocol.h"
NS_CC_BEGIN
class CCRect;
class CC_DLL CCApplication : public CCApplicationProtocol
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCApplication)
CCApplication();
virtual ~CCApplication();
/**
@brief Callback by CCDirector to limit FPS.
@interval The time, expressed in seconds, between current frame and next.
*/
virtual void setAnimationInterval(double interval) override;
/**
@brief Run the message loop.
*/
int run();
/**
@brief Get current application instance.
@return Current application instance pointer.
*/
static CCApplication* sharedApplication();
static GEODE_DLL CCApplication* get();
/**
@brief Get current language config
@return Current language config
*/
virtual ccLanguageType getCurrentLanguage() override;
/**
@brief Get target platform
*/
virtual TargetPlatform getTargetPlatform() override;
virtual void openURL(char const* url) override;
protected:
static CCApplication * sm_pSharedApplication;
};
NS_CC_END
#endif // __CC_APPLICATION_ANDROID_H__