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 / BUG: rgbr and rgbg not working

Author
Message
Madehra
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: Portugal
Posted: 24th Oct 2002 23:58
Only rgbb seems to work.
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 25th Oct 2002 01:16
In an earlier post (pointing the finger at point) I showed that the Point() Command wasn't working properly either, as my then example showed:



This just copies what is drawn in the top left corner of the screen to somewhere below. It only displays the blue componant.

Looks like we have both found another patch 2 bug!
Madehra
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: Portugal
Posted: 25th Oct 2002 02:22
yep
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 25th Oct 2002 02:40
thats very odd... i mean only Red wasn't read :\
well perhaps it is a bug, i'd have to run a few more tests

Anata aru kowagaru no watashi!
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 25th Oct 2002 03:10
Yep, further examination shows, no red in 16bit displays and no red and green in 32 bit displays.

Has anyone tested this in 24bit?
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 25th Oct 2002 06:28
some reason nVidia based cards don't like 24-bit colour

Anata aru kowagaru no watashi!
Viktor
21
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 25th Oct 2002 20:33
I use Patch 1 and have no problems with rgbr/g/b functions. I tested it with POINT and it works well, and I tested it with Memblocks, which is much faster, and it works (How faster could be LOCK PIXELS in comparsion to MEMBLOCK reading? I have no idea, because I only read from Memblocks).

Madehra
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: Portugal
Posted: 28th Oct 2002 15:46
Hi Viktor, could you post an example of your test using memblocks? I never worked with them.
Thanks
Viktor
21
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 28th Oct 2002 17:47
Okay, here is it:

Description: Bitmap size is 256x192 pixel (ZX Spectrum resolution), If I try to copy Bitmap 0 to other Bitmap, DB Pro crashed, so I load pictures offscreen in Bitmap 1.


make memblock from bitmap 1,1:bmd=bitmap depth(0):for y=0 to 191:for x=0 to 255:color=pointmem(x,y,1,bmd):r1(x,y)=rgbr(color):g1(x,y)=rgbg(color):b1(x,y)=rgbb(color):next x:next y:delete memblock 1:return

This is the procedure for converting memblock values to 16/24/32 bit screen depth color values:

function pointmem(xpos,ypos,mem,bmd)
if bmd=16 then value=memblock word(mem,12+(xpos*2)+(ypos*512)):cr=((value && 31)*8):cg=((value && 2016)/32)*3.98:cb=((value && 63488)/2048)*8:value=cr+cg*256+cb*65536
if bmd=24 then value=memblock word(mem,12+(xpos*3)+(ypos*768))+(memblock byte (mem,12+(xpos*3)+(ypos*768)+1)*65536)
if bmd=32 then value=memblock dword(mem,12+(xpos*4)+(ypos*1024))
endfunction value

This code was written by my boss, and it is pretty fast.

Madehra
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: Portugal
Posted: 31st Oct 2002 15:56
"(ZX Spectrum resolution)"
LOL!!
Thanks Viktor!
Viktor
21
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 31st Oct 2002 22:02
Yep! ZX Spectrum resolution, because we are working on the new generation of bmp2scr converter, that converts visual media to colorfull (or B/W) ZX Spectrum images/streams. If you got the XGamer (X-Box mag from Future Publishing) issue from June 2002, you can see on page 130 a example of the conversion. BTW: they used a earlier version which had not all graphic modes finished.

Lee Bamber
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location:
Posted: 15th Nov 2002 02:09
Fixed for Patch 3, to be release at the end of the month

Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 15th Nov 2002 02:24
Nice to hear

Come to think of it where did you hear?

"Earth is the cradle of humanity,
but one cannot live in a cradle forever"
Konstantin E. Tsiolkovsky (1911)
Lee Bamber
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location:
Posted: 15th Nov 2002 22:32
Er, from my brain I guess, I am the one writing the Patch.

Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 16th Nov 2002 01:31
D`OH!, sorry, in my ignorance I forgot you are responsible

Serves me right. Feeling embarressed now, hehe.

"Earth is the cradle of humanity,
but one cannot live in a cradle forever"
Konstantin E. Tsiolkovsky (1911)
denki
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 16th Nov 2002 02:07
Lol Thanks Lee

denki
Kousen DPB RPG latest - Working on editors!
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 16th Nov 2002 02:07
Some of us are just easily confused.

(I'm sorry, someone had to say it)

Machine: P4 2200, 512MB, GeForce4 64MB, Audigy Platinum

There's a junglist inside every coder. http://www.kontact-kru.com for my own personal breakbeat terrorism.
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 16th Nov 2002 03:00
hehe

"Earth is the cradle of humanity,
but one cannot live in a cradle forever"
Konstantin E. Tsiolkovsky (1911)

Login to post a reply

Server time is: 2024-04-25 18:11:39
Your offset time is: 2024-04-25 18:11:39