- [NEW] Selecció de actors en l'editor amb el ratolí

This commit is contained in:
2024-07-11 08:25:34 +02:00
parent b794ebe608
commit c4cbda9b23
5 changed files with 185 additions and 166 deletions

View File

@@ -22,7 +22,9 @@ namespace modules
::game::setUpdateTicks(64);
actor::templates::load();
if (editor::isDevMode()) {
if (editor::isDevMode())
{
draw::stencil::init();
FILE* f = fopen("data/gifs.txt", "r");
int buffer_len=255;
@@ -287,11 +289,24 @@ namespace modules
if (editor::isDevMode()) draw::setViewport(100,0,320,240);
room::draw();
draw::stencil::enable();
draw::stencil::clear(255);
actor::draw(actor::getFirst());
draw::stencil::disable();
room::draw2();
draw::swapcol(1, WHITE+LIGHT);
actor::draw(actor::getPicked(), false);
if (editor::isDevMode() && input::mouseBtn(1))
{
const uint8_t val = draw::stencil::query(input::mouseX(), input::mouseY());
if (val != 255)
{
actor::select(actor::findByTag(val));
section = SECTION_ACTOR;
}
}
const int col1 = room::getColor(1);
const int col2 = room::getColor(2);
const int col3 = room::getColor(3);