by TBone » Jul 26, 2001 @ 12:11am
From my experience, greyscale systems work with higher numbers being darker. The reason I chose 255 as a constant for my function was that I'm working with bytes--8 digit binary numbers representing two 4-bit pixels. Whether or not the pixels are swapped (which I've heard, by the way, but figured was irrelevant and easy to fix once I had video), it doesn't matter, because 255 in binary is 11111111--or total black for both pixels. Swap them, it's still 255.<br><br>There are two possibilities why it didn't work, even after I made Dan's correction. The first is that I'm not writing to the correct chunk of memory. I could be throwing the pixels offscreen somewhere, or under the action buttons, and never even know it. For that matter, I haven't totally verified the area I'm writing to--it's going to take some time with the debugger to check all that. The second possibility is that my method for reading from/writing to the palette is faulty. Since it was originally constructed with shorts or longs and I'm reading chars out of it, I could be making one of those hellish logic errors that takes so long to find and correct with my math and throwing the calculations off. <br><br>Either way, I think I've gotten to a point now where (because it's no longer crashing once the game starts) I ought to be able to figure something out. It might be trial and error, or it might be some bit of info I'm missing, but I'm pretty confident I'll have it running within the week.
3V1L L337 H3150