<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -260,7 +260,7 @@ static Director *_sharedDirector = nil;
 {
 	glMatrixMode(GL_PROJECTION);
 	glLoadIdentity();
-	glOrthof(0, openGLView_.frame.size.width, 0, openGLView_.frame.size.height, -100, 100);
+	glOrthof(0, openGLView_.frame.size.width, 0, openGLView_.frame.size.height, -1, 1);
 	glMatrixMode(GL_MODELVIEW);
 	glLoadIdentity();
 }
@@ -303,7 +303,7 @@ static Director *_sharedDirector = nil;
 		glClearDepthf(1.0f);
 		glEnable(GL_DEPTH_TEST);
 		glDepthFunc(GL_LEQUAL);
-//		glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+		glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
 	} else
 		glDisable( GL_DEPTH_TEST );
 }</diff>
      <filename>cocos2d/Director.m</filename>
    </modified>
    <modified>
      <diff>@@ -45,6 +45,11 @@ typedef enum {
 	kPostStatusPostFailed = 2,
 } tPostStatus;
 
+enum {
+	//! Invalid Ranking. Valid rankins are from 1 to ...
+	kServerPostInvalidRanking = 0,
+};
+
 /**
  * Handles the Score Post to the cocos live server
  */
@@ -58,6 +63,12 @@ typedef enum {
 
 	/// delegate instance of fetch score
 	id			delegate;
+	
+	/// ranking
+	NSUInteger	ranking_;
+	
+	/// score was updated
+	BOOL		scoreDidUpdate_;
 
 	/// data received
 	NSMutableData *receivedData;
@@ -66,13 +77,24 @@ typedef enum {
 	NSMutableArray *bodyValues;
 	
 	/// status of the request
-	tPostStatus		postStatus;
+	tPostStatus		postStatus_;
 	
 	/// mdt context
 	CC_MD5_CTX		md5Ctx;
 }
 
+/** status from the score post */ 
 @property (readonly) tPostStatus postStatus;
+ 
+/** ranking of your score
+ @since v0.7.3
+ */
+@property (readonly) NSUInteger ranking;
+
+/** whether or not the score was updated
+ @since v0.7.3
+ */
+@property (readonly) BOOL scoreDidUpdate;
 
 /** creates a cocos server with a game name and a game key */
 +(id) serverWithGameName:(NSString*) name gameKey:(NSString*) key delegate:(id)delegate;
@@ -94,6 +116,8 @@ typedef enum {
 
 /** CocosLivePost protocol */
 @protocol CocosLivePostDelegate &lt;NSObject&gt;
+/** callback method that will be called if the post is successful */
 -(void) scorePostOk:(id) sender;
+/** callback method that will be called if the post fails */
 -(void) scorePostFail:(id) sender;
 @end</diff>
      <filename>cocoslive/ScoreServerPost.h</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,9 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
 
 @implementation ScoreServerPost
 
-@synthesize postStatus;
+@synthesize postStatus = postStatus_;
+@synthesize ranking = ranking_;
+@synthesize scoreDidUpdate = scoreDidUpdate_;
 
 +(id) serverWithGameName:(NSString*) name gameKey:(NSString*) key delegate:(id) delegate
 {
@@ -53,6 +55,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
 		bodyValues = [[NSMutableArray arrayWithCapacity:5] retain];
 		delegate = [aDelegate retain];
 		receivedData = [[NSMutableData data] retain];
+		
+		ranking_ = kServerPostInvalidRanking;
 	}
 	
 	return self;
@@ -90,7 +94,7 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
     [receivedData setLength:0];
 	
 	// reset status
-	postStatus = kPostStatusOK;
+	postStatus_ = kPostStatusOK;
 		
 	// create the request
 	NSMutableURLRequest *post = [self scoreServerRequestWithURLString:(isUpdate ? SCORE_SERVER_UPDATE_URL : SCORE_SERVER_SEND_URL)];
@@ -240,7 +244,7 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
 	CCLOG(@&quot;Connection failed&quot;);
 
 	// wifi problems ?
-	postStatus = kPostStatusConnectionFailed;
+	postStatus_ = kPostStatusConnectionFailed;
 
     // release the connection, and the data object
     [connection release];
@@ -257,16 +261,40 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
 	if( [dataString isEqual: @&quot;OK&quot;] ) {
 		
 		// Ok
-		postStatus = kPostStatusOK;
+		postStatus_ = kPostStatusOK;
 
 		if( [delegate respondsToSelector:@selector(scorePostOk:) ] )
 			[delegate scorePostOk:self];
+
+	} else if( [dataString hasPrefix:@&quot;OK:&quot;] ) {
+		// parse ranking and other possible answers
+		NSArray *values = [dataString componentsSeparatedByString:@&quot;:&quot;];
+		NSArray *answer = [ [values objectAtIndex:1] componentsSeparatedByString:@&quot;,&quot;];
+		NSEnumerator *nse = [answer objectEnumerator];
+		
+		// Create a holder for each line we are going to work with
+		NSString *line;
+		
+		// Loop through all the lines in the lines array processing each one
+		while( (line = [nse nextObject]) ) {
+			NSArray *keyvalue = [line componentsSeparatedByString:@&quot;=&quot;];
+//			NSLog(@&quot;%@&quot;,keyvalue);
+			if( [[keyvalue objectAtIndex:0] isEqual:@&quot;ranking&quot;] ) {
+				ranking_ = [[keyvalue objectAtIndex:1] intValue];
+			} else if( [[keyvalue objectAtIndex:0] isEqual:@&quot;score_updated&quot;] ) {
+				scoreDidUpdate_ = [[keyvalue objectAtIndex:1] boolValue];
+			}
+			
+		}
+		if( [delegate respondsToSelector:@selector(scorePostOk:) ] )
+			[delegate scorePostOk:self];
+		
 	} else {
 		
 		CCLOG(@&quot;Post Score failed. Reason: %@&quot;, dataString);
 
 		// Error parsing answer
-		postStatus = kPostStatusPostFailed;
+		postStatus_ = kPostStatusPostFailed;
 
 		if( [delegate respondsToSelector:@selector(scorePostFail:) ] )
 			[delegate scorePostFail:self];</diff>
      <filename>cocoslive/ScoreServerPost.m</filename>
    </modified>
    <modified>
      <diff>@@ -14,8 +14,8 @@
 
 
 // 0x00 HI ME LO
-// 00   00 02 00
-#define COCOSLIVE_VERSION 0x00000200
+// 00   00 03 02
+#define COCOSLIVE_VERSION 0x00000302
 
 // to use localserver. DEBUG ONLY
 //#define USE_LOCAL_SERVER 1</diff>
      <filename>cocoslive/cocoslive.h</filename>
    </modified>
    <modified>
      <diff>@@ -148,11 +148,13 @@ float randfloat() {
 	[window setMultipleTouchEnabled:NO];
 	
 	// must be called before any othe call to the director
-	[Director useFastDirector];
+//	[Director useFastDirector];
 	
 	// before creating any layer, set the landscape mode
 	[[Director sharedDirector] setLandscape: YES];
-
+	[[Director sharedDirector] setAnimationInterval:1.0/60];
+	[[Director sharedDirector] setDisplayFPS:YES];
+	
 	// multiple touches or not ?
 //	[[Director sharedDirector] setMultipleTouchEnabled:YES];
 	</diff>
      <filename>tests/AccelViewportTest.m</filename>
    </modified>
    <modified>
      <diff>@@ -202,7 +202,7 @@ enum {
 	
 	state = kStateEnd;
 
-	[self runCocos2d];
+//	[self runCocos2d];
 }
 
 #pragma mark -</diff>
      <filename>tests/attachDemo/attachDemo.m</filename>
    </modified>
    <modified>
      <diff>@@ -164,6 +164,14 @@
 -(void) scorePostOk: (id) sender
 {
 	NSLog(@&quot;score post OK&quot;);
+	if( [sender ranking] != kServerPostInvalidRanking &amp;&amp; [sender scoreDidUpdate]) {
+		NSString *message = [NSString stringWithFormat:@&quot;World ranking: %d&quot;, [sender ranking]];
+		UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@&quot;Post Ok.&quot; message:message delegate:nil cancelButtonTitle:nil otherButtonTitles:@&quot;OK&quot;, nil];	
+		alert.tag = 2;
+		[alert show];
+		[alert release];		
+		
+	}
 }
 
 -(void) scorePostFail: (id) sender</diff>
      <filename>tests/cocosLive/cocosLiveDemo.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>27ce546a5a27f19006e179d50b774800b56c68aa</id>
    </parent>
  </parents>
  <author>
    <name>ricardoquesada</name>
    <email>ricardoquesada@79afc9a6-2f50-0410-804d-6f1bdedaafc9</email>
  </author>
  <url>http://github.com/funkaster/cocos2d-iphone/commit/bba1c219bbd75864c98eadfe77ac3ea24c01981f</url>
  <id>bba1c219bbd75864c98eadfe77ac3ea24c01981f</id>
  <committed-date>2009-05-11T06:12:28-07:00</committed-date>
  <authored-date>2009-05-11T06:12:28-07:00</authored-date>
  <message>improved world ranking support.
part of issue #342</message>
  <tree>9546405b4d56f6a223912b9e4c3ecd7fa62ecaad</tree>
  <committer>
    <name>ricardoquesada</name>
    <email>ricardoquesada@79afc9a6-2f50-0410-804d-6f1bdedaafc9</email>
  </committer>
</commit>
