- El heroi es independent de la recarrega

This commit is contained in:
2023-06-06 19:36:45 +02:00
parent 33d9573d8a
commit e75eae0c7e
2 changed files with 30 additions and 6 deletions

View File

@@ -7,7 +7,6 @@
#include "jui.h"
draw::surface *surf;
actor::actor_t *box;
int room_w = 2;
int room_h = 2;
int room_xp = -1;
@@ -28,15 +27,15 @@ void restart()
actor::setDirty(box, true);
*/
box = actor::create("BOX", {32,32,16}, {8,8,8}, {32,0,32,32}, {0,32});
actor::actor_t *box = actor::create("BOX", {32,32,16}, {8,8,8}, {32,0,32,32}, {0,32});
box->flags = FLAG_PUSHABLE | FLAG_GRAVITY;
box->movement = MOV_CW;
box->mov_push = PUSH_XN;
actor::setDirty(box, true);
box = actor::create("HERO", {16,32,8}, {8,8,12}, {0,32,20,32}, {-6,38});
box->flags = FLAG_HERO | FLAG_PUSHABLE | FLAG_GRAVITY | FLAG_ORIENTABLE | FLAG_ANIMATED;
actor::setDirty(box, true);
//box = actor::create("HERO", {16,32,8}, {8,8,12}, {0,32,20,32}, {-6,38});
//box->flags = FLAG_HERO | FLAG_PUSHABLE | FLAG_GRAVITY | FLAG_ORIENTABLE | FLAG_ANIMATED;
//actor::setDirty(box, true);
actor::reorder();
}
@@ -49,6 +48,10 @@ void game::init()
draw::loadPalette("test.gif");
game::setUpdateTicks(64);
actor::actor_t *hero = actor::create("HERO", {16,32,8}, {8,8,12}, {0,32,20,32}, {-6,38});
hero->flags = FLAG_HERO | FLAG_PUSHABLE | FLAG_GRAVITY | FLAG_ORIENTABLE | FLAG_ANIMATED;
actor::setDirty(hero, true);
restart();
}