V3: Having multiple frames in an image
Displaying 1-2 of 2 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Overkill

Basically, I want to make a speech portrait drawing function. Each portrait is 32x32 (for now).

In V2, I would have done this:


Code:

void Place.Portrait(int x, int y, int who)
{
TCopySprite(x,y,32,32,speechpic+(1024*who) );
}



However, now it uses TBlit(), and I have no idea how I would do this.

Posted on 2004-02-18 02:00:22 (last edited on 2004-02-18 02:01:45)

vecna

For speech portraits, check out GrabRegion/TGrabRegion.
There's also ImageShell.
There's currently a .. weird behavior if you use GrabRegion as a full replacement for TBlit regarding to blitting offscreen surfaces. Its not exactly a bug, but it is counterintuitive. I may try to correct it later, but at this time it's not a high priority. Check out the animation.vc in Timeless, it uses a grabregion-to-temp-image-then-blit algo to fix it.

IMO, GrabRegion is a cleaner way than directly manipluating image pointers anyway. Also there's no possiblity that someone will mess up manipulating the engine pointers, the system crashes, and they blame it on VERGE being unstable.

Posted on 2004-02-18 03:03:33


Displaying 1-2 of 2 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.