mirror of https://github.com/axmolengine/axmol.git
Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20
Conflicts: cocos2dx/platform/ios/CCFileUtils.mm
This commit is contained in:
commit
33ea7905a5
|
@ -1 +1 @@
|
|||
5e8bc2ebea93cf60f4c5992e1175c43fffffb7e8
|
||||
e725a16819b832fcdbd8496ae63d0b24c76af31a
|
|
@ -81,6 +81,8 @@ bool CCConfiguration::init(void)
|
|||
|
||||
#if CC_ENABLE_PROFILERS
|
||||
bEnableProfilers = true;
|
||||
#else
|
||||
bEnableProfilers = false;
|
||||
#endif
|
||||
|
||||
CCLOG("cocos2d: compiled with Profiling Support: %s",
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -86,6 +86,7 @@ void CCEGLView::swapBuffers()
|
|||
CCSize CCEGLView::getFrameSize()
|
||||
{
|
||||
assert(false);
|
||||
return CCSizeMake(0, 0);
|
||||
}
|
||||
|
||||
void CCEGLView::setIMEKeyboardState(bool bOpen)
|
||||
|
|
|
@ -415,7 +415,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);
|
||||
}
|
||||
|
@ -426,21 +427,25 @@ bool CCImage::_initWithRawData(void *pData, int nDatalen, int nWidth, int nHeigh
|
|||
bool CCImage::_initWithJpgData(void *pData, int nDatalen)
|
||||
{
|
||||
assert(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CCImage::_initWithPngData(void *pData, int nDatalen)
|
||||
{
|
||||
assert(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CCImage::_saveImageToPNG(const char *pszFilePath, bool bIsToRGB)
|
||||
{
|
||||
assert(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CCImage::_saveImageToJPG(const char *pszFilePath)
|
||||
{
|
||||
assert(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CCImage::initWithString(
|
||||
|
|
|
@ -1 +1 @@
|
|||
2d4adf9bb3276c7884f16637eb15bd5090ad7ca2
|
||||
2ef6f502d16098ac1a18aee1ab7a64815c241af6
|
|
@ -1 +1 @@
|
|||
f15b1b846b94b2d2b69438899124884963fd9f09
|
||||
27f42f585ea7195531f863d34fff314117000630
|
|
@ -1 +1 @@
|
|||
59d857c1050d96d698c58eaf20c0c3cd1a808cbf
|
||||
594b0f9fe97d6f6dd1d56c71ccd7e1c61b5522b3
|
|
@ -1 +1 @@
|
|||
277bc57b726290085c72db62cf656b66594440dc
|
||||
b77ecad7976dbe21bb61300c73e06ddbad3a4bd8
|
Loading…
Reference in New Issue