# HG changeset patch # User nemo # Date 1255635498 0 # Node ID be6690c337fbb06f6a3b32e717239107a2632802 # Parent ab6dfb227d1d3ab0b0fd03b48313c90fb0a43744 offset for multi-column ammo image diff -r ab6dfb227d1d -r be6690c337fb QTfrontend/selectWeapon.cpp --- a/QTfrontend/selectWeapon.cpp Thu Oct 15 19:31:53 2009 +0000 +++ b/QTfrontend/selectWeapon.cpp Thu Oct 15 19:38:18 2009 +0000 @@ -29,11 +29,14 @@ #include #include #include +#include QImage getAmmoImage(int num) { static QImage ammo(":Ammos.png"); - return ammo.copy(0, num*32, 32, 32); + int x = floor((num * 32) / ammo.height()) * 32; + if(x) x--; + return ammo.copy(x, num*32, 32, 32); } SelWeaponItem::SelWeaponItem(bool allowInfinite, int iconNum, int wNum, QWidget* parent) :