Help needed with C stuff again
------=_NextPart_000_0007_01C05261.CF874CF0
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi everyone.
I have a simple 'C' Morfit example I am trying to convert to Euphoria.
The example in C has the following....
BYTE *pixels=3DMorfit_bitmap_get_memory(bitmap_handle);
WORD *palette=3DMorfit_bitmap_get_palette(bitmap_handle);
The returns are pointers to memory that hold a bitmap and
a palette.
Also the following....
WORD color16=3Dpalette[pixels[y*width+x]];
The line above has me a bit stumped. It seems to be using one pointer
as an index to another? It is in a pair of nested for loops, =
incrementing
x and y.
My wrap of the two functions just returns the pointers (the same as with =
C)
The result is passed to the following function....
Morfit_utilities_rgb16_to_rgb24(color16, (BYTE *)&red, (BYTE *)&green, =
(BYTE *)&blue);
Any help with wrapping that line would be greatly appreciated!
Thanks
Mark
------=_NextPart_000_0007_01C05261.CF874CF0
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi everyone.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I have a simple 'C' Morfit example I am =
trying to=20
convert to Euphoria.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>The example in C has the =
following....</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>BYTE=20
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>The returns are pointers to memory that =
hold a=20
bitmap and</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>a palette.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Also the following....</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>WORD=20
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>The line above has me a bit stumped. It =
seems to be=20
using one pointer</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>as an index to another? It is in a pair =
of nested=20
for loops, incrementing</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>x and y.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>My wrap of the two functions just =
returns the=20
pointers (the same as with </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>C)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>The result is passed to the following=20
function....</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial =
size=3D2>Morfit_utilities_rgb16_to_rgb24(color16, (BYTE=20
*)&red, (BYTE *)&green, (BYTE *)&blue);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Any help with wrapping that line would =
be greatly=20
appreciated!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV> </DIV>
------=_NextPart_000_0007_01C05261.CF874CF0--
|
Not Categorized, Please Help
|
|