graphics applied and fixes here and there
authorkoda
Sun, 04 Jul 2010 01:27:41 +0200
changeset 3623 f14db208f2fa
parent 3622 24c4726b1019
child 3624 304c6d32383a
graphics applied and fixes here and there
project_files/HedgewarsMobile/Classes/GameConfigViewController.m
project_files/HedgewarsMobile/Classes/MapConfigViewController.m
project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m
project_files/HedgewarsMobile/Classes/SingleWeaponViewController.h
project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m
project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj
project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib
project_files/HedgewarsMobile/Resources/OverlayViewController.xib
--- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Sun Jul 04 00:48:39 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Sun Jul 04 01:27:41 2010 +0200
@@ -157,12 +157,12 @@
             mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil];
         if (teamConfigViewController == nil)
             teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStylePlain];
-        teamConfigViewController.view.frame = CGRectMake(0, 224, 300, 500);
+        teamConfigViewController.view.frame = CGRectMake(0, 224, 300, 472);
         teamConfigViewController.view.backgroundColor = [UIColor clearColor];
         [mapConfigViewController.view addSubview:teamConfigViewController.view];
         if (schemeWeaponConfigViewController == nil)
             schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
-        schemeWeaponConfigViewController.view.frame = CGRectMake(362, 224, 300, 500);
+        schemeWeaponConfigViewController.view.frame = CGRectMake(362, 224, 300, 472);
         [mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view];
         for (UIView *oneView in self.view.subviews) {
             if ([oneView isMemberOfClass:[UIToolbar class]]) {
--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Sun Jul 04 00:48:39 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Sun Jul 04 01:27:41 2010 +0200
@@ -283,6 +283,10 @@
     if (cell == nil) 
         cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
     
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+        cell.textLabel.textColor = [UIColor yellowColor]; //TODO: find proper color
+    }
+    
     if (self.segmentedControl.selectedSegmentIndex != 1) {
         // the % prevents a strange bug that occurs sporadically
         NSString *themeName = [self.themeArray objectAtIndex:row % [self.themeArray count]];
--- a/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m	Sun Jul 04 00:48:39 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m	Sun Jul 04 01:27:41 2010 +0200
@@ -273,7 +273,7 @@
             }
             
             UIImage *img = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/icon%@.png",BTN_DIRECTORY(),[[self.basicSettingList objectAtIndex:row] objectForKey:@"image"]]];
-            cell.imageView.image = [img scaleToSize:CGSizeMake(40, 40)];
+            cell.imageView.image = img;
             [img release];
             
             UILabel *cellLabel = (UILabel *)[cell.contentView viewWithTag:LABEL_TAG];
--- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.h	Sun Jul 04 00:48:39 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.h	Sun Jul 04 01:27:41 2010 +0200
@@ -12,7 +12,6 @@
 @interface SingleWeaponViewController : UITableViewController {
     UIImage *ammoStoreImage;
     NSArray *ammoNames;
-    NSInteger ammoSize;
     
     char *quantity;
     char *probability;
--- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Sun Jul 04 00:48:39 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Sun Jul 04 01:27:41 2010 +0200
@@ -74,11 +74,10 @@
     self.ammoNames = array;
     [array release];
 
-    ammoSize = [self.ammoNames count];
-    quantity = (char *)malloc(sizeof(char)*ammoSize);
-    probability = (char *)malloc(sizeof(char)*ammoSize);
-    delay = (char *)malloc(sizeof(char)*ammoSize);
-    crateness = (char *)malloc(sizeof(char)*ammoSize);
+    quantity = (char *)malloc(sizeof(char)*CURRENT_AMMOSIZE);
+    probability = (char *)malloc(sizeof(char)*CURRENT_AMMOSIZE);
+    delay = (char *)malloc(sizeof(char)*CURRENT_AMMOSIZE);
+    crateness = (char *)malloc(sizeof(char)*CURRENT_AMMOSIZE);
     
     NSString *str = [NSString stringWithFormat:@"%@/AmmoMenu/Ammos.png",GRAPHICS_DIRECTORY()];
     UIImage *img = [[UIImage alloc] initWithContentsOfFile:str];
@@ -110,7 +109,7 @@
         delay[i] = tmp3[i];
         crateness[i] = tmp4[i];
     }
-    for (int i = oldlen; i < ammoSize; i++) {
+    for (int i = oldlen; i < CURRENT_AMMOSIZE; i++) {
         quantity[i] = '0';
         probability[i] = '0';
         delay[i] = '0';
@@ -149,7 +148,7 @@
 
 
 -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return ammoSize;
+    return CURRENT_AMMOSIZE;
 }
 
 
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj	Sun Jul 04 00:48:39 2010 +0200
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj	Sun Jul 04 01:27:41 2010 +0200
@@ -127,6 +127,9 @@
 		61C325901179A732001E70B1 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61C3255A1179A384001E70B1 /* OpenAL.framework */; };
 		61C325A31179A7AD001E70B1 /* libopenalbridge.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61C3251D1179A300001E70B1 /* libopenalbridge.a */; };
 		61E1F4F811D004240016A5AA /* adler32.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61E1F4F711D004240016A5AA /* adler32.pas */; };
+		61EBA62911DFF2BC0048B68A /* bricks.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EBA62711DFF2BC0048B68A /* bricks.png */; };
+		61EBA62A11DFF2BC0048B68A /* title.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EBA62811DFF2BC0048B68A /* title.png */; };
+		61EBA62D11DFF3310048B68A /* backgroundAndTitle.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EBA62C11DFF3310048B68A /* backgroundAndTitle.png */; };
 		61EF920E11DF57AC003441C4 /* arrowDown.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920511DF57AC003441C4 /* arrowDown.png */; };
 		61EF920F11DF57AC003441C4 /* arrowLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920611DF57AC003441C4 /* arrowLeft.png */; };
 		61EF921011DF57AC003441C4 /* arrowRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920711DF57AC003441C4 /* arrowRight.png */; };
@@ -145,7 +148,6 @@
 		61F903F611DF58550068B24D /* networkButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903EB11DF58550068B24D /* networkButton.png */; };
 		61F903F711DF58550068B24D /* playButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903EC11DF58550068B24D /* playButton.png */; };
 		61F903F811DF58550068B24D /* storeButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903ED11DF58550068B24D /* storeButton.png */; };
-		61F903F911DF58550068B24D /* title.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903EE11DF58550068B24D /* title.png */; };
 		61F9040911DF58B00068B24D /* settingsButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040811DF58B00068B24D /* settingsButton.png */; };
 		61F9040B11DF59370068B24D /* background.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040A11DF59370068B24D /* background.png */; };
 		61F9040E11DF59D10068B24D /* localplayButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040C11DF59D10068B24D /* localplayButton.png */; };
