- [NEW] Nou flag per als actors: FLAG_INERTIA

- [NEW] Nou moviment per als actors: RANDV
- [NEW] HUNT implementat
- [NEW] Mentres es prova en l'editor ara es poden donar i llevar skills fent click damutn del seu dibuixet.
- [NEW] en l'editor, els skills i powerups nomes es veuen al estar provant
This commit is contained in:
2024-07-11 09:55:22 +02:00
parent c4cbda9b23
commit c9f41c9635
4 changed files with 168 additions and 97 deletions

View File

@@ -307,26 +307,50 @@ namespace modules
}
}
const int col1 = room::getColor(1);
const int col2 = room::getColor(2);
const int col3 = room::getColor(3);
draw::print2("a", 4, 26, col1, FONT_ZOOM_NONE);
draw::print2("b", 7, 26, col2, FONT_ZOOM_NONE);
draw::print2("c", 10, 26, col3, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostJump(), 2, 3, 27, col3, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostGod()/2, 2, 6, 27, col1, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostRun()/2, 2, 9, 27, col2, FONT_ZOOM_NONE);
if (!editor::isEditing())
{
const int col1 = room::getColor(1);
const int col2 = room::getColor(2);
const int col3 = room::getColor(3);
draw::print2("a", 4, 26, col1, FONT_ZOOM_NONE);
draw::print2("b", 7, 26, col2, FONT_ZOOM_NONE);
draw::print2("c", 10, 26, col3, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostJump(), 2, 3, 27, col3, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostGod()/2, 2, 6, 27, col1, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostRun()/2, 2, 9, 27, col2, FONT_ZOOM_NONE);
draw::setSource(draw::getSurface("objectes.gif"));
draw::swapcol(1, actor::hero::getSkills()&SKILL_SHOES ? col1 : col3);
draw::draw(276,166, 28, 22, 162, 0);
draw::swapcol(1, actor::hero::getSkills()&SKILL_PANTS ? col1 : col3);
draw::draw(250,183, 18, 23, 167, 22);
draw::swapcol(1, actor::hero::getSkills()&SKILL_GLOVES ? col1 : col3);
draw::draw(222,200, 21, 22, 165, 45);
draw::swapcol(1, actor::hero::getSkills()&SKILL_BAG ? col1 : col3);
draw::draw(279,200, 20, 25, 145, 41);
draw::stencil::enable();
draw::stencil::clear(255);
draw::setSource(draw::getSurface("objectes.gif"));
draw::stencil::set(SKILL_SHOES);
draw::swapcol(1, actor::hero::getSkills()&SKILL_SHOES ? col1 : col3);
draw::draw(276,166, 28, 22, 162, 0);
draw::stencil::set(SKILL_PANTS);
draw::swapcol(1, actor::hero::getSkills()&SKILL_PANTS ? col1 : col3);
draw::draw(250,183, 18, 23, 167, 22);
draw::stencil::set(SKILL_GLOVES);
draw::swapcol(1, actor::hero::getSkills()&SKILL_GLOVES ? col1 : col3);
draw::draw(222,200, 21, 22, 165, 45);
draw::stencil::set(SKILL_BAG);
draw::swapcol(1, actor::hero::getSkills()&SKILL_BAG ? col1 : col3);
draw::draw(279,200, 20, 25, 145, 41);
draw::stencil::disable();
if (editor::isDevMode() && input::mouseClk(1))
{
const uint8_t val = draw::stencil::query(input::mouseX(), input::mouseY());
if (val != 255)
{
if (actor::hero::getSkills() & val)
actor::hero::dropSkill(val);
else
actor::hero::giveSkill(val);
}
}
}
/*
print(0,0,input::mouseX());
print(0,20,input::mouseY());
@@ -618,6 +642,7 @@ namespace modules
line+=10;
ui::label("FLAGS", 2, line, 96, 11, GRAY);
changed |= btn_check(50, line, "INER", act->flags, FLAG_INERTIA);
changed |= btn_check(74, line, "SPEC", act->flags, FLAG_SPECIAL);
line+=10;