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 { class cocos2d::CCEGLViewProtocol {
CCEGLViewProtocol();
virtual ~CCEGLViewProtocol();
auto getViewPortRect() const = mac 0x29e2f0; auto getViewPortRect() const = mac 0x29e2f0;
auto getScaleX() const = mac 0x29e300; auto getScaleX() const = mac 0x29e300;
auto getScaleY() const = mac 0x29e310; auto getScaleY() const = mac 0x29e310;
virtual auto setDesignResolutionSize(float, float, ResolutionPolicy);
} }
class cocos2d::CCFadeOut { class cocos2d::CCFadeOut {

View file

@ -458,7 +458,7 @@ protected:
void setNextScene(void); void setNextScene(void);
void showStats(); void showStats();
void createStatsLabel(); RT_REMOVE(void createStatsLabel();)
void calculateMPF(); void calculateMPF();
void getFPSImageData(unsigned char** datapointer, unsigned int* length); 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. 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. 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__ #define CC_INCREMENT_GL_DRAWS(__n__) g_uNumberOfDraws += __n__
/*******************/ /*******************/

View file

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

View file

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

View file

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

View file

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

View file

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