0 Members and 1 Guest are viewing this topic.
CopySprite, and all thats use the Sprite Coder tool
So, We must now convert theses functions, and change the sprites, right?
void CopySprite(short* data, int x, int y, int width, int height) { short* VRAM = (short*)0xA8000000; VRAM += (LCD_WIDTH_PX*y + x); // what should I do? for(int j=y; j<y+height; j++) { memcpy(VRAM,data,width); // and here? VRAM += LCD_WIDTH_PX; data += width; } }
short setColors(unsigned char red, unsigned char green, unsigned char blue) return ((red & 0x1F) << 11 ) | ((green & 0x3F) << 5 ) | ((blue & 0x1F));
Set colors to a short? Useful for paint-like things (that i want to make...)Code: [Select]void setColors(unsigned char red, unsigned char green, unsigned char blue) return ((red & 0x1F) << 11 ) | ((green & 0x3F) << 5 ) | ((blue & 0x1F));ANyone to optimize this?Damn, double post... What would i do?
void setColors(unsigned char red, unsigned char green, unsigned char blue) return ((red & 0x1F) << 11 ) | ((green & 0x3F) << 5 ) | ((blue & 0x1F));