1
0
mirror of https://github.com/thes3m/XNI synced 2024-12-26 13:26:06 +01:00

Xcode 4 release target added.

git-svn-id: http://xni.googlecode.com/svn/XNI@88 ac433895-eea3-a490-d80a-17149a75e588
This commit is contained in:
Matej Jan 2011-07-29 14:46:41 +00:00
parent 2201adf68b
commit 08e15ca3be
9 changed files with 878 additions and 15 deletions

View File

@ -29,7 +29,7 @@
numVertices = theNumVertices; numVertices = theNumVertices;
startIndex = theStartIndex; startIndex = theStartIndex;
primitiveCount = thePrimitiveCount; primitiveCount = thePrimitiveCount;
tag = [tag retain]; tag = [theTag retain];
indexBuffer = [theIndexBuffer retain]; indexBuffer = [theIndexBuffer retain];
vertexBuffer = [theVertexBuffer retain]; vertexBuffer = [theVertexBuffer retain];
material = [theMaterial retain]; material = [theMaterial retain];

View File

@ -44,7 +44,8 @@ static NSArray *drawOrderSort;
- (id) init - (id) init
{ {
if (self = [super init]) { self = [super init];
if (self) {
// Allocation and early initialization that doesn't depend on the graphics device. // Allocation and early initialization that doesn't depend on the graphics device.
gameTime = [[GameTime alloc] init]; gameTime = [[GameTime alloc] init];
@ -194,7 +195,7 @@ static NSArray *drawOrderSort;
- (void) applicationDidFinishLaunching:(UIApplication *)application { - (void) applicationDidFinishLaunching:(UIApplication *)application {
NSLog(@"Application has started."); NSLog(@"Application has started.");
[self run]; [self performSelector:@selector(run) withObject:nil afterDelay:0];
} }
- (void) applicationWillResignActive:(UIApplication *)application - (void) applicationWillResignActive:(UIApplication *)application

View File

@ -15,7 +15,8 @@
@implementation GameHost @implementation GameHost
- (id) init { - (id) init {
if (self = [super init]) { self = [super init];
if (self) {
[MediaPlayer load]; [MediaPlayer load];
window = [[GameWindow alloc] init]; window = [[GameWindow alloc] init];
} }

View File

@ -94,7 +94,7 @@ static Guide *instance = nil;
XniShowMessageBoxResult *result = [[[XniShowMessageBoxResult alloc] initWithAsyncState:state callback:callback] autorelease]; XniShowMessageBoxResult *result = [[[XniShowMessageBoxResult alloc] initWithAsyncState:state callback:callback] autorelease];
[messageBoxResults addObject:result]; [messageBoxResults addObject:result];
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title message:text delegate:result cancelButtonTitle:nil otherButtonTitles:nil]; UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:title message:text delegate:result cancelButtonTitle:nil otherButtonTitles:nil] autorelease];
for (NSString *button in buttons) { for (NSString *button in buttons) {
[alertView addButtonWithTitle:button]; [alertView addButtonWithTitle:button];

View File

@ -22,7 +22,8 @@
@implementation BasicEffect @implementation BasicEffect
-(id) initWithGraphicsDevice:(GraphicsDevice *)theGraphicsDevice { -(id) initWithGraphicsDevice:(GraphicsDevice *)theGraphicsDevice {
if (self = [super initWithGraphicsDevice:theGraphicsDevice]) { self = [super initWithGraphicsDevice:theGraphicsDevice];
if (self) {
// Create the main pass. // Create the main pass.
BasicEffectPass *mainPass = [[[BasicEffectPass alloc] initWithBasicEffect:self graphicsDevice:graphicsDevice] autorelease]; BasicEffectPass *mainPass = [[[BasicEffectPass alloc] initWithBasicEffect:self graphicsDevice:graphicsDevice] autorelease];
NSArray *passes = [NSArray arrayWithObject:mainPass]; NSArray *passes = [NSArray arrayWithObject:mainPass];
@ -120,7 +121,8 @@
@implementation BasicEffectPass @implementation BasicEffectPass
- (id) initWithBasicEffect:(BasicEffect *)theBasicEffect graphicsDevice:(GraphicsDevice*)theGraphicsDevice { - (id) initWithBasicEffect:(BasicEffect *)theBasicEffect graphicsDevice:(GraphicsDevice*)theGraphicsDevice {
if (self = [super initWithName:@"BasicEffectPass" graphicsDevice:theGraphicsDevice]) { self = [super initWithName:@"BasicEffectPass" graphicsDevice:theGraphicsDevice];
if (self) {
basicEffect = theBasicEffect; basicEffect = theBasicEffect;
} }
return self; return self;

View File

@ -30,7 +30,8 @@
- (id) initWithGame:(Game*)theGame - (id) initWithGame:(Game*)theGame
{ {
if (self = [super init]) self = [super init];
if (self)
{ {
game = theGame; game = theGame;
multisampling = NO; multisampling = NO;

View File

@ -13,7 +13,8 @@
@implementation IndexArray @implementation IndexArray
- (id) initWithItemSize:(int)itemSize initialCapacity:(int)initialCapacity { - (id) initWithItemSize:(int)itemSize initialCapacity:(int)initialCapacity {
if (self = [super init]) { self = [super init];
if (self) {
array = [[XniAdaptiveArray alloc] initWithItemSize:itemSize initialCapacity:initialCapacity]; array = [[XniAdaptiveArray alloc] initWithItemSize:itemSize initialCapacity:initialCapacity];
} }
return self; return self;

View File

@ -14,7 +14,8 @@
- (id) initWithInitialCapacity:(int)initialCapacity { - (id) initWithInitialCapacity:(int)initialCapacity {
if (self = [super initWithItemSize:sizeof(short) initialCapacity:initialCapacity]) { self = [super initWithItemSize:sizeof(short) initialCapacity:initialCapacity];
if (self) {
} }
return self; return self;
} }

File diff suppressed because one or more lines are too long