Hello, I am a novice programmer with some experience in Java and C. A few months ago, I discovered Handmade Hero and I recently decided I would work my way through it.
I am currently on Day 4: Animating a Backbuffer, and I've found myself mentally stuck at the point where Casey makes two for loops to animate the pixels within the back buffer (aka the BitmapMemory).
Though I understand that the program is iterating through each row and each pixel, I do not understand why the Rows are unsigned 8 bit integers while the pixels are unsigned 32 bit integers.
I supposed Casey wanted to format the allocated memory into sections of eight bits, then format it into sections of 32 bits, but why not start by casting Row to a uint32 over a unit8?
If anyone has an explanation, or if there is greater detail in a later episode, let me know.