Created
December 17, 2010 02:17
-
-
Save possan/744381 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( m_new_award > m_old_award ) | |
{ | |
switch( m_new_award ) | |
{ | |
case MEDAL_BRONZE: | |
messagepart1 = [NSString stringWithFormat:@"Your TOTAL SCORE of %d won you the BRONZE MEDAL.", m_new_highscore]; | |
messagepart2 = [NSString stringWithFormat:@"Score more than %d to win the SILVER MEDAL!", m_silver_level]; | |
break; | |
case MEDAL_SILVER: | |
messagepart1 = [NSString stringWithFormat:@"Your TOTAL SCORE of %d won you the SILVER MEDAL.", m_new_highscore]; | |
messagepart2 = [NSString stringWithFormat:@"Score more than %d to win the GOLD MEDAL!", m_gold_level]; | |
break; | |
case MEDAL_GOLD: { | |
messagepart1 = [NSString stringWithFormat:@"Your TOTAL SCORE of %d won you the GOLD MEDAL.", m_new_highscore]; | |
messagepart2 = [NSString stringWithFormat:@"You are %d points away from a perfect score on this course!", m_perfect_level-m_new_highscore]; | |
break; | |
} | |
} | |
else | |
{ | |
if( m_new_highscore < m_old_highscore ) { | |
messagepart1 = [NSString stringWithFormat:@"You have not beaten your HIGH SCORE of %d.", m_old_highscore]; | |
} | |
else { | |
// #your new high score | |
messagepart1 = [NSString stringWithFormat:@"Your new HIGH SCORE is %d", m_new_highscore]; | |
} | |
switch( m_old_award ) { | |
case MEDAL_NONE: | |
messagepart2 = [NSString stringWithFormat:@"Score more than %d to win the BRONZE MEDAL!", m_bronze_level]; | |
break; | |
case MEDAL_BRONZE: | |
messagepart2 = [NSString stringWithFormat:@"Score more than %d to win the SILVER MEDAL!", m_silver_level]; | |
break; | |
case MEDAL_SILVER: | |
messagepart2 = [NSString stringWithFormat:@"Score more than %d to win the GOLD MEDAL!", m_gold_level]; | |
break; | |
case MEDAL_GOLD: | |
messagepart2 = [NSString stringWithFormat:@"You are %d points away from a perfect score on this course!", m_perfect_level-m_old_highscore]; | |
break; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment