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.

PureGDK / dbCopyBitmap example

Author
Message
aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 3rd Feb 2010 18:25
I've been converting my DBPro program to PureBasic. I am not sure how to translate this command to the new structure.

for example:

COPY BITMAP EMPTY_332,0,0,331,331,DBRITE,26,26,26+331,26+331

If the new command is;

dbCopyBitmap(SourceBitmapID, DestinationBitmapID [, *Source.RECT, *Destination.RECT])

I can see how to reference;

dbCopyBitmap(EMPTY_332,DBRITE)

but how do I create the .RECT structure to pass the source.x1,source.y1,destination.x2,destination.y2 values. Any help here?

Russell B. Davis/aerostudios
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 4th Feb 2010 02:26 Edited at: 4th Feb 2010 02:27
See the section in the PureGDK help file for "Data structures to replace vector and matrix IDs". The principals are the same.



For more detailed information see the sections for structures and passing by address in the Gary's book.

http://forum.thegamecreators.com/?m=forum_view&t=158904&b=38

aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 4th Feb 2010 03:55
Ah, okay. I thought it was something like that. Yes, I have the book by Gary Willoughby printed and sitting here next to me. Thanks for pointing me in the right direction...again!

Russell B. Davis/aerostudios

Login to post a reply

Server time is: 2024-04-26 07:54:20
Your offset time is: 2024-04-26 07:54:20