--- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Sun Oct 03 00:23:05 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Mon Oct 04 00:00:42 2010 +0200
@@ -215,8 +215,8 @@
weaponCell.delegate = self;
}
- int x = ((row*32)/1024)*32;
- int y = (row*32)%1024;
+ int x = ((row*32)/(int)self.ammoStoreImage.size.height)*32;
+ int y = (row*32)%(int)self.ammoStoreImage.size.height;
UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, 32, 32)] makeRoundCornersOfSize:CGSizeMake(7, 7)];
weaponCell.weaponIcon.image = img;