Bugfixes
This commit is contained in:
@@ -147,10 +147,10 @@ public class Generators {
|
||||
image.drawCenter(mech.region);
|
||||
}
|
||||
|
||||
int off = (image.width() - mech.weapon.region.getWidth())/2;
|
||||
int off = image.width()/2 - mech.weapon.region.getWidth()/2;
|
||||
|
||||
image.draw(mech.weapon.region, -(int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, false, false);
|
||||
image.draw(mech.weapon.region, (int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, true, false);
|
||||
image.draw(mech.weapon.region, -(int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off + 4, false, false);
|
||||
image.draw(mech.weapon.region, (int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off + 4, true, false);
|
||||
|
||||
|
||||
image.save("mech-icon-" + mech.name);
|
||||
|
||||
@@ -101,21 +101,11 @@ class Image {
|
||||
|
||||
int ofx = 0, ofy = 0;
|
||||
|
||||
if(x < 0){
|
||||
ofx = x;
|
||||
x = 0;
|
||||
}
|
||||
|
||||
if(y < 0){
|
||||
ofy = y;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
graphics.drawImage(ImagePacker.get(region).image,
|
||||
x, y,
|
||||
x + region.getWidth(),
|
||||
y + region.getHeight(),
|
||||
(flipx ? region.getWidth() : 0) + ofx,
|
||||
(flipx ? region.getWidth() : 0) + ofx,
|
||||
(flipy ? region.getHeight() : 0) + ofy,
|
||||
(flipx ? 0 : region.getWidth()) + ofx,
|
||||
(flipy ? 0 : region.getHeight()) + ofy,
|
||||
|
||||
Reference in New Issue
Block a user