@@ -375,6 +377,9 @@
 		61C3251D1179A300001E70B1 /* libopenalbridge.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libopenalbridge.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		61C3255A1179A384001E70B1 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
 		61E1F4F711D004240016A5AA /* adler32.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = adler32.pas; path = ../../hedgewars/adler32.pas; sourceTree = SOURCE_ROOT; };
+		61EBA62711DFF2BC0048B68A /* bricks.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bricks.png; path = "Resources/Frontend-iPad/bricks.png"; sourceTree = "<group>"; };
+		61EBA62811DFF2BC0048B68A /* title.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title.png; path = "Resources/Frontend-iPad/title.png"; sourceTree = "<group>"; };
+		61EBA62C11DFF3310048B68A /* backgroundAndTitle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundAndTitle.png; path = "Resources/Frontend-iPad/backgroundAndTitle.png"; sourceTree = "<group>"; };
 		61EF920511DF57AC003441C4 /* arrowDown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowDown.png; path = Resources/Overlay/arrowDown.png; sourceTree = "<group>"; };
 		61EF920611DF57AC003441C4 /* arrowLeft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowLeft.png; path = Resources/Overlay/arrowLeft.png; sourceTree = "<group>"; };
 		61EF920711DF57AC003441C4 /* arrowRight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowRight.png; path = Resources/Overlay/arrowRight.png; sourceTree = "<group>"; };
@@ -393,7 +398,6 @@
 		61F903EB11DF58550068B24D /* networkButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = networkButton.png; path = "Resources/Frontend-iPhone/networkButton.png"; sourceTree = "<group>"; };
 		61F903EC11DF58550068B24D /* playButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = playButton.png; path = "Resources/Frontend-iPhone/playButton.png"; sourceTree = "<group>"; };
 		61F903ED11DF58550068B24D /* storeButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = storeButton.png; path = "Resources/Frontend-iPhone/storeButton.png"; sourceTree = "<group>"; };
-		61F903EE11DF58550068B24D /* title.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title.png; path = "Resources/Frontend-iPhone/title.png"; sourceTree = "<group>"; };
 		61F9040811DF58B00068B24D /* settingsButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = settingsButton.png; path = Resources/settingsButton.png; sourceTree = "<group>"; };
 		61F9040A11DF59370068B24D /* background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = background.png; path = "Resources/Frontend-iPad/background.png"; sourceTree = "<group>"; };
 		61F9040C11DF59D10068B24D /* localplayButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = localplayButton.png; path = "../../../../Desktop/ForKoda/Main Menu/localplayButton.png"; sourceTree = SOURCE_ROOT; };
@@ -751,7 +755,6 @@
 				61F903EB11DF58550068B24D /* networkButton.png */,
 				61F903EC11DF58550068B24D /* playButton.png */,
 				61F903ED11DF58550068B24D /* storeButton.png */,
-				61F903EE11DF58550068B24D /* title.png */,
 			);
 			name = "Frontend-iPhone";
 			sourceTree = "<group>";
@@ -760,10 +763,13 @@
 			isa = PBXGroup;
 			children = (
 				61F9043911DF64E20068B24D /* bluebox.png */,
+				61EBA62711DFF2BC0048B68A /* bricks.png */,
+				61EBA62811DFF2BC0048B68A /* title.png */,
 				61F9041311DF5E9B0068B24D /* toolbarBackground.png */,
 				61F9040C11DF59D10068B24D /* localplayButton.png */,
 				61F9040D11DF59D10068B24D /* netplayButton.png */,
 				61F9040A11DF59370068B24D /* background.png */,
+				61EBA62C11DFF3310048B68A /* backgroundAndTitle.png */,
 			);
 			name = "Frontend-iPad";
 			sourceTree = "<group>";
@@ -1009,13 +1015,15 @@
 				61F903F611DF58550068B24D /* networkButton.png in Resources */,
 				61F903F711DF58550068B24D /* playButton.png in Resources */,
 				61F903F811DF58550068B24D /* storeButton.png in Resources */,
-				61F903F911DF58550068B24D /* title.png in Resources */,
 				61F9040911DF58B00068B24D /* settingsButton.png in Resources */,
 				61F9040B11DF59370068B24D /* background.png in Resources */,
 				61F9040E11DF59D10068B24D /* localplayButton.png in Resources */,
 				61F9040F11DF59D10068B24D /* netplayButton.png in Resources */,
 				61F9041411DF5E9B0068B24D /* toolbarBackground.png in Resources */,
 				61F9043A11DF64E20068B24D /* bluebox.png in Resources */,
+				61EBA62911DFF2BC0048B68A /* bricks.png in Resources */,
+				61EBA62A11DFF2BC0048B68A /* title.png in Resources */,
+				61EBA62D11DFF3310048B68A /* backgroundAndTitle.png in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
--- a/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib	Sun Jul 04 00:48:39 2010 +0200
+++ b/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib	Sun Jul 04 01:27:41 2010 +0200
@@ -57,7 +57,7 @@
 					<object class="IBUIImageView" id="553937568">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{-5, 214}, {309, 490}}</string>
+						<string key="NSFrame">{{1, 214}, {304, 490}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIUserInteractionEnabled">NO</bool>
@@ -72,6 +72,7 @@
 						<int key="NSvFlags">292</int>
 						<string key="NSFrame">{{715, 214}, {309, 490}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIUserInteractionEnabled">NO</bool>
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 						<reference key="IBUIImage" ref="1034685562"/>
@@ -225,7 +226,7 @@
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 						<int key="IBUIIndicatorStyle">2</int>
 						<bool key="IBUIBouncesZoom">NO</bool>
-						<int key="IBUISeparatorStyle">1</int>
+						<int key="IBUISeparatorStyle">2</int>
 						<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
 						<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
 						<float key="IBUIRowHeight">44</float>
--- a/project_files/HedgewarsMobile/Resources/OverlayViewController.xib	Sun Jul 04 00:48:39 2010 +0200
+++ b/project_files/HedgewarsMobile/Resources/OverlayViewController.xib	Sun Jul 04 01:27:41 2010 +0200
@@ -12,6 +12,7 @@
 		</object>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
+			<integer value="1"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -46,7 +47,6 @@
 						<int key="NSvFlags">268</int>
 						<string key="NSFrame">{{0, 229}, {50, 50}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -79,7 +79,6 @@
 						<int key="NSvFlags">268</int>
 						<string key="NSFrame">{{87, 229}, {50, 50}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">1</int>
@@ -103,7 +102,6 @@
 						<int key="NSvFlags">265</int>
 						<string key="NSFrame">{{412, 236}, {64, 64}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">5</int>
@@ -127,7 +125,6 @@
 						<int key="NSvFlags">265</int>
 						<string key="NSFrame">{{365, 203}, {64, 64}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">6</int>
@@ -151,7 +148,6 @@
 						<int key="NSvFlags">265</int>
 						<string key="NSFrame">{{354, 256}, {64, 64}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">4</int>
@@ -175,7 +171,6 @@
 						<int key="NSvFlags">268</int>
 						<string key="NSFrame">{{44, 187}, {50, 50}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">2</int>
@@ -199,7 +194,6 @@
 						<int key="NSvFlags">268</int>
 						<string key="NSFrame">{{44, 270}, {50, 50}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">3</int>
@@ -223,7 +217,6 @@
 						<int key="NSvFlags">289</int>
 						<string key="NSFrame">{{412, -6}, {72, 64}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<int key="IBUITag">10</int>
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -246,7 +239,6 @@
 						<int key="NSvFlags">269</int>
 						<string key="NSFrame">{{225, 248}, {37, 37}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
 						<bool key="IBUIAnimating">YES</bool>
@@ -255,7 +247,6 @@
 				</object>
 				<string key="NSFrameSize">{480, 320}</string>
 				<reference key="NSSuperview"/>
-				<reference key="NSWindow"/>
 				<object class="NSColor" key="IBUIBackgroundColor">
 					<int key="NSColorSpace">3</int>
 					<bytes key="NSWhite">MSAwAA</bytes>
@@ -664,7 +655,7 @@
 					<bool key="EncodedWithXMLCoder">YES</bool>
 					<string>OverlayViewController</string>
 					<string>UIResponder</string>
-					<string>{{899, 369}, {480, 320}}</string>
+					<string>{{819, 369}, {480, 320}}</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -693,7 +684,7 @@
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">65</int>
+			<int key="maxID">66</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1013,7 +1004,7 @@
 				<bool key="EncodedWithXMLCoder">YES</bool>
 				<string>{50, 50}</string>
 				<string>{50, 50}</string>
-				<string>{64, 64}</string>
+				<string>{50, 50}</string>
 				<string>{50, 50}</string>
 				<string>{64, 64}</string>
 				<string>{64, 64}</string>