Merge pull request #185 from cgytrus/cocos-stuff

Add some more cocos stuff
This commit is contained in:
mat 2023-06-07 16:30:23 -03:00 committed by GitHub
commit d071e75f95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 6 deletions

View file

@ -236,9 +236,12 @@ class cocos2d::CCEGLView {
}
class cocos2d::CCEGLViewProtocol {
CCEGLViewProtocol();
virtual ~CCEGLViewProtocol();
auto getViewPortRect() const = mac 0x29e2f0;
auto getScaleX() const = mac 0x29e300;
auto getScaleY() const = mac 0x29e310;
virtual auto setDesignResolutionSize(float, float, ResolutionPolicy);
}
class cocos2d::CCFadeOut {

View file

@ -458,7 +458,7 @@ protected:
void setNextScene(void);
void showStats();
void createStatsLabel();
RT_REMOVE(void createStatsLabel();)
void calculateMPF();
void getFPSImageData(unsigned char** datapointer, unsigned int* length);

View file

@ -245,7 +245,7 @@ It should work same as apples CFSwapInt32LittleToHost(..)
Increments the GL Draws counts by one.
The number of calls per frame are displayed on the screen when the CCDirector's stats are enabled.
*/
extern unsigned int CC_DLL g_uNumberOfDraws;
extern unsigned int ACTUAL_CC_DLL g_uNumberOfDraws;
#define CC_INCREMENT_GL_DRAWS(__n__) g_uNumberOfDraws += __n__
/*******************/

View file

@ -49,6 +49,7 @@ public:
* @lua NA
*/
CCEGLViewProtocol();
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCEGLViewProtocol)
/**
* @lua NA
*/
@ -57,22 +58,22 @@ public:
/** Force destroying EGL view, subclass must implement this method.
* @lua NA
*/
virtual void end() = 0;
virtual void end() {}
/** Get whether opengl render system is ready, subclass must implement this method.
* @lua NA
*/
virtual bool isOpenGLReady() = 0;
virtual bool isOpenGLReady() { return false; }
/** Exchanges the front and back buffers, subclass must implement this method.
* @lua NA
*/
virtual void swapBuffers() = 0;
virtual void swapBuffers() {}
/** Open or close IME keyboard , subclass must implement this method.
* @lua NA
*/
virtual void setIMEKeyboardState(bool bOpen) = 0;
virtual void setIMEKeyboardState(bool bOpen) {}
/**
* Get the frame size of EGL view.

View file

@ -8,6 +8,7 @@
#else
#define CC_DLL
#endif
#define ACTUAL_CC_DLL CC_DLL
#define CC_NO_MESSAGE_PSEUDOASSERT(cond) \
if (!(cond)) { \

View file

@ -8,6 +8,7 @@
#else
#define CC_DLL
#endif
#define ACTUAL_CC_DLL CC_DLL
#define CC_ASSERT(cond) assert(cond)

View file

@ -8,6 +8,7 @@
#else
#define CC_DLL
#endif
#define ACTUAL_CC_DLL CC_DLL
#if CC_DISABLE_ASSERT > 0

View file

@ -9,8 +9,10 @@
#if defined(_USRDLL)
#define CC_DLL
#define ACTUAL_CC_DLL
#else // use a DLL library
#define CC_DLL
#define ACTUAL_CC_DLL __declspec(dllimport)
#endif
#include <assert.h>