add support for modifying the name of the team
authorkoda
Sat, 10 Apr 2010 01:09:29 +0000
changeset 3330 987ec27b6042
parent 3329 d8e41ee0b3ae
child 3331 8e05feb871c3
add support for modifying the name of the team nicer presentation of hog+hat
cocoaTouch/SingleTeamViewController.h
cocoaTouch/SingleTeamViewController.m
cocoaTouch/TeamSettingsViewController.m
cocoaTouch/otherSrc/CommodityFunctions.h
cocoaTouch/otherSrc/CommodityFunctions.m
project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/project.pbxproj
project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/vittorio.mode1v3
project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/vittorio.pbxuser
--- a/cocoaTouch/SingleTeamViewController.h	Fri Apr 09 21:08:27 2010 +0000
+++ b/cocoaTouch/SingleTeamViewController.h	Sat Apr 10 01:09:29 2010 +0000
@@ -14,6 +14,7 @@
     
     UITextField *textFieldBeingEdited;
     NSInteger selectedHog;
+    NSString *teamName;
     NSArray *hatArray;
     
     NSArray *secondaryItems;
@@ -25,7 +26,12 @@
 
 @property (nonatomic,retain) NSMutableDictionary *teamDictionary;
 @property (nonatomic,retain) UITextField *textFieldBeingEdited;
+@property (nonatomic,retain) NSString *teamName;
 @property (nonatomic,retain) NSArray *hatArray;
 @property (nonatomic,retain) NSArray *secondaryItems;
 @property (nonatomic,retain) NSArray *secondaryControllers;
+
+-(void) writeFile;
+-(void) setWriteNeeded;
+
 @end
--- a/cocoaTouch/SingleTeamViewController.m	Fri Apr 09 21:08:27 2010 +0000
+++ b/cocoaTouch/SingleTeamViewController.m	Sat Apr 10 01:09:29 2010 +0000
@@ -7,14 +7,15 @@
 //
 
 #import "SingleTeamViewController.h"
-//#import "HogNameViewController.h"
 #import "HogHatViewController.h"
 #import "FlagsViewController.h"
 #import "FortsViewController.h"
 #import "CommodityFunctions.h"
 
+#define TEAMNAME_TAG 1234
+
 @implementation SingleTeamViewController
-@synthesize teamDictionary, hatArray, secondaryItems, secondaryControllers, textFieldBeingEdited;
+@synthesize teamDictionary, hatArray, secondaryItems, secondaryControllers, textFieldBeingEdited, teamName;
 
 
 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@@ -31,22 +32,29 @@
 }
 
 // set the new value
--(void) save:(id) sender {
+-(BOOL) save:(id) sender {
     if (textFieldBeingEdited != nil) {
-        //replace the old value with the new one
-        NSDictionary *oldHog = [[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog];
-        NSMutableDictionary *newHog = [[NSMutableDictionary alloc] initWithDictionary: oldHog];
-        [newHog setObject:textFieldBeingEdited.text forKey:@"hogname"];
-        [[teamDictionary objectForKey:@"hedgehogs"] replaceObjectAtIndex:selectedHog withObject:newHog];
-        [newHog release];
+        if (TEAMNAME_TAG == selectedHog) {
+            NSLog(@"%@", textFieldBeingEdited.text);
+            [self.teamDictionary setObject:textFieldBeingEdited.text forKey:@"teamname"];
+        } else {
+            //replace the old value with the new one
+            NSDictionary *oldHog = [[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog];
+            NSMutableDictionary *newHog = [[NSMutableDictionary alloc] initWithDictionary: oldHog];
+            [newHog setObject:textFieldBeingEdited.text forKey:@"hogname"];
+            [[teamDictionary objectForKey:@"hedgehogs"] replaceObjectAtIndex:selectedHog withObject:newHog];
+            [newHog release];
+        }
         
         isWriteNeeded = YES;
         [self.textFieldBeingEdited resignFirstResponder];
+        return YES;
     }
+    return NO;
 }
 
 // the textfield is being modified, update the navigation controller
--(void) textFieldDidBeginEditing:(UITextField *)aTextField{
+-(void) textFieldDidBeginEditing:(UITextField *)aTextField{   
     self.textFieldBeingEdited = aTextField;
     selectedHog = aTextField.tag;
     UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel",@"from the hog name table")
@@ -64,12 +72,17 @@
     [saveButton release];
 }
 
+// we save every time a textfield is edited, so we don't risk to update only the hogs or only the temname 
+-(BOOL) textFieldShouldEndEditing:(UITextField *)aTextField {
+    return [self save:nil];
+}
+
 // the textfield has been modified, check for empty strings and restore original navigation bar
 -(void) textFieldDidEndEditing:(UITextField *)aTextField{
     if ([textFieldBeingEdited.text length] == 0) 
         textFieldBeingEdited.text = [NSString stringWithFormat:@"hedgehog %d",textFieldBeingEdited.tag];
 
-    self.textFieldBeingEdited = nil;
+    //self.textFieldBeingEdited = nil;
     self.navigationItem.rightBarButtonItem = self.navigationItem.backBarButtonItem;
     self.navigationItem.leftBarButtonItem = nil;
 }
@@ -119,19 +132,27 @@
     [super viewWillAppear:animated];
     
     // load data about the team and write if there has been a change
+    if (isWriteNeeded) 
+        [self writeFile];
+    
     NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),self.title];
-    if (isWriteNeeded) {
-        [self.teamDictionary writeToFile:teamFile atomically:YES];
-        NSLog(@"writing: %@",teamDictionary);
-        isWriteNeeded = NO;
-    }
-    
 	NSMutableDictionary *teamDict = [[NSMutableDictionary alloc] initWithContentsOfFile:teamFile];
     self.teamDictionary = teamDict;
     [teamDict release];
 	[teamFile release];
-        
+    
+    self.teamName = self.title;
+    
     // load the images of the hat for aach hog
+    NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];
+    UIImage *normalHogImage = [[UIImage alloc] initWithContentsOfFile:normalHogFile];
+    [normalHogFile release];
+    CGRect hogSpriteArea = CGRectMake(96, 0, 32, 32);
+    CGImageRef cgImg = CGImageCreateWithImageInRect([normalHogImage CGImage], hogSpriteArea);
+    [normalHogImage release];
+    UIImage *normalHogSprite = [[UIImage alloc] initWithCGImage:cgImg];
+    CGImageRelease(cgImg);
+    
     NSArray *hogArray = [self.teamDictionary objectForKey:@"hedgehogs"];
     NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:[hogArray count]];
     for (NSDictionary *hog in hogArray) {
@@ -144,10 +165,12 @@
         [image release];
         
         UIImage *hatSprite = [[UIImage alloc] initWithCGImage:cgImgage];
-        [array addObject:hatSprite];
         CGImageRelease(cgImgage);
+        
+        [array addObject:mergeTwoImages(normalHogSprite, hatSprite)];
         [hatSprite release];
     }
+    [normalHogSprite release];
     self.hatArray = array;
     [array release];
     
