For RDS: peeking and poking WORDs
- Posted by David Guy <dguy at MINDSPRING.COM> Feb 16, 1999
- 420 views
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