Skip to content

Commit 12fb703

Browse files
committed
Fix for .psd extensions in CCSpriteFrameCache. Added fileLookup.plist lookup.
1 parent a773af1 commit 12fb703

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cocos2d/CCSpriteFrameCache.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,12 @@ -(CCSpriteFrame*) spriteFrameByName:(NSString*)name
449449

450450
if (!frame)
451451
{
452+
453+
// Check fileLookup.plist
454+
NSString *newfilename = [[CCFileUtils sharedFileUtils].filenameLookup objectForKey:name];
455+
if(newfilename)
456+
name = newfilename;
457+
452458
// Try finding the frame in one of the registered sprite sheets
453459
NSString* spriteFrameFile = [_spriteFrameFileLookup objectForKey:name];
454460
if (spriteFrameFile) [self addSpriteFramesWithFile:spriteFrameFile];

0 commit comments

Comments
 (0)