- [NEW] Ja perd vides, i ja es veuen en el marcador

This commit is contained in:
2024-07-24 09:33:17 +02:00
parent ed160b0588
commit 12674cc1a6
3 changed files with 14 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 B

After

Width:  |  Height:  |  Size: 662 B

View File

@@ -716,6 +716,9 @@ namespace actor
vec3_t max = room::getMax(); vec3_t max = room::getMax();
if ( (act->push & PUSH_KILL) && (act->flags & FLAG_HERO) ) { if ( (act->push & PUSH_KILL) && (act->flags & FLAG_HERO) ) {
const int lives = hero::getLives()-1;
hero::setLives(lives);
// [TODO] If lives == 0 anar a la pantalla de game-over o cat's life
actor_t *act = actor::find("HERO"); actor_t *act = actor::find("HERO");
act = actor::replaceWithTemplate(act, "EXPLOSION"); act = actor::replaceWithTemplate(act, "EXPLOSION");
actor_t *act2 = actor::createFromTemplate("EXPLOSION"); actor_t *act2 = actor::createFromTemplate("EXPLOSION");

View File

@@ -312,13 +312,18 @@ namespace modules
const int col1 = room::getColor(1); const int col1 = room::getColor(1);
const int col2 = room::getColor(2); const int col2 = room::getColor(2);
const int col3 = room::getColor(3); 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("hi", 4, 24, col3, FONT_ZOOM_NONE);
draw::print2("c", 10, 26, col3, FONT_ZOOM_NONE); draw::print2("no", 4, 25, col3, FONT_ZOOM_NONE);
draw::print2(actor::hero::getLives(), 2, 4, 26, col1, FONT_ZOOM_VERTICAL);
draw::print2("a", 9, 26, col1, FONT_ZOOM_NONE);
draw::print2("b", 12, 26, col2, FONT_ZOOM_NONE);
draw::print2("c", 15, 26, col3, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostJump(), 2, 3, 27, col3, FONT_ZOOM_NONE); draw::print2(actor::hero::getBoostJump(), 2, 8, 27, col3, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostGod()/2, 2, 6, 27, col1, FONT_ZOOM_NONE); draw::print2(actor::hero::getBoostGod()/2, 2, 11, 27, col1, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostRun()/2, 2, 9, 27, col2, FONT_ZOOM_NONE); draw::print2(actor::hero::getBoostRun()/2, 2, 14, 27, col2, FONT_ZOOM_NONE);
draw::stencil::enable(); draw::stencil::enable();
draw::stencil::clear(255); draw::stencil::clear(255);