Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for CCSpriteBatchNode #276

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CocosBuilder/CCSpriteBatchNode/CCBPProperties.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>inheritsFrom</key>
<string>CCNode</string>
<key>canHaveChildren</key>
<true/>
<key>canBeRootNode</key>
<true/>
<key>className</key>
<string>CCSpriteBatchNode</string>
<key>editorClassName</key>
<string>CCSpriteBatchNode</string>
<key>requireChildClass</key>
<array>
<string>CCSprite</string>
</array>
<key>properties</key>
<array>
<dict>
<key>displayName</key>
<string>CCSpriteBatchNode</string>
<key>name</key>
<string>CCSpriteBatchNode</string>
<key>type</key>
<string>Separator</string>
<key>dontSetInEditor</key>
<true/>
</dict>
<dict>
<key>animatable</key>
<false/>
<key>displayName</key>
<string>Atlas Name</string>
<key>type</key>
<string>TextureAtlas</string>
<key>name</key>
<string>textureAtlas</string>
</dict>
</array>
</dict>
</plist>
44 changes: 44 additions & 0 deletions CocosBuilder/CCSpriteBatchNode/CCSpriteBatchNode-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.cocosbuilder.plug.node.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFPlugInDynamicRegisterFunction</key>
<string></string>
<key>CFPlugInDynamicRegistration</key>
<string>NO</string>
<key>CFPlugInFactories</key>
<dict>
<key>00000000-0000-0000-0000-000000000000</key>
<string>MyFactoryFunction</string>
</dict>
<key>CFPlugInTypes</key>
<dict>
<key>00000000-0000-0000-0000-000000000000</key>
<array>
<string>00000000-0000-0000-0000-000000000000</string>
</array>
</dict>
<key>CFPlugInUnloadFunction</key>
<string></string>
</dict>
</plist>
7 changes: 7 additions & 0 deletions CocosBuilder/CCSpriteBatchNode/CCSpriteBatchNode-Prefix.pch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//
// Prefix header for all source files of the 'CCSpriteBatchNode' target in the 'CCSpriteBatchNode' project
//

#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
2 changes: 2 additions & 0 deletions CocosBuilder/CCSpriteBatchNode/en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

7 changes: 5 additions & 2 deletions CocosBuilder/Cocos2D iPhone/CCBXCocos2diPhoneWriter.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ - (void) setupPropTypes
[propTypes addObject:@"BlockCCControl"];
[propTypes addObject:@"FloatScale"];
[propTypes addObject:@"FloatXY"];
[propTypes addObject:@"TextureAtlas"];
}

- (id) init
Expand Down Expand Up @@ -401,7 +402,8 @@ - (void) writeProperty:(id) prop type:(NSString*)type name:(NSString*)name platf
}
else if ([type isEqualToString:@"Texture"]
|| [type isEqualToString:@"FntFile"]
|| [type isEqualToString:@"CCBFile"])
|| [type isEqualToString:@"CCBFile"]
|| [type isEqualToString:@"TextureAtlas"])
{
[self writeCachedString:prop isPath: YES];
}
Expand Down Expand Up @@ -578,7 +580,8 @@ - (void) cacheStringsForNode:(NSDictionary*) node
}
else if ([type isEqualToString:@"FntFile"]
|| [type isEqualToString:@"Texture"]
|| [type isEqualToString:@"CCBFile"])
|| [type isEqualToString:@"CCBFile"]
|| [type isEqualToString:@"TextureAtlas"])
{
[self addToStringCache:value isPath:YES];
}
Expand Down
Loading