diff --git a/data/abad.gif b/data/abad.gif new file mode 100644 index 0000000..33a8c4c Binary files /dev/null and b/data/abad.gif differ diff --git a/data/gat.gif b/data/gat.gif new file mode 100644 index 0000000..80a9b71 Binary files /dev/null and b/data/gat.gif differ diff --git a/data/obrer.gif b/data/obrer.gif index 8819731..adaf0bb 100644 Binary files a/data/obrer.gif and b/data/obrer.gif differ diff --git a/source/actor.cpp b/source/actor.cpp index 1802e17..f3b4237 100644 --- a/source/actor.cpp +++ b/source/actor.cpp @@ -111,10 +111,15 @@ namespace actor else if (act2->pos.z >= act1->pos.z+act1->size.z) { return false; } else { return false; } } - +int peiv = 0; void reorder() { - anim_frame=(anim_frame+1)%4; + // [TODO] QUE LA VELOCITAT DE ANIMACIÓ SIGA CONFIGURABLE + //if (peiv==2) { + anim_frame=(anim_frame+1)%4; + // peiv=0; + //} peiv++; + while (dirty) { if (first) diff --git a/source/main.cpp b/source/main.cpp index 34b388a..d33efa7 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -56,7 +56,7 @@ void game::init() game::setUpdateTicks(64); //actor::actor_t *hero = actor::create("HERO", {16,32,8}, {8,8,12}, "test.gif", {0,32,20,32}, {-6,38}); - actor::actor_t *hero = actor::create("HERO", {16,32,8}, {8,8,12}, "obrer.gif", {0,0,24,32}, {-6,38}); + actor::actor_t *hero = actor::create("HERO", {16,32,8}, {8,8,12}, "abad.gif", {0,0,20,35}, {-6,32}); hero->flags = FLAG_HERO | FLAG_PUSHABLE | FLAG_GRAVITY | FLAG_ORIENTABLE | FLAG_ANIMATED; actor::setDirty(hero, true);