Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Drawing specific tiles from tileset...

Author
Message
Izzy545
20
Years of Service
User Offline
Joined: 18th Feb 2004
Location:
Posted: 14th Jan 2008 02:38
I can't seem to find what I'm looking for on the board about how to do this. I have an image 96x32 and I just want to draw 32x32 sections of that image onto the screen. Is it really as hard as it seems? I can't find any commands to do such a thing in DBPro.

wildbill
18
Years of Service
User Offline
Joined: 14th Apr 2006
Location:
Posted: 14th Jan 2008 03:24
Straight from the help files.
GET IMAGE

This command will copy a selected area of the current bitmap. Amongst other things, you can use this command to store sequences of image data and provide animations for sprites. When images are grabbed, they are stored in memory and do not require the bitmap from which the image was taken. The parameters should be specified using integer values. You cannot grab an image while the target pixels are being locked by the LOCK PIXELS command, as it is not possible to read from a surface that is using the fast write only lock method on the pixels. Use the following texture flags:

0-use stretching, filter, colorkey
1-no stretching, no filter, colorkey
2-use stretching, no filter, no colorkey (grab from alpha bitmap retain alpha channel)
3-no stretching, no filter, no colorkey (grab from alpha bitmap retain alpha channel)


Syntax
GET IMAGE Image Number, Left, Top, Right, Bottom
GET IMAGE Image Number, Left, Top, Right, Bottom, Texture Flag

Login to post a reply

Server time is: 2024-05-17 09:47:50
Your offset time is: 2024-05-17 09:47:50