# HG changeset patch # User nemo # Date 1281882321 14400 # Node ID 2e7dda50fdddeee526fa2436c5c3c9453a5a155a # Parent 26de8c8a5b5d8a4cf620071620c2631506a14edf# Parent 97cf933e5bd2c37a62758d9316b0fb38e7dd13ea ... diff -r 26de8c8a5b5d -r 2e7dda50fddd hedgewars/PascalExports.pas --- a/hedgewars/PascalExports.pas Fri Aug 13 13:42:18 2010 -0400 +++ b/hedgewars/PascalExports.pas Sun Aug 15 10:25:21 2010 -0400 @@ -18,8 +18,8 @@ {$INCLUDE "config.inc"} implementation - {$IFDEF HWLIBRARY} +var cZoomVal: GLfloat; // retrieve protocol information procedure HW_versionInfo(netProto: PShortInt; versionStr: PPChar); cdecl; export; @@ -34,6 +34,17 @@ leftClick:= true; end; +procedure HW_ammoMenu; cdecl; export; +begin + rightClick:= true; +end; + +procedure HW_zoomSet(value: GLfloat); cdecl; export; +begin + cZoomVal:= value; + ZoomValue:= value; +end; + procedure HW_zoomIn; cdecl; export; begin if wheelDown = false then @@ -48,7 +59,8 @@ procedure HW_zoomReset; cdecl; export; begin - middleClick:= true; + ZoomValue:= cZoomVal; + //middleClick:= true; // center the camera at current hog if CurrentHedgehog <> nil then followGear:= CurrentHedgehog^.Gear; @@ -65,11 +77,6 @@ exit( trunc((ZoomValue - cDefaultZoomLevel) / cZoomDelta) ); end; -procedure HW_ammoMenu; cdecl; export; -begin - rightClick:= true; -end; - procedure HW_walkingKeysUp; cdecl; export; begin leftKey:= false; @@ -183,13 +190,67 @@ y^:= CursorPoint.Y; end; +function HW_isAmmoOpen: boolean; cdecl; export; +begin + exit(bShowAmmoMenu); +end; + +function HW_isPaused: boolean; cdecl; export; +begin + exit( isPaused ); +end; + +function HW_isWeaponRequiringClick: boolean; cdecl; export; +begin + if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.BotLevel = 0) then + exit( (CurrentHedgehog^.Gear^.State and gstHHChooseTarget) <> 0 ) + else + exit(false); +end; + +function HW_isWeaponTimerable: boolean; cdecl; export; +var CurSlot, CurAmmo: LongWord; +begin + CurSlot:= CurrentHedgehog^.CurSlot; + CurAmmo:= CurrentHedgehog^.CurAmmo; + if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Ammo <> nil) and (CurrentHedgehog^.BotLevel = 0) then + exit( (CurrentHedgehog^.Ammo^[CurSlot, CurAmmo].Propz and ammoprop_Timerable) <> 0) + else + exit(false); +end; + +function HW_isWeaponSwitch: boolean cdecl; export; +begin + if (CurAmmoGear <> nil) and (CurrentHedgehog^.BotLevel = 0) then + exit(CurAmmoGear^.AmmoType = amSwitch) + else + exit(false) +end; + +function HW_isWeaponRope: boolean cdecl; export; +var CurSlot, CurAmmo: LongWord; +begin + CurSlot:= CurrentHedgehog^.CurSlot; + CurAmmo:= CurrentHedgehog^.CurAmmo; + if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Ammo <> nil) and (CurrentHedgehog^.BotLevel = 0) then + exit (CurrentHedgehog^.Ammo^[CurSlot, CurAmmo].AmmoType = amRope) + else + exit(false); +end; + +procedure HW_setGrenadeTime(time: LongInt); cdecl; export; +begin + ParseCommand('/timer ' + inttostr(time), true); +end; + procedure HW_setPianoSound(snd: LongInt); cdecl; export; var CurSlot, CurAmmo: LongWord; begin CurSlot:= CurrentHedgehog^.CurSlot; CurAmmo:= CurrentHedgehog^.CurAmmo; // this most likely won't work in network game - if (CurrentHedgehog^.Ammo^[CurSlot, CurAmmo].AmmoType = amPiano) then + if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Ammo <> nil) and (CurrentHedgehog^.BotLevel = 0) + and (CurrentHedgehog^.Ammo^[CurSlot, CurAmmo].AmmoType = amPiano) then case snd of 0: PlaySound(sndPiano0); 1: PlaySound(sndPiano1); @@ -202,47 +263,6 @@ else PlaySound(sndPiano8); end; end; - -function HW_isAmmoOpen: boolean; cdecl; export; -begin - exit(bShowAmmoMenu); -end; - -function HW_isWeaponRequiringClick: boolean; cdecl; export; -begin - if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then - exit( (CurrentHedgehog^.Gear^.State and gstHHChooseTarget) <> 0 ) - else - exit(false); -end; - -function HW_isWeaponTimerable: boolean; cdecl; export; -var CurSlot, CurAmmo: LongWord; -begin - CurSlot:= CurrentHedgehog^.CurSlot; - CurAmmo:= CurrentHedgehog^.CurAmmo; - exit( (CurrentHedgehog^.Ammo^[CurSlot, CurAmmo].Propz and ammoprop_Timerable) <> 0) -end; - -function HW_isWeaponSwitch: boolean cdecl; export; -begin - if CurAmmoGear <> nil then - exit(CurAmmoGear^.AmmoType = amSwitch) - else - exit(false) -end; - -function HW_isPaused: boolean; cdecl; export; -begin - exit( isPaused ); -end; - -procedure HW_setGrenadeTime(time: LongInt); cdecl; export; -begin - ParseCommand('/timer ' + inttostr(time), true); -end; - -//amSwitch {$ENDIF} end. diff -r 26de8c8a5b5d -r 2e7dda50fddd hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Fri Aug 13 13:42:18 2010 -0400 +++ b/hedgewars/hwengine.pas Sun Aug 15 10:25:21 2010 -0400 @@ -216,7 +216,7 @@ {$IFDEF DEBUGFILE} cShowFPS:= true; {$ELSE} - cShowFPS:= true; // update me at release time + cShowFPS:= false; // update me at release time {$ENDIF} cInitVolume:= 100; diff -r 26de8c8a5b5d -r 2e7dda50fddd hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Fri Aug 13 13:42:18 2010 -0400 +++ b/hedgewars/uAIAmmoTests.pas Sun Aug 15 10:25:21 2010 -0400 @@ -71,7 +71,8 @@ (proc: nil; flags: 0), // amMineStrike (proc: nil; flags: 0), // amBlowTorch (proc: nil; flags: 0), // amGirder - (proc: @TestTeleport; flags: amtest_OnTurn), // amTeleport + (proc: nil; flags: 0), // amTeleport + //(proc: @TestTeleport; flags: amtest_OnTurn), // amTeleport (proc: nil; flags: 0), // amSwitch (proc: @TestMortar; flags: 0), // amMortar (proc: nil; flags: 0), // amKamikaze diff -r 26de8c8a5b5d -r 2e7dda50fddd hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Fri Aug 13 13:42:18 2010 -0400 +++ b/hedgewars/uConsts.pas Sun Aug 15 10:25:21 2010 -0400 @@ -304,7 +304,9 @@ cKeyMaxIndex = 1023; + // do not change this value cDefaultZoomLevel = 2.0; + {$IFDEF IPHONEOS} cMaxZoomLevel = 0.5; cMinZoomLevel = 3.5; diff -r 26de8c8a5b5d -r 2e7dda50fddd hedgewars/uScript.pas --- a/hedgewars/uScript.pas Fri Aug 13 13:42:18 2010 -0400 +++ b/hedgewars/uScript.pas Sun Aug 15 10:25:21 2010 -0400 @@ -597,6 +597,31 @@ lc_setgearposition:= 0 end; +function lc_setzoom(L : Plua_State) : LongInt; Cdecl; +begin + if lua_gettop(L) <> 1 then + LuaError('Lua: Wrong number of parameters passed to SetZoom!') + else + begin + ZoomValue:= lua_tonumber(L, 1); + if ZoomValue < cMaxZoomLevel then ZoomValue:= cMaxZoomLevel; + if ZoomValue > cMinZoomLevel then ZoomValue:= cMinZoomLevel; + end; + lc_setzoom:= 0 +end; + +function lc_getzoom(L : Plua_State) : LongInt; Cdecl; +begin + if lua_gettop(L) <> 0 then + begin + LuaError('Lua: Wrong number of parameters passed to GetZoom!'); + lua_pushnil(L) + end + else + lua_pushnumber(L, ZoomValue); + lc_getzoom:= 1 +end; + function lc_setammo(L : Plua_State) : LongInt; Cdecl; var np: LongInt; begin @@ -932,6 +957,8 @@ lua_register(luaState, 'SetTimer', @lc_settimer); lua_register(luaState, 'GetTimer', @lc_gettimer); lua_register(luaState, 'GetHealth', @lc_gethealth); +lua_register(luaState, 'SetZoom', @lc_setzoom); +lua_register(luaState, 'GetZoom', @lc_getzoom); ScriptClearStack; // just to be sure stack is empty diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/CommodityFunctions.h --- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Sun Aug 15 10:25:21 2010 -0400 @@ -10,18 +10,14 @@ #define MAX_HOGS 8 - -#define SETTINGS_FILE() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ - objectAtIndex:0] stringByAppendingString:@"/settings.plist"] -#define DEBUG_FILE() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ - objectAtIndex:0] stringByAppendingString:@"/debug.txt"] +#define DOCUMENTS_FOLDER() [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] -#define TEAMS_DIRECTORY() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ - objectAtIndex:0] stringByAppendingString:@"/Teams/"] -#define WEAPONS_DIRECTORY() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ - objectAtIndex:0] stringByAppendingString:@"/Weapons/"] -#define SCHEMES_DIRECTORY() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ - objectAtIndex:0] stringByAppendingString:@"/Schemes/"] +#define SETTINGS_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/settings.plist"] +#define DEBUG_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/debug.txt"] + +#define TEAMS_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Teams/"] +#define WEAPONS_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Weapons/"] +#define SCHEMES_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Schemes/"] #define GRAPHICS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"] #define HATS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"] @@ -37,13 +33,13 @@ #define MSG_MEMCLEAN() DLog(@"has cleaned up some memory"); #define MSG_DIDUNLOAD() DLog(@"unloaded"); -#define CURRENT_AMMOSIZE 46 +#define CURRENT_AMMOSIZE 48 // also add a line in SingleWeaponViewController array #define UICOLOR_HW_YELLOW_BODER [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xC0/255 blue:0 alpha:1] #define UICOLOR_HW_YELLOW_TEXT [UIColor colorWithRed:(CGFloat)0xF0/255 green:(CGFloat)0xD0/255 blue:0 alpha:1] void createTeamNamed (NSString *nameWithoutExt); -void createWeaponNamed (NSString *nameWithoutExt); +void createWeaponNamed (NSString *nameWithoutExt, int type); void createSchemeNamed (NSString *nameWithoutExt); BOOL rotationManager (UIInterfaceOrientation interfaceOrientation); NSInteger randomPort (); diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/CommodityFunctions.m --- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Sun Aug 15 10:25:21 2010 -0400 @@ -45,7 +45,7 @@ [theTeam release]; } -void createWeaponNamed (NSString *nameWithoutExt) { +void createWeaponNamed (NSString *nameWithoutExt, int type) { NSString *weaponsDirectory = WEAPONS_DIRECTORY(); if (![[NSFileManager defaultManager] fileExistsAtPath: weaponsDirectory]) { @@ -55,13 +55,61 @@ error:NULL]; } - NSDictionary *theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", - @"9391929422199121032235111001201000000211110111",@"ammostore_initialqt", - @"0405040541600655546554464776576666666155510111",@"ammostore_probability", - @"0000000000000205500000040007004000000000200000",@"ammostore_delay", - @"1311110312111111123114111111111111111211111111",@"ammostore_crate", nil]; - + NSDictionary *theWeapon; + switch (type) { + case 0: //default + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + @"939192942219912103223511100120100000021111011101",@"ammostore_initialqt", + @"040504054160065554655446477657666666615551011111",@"ammostore_probability", + @"000000000000020550000004000700400000000020000000",@"ammostore_delay", + @"131111031211111112311411111111111111121111111111",@"ammostore_crate", nil]; + break; + case 1: //crazy + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + @"999999999999999999299999999999999929999999999999",@"ammostore_initialqt", + @"111111011111111111111111111111111111111111111111",@"ammostore_probability", + @"000000000000000000000000000000000000000000000000",@"ammostore_delay", + @"131111031211111112311411111111111111121111010111",@"ammostore_crate", nil]; + break; + case 2: //pro mode + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + @"909000900000000000000900000000000000000000090000",@"ammostore_initialqt", + @"000000000000000000000000000000000000000000000000",@"ammostore_probability", + @"000000000000020550000004000700400000000020000000",@"ammostore_delay", + @"111111111111111111111111111111111111111110011111",@"ammostore_crate", nil]; + break; + case 3: //shoppa + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + @"000000990000000000000000000000000000000000000000",@"ammostore_initialqt", + @"444441004424440221011212122242200000000200040001",@"ammostore_probability", + @"000000000000000000000000000000000000000000000000",@"ammostore_delay", + @"111111111111111111111111111111111111111110111111",@"ammostore_crate", nil]; + break; + case 4: //basketball + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + @"939192942219912103223511100120100000021111011100",@"ammostore_initialqt", + @"000000000000000000000000000000000000000000000000",@"ammostore_probability", + @"000000000000000550000004000700400000000020000000",@"ammostore_delay", + @"111111111111111111111111111111111111111111111111",@"ammostore_crate", nil]; + break; + case 5: //minefield + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + @"000000990009000000030000000000000000000000000000",@"ammostore_initialqt", + @"000000000000000000000000000000000000000000000000",@"ammostore_probability", + @"000000000000020550000004000700400000000020000000",@"ammostore_delay", + @"111111111111111111111111111111111111111111111111",@"ammostore_crate", nil]; + break; + default: + NSLog(@"Nope"); + break; + } + NSString *weaponFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", weaponsDirectory, nameWithoutExt]; [theWeapon writeToFile:weaponFile atomically:YES]; diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/GameConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Sun Aug 15 10:25:21 2010 -0400 @@ -33,10 +33,8 @@ otherButtonTitles:nil]; [alert show]; [alert release]; - } else { + } else [[self parentViewController] dismissModalViewControllerAnimated:YES]; - - } break; case 1: theButton.enabled = NO; @@ -192,19 +190,14 @@ mapConfigViewController.delegate = self; if (teamConfigViewController == nil) teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; - teamConfigViewController.view.frame = CGRectMake(10, 70, 300, 600); + teamConfigViewController.view.frame = CGRectMake(362, 200, 300, 480); teamConfigViewController.view.backgroundColor = [UIColor clearColor]; [mapConfigViewController.view addSubview:teamConfigViewController.view]; if (schemeWeaponConfigViewController == nil) schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; - schemeWeaponConfigViewController.view.frame = CGRectMake(362, 200, 300, 480); + schemeWeaponConfigViewController.view.frame = CGRectMake(10, 70, 300, 550); [mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view]; - for (UIView *oneView in self.view.subviews) { - if ([oneView isMemberOfClass:[UIToolbar class]]) { - [oneView setHidden:YES]; - break; - } - } + mapConfigViewController.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width); } else { // this is the visible controller mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil]; @@ -235,6 +228,20 @@ [super viewDidAppear:animated]; } +-(void) viewWillDisappear:(BOOL)animated { + [mapConfigViewController viewWillDisappear:animated]; + [teamConfigViewController viewWillDisappear:animated]; + [schemeWeaponConfigViewController viewWillDisappear:animated]; + [super viewWillDisappear:animated]; +} + +-(void) viewDidDisappear:(BOOL)animated { + [mapConfigViewController viewDidDisappear:animated]; + [teamConfigViewController viewDidDisappear:animated]; + [schemeWeaponConfigViewController viewDidDisappear:animated]; + [super viewDidDisappear:animated]; +} + -(void) didReceiveMemoryWarning { if (activeController.view.superview == nil) activeController = nil; diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/InGameMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m Sun Aug 15 10:25:21 2010 -0400 @@ -28,7 +28,7 @@ -(void) viewDidLoad { NSArray *array = [[NSArray alloc] initWithObjects: NSLocalizedString(@"Show Help", @""), - NSLocalizedString(@"Chat", @""), + NSLocalizedString(@"Tag", @""), NSLocalizedString(@"End Game", @""), nil]; self.menuList = array; diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/MainMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Sun Aug 15 10:25:21 2010 -0400 @@ -35,7 +35,7 @@ // using a different thread for audio 'cos it's slow -(void) initAudioThread { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 1, 512); + // do somthing in the future [pool release]; } @@ -55,72 +55,107 @@ selector:@selector(dismissModalViewController) name: @"dismissModalView" object:nil]; + + // now check if some configuration files are already set; if they are present it means that the current copy must be updated + NSError *err = nil; + NSString *fileToCheck, *teamToCheck, *teamToUpdate, *schemeToCheck, *schemeToUpdate; + NSString *resDir = [[NSBundle mainBundle] resourcePath]; + + NSString *dirToCheck = [NSString stringWithFormat:@"%@/done.txt",DOCUMENTS_FOLDER()]; + if ([[NSFileManager defaultManager] fileExistsAtPath:dirToCheck] == NO) { + DLog(@"Creating necessary files"); + + // if the settings file is already present, we merge current preferences with the update + fileToCheck = [NSString stringWithFormat:@"%@/Settings/settings.plist",resDir]; + if ([[NSFileManager defaultManager] fileExistsAtPath:SETTINGS_FILE()]) { + NSDictionary *settings = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()]; + NSMutableDictionary *update = [[NSMutableDictionary alloc] initWithContentsOfFile:fileToCheck]; + [update addEntriesFromDictionary:settings]; + [settings release]; + [update writeToFile:SETTINGS_FILE() atomically:YES]; + [update release]; + } else + [[NSFileManager defaultManager] copyItemAtPath:fileToCheck toPath:SETTINGS_FILE() error:&err]; + + // if the teams are already present we merge the old teams if they still exist + fileToCheck = [NSString stringWithFormat:@"%@/Settings/Teams",resDir]; + if ([[NSFileManager defaultManager] fileExistsAtPath:TEAMS_DIRECTORY()]) { + for (NSString *str in [[NSFileManager defaultManager] contentsAtPath:fileToCheck]) { + teamToCheck = [NSString stringWithFormat:@"%@/%@",TEAMS_DIRECTORY(),str]; + teamToUpdate = [NSString stringWithFormat:@"%@/Settings/Teams/%@",resDir,str]; + if ([[NSFileManager defaultManager] fileExistsAtPath:teamToCheck]) { + NSDictionary *team = [[NSDictionary alloc] initWithContentsOfFile:teamToCheck]; + NSMutableDictionary *update = [[NSMutableDictionary alloc] initWithContentsOfFile:teamToUpdate]; + [update addEntriesFromDictionary:team]; + [team release]; + [update writeToFile:teamToCheck atomically:YES]; + [update release]; + } + } + } else + [[NSFileManager defaultManager] copyItemAtPath:fileToCheck toPath:TEAMS_DIRECTORY() error:&err]; - // initialize some files the first time we load the game - if (!([[NSFileManager defaultManager] fileExistsAtPath:SETTINGS_FILE()])) - [NSThread detachNewThreadSelector:@selector(checkFirstRun) toTarget:self withObject:nil]; - + // the same holds for schemes (but they're arrays) + fileToCheck = [NSString stringWithFormat:@"%@/Settings/Schemes",resDir]; + if ([[NSFileManager defaultManager] fileExistsAtPath:SCHEMES_DIRECTORY()]) { + for (NSString *str in [[NSFileManager defaultManager] contentsAtPath:fileToCheck]) { + schemeToCheck = [NSString stringWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),str]; + schemeToUpdate = [NSString stringWithFormat:@"%@/Settings/Schemes/%@",resDir,str]; + if ([[NSFileManager defaultManager] fileExistsAtPath:schemeToCheck]) { + NSArray *scheme = [[NSArray alloc] initWithContentsOfFile:schemeToCheck]; + NSArray *update = [[NSArray alloc] initWithContentsOfFile:schemeToUpdate]; + if ([update count] > [scheme count]) + [update writeToFile:schemeToCheck atomically:YES]; + [update release]; + [scheme release]; + } + } + } else + [[NSFileManager defaultManager] copyItemAtPath:fileToCheck toPath:SCHEMES_DIRECTORY() error:&err]; + + // we create weapons the first time only, they are autoupdated each time + if ([[NSFileManager defaultManager] fileExistsAtPath:WEAPONS_DIRECTORY()] == NO) { + [[NSFileManager defaultManager] createDirectoryAtPath:WEAPONS_DIRECTORY() + withIntermediateDirectories:YES + attributes:nil + error:&err]; + createWeaponNamed(@"Default", 0); + createWeaponNamed(@"Crazy", 1); + createWeaponNamed(@"Pro mode", 2); + createWeaponNamed(@"Shoppa", 3); + createWeaponNamed(@"Basketball", 4); + createWeaponNamed(@"Minefield", 5); + } + + // create a dummy file so that it doesn't get called again + if ([[NSFileManager defaultManager] createFileAtPath:dirToCheck + contents:[NSData dataWithContentsOfFile:SETTINGS_FILE()] + attributes:nil]) + DLog(@"Success"); + + if (err != nil) + DLog(@"%@", err); + } + [super viewDidLoad]; } -// this is called to verify whether it's the first time the app is launched -// if it is it blocks user interaction with an alertView until files are created --(void) checkFirstRun { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - DLog(@"First time run, creating settings files at %@", SETTINGS_FILE()); - - // show a popup with an indicator to make the user wait - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Please wait",@"") - message:nil - delegate:nil - cancelButtonTitle:nil - otherButtonTitles:nil]; - [alert show]; - - UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] - initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; - indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height - 50); - [indicator startAnimating]; - [alert addSubview:indicator]; - [indicator release]; - - // create default files (teams/weapons/scheme) - createTeamNamed(@"Pirates"); - createTeamNamed(@"Ninjas"); - createWeaponNamed(@"Default"); - createSchemeNamed(@"Default"); - - // create settings.plist - NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init]; - - [saveDict setObject:@"" forKey:@"username"]; - [saveDict setObject:@"" forKey:@"password"]; - [saveDict setObject:[NSNumber numberWithBool:YES] forKey:@"music"]; - [saveDict setObject:[NSNumber numberWithBool:YES] forKey:@"sound"]; - [saveDict setObject:[NSNumber numberWithBool:NO] forKey:@"alternate"]; - - [saveDict writeToFile:SETTINGS_FILE() atomically:YES]; - [saveDict release]; - - // ok let the user take control - [alert dismissWithClickedButtonIndex:0 animated:YES]; - [alert release]; - - [pool release]; - - // TODO: instead of this useless runtime initialization, check that all ammos remain compatible with engine -} #pragma mark - -(IBAction) switchViews:(id) sender { UIButton *button = (UIButton *)sender; UIAlertView *alert; - NSString *debugStr; + NSString *xib; switch (button.tag) { case 0: if (nil == self.gameConfigViewController) { - GameConfigViewController *gcvc = [[GameConfigViewController alloc] initWithNibName:@"GameConfigViewController" bundle:nil]; + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + xib = nil; + else + xib = @"GameConfigViewController"; + + GameConfigViewController *gcvc = [[GameConfigViewController alloc] initWithNibName:xib bundle:nil]; self.gameConfigViewController = gcvc; [gcvc release]; } diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/MasterViewController.m --- a/project_files/HedgewarsMobile/Classes/MasterViewController.m Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/MasterViewController.m Sun Aug 15 10:25:21 2010 -0400 @@ -42,6 +42,7 @@ if (nil == generalSettingsViewController) generalSettingsViewController = [[GeneralSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped]; generalSettingsViewController.navigationItem.hidesBackButton = YES; + [generalSettingsViewController viewWillAppear:YES]; [self.navigationController pushViewController:generalSettingsViewController animated:NO]; } else { self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/OverlayViewController.h --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.h Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.h Sun Aug 15 10:25:21 2010 -0400 @@ -24,6 +24,7 @@ CGFloat initialDistanceForPinching; CGPoint startingPoint; BOOL isSegmentVisible; + BOOL isAttacking; // the sdl window underneath SDL_Window *sdlwindow; diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/OverlayViewController.m --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sun Aug 15 10:25:21 2010 -0400 @@ -71,6 +71,7 @@ break; */ default: + // a debug log would spam too much break; } self.view.frame = usefulRect; @@ -81,12 +82,15 @@ #pragma mark - #pragma mark View Management -(void) viewDidLoad { + isAttacking = NO; + + // i called it a popover even on the iphone isPopoverVisible = NO; self.view.alpha = 0; self.view.center = CGPointMake(self.view.frame.size.height/2.0, self.view.frame.size.width/2.0); - // set initial orientation - UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; + // set initial orientation wrt the controller orientation + UIDeviceOrientation orientation = self.interfaceOrientation; UIView *sdlView = [[[UIApplication sharedApplication] keyWindow] viewWithTag:SDL_VIEW_TAG]; switch (orientation) { case UIDeviceOrientationLandscapeLeft: @@ -98,6 +102,7 @@ self.view.transform = CGAffineTransformMakeRotation(degreesToRadians(-90)); break; default: + DLog(@"unknown orientation"); break; } CGRect rect = [[UIScreen mainScreen] bounds]; @@ -128,8 +133,6 @@ SDL_VideoDevice *_this = SDL_GetVideoDevice(); SDL_VideoDisplay *display = &_this->displays[0]; sdlwindow = display->windows; - - doDim(); } -(void) viewDidUnload { @@ -201,6 +204,7 @@ break; } + isAttacking = NO; doDim(); } @@ -218,23 +222,26 @@ switch (theButton.tag) { case 0: - HW_walkLeft(); + if (isAttacking == NO) + HW_walkLeft(); break; case 1: - HW_walkRight(); + if (isAttacking == NO) + HW_walkRight(); break; case 2: [self performSelector:@selector(unsetPreciseStatus) withObject:nil afterDelay:0.8]; - HW_preciseSet(YES); + HW_preciseSet(!HW_isWeaponRope()); HW_aimUp(); break; case 3: [self performSelector:@selector(unsetPreciseStatus) withObject:nil afterDelay:0.8]; - HW_preciseSet(YES); + HW_preciseSet(!HW_isWeaponRope()); HW_aimDown(); break; case 4: HW_shoot(); + isAttacking = YES; break; case 5: HW_jump(); @@ -242,9 +249,6 @@ case 6: HW_backjump(); break; - case 7: - HW_tab(); - break; case 10: HW_pause(); removeConfirmationInput(); @@ -528,6 +532,7 @@ UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)[[[[UIApplication sharedApplication] keyWindow] viewWithTag:SDL_VIEW_TAG] viewWithTag:987654]; [indicator stopAnimating]; isGameRunning = YES; + HW_zoomSet(1.7); } void clearView() { diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/PascalImports.h --- a/project_files/HedgewarsMobile/Classes/PascalImports.h Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/PascalImports.h Sun Aug 15 10:25:21 2010 -0400 @@ -25,11 +25,14 @@ void HW_versionInfo(short int *netProto, char **versionStr); void HW_click(void); - + void HW_ammoMenu(void); + + void HW_zoomSet(float value); void HW_zoomIn(void); void HW_zoomOut(void); void HW_zoomReset(void); - void HW_ammoMenu(void); + float HW_zoomFactor(void); + int HW_zoomLevel(void); void HW_walkingKeysUp(void); void HW_otherKeysUp(void); @@ -56,18 +59,15 @@ void HW_setCursor(int x, int y); void HW_getCursor(int *x, int *y); - void HW_setPianoSound(int snd); - - float HW_zoomFactor(void); - int HW_zoomLevel(void); - BOOL HW_isAmmoOpen(void); BOOL HW_isPaused(void); BOOL HW_isWeaponRequiringClick(void); BOOL HW_isWeaponTimerable(void); BOOL HW_isWeaponSwitch(void); + BOOL HW_isWeaponRope(void); void HW_setGrenadeTime(int time); + void HW_setPianoSound(int snd); #ifdef __cplusplus } diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m --- a/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m Sun Aug 15 10:25:21 2010 -0400 @@ -133,7 +133,6 @@ } -(void) applicationWillTerminate:(UIApplication *)application { - Mix_CloseAudio(); SDL_SendQuit(); if (isInGame) { diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Sun Aug 15 10:25:21 2010 -0400 @@ -23,6 +23,7 @@ -(void) viewDidLoad { [super viewDidLoad]; + // also increment CURRENT_AMMOSIZE in CommodityFunctions.h NSArray *array = [[NSArray alloc] initWithObjects: NSLocalizedString(@"Grenade",@""), NSLocalizedString(@"Cluster Bomb",@""), @@ -70,6 +71,8 @@ NSLocalizedString(@"Old Limburger",@""), NSLocalizedString(@"Sine Gun",@""), NSLocalizedString(@"Flamethrower",@""), + NSLocalizedString(@"Sticky Mine",@""), + NSLocalizedString(@"Hammer",@""), nil]; self.ammoNames = array; [array release]; diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/TeamConfigViewController.h --- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.h Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.h Sun Aug 15 10:25:21 2010 -0400 @@ -12,10 +12,11 @@ @interface TeamConfigViewController : UITableViewController { NSMutableArray *listOfTeams; NSMutableArray *listOfSelectedTeams; - BOOL isFirstLoad; + NSArray *cachedContentsOfDir; } @property (nonatomic, retain) NSMutableArray *listOfTeams; @property (nonatomic, retain) NSMutableArray *listOfSelectedTeams; +@property (nonatomic, retain) NSArray *cachedContentsOfDir; @end diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/TeamConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Sun Aug 15 10:25:21 2010 -0400 @@ -12,7 +12,7 @@ #import "SquareButtonView.h" @implementation TeamConfigViewController -@synthesize listOfTeams, listOfSelectedTeams; +@synthesize listOfTeams, listOfSelectedTeams, cachedContentsOfDir; #define NUMBERBUTTON_TAG 123456 #define SQUAREBUTTON_TAG 654321 @@ -25,7 +25,6 @@ CGSize screenSize = [[UIScreen mainScreen] bounds].size; self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44); - isFirstLoad = YES; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { [self.tableView setBackgroundView:nil]; @@ -38,11 +37,11 @@ -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL]; // avoid overwriting selected teams when returning on this view - if (isFirstLoad) { + if ([cachedContentsOfDir isEqualToArray:contentsOfDir] == NO) { // integer representation of various color (defined in SquareButtonView) NSUInteger colors[6] = { 4421353, 4100897, 10632635, 16749353, 14483456, 7566195 }; - NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL]; NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:[contentsOfDir count]]; for (int i = 0; i < [contentsOfDir count]; i++) { NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithObjectsAndKeys: @@ -58,7 +57,8 @@ NSMutableArray *emptyArray = [[NSMutableArray alloc] initWithObjects:nil]; self.listOfSelectedTeams = emptyArray; [emptyArray release]; - isFirstLoad = NO; + + cachedContentsOfDir = [[NSArray alloc] initWithArray:contentsOfDir copyItems:YES]; } [self.tableView reloadData]; } @@ -191,17 +191,22 @@ // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Relinquish ownership any cached data, images, etc that aren't in use. + self.cachedContentsOfDir = nil; } -(void) viewDidUnload { self.listOfTeams = nil; + self.listOfSelectedTeams = nil; + self.cachedContentsOfDir = nil; MSG_DIDUNLOAD(); [super viewDidUnload]; } -(void) dealloc { - [self.listOfTeams release]; + [listOfTeams release]; + [listOfSelectedTeams release]; + [cachedContentsOfDir release]; [super dealloc]; } diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m --- a/project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m Sun Aug 15 10:25:21 2010 -0400 @@ -66,7 +66,7 @@ -(void) addWeapon:(id) sender { NSString *fileName = [[NSString alloc] initWithFormat:@"Weapon %u.plist", [self.listOfWeapons count]]; - createWeaponNamed([fileName stringByDeletingPathExtension]); + createWeaponNamed([fileName stringByDeletingPathExtension], 0); [self.listOfWeapons addObject:fileName]; [fileName release]; diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj --- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sun Aug 15 10:25:21 2010 -0400 @@ -112,6 +112,7 @@ 61799289114AE08700BA94A9 /* Data in Resources */ = {isa = PBXBuildFile; fileRef = 61798A5E114AE08600BA94A9 /* Data */; }; 6183D83E11E2BCE200A88903 /* LI-ipad-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 6183D83C11E2BCE200A88903 /* LI-ipad-Landscape.png */; }; 6183D83F11E2BCE200A88903 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6183D83D11E2BCE200A88903 /* Default.png */; }; + 6187AEBD120781B900B31A27 /* Settings in Resources */ = {isa = PBXBuildFile; fileRef = 6187AEA5120781B900B31A27 /* Settings */; }; 619C09EA11E8B8D600F1DF16 /* title_small.png in Resources */ = {isa = PBXBuildFile; fileRef = 619C09E911E8B8D600F1DF16 /* title_small.png */; }; 61A1188511683A8C00359010 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A117FE1168322700359010 /* CoreGraphics.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 61A118D311683CD100359010 /* HedgewarsTitle.png in Resources */ = {isa = PBXBuildFile; fileRef = 611FD9CB1155A28C00C2203D /* HedgewarsTitle.png */; }; @@ -817,6 +818,7 @@ 6183D83C11E2BCE200A88903 /* LI-ipad-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "LI-ipad-Landscape.png"; path = "Resources/Icons/LI-ipad-Landscape.png"; sourceTree = ""; }; 6183D83D11E2BCE200A88903 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/Icons/Default.png; sourceTree = ""; }; 618736B8118CA28600123B23 /* GearDrawing.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = GearDrawing.inc; path = ../../hedgewars/GearDrawing.inc; sourceTree = SOURCE_ROOT; }; + 6187AEA5120781B900B31A27 /* Settings */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Settings; path = Resources/Settings; sourceTree = ""; }; 619C09E911E8B8D600F1DF16 /* title_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title_small.png; path = "Resources/Frontend-iPhone/title_small.png"; sourceTree = ""; }; 61A117FE1168322700359010 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 61C079E211F35A300072BF46 /* EditableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditableCellView.h; sourceTree = ""; }; @@ -968,6 +970,7 @@ 61F903E311DF584D0068B24D /* Frontend-iPhone */, 6179936611501D1E00BA94A9 /* Overlay */, 61798A5E114AE08600BA94A9 /* Data */, + 6187AEA5120781B900B31A27 /* Settings */, 611FD9CB1155A28C00C2203D /* HedgewarsTitle.png */, 8D1107310486CEB800E47090 /* Info.plist */, 61F9040811DF58B00068B24D /* settingsButton.png */, @@ -1999,6 +2002,7 @@ 615AD96212073B4D00F2FF04 /* startGameButton.png in Resources */, 615AD9E9120764CA00F2FF04 /* backButton.png in Resources */, 615AD9EB1207654E00F2FF04 /* helpButton.png in Resources */, + 6187AEBD120781B900B31A27 /* Settings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2016,7 +2020,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\nmkdir ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/btn*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/ammopic.png ${PROJECT_DIR}/Data/Graphics/Btn/iconAmmo.png\ncp ${PROJECT_DIR}/../../QTfrontend/res/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels\n\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\n\n#delete desktop frontend translation\nrm -rf ${PROJECT_DIR}/Data/Locale/hedgewars_*\n\n#delete dummy maps\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,KnockBall,Ruler,BasketBall}\n\n#the following ones must be removed when their support is implemented\n\n#delete some voices\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/{Classic,British,Mobster,Pirate,Robot,Russian,Singer,Surfer}\n\n#delete all names\nrm -rf ${PROJECT_DIR}/Data/Names/\n\n#delete all missions\nrm -rf ${PROJECT_DIR}/Data/Missions/\n\n#delete all reserved hats\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/"; + shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\nmkdir ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/btn*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/ammopic.png ${PROJECT_DIR}/Data/Graphics/Btn/iconAmmo.png\ncp ${PROJECT_DIR}/../../QTfrontend/res/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels\n\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\n\n#delete desktop frontend translation\nrm -rf ${PROJECT_DIR}/Data/Locale/hedgewars_*\n\n#delete dummy maps\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,KnockBall,Ruler,BasketBall}\n\n#delete forbidden maps\nrm -rf ${PROJECT_DIR}/Data/Maps/{Cheese}\nrm -rf ${PROJECT_DIR}/Data/Themes/City/Flake.png\n\n#the following ones must be removed when their support is implemented\n\n#delete some voices\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/{Classic,British,Mobster,Robot,Russian,Singer,Surfer}\n\n#delete all names\nrm -rf ${PROJECT_DIR}/Data/Names/\n\n#delete all missions\nrm -rf ${PROJECT_DIR}/Data/Missions/\n\n#delete all reserved hats\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/"; showEnvVarsInLog = 0; }; 9283011B0F10CB2D00CC5A3C /* Build libfpc.a */ = { diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Info.plist --- a/project_files/HedgewarsMobile/Info.plist Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Info.plist Sun Aug 15 10:25:21 2010 -0400 @@ -40,8 +40,6 @@ UILaunchImageFile~ipad LI-ipad - UILaunchImageFile~iphone - LI-iphone UIApplicationExitsOnSuspend diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib --- a/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib Sun Aug 15 10:25:21 2010 -0400 @@ -57,7 +57,7 @@ 292 - {{383, 444}, {258, 215}} + {{383, 444}, {263, 244}} NO IBIPadFramework @@ -68,7 +68,7 @@ 15 16 - 188 + 215 0.0 0.0 0.0 @@ -93,7 +93,7 @@ -2147483356 - {{611, 417}, {258, 215}} + {{611, 417}, {263, 244}} NO 1 @@ -101,7 +101,7 @@ 0 0 - 188 + 215 0.0 0.0 0.0 diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib --- a/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib Fri Aug 13 13:42:18 2010 -0400 +++ b/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib Sun Aug 15 10:25:21 2010 -0400 @@ -334,7 +334,7 @@ 274 - {{714, 225}, {300, 485}} + {{714, 225}, {300, 445}} 3 @@ -577,34 +577,6 @@ - 1 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - -1 @@ -616,13 +588,71 @@ - 7 - + 1 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + 75 + - 8 - + 72 + + + + + 70 + + + + + 66 + + + + + 57 + + + + + 51 + + + + + 39 + + + + + 17 + @@ -631,28 +661,38 @@ - 17 - - - - - 39 - - - - 9 - 51 - + 8 + + + + + 7 + - 53 - + 78 + + + + + 80 + + + + + 79 + + + + + 61 + @@ -661,13 +701,13 @@ - 55 - + 53 + - 57 - + 55 + @@ -675,46 +715,6 @@ - - 61 - - - - - 66 - - - - - 70 - - - - - 72 - - - - - 75 - - - - - 78 - - - - - 79 - - - - - 80 - - - @@ -750,7 +750,7 @@ YES MapConfigViewController UIResponder - {{82, 256}, {1024, 768}} + {{255, 272}, {1024, 768}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -790,7 +790,7 @@ - 80 + 112 diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist Sun Aug 15 10:25:21 2010 -0400 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + 100 + 30 + 100 + 15 + 0 + 0 + 1 + 0 + 40 + + diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/Settings/Schemes/Basketball.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Basketball.plist Sun Aug 15 10:25:21 2010 -0400 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + 100 + 30 + 100 + 15 + 0 + 3 + 4 + 0 + 0 + + diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist Sun Aug 15 10:25:21 2010 -0400 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + 100 + 45 + 100 + 15 + 5 + 3 + 4 + 0 + 2 + + diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist Sun Aug 15 10:25:21 2010 -0400 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + 150 + 30 + 50 + 15 + 0 + 0 + 80 + 0 + 0 + + diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist Sun Aug 15 10:25:21 2010 -0400 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + 100 + 15 + 100 + 15 + 0 + 3 + 4 + 0 + 2 + + diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist Sun Aug 15 10:25:21 2010 -0400 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + 100 + 30 + 100 + 50 + 1 + 3 + 4 + 0 + 0 + + diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist Sun Aug 15 10:25:21 2010 -0400 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + 100 + 30 + 100 + 15 + 5 + 3 + 10 + 10 + 10 + + diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/Settings/Teams/Ninjas.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Teams/Ninjas.plist Sun Aug 15 10:25:21 2010 -0400 @@ -0,0 +1,83 @@ + + + + + flag + japan + fort + Plane + grave + bp2 + hash + 0 + hedgehogs + + + hat + NoHat + hogname + Ukemi + level + 0 + + + hat + NoHat + hogname + Godai + level + 0 + + + hat + NoHat + hogname + Ninpo + level + 0 + + + hat + NoHat + hogname + Shinobi + level + 0 + + + hat + NoHat + hogname + Tatsujin + level + 0 + + + hat + NoHat + hogname + Arashi + level + 0 + + + hat + NoHat + hogname + Bushi + level + 0 + + + hat + NoHat + hogname + Itami + level + 0 + + + voicepack + Default + + diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/Settings/Teams/Pirates.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Teams/Pirates.plist Sun Aug 15 10:25:21 2010 -0400 @@ -0,0 +1,83 @@ + + + + + flag + cm_pirate + fort + Plane + grave + chest + hash + 0 + hedgehogs + + + hat + NoHat + hogname + Toothless Wayne + level + 0 + + + hat + NoHat + hogname + Long-nose Kidd + level + 0 + + + hat + NoHat + hogname + Eye-patch Jim + level + 0 + + + hat + NoHat + hogname + Rackham Blood + level + 0 + + + hat + NoHat + hogname + One-eyed Ayee + level + 0 + + + hat + NoHat + hogname + Dirty Ben + level + 0 + + + hat + NoHat + hogname + Morris + level + 0 + + + hat + NoHat + hogname + Cruise Seymour + level + 0 + + + voicepack + Pirates + + diff -r 26de8c8a5b5d -r 2e7dda50fddd project_files/HedgewarsMobile/Resources/Settings/settings.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/settings.plist Sun Aug 15 10:25:21 2010 -0400 @@ -0,0 +1,16 @@ + + + + + alternate + + music + + password + + sound + + username + + +