2017-02-19 23:55:54 +00:00
|
|
|
#ifndef __PHYSICALDISPLAY_H
|
|
|
|
#define __PHYSICALDISPLAY_H
|
|
|
|
|
|
|
|
#include <string.h> // strncpy
|
|
|
|
|
2017-02-26 16:00:41 +00:00
|
|
|
#include "vmdisplay.h" // FIXME: for AiieRect
|
|
|
|
|
2017-02-19 23:55:54 +00:00
|
|
|
class PhysicalDisplay {
|
|
|
|
public:
|
|
|
|
PhysicalDisplay() { overlayMessage[0] = '\0'; }
|
|
|
|
virtual ~PhysicalDisplay() {};
|
|
|
|
|
|
|
|
virtual void redraw() = 0; // total redraw, assuming nothing
|
2017-02-26 16:00:41 +00:00
|
|
|
virtual void blit(AiieRect r) = 0; // redraw just the VM display area
|
2017-02-19 23:55:54 +00:00
|
|
|
|
|
|
|
virtual void drawDriveDoor(uint8_t which, bool isOpen) = 0;
|
2017-02-27 01:25:47 +00:00
|
|
|
virtual void setDriveIndicator(uint8_t which, bool isRunning) = 0;
|
2017-02-19 23:55:54 +00:00
|
|
|
virtual void drawBatteryStatus(uint8_t percent) = 0;
|
|
|
|
|
|
|
|
virtual void drawCharacter(uint8_t mode, uint16_t x, uint8_t y, char c) = 0;
|
|
|
|
virtual void drawString(uint8_t mode, uint16_t x, uint8_t y, const char *str) = 0;
|
|
|
|
virtual void debugMsg(const char *msg) { strncpy(overlayMessage, msg, sizeof(overlayMessage)); }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
char overlayMessage[40];
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|