More info .. i have a pair of files xxx.plist and xxx.png (for use with addSpriteFramesWithFile. xxx-hd.plist and xxx-hd.png do indeed exist and are part of the project. I look at Build Results and they are copied as part of the build. When run this code section in CCFileUtils returns 0 for both files. The pathForResource method returns nil! NB, an earlier attempt to find an earlier yyy-hd.png works fine. BTW, there is no xxx.plist or xxx.png, only the HD ones. So where to begin for this one? I've checked spellings, but there is a problem somehow, but where to look?
`+(NSString*) fullPathFromRelativePath:(NSString*) relPath
{
NSAssert(relPath != nil, @"CCFileUtils: Invalid path");
NSString *fullpath = nil;
// only if it is not an absolute path
if( ! [relPath isAbsolutePath] )
{
NSMutableArray *imagePathComponents = [NSMutableArray arrayWithArray:[relPath pathComponents]];
NSString *file = [imagePathComponents lastObject];
[imagePathComponents removeLastObject];
NSString *imageDirectory = [NSString pathWithComponents:imagePathComponents];
fullpath = [[CCConfiguration sharedConfiguration].loadingBundle pathForResource:file
ofType:nil
inDirectory:imageDirectory];
}
if (fullpath == nil)
fullpath = relPath;
#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED
fullpath = [self getDoubleResolutionImage:fullpath];
#endif // __IPHONE_OS_VERSION_MAX_ALLOWED
return fullpath;
}