@@ -157,15 +180,8 @@
 // write on file if there has been a change
 -(void) viewWillDisappear:(BOOL)animated {
 	[super viewWillDisappear:animated];
-	
-	NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),self.title];
-    if (isWriteNeeded) {
-        [self.teamDictionary writeToFile:teamFile atomically:YES];
-        NSLog(@"writing: %@",teamDictionary);
-        isWriteNeeded = NO;
-    }
-
-	[teamFile release];
+    if (isWriteNeeded) 
+        [self writeFile];        
 }
 
 // needed by other classes to warn about a user change
@@ -173,6 +189,25 @@
     isWriteNeeded = YES;
 }
 
+-(void) writeFile {
+    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),self.title];
+
+    NSString *newTeamName = [self.teamDictionary objectForKey:@"teamname"];
+    if (![newTeamName isEqualToString:self.teamName]) {
+        //delete old
+        [[NSFileManager defaultManager] removeItemAtPath:teamFile error:NULL];
+        [teamFile release];
+        self.title = newTeamName;
+        self.teamName = newTeamName;
+        teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),newTeamName];
+    }
+    
+    [self.teamDictionary writeToFile:teamFile atomically:YES];
+    NSLog(@"writing: %@",teamDictionary);
+    isWriteNeeded = NO;
+	[teamFile release];
+}
+
 #pragma mark -
 #pragma mark Table view data source
 -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
@@ -204,10 +239,17 @@
     if (cell == nil) {
         cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
                                        reuseIdentifier:CellIdentifier] autorelease];
-        if ([indexPath section] == 1) {
+        if ([indexPath section] != 2) {
             // create a uitextfield for each row, expand it to take the maximum size
-            UITextField *aTextField = [[UITextField alloc] 
-                                       initWithFrame:CGRectMake(42, 12, (cell.frame.size.width + cell.frame.size.width/3) - 42, 25)];
+            UITextField *aTextField;
+            if ([indexPath section] == 1) {
+                aTextField = [[UITextField alloc] 
+                              initWithFrame:CGRectMake(42, 12, (cell.frame.size.width + cell.frame.size.width/3) - 42, 25)];
+            } else {
+                aTextField = [[UITextField alloc] 
+                              initWithFrame:CGRectMake(5, 12, (cell.frame.size.width + cell.frame.size.width/3) - 42, 25)];
+            }
+            
             aTextField.clearsOnBeginEditing = NO;
             aTextField.returnKeyType = UIReturnKeyDone;
             aTextField.adjustsFontSizeToFitWidth = YES;
@@ -224,9 +266,16 @@
     NSInteger row = [indexPath row];
     switch ([indexPath section]) {
         case 0:
-            cell.textLabel.text = self.title;
             cell.imageView.image = nil;
-            cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+            cell.accessoryType = UITableViewCellAccessoryNone;
+            for (UIView *oneView in cell.contentView.subviews) {
+                if ([oneView isMemberOfClass:[UITextField class]]) {
+                    // we find the uitextfied and we'll use its tag to understand which one is being edited
+                    UITextField *textFieldFound = (UITextField *)oneView;
+                    textFieldFound.text = [self.teamDictionary objectForKey:@"teamname"];
+                    textFieldFound.tag = TEAMNAME_TAG;
+                }
+            }            
             break;
         case 1:
             hogArray = [self.teamDictionary objectForKey:@"hedgehogs"];
@@ -270,23 +319,26 @@
 -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     NSInteger row = [indexPath row];
     UITableViewController *nextController;
-    if (1 == [indexPath section]) {
-        UITableViewCell *cell = [aTableView cellForRowAtIndexPath:indexPath];
-        for (UIView *oneView in cell.contentView.subviews) {
-            if ([oneView isMemberOfClass:[UITextField class]]) {
-                textFieldBeingEdited = (UITextField *)oneView;
-                textFieldBeingEdited.tag = row;
-                [textFieldBeingEdited becomeFirstResponder];
+    UITableViewCell *cell;
+    switch ([indexPath section]) {
+        case 2:
+            //TODO: this part should be rewrittend with lazy loading instead of an array of controllers
+            nextController = [secondaryControllers objectAtIndex:row%2 ];              //TODO: fix the objectAtIndex
+            nextController.title = [secondaryItems objectAtIndex:row];
+            [nextController setTeamDictionary:teamDictionary];
+            [self.navigationController pushViewController:nextController animated:YES];
+            break;            
+        default:
+            cell = [aTableView cellForRowAtIndexPath:indexPath];
+            for (UIView *oneView in cell.contentView.subviews) {
+                if ([oneView isMemberOfClass:[UITextField class]]) {
+                    textFieldBeingEdited = (UITextField *)oneView;
+                    textFieldBeingEdited.tag = row;
+                    [textFieldBeingEdited becomeFirstResponder];
+                }
             }
-        }
-        [aTableView deselectRowAtIndexPath:indexPath animated:NO];
-    }
-    if (2 == [indexPath section]) {
-        //TODO: this part should be rewrittend with lazy loading instead of an array of controllers
-        nextController = [secondaryControllers objectAtIndex:row%2 ];              //TODO: fix the objectAtIndex
-        nextController.title = [secondaryItems objectAtIndex:row];
-        [nextController setTeamDictionary:teamDictionary];
-        [self.navigationController pushViewController:nextController animated:YES];
+            [aTableView deselectRowAtIndexPath:indexPath animated:NO];
+            break;
     }
 }
 
@@ -315,6 +367,7 @@
 -(void) viewDidUnload {
     self.teamDictionary = nil;
     self.textFieldBeingEdited = nil;
+    self.teamName = nil;
     self.hatArray = nil;
     self.secondaryItems = nil;
     self.secondaryControllers = nil;
@@ -325,6 +378,7 @@
 -(void) dealloc {
     [teamDictionary release];
     [textFieldBeingEdited release];
+    [teamName release];
     [hatArray release];
     [secondaryItems release];
     [secondaryControllers release];
--- a/cocoaTouch/TeamSettingsViewController.m	Fri Apr 09 21:08:27 2010 +0000
+++ b/cocoaTouch/TeamSettingsViewController.m	Sat Apr 10 01:09:29 2010 +0000
@@ -20,7 +20,8 @@
 
 #pragma mark -
 #pragma mark View lifecycle
-- (void)viewDidLoad {
+// add an edit button
+-(void) viewDidLoad {
     [super viewDidLoad];
 
     UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"from the team navigation")
@@ -29,14 +30,18 @@
                                                                   action:@selector(toggleEdit:)];
     self.navigationItem.rightBarButtonItem = editButton;
     [editButton release];
+}
+
+// load the list of teams in the teams directory
+-(void) viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
     
-    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
-    NSString *teamsDirectory = [[paths objectAtIndex:0] stringByAppendingString:@"/Teams/"];
-    
-    NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:teamsDirectory error:NULL];
+    NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL];
     NSMutableArray *array = [[NSMutableArray alloc] initWithArray: contentsOfDir copyItems:YES];
     self.listOfTeams = array;
     [array release];
+    
+    [self.tableView reloadData];
     NSLog(@"files: %@", self.listOfTeams);
 }
 
@@ -104,9 +109,7 @@
 -(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
     NSUInteger row = [indexPath row];
     
-    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
-    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/Teams/%@",[paths objectAtIndex:0],[self.listOfTeams objectAtIndex:row]];
-
+    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@",TEAMS_DIRECTORY(),[self.listOfTeams objectAtIndex:row]];
     [[NSFileManager defaultManager] removeItemAtPath:teamFile error:NULL];
     [teamFile release];
     
@@ -128,24 +131,10 @@
 }
 */
 
-/*
-// Override to support rearranging the table view.
-- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
-}
-*/
-
-/*
-// Override to support conditional rearranging of the table view.
-- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
-    // Return NO if you do not want the item to be re-orderable.
-    return YES;
-}
-*/
-
 
 #pragma mark -
 #pragma mark Table view delegate
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     if (childController == nil) {
         childController = [[SingleTeamViewController alloc] initWithStyle:UITableViewStyleGrouped];
     }
@@ -154,37 +143,26 @@
     NSString *selectedTeamFile = [listOfTeams objectAtIndex:row];
     NSLog(@"%@",selectedTeamFile);
     
+    // this must be set so childController can load the correct plist
     childController.title = [selectedTeamFile stringByDeletingPathExtension];
     [childController.tableView setContentOffset:CGPointMake(0,0) animated:NO];
 
-    // this must be set so childController can load the correct plist
-    //childController.title = [[listOfTeams objectAtIndex:row] stringByDeletingPathExtension];
     [self.navigationController pushViewController:childController animated:YES];
 }
 
-/*
--(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
-    UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"Hey, do you see the disclosure button?" 
-                                                    message:@"If you're trying to drill down, touch that instead" 
-                                                   delegate:nil
-                                          cancelButtonTitle:@"Won't happen again"
-                                          otherButtonTitles:nil];
-    [alert show];
-    [alert release];
-}
-*/
 
 #pragma mark -
 #pragma mark Memory management
 -(void) didReceiveMemoryWarning {
     // Releases the view if it doesn't have a superview.
     [super didReceiveMemoryWarning];
-    
     // Relinquish ownership any cached data, images, etc that aren't in use.
 }
 
 -(void) viewDidUnload {
     self.listOfTeams = nil;
+    childController = nil;
+    [super viewDidUnload];
 }
 
 -(void) dealloc {
--- a/cocoaTouch/otherSrc/CommodityFunctions.h	Fri Apr 09 21:08:27 2010 +0000
+++ b/cocoaTouch/otherSrc/CommodityFunctions.h	Sat Apr 10 01:09:29 2010 +0000
@@ -10,10 +10,12 @@
 
 #define MAX_HOGS 8
 
-#define TEAMS_DIRECTORY()   [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
-                             objectAtIndex:0] stringByAppendingString:@"/Teams/"]
-#define HATS_DIRECTORY()    [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"]
-#define FLAGS_DIRECTORY()   [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Flags/"]
-#define FORTS_DIRECTORY()   [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Forts/"]
+#define TEAMS_DIRECTORY()       [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
+                                 objectAtIndex:0] stringByAppendingString:@"/Teams/"]
+#define GRAPHICS_DIRECTORY()    [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"]
+#define HATS_DIRECTORY()        [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"]
+#define FLAGS_DIRECTORY()       [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Flags/"]
+#define FORTS_DIRECTORY()       [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Forts/"]
 
 void createTeamNamed (NSString *nameWithoutExt);
