mirror of https://github.com/axmolengine/axmol.git
issue #1310: make tests and HelloWorld work ok
This commit is contained in:
parent
c8c696a2df
commit
94235d3602
|
@ -1 +1 @@
|
|||
5e8bc2ebea93cf60f4c5992e1175c43fffffb7e8
|
||||
e725a16819b832fcdbd8496ae63d0b24c76af31a
|
|
@ -150,7 +150,7 @@ void CCPointArray::reverseInline()
|
|||
}
|
||||
|
||||
// CatmullRom Spline formula:
|
||||
inline CCPoint ccCardinalSplineAt(CCPoint &p0, CCPoint &p1, CCPoint &p2, CCPoint &p3, CCFloat tension, float t)
|
||||
CCPoint ccCardinalSplineAt(CCPoint &p0, CCPoint &p1, CCPoint &p2, CCPoint &p3, float tension, float t)
|
||||
{
|
||||
float t2 = t * t;
|
||||
float t3 = t2 * t;
|
||||
|
|
|
@ -181,7 +181,7 @@ public:
|
|||
};
|
||||
|
||||
/** Returns the Cardinal Spline position for a given set of control points, tension and time */
|
||||
extern CCPoint ccCardinalSplineAt(CCPoint &p0, CCPoint &p1, CCPoint &p2, CCPoint &p3, CCFloat tension, float t);
|
||||
extern CCPoint ccCardinalSplineAt(CCPoint &p0, CCPoint &p1, CCPoint &p2, CCPoint &p3, float tension, float t);
|
||||
|
||||
NS_CC_END;
|
||||
|
||||
|
|
|
@ -212,6 +212,17 @@ static void static_addValueToCCDict(id key, id value, CCDictionary* pDict)
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
CCFileUtils* CCFileUtils::sharedFileUtils()
|
||||
{
|
||||
static CCFileUtils *fileUtils = NULL;
|
||||
if (fileUtils == NULL)
|
||||
{
|
||||
fileUtils = new CCFileUtils();
|
||||
}
|
||||
|
||||
return fileUtils;
|
||||
}
|
||||
|
||||
void CCFileUtils::setResourcePath(const char *pszResourcePath)
|
||||
{
|
||||
assert(0);
|
||||
|
@ -389,7 +400,7 @@ const char *CCFileUtils::fullPathFromRelativeFile(const char *pszFilename, const
|
|||
|
||||
CCDictionary* ccFileUtils_dictionaryWithContentsOfFileThreadSafe(const char *pFileName)
|
||||
{
|
||||
const char* pszFullPath = CCFileUtils::fullPathFromRelativePath(pFileName);
|
||||
const char* pszFullPath = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath(pFileName);
|
||||
NSString* pPath = [NSString stringWithUTF8String:pszFullPath];
|
||||
NSDictionary* pDict = [NSDictionary dictionaryWithContentsOfFile:pPath];
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ THE SOFTWARE.
|
|||
#define glDeleteVertexArrays glDeleteVertexArraysOES
|
||||
#define glGenVertexArrays glGenVertexArraysOES
|
||||
#define glBindVertexArray glBindVertexArrayOES
|
||||
#define CC_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES
|
||||
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OPenGLES/ES2/glext.h>
|
||||
|
|
|
@ -348,7 +348,8 @@ CCImage::~CCImage()
|
|||
bool CCImage::initWithImageFile(const char * strPath, EImageFormat eImgFmt/* = eFmtPng*/)
|
||||
{
|
||||
unsigned long nSize;
|
||||
unsigned char *pBuffer = CCFileUtils::getFileData(CCFileUtils::fullPathFromRelativePath(strPath), "rb", &nSize);
|
||||
CCFileUtils *fileUtils = CCFileUtils::sharedFileUtils();
|
||||
unsigned char *pBuffer = fileUtils->getFileData(fileUtils->fullPathFromRelativePath(strPath), "rb", &nSize);
|
||||
|
||||
return initWithImageData(pBuffer, nSize, eImgFmt);
|
||||
}
|
||||
|
@ -360,7 +361,7 @@ bool CCImage::initWithImageFileThreadSafe(const char *fullpath, EImageFormat ima
|
|||
* CCFileUtils::fullPathFromRelativePath() is not thread-safe, it use autorelease().
|
||||
*/
|
||||
unsigned long nSize;
|
||||
unsigned char *pBuffer = CCFileUtils::getFileData(fullpath, "rb", &nSize);
|
||||
unsigned char *pBuffer = CCFileUtils::sharedFileUtils()->getFileData(fullpath, "rb", &nSize);
|
||||
|
||||
return initWithImageData(pBuffer, nSize, imageType);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
2d4adf9bb3276c7884f16637eb15bd5090ad7ca2
|
||||
2ef6f502d16098ac1a18aee1ab7a64815c241af6
|
|
@ -1 +1 @@
|
|||
f15b1b846b94b2d2b69438899124884963fd9f09
|
||||
27f42f585ea7195531f863d34fff314117000630
|
|
@ -1 +1 @@
|
|||
59d857c1050d96d698c58eaf20c0c3cd1a808cbf
|
||||
594b0f9fe97d6f6dd1d56c71ccd7e1c61b5522b3
|
|
@ -1 +1 @@
|
|||
277bc57b726290085c72db62cf656b66594440dc
|
||||
b77ecad7976dbe21bb61300c73e06ddbad3a4bd8
|
Loading…
Reference in New Issue