project_files/HedgewarsMobile/Classes/HogButtonView.m
changeset 3926 668b71f31e51
parent 3829 81db3c85784b
child 3948 24daa33a3114
--- a/project_files/HedgewarsMobile/Classes/HogButtonView.m	Mon Oct 04 00:00:42 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/HogButtonView.m	Wed Oct 06 02:31:04 2010 +0200
@@ -22,6 +22,7 @@
 #import "HogButtonView.h"
 #import "CommodityFunctions.h"
 #import "UIImageExtra.h"
+#import "PascalImports.h"
 
 @implementation HogButtonView
 @synthesize singleHog, numberOfHogs, ownerDictionary;
@@ -51,13 +52,13 @@
 
 -(void) drawManyHogs:(NSInteger) hogs {
     if (numberOfHogs != hogs) {
-        if (hogs <= MAX_HOGS && hogs >= 1)
+        if (hogs <= HW_getMaxNumberOfHogs() && hogs >= 1)
             numberOfHogs = hogs;
         else {
-            if (hogs > MAX_HOGS)
+            if (hogs > HW_getMaxNumberOfHogs())
                 numberOfHogs = 1;
             else
-                numberOfHogs = MAX_HOGS;
+                numberOfHogs = HW_getMaxNumberOfHogs();
         }
         [ownerDictionary setObject:[NSNumber numberWithInt:numberOfHogs] forKey:@"number"];