--- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Tue Sep 20 23:43:52 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Wed Sep 21 02:05:42 2011 +0200
@@ -165,10 +165,12 @@
weaponCell.delegate = self;
}
- int x = ((row*32)/(int)self.ammoStoreImage.size.height)*32;
- int y = (row*32)%(int)self.ammoStoreImage.size.height;
+ 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());
- UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, 32, 32)] makeRoundCornersOfSize:CGSizeMake(7, 7)];
+ UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, size, size)] makeRoundCornersOfSize:CGSizeMake(corners, corners)];
weaponCell.weaponIcon.image = img;
weaponCell.weaponName.text = [NSString stringWithUTF8String:HW_getWeaponNameByIndex(row)];
weaponCell.tag = row;