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.

Author
Message
Algae Man
23
Years of Service
User Offline
Joined: 11th Nov 2002
Location: Canada
Posted: 2nd Nov 2003 00:30
I just got DarkBasic Pro in the mail (I've had the original DB for a few years) and I'm really excited about memblocks but haven't a clue how to use them. The manual explains nothing about how to use them. Could someone please point me in the right direction? Where could I find explanations of memblocks? Thanks in advance.
Kentaree
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 2nd Nov 2003 00:44
There's more info in the DarkBASIC Classic 1.13 manual. You can download it from: ftp://ftp.thegamecreators.com/docs/DarkBASIC_Manual_v113.zip

I would be unstoppable if I could just get started...
Algae Man
23
Years of Service
User Offline
Joined: 11th Nov 2002
Location: Canada
Posted: 5th Nov 2003 22:30 Edited at: 5th Nov 2003 22:38
Thanks, but that manual still doesn't really explain much. For example, it tells me the data structure of IMAGE memblocks.


Quote: "Memblock- Image (12 Byte Header)
Header
4 BYTES (DWORD) Width
4 BYTES (DWORD) Height
4 BYTES (DWORD) Depth
Data
X BYTES - Pixel Data (a 16bit bitmap uses 2 BYTES per Pixel)
"


But what does "X BYTES" mean? What do the two bytes do? How would I convert an RGB value to two bytes? Could someone please show me some code showing how to draw by manipulating memblocks? Thanks.
Dr OcCuLt
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: a Dark Deep Dark pit, it dark in here
Posted: 5th Nov 2003 23:20 Edited at: 5th Nov 2003 23:21
number of BYTE is X=Width*Height*4 for a image then has a Depth of 32bit, 4 BYTES per Pixel.
BYTE 1-Blue
BYTE 2-Green
BYTE 3-Red
BYTE 4-Alpha

there is some code in the code box that ues this.

--Dr 0--
Algae Man
23
Years of Service
User Offline
Joined: 11th Nov 2002
Location: Canada
Posted: 6th Nov 2003 00:01
Thanks Dr. OcCuLt! I treid out your code and tinkered with it a little. I think I understand now! But what about 16-bit images? Or are they obsolete now because processing speeds are faster?

Login to post a reply

Server time is: 2026-07-26 15:30:22
Your offset time is: 2026-07-26 15:30:22