--- a/hedgewars/PascalExports.pas Sun Aug 29 23:36:22 2010 +0200
+++ b/hedgewars/PascalExports.pas Mon Aug 30 01:38:46 2010 +0200
@@ -165,6 +165,11 @@
if closeFrontend then alsoShutdownFrontend:= true;
end;
+procedure HW_dismissReady; cdecl; export;
+begin
+ ReadyTimeLeft:= 0;
+end;
+
procedure HW_setLandscape(landscape: boolean); cdecl; export;
begin
if landscape then
--- a/project_files/HedgewarsMobile/Classes/FortsViewController.m Sun Aug 29 23:36:22 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/FortsViewController.m Mon Aug 30 01:38:46 2010 +0200
@@ -25,10 +25,10 @@
[super viewDidLoad];
NSArray *directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FORTS_DIRECTORY() error:NULL];
- NSMutableArray *filteredContents = [[NSMutableArray alloc] initWithCapacity:([directoryContents count] / 2)];
+ NSMutableArray *filteredContents = [[NSMutableArray alloc] initWithCapacity:([directoryContents count] / 3)];
// we need to remove the double entries and the L.png suffix
for (int i = 0; i < [directoryContents count]; i++) {
- if (i % 2) {
+ if (i % 3 == 1) {
NSString *currentName = [directoryContents objectAtIndex:i];
NSString *correctName = [currentName substringToIndex:([currentName length] - 5)];
[filteredContents addObject:correctName];
@@ -88,15 +88,13 @@
NSString *fortName = [fortArray objectAtIndex:[indexPath row]];
cell.textLabel.text = fortName;
- // this creates a scaled down version of the image
- // TODO: create preview files, scaling is way too slow!
- NSString *fortFile = [[NSString alloc] initWithFormat:@"%@/%@L.png", FORTS_DIRECTORY(), fortName];
+ NSString *fortFile = [[NSString alloc] initWithFormat:@"%@/%@-preview.png", FORTS_DIRECTORY(), fortName];
UIImage *fortSprite = [[UIImage alloc] initWithContentsOfFile:fortFile];
[fortFile release];
- cell.imageView.image = [fortSprite scaleToSize:CGSizeMake(196,196)];
+ cell.imageView.image = fortSprite;
[fortSprite release];
- cell.detailTextLabel.text = @"Insert funny description here";
+ //cell.detailTextLabel.text = @"Insert funny description here";
if ([cell.textLabel.text isEqualToString:[self.teamDictionary objectForKey:@"fort"]]) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
self.lastIndexPath = indexPath;
--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Sun Aug 29 23:36:22 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Mon Aug 30 01:38:46 2010 +0200
@@ -536,8 +536,8 @@
self.sizeLabel.text = NSLocalizedString(@"All",@"");
self.slider.value = 0.05f;
- // select a map at first because it's faster
- self.segmentedControl.selectedSegmentIndex = 1;
+ // select a map at first because it's faster - done in IB
+ //self.segmentedControl.selectedSegmentIndex = 1;
self.templateFilterCommand = @"e$template_filter 0";
self.mazeSizeCommand = @"e$maze_size 0";
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sun Aug 29 23:36:22 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Mon Aug 30 01:38:46 2010 +0200
@@ -217,7 +217,7 @@
return;
if (HW_isWaiting())
- HW_shoot();
+ HW_dismissReady();
UIButton *theButton = (UIButton *)sender;
switch (theButton.tag) {
@@ -369,7 +369,7 @@
case 1:
// this dismisses the "get ready"
if (HW_isWaiting())
- HW_shoot();
+ HW_dismissReady();
// if we're in the menu we just click in the point
if (HW_isAmmoOpen()) {
--- a/project_files/HedgewarsMobile/Classes/PascalImports.h Sun Aug 29 23:36:22 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/PascalImports.h Mon Aug 30 01:38:46 2010 +0200
@@ -54,6 +54,7 @@
void HW_pause(void);
void HW_terminate(BOOL andCloseFrontend);
+ void HW_dismissReady(void);
void HW_setLandscape(BOOL rotate);
void HW_setCursor(int x, int y);
--- a/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m Sun Aug 29 23:36:22 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m Mon Aug 30 01:38:46 2010 +0200
@@ -108,7 +108,7 @@
[self.teamDictionary writeToFile:teamFile atomically:YES];
[teamFile release];
- DLog(@"%@",teamDictionary);
+ //DLog(@"%@",teamDictionary);
isWriteNeeded = NO;
}
@@ -223,7 +223,7 @@
[accessoryImage release];
break;
case 2: // fort
- accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@L.png",
+ accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@-preview.png",
FORTS_DIRECTORY(),[teamDictionary objectForKey:@"fort"]]];
cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(42, 42)];
[accessoryImage release];
--- a/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib Sun Aug 29 23:36:22 2010 +0200
+++ b/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib Mon Aug 30 01:38:46 2010 +0200
@@ -154,7 +154,7 @@
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBSegmentControlStyle">2</int>
<int key="IBNumberOfSegments">3</int>
- <int key="IBSelectedSegmentIndex">0</int>
+ <int key="IBSelectedSegmentIndex">1</int>
<object class="NSArray" key="IBSegmentTitles">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>Random</string>
@@ -753,7 +753,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>MapConfigViewController</string>
<string>UIResponder</string>
- <string>{{335, 290}, {1024, 768}}</string>
+ <string>{{288, 290}, {1024, 768}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
Binary file share/hedgewars/Data/Forts/Barrelhouse-preview.png has changed
--- a/share/hedgewars/Data/Forts/CMakeLists.txt Sun Aug 29 23:36:22 2010 +0200
+++ b/share/hedgewars/Data/Forts/CMakeLists.txt Mon Aug 30 01:38:46 2010 +0200
@@ -1,4 +1,4 @@
-file(GLOB FortSprites *.png)
+file(GLOB FortSprites *{L,R}.png)
install(FILES
${FortSprites}
Binary file share/hedgewars/Data/Forts/Cake-preview.png has changed
Binary file share/hedgewars/Data/Forts/Castle-preview.png has changed
Binary file share/hedgewars/Data/Forts/Earth-preview.png has changed
Binary file share/hedgewars/Data/Forts/Flowerhog-preview.png has changed
Binary file share/hedgewars/Data/Forts/Hydrant-preview.png has changed
Binary file share/hedgewars/Data/Forts/Island-preview.png has changed
Binary file share/hedgewars/Data/Forts/Lego-preview.png has changed
Binary file share/hedgewars/Data/Forts/Plane-preview.png has changed
Binary file share/hedgewars/Data/Forts/Statue-preview.png has changed
Binary file share/hedgewars/Data/Forts/UFO-preview.png has changed
Binary file share/hedgewars/Data/Forts/Wood-preview.png has changed