+UIImage *mergeTwoImages (UIImage *firstImage, UIImage *secondImage);
--- a/cocoaTouch/otherSrc/CommodityFunctions.m	Fri Apr 09 21:08:27 2010 +0000
+++ b/cocoaTouch/otherSrc/CommodityFunctions.m	Sat Apr 10 01:09:29 2010 +0000
@@ -41,3 +41,12 @@
     [teamFile release];
     [theTeam release];
 }
+
+UIImage *mergeTwoImages (UIImage *firstImage, UIImage *secondImage) {
+    UIGraphicsBeginImageContext(firstImage.size);
+    [firstImage drawAtPoint:CGPointMake(0,0)];
+    [secondImage drawAtPoint:CGPointMake(0,-4)];
+    UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+    return resultImage; // autoreleased
+}
--- a/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/project.pbxproj	Fri Apr 09 21:08:27 2010 +0000
+++ b/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/project.pbxproj	Sat Apr 10 01:09:29 2010 +0000
@@ -29,7 +29,6 @@
 		6122CD01116BECCA002648E9 /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 6122CD00116BECCA002648E9 /* Default-Landscape.png */; };
 		6151347E116C2803001F16D1 /* Icon-iPad.png in Resources */ = {isa = PBXBuildFile; fileRef = 6151347D116C2803001F16D1 /* Icon-iPad.png */; };
 		615134B1116C2C5F001F16D1 /* OverlayViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 615134B0116C2C5F001F16D1 /* OverlayViewController.xib */; };
-		6157F7FC116F466F005E4A26 /* HogNameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6157F7FB116F466F005E4A26 /* HogNameViewController.m */; };
 		61798816114AA34C00BA94A9 /* hwengine.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987E7114AA34C00BA94A9 /* hwengine.pas */; };
 		61798818114AA34C00BA94A9 /* hwLibrary.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987E9114AA34C00BA94A9 /* hwLibrary.pas */; };
 		6179881B114AA34C00BA94A9 /* PascalExports.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987EC114AA34C00BA94A9 /* PascalExports.pas */; };
