diff -r 2a9ace189288 -r 668b71f31e51 project_files/HedgewarsMobile/Classes/CommodityFunctions.m --- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Mon Oct 04 00:00:42 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Wed Oct 06 02:31:04 2010 +0200 @@ -25,6 +25,7 @@ #import #import #import "AudioToolbox/AudioToolbox.h" +#import "PascalImports.h" void createTeamNamed (NSString *nameWithoutExt) { NSString *teamsDirectory = TEAMS_DIRECTORY(); @@ -36,9 +37,9 @@ error:NULL]; } - NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: MAX_HOGS]; + NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: HW_getMaxNumberOfHogs()]; - for (int i = 0; i < MAX_HOGS; i++) { + for (int i = 0; i < HW_getMaxNumberOfHogs(); i++) { NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i]; NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithInt:0],@"level", hogName,@"hogname", @"NoHat",@"hat", nil]; @@ -73,7 +74,7 @@ switch (type) { case 0: //default theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + [NSNumber numberWithInt:HW_getNumberOfWeapons()],@"version", @"939192942219912103223511100120100000021111010101",@"ammostore_initialqt", @"040504054160065554655446477657666666615551010111",@"ammostore_probability", @"000000000000020550000004000700400000000020000000",@"ammostore_delay", @@ -81,7 +82,7 @@ break; case 1: //crazy theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + [NSNumber numberWithInt:HW_getNumberOfWeapons()],@"version", @"999999999999999999299999999999999929999999990999",@"ammostore_initialqt", @"111111011111111111111111111111111111111111110111",@"ammostore_probability", @"000000000000000000000000000000000000000000000000",@"ammostore_delay", @@ -89,7 +90,7 @@ break; case 2: //pro mode theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + [NSNumber numberWithInt:HW_getNumberOfWeapons()],@"version", @"909000900000000000000900000000000000000000000000",@"ammostore_initialqt", @"000000000000000000000000000000000000000000000000",@"ammostore_probability", @"000000000000020550000004000700400000000020000000",@"ammostore_delay", @@ -97,7 +98,7 @@ break; case 3: //shoppa theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + [NSNumber numberWithInt:HW_getNumberOfWeapons()],@"version", @"000000990000000000000000000000000000000000000000",@"ammostore_initialqt", @"444441004424440221011212122242200000000200040001",@"ammostore_probability", @"000000000000000000000000000000000000000000000000",@"ammostore_delay", @@ -105,7 +106,7 @@ break; case 4: //basketball theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + [NSNumber numberWithInt:HW_getNumberOfWeapons()],@"version", @"939192942219912103223511100120100000021111010100",@"ammostore_initialqt", @"000000000000000000000000000000000000000000000000",@"ammostore_probability", @"000000000000000550000004000700400000000020000000",@"ammostore_delay", @@ -113,7 +114,7 @@ break; case 5: //minefield theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", + [NSNumber numberWithInt:HW_getNumberOfWeapons()],@"version", @"000000990009000000030000000000000000000000000000",@"ammostore_initialqt", @"000000000000000000000000000000000000000000000000",@"ammostore_probability", @"000000000000020550000004000700400000000020000000",@"ammostore_delay",