Handmade Hero»Forums»Code
8 posts
Structured art weirdness on Day 37
When I load my structured_art.bmp, it's pixels all show white values in the debugger. The image itself shows up properly in the game and the header is correct in the debugger, but the value of every pixel in it reads 0xFFFFFF00.

It's not really a problem because I've been able to blit every bitmap to the screen, but I still feel like I should understand what's going on here. I used Gimp to create the structured art and followed every step that Casey did. Any ideas?
Mārtiņš Možeiko
2562 posts / 2 projects
Structured art weirdness on Day 37
Can you explain a bit more - in which place are you looking at pixel values in memory?
Can you show screenshot of debugger which includes place of code where you stopped and memory/watch window with values you see?
5 posts
Structured art weirdness on Day 37
Edited by Pacifist on Reason: Typo
If you look at Casey's watch window at around the 10 minute mark on the day 37 video you'll see that all of the pixels in his structured art are 0xFFFFFF00 except the ones he explicitly sets the value of in the corners. I imagine what happens is that since the default colour of a new image in Gimp is white, when you set the alpha to 0x00 it just leaves the other bits set to whatever they were.
8 posts
Structured art weirdness on Day 37
Never mind. For some reason, I can't reproduce the problem now.