@@ -191,8 +190,6 @@
 		6122CD00116BECCA002648E9 /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape.png"; path = "../../cocoaTouch/resources/Default-Landscape.png"; sourceTree = SOURCE_ROOT; };
 		6151347D116C2803001F16D1 /* Icon-iPad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-iPad.png"; path = "../../cocoaTouch/resources/Icon-iPad.png"; sourceTree = SOURCE_ROOT; };
 		615134B0116C2C5F001F16D1 /* OverlayViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = OverlayViewController.xib; path = ../../cocoaTouch/xib/OverlayViewController.xib; sourceTree = SOURCE_ROOT; };
-		6157F7FA116F466F005E4A26 /* HogNameViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HogNameViewController.h; path = ../../cocoaTouch/HogNameViewController.h; sourceTree = SOURCE_ROOT; };
-		6157F7FB116F466F005E4A26 /* HogNameViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HogNameViewController.m; path = ../../cocoaTouch/HogNameViewController.m; sourceTree = SOURCE_ROOT; };
 		617987E1114AA34C00BA94A9 /* CCHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = CCHandlers.inc; path = ../../hedgewars/CCHandlers.inc; sourceTree = SOURCE_ROOT; };
 		617987E4114AA34C00BA94A9 /* GSHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = GSHandlers.inc; path = ../../hedgewars/GSHandlers.inc; sourceTree = SOURCE_ROOT; };
 		617987E5114AA34C00BA94A9 /* HHHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HHHandlers.inc; path = ../../hedgewars/HHHandlers.inc; sourceTree = SOURCE_ROOT; };
@@ -553,17 +550,6 @@
 			name = buttons;
 			sourceTree = "<group>";
 		};
-		6188FE09116F67C7004F3690 /* Hogs */ = {
-			isa = PBXGroup;
-			children = (
-				61A11AE21168DC9400359010 /* HogHatViewController.h */,
-				61A11AE31168DC9400359010 /* HogHatViewController.m */,
-				6157F7FA116F466F005E4A26 /* HogNameViewController.h */,
-				6157F7FB116F466F005E4A26 /* HogNameViewController.m */,
-			);
-			name = Hogs;
-			sourceTree = "<group>";
-		};
 		61A118481168371400359010 /* Frontend */ = {
 			isa = PBXGroup;
 			children = (
@@ -600,7 +586,8 @@
 				61A11ACE1168DB1B00359010 /* TeamSettingsViewController.m */,
 				61A11ADF1168DC6E00359010 /* SingleTeamViewController.h */,
 				61A11AE01168DC6E00359010 /* SingleTeamViewController.m */,
-				6188FE09116F67C7004F3690 /* Hogs */,
+				61A11AE21168DC9400359010 /* HogHatViewController.h */,
+				61A11AE31168DC9400359010 /* HogHatViewController.m */,
 				619C5230116E4E800049FD84 /* FlagsViewController.h */,
 				619C5231116E4E810049FD84 /* FlagsViewController.m */,
 				619C533C116E70050049FD84 /* FortsViewController.h */,
@@ -929,7 +916,6 @@
 				619C5232116E4E810049FD84 /* FlagsViewController.m in Sources */,
 				619C533E116E70050049FD84 /* FortsViewController.m in Sources */,
 				619C58AB116E752A0049FD84 /* UIImageScale.m in Sources */,
-				6157F7FC116F466F005E4A26 /* HogNameViewController.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
--- a/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/vittorio.mode1v3	Fri Apr 09 21:08:27 2010 +0000
+++ b/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/vittorio.mode1v3	Sat Apr 10 01:09:29 2010 +0000
@@ -202,25 +202,25 @@
 			<key>Content</key>
 			<dict>
 				<key>PBXProjectModuleGUID</key>
-				<string>6188FE8E116F8291004F3690</string>
+				<string>61A0965211700517008A8930</string>
 				<key>PBXProjectModuleLabel</key>
-				<string>SingleTeamViewController.m</string>
+				<string>CommodityFunctions.h</string>
 				<key>PBXSplitModuleInNavigatorKey</key>
 				<dict>
 					<key>Split0</key>
 					<dict>
 						<key>PBXProjectModuleGUID</key>
-						<string>6188FE8F116F8291004F3690</string>
+						<string>61A0965311700517008A8930</string>
 						<key>PBXProjectModuleLabel</key>
-						<string>SingleTeamViewController.m</string>
+						<string>CommodityFunctions.h</string>
 						<key>_historyCapacity</key>
 						<integer>0</integer>
 						<key>bookmark</key>
-						<string>6188FFD8116FCEC1004F3690</string>
+						<string>61A096AF1170071E008A8930</string>
 						<key>history</key>
 						<array>
-							<string>6188FFD3116FCE9F004F3690</string>
-							<string>6188FFD4116FCE9F004F3690</string>
+							<string>61A0965411700517008A8930</string>
+							<string>61A0965511700517008A8930</string>
 						</array>
 					</dict>
 					<key>SplitCount</key>
@@ -236,48 +236,7 @@
 				<key>PBXModuleWindowStatusBarHidden2</key>
 				<false/>
 				<key>RubberWindowFrame</key>
-				<string>145 320 1058 736 0 0 1920 1178 </string>
-			</dict>
-		</dict>
-		<dict>
-			<key>Content</key>
-			<dict>
-				<key>PBXProjectModuleGUID</key>
-				<string>6188FE1A116F6D44004F3690</string>
-				<key>PBXProjectModuleLabel</key>
-				<string>HogNameViewController.m</string>
-				<key>PBXSplitModuleInNavigatorKey</key>
-				<dict>
-					<key>Split0</key>
-					<dict>
-						<key>PBXProjectModuleGUID</key>
-						<string>6188FE1B116F6D44004F3690</string>
-						<key>PBXProjectModuleLabel</key>
-						<string>HogNameViewController.m</string>
-						<key>_historyCapacity</key>
-						<integer>0</integer>
-						<key>bookmark</key>
-						<string>6188FFD9116FCEC1004F3690</string>
-						<key>history</key>
-						<array>
-							<string>6188FE93116F8291004F3690</string>
-							<string>6188FE94116F8291004F3690</string>
-						</array>
-					</dict>
-					<key>SplitCount</key>
-					<string>1</string>
-				</dict>
-				<key>StatusBarVisibility</key>
-				<true/>
-			</dict>
-			<key>Geometry</key>
-			<dict>
-				<key>Frame</key>
-				<string>{{0, 20}, {1002, 681}}</string>
-				<key>PBXModuleWindowStatusBarHidden2</key>
-				<false/>
-				<key>RubberWindowFrame</key>
-				<string>822 328 1002 722 0 0 1920 1178 </string>
+				<string>556 181 1058 736 0 0 1920 1178 </string>
 			</dict>
 		</dict>
 	</array>
@@ -354,9 +313,9 @@
 								<string>61A11AC31168DA2B00359010</string>
 								<string>611B0A94116B621600112153</string>
 								<string>61A11AD01168DB1F00359010</string>
-								<string>6188FE09116F67C7004F3690</string>
 								<string>29B97315FDCFA39411CA2CEA</string>
 								<string>29B97317FDCFA39411CA2CEA</string>
+								<string>61798A5E114AE08600BA94A9</string>
 								<string>1C37FBAC04509CD000000102</string>
 								<string>1C37FAAC04509CD000000102</string>
 								<string>1C37FABC05509CD000000102</string>
@@ -364,16 +323,14 @@
 							<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
 							<array>
 								<array>
-									<integer>20</integer>
-									<integer>15</integer>
-									<integer>5</integer>
-									<integer>4</integer>
-									<integer>2</integer>
+									<integer>55</integer>
+									<integer>52</integer>
+									<integer>47</integer>
 									<integer>0</integer>
 								</array>
 							</array>
 							<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
-							<string>{{0, 6}, {246, 558}}</string>
+							<string>{{0, 558}, {246, 558}}</string>
 						</dict>
 						<key>PBXTopSmartGroupGIDs</key>
 						<array/>
@@ -408,7 +365,7 @@
 								<key>PBXProjectModuleGUID</key>
 								<string>1CE0B20306471E060097A5F4</string>
 								<key>PBXProjectModuleLabel</key>
-								<string>GeneralSettingsViewController.h</string>
+								<string>CommodityFunctions.m</string>
 								<key>PBXSplitModuleInNavigatorKey</key>
 								<dict>
 									<key>Split0</key>
@@ -416,11 +373,11 @@
 										<key>PBXProjectModuleGUID</key>
 										<string>1CE0B20406471E060097A5F4</string>
 										<key>PBXProjectModuleLabel</key>
-										<string>GeneralSettingsViewController.h</string>
+										<string>CommodityFunctions.m</string>
 										<key>_historyCapacity</key>
 										<integer>0</integer>
 										<key>bookmark</key>
-										<string>6188FFD7116FCEC1004F3690</string>
+										<string>61A096AE1170071E008A8930</string>
 										<key>history</key>
 										<array>
 											<string>6179889D114AA5BD00BA94A9</string>
@@ -495,7 +452,6 @@
 											<string>619C51C7116E42850049FD84</string>
 											<string>619C51CB116E42850049FD84</string>
 											<string>619C51E0116E45820049FD84</string>
-											<string>619C523C116E56330049FD84</string>
 											<string>619C523D116E56330049FD84</string>
 											<string>619C523F116E56330049FD84</string>
 											<string>619C5241116E56330049FD84</string>
@@ -602,15 +558,14 @@
 											<string>6196317D116E89DF00C47CEE</string>
 											<string>61F8E0D6116E98A900108149</string>
 											<string>6157F7BA116F3B2D005E4A26</string>
-											<string>6157F7ED116F4043005E4A26</string>
 											<string>6188FE02116F5136004F3690</string>
-											<string>6188FE16116F6D44004F3690</string>
-											<string>6188FE17116F6D44004F3690</string>
 											<string>6188FE18116F6D44004F3690</string>
 											<string>6188FE60116F77AF004F3690</string>
 											<string>6188FE61116F77AF004F3690</string>
-											<string>6188FE8B116F8291004F3690</string>
-											<string>611B0AC8116B6E8B00112153</string>
+											<string>617E1DB5116FEE5B002EF3D8</string>
+											<string>617E1DB6116FEE5B002EF3D8</string>
+											<string>61A0965B1170057A008A8930</string>
+											<string>619C523C116E56330049FD84</string>
 										</array>
 									</dict>
 									<key>SplitCount</key>
@@ -622,14 +577,14 @@
 							<key>GeometryConfiguration</key>
 							<dict>
 								<key>Frame</key>
-								<string>{{0, 0}, {533, 124}}</string>
+								<string>{{0, 0}, {533, 91}}</string>
 								<key>RubberWindowFrame</key>
 								<string>130 456 801 617 0 0 1920 1178 </string>
 							</dict>
 							<key>Module</key>
 							<string>PBXNavigatorGroup</string>
 							<key>Proportion</key>
-							<string>124pt</string>
+							<string>91pt</string>
 						</dict>
 						<dict>
 							<key>ContentConfiguration</key>
@@ -642,14 +597,14 @@
 							<key>GeometryConfiguration</key>
 							<dict>
 								<key>Frame</key>
-								<string>{{0, 129}, {533, 447}}</string>
+								<string>{{0, 96}, {533, 480}}</string>
 								<key>RubberWindowFrame</key>
 								<string>130 456 801 617 0 0 1920 1178 </string>
 							</dict>
 							<key>Module</key>
 							<string>XCDetailModule</string>
 							<key>Proportion</key>
-							<string>447pt</string>
+							<string>480pt</string>
 						</dict>
 					</array>
 					<key>Proportion</key>
@@ -668,9 +623,9 @@
 			</array>
 			<key>TableOfContents</key>
 			<array>
-				<string>6188FE05116F5136004F3690</string>
+				<string>61A0958A116FF221008A8930</string>
 				<string>1CE0B1FE06471DED0097A5F4</string>
-				<string>6188FE06116F5136004F3690</string>
+				<string>61A0958B116FF221008A8930</string>
 				<string>1CE0B20306471E060097A5F4</string>
 				<string>1CE0B20506471E060097A5F4</string>
 			</array>
@@ -808,15 +763,14 @@
 	<integer>5</integer>
 	<key>WindowOrderList</key>
 	<array>
-		<string>6188FE96116F8291004F3690</string>
-		<string>6188FE07116F5136004F3690</string>
-		<string>6188FE08116F5136004F3690</string>
+		<string>61A095A4116FF245008A8930</string>
+		<string>61A09596116FF221008A8930</string>
+		<string>1C78EAAD065D492600B07095</string>
 		<string>1CD10A99069EF8BA00B06720</string>
 		<string>61798848114AA42600BA94A9</string>
-		<string>6188FE1A116F6D44004F3690</string>
+		<string>6188FE8E116F8291004F3690</string>
+		<string>61A0965211700517008A8930</string>
 		<string>/Users/vittorio/hedgewars/trunk/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj</string>
-		<string>1C78EAAD065D492600B07095</string>
-		<string>6188FE8E116F8291004F3690</string>
 	</array>
 	<key>WindowString</key>
 	<string>130 456 801 617 0 0 1920 1178 </string>
@@ -835,14 +789,12 @@
 					<key>Dock</key>
 					<array>
 						<dict>
-							<key>BecomeActive</key>
-							<true/>
 							<key>ContentConfiguration</key>
 							<dict>
 								<key>PBXProjectModuleGUID</key>
 								<string>1CD0528F0623707200166675</string>
 								<key>PBXProjectModuleLabel</key>
-								<string>HogNameViewController.m</string>
+								<string></string>
 								<key>StatusBarVisibility</key>
 								<true/>
 							</dict>
@@ -898,7 +850,7 @@
 			<key>TableOfContents</key>
 			<array>
 				<string>61798848114AA42600BA94A9</string>
-				<string>6188FDF8116F5123004F3690</string>
+				<string>61A0958D116FF221008A8930</string>
 				<string>1CD0528F0623707200166675</string>
 				<string>XCMainBuildResultsModuleGUID</string>
 			</array>
@@ -942,8 +894,8 @@
 										<string>yes</string>
 										<key>sizes</key>
 										<array>
-											<string>{{0, 0}, {412, 252}}</string>
-											<string>{{412, 0}, {411, 252}}</string>
+											<string>{{0, 0}, {412, 253}}</string>
+											<string>{{412, 0}, {411, 253}}</string>
 										</array>
 									</dict>
 									<key>VerticalSplitView</key>
@@ -958,8 +910,8 @@
 										<string>yes</string>
 										<key>sizes</key>
 										<array>
-											<string>{{0, 0}, {823, 252}}</string>
-											<string>{{0, 252}, {823, 226}}</string>
+											<string>{{0, 0}, {823, 253}}</string>
+											<string>{{0, 253}, {823, 225}}</string>
 										</array>
 									</dict>
 								</dict>
@@ -994,7 +946,7 @@
 										<real>84</real>
 									</array>
 									<key>Frame</key>
-									<string>{{412, 0}, {411, 252}}</string>
+									<string>{{412, 0}, {411, 253}}</string>
 									<key>RubberWindowFrame</key>
 									<string>807 238 823 519 0 0 1920 1178 </string>
 								</dict>
@@ -1022,13 +974,13 @@
 			<key>TableOfContents</key>
 			<array>
 				<string>1CD10A99069EF8BA00B06720</string>
-				<string>6188FDF9116F5123004F3690</string>
+				<string>61A0958E116FF221008A8930</string>
 				<string>1C162984064C10D400B95A72</string>
-				<string>6188FDFA116F5123004F3690</string>
-				<string>6188FDFB116F5123004F3690</string>
-				<string>6188FDFC116F5123004F3690</string>
-				<string>6188FDFD116F5123004F3690</string>
-				<string>6188FDFE116F5123004F3690</string>
+				<string>61A0958F116FF221008A8930</string>
+				<string>61A09590116FF221008A8930</string>
+				<string>61A09591116FF221008A8930</string>
+				<string>61A09592116FF221008A8930</string>
+				<string>61A09593116FF221008A8930</string>
 			</array>
 			<key>ToolbarConfiguration</key>
 			<string>xcode.toolbar.config.debugV3</string>
@@ -1192,7 +1144,7 @@
 			<key>TableOfContents</key>
 			<array>
 				<string>1C78EAAD065D492600B07095</string>
-				<string>6188FDFF116F5123004F3690</string>
+				<string>61A09594116FF221008A8930</string>
 				<string>1C78EAAC065D492600B07095</string>
 			</array>
 			<key>ToolbarConfiguration</key>
@@ -1202,7 +1154,7 @@
 			<key>WindowToolGUID</key>
 			<string>1C78EAAD065D492600B07095</string>
 			<key>WindowToolIsVisible</key>
-			<true/>
+			<false/>
 		</dict>
 		<dict>
 			<key>Identifier</key>
--- a/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/vittorio.pbxuser	Fri Apr 09 21:08:27 2010 +0000
+++ b/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/vittorio.pbxuser	Sat Apr 10 01:09:29 2010 +0000
@@ -107,8 +107,8 @@
 					PBXFileDataSource_Warnings_ColumnID,
 				);
 			};
-			PBXPerProjectTemplateStateSaveDate = 292507723;
-			PBXWorkspaceStateSaveDate = 292507723;
+			PBXPerProjectTemplateStateSaveDate = 292549135;
+			PBXWorkspaceStateSaveDate = 292549135;
 		};
 		perUserProjectItems = {
 			61056377116C0393003C420C /* PBXBookmark */ = 61056377116C0393003C420C /* PBXBookmark */;
@@ -116,7 +116,6 @@
 			610563DE116C15E5003C420C /* PBXTextBookmark */ = 610563DE116C15E5003C420C /* PBXTextBookmark */;
 			610563DF116C15E5003C420C /* PBXTextBookmark */ = 610563DF116C15E5003C420C /* PBXTextBookmark */;
 			611B0AC6116B6E8B00112153 /* PBXTextBookmark */ = 611B0AC6116B6E8B00112153 /* PBXTextBookmark */;
-			611B0AC8116B6E8B00112153 /* PBXTextBookmark */ = 611B0AC8116B6E8B00112153 /* PBXTextBookmark */;
 			611B0C42116BAF3A00112153 /* PBXTextBookmark */ = 611B0C42116BAF3A00112153 /* PBXTextBookmark */;
 			611FD81F1155111700C2203D /* PBXTextBookmark */ = 611FD81F1155111700C2203D /* PBXTextBookmark */;
 			611FD8201155111700C2203D /* PBXTextBookmark */ = 611FD8201155111700C2203D /* PBXTextBookmark */;
@@ -137,7 +136,6 @@
 			6151348E116C2954001F16D1 /* PBXBookmark */ = 6151348E116C2954001F16D1 /* PBXBookmark */;
 			6151348F116C2954001F16D1 /* PlistBookmark */ = 6151348F116C2954001F16D1 /* PlistBookmark */;
 			6157F7BA116F3B2D005E4A26 /* PBXTextBookmark */ = 6157F7BA116F3B2D005E4A26 /* PBXTextBookmark */;
-			6157F7ED116F4043005E4A26 /* PBXTextBookmark */ = 6157F7ED116F4043005E4A26 /* PBXTextBookmark */;
 			615F1316116561BE002444F2 /* PBXTextBookmark */ = 615F1316116561BE002444F2 /* PBXTextBookmark */;
 			615F134D11656569002444F2 /* PBXTextBookmark */ = 615F134D11656569002444F2 /* PBXTextBookmark */;
 			615F147F11659AC5002444F2 /* PBXTextBookmark */ = 615F147F11659AC5002444F2 /* PBXTextBookmark */;
@@ -152,20 +150,12 @@
 			6179937511501D7800BA94A9 /* PBXBookmark */ = 6179937511501D7800BA94A9 /* PBXBookmark */;
 			6179938511501FFA00BA94A9 /* PBXBookmark */ = 6179938511501FFA00BA94A9 /* PBXBookmark */;
 			6179943111502CEA00BA94A9 /* PBXBookmark */ = 6179943111502CEA00BA94A9 /* PBXBookmark */;
+			617E1DB5116FEE5B002EF3D8 /* PBXTextBookmark */ = 617E1DB5116FEE5B002EF3D8 /* PBXTextBookmark */;
+			617E1DB6116FEE5B002EF3D8 /* PBXTextBookmark */ = 617E1DB6116FEE5B002EF3D8 /* PBXTextBookmark */;
 			6188FE02116F5136004F3690 /* PBXTextBookmark */ = 6188FE02116F5136004F3690 /* PBXTextBookmark */;
-			6188FE16116F6D44004F3690 /* PBXTextBookmark */ = 6188FE16116F6D44004F3690 /* PBXTextBookmark */;
-			6188FE17116F6D44004F3690 /* PBXTextBookmark */ = 6188FE17116F6D44004F3690 /* PBXTextBookmark */;
 			6188FE18116F6D44004F3690 /* PBXTextBookmark */ = 6188FE18116F6D44004F3690 /* PBXTextBookmark */;
 			6188FE60116F77AF004F3690 /* PBXTextBookmark */ = 6188FE60116F77AF004F3690 /* PBXTextBookmark */;
 			6188FE61116F77AF004F3690 /* PBXTextBookmark */ = 6188FE61116F77AF004F3690 /* PBXTextBookmark */;
-			6188FE8B116F8291004F3690 /* PBXTextBookmark */ = 6188FE8B116F8291004F3690 /* PBXTextBookmark */;
-			6188FE93116F8291004F3690 /* PBXTextBookmark */ = 6188FE93116F8291004F3690 /* PBXTextBookmark */;
-			6188FE94116F8291004F3690 /* PBXTextBookmark */ = 6188FE94116F8291004F3690 /* PBXTextBookmark */;
-			6188FFD3116FCE9F004F3690 /* PBXTextBookmark */ = 6188FFD3116FCE9F004F3690 /* PBXTextBookmark */;
-			6188FFD4116FCE9F004F3690 /* PBXTextBookmark */ = 6188FFD4116FCE9F004F3690 /* PBXTextBookmark */;
-			6188FFD7116FCEC1004F3690 /* PBXTextBookmark */ = 6188FFD7116FCEC1004F3690 /* PBXTextBookmark */;
-			6188FFD8116FCEC1004F3690 /* PBXTextBookmark */ = 6188FFD8116FCEC1004F3690 /* PBXTextBookmark */;
-			6188FFD9116FCEC1004F3690 /* PBXTextBookmark */ = 6188FFD9116FCEC1004F3690 /* PBXTextBookmark */;
 			618AFC07115BE92A003D411B /* PBXBookmark */ = 618AFC07115BE92A003D411B /* PBXBookmark */;
 			6196317D116E89DF00C47CEE /* PBXTextBookmark */ = 6196317D116E89DF00C47CEE /* PBXTextBookmark */;
 			619C51C6116E42850049FD84 /* PBXTextBookmark */ = 619C51C6116E42850049FD84 /* PBXTextBookmark */;
@@ -276,6 +266,11 @@
 			619C5892116E73B00049FD84 /* PBXBookmark */ = 619C5892116E73B00049FD84 /* PBXBookmark */;
 			619C58B2116E76080049FD84 /* PBXBookmark */ = 619C58B2116E76080049FD84 /* PBXBookmark */;
 			619C58B3116E76080049FD84 /* PBXTextBookmark */ = 619C58B3116E76080049FD84 /* PBXTextBookmark */;
+			61A0965411700517008A8930 /* PBXTextBookmark */ = 61A0965411700517008A8930 /* PBXTextBookmark */;
+			61A0965511700517008A8930 /* PBXTextBookmark */ = 61A0965511700517008A8930 /* PBXTextBookmark */;
+			61A0965B1170057A008A8930 /* PBXTextBookmark */ = 61A0965B1170057A008A8930 /* PBXTextBookmark */;
+			61A096AE1170071E008A8930 /* PBXTextBookmark */ = 61A096AE1170071E008A8930 /* PBXTextBookmark */;
+			61A096AF1170071E008A8930 /* PBXTextBookmark */ = 61A096AF1170071E008A8930 /* PBXTextBookmark */;
 			61CCBE60116135FF00833FE8 /* PBXTextBookmark */ = 61CCBE60116135FF00833FE8 /* PBXTextBookmark */;
 			61CCBF1E116162CA00833FE8 /* PBXTextBookmark */ = 61CCBF1E116162CA00833FE8 /* PBXTextBookmark */;
 			61CCBF451161637F00833FE8 /* PBXTextBookmark */ = 61CCBF451161637F00833FE8 /* PBXTextBookmark */;
@@ -361,9 +356,9 @@
 	};
 	611B0A9F116B626E00112153 /* GeneralSettingsViewController.h */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {642, 455}}";
+			sepNavIntBoundsRect = "{{0, 0}, {472, 468}}";
 			sepNavSelRange = "{0, 0}";
-			sepNavVisRange = "{0, 148}";
+			sepNavVisRange = "{0, 144}";
 		};
 	};
 	611B0AA0116B626E00112153 /* GeneralSettingsViewController.m */ = {
@@ -384,16 +379,6 @@
 		vrLen = 3;
 		vrLoc = 0;
 	};
-	611B0AC8116B6E8B00112153 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 611B0A9F116B626E00112153 /* GeneralSettingsViewController.h */;
-		name = "GeneralSettingsViewController.h: 1";
-		rLen = 0;
-		rLoc = 0;
-		rType = 0;
-		vrLen = 3;
-		vrLoc = 0;
-	};
 	611B0C42116BAF3A00112153 /* PBXTextBookmark */ = {
 		isa = PBXTextBookmark;
 		fRef = 611B0AA0116B626E00112153 /* GeneralSettingsViewController.m */;
@@ -548,36 +533,11 @@
 		fRef = 61A11ADF1168DC6E00359010 /* SingleTeamViewController.h */;
 		name = "SingleTeamViewController.h: 19";
 		rLen = 0;
-		rLoc = 527;
+		rLoc = 551;
 		rType = 0;
 		vrLen = 213;
 		vrLoc = 337;
 	};
