# HG changeset patch # User koda # Date 1288136018 -7200 # Node ID cfd83b04e0beefe428053de68da6cd02129438d9 # Parent ddc4a09889e79374d6c5d3278cf11d073a31bf7a# Parent f11f3715f2793c36177e43c09507bf550019b146 merge diff -r f11f3715f279 -r cfd83b04e0be QTfrontend/gamecfgwidget.cpp --- a/QTfrontend/gamecfgwidget.cpp Wed Oct 27 00:04:59 2010 +0200 +++ b/QTfrontend/gamecfgwidget.cpp Wed Oct 27 01:33:38 2010 +0200 @@ -101,47 +101,47 @@ quint32 result = 0; if (schemeData(1).toBool()) - result |= 0x01; + result |= 0x00001000; if (schemeData(2).toBool()) - result |= 0x10; + result |= 0x00000010; if (schemeData(3).toBool()) - result |= 0x04; + result |= 0x00000004; if (schemeData(4).toBool()) - result |= 0x08; + result |= 0x00000008; if (schemeData(5).toBool()) - result |= 0x20; + result |= 0x00000020; if (schemeData(6).toBool()) - result |= 0x40; + result |= 0x00000040; if (schemeData(7).toBool()) - result |= 0x80; + result |= 0x00000080; if (schemeData(8).toBool()) - result |= 0x100; + result |= 0x00000100; if (schemeData(9).toBool()) - result |= 0x200; + result |= 0x00000200; if (schemeData(10).toBool()) - result |= 0x400; + result |= 0x00000400; if (schemeData(11).toBool()) - result |= 0x800; + result |= 0x00000800; if (schemeData(12).toBool()) - result |= 0x2000; + result |= 0x00002000; if (schemeData(13).toBool()) - result |= 0x4000; + result |= 0x00004000; if (schemeData(14).toBool()) - result |= 0x8000; + result |= 0x00008000; if (schemeData(15).toBool()) - result |= 0x10000; + result |= 0x00010000; if (schemeData(16).toBool()) - result |= 0x20000; + result |= 0x00020000; if (schemeData(17).toBool()) - result |= 0x80000; + result |= 0x00040000; if (schemeData(18).toBool()) - result |= 0x100000; + result |= 0x00080000; if (schemeData(19).toBool()) - result |= 0x200000; + result |= 0x00100000; if (schemeData(20).toBool()) - result |= 0x400000; + result |= 0x00200000; if (schemeData(21).toBool()) - result |= 0x800000; + result |= 0x00400000; return result; } diff -r f11f3715f279 -r cfd83b04e0be QTfrontend/pages.cpp --- a/QTfrontend/pages.cpp Wed Oct 27 00:04:59 2010 +0200 +++ b/QTfrontend/pages.cpp Wed Oct 27 01:33:38 2010 +0200 @@ -1529,35 +1529,35 @@ TBW_placehog = new ToggleButtonWidget(gbGameModes, ":/res/btnPlaceHog.png"); TBW_placehog->setToolTip("" + ToggleButtonWidget::tr("Place Hedgehogs") + ":
" + tr("Take turns placing your hedgehogs before the start of play.")); - glGMLayout->addWidget(TBW_placehog,2,2,1,1); + glGMLayout->addWidget(TBW_placehog,2,3,1,1); TBW_sharedammo = new ToggleButtonWidget(gbGameModes, ":/res/btnSharedAmmo.png"); TBW_sharedammo->setToolTip("" + ToggleButtonWidget::tr("Clan Shares Ammo") + ":
" + tr("Ammo is shared between all teams that share a colour.")); - glGMLayout->addWidget(TBW_sharedammo,2,3,1,1); + glGMLayout->addWidget(TBW_sharedammo,2,4,1,1); TBW_disablegirders = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableGirders.png"); TBW_disablegirders->setToolTip("" + ToggleButtonWidget::tr("Disable Girders") + ":
" + tr("Disable girders when generating random maps.")); - glGMLayout->addWidget(TBW_disablegirders,2,4,1,1); + glGMLayout->addWidget(TBW_disablegirders,3,0,1,1); TBW_disablelandobjects = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableLandObjects.png"); TBW_disablelandobjects->setToolTip("" + ToggleButtonWidget::tr("Disable Land Objects") + ":
" + tr("Disable land objects when generating random maps.")); - glGMLayout->addWidget(TBW_disablelandobjects,3,0,1,1); + glGMLayout->addWidget(TBW_disablelandobjects,3,1,1,1); TBW_aisurvival = new ToggleButtonWidget(gbGameModes, ":/res/btnAISurvival.png"); TBW_aisurvival->setToolTip("" + ToggleButtonWidget::tr("AI Survival Mode") + ":
" + tr("AI respawns on death.")); - glGMLayout->addWidget(TBW_aisurvival,3,1,1,1); + glGMLayout->addWidget(TBW_aisurvival,3,2,1,1); TBW_infattack = new ToggleButtonWidget(gbGameModes, ":/res/btnInfAttack.png"); TBW_infattack->setToolTip("" + ToggleButtonWidget::tr("Unlimited Attacks") + ":
" + tr("Attacking does not end your turn.")); - glGMLayout->addWidget(TBW_infattack,3,2,1,1); + glGMLayout->addWidget(TBW_infattack,3,3,1,1); TBW_resetweps = new ToggleButtonWidget(gbGameModes, ":/res/btnResetWeps.png"); TBW_resetweps->setToolTip("" + ToggleButtonWidget::tr("Reset Weapons") + ":
" + tr("Weapons are reset to starting values each turn.")); - glGMLayout->addWidget(TBW_resetweps,3,3,1,1); + glGMLayout->addWidget(TBW_resetweps,3,4,1,1); TBW_perhogammo = new ToggleButtonWidget(gbGameModes, ":/res/btnPerHogAmmo.png"); TBW_perhogammo->setToolTip("" + ToggleButtonWidget::tr("Per Hedgehog Ammo") + ":
" + tr("Each hedgehog has its own ammo. It does not share with the team.")); - glGMLayout->addWidget(TBW_perhogammo,3,4,1,1); + glGMLayout->addWidget(TBW_perhogammo,4,0,1,1); // Right QLabel * l; diff -r f11f3715f279 -r cfd83b04e0be hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Wed Oct 27 00:04:59 2010 +0200 +++ b/hedgewars/uConsts.pas Wed Oct 27 01:33:38 2010 +0200 @@ -319,8 +319,6 @@ {$ENDIF} cSendEmptyPacketTime = 1000; - - // from uTriggers trigTurns = $80000001; // Training Flags @@ -332,30 +330,29 @@ tfTargetRespawn = $00000010; gfAny = $FFFFFFFF; - gfForts = $00000001; - gfMultiWeapon = $00000002; + gfOneClanMode = $00000001; // used in trainings + gfMultiWeapon = $00000002; // used in trainings gfSolidLand = $00000004; gfBorder = $00000008; gfDivideTeams = $00000010; gfLowGravity = $00000020; gfLaserSight = $00000040; gfInvulnerable = $00000080; - gfMines = $00000100; + gfMines = $00000100; // redundant? same effect as 'landadds 0' gfVampiric = $00000200; gfKarma = $00000400; gfArtillery = $00000800; - gfOneClanMode = $00001000; + gfForts = $00001000; gfRandomOrder = $00002000; gfKing = $00004000; gfPlaceHog = $00008000; gfSharedAmmo = $00010000; gfDisableGirders = $00020000; - gfExplosives = $00040000; - gfDisableLandObjects = $00080000; - gfAISurvival = $00100000; - gfInfAttack = $00200000; - gfResetWeps = $00400000; - gfPerHogAmmo = $00800000; + gfDisableLandObjects = $00040000; + gfAISurvival = $00080000; + gfInfAttack = $00100000; + gfResetWeps = $00200000; + gfPerHogAmmo = $00400000; // NOTE: When adding new game flags, ask yourself // if a "game start notice" would be useful. If so, // add one in uWorld.pas - look for "AddGoal". diff -r f11f3715f279 -r cfd83b04e0be hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Oct 27 00:04:59 2010 +0200 +++ b/hedgewars/uGears.pas Wed Oct 27 01:33:38 2010 +0200 @@ -1208,7 +1208,6 @@ FindPlace(Gear, false, 0, LAND_WIDTH); end; // No game flag for this for now -// if ((GameFlags and gfExplosives) <> 0) then for i:= 0 to Pred(cExplosives) do begin Gear:= AddGear(0, 0, gtExplosives, 0, _0, _0, 0); diff -r f11f3715f279 -r cfd83b04e0be hedgewars/uScript.pas --- a/hedgewars/uScript.pas Wed Oct 27 00:04:59 2010 +0200 +++ b/hedgewars/uScript.pas Wed Oct 27 01:33:38 2010 +0200 @@ -1049,7 +1049,6 @@ ScriptSetInteger('gfPlaceHog', gfPlaceHog); ScriptSetInteger('gfSharedAmmo', gfSharedAmmo); ScriptSetInteger('gfDisableGirders', gfDisableGirders); -ScriptSetInteger('gfExplosives', gfExplosives); ScriptSetInteger('gmLeft', gmLeft); ScriptSetInteger('gmRight', gmRight); diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Classes/AboutViewController.m --- a/project_files/HedgewarsMobile/Classes/AboutViewController.m Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/AboutViewController.m Wed Oct 27 01:33:38 2010 +0200 @@ -33,7 +33,7 @@ self.tableView.backgroundView = nil; self.tableView.allowsSelection = NO; - NSString *strPath = [NSString stringWithFormat:@"%@/Settings/credits.plist",[[NSBundle mainBundle] resourcePath]]; + NSString *strPath = [NSString stringWithFormat:@"%@/credits.plist",IFRONTEND_DIRECTORY()]; NSArray *array = [[NSArray alloc] initWithContentsOfFile:strPath]; self.people = array; [array release]; diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Classes/CommodityFunctions.h --- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Wed Oct 27 01:33:38 2010 +0200 @@ -34,8 +34,8 @@ #define GRAPHICS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"] #define HATS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"] #define GRAVES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Graves/"] -#define BOTLEVELS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels"] -#define BTN_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Btn"] +#define BOTLEVELS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels/"] +#define BTN_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Btn/"] #define FLAGS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Flags/"] #define FORTS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Forts/"] #define VOICES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"] @@ -43,6 +43,7 @@ #define MAPS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Maps/"] #define MISSIONS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Missions/Maps/"] #define LOCALE_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Locale/"] +#define IFRONTEND_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Settings/iFrontend/"] #define MSG_MEMCLEAN() DLog(@"has cleaned up some memory"); #define MSG_DIDUNLOAD() DLog(@"unloaded"); diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Classes/GameSetup.m --- a/project_files/HedgewarsMobile/Classes/GameSetup.m Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameSetup.m Wed Oct 27 01:33:38 2010 +0200 @@ -165,58 +165,26 @@ [schemePath release]; NSArray *basicArray = [schemeDictionary objectForKey:@"basic"]; NSArray *gamemodArray = [schemeDictionary objectForKey:@"gamemod"]; + int i = 0; int result = 0; - int i = 0; + int mask = 0x00000004; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000001; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000010; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000004; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000008; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000020; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000040; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000080; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000100; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000200; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000400; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00000800; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00002000; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00004000; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00008000; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00010000; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00020000; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00080000; - if ([[gamemodArray objectAtIndex:i++] boolValue]) - result |= 0x00100000; - - DLog(@"Sent %d flags",i); + // pack the gameflags in a single var and send it + for (NSNumber *value in gamemodArray) { + if ([value boolValue] == YES) + result |= mask; + mask <<= 1; + } NSString *flags = [[NSString alloc] initWithFormat:@"e$gmflags %d",result]; [self sendToEngine:flags]; [flags release]; - i = 0; NSString *dmgMod = [[NSString alloc] initWithFormat:@"e$damagepct %d",[[basicArray objectAtIndex:i++] intValue]]; [self sendToEngine:dmgMod]; [dmgMod release]; // support for endless games - int tentativeTurntime = [[basicArray objectAtIndex:i++] intValue]; + NSInteger tentativeTurntime = [[basicArray objectAtIndex:i++] intValue]; if (tentativeTurntime == 100) tentativeTurntime = 9999; NSString *turnTime = [[NSString alloc] initWithFormat:@"e$turntime %d",tentativeTurntime * 1000]; @@ -249,7 +217,7 @@ [self sendToEngine:explosives]; [explosives release]; - DLog(@"Sent %d modes",i); + DLog(@"Sent %d flags and %d modes", [gamemodArray count], i); [schemeDictionary release]; return result; } @@ -367,15 +335,17 @@ // scheme (returns initial health) NSInteger health = [self provideScheme:[self.gameConfig objectForKey:@"scheme"]]; + // send an ammostore for each team NSArray *teamsConfig = [self.gameConfig objectForKey:@"teams_list"]; + [self provideAmmoData:[self.gameConfig objectForKey:@"weapon"] forPlayingTeams:[teamsConfig count]]; + + // finally add hogs for (NSDictionary *teamData in teamsConfig) { [self provideTeamData:[teamData objectForKey:@"team"] forHogs:[[teamData objectForKey:@"number"] intValue] withHealth:health ofColor:[teamData objectForKey:@"color"]]; } - - [self provideAmmoData:[self.gameConfig objectForKey:@"weapon"] forPlayingTeams:[teamsConfig count]]; break; case '?': DLog(@"Ping? Pong!"); diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m Wed Oct 27 01:33:38 2010 +0200 @@ -39,88 +39,17 @@ #pragma mark View lifecycle -(void) viewDidLoad { [super viewDidLoad]; + NSString *path = nil; // title, description, image name (+btn) - NSArray *mods = [[NSArray alloc] initWithObjects: - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Fort Mode",@""),@"title", - NSLocalizedString(@"Defend your fort and destroy the opponents (two team colours max)",@""),@"description", - @"Forts",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Divide Team",@""),@"title", - NSLocalizedString(@"Teams will start on opposite sides of the terrain (two team colours max)",@""),@"description", - @"TeamsDivide",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Solid Land",@""),@"title", - NSLocalizedString(@"Land can not be destroyed",@""),@"description", - @"Solid",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Add Border",@""),@"title", - NSLocalizedString(@"Add an indestructable border around the terrain",@""),@"description", - @"Border",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Low Gravity",@""),@"title", - NSLocalizedString(@"Lower gravity",@""),@"description", - @"LowGravity",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Laser Sight",@""),@"title", - NSLocalizedString(@"Assisted aiming with laser sight",@""),@"description", - @"LaserSight",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Invulnerable",@""),@"title", - NSLocalizedString(@"All hogs have a personal forcefield",@""),@"description", - @"Invulnerable",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Add Mines",@""),@"title", - NSLocalizedString(@"Enable random mines",@""),@"description", - @"Mines",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Vampirism Mode",@""),@"title", - NSLocalizedString(@"Gain 80% of the damage you do back in health",@""),@"description", - @"Vampiric",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Karma Mode",@""),@"title", - NSLocalizedString(@"Share your opponents pain, share their damage",@""),@"description", - @"Karma",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Artillery Mode",@""),@"title", - NSLocalizedString(@"Your hogs are unable to move, test your aim",@""),@"description", - @"Artillery",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Random Order",@""),@"title", - NSLocalizedString(@"Order of play is random instead of in room order",@""),@"description", - @"RandomOrder",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"King Mode",@""),@"title", - NSLocalizedString(@"Play with a King. If he dies, your side loses",@""),@"description", - @"King",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys: NSLocalizedString(@"Place Hedgehogs",@""),@"title", - NSLocalizedString(@"Take turns placing your hedgehogs pre-game",@""),@"description", - @"PlaceHog",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Clan Shares Ammo",@""),@"title", - NSLocalizedString(@"Ammo is shared between all clan teams",@""),@"description", - @"SharedAmmo",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Disable Girders",@""),@"title", - NSLocalizedString(@"Disable girders when generating random maps",@""),@"description", - @"DisableGirders",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Disable Land Objects",@""),@"title", - NSLocalizedString(@"Disable land objects when generating maps",@""),@"description", - @"DisableLandObjects",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"AI Survival Mode",@""),@"title", - NSLocalizedString(@"AI-controlled hogs respawn on death",@""),@"description", - @"AISurvival",@"image",nil], - nil]; + path = [NSString stringWithFormat:@"%@/gameFlags_en.plist",IFRONTEND_DIRECTORY()]; + NSArray *mods = [[NSArray alloc] initWithContentsOfFile:path]; self.gameModifierArray = mods; [mods release]; // title, image name (+icon), default value, max value, min value - NSArray *basicSettings = [[NSArray alloc] initWithObjects: - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Damage Modifier",@""),@"title",@"Damage",@"image", - [NSNumber numberWithInt:100],@"default",[NSNumber numberWithInt:10],@"min",[NSNumber numberWithInt:300],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Turn Time",@""),@"title",@"Time",@"image", - [NSNumber numberWithInt:45],@"default",[NSNumber numberWithInt:1],@"min",[NSNumber numberWithInt:100],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Initial Health",@""),@"title",@"Health",@"image", - [NSNumber numberWithInt:100],@"default",[NSNumber numberWithInt:50],@"min",[NSNumber numberWithInt:200],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Sudden Death Timeout",@""),@"title",@"SuddenDeath",@"image", - [NSNumber numberWithInt:15],@"default",[NSNumber numberWithInt:0],@"min",[NSNumber numberWithInt:50],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Crate Drops",@""),@"title",@"Box",@"image", - [NSNumber numberWithInt:5],@"default",[NSNumber numberWithInt:0],@"min",[NSNumber numberWithInt:9],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Mines Time",@""),@"title",@"Time",@"image", - [NSNumber numberWithInt:3],@"default",[NSNumber numberWithInt:0],@"min",[NSNumber numberWithInt:3],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Mines Number",@""),@"title",@"Mine",@"image", - [NSNumber numberWithInt:4],@"default",[NSNumber numberWithInt:1],@"min",[NSNumber numberWithInt:80],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Dud Mines Probability",@""),@"title",@"Dud",@"image", - [NSNumber numberWithInt:0],@"default",[NSNumber numberWithInt:0],@"min",[NSNumber numberWithInt:100],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Explosives",@""),@"title",@"Damage",@"image", - [NSNumber numberWithInt:2],@"default",[NSNumber numberWithInt:0],@"min",[NSNumber numberWithInt:40],@"max",nil], - nil]; + path = [NSString stringWithFormat:@"%@/basicFlags_en.plist",IFRONTEND_DIRECTORY()]; + NSArray *basicSettings = [[NSArray alloc] initWithContentsOfFile:path]; self.basicSettingList = basicSettings; [basicSettings release]; @@ -177,10 +106,10 @@ return 2; break; case 1: - return [self.basicSettingList count]; + return [[self.schemeDictionary objectForKey:@"basic"] count]; break; case 2: - return [self.gameModifierArray count]; + return [[self.schemeDictionary objectForKey:@"gamemod"] count]; default: break; } @@ -259,7 +188,7 @@ if ([oneView isMemberOfClass:[UISlider class]]) { cellSlider = (UISlider *)oneView; break; - } + } } cellSlider.tag = SLIDER_TAG + row; cellSlider.value = [[[self.schemeDictionary objectForKey:@"basic"] objectAtIndex:row] floatValue]; @@ -282,21 +211,24 @@ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier2] autorelease]; UISwitch *onOff = [[UISwitch alloc] init]; - onOff.tag = SWITCH_TAG+row; [onOff addTarget:self action:@selector(toggleSwitch:) forControlEvents:UIControlEventValueChanged]; cell.accessoryView = onOff; [onOff release]; } + UISwitch *switcher = (UISwitch *)cell.accessoryView; + switcher.tag = SWITCH_TAG + row; + [switcher setOn:[[[self.schemeDictionary objectForKey:@"gamemod"] objectAtIndex:row] boolValue] animated:NO]; + UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/btn%@.png",BTN_DIRECTORY(),[[self.gameModifierArray objectAtIndex:row] objectForKey:@"image"]]]; cell.imageView.image = image; [image release]; [cell.imageView.layer setCornerRadius:7.0f]; - [cell.imageView.layer setBorderWidth:1]; [cell.imageView.layer setMasksToBounds:YES]; cell.textLabel.text = [[self.gameModifierArray objectAtIndex:row] objectForKey:@"title"]; cell.detailTextLabel.text = [[self.gameModifierArray objectAtIndex:row] objectForKey:@"description"]; - [(UISwitch *)cell.accessoryView setOn:[[[self.schemeDictionary objectForKey:@"gamemod"] objectAtIndex:row] boolValue] animated:NO]; + cell.detailTextLabel.adjustsFontSizeToFitWidth = YES; + cell.detailTextLabel.minimumFontSize = 6; cell.selectionStyle = UITableViewCellSelectionStyleNone; } diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Info.plist --- a/project_files/HedgewarsMobile/Info.plist Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Info.plist Wed Oct 27 01:33:38 2010 +0200 @@ -28,7 +28,7 @@ CFBundleSignature ???? CFBundleVersion - 1.1 + 1.2 LSRequiresIPhoneOS UIApplicationExitsOnSuspend diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist Wed Oct 27 01:33:38 2010 +0200 @@ -23,10 +23,13 @@ + + + + - diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/Schemes/Basketball.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Basketball.plist Wed Oct 27 00:04:59 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ - - - - - basic - - 100 - 30 - 100 - 15 - 0 - 3 - 4 - 0 - 0 - - gamemod - - - - - - - - - - - - - - - - - - - - - - diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist Wed Oct 27 01:33:38 2010 +0200 @@ -22,8 +22,8 @@ + - @@ -34,6 +34,9 @@ + + + diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist Wed Oct 27 01:33:38 2010 +0200 @@ -22,8 +22,8 @@ + - @@ -32,7 +32,10 @@ - + + + + diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist Wed Oct 27 01:33:38 2010 +0200 @@ -34,6 +34,9 @@ + + + diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist Wed Oct 27 01:33:38 2010 +0200 @@ -17,7 +17,6 @@ gamemod - @@ -27,12 +26,16 @@ + - + + + + diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/Schemes/Timeless.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Timeless.plist Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Timeless.plist Wed Oct 27 01:33:38 2010 +0200 @@ -22,11 +22,14 @@ + + + + - diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist Wed Oct 27 00:04:59 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist Wed Oct 27 01:33:38 2010 +0200 @@ -18,7 +18,6 @@ - @@ -27,6 +26,7 @@ + @@ -34,6 +34,9 @@ + + + diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/credits.plist --- a/project_files/HedgewarsMobile/Resources/Settings/credits.plist Wed Oct 27 00:04:59 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ - - - - - - Andrey "UnC0Rr" Korotaev - Igor "Displacer" Ulyanov - Derek "Nemo" Pomery - Martin "Affect" Boze - David "Krawek" Cuadrado - Martin "Ttsmj" Minarik - Kristian "TheXception" Lehmann - Vittorio "Koda" Giovara - Mario "Smaxx" Liebisch - Carlos "Palewolf" Vives - Richard "Sheepluva" Korlyi - Henning "Prg" Kühn - - - Tiyuri - Joshua Frese - Stanko Tadić - Julien Koesten - Joshua O'Sullivan - Nils Luck - Trey Perry - - - Stephen "Armagon" Alexander - Finn "Tiyuri" Brice - Jonatan Nilsson - Daniel Martin - - - Romulo Fernandes Machado - Svetoslav Stefanov - Petr Řezáček - Jie Luo - Andrey Korotaev - Nina Kuisma - Antoine Turmel - Peter Hüwe, Mario Liebisch - Luca Bonora - Adam Etienne - Maciej Mroziński, Wojciech Latkowski, Maciej Górny - Fábio Canário - Andrey Korotaev - Jose Riha - Carlos Vives - Niklas Grahn - Eugene V. Lyubimkin - - - Aleksey Andreev - Aleksander Rudalev - Natasha Stafeeva - Adam Higerd - - - Engine, frontend, net server author - Desktop frontend improvements - Many engine and frontend improvements - Drillrocket, Ballgun, RC Plane weapons - Mine number and time game settings - Desktop frontend improvements - Desktop frontend improvements - Mac OS X and iPhone version - Gamepad support, OpenGL wizard - Many engine improvements and graphics - Many engine and server improvements - Maze maps - - - - - - - - - Some hats - - - Hedgehogs voice - - - - - - Brazilian Portuguese - Bulgarian - Czech - Chinese - English - Finnish - French - German - Italian - Japanese - Polish - Portuguese - Russian - Slovak - Spanish - Swedish - Ukrainian - - - - - - - - - diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/iFrontend/basicFlags_en.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/iFrontend/basicFlags_en.plist Wed Oct 27 01:33:38 2010 +0200 @@ -0,0 +1,114 @@ + + + + + + default + 100 + image + Damage + max + 300 + min + 10 + title + Damage Modifier + + + default + 45 + image + Time + max + 100 + min + 1 + title + Turn Time + + + default + 100 + image + Health + max + 200 + min + 50 + title + Initial Health + + + default + 15 + image + SuddenDeath + max + 50 + min + 0 + title + Sudden Death Timeout + + + default + 5 + image + Box + max + 9 + min + 0 + title + Crate Drops + + + default + 3 + image + Time + max + 3 + min + 0 + title + Mines Time + + + default + 4 + image + Mine + max + 80 + min + 1 + title + Mines Number + + + default + 0 + image + Dud + max + 100 + min + 0 + title + Dud Mines Probability + + + default + 2 + image + Damage + max + 40 + min + 0 + title + Explosives + + + diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/iFrontend/credits.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/iFrontend/credits.plist Wed Oct 27 01:33:38 2010 +0200 @@ -0,0 +1,114 @@ + + + + + + Andrey "UnC0Rr" Korotaev + Igor "Displacer" Ulyanov + Derek "Nemo" Pomery + Martin "Affect" Boze + David "Krawek" Cuadrado + Martin "Ttsmj" Minarik + Kristian "TheXception" Lehmann + Vittorio "Koda" Giovara + Mario "Smaxx" Liebisch + Carlos "Palewolf" Vives + Richard "Sheepluva" Korlyi + Henning "Prg" Kühn + + + Tiyuri + Joshua Frese + Stanko Tadić + Julien Koesten + Joshua O'Sullivan + Nils Luck + Trey Perry + + + Stephen "Armagon" Alexander + Finn "Tiyuri" Brice + Jonatan Nilsson + Daniel Martin + + + Romulo Fernandes Machado + Svetoslav Stefanov + Petr Řezáček + Jie Luo + Andrey Korotaev + Nina Kuisma + Antoine Turmel + Peter Hüwe, Mario Liebisch + Luca Bonora + Adam Etienne + Maciej Mroziński, Wojciech Latkowski, Maciej Górny + Fábio Canário + Andrey Korotaev + Jose Riha + Carlos Vives + Niklas Grahn + Eugene V. Lyubimkin + + + Aleksey Andreev + Aleksander Rudalev + Natasha Stafeeva + Adam Higerd + + + Engine, frontend, net server author + Desktop frontend improvements + Many engine and frontend improvements + Drillrocket, Ballgun, RC Plane weapons + Mine number and time game settings + Desktop frontend improvements + Desktop frontend improvements + Mac OS X and iPhone version + Gamepad support, OpenGL wizard + Many engine improvements and graphics + Many engine and server improvements + Maze maps + + + + + + + + + Some hats + + + Hedgehogs voice + + + + + + Brazilian Portuguese + Bulgarian + Czech + Chinese + English + Finnish + French + German + Italian + Japanese + Polish + Portuguese + Russian + Slovak + Spanish + Swedish + Ukrainian + + + + + + + + + diff -r f11f3715f279 -r cfd83b04e0be project_files/HedgewarsMobile/Resources/Settings/iFrontend/gameFlags_en.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/iFrontend/gameFlags_en.plist Wed Oct 27 01:33:38 2010 +0200 @@ -0,0 +1,174 @@ + + + + + + description + Land can not be destroyed + image + Solid + title + Solid Land + + + description + Add an indestructable border around the terrain + image + Border + title + Add Border + + + description + Teams will start on opposite sides of the terrain (two teams only) + image + TeamsDivide + title + Divide Team + + + description + Lower gravity + image + LowGravity + title + Low Gravity + + + description + Assisted aiming with laser sight + image + LaserSight + title + Laser Sight + + + description + All hogs have a personal forcefield + image + Invulnerable + title + Invulnerable + + + description + Enable random mines + image + Mines + title + Add Mines + + + description + Gain 80% of the damage you do back in health + image + Vampiric + title + Vampirism Mode + + + description + Share your opponents pain, share their damage + image + Karma + title + Karma Mode + + + description + Your hogs are unable to move, test your aim + image + Artillery + title + Artillery Mode + + + description + Defend your fort and destroy the opponents (two teams only) + image + Forts + title + Fort Mode + + + description + Order of play is random instead of in room order + image + RandomOrder + title + Random Order + + + description + Play with a King. If he dies, your side loses + image + King + title + King Mode + + + description + Take turns placing your hedgehogs pre-game + image + PlaceHog + title + Place Hedgehogs + + + description + Ammo is shared between all clan teams + image + SharedAmmo + title + Clan Shares Ammo + + + description + Disable girders when generating random maps + image + DisableGirders + title + Disable Girders + + + description + Disable land objects when generating maps + image + DisableLandObjects + title + Disable Land Objects + + + description + AI-controlled hogs respawn on death + image + AISurvival + title + AI Survival Mode + + + description + Attacking does not end your turn + image + InfAttack + title + Unlimited Attacks + + + description + Weapons are reset to starting values each turn + image + ResetWeps + title + Reset Weapons + + + description + Each hedgehog has its own ammo. + image + PerHogAmmo + title + Per Hedgehog Ammo + + +