project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m
changeset 6078 8c0cc07731e5
parent 5976 306cedbeb213
child 6209 074ab6ebcb3e
--- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Fri Sep 30 22:33:28 2011 -0400
+++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Sun Oct 02 00:57:04 2011 +0200
@@ -20,9 +20,7 @@
 
 
 #import "SingleWeaponViewController.h"
-#import "CommodityFunctions.h"
-#import "UIImageExtra.h"
-#import "PascalImports.h"
+
 
 @implementation SingleWeaponViewController
 @synthesize weaponName, description, ammoStoreImage;
@@ -165,10 +163,10 @@
             weaponCell.delegate = self;
         }
 
-        int size = 32 * getScreenScale();
-        int corners = 8 * getScreenScale();
-        int x = ((row*size)/(int)(self.ammoStoreImage.size.height*getScreenScale()))*size;
-        int y = (row*size)%(int)(self.ammoStoreImage.size.height*getScreenScale());
+        int size = 32 * [[UIScreen mainScreen] scale];
+        int corners = 8 * [[UIScreen mainScreen] scale];
+        int x = ((row*size)/(int)(self.ammoStoreImage.size.height * [[UIScreen mainScreen] scale]))*size;
+        int y = (row*size)%(int)(self.ammoStoreImage.size.height * [[UIScreen mainScreen] scale]);
 
         UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, size, size)] makeRoundCornersOfSize:CGSizeMake(corners, corners)];
         weaponCell.weaponIcon.image = img;