43 lines
748 B
C++
43 lines
748 B
C++
//
|
|
// Created by jedi on 11/1/18.
|
|
//
|
|
|
|
#ifndef MGL_DMXMENU_SCREEN_H
|
|
#define MGL_DMXMENU_SCREEN_H
|
|
|
|
#include "hal/hal.h"
|
|
#include "gfx/canvas.h"
|
|
|
|
class screen {
|
|
private:
|
|
const int width_;
|
|
const int height_;
|
|
|
|
public:
|
|
screen(int w, int h) : width_(w), height_(h) {
|
|
|
|
}
|
|
|
|
void draw(int x, int y) {
|
|
hal_draw(x, y);
|
|
}
|
|
|
|
void draw(int x, int y, canvas &c) {
|
|
for (int x_ = 0; x_ < 128; x_++)
|
|
for (int y_ = 0; y_ < 32; y_++)
|
|
if (c.buffer_.get(x_ * 32 + y_))
|
|
hal_draw(x + x_, y + y_);
|
|
}
|
|
|
|
void print(int x, int y, const char *str, font & = basic_5x4){
|
|
|
|
}
|
|
|
|
void print(int x, int y, char *str, font & = basic_5x4){
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
#endif //MGL_DMXMENU_SCREEN_H
|