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.

Dark GDK / Memory blocks, bitmaps, etc

Author
Message
scooby bloke
20
Years of Service
User Offline
Joined: 4th Nov 2004
Location:
Posted: 2nd Nov 2005 12:29
Hi folks,

Was a bit bored, I thought I'd try and see if I could get the sdk to load bitmaps etc from a resource dll (saves having to distribute loads of seperate files), but have hit a bit of a snag. I can't get it to work!!

Basically, the code reads the bitmap from the resource using this bit of code...



So far so good. I've debugged throug the loop, and the bitmap was loaded from the resource and transferred into the specified memory block ok.

The next step in my cunning plan was to create a bitmap from the memory block by doing something like this...



The trouble is that it doesn't seem to work. The call to dbBitmapExist returns 0 all the time. Any ideas what might be going wrong? Does the memblock expect the bitmap to be in some special format (i.e. not the default raw bitmap format)?

Thanks,
Iain
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 2nd Nov 2005 12:43
Dont forget that bitmaps in resources may not have the usual bitmap format...

Come to the third DarkBasic Pro Sci Fi Con - Less than 2 weeks to go!
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
scooby bloke
20
Years of Service
User Offline
Joined: 4th Nov 2004
Location:
Posted: 2nd Nov 2005 12:52
True, I guess this might not be as straightforward as I thought it would be
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 2nd Nov 2005 12:54
Did some some example code for it somewhere...

Come to the third DarkBasic Pro Sci Fi Con - Less than 2 weeks to go!
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
scooby bloke
20
Years of Service
User Offline
Joined: 4th Nov 2004
Location:
Posted: 2nd Nov 2005 12:58
Ah, just found ithttp://forum.thegamecreators.com/?m=forum_view&t=25249&b=8

I'll have a look and see if I get any more luck
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 2nd Nov 2005 13:32
My way, is of course slow (but does seem to be the usual bitmap format)

Come to the third DarkBasic Pro Sci Fi Con - Less than 2 weeks to go!
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Lampton Worm
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 10th Dec 2005 17:39
Hey chaps, any luck with this? Would be a great thing to be able to do.

Cheers
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Dec 2005 19:35
Well, the program does work, but unfortunately I dont know the exact format for bitmaps in resources.

King3D
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: El Segundo, CA
Posted: 11th Dec 2005 00:52
It looks like you didn't copy the header into your memory block.
Lampton Worm
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 5th Jan 2006 15:52
@King3D/scooby - any chance you could update the code snippet to do the header? I took a look at the bitmap format, but it sounds more like you guys know what you're doing with this stuff and will get it working much faster.

Cheers
Lampton Worm
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 5th Mar 2006 13:15
Hi,

Just wondered if anyone came up with a way to do this since the last post.. I couldn't crack it so still using media from disk or from file packs and the like.

Ps. I heard some time ago there were 'plans' to make this stuff easier via some DGSDK commands (for loading mesh/object also not just image and sound) but I can't recall who mentioned it. Hmm. Perhaps it was all a dream!

Cheers
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 6th Mar 2006 16:16
I believe it was...

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Mar 2006 00:10
@Lampton, here's da codez King3D was right about the header info for the memblock.

For free Plug-ins and source code http://www.matrix1.demon.co.uk

Attachments

Login to view attachments
Lampton Worm
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 7th Mar 2006 17:46
Cool - I'll give that a whirl hopefully in the next few days.

Cheers
Lampton Worm
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 9th Mar 2006 20:00
Nice - works a treat. Laaaaavly. If I get a sec I'll explore with wavs and perhaps even models.

Cheers
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Mar 2006 13:08
That'll be handy

Login to post a reply

Server time is: 2024-11-19 05:38:11
Your offset time is: 2024-11-19 05:38:11