From 2ac50443ddbf69b7594808ba4e6de49eecbc0b84 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Mon, 22 Aug 2011 19:52:08 -0400 Subject: Added borders to level selection images The image for each level selection now has a tutorial bubble-esque border around it, which was achieved using image masking. The border is included in the graying-out effect when the image is being tapped, and it is also included in the grayscaling when the level is not yet unlocked. Also rewrote most of the selection drawing code. The titles are now drawn above the image, with Quartz instead of Cocos2D. The highscore label is also drawn with Quartz, though it is still below the image. The unlock condition label no longer appears, and instead, locked levels are now tappable and tapping them shows an alert view containing the unlock condition. Will probably be changed to be more elegant later. Really, the biggest thing left before the selection screen is done is the ability to scroll through levels. The background also needs changing, but that will come later once I recruit a graphics designer. :P Refs #207 --- Cartographic.xcodeproj/project.pbxproj | 22 +--- Classes/GameModeSelection.h | 8 +- Classes/GameModeSelection.m | 195 ++++++++++++++++++++++++--------- Classes/GameModeSelectionLayer.m | 15 +-- Classes/UIImage+ColorMasking.h | 15 +++ Classes/UIImage+ColorMasking.m | 77 +++++++++++++ Resources/leveldescriptions.fnt | 99 ----------------- Resources/leveldescriptions.png | Bin 7780 -> 0 bytes Resources/levelnames.fnt | 99 ----------------- Resources/levelnames.png | Bin 8652 -> 0 bytes 10 files changed, 253 insertions(+), 277 deletions(-) create mode 100644 Classes/UIImage+ColorMasking.h create mode 100644 Classes/UIImage+ColorMasking.m delete mode 100644 Resources/leveldescriptions.fnt delete mode 100644 Resources/leveldescriptions.png delete mode 100644 Resources/levelnames.fnt delete mode 100644 Resources/levelnames.png diff --git a/Cartographic.xcodeproj/project.pbxproj b/Cartographic.xcodeproj/project.pbxproj index 6676ba3..cda609e 100755 --- a/Cartographic.xcodeproj/project.pbxproj +++ b/Cartographic.xcodeproj/project.pbxproj @@ -101,6 +101,7 @@ 6C0C140E13F1C3EC003A31B2 /* ValuableObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C0C140D13F1C3EC003A31B2 /* ValuableObject.m */; }; 6C0C141113F2099B003A31B2 /* Cart.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C0C141013F2099B003A31B2 /* Cart.m */; }; 6C0C141413F20E98003A31B2 /* GameMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C0C141313F20E98003A31B2 /* GameMode.m */; }; + 6C18C3CA1402AD9C0005AA4C /* UIImage+ColorMasking.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C18C3C91402AD9C0005AA4C /* UIImage+ColorMasking.m */; }; 6C29041013EAEB590032DA0F /* TutorialBubble.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C29040F13EAEB590032DA0F /* TutorialBubble.m */; }; 6C29041213EAEC8A0032DA0F /* framestuff.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C29041113EAEC8A0032DA0F /* framestuff.png */; }; 6C39CFE013FC2708002B21AF /* tutorial.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C39CFDF13FC2708002B21AF /* tutorial.png */; }; @@ -108,11 +109,7 @@ 6C39CFF313FD4F8B002B21AF /* GameModeSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C39CFF213FD4F89002B21AF /* GameModeSelection.m */; }; 6C39CFF513FD5526002B21AF /* paintdaubs.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C39CFF413FD5526002B21AF /* paintdaubs.png */; }; 6C39CFF813FD7638002B21AF /* GameModeSelectionLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C39CFF713FD7637002B21AF /* GameModeSelectionLayer.m */; }; - 6C39CFFB13FD7DDE002B21AF /* levelnames.fnt in Resources */ = {isa = PBXBuildFile; fileRef = 6C39CFF913FD7DDE002B21AF /* levelnames.fnt */; }; - 6C39CFFC13FD7DDE002B21AF /* levelnames.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C39CFFA13FD7DDE002B21AF /* levelnames.png */; }; 6C39D00813FD9037002B21AF /* florence.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C39D00713FD9037002B21AF /* florence.png */; }; - 6C39D00B13FD933D002B21AF /* leveldescriptions.fnt in Resources */ = {isa = PBXBuildFile; fileRef = 6C39D00913FD933D002B21AF /* leveldescriptions.fnt */; }; - 6C39D00C13FD933D002B21AF /* leveldescriptions.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C39D00A13FD933D002B21AF /* leveldescriptions.png */; }; 6C39D01213FD9945002B21AF /* paris.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C39D01113FD9945002B21AF /* paris.png */; }; 6C5179C613DF3839006F1F38 /* Morning1.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C5179C513DF3839006F1F38 /* Morning1.png */; }; 6CC89DD913F2F4E6003704F7 /* Entitlements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6CC89DD813F2F4E6003704F7 /* Entitlements.plist */; }; @@ -415,6 +412,8 @@ 6C0C141013F2099B003A31B2 /* Cart.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Cart.m; sourceTree = ""; }; 6C0C141213F20E98003A31B2 /* GameMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameMode.h; sourceTree = ""; }; 6C0C141313F20E98003A31B2 /* GameMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameMode.m; sourceTree = ""; }; + 6C18C3C81402AD9C0005AA4C /* UIImage+ColorMasking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ColorMasking.h"; sourceTree = ""; }; + 6C18C3C91402AD9C0005AA4C /* UIImage+ColorMasking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ColorMasking.m"; sourceTree = ""; }; 6C29040E13EAEB590032DA0F /* TutorialBubble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TutorialBubble.h; sourceTree = ""; }; 6C29040F13EAEB590032DA0F /* TutorialBubble.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TutorialBubble.m; sourceTree = ""; }; 6C29041113EAEC8A0032DA0F /* framestuff.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = framestuff.png; sourceTree = ""; }; @@ -425,11 +424,7 @@ 6C39CFF413FD5526002B21AF /* paintdaubs.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = paintdaubs.png; sourceTree = ""; }; 6C39CFF613FD7636002B21AF /* GameModeSelectionLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameModeSelectionLayer.h; sourceTree = ""; }; 6C39CFF713FD7637002B21AF /* GameModeSelectionLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameModeSelectionLayer.m; sourceTree = ""; }; - 6C39CFF913FD7DDE002B21AF /* levelnames.fnt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = levelnames.fnt; sourceTree = ""; }; - 6C39CFFA13FD7DDE002B21AF /* levelnames.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = levelnames.png; sourceTree = ""; }; 6C39D00713FD9037002B21AF /* florence.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = florence.png; sourceTree = ""; }; - 6C39D00913FD933D002B21AF /* leveldescriptions.fnt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = leveldescriptions.fnt; sourceTree = ""; }; - 6C39D00A13FD933D002B21AF /* leveldescriptions.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = leveldescriptions.png; sourceTree = ""; }; 6C39D01113FD9945002B21AF /* paris.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = paris.png; sourceTree = ""; }; 6C5179C513DF3839006F1F38 /* Morning1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Morning1.png; sourceTree = ""; }; 6CC89DD813F2F4E6003704F7 /* Entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Entitlements.plist; sourceTree = ""; }; @@ -736,6 +731,8 @@ 6C39CFF213FD4F89002B21AF /* GameModeSelection.m */, 6C39CFF613FD7636002B21AF /* GameModeSelectionLayer.h */, 6C39CFF713FD7637002B21AF /* GameModeSelectionLayer.m */, + 6C18C3C81402AD9C0005AA4C /* UIImage+ColorMasking.h */, + 6C18C3C91402AD9C0005AA4C /* UIImage+ColorMasking.m */, ); path = Classes; sourceTree = ""; @@ -777,10 +774,6 @@ 3F6C7F5D13D648D300C038FE /* Fonts */ = { isa = PBXGroup; children = ( - 6C39D00913FD933D002B21AF /* leveldescriptions.fnt */, - 6C39D00A13FD933D002B21AF /* leveldescriptions.png */, - 6C39CFF913FD7DDE002B21AF /* levelnames.fnt */, - 6C39CFFA13FD7DDE002B21AF /* levelnames.png */, 3F7D0F3D13D8F0C800B6CE14 /* getoffthatboatrightnowyounglady.fnt */, 3F7D0F3E13D8F0C800B6CE14 /* getoffthatboatrightnowyounglady.png */, 3F6C7F5913D648CE00C038FE /* helvetica2.fnt */, @@ -1403,11 +1396,7 @@ 6C39CFE013FC2708002B21AF /* tutorial.png in Resources */, 6C39CFE213FC2713002B21AF /* tutorial2.png in Resources */, 6C39CFF513FD5526002B21AF /* paintdaubs.png in Resources */, - 6C39CFFB13FD7DDE002B21AF /* levelnames.fnt in Resources */, - 6C39CFFC13FD7DDE002B21AF /* levelnames.png in Resources */, 6C39D00813FD9037002B21AF /* florence.png in Resources */, - 6C39D00B13FD933D002B21AF /* leveldescriptions.fnt in Resources */, - 6C39D00C13FD933D002B21AF /* leveldescriptions.png in Resources */, 6C39D01213FD9945002B21AF /* paris.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1455,6 +1444,7 @@ 6CC89DDF13F31413003704F7 /* TutorialMode.m in Sources */, 6C39CFF313FD4F8B002B21AF /* GameModeSelection.m in Sources */, 6C39CFF813FD7638002B21AF /* GameModeSelectionLayer.m in Sources */, + 6C18C3CA1402AD9C0005AA4C /* UIImage+ColorMasking.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Classes/GameModeSelection.h b/Classes/GameModeSelection.h index 66d0a5a..f6aaeff 100644 --- a/Classes/GameModeSelection.h +++ b/Classes/GameModeSelection.h @@ -12,19 +12,15 @@ NSString* name; NSString* location; BOOL unlocked; - int highscore; NSString* unlockCondition; - - CCLabelBMFont* nameLabel; - CCLabelBMFont* otherLabel; } @property (readonly) NSString* name; @property (readonly) NSString* location; @property (readonly) BOOL unlocked; -@property (nonatomic,assign) int highscore; -@property (nonatomic,retain) NSString* unlockCondition; - (id)initWithName:(NSString*)name location:(NSString*)location filename:(NSString*)filename unlocked:(BOOL)unlocked; +- (id)initWithName:(NSString *)name location:(NSString *)location filename:(NSString *)filename highscore:(int)highscore; +- (id)initWithName:(NSString *)name location:(NSString *)location filename:(NSString *)filename unlockCondition:(NSString*)unlockCondition; - (void)buttonTapped; @end diff --git a/Classes/GameModeSelection.m b/Classes/GameModeSelection.m index 0816828..fc6797a 100644 --- a/Classes/GameModeSelection.m +++ b/Classes/GameModeSelection.m @@ -9,10 +9,11 @@ #import "GameModeSelection.h" #import "TutorialMode.h" #import "ClassicGameMode.h" +#import "UIImage+ColorMasking.h" @implementation GameModeSelection -@synthesize name, location, unlocked, highscore, unlockCondition; +@synthesize name, location, unlocked; - (id)initWithName:(NSString*)m_name location:(NSString*)m_location filename:(NSString*)filename unlocked:(BOOL)m_unlocked; { @@ -26,92 +27,186 @@ location = m_location; unlocked = m_unlocked; - if (!unlocked) + NSString* filenameMod; + + if (unlocked) { + filenameMod = [NSString stringWithFormat:@"%@-unlocked", filename]; + } else { + filenameMod = [NSString stringWithFormat:@"%@-locked", filename]; name = [@"" stringByPaddingToLength:name.length withString:@"?" startingAtIndex:0]; location = [@"" stringByPaddingToLength:location.length withString:@"?" startingAtIndex:0]; } - nameLabel = [CCLabelBMFont labelWithString:[NSString stringWithFormat:@"%@ (%@)", location, name] fntFile:@"levelnames.fnt"]; + // First, create the frame that we will put the level picture inside + CGImageRef framestuff = [[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"framestuff" ofType:@"png"]] CGImage]; + CGImageRef topLeftRef = CGImageCreateWithImageInRect(framestuff, CGRectMake(0, 0, 8, 8)); + CGImageRef topRightRef = CGImageCreateWithImageInRect(framestuff, CGRectMake(8, 0, 8, 8)); + CGImageRef bottomLeftRef = CGImageCreateWithImageInRect(framestuff, CGRectMake(0, 8, 8, 8)); + CGImageRef bottomRightRef = CGImageCreateWithImageInRect(framestuff, CGRectMake(8, 8, 8, 8)); + CGImageRef topBorderRef = CGImageCreateWithImageInRect(framestuff, CGRectMake(0, 16, 8, 8)); + CGImageRef leftBorderRef = CGImageCreateWithImageInRect(framestuff, CGRectMake(8, 16, 8, 8)); + CGImageRef rightBorderRef = CGImageCreateWithImageInRect(framestuff, CGRectMake(0, 24, 8, 8)); + CGImageRef bottomBorderRef = CGImageCreateWithImageInRect(framestuff, CGRectMake(8, 24, 8, 8)); + UIImage* topLeft = [UIImage imageWithCGImage:topLeftRef]; + UIImage* topRight = [UIImage imageWithCGImage:topRightRef]; + UIImage* bottomLeft = [UIImage imageWithCGImage:bottomLeftRef]; + UIImage* bottomRight = [UIImage imageWithCGImage:bottomRightRef]; + UIImage* topBorder = [UIImage imageWithCGImage:topBorderRef]; + UIImage* leftBorder = [UIImage imageWithCGImage:leftBorderRef]; + UIImage* rightBorder = [UIImage imageWithCGImage:rightBorderRef]; + UIImage* bottomBorder = [UIImage imageWithCGImage:bottomBorderRef]; + CGImageRelease(topLeftRef); + CGImageRelease(topRightRef); + CGImageRelease(bottomLeftRef); + CGImageRelease(bottomRightRef); + CGImageRelease(topBorderRef); + CGImageRelease(leftBorderRef); + CGImageRelease(rightBorderRef); + CGImageRelease(bottomBorderRef); - [self addChild:nameLabel]; - nameLabel.position = ccp(0, -32-nameLabel.contentSize.height); + CGSize boxSize = CGSizeMake(128+12, 128+12); + UIGraphicsBeginImageContext(boxSize); + CGContextRef context = UIGraphicsGetCurrentContext(); + [topLeft drawInRect:CGRectMake(0, 0, 8, 8)]; + [topBorder drawInRect:CGRectMake(8, 0, boxSize.width-16, 8)]; + [topRight drawInRect:CGRectMake(8+boxSize.width-16, 0, 8, 8)]; + [rightBorder drawInRect:CGRectMake(8+boxSize.width-16, 8, 8, boxSize.height-16)]; + [bottomRight drawInRect:CGRectMake(8+boxSize.width-16, 8+boxSize.height-16, 8, 8)]; + [bottomBorder drawInRect:CGRectMake(8, 8+boxSize.height-16, boxSize.width-16, 8)]; + [bottomLeft drawInRect:CGRectMake(0, 8+boxSize.height-16, 8, 8)]; + [leftBorder drawInRect:CGRectMake(0, 8, 8, boxSize.height-16)]; + CGContextSetFillColorWithColor(context, [[UIColor whiteColor] CGColor]); + CGContextFillRect(context, CGRectMake(8, 8, boxSize.width-16, boxSize.height-16)); + UIImage* selectionBackground = UIGraphicsGetImageFromCurrentImageContext(); + // Now we want to put the level image inside the frame without messing up the frame itself UIImage* innerPicture = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:filename ofType:@"png"]]; - UIGraphicsBeginImageContext(CGSizeMake(128, 128)); - CGContextRef context = UIGraphicsGetCurrentContext(); - UIGraphicsPushContext(context); + CGContextClipToMask(context, CGRectMake(0, 0, boxSize.width, boxSize.height), [[selectionBackground opaqueMaskFromWhiteImage] CGImage]); + [innerPicture drawInRect:CGRectMake(6, 6, 128, 128)]; + selectionBackground = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + // The frame needs a shadow, so let's redraw it in a new context + UIGraphicsBeginImageContext(CGSizeMake(boxSize.width+10, boxSize.height+10)); + context = UIGraphicsGetCurrentContext(); + CGContextSaveGState(context); if (unlocked) { - [innerPicture drawInRect:CGRectMake(0, 0, 128, 128)]; + CGContextSetShadow(context, CGSizeMake(-6, 6), 4.0f); + [selectionBackground drawInRect:CGRectMake(10, 0, boxSize.width, boxSize.height)]; } else { + // Draw the picture in grayscale if the level has not yet been unlocked + CGContextClipToMask(context, CGRectMake(10, 0, boxSize.width, boxSize.height), [selectionBackground CGImage]); CGContextSetFillColorWithColor(context, [[UIColor whiteColor] CGColor]); - CGContextFillRect(context, CGRectMake(0, 0, 128, 128)); - [innerPicture drawInRect:CGRectMake(0, 0, 128, 128) blendMode:kCGBlendModeLuminosity alpha:1.0]; + CGContextFillRect(context, CGRectMake(10, 0, boxSize.width, boxSize.height)); + CGContextRestoreGState(context); + + CGContextSaveGState(context); + CGContextSetShadow(context, CGSizeMake(-6, 6), 4.0f); + [selectionBackground drawInRect:CGRectMake(10, 0, boxSize.width, boxSize.height) blendMode:kCGBlendModeLuminosity alpha:1.0]; } - UIGraphicsPopContext(); - CGImageRef innerPictureRef = [UIGraphicsGetImageFromCurrentImageContext() CGImage]; + CGContextRestoreGState(context); + CGImageRef pictureRef = [UIGraphicsGetImageFromCurrentImageContext() CGImage]; - if (unlocked) - { - CCSprite* picture = [CCSprite spriteWithCGImage:innerPictureRef key:[NSString stringWithFormat:@"gms-%@", filename]]; - UIGraphicsPushContext(context); - CGContextSetFillColorWithColor(context, [[UIColor colorWithRed:0 green:0 blue:0 alpha:0.5] CGColor]); - CGContextFillRect(context, CGRectMake(0, 0, 128, 128)); - UIGraphicsPopContext(); - CGImageRef selectedButtonRef = [UIGraphicsGetImageFromCurrentImageContext() CGImage]; - CCSprite* selectedButton = [CCSprite spriteWithCGImage:selectedButtonRef key:[NSString stringWithFormat:@"gms-%@-selected", filename]]; - - CCMenuItemSprite* pictureMenuItem = [CCMenuItemSprite itemFromNormalSprite:picture selectedSprite:selectedButton target:self selector:@selector(buttonTapped)]; - CCMenu* theMenu = [CCMenu menuWithItems:pictureMenuItem, nil]; - theMenu.position = ccp(0, 32); - [self addChild:theMenu]; - } else { - CCSprite* picture = [CCSprite spriteWithCGImage:innerPictureRef key:[NSString stringWithFormat:@"gms-%@-locked", filename]]; - picture.position = ccp(0, 32); - [self addChild:picture]; - } + CCSprite* picture = [CCSprite spriteWithCGImage:pictureRef key:[NSString stringWithFormat:@"gms-%@", filenameMod]]; + // We're also going to need a "selected" image state for the button + CGContextSaveGState(context); + CGContextClipToMask(context, CGRectMake(10, 0, boxSize.width, boxSize.height), [selectionBackground CGImage]); + CGContextSetFillColorWithColor(context, [[UIColor colorWithRed:0 green:0 blue:0 alpha:0.5] CGColor]); + CGContextFillRect(context, CGRectMake(10, 0, boxSize.width, boxSize.height)); + CGContextRestoreGState(context); + CGImageRef selectedButtonRef = [UIGraphicsGetImageFromCurrentImageContext() CGImage]; UIGraphicsEndImageContext(); + CCSprite* selectedButton = [CCSprite spriteWithCGImage:selectedButtonRef key:[NSString stringWithFormat:@"gms-%@-selected", filenameMod]]; + + CCMenuItemSprite* pictureMenuItem = [CCMenuItemSprite itemFromNormalSprite:picture selectedSprite:selectedButton target:self selector:@selector(buttonTapped)]; + CCMenu* theMenu = [CCMenu menuWithItems:pictureMenuItem, nil]; + theMenu.position = ccp(-5, 0); + [self addChild:theMenu]; + + // Render the titles + UIFont* titleFont = [UIFont fontWithName:@"AmericanTypewriter-Bold" size:18.0f]; + CGSize titleSize = [location sizeWithFont:titleFont constrainedToSize:CGSizeMake(128, 0)]; + UIFont* subtitleFont = [UIFont fontWithName:@"AmericanTypewriter" size:18.0f]; + CGSize subtitleSize = [name sizeWithFont:subtitleFont constrainedToSize:CGSizeMake(128, 0)]; + CGSize combinedTitleSize = CGSizeMake(128, titleSize.height + 10 + subtitleSize.height + 10); + + UIGraphicsBeginImageContext(combinedTitleSize); + context = UIGraphicsGetCurrentContext(); + CGContextSetShadow(context, CGSizeMake(-6, 6), 4.0f); + [location drawInRect:CGRectMake(10, 0, 128, titleSize.height) withFont:titleFont lineBreakMode:UILineBreakModeWordWrap alignment:UITextAlignmentCenter]; + [name drawInRect:CGRectMake(10, titleSize.height, 128, subtitleSize.height) withFont:subtitleFont lineBreakMode:UILineBreakModeWordWrap alignment:UITextAlignmentCenter]; + + CGImageRef titleImage = [UIGraphicsGetImageFromCurrentImageContext() CGImage]; + UIGraphicsEndImageContext(); + CCSprite* titleSprite = [CCSprite spriteWithCGImage:titleImage key:[NSString stringWithFormat:@"gms-%@-title", filenameMod]]; + titleSprite.position = ccp(-10, (boxSize.height)/2+(combinedTitleSize.height)/2); + [self addChild:titleSprite]; } return self; } -- (void)setHighscore:(int)m_highscore +- (id)initWithName:(NSString *)m_name location:(NSString *)m_location filename:(NSString *)m_filename highscore:(int)m_highscore { - if (unlocked) + self = [self initWithName:m_name location:m_location filename:m_filename unlocked:YES]; + + if (nil != self) { - highscore = m_highscore; - - otherLabel = [CCLabelBMFont labelWithString:[NSString stringWithFormat:@"Highscore: %d", highscore] fntFile:@"leveldescriptions.fnt"]; - otherLabel.position = ccp(0, -32-nameLabel.contentSize.height-otherLabel.contentSize.height); - [self addChild:otherLabel]; + if (m_highscore != 0) + { + // Render the highscore label + NSString* highscoreString = [NSString stringWithFormat:@"Highscore: %d", m_highscore]; + UIFont* highscoreFont = [UIFont fontWithName:@"AmericanTypewriter" size:16.0f]; + CGSize highscoreSize = [highscoreString sizeWithFont:highscoreFont]; + + UIGraphicsBeginImageContext(CGSizeMake(highscoreSize.width+10, highscoreSize.height+10)); + CGContextRef context = UIGraphicsGetCurrentContext(); + CGContextSetShadow(context, CGSizeMake(-6, 6), 4.0f); + [highscoreString drawInRect:CGRectMake(10, 0, highscoreSize.width, highscoreSize.height) withFont:highscoreFont]; + + CGImageRef highscoreImage = [UIGraphicsGetImageFromCurrentImageContext() CGImage]; + UIGraphicsEndImageContext(); + CCSprite* highscoreSprite = [CCSprite spriteWithCGImage:highscoreImage key:[NSString stringWithFormat:@"gms-%@-highscore", m_filename]]; + highscoreSprite.position = ccp((128-highscoreSize.width)/2, 0-64-(highscoreSize.height)/2-10); + [self addChild:highscoreSprite]; + } } + + return self; } -- (void)setUnlockCondition:(NSString *)m_unlockCondition +- (id)initWithName:(NSString *)m_name location:(NSString *)m_location filename:(NSString *)m_filename unlockCondition:(NSString*)m_unlockCondition { - if (!unlocked) + self = [self initWithName:m_name location:m_location filename:m_filename unlocked:NO]; + + if (nil != self) { unlockCondition = m_unlockCondition; - - otherLabel = [CCLabelBMFont labelWithString:unlockCondition fntFile:@"leveldescriptions.fnt"]; - otherLabel.position = ccp(0, -32-nameLabel.contentSize.height-otherLabel.contentSize.height); - [self addChild:otherLabel]; } + + return self; } - (void)buttonTapped { - if ([name isEqual:@"Tutorial"]) - { - [[CCDirector sharedDirector] replaceScene:[TutorialMode scene]]; - } else if ([name isEqual:@"Collect"]) + if (unlocked) { - [[CCDirector sharedDirector] replaceScene:[ClassicGameMode scene]]; + if ([name isEqual:@"Tutorial"]) + { + [[CCDirector sharedDirector] replaceScene:[TutorialMode scene]]; + } else if ([name isEqual:@"Collect"]) + { + [[CCDirector sharedDirector] replaceScene:[ClassicGameMode scene]]; + } + } else { + UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"To unlock this game mode:" message:unlockCondition delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:nil]; + [alertView show]; + [alertView release]; } } diff --git a/Classes/GameModeSelectionLayer.m b/Classes/GameModeSelectionLayer.m index 3e1995e..a90606e 100644 --- a/Classes/GameModeSelectionLayer.m +++ b/Classes/GameModeSelectionLayer.m @@ -42,27 +42,28 @@ [self addChild:tutorialSelection]; NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; - GameModeSelection* collectSelection = [[[GameModeSelection alloc] initWithName:@"Collect" location:@"Paris" filename:@"paris" unlocked:[defaults boolForKey:@"hasDoneTutorial"]] autorelease]; - collectSelection.position = ccp(400-32, 160); + GameModeSelection* collectSelection; - if (collectSelection.unlocked) + if ([defaults boolForKey:@"hasDoneTutorial"]) { const char* sqlQuery = "SELECT * FROM highscores ORDER BY score DESC LIMIT 1"; sqlite3_stmt* compiled_statement; + int score = 0; if (sqlite3_prepare_v2([Cart_CollectAppDelegate database], sqlQuery, -1, &compiled_statement, NULL) == SQLITE_OK) { if (sqlite3_step(compiled_statement) == SQLITE_ROW) { - int score = sqlite3_column_int(compiled_statement, 2); - - [collectSelection setHighscore:score]; + score = sqlite3_column_int(compiled_statement, 2); } } + + collectSelection = [[[GameModeSelection alloc] initWithName:@"Collect" location:@"Paris" filename:@"paris" highscore:score] autorelease]; } else { - [collectSelection setUnlockCondition:@"Beat the tutorial!"]; + collectSelection = [[[GameModeSelection alloc] initWithName:@"Collect" location:@"Paris" filename:@"paris" unlockCondition:@"Beat the tutorial!"] autorelease]; } + collectSelection.position = ccp(320+32,160); [self addChild:collectSelection]; CCMenuItemImage* newgameMenuItem = [CCMenuItemImage itemFromNormalImage:@"back.png" selectedImage:@"back2.png" target:self selector:@selector(mainmenu)]; diff --git a/Classes/UIImage+ColorMasking.h b/Classes/UIImage+ColorMasking.h new file mode 100644 index 0000000..d25fafb --- /dev/null +++ b/Classes/UIImage+ColorMasking.h @@ -0,0 +1,15 @@ +// +// UIImage+ColorMasking.h +// Cartographic +// +// Created by Starla Insigna on 8/22/11. +// Copyright 2011 Four Island. All rights reserved. +// + +#import + +@interface UIImage (ColorMasking) + +- (UIImage *)opaqueMaskFromWhiteImage; + +@end diff --git a/Classes/UIImage+ColorMasking.m b/Classes/UIImage+ColorMasking.m new file mode 100644 index 0000000..e4da8c8 --- /dev/null +++ b/Classes/UIImage+ColorMasking.m @@ -0,0 +1,77 @@ +// +// UIImage+ColorMasking.m +// Cartographic +// +// Created by Starla Insigna on 8/22/11. +// Copyright 2011 Four Island. All rights reserved. +// + +#import "UIImage+ColorMasking.h" + +@implementation UIImage (ColorMasking) + +typedef enum { + ALPHA = 0, + BLUE = 1, + GREEN = 2, + RED = 3 +} PIXELS; + +- (UIImage *)opaqueMaskFromWhiteImage +{ + CGSize size = [self size]; + int width = size.width; + int height = size.height; + + // the pixels will be painted to this array + uint32_t *pixels = (uint32_t *) malloc(width * height * sizeof(uint32_t)); + + // clear the pixels so any transparency is preserved + memset(pixels, 0, width * height * sizeof(uint32_t)); + + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + + // create a context with RGBA pixels + CGContextRef context = CGBitmapContextCreate(pixels, width, height, 8, width * sizeof(uint32_t), colorSpace, + kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedLast); + + // paint the bitmap to our context which will fill in the pixels array + CGContextDrawImage(context, CGRectMake(0, 0, width, height), [self CGImage]); + + for(int y = 0; y < height; y++) { + for(int x = 0; x < width; x++) { + uint8_t *rgbaPixel = (uint8_t *) &pixels[y * width + x]; + + if ((rgbaPixel[RED] == 255) && (rgbaPixel[GREEN] == 255) && (rgbaPixel[BLUE] == 255) && (rgbaPixel[ALPHA] == 255)) + { + rgbaPixel[RED] = 255; + rgbaPixel[GREEN] = 255; + rgbaPixel[BLUE] = 255; + rgbaPixel[ALPHA] = 255; + } else { + rgbaPixel[RED] = 0; + rgbaPixel[GREEN] = 0; + rgbaPixel[BLUE] = 0; + rgbaPixel[ALPHA] = 0; + } + } + } + + // create a new CGImageRef from our context with the modified pixels + CGImageRef image = CGBitmapContextCreateImage(context); + + // we're done with the context, color space, and pixels + CGContextRelease(context); + CGColorSpaceRelease(colorSpace); + free(pixels); + + // make a new UIImage to return + UIImage *resultUIImage = [UIImage imageWithCGImage:image]; + + // we're done with image now too + CGImageRelease(image); + + return resultUIImage; +} + +@end diff --git a/Resources/leveldescriptions.fnt b/Resources/leveldescriptions.fnt deleted file mode 100644 index 2cf1ce6..0000000 --- a/Resources/leveldescriptions.fnt +++ /dev/null @@ -1,99 +0,0 @@ -info face="BitstreamVeraSansMono-Roman" size=16 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 -common lineHeight=19 base=15 scaleW=512 scaleH=512 pages=1 packed=0 -page id=0 file="leveldescriptions.png" -chars count=94 -char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=15 xadvance=10 page=0 chnl=0 -char id=124 x=0 y=0 width=3 height=18 xoffset=4 yoffset=2 xadvance=10 page=0 chnl=0 -char id=106 x=3 y=0 width=7 height=18 xoffset=1 yoffset=2 xadvance=10 page=0 chnl=0 -char id=36 x=10 y=0 width=9 height=17 xoffset=1 yoffset=2 xadvance=10 page=0 chnl=0 -char id=125 x=19 y=0 width=8 height=17 xoffset=2 yoffset=2 xadvance=10 page=0 chnl=0 -char id=123 x=27 y=0 width=8 height=17 xoffset=2 yoffset=2 xadvance=10 page=0 chnl=0 -char id=93 x=35 y=0 width=6 height=17 xoffset=3 yoffset=2 xadvance=10 page=0 chnl=0 -char id=91 x=41 y=0 width=5 height=17 xoffset=4 yoffset=2 xadvance=10 page=0 chnl=0 -char id=41 x=46 y=0 width=6 height=17 xoffset=3 yoffset=2 xadvance=10 page=0 chnl=0 -char id=40 x=52 y=0 width=5 height=17 xoffset=3 yoffset=2 xadvance=10 page=0 chnl=0 -char id=81 x=57 y=0 width=10 height=16 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=92 x=67 y=0 width=10 height=15 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=64 x=77 y=0 width=11 height=15 xoffset=0 yoffset=4 xadvance=10 page=0 chnl=0 -char id=47 x=88 y=0 width=10 height=15 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=100 x=98 y=0 width=10 height=15 xoffset=1 yoffset=2 xadvance=10 page=0 chnl=0 -char id=98 x=108 y=0 width=9 height=15 xoffset=2 yoffset=2 xadvance=10 page=0 chnl=0 -char id=38 x=117 y=0 width=11 height=14 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0 -char id=48 x=128 y=0 width=9 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=57 x=137 y=0 width=10 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=56 x=147 y=0 width=9 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=54 x=156 y=0 width=9 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=53 x=165 y=0 width=9 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=51 x=174 y=0 width=9 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=121 x=183 y=0 width=11 height=14 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=113 x=194 y=0 width=9 height=14 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=112 x=203 y=0 width=9 height=14 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=108 x=212 y=0 width=9 height=14 xoffset=1 yoffset=2 xadvance=10 page=0 chnl=0 -char id=107 x=221 y=0 width=10 height=14 xoffset=2 yoffset=2 xadvance=10 page=0 chnl=0 -char id=105 x=231 y=0 width=9 height=14 xoffset=1 yoffset=2 xadvance=10 page=0 chnl=0 -char id=104 x=240 y=0 width=9 height=14 xoffset=2 yoffset=2 xadvance=10 page=0 chnl=0 -char id=103 x=249 y=0 width=10 height=14 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=102 x=259 y=0 width=9 height=14 xoffset=2 yoffset=2 xadvance=10 page=0 chnl=0 -char id=85 x=268 y=0 width=9 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=83 x=277 y=0 width=9 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=79 x=286 y=0 width=10 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=74 x=296 y=0 width=9 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=71 x=305 y=0 width=10 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=67 x=315 y=0 width=9 height=14 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=35 x=324 y=0 width=11 height=13 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0 -char id=37 x=335 y=0 width=11 height=13 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0 -char id=59 x=346 y=0 width=4 height=13 xoffset=3 yoffset=6 xadvance=10 page=0 chnl=0 -char id=63 x=350 y=0 width=9 height=13 xoffset=2 yoffset=3 xadvance=10 page=0 chnl=0 -char id=33 x=359 y=0 width=3 height=13 xoffset=4 yoffset=3 xadvance=10 page=0 chnl=0 -char id=55 x=362 y=0 width=9 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=52 x=371 y=0 width=10 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=50 x=381 y=0 width=9 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=49 x=390 y=0 width=9 height=13 xoffset=2 yoffset=3 xadvance=10 page=0 chnl=0 -char id=116 x=399 y=0 width=9 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=90 x=408 y=0 width=10 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=89 x=418 y=0 width=11 height=13 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0 -char id=88 x=429 y=0 width=11 height=13 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0 -char id=87 x=440 y=0 width=11 height=13 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0 -char id=86 x=451 y=0 width=11 height=13 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0 -char id=84 x=462 y=0 width=11 height=13 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0 -char id=82 x=473 y=0 width=10 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=80 x=483 y=0 width=9 height=13 xoffset=2 yoffset=3 xadvance=10 page=0 chnl=0 -char id=78 x=492 y=0 width=9 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=77 x=501 y=0 width=10 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=76 x=0 y=18 width=9 height=13 xoffset=2 yoffset=3 xadvance=10 page=0 chnl=0 -char id=75 x=9 y=18 width=10 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=73 x=19 y=18 width=9 height=13 xoffset=2 yoffset=3 xadvance=10 page=0 chnl=0 -char id=72 x=28 y=18 width=9 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=70 x=37 y=18 width=9 height=13 xoffset=2 yoffset=3 xadvance=10 page=0 chnl=0 -char id=69 x=46 y=18 width=9 height=13 xoffset=2 yoffset=3 xadvance=10 page=0 chnl=0 -char id=68 x=55 y=18 width=9 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=66 x=64 y=18 width=9 height=13 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=65 x=73 y=18 width=11 height=13 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0 -char id=43 x=84 y=18 width=10 height=11 xoffset=1 yoffset=5 xadvance=10 page=0 chnl=0 -char id=117 x=94 y=18 width=9 height=11 xoffset=2 yoffset=6 xadvance=10 page=0 chnl=0 -char id=115 x=103 y=18 width=9 height=11 xoffset=2 yoffset=6 xadvance=10 page=0 chnl=0 -char id=111 x=112 y=18 width=9 height=11 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=101 x=121 y=18 width=10 height=11 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=99 x=131 y=18 width=9 height=11 xoffset=2 yoffset=6 xadvance=10 page=0 chnl=0 -char id=97 x=140 y=18 width=9 height=11 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=58 x=149 y=18 width=4 height=10 xoffset=4 yoffset=6 xadvance=10 page=0 chnl=0 -char id=122 x=153 y=18 width=9 height=10 xoffset=2 yoffset=6 xadvance=10 page=0 chnl=0 -char id=120 x=162 y=18 width=11 height=10 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=119 x=173 y=18 width=11 height=10 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=0 -char id=118 x=184 y=18 width=10 height=10 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=114 x=194 y=18 width=9 height=10 xoffset=3 yoffset=6 xadvance=10 page=0 chnl=0 -char id=110 x=203 y=18 width=9 height=10 xoffset=2 yoffset=6 xadvance=10 page=0 chnl=0 -char id=109 x=212 y=18 width=10 height=10 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=42 x=222 y=18 width=9 height=9 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=62 x=231 y=18 width=10 height=9 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=60 x=241 y=18 width=10 height=9 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 -char id=61 x=251 y=18 width=10 height=7 xoffset=1 yoffset=7 xadvance=10 page=0 chnl=0 -char id=44 x=261 y=18 width=4 height=7 xoffset=3 yoffset=12 xadvance=10 page=0 chnl=0 -char id=94 x=265 y=18 width=11 height=6 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0 -char id=39 x=276 y=18 width=3 height=6 xoffset=4 yoffset=3 xadvance=10 page=0 chnl=0 -char id=34 x=279 y=18 width=6 height=6 xoffset=3 yoffset=3 xadvance=10 page=0 chnl=0 -char id=126 x=285 y=18 width=10 height=5 xoffset=1 yoffset=8 xadvance=10 page=0 chnl=0 -char id=96 x=295 y=18 width=5 height=5 xoffset=2 yoffset=2 xadvance=10 page=0 chnl=0 -char id=45 x=300 y=18 width=6 height=4 xoffset=3 yoffset=9 xadvance=10 page=0 chnl=0 -char id=46 x=306 y=18 width=4 height=4 xoffset=4 yoffset=12 xadvance=10 page=0 chnl=0 -char id=95 x=310 y=18 width=9 height=2 xoffset=0 yoffset=18 xadvance=10 page=0 chnl=0 diff --git a/Resources/leveldescriptions.png b/Resources/leveldescriptions.png deleted file mode 100644 index c4ca55b..0000000 Binary files a/Resources/leveldescriptions.png and /dev/null differ diff --git a/Resources/levelnames.fnt b/Resources/levelnames.fnt deleted file mode 100644 index 026b009..0000000 --- a/Resources/levelnames.fnt +++ /dev/null @@ -1,99 +0,0 @@ -info face="BitstreamVeraSansMono-BoldOb" size=18 bold=1 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 -common lineHeight=22 base=17 scaleW=512 scaleH=512 pages=1 packed=0 -page id=0 file="levelnames.png" -chars count=94 -char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=17 xadvance=11 page=0 chnl=0 -char id=124 x=0 y=0 width=4 height=20 xoffset=4 yoffset=3 xadvance=11 page=0 chnl=0 -char id=106 x=4 y=0 width=8 height=20 xoffset=1 yoffset=2 xadvance=11 page=0 chnl=0 -char id=36 x=12 y=0 width=10 height=18 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=125 x=22 y=0 width=10 height=18 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=123 x=32 y=0 width=10 height=18 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=93 x=42 y=0 width=7 height=18 xoffset=3 yoffset=3 xadvance=11 page=0 chnl=0 -char id=91 x=49 y=0 width=7 height=18 xoffset=4 yoffset=3 xadvance=11 page=0 chnl=0 -char id=41 x=56 y=0 width=7 height=18 xoffset=3 yoffset=3 xadvance=11 page=0 chnl=0 -char id=40 x=63 y=0 width=7 height=18 xoffset=3 yoffset=3 xadvance=11 page=0 chnl=0 -char id=81 x=70 y=0 width=12 height=18 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=92 x=82 y=0 width=11 height=17 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=64 x=93 y=0 width=12 height=17 xoffset=0 yoffset=4 xadvance=11 page=0 chnl=0 -char id=47 x=105 y=0 width=11 height=17 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=38 x=116 y=0 width=12 height=16 xoffset=0 yoffset=3 xadvance=11 page=0 chnl=0 -char id=48 x=128 y=0 width=10 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=57 x=138 y=0 width=11 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=56 x=149 y=0 width=10 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=54 x=159 y=0 width=10 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=53 x=169 y=0 width=10 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=51 x=179 y=0 width=10 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=113 x=189 y=0 width=11 height=16 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=112 x=200 y=0 width=11 height=16 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=105 x=211 y=0 width=11 height=16 xoffset=1 yoffset=2 xadvance=11 page=0 chnl=0 -char id=103 x=222 y=0 width=11 height=16 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=100 x=233 y=0 width=11 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=98 x=244 y=0 width=11 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=85 x=255 y=0 width=11 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=83 x=266 y=0 width=10 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=79 x=276 y=0 width=12 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=74 x=288 y=0 width=10 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=71 x=298 y=0 width=10 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=67 x=308 y=0 width=10 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=63 x=318 y=0 width=9 height=15 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=33 x=327 y=0 width=4 height=15 xoffset=4 yoffset=3 xadvance=11 page=0 chnl=0 -char id=55 x=331 y=0 width=10 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=52 x=341 y=0 width=12 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=50 x=353 y=0 width=10 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=49 x=363 y=0 width=10 height=15 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=121 x=373 y=0 width=12 height=15 xoffset=1 yoffset=7 xadvance=11 page=0 chnl=0 -char id=108 x=385 y=0 width=11 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=107 x=396 y=0 width=11 height=15 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=104 x=407 y=0 width=10 height=15 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=102 x=417 y=0 width=10 height=15 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=90 x=427 y=0 width=11 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=89 x=438 y=0 width=12 height=15 xoffset=0 yoffset=3 xadvance=11 page=0 chnl=0 -char id=88 x=450 y=0 width=12 height=15 xoffset=0 yoffset=3 xadvance=11 page=0 chnl=0 -char id=87 x=462 y=0 width=12 height=15 xoffset=0 yoffset=3 xadvance=11 page=0 chnl=0 -char id=86 x=474 y=0 width=12 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=84 x=486 y=0 width=12 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=82 x=498 y=0 width=11 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=80 x=0 y=20 width=11 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=78 x=11 y=20 width=10 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=77 x=21 y=20 width=12 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=76 x=33 y=20 width=11 height=15 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=75 x=44 y=20 width=11 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=73 x=55 y=20 width=10 height=15 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=72 x=65 y=20 width=10 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=70 x=75 y=20 width=10 height=15 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=69 x=85 y=20 width=10 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=68 x=95 y=20 width=11 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=66 x=106 y=20 width=11 height=15 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=65 x=117 y=20 width=12 height=15 xoffset=0 yoffset=3 xadvance=11 page=0 chnl=0 -char id=35 x=129 y=20 width=12 height=14 xoffset=0 yoffset=4 xadvance=11 page=0 chnl=0 -char id=37 x=141 y=20 width=12 height=14 xoffset=0 yoffset=4 xadvance=11 page=0 chnl=0 -char id=59 x=153 y=20 width=5 height=14 xoffset=3 yoffset=7 xadvance=11 page=0 chnl=0 -char id=116 x=158 y=20 width=11 height=14 xoffset=1 yoffset=4 xadvance=11 page=0 chnl=0 -char id=115 x=169 y=20 width=10 height=13 xoffset=2 yoffset=6 xadvance=11 page=0 chnl=0 -char id=111 x=179 y=20 width=11 height=13 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=101 x=190 y=20 width=12 height=13 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=99 x=202 y=20 width=10 height=13 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=97 x=212 y=20 width=11 height=13 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=43 x=223 y=20 width=12 height=12 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=62 x=235 y=20 width=12 height=12 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=60 x=247 y=20 width=12 height=12 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=117 x=259 y=20 width=10 height=12 xoffset=1 yoffset=7 xadvance=11 page=0 chnl=0 -char id=114 x=269 y=20 width=10 height=12 xoffset=3 yoffset=6 xadvance=11 page=0 chnl=0 -char id=110 x=279 y=20 width=10 height=12 xoffset=2 yoffset=6 xadvance=11 page=0 chnl=0 -char id=109 x=289 y=20 width=12 height=12 xoffset=1 yoffset=6 xadvance=11 page=0 chnl=0 -char id=58 x=301 y=20 width=5 height=11 xoffset=4 yoffset=7 xadvance=11 page=0 chnl=0 -char id=122 x=306 y=20 width=10 height=11 xoffset=1 yoffset=7 xadvance=11 page=0 chnl=0 -char id=120 x=316 y=20 width=12 height=11 xoffset=0 yoffset=7 xadvance=11 page=0 chnl=0 -char id=119 x=328 y=20 width=12 height=11 xoffset=0 yoffset=7 xadvance=11 page=0 chnl=0 -char id=118 x=340 y=20 width=12 height=11 xoffset=1 yoffset=7 xadvance=11 page=0 chnl=0 -char id=42 x=352 y=20 width=10 height=10 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=61 x=362 y=20 width=12 height=8 xoffset=1 yoffset=8 xadvance=11 page=0 chnl=0 -char id=44 x=374 y=20 width=5 height=8 xoffset=3 yoffset=13 xadvance=11 page=0 chnl=0 -char id=94 x=379 y=20 width=12 height=7 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0 -char id=39 x=391 y=20 width=4 height=7 xoffset=4 yoffset=3 xadvance=11 page=0 chnl=0 -char id=34 x=395 y=20 width=8 height=7 xoffset=2 yoffset=3 xadvance=11 page=0 chnl=0 -char id=126 x=403 y=20 width=12 height=5 xoffset=1 yoffset=9 xadvance=11 page=0 chnl=0 -char id=45 x=415 y=20 width=8 height=5 xoffset=3 yoffset=10 xadvance=11 page=0 chnl=0 -char id=46 x=423 y=20 width=5 height=5 xoffset=4 yoffset=13 xadvance=11 page=0 chnl=0 -char id=96 x=428 y=20 width=7 height=5 xoffset=2 yoffset=2 xadvance=11 page=0 chnl=0 -char id=95 x=435 y=20 width=12 height=4 xoffset=0 yoffset=19 xadvance=11 page=0 chnl=0 diff --git a/Resources/levelnames.png b/Resources/levelnames.png deleted file mode 100644 index 1b3d082..0000000 Binary files a/Resources/levelnames.png and /dev/null differ -- cgit 1.4.1