-	6157F7ED116F4043005E4A26 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 61A11AE01168DC6E00359010 /* SingleTeamViewController.m */;
-		name = "SingleTeamViewController.m: 57";
-		rLen = 1;
-		rLoc = 5023;
-		rType = 0;
-		vrLen = 273;
-		vrLoc = 2267;
-	};
-	6157F7FA116F466F005E4A26 /* HogNameViewController.h */ = {
-		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {943, 650}}";
-			sepNavSelRange = "{454, 53}";
-			sepNavVisRange = "{0, 513}";
-			sepNavWindowFrame = "{{677, 126}, {750, 558}}";
-		};
-	};
-	6157F7FB116F466F005E4A26 /* HogNameViewController.m */ = {
-		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {943, 1755}}";
-			sepNavSelRange = "{3303, 442}";
-			sepNavVisRange = "{0, 1999}";
-		};
-	};
 	615F1316116561BE002444F2 /* PBXTextBookmark */ = {
 		isa = PBXTextBookmark;
 		fRef = 61798863114AA4AA00BA94A9 /* SDL_uikitappdelegate.h */;
@@ -1174,6 +1134,26 @@
 		isa = PBXBookmark;
 		fRef = 6179936711501D3D00BA94A9 /* arrowDown.png */;
 	};
