mirror of https://github.com/axmolengine/axmol.git
issue #6
This commit is contained in:
parent
afffd75d0e
commit
924017afdd
|
@ -60,12 +60,12 @@ CCConfiguration* CCConfiguration::sharedConfiguration(void)
|
|||
BOOL CCConfiguration::checkForGLExtension(const string &searchName)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
const char *pszSearchName = searchName.c_str();
|
||||
const char *kSearchName = searchName.c_str();
|
||||
|
||||
if (strstr(g_pGlExtensions, pszSearchName))
|
||||
if (strstr(g_pGlExtensions, kSearchName))
|
||||
ret = TRUE;
|
||||
|
||||
delete pszSearchName;
|
||||
delete kSearchName;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@ THE SOFTWARE.
|
|||
#ifndef __CCCONFIGURATION_H__
|
||||
#define __CCCONFIGURATION_H__
|
||||
|
||||
#include "include/Cocos2dTypes.h"
|
||||
#include "include/NSObject.h"
|
||||
#include "Cocos2dTypes.h"
|
||||
#include "Cocoa/NSObject.h"
|
||||
#include <GLES/gl.h>
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
@warning These functions draws the Line, Point, Polygon, immediately. They aren't batched. If you are going to make a game that depends on these primitives, I suggest creating a batch.
|
||||
*/
|
||||
|
||||
#include "CGGeometry.h" // for CGPoint
|
||||
#include "Cocoa/CGGeometry.h" // for CGPoint
|
||||
#include "Cocos2dTypes.h"
|
||||
|
||||
/** draws a point given x and y coordinate */
|
||||
|
|
|
@ -21,21 +21,19 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
#include "NSAutoReleasePool.h"
|
||||
using namespace std:
|
||||
|
||||
NSAutoreleasePool::NSAutoreleasePool(void)
|
||||
{
|
||||
m_managedObjectArray = vector<NSObject *>();
|
||||
}
|
||||
|
||||
void NSAutoreleasePool::addObject(NSObject *pObject)
|
||||
{
|
||||
m_managedObjectArray.push_back(pObject);
|
||||
|
||||
}
|
||||
|
||||
void NSAutoreleasePool::removeObject(NSObject *pObject)
|
||||
{
|
||||
m_managedObjectArray.po
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -46,8 +44,9 @@ NSPoolManager* NSPoolManager::getInstance(void)
|
|||
{
|
||||
static BOOL bInit = FALSE;
|
||||
|
||||
if (bInit == FLASE)
|
||||
if (bInit == FALSE)
|
||||
{
|
||||
bInit = TRUE;
|
||||
m_pPoolManager = new NSPoolManager();
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ THE SOFTWARE.
|
|||
#define __NS_AUTO_RELEASE_POOL_H__
|
||||
|
||||
#include "NSObject.h"
|
||||
#include <vector>
|
||||
|
||||
class NSAutoreleasePool : public NSObject
|
||||
{
|
||||
|
@ -36,15 +35,12 @@ public:
|
|||
|
||||
void clear(void);
|
||||
private:
|
||||
std::vector<NSObject *> m_managedObjectArray;
|
||||
//todo: add mutable array
|
||||
};
|
||||
|
||||
class NSPoolManager
|
||||
{
|
||||
public:
|
||||
|
||||
~NSPoolManager();
|
||||
|
||||
void finalize(void);
|
||||
void push(void);
|
||||
void pop(void);
|
||||
|
@ -56,10 +52,10 @@ public:
|
|||
static NSPoolManager* getInstance();
|
||||
|
||||
private:
|
||||
NSPoolManager();
|
||||
NSPoolManager() {};
|
||||
|
||||
private:
|
||||
static NSPoolManager *m_pPoolManager;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //__NS_AUTO_RELEASE_POOL_H__
|
||||
|
|
|
@ -207,14 +207,6 @@
|
|||
RelativePath=".\include\ccConfig.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\CCConfiguration.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\CCDrawingPrimitives.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\ccMacros.h"
|
||||
>
|
||||
|
@ -227,10 +219,6 @@
|
|||
RelativePath=".\include\ccTypes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\CGGeometry.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\cocos2d.h"
|
||||
>
|
||||
|
@ -243,38 +231,6 @@
|
|||
RelativePath=".\glu.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\NSArray.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\NSAutoreleasePool.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\NSData.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\NSLock.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\NSObject.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\NSSet.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\NSString.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\NSZone.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Makefiles"
|
||||
|
@ -344,38 +300,82 @@
|
|||
<Filter
|
||||
Name="cocoa"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\cocoa\CGGeometry.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSArray.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSArray.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSAutoreleasePool.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSAutoreleasePool.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSData.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSData.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSLock.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSLock.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSMutableArray.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSMutableArray.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSObject.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSObject.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSSet.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSSet.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSString.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSString.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSZone.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocoa\NSZone.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\CCamera.cpp"
|
||||
|
@ -385,10 +385,18 @@
|
|||
RelativePath=".\CCConfiguration.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ccconfiguration.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CCDrawingPrimitives.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CCDrawingPrimitives.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocos2d.cpp"
|
||||
>
|
||||
|
|
|
@ -23,7 +23,7 @@ THE SOFTWARE.
|
|||
#ifndef __CCCAMERA_H__
|
||||
#define __CCCAMERA_H__
|
||||
|
||||
#include "NSObject.h"
|
||||
#include "Cocoa/NSObject.h"
|
||||
#include "ccMacros.h"
|
||||
#include <string>
|
||||
|
||||
|
|
Loading…
Reference in New Issue