Closed przem360 closed 2 years ago
I would add the put pixel functions in picoxxx.cpp (all emus have such a file with the main function) one for 8 and one for 16 bit.
void emu_drawPixel8(int x, int y, unsigned char color) { unsigned char linept = tft.getLineBuffer(y); linept[x] = color; }
void emu_drawPixel16(int x, int y, unsigned short color) { unsigned short linept = tft.getLineBuffer(y); linept[x] = color; }
and expose them in the emuapi.h
... after this function extern void * emu_LineBuffer(int line);
extern void emu_drawPixel8(int x, int y, unsigned char color); extern void emu_drawPixel16(int x, int y, unsigned short color);
where you use your putpixel
emu_drawPixel8(x,y, RGBVAL8(r,g,b))
emu_drawPixel16(x,y,RGBVAL16(r,g,b))
Good luck.
J-M
Not only you saved my day, you saved my year :relieved: Big thanks!
Hi, I'm tinkering with MCUME_pico and one old emulator. My (basic) knowledge of C is not enough to implement existing (old) emulator code in MCUME. Author of emulator is using functions like
putpixel()
- in DOS version (I think from Allegro) orXPutPixel()
- in Linux version to draw a representation of an LCD. Maybe I could get away with usingputpixel()
fromgraphics.h
but than I have to send it somehow to MCUME functions (emu_DrawScreen()
?) Could I ask for some help, some good advice on how to go about it?