04-21-2014, 02:01 AM
It's that time once again..
I have icons of all kinds of sizes, now how would I go around and get all of them in a specific spot no matter the size?
I'm giving my equipment scene a complete overhaul, and now I would like to show armors and weapons centered at specific spots on an image of the actors body.
I kinda got it, but things start to get ugly when armor1 is 31*29 and armor2 is 48*48 anyway.
I really don't have the time to perfect each display, times 3! As there are 3 different locations where I would need this.
I thought I could achieve the above by making all icons the ''same size'' using:
It just doesn't work as perfect as I would like it to.
I don't know if it can be done, and perhaps it's overthinking things but what about letting rmxp open the bitmap and locate the first black x & y pixel?
Is there even a method for that?
Thanks in advance and for reading, did you notice it too by the way? Well now you did.
I have icons of all kinds of sizes, now how would I go around and get all of them in a specific spot no matter the size?
I'm giving my equipment scene a complete overhaul, and now I would like to show armors and weapons centered at specific spots on an image of the actors body.
I kinda got it, but things start to get ugly when armor1 is 31*29 and armor2 is 48*48 anyway.
I really don't have the time to perfect each display, times 3! As there are 3 different locations where I would need this.
I thought I could achieve the above by making all icons the ''same size'' using:
Code:
maxx = 50
maxy = 50
correctionx = maxx - bitmap.width
correctiony = maxy - bitmap.height
adjustx = bitmap.width + correctionx
adjusty = bitmap.height + correctionx
self.contents.blt(238 + adjustx, 279 + adjusty, bitmap, Rect.new(0, 0, 640, 480))
It just doesn't work as perfect as I would like it to.
I don't know if it can be done, and perhaps it's overthinking things but what about letting rmxp open the bitmap and locate the first black x & y pixel?
Is there even a method for that?
Thanks in advance and for reading, did you notice it too by the way? Well now you did.