I've been trying to do some graphics manipulation (always been my favorite) in 16 bit mode on the GP32. I've had no problem doing this in 8 bit mode, as each pixel is represented by 1 byte, but I can't quite get my head around 16 bit.
As far as I understand each pixel is represented by 2 bytes, but I've tried writting a loop which fills the screen with a specified colour, and I haven't had much luck. All I got was half the screen filled with a colour, so I realised that each pixel was 2 bytes wide and I tried multiplying the buffer index by 2. I was quite happy to see that the entire screen was fileld this time, but then I noticed that it was the incorrect colour <_<
Can anyone please explain to me how to write pixels to a 16 bit screen in the correct colours? Before I multiplyed the buffer index, the colour was correct. but of course only half of the screen was filled
I'm currently using "unsigned char *screen" as the pointer to the surface buffer, is that okay ?
Any help is appreciated. Thank you!
As far as I understand each pixel is represented by 2 bytes, but I've tried writting a loop which fills the screen with a specified colour, and I haven't had much luck. All I got was half the screen filled with a colour, so I realised that each pixel was 2 bytes wide and I tried multiplying the buffer index by 2. I was quite happy to see that the entire screen was fileld this time, but then I noticed that it was the incorrect colour <_<
Can anyone please explain to me how to write pixels to a 16 bit screen in the correct colours? Before I multiplyed the buffer index, the colour was correct. but of course only half of the screen was filled
I'm currently using "unsigned char *screen" as the pointer to the surface buffer, is that okay ?
Any help is appreciated. Thank you!