5 #include "ProgramVector.h"
6 #include "PatchProcessor.h"
7 #include "ServiceCall.h"
11 static void onDrawCallback(uint8_t* pixels, uint16_t width, uint16_t height){
21 void* drawArgs[] = {(
void*)SYSTEM_FUNCTION_DRAW, (
void*)&
onDrawCallback};
22 getProgramVector()->serviceCall(OWL_SERVICE_REGISTER_CALLBACK, drawArgs, 2);
36 if(x >= width || y >= height)
38 return pixels[y*width+x];
43 if(x < width && y < height)
44 pixels[y*width+x] = c;
49 if(x < width && y < height)
50 pixels[y*width+x] ^=
WHITE;
55 for(
int i=0; i<height*width; ++i)
57 (((pixels[i] &
RED) >> steps) &
RED) |
59 (((pixels[i] &
BLUE) >> steps) &
BLUE);
64 for(
int i=0; i<height*width; ++i)
static void onDrawCallback(uint8_t *pixels, uint16_t width, uint16_t height)
PatchProcessor * getInitialisingPatchProcessor()
Abstract base class for patches that use a colour screen.
uint16_t getScreenWidth()
uint16_t getScreenHeight()
virtual ~ColourScreenPatch()
virtual void processScreen(ColourScreenBuffer &screen)=0
void setPixel(unsigned int x, unsigned int y, Colour c)
Colour getPixel(unsigned int x, unsigned int y)
void invertPixel(unsigned int x, unsigned int y)
void fade(uint16_t steps)
void setBuffer(uint8_t *buffer)