mirror of
https://github.com/neon443/ColourCam3DS.git
synced 2026-03-11 05:19:13 +00:00
getcolor
This commit is contained in:
@@ -27,6 +27,15 @@ void flushBuffs(u8 *buf) {
|
|||||||
buf = malloc(BUFSIZE);
|
buf = malloc(BUFSIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void getColor(void *fb, int row, int col) {
|
||||||
|
u8 *fb_8 = (u8*) fb;
|
||||||
|
u32 v = ((HEIGHT - col) + (row*HEIGHT)) * 3;
|
||||||
|
uint8_t r = fb_8[v];
|
||||||
|
uint8_t g = fb_8[v+1];
|
||||||
|
uint8_t b = fb_8[v+2];
|
||||||
|
printf("\n---RGB2---%u %u %u\n", r, g, b);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
u8 *buf = malloc(BUFSIZE);
|
u8 *buf = malloc(BUFSIZE);
|
||||||
|
|||||||
Reference in New Issue
Block a user