For RDS: peeking and poking WORDs

new topic     » topic index » view thread      » older message » newer message

Hi,

Any chance of adding routines to poke & peek WORDs in additions to the ones to
poke/peek BYTEs and DWORDs.

I ask this because when using Euphoria to access 16bit DIBs or DirectDraw
Surfaces, the ability to poke/peek single WORDs would be very nice/helpful.  As
it stands, I have to break my 16bit color into bytes and poke then into memory as
a sequence.  When reading colors, I either have to read two bytes and re-combine
them or read four bytes and pull out/re-combine the bytes.

In addition, some Windows structures, BMPINFOHEADER for instance, have WORD
sized elements.  Instead of being able to do something simple like this:

  poke2( pBIH + BIH_biBitCount, wordVal )

I have to do something like:

poke( pBIH + BIH_biBitCount, {wordVal, floor(wordVal/256)}) -- being sure to
  poke the low byte first

I think code would be simpler and clearer if there where WORD poke'ing/peek'ing
routines available.

Thanks for reading,
David

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu