project_files/HedgewarsMobile/Classes/TeamConfigViewController.m
changeset 5976 306cedbeb213
parent 5208 878e551f0b4a
child 6078 8c0cc07731e5
--- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m	Tue Sep 20 23:43:52 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m	Wed Sep 21 02:05:42 2011 +0200
@@ -102,7 +102,9 @@
 }
 
 -(UIImage *)drawHogsRepeated:(NSInteger) manyTimes {
-    UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:HEDGEHOG_FILE()];
+    NSString *imgString = [[NSString alloc] initWithFormat:@"%@/hedgehog.png",[[NSBundle mainBundle] resourcePath]];
+    UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:imgString];
+    [imgString release];
     CGFloat screenScale = getScreenScale();
     int w = hogSprite.size.width * screenScale;
     int h = hogSprite.size.height * screenScale;
@@ -185,8 +187,9 @@
         NSString *teamPath = [NSString stringWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),cell.textLabel.text];
         NSDictionary *firstHog = [[[NSDictionary dictionaryWithContentsOfFile:teamPath] objectForKey:@"hedgehogs"] objectAtIndex:0];
         if ([[firstHog objectForKey:@"level"] intValue] != 0) {
-            NSString *filePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Settings/Images/robotBadge.png"];
-            UIImage *sprite = [[UIImage alloc] initWithContentsOfFile:filePath];
+            NSString *imgString = [[NSString alloc] initWithFormat:@"%@/robotBadge.png",[[NSBundle mainBundle] resourcePath]];
+            UIImage *sprite = [[UIImage alloc] initWithContentsOfFile:imgString];
+            [imgString release];
             UIImageView *spriteView = [[UIImageView alloc] initWithImage:sprite];
             [sprite release];