+	617E1DB5116FEE5B002EF3D8 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 611B0A9F116B626E00112153 /* GeneralSettingsViewController.h */;
+		name = "GeneralSettingsViewController.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 144;
+		vrLoc = 0;
+	};
+	617E1DB6116FEE5B002EF3D8 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 61A11AE21168DC9400359010 /* HogHatViewController.h */;
+		name = "HogHatViewController.h: 24";
+		rLen = 0;
+		rLoc = 547;
+		rType = 0;
+		vrLen = 261;
+		vrLoc = 385;
+	};
 	6188FE02116F5136004F3690 /* PBXTextBookmark */ = {
 		isa = PBXTextBookmark;
 		fRef = 61A11AE31168DC9400359010 /* HogHatViewController.m */;
@@ -1184,26 +1164,6 @@
 		vrLen = 185;
 		vrLoc = 149;
 	};
-	6188FE16116F6D44004F3690 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 6157F7FB116F466F005E4A26 /* HogNameViewController.m */;
-		name = "HogNameViewController.m: 77";
-		rLen = 0;
-		rLoc = 2664;
-		rType = 0;
-		vrLen = 264;
-		vrLoc = 1557;
-	};
-	6188FE17116F6D44004F3690 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 61A11AE21168DC9400359010 /* HogHatViewController.h */;
-		name = "HogHatViewController.h: 24";
-		rLen = 0;
-		rLoc = 547;
-		rType = 0;
-		vrLen = 267;
-		vrLoc = 385;
-	};
 	6188FE18116F6D44004F3690 /* PBXTextBookmark */ = {
 		isa = PBXTextBookmark;
 		fRef = 619C533C116E70050049FD84 /* FortsViewController.h */;
@@ -1219,7 +1179,7 @@
 		fRef = 61A11ACE1168DB1B00359010 /* TeamSettingsViewController.m */;
 		name = "TeamSettingsViewController.m: 42";
 		rLen = 0;
-		rLoc = 1602;
+		rLoc = 1594;
 		rType = 0;
 		vrLen = 253;
 		vrLoc = 1557;
@@ -1234,86 +1194,6 @@
 		vrLen = 152;
 		vrLoc = 0;
 	};
