does not link, we are close..

This commit is contained in:
Emanuele Trabattoni
2021-05-25 22:35:25 +02:00
parent f5ce925153
commit 9f1990b977
6 changed files with 64 additions and 45 deletions

View File

@@ -2,7 +2,7 @@
namespace Render {
Drawable::Drawable(const size_t id, const Drawable* parent, const Mare* engine):
Drawable::Drawable(const size_t id, Drawable* parent, Mare* engine):
_id(id),
_parent(parent),
_engine(engine)
@@ -12,13 +12,28 @@ namespace Render {
//--------+--------+--------+--------+--------+--------+--------+--------+--------+--------//
//Point
DrawablePoint::DrawablePoint(const size_t id, const Drawable* parent, const Mare* engine, dim_t size):
DrawablePoint::DrawablePoint(const size_t id, Drawable* parent, Mare* engine, dim_t size):
Drawable(id, parent,engine),
_size(size)
{
}
void DrawablePoint::render() {
uint8_t *buf;
if (parent() == nullptr)
buf = engine()->bBuffer();
else
buf = engine()->fBuffer();
for (uint16_t xx(0); xx< _size.x; xx++){
for (uint16_t yy(0); yy < _size.y; yy++)
{
engine()->setPixel(buf,getOrigin().x+xx,getOrigin().y+yy,true);
}
}
}
//--------+--------+--------+--------+--------+--------+--------+--------+--------+--------//
//Line