--- 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"];