i fix up the new ammo menu finally
authorkoda
Wed, 13 Oct 2010 00:57:20 +0200
changeset 3973 0d1a420531ef
parent 3972 93212a97f01a
child 3974 91ac041ecb20
child 3975 3f605cca9215
i fix up the new ammo menu finally
hedgewars/PascalExports.pas
project_files/HedgewarsMobile/Classes/GameConfigViewController.m
project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj
--- a/hedgewars/PascalExports.pas	Wed Oct 13 00:01:37 2010 +0200
+++ b/hedgewars/PascalExports.pas	Wed Oct 13 00:57:20 2010 +0200
@@ -1,13 +1,21 @@
 (*
- *  PascalExports.pas
- *  hwengine
+ * Hedgewars, a free turn based strategy game
+ * Copyright (c) 2004-2011 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * 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
  *
- *  Created by Vittorio on 09/01/10.
- *  Copyright 2009 __MyCompanyName__. All rights reserved.
+ * 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
  *)
 
-
 {$INCLUDE "options.inc"}
 
 unit PascalExports;
@@ -284,7 +292,8 @@
     a:= CurrentHedgehog^.Ammo;
     for slot:= 0 to cMaxSlotIndex do
         for index:= 0 to cMaxSlotAmmoIndex do
-            counts[ord(a^[slot,index].AmmoType)-1]:= a^[slot,index].Count;
+            if a^[slot,index].Count <> 0 then // yes, ammomenu is hell
+                counts[ord(a^[slot,index].AmmoType)-1]:= a^[slot,index].Count;
     exit(0);
 end;
 
--- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Wed Oct 13 00:01:37 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Wed Oct 13 00:57:20 2010 +0200
@@ -199,13 +199,13 @@
                                     self.mapConfigViewController.mazeSizeCommand,@"mazesize_command",
                                     self.mapConfigViewController.themeCommand,@"theme_command",
                                     self.mapConfigViewController.staticMapCommand,@"staticmap_command",
-                                    self.mapConfigViewController.missionCommand,@"mission_command",  
+                                    self.mapConfigViewController.missionCommand,@"mission_command",
                                     self.teamConfigViewController.listOfSelectedTeams,@"teams_list",
                                     self.schemeWeaponConfigViewController.selectedScheme,@"scheme",
                                     self.schemeWeaponConfigViewController.selectedWeapon,@"weapon",
                                     [NSNumber numberWithInt:self.interfaceOrientation],@"orientation",
                                     nil];
-    
+
     // finally launch game and remove this controller
     DLog(@"sending config %@", gameDictionary);
 
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj	Wed Oct 13 00:01:37 2010 +0200
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj	Wed Oct 13 00:57:20 2010 +0200
@@ -1458,7 +1458,7 @@
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
-		1D6058900D05DD3D006BFB54 /* Hedgewars */ = {
+		1D6058900D05DD3D006BFB54 /* Test Lua */ = {
 			isa = PBXNativeTarget;
 			buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Hedgewars" */;
 			buildPhases = (
@@ -1542,7 +1542,7 @@
 			);
 			projectRoot = "";
 			targets = (
-				1D6058900D05DD3D006BFB54 /* Hedgewars */,
+				1D6058900D05DD3D006BFB54 /* Test Lua */,
 				928301160F10CAFC00CC5A3C /* fpc */,
 				6179928B114AE0C800BA94A9 /* UpdateDataFolder */,
 			);