- [NEW] Nou cicle d'animació de 3 frames (0,1,2)
- [CHG] Retocades parts per a ajustar-se al cycle WALK - [NEW] Gràfics de bancada de cuina - [NEW] Gràfics de conveyor belt - [NEW] Gràfics dels boosters - [NEW] Amb ctrl es pot pasar camps numerics de 32 en 32.
This commit is contained in:
@@ -9,9 +9,10 @@
|
||||
|
||||
namespace actor
|
||||
{
|
||||
uint8_t anims[2][4] = {
|
||||
uint8_t anims[3][4] = {
|
||||
{0, 1, 0, 2},
|
||||
{0, 1, 2, 3}
|
||||
{0, 1, 2, 3},
|
||||
{0, 1, 2, 0}
|
||||
};
|
||||
|
||||
actor_t *first = nullptr;
|
||||
@@ -130,7 +131,7 @@ namespace actor
|
||||
} else if (util::strcomp(key, "movement:")) {
|
||||
t->movement = util::stringToInt(file::readString(buffer), {"none", "x", "y", "z", "cw", "ccw", "rand", "hunt"},{MOV_NONE, MOV_X, MOV_Y, MOV_Z, MOV_CW, MOV_CCW, MOV_RAND, MOV_HUNT});
|
||||
} else if (util::strcomp(key, "anim-cycle:")) {
|
||||
t->anim_cycle = util::stringToInt(file::readString(buffer), {"walk", "seq"},{0, 1});
|
||||
t->anim_cycle = util::stringToInt(file::readString(buffer), {"walk", "seq", "min"},{0, 1, 2});
|
||||
} else if (util::strcomp(key, "anim-wait:")) {
|
||||
t->anim_wait = file::readInt(buffer);
|
||||
} else if (util::strcomp(key, "flags:")) {
|
||||
@@ -256,7 +257,7 @@ namespace actor
|
||||
fprintf(f, " pos: %i %i %i\n", act->pos.x, act->pos.y, act->pos.z);
|
||||
fprintf(f, " size: %i %i %i\n", act->size.x, act->size.y, act->size.z);
|
||||
if (act->orient!=0) fprintf(f, " orient: %s\n", numToOrient(act->orient));
|
||||
if (act->anim_cycle!=0) fprintf(f, " anim-cycle: %s\n", act->anim_cycle==0 ? "WALK" : "SEQ");
|
||||
if (act->anim_cycle!=0) fprintf(f, " anim-cycle: %s\n", act->anim_cycle==0 ? "WALK" : act->anim_cycle==1 ? "SEQ" : "MIN");
|
||||
if (act->anim_wait!=0) fprintf(f, " anim-wait: %i\n", act->anim_wait);
|
||||
if (act->flags!=0) fprintf(f, " flags: %s\n", numToFlags(act->flags));
|
||||
if (act->react_mask!=0) fprintf(f, " react-mask: %s\n", numToOrient(act->react_mask));
|
||||
@@ -891,6 +892,7 @@ namespace actor
|
||||
|
||||
if (act->anim_wait_count==act->anim_wait) {
|
||||
act->anim_frame=(act->anim_frame+1)%4;
|
||||
if (act->anim_cycle==2 && act->anim_frame==3) act->anim_frame=0;
|
||||
act->anim_wait_count=0;
|
||||
} else {
|
||||
act->anim_wait_count++;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "jdraw.h"
|
||||
#include "jinput.h"
|
||||
#include <string.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
namespace ui
|
||||
{
|
||||
@@ -133,7 +134,10 @@ namespace ui
|
||||
{
|
||||
draw::color(PAPER);
|
||||
draw::rect(x+1, y+1, w-2, h-2);
|
||||
return input::mouseWheel();
|
||||
if (input::keyDown(SDL_SCANCODE_LCTRL))
|
||||
return input::mouseWheel()*32;
|
||||
else
|
||||
return input::mouseWheel();
|
||||
//if (input::mouseClk(1)) return 1;
|
||||
//if (input::mouseClk(3)) return 3;
|
||||
}
|
||||
|
||||
@@ -692,7 +692,7 @@ switch (section)
|
||||
|
||||
changed |= btn_opt("MOVEMNT", 2, line, act->movement, {MOV_NONE, MOV_X, MOV_Y, MOV_Z, MOV_CW, MOV_CCW, MOV_RAND, MOV_HUNT}, {"NONE", "X", "Y", "Z", "CW", "CCW", "RAND", "HUNT"}, 48);
|
||||
line+=10;
|
||||
changed |= btn_opt("ANIMCYC", 2, line, act->anim_cycle, {0, 1}, {"0 1 0 2", "0 1 2 3"}, 48);
|
||||
changed |= btn_opt("ANIMCYC", 2, line, act->anim_cycle, {0, 1, 2}, {"0 1 0 2", "0 1 2 3", "0 1 2"}, 48);
|
||||
line+=10;
|
||||
|
||||
//draw::print("ANIM SPEED:", 2, 156, 15, 0);
|
||||
|
||||
Reference in New Issue
Block a user