@Argent77
That is exactly what I needed, thank you!
@The Imp
A nibble is half of a byte (so 4 bits) and stores a value from 0 to 15. The problem is that the smallest value traditionally used to read from / write to a file is a byte, so low level bit manipulations (something I've never been able to wrap my head around) are required to get at the two 4-bit nibbles in the byte. That's where Argent77's code comes in. As far as my need to do this, 4-bit bitmaps (the format used by area search maps) have a 16 color palette, and each pixel is a 4-bit nibble that is a pointer into the palette. So each byte stores two pixels, but in order to change the pixels one must access each nibble.