Pfap
Member
I have a character sprite and then I have separate items the character can equip. The character is on a 64X64 canvas. Lets say I have spr_hat, currently to draw the character with the hat on I just draw the spr_hat onto the spr_character. Which works well, but it also means that I am drawing the hat on a 64x64 canvas and at the exact position on that canvas, so that it lines up perfectly with the character sprite.
Maybe there is a better way to do the above?
Now for my specific question, how can I find where the sprite on that canvas is so that when I draw the hat independently of the character it doesn't look like an invisible character is wearing it?
My current solution is to have 2 sprites for each item. spr_hat_on and spr_hat_off, where the _off sprite is placed on the canvas for drawing to a selection menu instead of the character.
I guess my problem would be solved if I could find the center of the actual content and not the center of the canvas.
Maybe there is a better way to do the above?
Now for my specific question, how can I find where the sprite on that canvas is so that when I draw the hat independently of the character it doesn't look like an invisible character is wearing it?
My current solution is to have 2 sprites for each item. spr_hat_on and spr_hat_off, where the _off sprite is placed on the canvas for drawing to a selection menu instead of the character.
I guess my problem would be solved if I could find the center of the actual content and not the center of the canvas.