does not link, we are close..
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user