mirror of
https://github.com/jscrane/r65emu.git
synced 2025-02-10 19:31:57 +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 "hardware.h"
|
||||
#include "memory.h"
|
||||
@ -150,6 +151,15 @@ void Display::status(const char *s) {
|
||||
#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) {
|
||||
x += _xoff;
|
||||
y += _yoff;
|
||||
|
Loading…
x
Reference in New Issue
Block a user