some bugfixes
This commit is contained in:
parent
6570f7fafc
commit
c822a75df0
15 changed files with 93 additions and 94 deletions
|
|
@ -1,15 +0,0 @@
|
|||
//
|
||||
// Created by jedi on 11/2/18.
|
||||
//
|
||||
|
||||
#ifndef MGL_DMXMENU_BUFFER_8_H
|
||||
#define MGL_DMXMENU_BUFFER_8_H
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
|
||||
#endif //MGL_DMXMENU_BUFFER_8_H
|
||||
|
|
@ -9,7 +9,6 @@
|
|||
#include "gfx/font.h"
|
||||
#include "fonts/basic_5x4.h"
|
||||
#include "gfx/buffer.h"
|
||||
#include "gfx/buffer_32.h"
|
||||
|
||||
class screen;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,9 @@ class layout {
|
|||
|
||||
private:
|
||||
const int maxwidth_;
|
||||
const int maxheight_;
|
||||
int allocated_;
|
||||
screen screen_;
|
||||
screen& screen_;
|
||||
|
||||
int allocate_(node *, int);
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ public:
|
|||
static const int maxslots = 10;
|
||||
Slot slots[maxslots];
|
||||
|
||||
layout(int width) : maxwidth_(width), screen_(width, 32) {
|
||||
layout(screen& s) : maxwidth_(s.getWidth()), maxheight_(s.getHeight()), screen_(s) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,28 +14,19 @@ private:
|
|||
const int height_;
|
||||
|
||||
public:
|
||||
screen(int w, int h) : width_(w), height_(h) {
|
||||
screen(int w, int h);
|
||||
|
||||
}
|
||||
void draw(int x, int y);
|
||||
|
||||
void draw(int x, int y) {
|
||||
hal_draw(x, y);
|
||||
}
|
||||
void draw(int x, int y, canvas &c);
|
||||
|
||||
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, const char *str, font & = basic_5x4){
|
||||
void print(int x, int y, char *str, font & = basic_5x4);
|
||||
|
||||
}
|
||||
int getWidth();
|
||||
|
||||
void print(int x, int y, char *str, font & = basic_5x4){
|
||||
|
||||
}
|
||||
int getHeight();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue