Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Lukas on September 24, 2012, 06:56:00 am

Title: how "angle" in Sprite Class work?
Post by: Lukas on September 24, 2012, 06:56:00 am
any change in angle will rewrite pixel of bitmap ?  :???:
Can someone show/tell me the code used in the Sprite Class :huh:

thanks, sorry for my bad English.  :)
Title: Re: how "angle" in Sprite Class work?
Post by: Blizzard on September 24, 2012, 07:42:34 am
The Bitmap stays unchanged. Bitmap represents the image data while Sprite contains data about how Bitmap should be rendered. "angle" is a property of the Sprite class. It can be used like this:

sprite = Sprite.new
sprite.bitmap = Bitmap.new(64, 64) # or any bitmap in existence
sprite.angle = 30
Title: Re: how "angle" in Sprite Class work?
Post by: Lukas on September 24, 2012, 09:03:56 am
yeah, i know that.

i mean..
def angle=(value)
blablaabla
end

I want to know the contents(blablaabla) of "angle" method .  :)

sorry for my bad english  :facepalm:
Title: Re: how "angle" in Sprite Class work?
Post by: Blizzard on September 24, 2012, 12:06:51 pm
They are implemented in C and are not accessible. I expect that it's a simple assigner of a variable that is then internally used for rotation during rendering.
Title: Re: how "angle" in Sprite Class work?
Post by: Lukas on September 25, 2012, 10:19:53 pm
oww  :huh:
uhm.. thanks Blizzard.   :)
good luck ARC  :D