# HG changeset patch # User koda # Date 1317766734 -7200 # Node ID 72c882c0fd0f80d59ed339d86ba82a498a4256ee # Parent 16ca7a7a6aa6a546aa9b8d76c120a4e212f16ecd first pass for implementing missions/training selection on ipad (not yet running) diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/DefinesAndMacros.h --- a/project_files/HedgewarsMobile/Classes/DefinesAndMacros.h Tue Oct 04 17:13:39 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/DefinesAndMacros.h Wed Oct 05 00:18:54 2011 +0200 @@ -66,6 +66,7 @@ #define THEMES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Themes/"] #define MAPS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Maps/"] #define MISSIONS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Missions/Maps/"] +#define TRAININGS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Missions/Training/"] #define LOCALE_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Locale/"] #define SCRIPTS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Scripts/plist/"] diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m --- a/project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m Tue Oct 04 17:13:39 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m Wed Oct 05 00:18:54 2011 +0200 @@ -61,7 +61,7 @@ #pragma mark - #pragma mark Spawner functions -(void) spawnThread:(NSString *)onSaveFile withOptions:(NSDictionary *)dictionary { - self.stream = [[NSOutputStream alloc] initToFileAtPath:onSaveFile append:YES]; + self.stream = (onSaveFile) ? [[NSOutputStream alloc] initToFileAtPath:onSaveFile append:YES] : nil; [self.stream open]; [NSThread detachNewThreadSelector:@selector(engineProtocol:) diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/GameInterfaceBridge.h --- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.h Tue Oct 04 17:13:39 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.h Wed Oct 05 00:18:54 2011 +0200 @@ -22,7 +22,7 @@ #import #import "EngineProtocolNetwork.h" -typedef enum {gtNone, gtLocal, gtSave, gtNet} TGameType; +typedef enum {gtNone, gtLocal, gtSave, gtMission, gtNet} TGameType; typedef enum {gsNone, gsInGame, gsEnded, gsInterrupted} TGameStatus; @class OverlayViewController; @@ -49,10 +49,12 @@ -(id) initWithController:(id) viewController; --(void) startLocalGame:(NSDictionary *)withDictionary; +-(void) startLocalGame:(NSDictionary *)withOptions; -(void) startSaveGame:(NSString *)atPath; +-(void) startMissionGame:(NSString *)withScript; + -(void) prepareEngineLaunch; --(void) startGameEngine; +-(void) engineLaunch; -(void) gameHasEndedWithStats:(NSArray *)stats; @end diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m --- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Tue Oct 04 17:13:39 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Wed Oct 05 00:18:54 2011 +0200 @@ -62,7 +62,7 @@ } // main routine for calling the actual game engine --(void) startGameEngine { +-(void) engineLaunch { const char *gameArgs[11]; NSInteger width, height; NSString *ipcString = [[NSString alloc] initWithFormat:@"%d", self.ipcPort]; @@ -158,7 +158,7 @@ [AudioManagerController pauseBackgroundMusic]; // SYSTEMS ARE GO!! - [self startGameEngine]; + [self engineLaunch]; // remove completed games notification [userDefaults setObject:@"" forKey:@"savedGamePath"]; @@ -184,7 +184,7 @@ } // set up variables for a local game --(void) startLocalGame:(NSDictionary *)withDictionary { +-(void) startLocalGame:(NSDictionary *)withOptions { self.gameType = gtLocal; NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; @@ -198,7 +198,7 @@ if ([[NSFileManager defaultManager] fileExistsAtPath:self.savePath]) [[NSFileManager defaultManager] removeItemAtPath:self.savePath error:nil]; - [self.engineProtocol spawnThread:self.savePath withOptions:withDictionary]; + [self.engineProtocol spawnThread:self.savePath withOptions:withOptions]; [self prepareEngineLaunch]; } @@ -211,6 +211,15 @@ [self prepareEngineLaunch]; } +-(void) startMissionGame:(NSString *)withScript { + self.gameType = gtMission; + self.savePath = nil; + + NSDictionary *config = [NSDictionary dictionaryWithObject:withScript forKey:@"mission_command"]; + [self.engineProtocol spawnThread:nil withOptions:config]; + [self prepareEngineLaunch]; +} + -(void) gameHasEndedWithStats:(NSArray *)stats { // wrap this around a retain/realse to prevent being deallocated too soon [self retain]; diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/HWUtils.m --- a/project_files/HedgewarsMobile/Classes/HWUtils.m Tue Oct 04 17:13:39 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/HWUtils.m Wed Oct 05 00:18:54 2011 +0200 @@ -78,7 +78,7 @@ } +(UIColor *)blackColorTransparent { - return [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5f]; + return [UIColor colorWithRed:0 green:0 blue:0 alpha:0.7f]; } @end diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/MainMenuViewController.h --- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.h Tue Oct 04 17:13:39 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.h Wed Oct 05 00:18:54 2011 +0200 @@ -26,13 +26,15 @@ @class AboutViewController; @class SavedGamesViewController; @class RestoreViewController; +@class MissionTrainingViewController; @interface MainMenuViewController : UIViewController { GameConfigViewController *gameConfigViewController; SettingsContainerViewController *settingsViewController; AboutViewController *aboutViewController; SavedGamesViewController *savedGamesViewController; - RestoreViewController *restoreViewCOntroller; + RestoreViewController *restoreViewController; + MissionTrainingViewController *missionsViewController; } @property (nonatomic,retain) GameConfigViewController *gameConfigViewController; @@ -40,6 +42,7 @@ @property (nonatomic,retain) AboutViewController *aboutViewController; @property (nonatomic,retain) SavedGamesViewController *savedGamesViewController; @property (nonatomic,retain) RestoreViewController *restoreViewController; +@property (nonatomic,retain) MissionTrainingViewController *missionsViewController; -(IBAction) switchViews:(id)sender; diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/MainMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Tue Oct 04 17:13:39 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Wed Oct 05 00:18:54 2011 +0200 @@ -21,19 +21,20 @@ #import "MainMenuViewController.h" #import "CreationChamber.h" -#import "PascalImports.h" #import "GameConfigViewController.h" #import "SettingsContainerViewController.h" #import "AboutViewController.h" #import "SavedGamesViewController.h" #import "RestoreViewController.h" +#import "MissionTrainingViewController.h" #import "GameInterfaceBridge.h" #import "Appirater.h" #import "ServerSetup.h" @implementation MainMenuViewController -@synthesize gameConfigViewController, settingsViewController, aboutViewController, savedGamesViewController, restoreViewController; +@synthesize gameConfigViewController, settingsViewController, aboutViewController, savedGamesViewController, + restoreViewController, missionsViewController; -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { return rotationManager(interfaceOrientation); @@ -171,7 +172,6 @@ self.gameConfigViewController = gcvc; [gcvc release]; } - [self presentModalViewController:self.gameConfigViewController animated:YES]; break; case 2: @@ -181,7 +181,6 @@ self.settingsViewController = svrc; [svrc release]; } - [self presentModalViewController:self.settingsViewController animated:YES]; break; case 3: @@ -224,9 +223,19 @@ self.savedGamesViewController = savedgames; [savedgames release]; } - [self presentModalViewController:self.savedGamesViewController animated:YES]; break; + case 5: + if (nil == self.missionsViewController) { + MissionTrainingViewController *missions = [[MissionTrainingViewController alloc] initWithNibName:@"MissionTrainingViewController~iPad" bundle:nil]; + missions.modalTransitionStyle = UIModalTransitionStyleCoverVertical; + if ([missions respondsToSelector:@selector(setModalPresentationStyle:)]) + missions.modalPresentationStyle = UIModalPresentationPageSheet; + self.missionsViewController = missions; + [missions release]; + } + [self presentModalViewController:self.missionsViewController animated:YES]; + break; default: alert = [[UIAlertView alloc] initWithTitle:@"Not Yet Implemented" message:@"Sorry, this feature is not yet implemented" diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/MissionTrainingViewController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/MissionTrainingViewController.h Wed Oct 05 00:18:54 2011 +0200 @@ -0,0 +1,40 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2011 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 03/10/2011. + */ + +#import + + +@interface MissionTrainingViewController : UIViewController { + NSArray *listOfMissions; + UIImageView *previewImage; + UITableView *tableView; + UILabel *descriptionLabel; + NSString *missionFile; +} + +@property (nonatomic, retain) NSArray *listOfMissions; +@property (nonatomic, retain) IBOutlet UIImageView *previewImage; +@property (nonatomic, retain) IBOutlet UITableView *tableView; +@property (nonatomic, retain) IBOutlet UILabel *descriptionLabel; +@property (nonatomic, retain) IBOutlet NSString *missionFile; + +-(IBAction) buttonPressed:(id) sender; + +@end diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m Wed Oct 05 00:18:54 2011 +0200 @@ -0,0 +1,162 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2011 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 03/10/2011. + */ + +#import "MissionTrainingViewController.h" +#import +#import "GameInterfaceBridge.h" + +@implementation MissionTrainingViewController +@synthesize listOfMissions, previewImage, tableView, descriptionLabel, missionFile; + +-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { + return rotationManager(interfaceOrientation); +} + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +-(void) viewDidLoad { + srand(time(NULL)); + + NSString *imgName = (IS_IPAD()) ? @"mediumBackground~ipad.png" : @"smallerBackground~iphone.png"; + UIImage *img = [[UIImage alloc] initWithContentsOfFile:imgName]; + self.view.backgroundColor = [UIColor colorWithPatternImage:img]; + [img release]; + + NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TRAININGS_DIRECTORY() error:NULL]; + self.listOfMissions = array; + self.previewImage.layer.borderColor = [[UIColor darkYellowColor] CGColor]; + self.previewImage.layer.borderWidth = 3.8f; + self.previewImage.layer.cornerRadius = 14; + + UIView *backView = [[UIView alloc] initWithFrame:self.tableView.frame]; + backView.backgroundColor = [UIColor darkBlueColorTransparent]; + [self.tableView setBackgroundView:backView]; + [backView release]; + self.tableView.backgroundColor = [UIColor clearColor]; + self.tableView.layer.borderColor = [[UIColor darkYellowColor] CGColor]; + self.tableView.layer.borderWidth = 2; + self.tableView.layer.cornerRadius = 8; + + self.descriptionLabel.textColor = [UIColor lightYellowColor]; + [super viewDidLoad]; +} + +-(void) viewWillAppear:(BOOL)animated { + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:random()%[self.listOfMissions count] inSection:0]; + [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; + [self tableView:self.tableView didSelectRowAtIndexPath:indexPath]; + [super viewWillAppear:animated]; +} + +-(IBAction) buttonPressed:(id) sender { + UIButton *button = (UIButton *)sender; + + if (button.tag == 0) { + [AudioManagerController playBackSound]; + [[self parentViewController] dismissModalViewControllerAnimated:YES]; + } else { +/* GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self]; + [bridge startMissionGame:self.missionFile]; + [bridge release];*/ + } +} + +#pragma mark Table view data source +-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [self.listOfMissions count]; +} + +-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + static NSString *CellIdentifier = @"CellTr"; + + UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (cell == nil) + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; + + cell.textLabel.text = [[[self.listOfMissions objectAtIndex:[indexPath row]] stringByDeletingPathExtension] stringByReplacingOccurrencesOfString:@"_" withString:@" "]; + cell.textLabel.textColor = [UIColor lightYellowColor]; + //cell.textLabel.font = [UIFont fontWithName:@"Bradley Hand Bold" size:[UIFont labelFontSize]]; + cell.textLabel.textAlignment = UITextAlignmentCenter; + cell.textLabel.backgroundColor = [UIColor clearColor]; + cell.backgroundColor = [UIColor blackColorTransparent]; + return cell; +} + +#pragma mark - +#pragma mark Table view delegate +-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + NSString *missionName = [[self.listOfMissions objectAtIndex:[indexPath row]] stringByDeletingPathExtension]; + NSString *filePath = [[NSString alloc] initWithFormat:@"%@/Missions/Training/%@@2x.png",GRAPHICS_DIRECTORY(),missionName]; + UIImage *img = [[UIImage alloc] initWithContentsOfFile:filePath]; + [filePath release]; + [self.previewImage setImage:img]; + [img release]; + + self.descriptionLabel.text = nil; + NSString *descLocation = [[NSString alloc] initWithFormat:@"%@/missions_en.txt",LOCALE_DIRECTORY()]; + NSString *descComplete = [[NSString alloc] initWithContentsOfFile:descLocation encoding:NSUTF8StringEncoding error:NULL]; + [descLocation release]; + NSArray *descArray = [descComplete componentsSeparatedByString:@"\n"]; + [descComplete release]; + for (NSString *str in descArray) { + if ([str hasPrefix:missionName]) { + NSArray *descriptionText = [str componentsSeparatedByString:@"\""]; + self.descriptionLabel.text = [descriptionText objectAtIndex:1]; + } + } + + NSString *missionPath = [[NSString alloc] initWithFormat:@"%@/%@.lua",TRAININGS_DIRECTORY(),missionName]; + self.missionFile = missionPath; + [missionPath release]; +} + +#pragma mark - +#pragma mark Memory management +-(void) didReceiveMemoryWarning { + previewImage = nil; + missionFile = nil; + [super didReceiveMemoryWarning]; +} + +-(void) viewDidUnload { + self.listOfMissions = nil; + self.previewImage = nil; + self.tableView = nil; + self.descriptionLabel = nil; + self.missionFile = nil; + MSG_DIDUNLOAD(); + [super viewDidUnload]; +} + + +-(void) dealloc { + releaseAndNil(listOfMissions); + releaseAndNil(previewImage); + releaseAndNil(tableView); + releaseAndNil(descriptionLabel); + releaseAndNil(missionFile); + [super dealloc]; +} + + +@end diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/MissionTrainingViewController~iPad.xib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/MissionTrainingViewController~iPad.xib Wed Oct 05 00:18:54 2011 +0200 @@ -0,0 +1,766 @@ + + + + 1056 + 10K549 + 823 + 1038.36 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 132 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 274 + {{91, 86}, {585, 391}} + + + 10 + + 549453824 + {84, 1} + + YES + + YES + + + + TU0AKgAAAVjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/ +y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/ +xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/ +xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/ +xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/ +xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P8ADQEAAAMAAAABAFQAAAEB +AAMAAAABAAEAAAECAAMAAAAEAAAB+gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABAAEAAAEXAAQAAAABAAABUAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA + + + + + + 3 + MCAwAA + + + groupTableViewBackgroundColor + + NO + YES + IBCocoaTouchFramework + YES + 2 + 1 + 2 + 0 + YES + 44 + 10 + 10 + + + + 292 + {{227, 496}, {314, 260}} + + NO + IBCocoaTouchFramework + + + + 292 + {{20, 684}, {64, 64}} + + NO + IBCocoaTouchFramework + 0 + 0 + + Helvetica-Bold + 15 + 16 + + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + + + NSImage + backButton.png + + + + + 292 + {{606, 684}, {142, 64}} + + NO + 1 + IBCocoaTouchFramework + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + startGameButton.png + + + + + 292 + {{5, 6}, {757, 72}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + Description here + + Helvetica-BoldOblique + 21 + 16 + + + 1 + MCAwIDAAA + + + 1 + 10 + 2 + 1 + + + {768, 768} + + + 3 + MQA + + 2 + + + + 3 + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 3 + + + + dataSource + + + + 11 + + + + delegate + + + + 12 + + + + previewImage + + + + 13 + + + + tableView + + + + 14 + + + + buttonPressed: + + + 7 + + 19 + + + + buttonPressed: + + + 7 + + 20 + + + + descriptionLabel + + + + 22 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 9 + + + YES + + + + + 10 + + + + + 17 + + + + + 18 + + + + + 21 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 10.IBPluginDependency + 10.IBViewBoundsToFrameTransform + 17.IBPluginDependency + 17.IBViewBoundsToFrameTransform + 18.IBPluginDependency + 18.IBViewBoundsToFrameTransform + 21.IBPluginDependency + 21.IBViewBoundsToFrameTransform + 9.IBPluginDependency + 9.IBViewBoundsToFrameTransform + + + YES + MissionTrainingViewController + UIResponder + {{492, 303}, {768, 768}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDYwAAxD2AAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABBoAAAxC1AAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABEF4AAxC1AAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABCDAAAwowAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABC2AAAw8yAAA + + + + + YES + + + YES + + + + + YES + + + YES + + + + 22 + + + + YES + + MissionTrainingViewController + UIViewController + + buttonPressed: + id + + + buttonPressed: + + buttonPressed: + id + + + + YES + + YES + descriptionLabel + missionFile + previewImage + tableView + + + YES + UILabel + NSString + UIImageView + UITableView + + + + YES + + YES + descriptionLabel + missionFile + previewImage + tableView + + + YES + + descriptionLabel + UILabel + + + missionFile + NSString + + + previewImage + UIImageView + + + tableView + UITableView + + + + + IBProjectSource + Classes/MissionTrainingViewController.h + + + + NSString + + IBProjectSource + Classes/HWUtils.h + + + + UILabel + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + NSString + + IBFrameworkSource + Foundation.framework/Headers/NSPathUtilities.h + + + + NSString + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSString.h + + + + NSString + + + + NSString + + IBFrameworkSource + UIKit.framework/Headers/UIStringDrawing.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + UIScrollView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIScrollView.h + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UITableView + UIScrollView + + IBFrameworkSource + UIKit.framework/Headers/UITableView.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIPrintFormatter.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../Hedgewars.xcodeproj + 3 + + YES + + YES + backButton.png + startGameButton.png + + + YES + {64, 64} + {142, 64} + + + 132 + + diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Classes/SavedGamesViewController.m --- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Tue Oct 04 17:13:39 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Wed Oct 05 00:18:54 2011 +0200 @@ -44,11 +44,7 @@ if ([self.tableView respondsToSelector:@selector(setBackgroundView:)]) self.tableView.backgroundView = nil; - NSString *imgName; - if (IS_IPAD()) - imgName = @"mediumBackground~ipad.png"; - else - imgName = @"smallerBackground~iphone.png"; + NSString *imgName = (IS_IPAD()) ? @"mediumBackground~ipad.png" : @"smallerBackground~iphone.png"; UIImage *img = [[UIImage alloc] initWithContentsOfFile:imgName]; self.view.backgroundColor = [UIColor colorWithPatternImage:img]; [img release]; diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj --- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Tue Oct 04 17:13:39 2011 -0400 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Wed Oct 05 00:18:54 2011 +0200 @@ -179,6 +179,8 @@ 61842B40122B66280096E335 /* helpleft.png in Resources */ = {isa = PBXBuildFile; fileRef = 61842B3F122B66280096E335 /* helpleft.png */; }; 6187AEBD120781B900B31A27 /* Settings in Resources */ = {isa = PBXBuildFile; fileRef = 6187AEA5120781B900B31A27 /* Settings */; }; 61889985129995B500D55FD6 /* title~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 61889984129995B500D55FD6 /* title~ipad.png */; }; + 61915D5B143A4E2C00299991 /* MissionTrainingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61915D59143A4E2C00299991 /* MissionTrainingViewController.m */; }; + 61915D5C143A4E2C00299991 /* MissionTrainingViewController~iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61915D5A143A4E2C00299991 /* MissionTrainingViewController~iPad.xib */; }; 6195981F1364BCEF00B429B6 /* libTremor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6195981D1364BCD200B429B6 /* libTremor.a */; }; 619599451364C83D00B429B6 /* libLua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 619599441364C82B00B429B6 /* libLua.a */; }; 619599C01364E66B00B429B6 /* libFreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 619599BF1364E65900B429B6 /* libFreetype.a */; }; @@ -542,6 +544,9 @@ 618899811299516000D55FD6 /* title@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "title@2x~iphone.png"; path = "Resources/Frontend/title@2x~iphone.png"; sourceTree = ""; }; 61889984129995B500D55FD6 /* title~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "title~ipad.png"; path = "Resources/Frontend/title~ipad.png"; sourceTree = ""; }; 618E27B612A2C30700C20EF0 /* SDL_net.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_net.xcodeproj; path = "../../../Library/SDL_net/Xcode-iPhoneOS/SDL_net.xcodeproj"; sourceTree = SOURCE_ROOT; }; + 61915D58143A4E2C00299991 /* MissionTrainingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MissionTrainingViewController.h; sourceTree = ""; }; + 61915D59143A4E2C00299991 /* MissionTrainingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MissionTrainingViewController.m; sourceTree = ""; }; + 61915D5A143A4E2C00299991 /* MissionTrainingViewController~iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "MissionTrainingViewController~iPad.xib"; sourceTree = ""; }; 619598181364BCD200B429B6 /* Tremor.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Tremor.xcodeproj; path = ../../misc/libtremor/Xcode/Tremor.xcodeproj; sourceTree = SOURCE_ROOT; }; 6195993F1364C82B00B429B6 /* Lua.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Lua.xcodeproj; path = ../../misc/liblua/Xcode/Lua.xcodeproj; sourceTree = SOURCE_ROOT; }; 619599BA1364E65900B429B6 /* Freetype.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Freetype.xcodeproj; path = "../../misc/libfreetype/Xcode-iPhoneOS/Freetype.xcodeproj"; sourceTree = SOURCE_ROOT; }; @@ -788,6 +793,9 @@ 611D9BFA12497E9800008271 /* SavedGamesViewController.xib */, 61B7A33612CC21080086B604 /* StatsPageViewController.h */, 61B7A33712CC21080086B604 /* StatsPageViewController.m */, + 61915D58143A4E2C00299991 /* MissionTrainingViewController.h */, + 61915D59143A4E2C00299991 /* MissionTrainingViewController.m */, + 61915D5A143A4E2C00299991 /* MissionTrainingViewController~iPad.xib */, ); name = "Other Controllers"; sourceTree = ""; @@ -1452,6 +1460,7 @@ 6167CA42142A6ED7003DD50F /* bot5@2x.png in Resources */, 6167CB48142A8769003DD50F /* basehat-hedgehog.png in Resources */, 6167CB49142A8769003DD50F /* basehat-hedgehog@2x.png in Resources */, + 61915D5C143A4E2C00299991 /* MissionTrainingViewController~iPad.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1605,6 +1614,7 @@ 61A976B3136F668500DD9878 /* uCursor.pas in Sources */, 6167A6761391514600AA6D07 /* RestoreViewController.m in Sources */, 61C28D3F142D380400DA16C2 /* AudioManagerController.m in Sources */, + 61915D5B143A4E2C00299991 /* MissionTrainingViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff -r 16ca7a7a6aa6 -r 72c882c0fd0f project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib --- a/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib Tue Oct 04 17:13:39 2011 -0400 +++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib Wed Oct 05 00:18:54 2011 +0200 @@ -2,9 +2,9 @@ 1056 - 10H574 + 10K549 823 - 1038.35 + 1038.36 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -57,7 +57,7 @@ 292 - {{383, 427}, {263, 244}} + {{383, 389}, {263, 244}} NO IBIPadFramework @@ -166,6 +166,26 @@ title~ipad.png + + + 292 + {{468, 686}, {89, 37}} + + NO + 5 + IBIPadFramework + 0 + 0 + + 1 + Missions + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + {1024, 768} @@ -226,6 +246,15 @@ 89 + + + switchViews: + + + 7 + + 92 + @@ -247,6 +276,7 @@ + @@ -292,6 +322,11 @@ + + 91 + + + @@ -312,6 +347,8 @@ 88.IBViewBoundsToFrameTransform 90.IBPluginDependency 90.IBViewBoundsToFrameTransform + 91.IBPluginDependency + 91.IBViewBoundsToFrameTransform YES @@ -337,6 +374,10 @@ P4AAAL+AAABDbQAAw6qAAA + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + AUPqAABEK4AAA + @@ -355,7 +396,7 @@ - 90 + 92