Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: HeirOfNorton on Tue 27/06/2006 03:51:31

Title: SUGGESTION: RawDrawImageCropped
Post by: HeirOfNorton on Tue 27/06/2006 03:51:31
This occurred to me as a useful addition, and I haven't seen it in the tracker. Basically specifying a sub-rectangle of the sprite to be drawn, rather than having to draw the whole thing.

At the moment, this can be done with:

//not quite true code ahead
DynamicSprite.CreateFromExistingSprite
DynamicSprite.Crop
RawDrawImage


but this can get a little tedious if it is something done very often, or with several different parts of the original sprite.

On top of that, if RawDrawImage is just a wrapper for Allegro's blit function then this should be pretty easy to implement, and will run quite a bit faster than the above code.

HoN
Title: Re: SUGGESTION: RawDrawImageCropped
Post by: Kweepa on Tue 27/06/2006 06:26:24
I second that emotion.
Thanks for pointing out DynamicSprite.Crop(). I missed that. Should come in handy...
Title: Re: SUGGESTION: RawDrawImageCropped
Post by: Gilbert on Tue 27/06/2006 08:03:05
I second that also, it would save a lot of work by not needing to make a dynamite sprite everytime.

Trackered. (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=579)
Title: Re: SUGGESTION: RawDrawImageCropped
Post by: Pumaman on Tue 27/06/2006 19:16:40
Sounds reasnable enough to me.