Skip to content

Commit 8d2be43

Browse files
committed
Merge pull request #767 from andykorth/v3.0
Too many Rs
2 parents 82e97cb + d2828d3 commit 8d2be43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cocos2d/CCTexture.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ - (id) initWithCGImage:(CGImageRef)cgImage contentScale:(CGFloat)contentScale
460460
// Repack the pixel data into the right format
461461

462462
if(pixelFormat == CCTexturePixelFormat_RGB565) {
463-
//Convert "RRRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA" to "RRRRRGGGGGGBBBBB"
463+
//Convert "RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA" to "RRRRRGGGGGGBBBBB"
464464
tempData = malloc(textureHeight * textureWidth * 2);
465465
inPixel32 = (unsigned int*)data;
466466
outPixel16 = (unsigned short*)tempData;
@@ -472,7 +472,7 @@ - (id) initWithCGImage:(CGImageRef)cgImage contentScale:(CGFloat)contentScale
472472
}
473473

474474
else if(pixelFormat == CCTexturePixelFormat_RGB888) {
475-
//Convert "RRRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA" to "RRRRRRRRGGGGGGGGBBBBBBB"
475+
//Convert "RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA" to "RRRRRRRRGGGGGGGGBBBBBBB"
476476
tempData = malloc(textureHeight * textureWidth * 3);
477477
char *inData = (char*)data;
478478
char *outData = (char*)tempData;
@@ -488,7 +488,7 @@ - (id) initWithCGImage:(CGImageRef)cgImage contentScale:(CGFloat)contentScale
488488
}
489489

490490
else if (pixelFormat == CCTexturePixelFormat_RGBA4444) {
491-
//Convert "RRRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA" to "RRRRGGGGBBBBAAAA"
491+
//Convert "RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA" to "RRRRGGGGBBBBAAAA"
492492
tempData = malloc(textureHeight * textureWidth * 2);
493493
inPixel32 = (unsigned int*)data;
494494
outPixel16 = (unsigned short*)tempData;
@@ -505,7 +505,7 @@ - (id) initWithCGImage:(CGImageRef)cgImage contentScale:(CGFloat)contentScale
505505

506506
}
507507
else if (pixelFormat == CCTexturePixelFormat_RGB5A1) {
508-
//Convert "RRRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA" to "RRRRRGGGGGBBBBBA"
508+
//Convert "RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA" to "RRRRRGGGGGBBBBBA"
509509
/*
510510
Here was a bug.
511511
When you convert RGBA8888 texture to RGB5A1 texture and then render it on black background, you'll see a "ghost" image as if the texture is still RGBA8888.

0 commit comments

Comments
 (0)