- [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:
2024-07-01 12:42:54 +02:00
parent 69c1424e34
commit e6539f4989
8 changed files with 37 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -13,11 +13,12 @@ exit-zp: 0
actor{ actor{
name: BARREL name: BARREL
bmp: caixes.gif bmp: objectes.gif
bmp-rect: 96 64 32 32 bmp-rect: 0 0 24 32
bmp-offset: 0 32 bmp-offset: 0 32
pos: 32 32 0 pos: 8 16 0
size: 8 8 8 size: 8 8 8
flags: PUSHABLE GRAVITY anim-wait: 4
flags: PUSHABLE ANIMATED GRAVITY
movement: CW movement: CW
} }

View File

@@ -31,3 +31,17 @@ actor{
flags: PUSHABLE GRAVITY flags: PUSHABLE GRAVITY
movement: CW movement: CW
} }
actor{
name: CONVEYOR
bmp: caixes.gif
bmp-rect: 0 144 32 32
bmp-offset: 0 32
pos: 16 48 0
size: 8 8 4
anim-cycle: MIN
flags: REACTIVE ANIMATED
react-mask: ZN
react-push: XP
movement: CW
}

View File

@@ -9,9 +9,10 @@
namespace actor namespace actor
{ {
uint8_t anims[2][4] = { uint8_t anims[3][4] = {
{0, 1, 0, 2}, {0, 1, 0, 2},
{0, 1, 2, 3} {0, 1, 2, 3},
{0, 1, 2, 0}
}; };
actor_t *first = nullptr; actor_t *first = nullptr;
@@ -130,7 +131,7 @@ namespace actor
} else if (util::strcomp(key, "movement:")) { } 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}); 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:")) { } 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:")) { } else if (util::strcomp(key, "anim-wait:")) {
t->anim_wait = file::readInt(buffer); t->anim_wait = file::readInt(buffer);
} else if (util::strcomp(key, "flags:")) { } 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, " 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); 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->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->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->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)); 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) { if (act->anim_wait_count==act->anim_wait) {
act->anim_frame=(act->anim_frame+1)%4; 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; act->anim_wait_count=0;
} else { } else {
act->anim_wait_count++; act->anim_wait_count++;

View File

@@ -2,6 +2,7 @@
#include "jdraw.h" #include "jdraw.h"
#include "jinput.h" #include "jinput.h"
#include <string.h> #include <string.h>
#include <SDL2/SDL.h>
namespace ui namespace ui
{ {
@@ -133,7 +134,10 @@ namespace ui
{ {
draw::color(PAPER); draw::color(PAPER);
draw::rect(x+1, y+1, w-2, h-2); 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(1)) return 1;
//if (input::mouseClk(3)) return 3; //if (input::mouseClk(3)) return 3;
} }

View File

@@ -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); 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; 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; line+=10;
//draw::print("ANIM SPEED:", 2, 156, 15, 0); //draw::print("ANIM SPEED:", 2, 156, 15, 0);

View File

@@ -8,10 +8,10 @@ x Gràfics de tele
x Gràfics de armari x Gràfics de armari
x Gràfics de taula x Gràfics de taula
x Grafics de cadires x Grafics de cadires
- Gràfics de conveyor belt x Gràfics de conveyor belt
x Gràfics de consoles i comps x Gràfics de consoles i comps
x Gràfics de nevera x Gràfics de nevera
- Gràfics de bancada de cuina x Gràfics de bancada de cuina
- Gràfics de sofà? - Gràfics de sofà?
- Gràfics de Plantes, arbres... - Gràfics de Plantes, arbres...
@@ -22,10 +22,10 @@ x Gràfics de nevera
x Guants: permet espentar objectes x Guants: permet espentar objectes
- Boosters: - Boosters:
- Més rapid x Més rapid
- Immune x Immune
- Bot més llarg x Bot més llarg
- Bot més alt x Bot més alt
- Decidir parts de la piscina - Decidir parts de la piscina
x Bomba x Bomba