mirror of https://github.com/axmolengine/axmol.git
issue #116
This commit is contained in:
parent
28d54ab45a
commit
6a4af3bcfd
|
@ -50,7 +50,8 @@ THE SOFTWARE.
|
|||
|
||||
using namespace std;
|
||||
using namespace cocos2d;
|
||||
namespace cocos2d {
|
||||
namespace cocos2d
|
||||
{
|
||||
|
||||
// singleton stuff
|
||||
static CCDisplayLinkDirector s_sharedDirector;
|
||||
|
@ -799,4 +800,5 @@ void CCDisplayLinkDirector::setAnimationInterval(double dValue)
|
|||
startAnimation();
|
||||
}
|
||||
}
|
||||
}//namespace cocos2d
|
||||
|
||||
} //namespace cocos2d
|
||||
|
|
|
@ -45,7 +45,7 @@ CCCamera::~CCCamera(void)
|
|||
char * CCCamera::description(void)
|
||||
{
|
||||
char *ret = new char[100];
|
||||
sprintf_s(ret, 100, "<CCCamera | center = (%.2f,%.2f,%.2f)>", m_fCenterX, m_fCenterY, m_fCenterZ);
|
||||
sprintf(ret, "<CCCamera | center = (%.2f,%.2f,%.2f)>", m_fCenterX, m_fCenterY, m_fCenterZ);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -182,4 +182,4 @@ namespace cocos2d{
|
|||
|
||||
}// namespace cocos2d
|
||||
|
||||
#endif //__CCBITMAP_FONT_ATLAS_H__
|
||||
#endif //__CCBITMAP_FONT_ATLAS_H__
|
||||
|
|
|
@ -571,7 +571,7 @@ protected:
|
|||
CCFiniteTimeAction *m_pOther;
|
||||
};
|
||||
|
||||
class CCX_DLL CCTexture2D;
|
||||
class CCTexture2D;
|
||||
/** Animates a sprite given the name of an Animation */
|
||||
class CCX_DLL CCAnimate : public CCIntervalAction
|
||||
{
|
||||
|
|
|
@ -66,4 +66,4 @@ namespace cocos2d{
|
|||
};
|
||||
}// namespace cocos2d
|
||||
|
||||
#endif //__CCLABEL_ATLAS_H__
|
||||
#endif //__CCLABEL_ATLAS_H__
|
||||
|
|
|
@ -64,4 +64,4 @@ public:
|
|||
|
||||
}
|
||||
|
||||
#endif //__AUTORELEASEPOOL_H__
|
||||
#endif //__AUTORELEASEPOOL_H__
|
||||
|
|
|
@ -28,6 +28,7 @@ THE SOFTWARE.
|
|||
#include "NSObject.h"
|
||||
#include <vector>
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
|
@ -54,7 +55,7 @@ public:
|
|||
unsigned int count(void)
|
||||
{
|
||||
unsigned int uCount = 0;
|
||||
NSObjectArray::iterator it;
|
||||
NSMutableArrayIterator it;
|
||||
for (it = m_array.begin(); it != m_array.end(); ++it)
|
||||
{
|
||||
if (*it == NULL)
|
||||
|
@ -249,7 +250,7 @@ public:
|
|||
{
|
||||
if(pDeleteArray && pDeleteArray->count())
|
||||
{
|
||||
NSObjectArray::iterator it;
|
||||
NSMutableArrayIterator it;
|
||||
for( it = pDeleteArray->m_array.begin(); it != pDeleteArray->m_array.end(); it++)
|
||||
{
|
||||
removeObject(*it);
|
||||
|
|
|
@ -151,25 +151,25 @@ default gl blend src function. Compatible with premultiplied alpha images.
|
|||
|
||||
//---- todo: replace with uphone window
|
||||
|
||||
/*
|
||||
#define CC_DIRECTOR_INIT() \
|
||||
do { \
|
||||
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; \
|
||||
if( ! [CCDirector setDirectorType:kCCDirectorTypeDisplayLink] ) \
|
||||
[CCDirector setDirectorType:kCCDirectorTypeNSTimer]; \
|
||||
CCDirector *__director = [CCDirector sharedDirector]; \
|
||||
[__director setDeviceOrientation:kCCDeviceOrientationPortrait]; \
|
||||
[__director setDisplayFPS:NO]; \
|
||||
[__director setAnimationInterval:1.0/60]; \
|
||||
EAGLView *__glView = [EAGLView viewWithFrame:[window bounds] \
|
||||
pixelFormat:kEAGLColorFormatRGB565 \
|
||||
depthFormat:0 /* GL_DEPTH_COMPONENT24_OES \
|
||||
preserveBackbuffer:NO]; \
|
||||
[__director setOpenGLView:__glView]; \
|
||||
[window addSubview:__glView]; \
|
||||
[window makeKeyAndVisible]; \
|
||||
} while(0)
|
||||
*/
|
||||
|
||||
// #define CC_DIRECTOR_INIT() \
|
||||
// do { \
|
||||
// window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; \
|
||||
// if( ! [CCDirector setDirectorType:kCCDirectorTypeDisplayLink] ) \
|
||||
// [CCDirector setDirectorType:kCCDirectorTypeNSTimer]; \
|
||||
// CCDirector *__director = [CCDirector sharedDirector]; \
|
||||
// [__director setDeviceOrientation:kCCDeviceOrientationPortrait]; \
|
||||
// [__director setDisplayFPS:NO]; \
|
||||
// [__director setAnimationInterval:1.0/60]; \
|
||||
// EAGLView *__glView = [EAGLView viewWithFrame:[window bounds] \
|
||||
// pixelFormat:kEAGLColorFormatRGB565 \
|
||||
// depthFormat:0 GL_DEPTH_COMPONENT24_OES \
|
||||
// preserveBackbuffer:NO]; \
|
||||
// [__director setOpenGLView:__glView]; \
|
||||
// [window addSubview:__glView]; \
|
||||
// [window makeKeyAndVisible]; \
|
||||
// } while(0)
|
||||
|
||||
|
||||
/** @def CC_DIRECTOR_END
|
||||
Stops and removes the director from memory.
|
||||
|
@ -180,15 +180,15 @@ do { \
|
|||
|
||||
//---- todo: replace with uphone window
|
||||
|
||||
/*
|
||||
#define CC_DIRECTOR_END() \
|
||||
do { \
|
||||
CCDirector *__director = [CCDirector sharedDirector]; \
|
||||
EAGLView *__view = [__director openGLView]; \
|
||||
[__view removeFromSuperview]; \
|
||||
[__director end]; \
|
||||
} while(0)
|
||||
*/
|
||||
|
||||
// #define CC_DIRECTOR_END() \
|
||||
// do { \
|
||||
// CCDirector *__director = [CCDirector sharedDirector]; \
|
||||
// EAGLView *__view = [__director openGLView]; \
|
||||
// [__view removeFromSuperview]; \
|
||||
// [__director end]; \
|
||||
// } while(0)
|
||||
|
||||
|
||||
#ifndef FLT_EPSILON
|
||||
#define FLT_EPSILON 1.192092896e-07F
|
||||
|
|
|
@ -103,7 +103,7 @@ static inline void ccArrayEnsureExtraCapacity(ccArray *arr, unsigned int extra)
|
|||
}
|
||||
|
||||
/** Returns index of first occurence of object, UXNotFound if object not found. */
|
||||
static inline unsigned int ccArrayGetIndexOfObject(ccArray *arr, NSObject* object)
|
||||
static inline int ccArrayGetIndexOfObject(ccArray *arr, NSObject* object)
|
||||
{
|
||||
for ( unsigned int i = 0; i < arr->num; i++)
|
||||
{
|
||||
|
@ -284,7 +284,7 @@ static inline void ccCArrayEnsureExtraCapacity(ccCArray *arr, unsigned int extra
|
|||
}
|
||||
|
||||
/** Returns index of first occurence of value, NSNotFound if value not found. */
|
||||
static inline unsigned int ccCArrayGetIndexOfValue(ccCArray *arr, void* value)
|
||||
static inline int ccCArrayGetIndexOfValue(ccCArray *arr, void* value)
|
||||
{
|
||||
for (unsigned int i = 0; i < arr->num; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue