mirror of
https://github.com/jscrane/r65emu.git
synced 2024-09-27 13:56:20 +00:00
add Display::statusf()
This commit is contained in:
parent
2c2d8146d2
commit
7c9b978012
10
display.cpp
10
display.cpp
@ -1,3 +1,4 @@
|
|||||||
|
#include <stdarg.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "hardware.h"
|
#include "hardware.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
@ -150,6 +151,15 @@ void Display::status(const char *s) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Display::statusf(const char *fmt, ...) {
|
||||||
|
va_list args;
|
||||||
|
char buf[80];
|
||||||
|
va_start(args, fmt);
|
||||||
|
vsnprintf(buf, sizeof(buf), fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
status(buf);
|
||||||
|
}
|
||||||
|
|
||||||
void Display::drawPixel(unsigned x, unsigned y, colour_t col) {
|
void Display::drawPixel(unsigned x, unsigned y, colour_t col) {
|
||||||
x += _xoff;
|
x += _xoff;
|
||||||
y += _yoff;
|
y += _yoff;
|
||||||
|
@ -34,6 +34,7 @@ public:
|
|||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
void status(const char *s);
|
void status(const char *s);
|
||||||
|
void statusf(const char *fmt, ...);
|
||||||
|
|
||||||
void drawPixel(unsigned x, unsigned y, colour_t col);
|
void drawPixel(unsigned x, unsigned y, colour_t col);
|
||||||
void drawString(const char *s, unsigned x, unsigned y);
|
void drawString(const char *s, unsigned x, unsigned y);
|
||||||
|
Loading…
Reference in New Issue
Block a user