-	6188FE8B116F8291004F3690 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 6157F7FA116F466F005E4A26 /* HogNameViewController.h */;
-		name = "HogNameViewController.h: 12";
-		rLen = 0;
-		rLoc = 237;
-		rType = 0;
-		vrLen = 159;
-		vrLoc = 153;
-	};
-	6188FE93116F8291004F3690 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 6157F7FA116F466F005E4A26 /* HogNameViewController.h */;
-		name = "HogNameViewController.h: 21";
-		rLen = 53;
-		rLoc = 454;
-		rType = 0;
-		vrLen = 513;
-		vrLoc = 0;
-	};
-	6188FE94116F8291004F3690 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 6157F7FB116F466F005E4A26 /* HogNameViewController.m */;
-		name = "HogNameViewController.m: 20";
-		rLen = 0;
-		rLoc = 454;
-		rType = 0;
-		vrLen = 2130;
-		vrLoc = 154;
-	};
-	6188FFD3116FCE9F004F3690 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 61A11ADF1168DC6E00359010 /* SingleTeamViewController.h */;
-		name = "SingleTeamViewController.h: 23";
-		rLen = 18;
-		rLoc = 554;
-		rType = 0;
-		vrLen = 874;
-		vrLoc = 0;
-	};
-	6188FFD4116FCE9F004F3690 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 61A11AE01168DC6E00359010 /* SingleTeamViewController.m */;
-		name = "SingleTeamViewController.m: 331";
-		rLen = 0;
-		rLoc = 13201;
-		rType = 0;
-		vrLen = 1890;
-		vrLoc = 11371;
-	};
-	6188FFD7116FCEC1004F3690 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 611B0A9F116B626E00112153 /* GeneralSettingsViewController.h */;
-		name = "GeneralSettingsViewController.h: 1";
-		rLen = 0;
-		rLoc = 0;
-		rType = 0;
-		vrLen = 148;
-		vrLoc = 0;
-	};
-	6188FFD8116FCEC1004F3690 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 61A11AE01168DC6E00359010 /* SingleTeamViewController.m */;
-		name = "SingleTeamViewController.m: 323";
-		rLen = 0;
-		rLoc = 13025;
-		rType = 0;
-		vrLen = 2040;
-		vrLoc = 7024;
-	};
-	6188FFD9116FCEC1004F3690 /* PBXTextBookmark */ = {
-		isa = PBXTextBookmark;
-		fRef = 6157F7FB116F466F005E4A26 /* HogNameViewController.m */;
-		name = "HogNameViewController.m: 99";
-		rLen = 442;
-		rLoc = 3303;
-		rType = 0;
-		vrLen = 1999;
-		vrLoc = 0;
-	};
 	618AFC07115BE92A003D411B /* PBXBookmark */ = {
 		isa = PBXBookmark;
 		fRef = 61798A20114ADD2600BA94A9 /* backgroundLeft.png */;
@@ -1331,17 +1211,17 @@
 	619C51BD116E40FC0049FD84 /* CommodityFunctions.h */ = {
 		uiCtxt = {
 			sepNavIntBoundsRect = "{{0, 0}, {999, 664}}";
-			sepNavSelRange = "{729, 0}";
-			sepNavVisRange = "{0, 788}";
-			sepNavWindowFrame = "{{794, 343}, {1058, 792}}";
+			sepNavSelRange = "{416, 18}";
+			sepNavVisRange = "{0, 991}";
+			sepNavWindowFrame = "{{556, 125}, {1058, 792}}";
 		};
 	};
 	619C51BE116E40FC0049FD84 /* CommodityFunctions.m */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {999, 664}}";
-			sepNavSelRange = "{183, 0}";
-			sepNavVisRange = "{0, 1695}";
-			sepNavWindowFrame = "{{556, 119}, {1058, 792}}";
+			sepNavIntBoundsRect = "{{0, 0}, {472, 741}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 88}";
+			sepNavWindowFrame = "{{556, 125}, {1058, 792}}";
 		};
 	};
 	619C51C6116E42850049FD84 /* PBXTextBookmark */ = {
@@ -2571,6 +2451,56 @@
 		vrLen = 222;
 		vrLoc = 0;
 	};
+	61A0965411700517008A8930 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 619C51BE116E40FC0049FD84 /* CommodityFunctions.m */;
+		name = "CommodityFunctions.m: 50";
+		rLen = 0;
+		rLoc = 2016;
+		rType = 0;
+		vrLen = 2010;
+		vrLoc = 48;
+	};
+	61A0965511700517008A8930 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 619C51BD116E40FC0049FD84 /* CommodityFunctions.h */;
+		name = "CommodityFunctions.h: 20";
+		rLen = 0;
+		rLoc = 990;
+		rType = 0;
+		vrLen = 857;
+		vrLoc = 0;
+	};
+	61A0965B1170057A008A8930 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 61A11AE01168DC6E00359010 /* SingleTeamViewController.m */;
+		name = "SingleTeamViewController.m: 132";
+		rLen = 1;
+		rLoc = 5501;
+		rType = 0;
+		vrLen = 41;
+		vrLoc = 1746;
+	};
+	61A096AE1170071E008A8930 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 619C51BE116E40FC0049FD84 /* CommodityFunctions.m */;
+		name = "CommodityFunctions.m: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 88;
+		vrLoc = 0;
+	};
+	61A096AF1170071E008A8930 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 619C51BD116E40FC0049FD84 /* CommodityFunctions.h */;
+		name = "CommodityFunctions.h: 15";
+		rLen = 18;
+		rLoc = 416;
+		rType = 0;
+		vrLen = 991;
+		vrLoc = 0;
+	};
 	61A11A4C1168D13600359010 /* PopoverMenuViewController.h */ = {
 		uiCtxt = {
 			sepNavIntBoundsRect = "{{0, 0}, {999, 664}}";
@@ -2619,17 +2549,17 @@
 	};
 	61A11ACD1168DB1B00359010 /* TeamSettingsViewController.h */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {999, 664}}";
-			sepNavSelRange = "{363, 0}";
+			sepNavIntBoundsRect = "{{0, 0}, {999, 641}}";
+			sepNavSelRange = "{364, 0}";
 			sepNavVisRange = "{0, 429}";
 			sepNavWindowFrame = "{{730, 203}, {1058, 792}}";
 		};
 	};
 	61A11ACE1168DB1B00359010 /* TeamSettingsViewController.m */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {810, 2548}}";
-			sepNavSelRange = "{1602, 0}";
-			sepNavVisRange = "{1557, 253}";
+			sepNavIntBoundsRect = "{{0, 0}, {999, 2236}}";
+			sepNavSelRange = "{1548, 0}";
+			sepNavVisRange = "{930, 2287}";
 			sepNavWindowFrame = "{{529, 227}, {1058, 792}}";
 		};
 	};
@@ -2651,25 +2581,25 @@
 	};
 	61A11ADF1168DC6E00359010 /* SingleTeamViewController.h */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {999, 664}}";
-			sepNavSelRange = "{554, 18}";
-			sepNavVisRange = "{0, 874}";
+			sepNavIntBoundsRect = "{{0, 0}, {999, 616}}";
+			sepNavSelRange = "{272, 19}";
+			sepNavVisRange = "{0, 992}";
 			sepNavWindowFrame = "{{38, 374}, {1002, 778}}";
 		};
 	};
 	61A11AE01168DC6E00359010 /* SingleTeamViewController.m */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {999, 4537}}";
-			sepNavSelRange = "{13025, 0}";
-			sepNavVisRange = "{7024, 2040}";
-			sepNavWindowFrame = "{{688, 119}, {1058, 792}}";
+			sepNavIntBoundsRect = "{{0, 0}, {999, 5005}}";
+			sepNavSelRange = "{6261, 0}";
+			sepNavVisRange = "{6192, 1915}";
+			sepNavWindowFrame = "{{701, 215}, {1058, 792}}";
 		};
 	};
 	61A11AE21168DC9400359010 /* HogHatViewController.h */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {999, 664}}";
-			sepNavSelRange = "{446, 45}";
-			sepNavVisRange = "{0, 652}";
+			sepNavIntBoundsRect = "{{0, 0}, {472, 364}}";
+			sepNavSelRange = "{547, 0}";
+			sepNavVisRange = "{385, 261}";
 			sepNavWindowFrame = "{{49, 251}, {1058, 792}}";
 		};
 	};