Handmade Hero » Forums » Code » Structured art weirdness on Day 37
Huntress77
8 posts
#9628 Structured art weirdness on Day 37
1 year, 9 months ago

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?
mmozeiko
Mārtiņš Možeiko
1791 posts / 1 project
#9630 Structured art weirdness on Day 37
1 year, 9 months ago

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?
Pacifist
5 posts
#9637 Structured art weirdness on Day 37
1 year, 9 months ago Edited by Pacifist on Dec. 5, 2016, 7:25 p.m. 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.
Huntress77
8 posts
#9651 Structured art weirdness on Day 37
1 year, 9 months ago

Never mind. For some reason, I can't reproduce the problem now.