I am trying to display an array of 16-bit numbers, of datatype color_t. I have an image dimensions 59x82 and I have uploaded the image to SourceCoder3 and I have retrieved an array of color_t under the section
Code:
However when I add the array to the code and display it using CopySprite it shows up as a black box with width 59 and height of 82
Code:
Here is the implementation for CopySprite
Code:
Here is the image I am trying to show
I am sorry if I am not being clear enough and if you need anymore information just ask
Code:
Prizm/Nspire C (16-Bit Color)
However when I add the array to the code and display it using CopySprite it shows up as a black box with width 59 and height of 82
Code:
color_t sprite[9676] = {...};
CopySprite(sprite, 30, 30, 59, 82);
Here is the implementation for CopySprite
Code:
void CopySprite(color_t* sprite, int x, int y, int width, int height) {
color_t* VRAM = (color_t*)GetVRAMAddress();
VRAM += LCD_WIDTH_PX*y + x;
for(int j=y; j<y+height; j++) {
for(int i=x; i<x+width; i++) {
*(VRAM++) = *(sprite++);
}
VRAM += LCD_WIDTH_PX-width;
}
}
Here is the image I am trying to show
I am sorry if I am not being clear enough and if you need anymore information just ask