Browse files

GL View works and displays debug message

  • Loading branch information...
1 parent bcdd687 commit ffa1b52960f392a90157cbc6728fc48a3281bced @burtlo committed Nov 18, 2011
View
8 Gravy.xcodeproj/project.pbxproj
@@ -530,8 +530,6 @@
E281AAD21470667300F35708 = {
isa = PBXGroup;
children = (
- E2A711CD147083A900347704 /* libz.dylib */,
- E2A70E3E1470737B00347704 /* AudioToolbox.framework */,
E281AAE71470667300F35708 /* Gravy */,
E281AB041470667300F35708 /* GravyTests */,
E2A70F111470814E00347704 /* Cocos2D */,
@@ -553,6 +551,8 @@
E281AAE01470667300F35708 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ E2A711CD147083A900347704 /* libz.dylib */,
+ E2A70E3E1470737B00347704 /* AudioToolbox.framework */,
E281AAE11470667300F35708 /* Cocoa.framework */,
E281AAFF1470667300F35708 /* SenTestingKit.framework */,
E281AAE31470667300F35708 /* Other Frameworks */,
@@ -1431,6 +1431,8 @@
E281AB101470667300F35708 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_OBJCPP_ARC_ABI = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Gravy/Gravy-Prefix.pch";
INFOPLIST_FILE = "Gravy/Gravy-Info.plist";
@@ -1447,6 +1449,8 @@
E281AB111470667300F35708 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_OBJCPP_ARC_ABI = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Gravy/Gravy-Prefix.pch";
INFOPLIST_FILE = "Gravy/Gravy-Info.plist";
View
9 Gravy/AMDocumentController.m
@@ -44,10 +44,13 @@ - (void)openDocument:(id)sender {
//
// [documentController loadWindow];
- PetsDocumentController *petsDocController = [[PetsDocumentController alloc] initWithWindowNibName:@"Pets" withGameObjects:[self gameObjectsFromBaseFolder:baseFolder]];
- [petsDocController loadWindow];
-
+// [[NSBundle mainBundle] loadNibFile:@"Pets" externalNameTable:[NSDictionary dictionary] withZone:nil];
+
+
+ PetsDocumentController *petsDocController = [[PetsDocumentController alloc] initWithGameObjects:[self gameObjectsFromBaseFolder:baseFolder]];
+// PetsDocumentController *petsDocController = [[PetsDocumentController alloc] initWithWindowNibName:@"Pets" withGameObjects:[self gameObjectsFromBaseFolder:baseFolder]];
+
}
}
View
1 Gravy/GameObject.h
@@ -33,6 +33,7 @@
@property (nonatomic,retain,readwrite) NSString *dateOfEndSale;
@property (nonatomic,retain,readwrite) NSString *category;
+@property (nonatomic,retain,readwrite) NSString *isMysteryLTO;
@property (nonatomic,retain,readwrite) NSString *level0Filename;
@property (nonatomic,retain,readwrite) NSString *level0PNGColorSpace;
View
1 Gravy/GameObject.m
@@ -15,6 +15,7 @@ @implementation GameObject
@synthesize dateOfStartOffer, dateOfEndOffer, percentOffBuildCost, percentOffRushCost, dateOfStartSale, dateOfEndSale;
@synthesize category;
+@synthesize isMysteryLTO;
@synthesize levels;
View
54 Gravy/Pets.xib
@@ -171,26 +171,25 @@
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSOpenGLView" id="279110831">
+ <object class="NSOpenGLView" id="84989064">
<reference key="NSNextResponder" ref="157080717"/>
- <int key="NSvFlags">1292</int>
+ <int key="NSvFlags">1298</int>
<object class="NSPSMatrix" key="NSDrawMatrix"/>
- <string key="NSFrame">{{0, 164}, {580, 416}}</string>
+ <string key="NSFrame">{{0, 363}, {420, 217}}</string>
<reference key="NSSuperview" ref="157080717"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSOpenGLPixelFormat" key="NSPixelFormat">
<object class="NSMutableData" key="NSPixelAttributes">
- <bytes key="NS.bytes">AAAAYAAAAAA</bytes>
+ <bytes key="NS.bytes">AAAABQAAAGAAAAAIAAAADwAAAAsAAAAIAAAAAA</bytes>
</object>
</object>
</object>
</object>
<string key="NSFrame">{{448, 0}, {420, 580}}</string>
<reference key="NSSuperview" ref="764218945"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="279110831"/>
+ <reference key="NSNextKeyView" ref="84989064"/>
<string key="NSReuseIdentifierKey">_NS:1167</string>
<string key="NSClassName">NSView</string>
</object>
@@ -267,7 +266,6 @@
<string key="NSFrame">{{17, 0}, {247, 43}}</string>
<reference key="NSSuperview" ref="302670177"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:360</string>
<string key="NSAntiCompressionPriority">{250, 750}</string>
<bool key="NSEnabled">YES</bool>
@@ -296,9 +294,17 @@
<object class="IBOutletConnection" key="connection">
<string key="label">animationView</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="279110831"/>
+ <reference key="destination" ref="84989064"/>
</object>
- <int key="connectionID">39</int>
+ <int key="connectionID">45</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1005"/>
+ </object>
+ <int key="connectionID">48</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
@@ -473,15 +479,6 @@
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">30</int>
- <reference key="object" ref="157080717"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="279110831"/>
- </object>
- <reference key="parent" ref="764218945"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">29</int>
<reference key="object" ref="917037209"/>
<object class="NSMutableArray" key="children">
@@ -531,8 +528,17 @@
<reference key="parent" ref="185871545"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">38</int>
- <reference key="object" ref="279110831"/>
+ <int key="objectID">30</int>
+ <reference key="object" ref="157080717"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="84989064"/>
+ </object>
+ <reference key="parent" ref="764218945"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">44</int>
+ <reference key="object" ref="84989064"/>
<reference key="parent" ref="157080717"/>
</object>
</object>
@@ -560,8 +566,8 @@
<string>30.IBPluginDependency</string>
<string>33.IBPluginDependency</string>
<string>34.IBPluginDependency</string>
- <string>38.CustomClassName</string>
- <string>38.IBPluginDependency</string>
+ <string>44.CustomClassName</string>
+ <string>44.IBPluginDependency</string>
<string>8.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
</object>
@@ -604,7 +610,7 @@
<reference key="dict.values" ref="1002"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">39</int>
+ <int key="maxID">48</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -627,7 +633,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">PetsDocumentController</string>
- <string key="superclassName">NSWindowController</string>
+ <string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
View
9 Gravy/PetsDocumentController.h
@@ -10,14 +10,15 @@
#import "GameObjects.h"
#import "cocos2d.h"
-@interface PetsDocumentController : NSWindowController
+@interface PetsDocumentController : NSObject
-- (id)initWithWindowNibName:(NSString *)windowNibName withGameObjects:(GameObjects *)aGameObjects;
+- (id)initWithGameObjects:(GameObjects *)aGameObjects;
+//- (id)initWithWindowNibName:(NSString *)windowNibName withGameObjects:(GameObjects *)aGameObjects;
-@property (assign) IBOutlet NSWindow *window;
+@property (nonatomic,assign) IBOutlet NSWindow *window;
@property (nonatomic,assign) IBOutlet GameObjects *gameObjects;
@property (nonatomic,assign) IBOutlet NSMutableArray *pets;
-@property (nonatomic,assign) IBOutlet MacGLView *animationView;
+@property (nonatomic,retain) IBOutlet MacGLView *animationView;
@end
View
32 Gravy/PetsDocumentController.m
@@ -10,30 +10,38 @@
#import "cocos2d.h"
#import "PetsAnimationLayer.h"
+#define kPetAnimationView 2
+
+
@interface PetsDocumentController ()
- (void)prepareAnimationView;
@end
@implementation PetsDocumentController
-@synthesize animationView;
-@synthesize window;
+@synthesize window, animationView;
+
@synthesize gameObjects, pets;
-- (id)initWithWindowNibName:(NSString *)windowNibName withGameObjects:(GameObjects *)aGameObjects;
-{
- self = [super initWithWindowNibName:windowNibName];
+- (id)initWithGameObjects:(GameObjects *)aGameObjects {
+
+ self = [super init];
if ( self ) {
- [self setWindow:window];
+
[self setGameObjects:aGameObjects];
+ [NSBundle loadNibNamed:@"Pets" owner:self];
+
[self prepareAnimationView];
+
+
}
return self;
+
}
- (NSMutableArray *)pets {
@@ -42,18 +50,16 @@ - (NSMutableArray *)pets {
- (void)prepareAnimationView {
CCDirectorMac *director = (CCDirectorMac*) [CCDirector sharedDirector];
-
- [director setDisplayFPS:YES];
-
- [director setOpenGLView:[self animationView]];
+ [director setDisplayFPS:YES];
+
+ [director setOpenGLView:[self animationView]];
// EXPERIMENTAL stuff.
// 'Effects' don't work correctly when autoscale is turned on.
// Use kCCDirectorResize_NoScale if you don't want auto-scaling.
- [director setResizeMode:kCCDirectorResize_NoScale];
- //[director setResizeMode:kCCDirectorResize_AutoScale];
+ [director setResizeMode:kCCDirectorResize_AutoScale];
- [director runWithScene:[PetsAnimationLayer scene]];
+ [director runWithScene:[PetsAnimationLayer scene]];
}
@end

0 comments on commit ffa1b52

Please sign in to comment.