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.

DarkBASIC Professional Discussion / Passing and returning bitmaps to functions

Author
Message
Pipes
20
Years of Service
User Offline
Joined: 17th Sep 2004
Location:
Posted: 18th Sep 2004 14:46
Is it possible to pass or return bitmaps, images and sprites to functions??

Contempt Prior to Investigation = Everlasting Ignorance
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 18th Sep 2004 15:31
Pipes, I'm not too sure how you mean, but it is possible to pass the numbers of each to a function if you wish.

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
Fang
21
Years of Service
User Offline
Joined: 2nd Jul 2003
Location:
Posted: 18th Sep 2004 15:35
I think you could pass a memblock that is the bitmap, but i could be wrong

"I really don't know how WWIII will be fought, but WWIV will be with sticks and stones"
- Albert Einstien
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 18th Sep 2004 20:24
bitmaps images and sprites can be thought of as global, just alter them inside the function, the changes are visible throughout the program, if you want to make two versions or more of an image then you need to make new images etc to hold the differing bitmaps.

Mentor.

PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
Pipes
20
Years of Service
User Offline
Joined: 17th Sep 2004
Location:
Posted: 21st Sep 2004 15:33
Hey thanks for the info. After messing around with DBpro for awhile I see where bitmaps etc, are global. My real problem is defining a bitmap inside a UDT then passing and returning the UDT. Which after some frustration and scouring the forums, I was disappointed to learn that passing and returning UDTs is not possible. Now I have to rethink my whole idea of creating a GUI for DB programs. It seems DBPro is lacking some core functionality that most other programming languages provide. Bummer dude!!!!!!!!!!!!! oh well... Oh hell. Thanks for responding to my question.

Contempt Prior to Investigation = Everlasting Ignorance

Login to post a reply

Server time is: 2025-06-04 18:33:43
Your offset time is: 2025-06-04 18:33:43