equal
deleted
inserted
replaced
213 if (weaponCell == nil) { |
213 if (weaponCell == nil) { |
214 weaponCell = [[[WeaponCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease]; |
214 weaponCell = [[[WeaponCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease]; |
215 weaponCell.delegate = self; |
215 weaponCell.delegate = self; |
216 } |
216 } |
217 |
217 |
218 int x = ((row*32)/1024)*32; |
218 int x = ((row*32)/(int)self.ammoStoreImage.size.height)*32; |
219 int y = (row*32)%1024; |
219 int y = (row*32)%(int)self.ammoStoreImage.size.height; |
220 |
220 |
221 UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, 32, 32)] makeRoundCornersOfSize:CGSizeMake(7, 7)]; |
221 UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, 32, 32)] makeRoundCornersOfSize:CGSizeMake(7, 7)]; |
222 weaponCell.weaponIcon.image = img; |
222 weaponCell.weaponIcon.image = img; |
223 weaponCell.weaponName.text = [ammoNames objectAtIndex:row]; |
223 weaponCell.weaponName.text = [ammoNames objectAtIndex:row]; |
224 weaponCell.tag = row; |
224 weaponCell.tag = row; |