mirror of https://github.com/axmolengine/axmol.git
Merge branch 'gles20' of https://github.com/donaldalanmorrison/cocos2d-x into gles20
This commit is contained in:
commit
de372042ba
|
@ -76,7 +76,7 @@ CCObject* CCAction::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pRet = new CCAction();
|
||||
pZone = pNewZone = new CCZone(pRet);
|
||||
pNewZone = new CCZone(pRet);
|
||||
}
|
||||
//copy member data
|
||||
pRet->m_nTag = m_nTag;
|
||||
|
|
|
@ -179,7 +179,7 @@ CCObject* CCEaseRateAction::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseRateAction();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval*)(m_pOther->copy()->autorelease()), m_fRate);
|
||||
|
@ -235,7 +235,7 @@ CCObject* CCEaseIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval*)(m_pOther->copy()->autorelease()), m_fRate);
|
||||
|
@ -292,7 +292,7 @@ CCObject* CCEaseOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval*)(m_pOther->copy()->autorelease()), m_fRate);
|
||||
|
@ -349,7 +349,7 @@ CCObject* CCEaseInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval*)(m_pOther->copy()->autorelease()), m_fRate);
|
||||
|
@ -415,7 +415,7 @@ CCObject* CCEaseExponentialIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseExponentialIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -472,7 +472,7 @@ CCObject* CCEaseExponentialOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseExponentialOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -529,7 +529,7 @@ CCObject* CCEaseExponentialInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseExponentialInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -596,7 +596,7 @@ CCObject* CCEaseSineIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseSineIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -653,7 +653,7 @@ CCObject* CCEaseSineOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseSineOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -710,7 +710,7 @@ CCObject* CCEaseSineInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseSineInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -779,7 +779,7 @@ CCObject* CCEaseElastic::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseElastic();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()), m_fPeriod);
|
||||
|
@ -833,7 +833,7 @@ CCObject* CCEaseElasticIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseElasticIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()), m_fPeriod);
|
||||
|
@ -903,7 +903,7 @@ CCObject *CCEaseElasticOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseElasticOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()), m_fPeriod);
|
||||
|
@ -972,7 +972,7 @@ CCObject* CCEaseElasticInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseElasticInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()), m_fPeriod);
|
||||
|
@ -1056,7 +1056,7 @@ CCObject* CCEaseBounce::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBounce();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1129,7 +1129,7 @@ CCObject* CCEaseBounceIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBounceIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1187,7 +1187,7 @@ CCObject* CCEaseBounceOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBounceOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1245,7 +1245,7 @@ CCObject* CCEaseBounceInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBounceInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1313,7 +1313,7 @@ CCObject* CCEaseBackIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBackIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1371,7 +1371,7 @@ CCObject* CCEaseBackOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBackOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1431,7 +1431,7 @@ CCObject* CCEaseBackInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBackInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
|
|
@ -119,8 +119,7 @@ void calculate_line_normal(kmVec2 p1, kmVec2 p2, kmVec2* normal_out) {
|
|||
|
||||
kmBool kmRay2IntersectTriangle(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, const kmVec2* p3, kmVec2* intersection, kmVec2* normal_out) {
|
||||
kmVec2 intersect;
|
||||
kmVec2 final_intersect;
|
||||
kmVec2 normal;
|
||||
kmVec2 final_intersect = {.x = 0, .y = 0}, normal = {.x = 0, .y = 0}; // Silencing LLVM SA
|
||||
kmScalar distance = 10000.0f;
|
||||
kmBool intersected = KM_FALSE;
|
||||
|
||||
|
@ -163,7 +162,7 @@ kmBool kmRay2IntersectTriangle(const kmRay2* ray, const kmVec2* p1, const kmVec2
|
|||
if(this_distance < distance) {
|
||||
final_intersect.x = intersect.x;
|
||||
final_intersect.y = intersect.y;
|
||||
distance = this_distance;
|
||||
//distance = this_distance;
|
||||
|
||||
calculate_line_normal(*p3, *p1, &normal);
|
||||
}
|
||||
|
|
|
@ -842,7 +842,7 @@ void CCLabelBMFont::createFontChars()
|
|||
{
|
||||
int nextFontPositionX = 0;
|
||||
int nextFontPositionY = 0;
|
||||
unsigned short prev = -1;
|
||||
//unsigned short prev = -1;
|
||||
int kerningAmount = 0;
|
||||
|
||||
CCSize tmpSize = CCSizeZero;
|
||||
|
@ -924,7 +924,7 @@ void CCLabelBMFont::createFontChars()
|
|||
|
||||
// update kerning
|
||||
nextFontPositionX += fontDef.xAdvance + kerningAmount;
|
||||
prev = c;
|
||||
//prev = c;
|
||||
|
||||
// Apply label properties
|
||||
fontChar->setOpacityModifyRGB(m_bIsOpacityModifyRGB);
|
||||
|
|
|
@ -194,11 +194,13 @@ bool CCRenderTexture::initWithWidthAndHeight(int w, int h, CCTexture2DPixelForma
|
|||
m_ePixelFormat = eFormat;
|
||||
|
||||
m_pTexture = new CCTexture2D();
|
||||
CC_BREAK_IF(! m_pTexture);
|
||||
|
||||
m_pTexture->initWithData(data, (CCTexture2DPixelFormat)m_ePixelFormat, powW, powH, CCSizeMake((float)w, (float)h));
|
||||
free( data );
|
||||
|
||||
if (m_pTexture) {
|
||||
m_pTexture->initWithData(data, (CCTexture2DPixelFormat)m_ePixelFormat, powW, powH, CCSizeMake((float)w, (float)h));
|
||||
free( data );
|
||||
} else {
|
||||
free( data ); // ScopeGuard (a simulated Finally clause) would be more elegant.
|
||||
break;
|
||||
}
|
||||
GLint oldRBO;
|
||||
glGetIntegerv(GL_RENDERBUFFER_BINDING, &oldRBO);
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
|
||||
- (NSString*) description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%@ = %08X | size = %ix%i>", [self class], self, backingWidth_, backingHeight_];
|
||||
return [NSString stringWithFormat:@"<%@ = %08X | size = %ix%i>", [self class], (unsigned int)self, backingWidth_, backingHeight_];
|
||||
}
|
||||
|
||||
- (unsigned int) colorRenderBuffer
|
||||
|
|
|
@ -97,7 +97,8 @@ static bool _initWithImage(CGImageRef cgImage, tImageInfo *pImageinfo)
|
|||
CGContextDrawImage(context, CGRectMake(0, 0, pImageinfo->width, pImageinfo->height), cgImage);
|
||||
|
||||
CGContextRelease(context);
|
||||
|
||||
CFRelease(colorSpace);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
@property(readwrite, copy) UITextRange *selectedTextRange;
|
||||
@property(nonatomic, readonly) id<UITextInputTokenizer> tokenizer;
|
||||
@property(nonatomic, readonly, getter = isKeyboardShown) BOOL isKeyboardShown;
|
||||
@property(nonatomic, retain) NSNotification* keyboardShowNotification;
|
||||
@property(nonatomic, copy) NSNotification* keyboardShowNotification;
|
||||
/** creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */
|
||||
+ (id) viewWithFrame:(CGRect)frame;
|
||||
/** creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer */
|
||||
|
|
|
@ -243,7 +243,7 @@ static EAGLView *view = 0;
|
|||
- (void) dealloc
|
||||
{
|
||||
[renderer_ release];
|
||||
[self.keyboardShowNotification release];
|
||||
self.keyboardShowNotification = NULL; // implicit release
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -825,7 +825,7 @@ static EAGLView *view = 0;
|
|||
cocos2d::CCIMEDispatcher* dispatcher = cocos2d::CCIMEDispatcher::sharedDispatcher();
|
||||
if (UIKeyboardWillShowNotification == type)
|
||||
{
|
||||
self.keyboardShowNotification = [notif copy];
|
||||
self.keyboardShowNotification = notif; // implicit copy
|
||||
dispatcher->dispatchKeyboardWillShow(notiInfo);
|
||||
}
|
||||
else if (UIKeyboardDidShowNotification == type)
|
||||
|
|
|
@ -38,12 +38,14 @@
|
|||
@end
|
||||
|
||||
@implementation UIAccelerometer (Simulation)
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
|
||||
// override the static method and return our simulated version instead
|
||||
+ (UIAccelerometer *)sharedAccelerometer
|
||||
{
|
||||
return [AccelerometerSimulation getAccelerometer];
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
@end
|
||||
/*
|
||||
// callback that never got called with CFSocket UDP...
|
||||
|
@ -65,6 +67,14 @@ static AccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
|
||||
@implementation AccelerometerSimulation
|
||||
|
||||
- (void) dealloc {
|
||||
if (sharedAccelerometer) {
|
||||
[sharedAccelerometer release];
|
||||
sharedAccelerometer = NULL;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// this is straight from developer guide example for multi-threaded notifications
|
||||
- (void) setUpThreadingSupport {
|
||||
if ( notifications ) return;
|
||||
|
@ -124,7 +134,7 @@ static AccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
};
|
||||
[notificationLock unlock];
|
||||
}
|
||||
|
||||
#ifndef __clang_analyzer__
|
||||
+ (AccelerometerSimulation *)getAccelerometer
|
||||
{
|
||||
if( sharedAccelerometer == NULL )
|
||||
|
@ -132,7 +142,7 @@ static AccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
|
||||
return sharedAccelerometer;
|
||||
}
|
||||
|
||||
#endif
|
||||
- (void)threadLoop:(id)object
|
||||
{
|
||||
char buffer[1024];
|
||||
|
|
|
@ -1 +1 @@
|
|||
9269aad72103fe898f626bacd11c9719e4914743
|
||||
fca49c411a34ba7a373802c3429c0b4d91afecd1
|
|
@ -69,7 +69,7 @@ CCObject* CCAnimationFrame::copyWithZone(CCZone* pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCAnimationFrame();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithSpriteFrame((CCSpriteFrame*)m_pSpriteFrame->copy()->autorelease(),
|
||||
|
@ -232,7 +232,7 @@ CCObject* CCAnimation::copyWithZone(CCZone* pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCAnimation();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAnimationFrames(m_pFrames, m_fDelayPerUnit, m_uLoops);
|
||||
|
|
|
@ -1092,7 +1092,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
if (lSeek!=0)
|
||||
{
|
||||
if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
||||
lSeek=0;
|
||||
;//lSeek=0;
|
||||
else
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
|
@ -1100,10 +1100,10 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
|
||||
if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
|
||||
err=UNZ_ERRNO;
|
||||
lSeek+=file_info.size_file_comment - uSizeRead;
|
||||
//lSeek+=file_info.size_file_comment - uSizeRead;
|
||||
}
|
||||
else
|
||||
lSeek+=file_info.size_file_comment;
|
||||
//else
|
||||
// lSeek+=file_info.size_file_comment;
|
||||
|
||||
|
||||
if ((err==UNZ_OK) && (pfile_info!=NULL))
|
||||
|
@ -1536,7 +1536,7 @@ int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
|||
/* #endif */
|
||||
(s->cur_file_info.compression_method!=Z_DEFLATED))
|
||||
|
||||
err=UNZ_BADZIPFILE;
|
||||
//err=UNZ_BADZIPFILE;
|
||||
|
||||
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
|
||||
pfile_in_zip_read_info->crc32=0;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
html/
|
||||
.tee-*.txt
|
||||
|
Loading…
Reference in New Issue