Breaking a 2D image

Apprentice
Posts: 6
Joined: 2009.01
Post: #1
Hi,

I want to break images into pieces to make a puzzle game.I have tried with CGRectDivide method but having problem with the last parameter.

Also can anyone help me how to create and use the 2D array in Objective-C.

How can I access the index of particular array ??
Quote this message in a reply
Member
Posts: 93
Joined: 2008.11
Post: #2
For the second question, I would use NSArray / NSMutableArray if you don't care too much about speed. I guess in a puzzle game that's ok.
You can do like this (out of my head. the message names can differ a bit):

NSArray* myArr = [[NSArray alloc] initWithObjects:@"one", @"two", nil];
NSString* twoStr = [myArr objectAtIndex:1];
Quote this message in a reply
Post Reply