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 Discussion / COuld someone plaese help me!

Author
Message
EightYearRecoil
22
Years of Service
User Offline
Joined: 7th Apr 2003
Location: United States
Posted: 24th May 2003 12:44
Hey, what's up everyone. I've been trying to find info or tutorials on memblocks for some time now. The info in the book doesn't help me at all. If someone could please tell me how to structure them or give me a link to a good tutorial, I would greatly appreciate it. Thanks in advance
Eight Year Recoil
Pricey
22
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 28th May 2003 19:30
i don't know x-d

I don't know i can't tell!
I push the button and run like hell!
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 28th May 2003 19:56
Memblocks can be structured any way you like so long as you read the data out again properly, but to create images, sounds or meshes from them they need to be structured properly. The help files in DBC gave quite clear information on how the memblocks are structured, but this appears to have been dropped in DBPro, which is annoying. Here's a starter:

Image memblocks, using MAKE MEMBLOCK FROM IMAGE and MAKE IMAGE FROM MEMBLOCK.

Header info - 12 bytes:
0 - dword - width
4 - dword - height
8 - dword - depth

The rest of the data:
12 onwards - read/write bytes, words or dwords depending on the depth you specified at position 8 (16 bit depth = 2 bytes = 1 word per pixel). This contains color information, and carries on for as many pixels as there are in the image (width * height). The RGB command returns a dword, which you can use here.

Once I was but the learner,
now, I am the Master.

Login to post a reply

Server time is: 2025-05-18 01:36:20
Your offset time is: 2025-05-18 01:36:20