- [FIX] No es podien crear habitacions noves amb el shortcut

- [FIX] Reposicionament de l'heroi al provar una habitacio amb l'editor (encara no va be)
- [FIX] MOV_RANDV no apareixia a l'editor
- [FIX] MOV_HUNT no nomes s'actualitza al tropeçar
- [FIX] MOV_HUNT petava el mame si l'heroi moria
- [NEW] Alguns gràfics més
- Zona 1 acabada
This commit is contained in:
2024-07-31 11:36:19 +02:00
parent aa8013082f
commit 1383378a19
9 changed files with 567 additions and 169 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -10,6 +10,7 @@ door-texture: 0
under-door-texture: 0
exit-xp: 2
exit-xn: 0
exit-yp: 6
actor{
name: CUADRO

View File

@@ -23,6 +23,19 @@ actor{
movement: Y
}
actor{
name: ROOMBA01
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 24 24 0
size: 8 8 2
orient: YP
flags: REACTIVE MOVING DEADLY
react-mask: XP XN YP YN ZP ZN
movement: Y
}
actor{
name: KALLAX-A
bmp: altres.gif
@@ -35,6 +48,30 @@ actor{
movement: CW
}
actor{
name: BOX
bmp: caixes.gif
bmp-rect: 32 0 32 32
bmp-offset: 0 32
pos: 56 16 0
size: 8 8 8
flags: PUSHABLE
movement: CW
}
actor{
name: ROOMBA02
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 40 32 0
size: 8 8 2
orient: YP
flags: REACTIVE MOVING DEADLY
react-mask: XP XN YP YN ZP ZN
movement: Y
}
actor{
name: KALLAX-A01
bmp: altres.gif
@@ -58,29 +95,3 @@ actor{
flags: ORIENTABLE
movement: CW
}
actor{
name: ROOMBA01
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 24 24 0
size: 8 8 2
orient: YP
flags: REACTIVE MOVING DEADLY
react-mask: XP XN YP YN ZP ZN
movement: Y
}
actor{
name: ROOMBA02
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 40 32 0
size: 8 8 2
orient: YP
flags: REACTIVE MOVING DEADLY
react-mask: XP XN YP YN ZP ZN
movement: Y
}

View File

@@ -8,16 +8,6 @@ door-texture: 0
under-door-texture: 0
exit-xp: 4
actor{
name: KALLAX-A
bmp: altres.gif
bmp-rect: 0 48 24 27
bmp-offset: 0 31
pos: 8 8 0
size: 8 4 8
movement: CW
}
actor{
name: FINESTRA
bmp: altres.gif
@@ -39,15 +29,12 @@ actor{
}
actor{
name: S-GLOVES
bmp: objectes.gif
bmp-rect: 165 45 28 22
bmp-offset: -3 24
pos: 8 20 0
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
name: KALLAX-A
bmp: altres.gif
bmp-rect: 0 48 24 27
bmp-offset: 0 31
pos: 8 8 0
size: 4 8 8
movement: CW
}
@@ -57,27 +44,7 @@ actor{
bmp-rect: 0 48 24 27
bmp-offset: 0 31
pos: 8 36 0
size: 8 4 8
movement: CW
}
actor{
name: KALLAX-A01
bmp: altres.gif
bmp-rect: 0 48 24 27
bmp-offset: 0 31
pos: 8 8 8
size: 8 4 8
movement: CW
}
actor{
name: KALLAX-A03
bmp: altres.gif
bmp-rect: 0 48 24 27
bmp-offset: 0 31
pos: 8 36 8
size: 8 4 8
size: 4 8 8
movement: CW
}
@@ -93,57 +60,6 @@ actor{
movement: CCW
}
actor{
name: ROOMBA
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 16 48 0
size: 8 8 2
orient: XP
flags: REACTIVE MOVING DEADLY
react-mask: XP XN YP YN ZP ZN
movement: CCW
}
actor{
name: GAT-NEGRE
bmp: gat.gif
bmp-rect: 0 0 24 28
bmp-offset: -4 32
pos: 16 48 2
size: 8 8 8
orient: XP
anim-wait: 2
flags: PUSHABLE REACTIVE DEADLY GRAVITY
react-mask: XP XN YP YN ZP ZN
movement: CCW
}
actor{
name: FINESTRA02
bmp: altres.gif
bmp-rect: 0 75 20 33
bmp-offset: 0 45
pos: 32 6 4
size: 0 1 9
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: FINESTRA03
bmp: altres.gif
bmp-rect: 0 75 20 33
bmp-offset: 0 45
pos: 39 6 4
size: 1 1 9
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: NEVERA104
bmp: caixes.gif
@@ -155,17 +71,6 @@ actor{
movement: CW
}
actor{
name: NEVERA103
bmp: caixes.gif
bmp-rect: 160 96 32 32
bmp-offset: 0 32
pos: 40 16 0
size: 8 8 8
orient: YP
movement: CW
}
actor{
name: NEVERA105
bmp: caixes.gif
@@ -177,16 +82,6 @@ actor{
movement: CW
}
actor{
name: NEVERA1
bmp: caixes.gif
bmp-rect: 160 96 32 32
bmp-offset: 0 32
pos: 40 24 0
size: 8 8 8
movement: CW
}
actor{
name: NEVERA106
bmp: caixes.gif
@@ -199,16 +94,51 @@ actor{
}
actor{
name: NEVERA101
bmp: caixes.gif
bmp-rect: 160 96 32 32
bmp-offset: 0 32
pos: 40 32 0
size: 8 8 8
orient: YP
name: KALLAX-A01
bmp: altres.gif
bmp-rect: 0 48 24 27
bmp-offset: 0 31
pos: 8 8 8
size: 4 8 8
movement: CW
}
actor{
name: P-PUMP
bmp: objectes.gif
bmp-rect: 70 64 22 32
bmp-offset: -5 41
pos: 8 10 16
size: 4 4 4
anim-cycle: SEQ
anim-wait: 2
flags: SPECIAL
movement: CW
}
actor{
name: KALLAX-A03
bmp: altres.gif
bmp-rect: 0 48 24 27
bmp-offset: 0 31
pos: 8 36 8
size: 4 8 8
movement: CW
}
actor{
name: ROOMBA
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 16 48 0
size: 8 8 2
orient: XP
flags: REACTIVE MOVING DEADLY
react-mask: XP XN YP YN ZP ZN
movement: CCW
}
actor{
name: NEVERA107
bmp: caixes.gif
@@ -220,17 +150,6 @@ actor{
movement: CW
}
actor{
name: NEVERA102
bmp: caixes.gif
bmp-rect: 160 96 32 32
bmp-offset: 0 32
pos: 40 40 0
size: 8 8 8
orient: YP
movement: CW
}
actor{
name: ROOMBA01
bmp: caixes.gif
@@ -244,6 +163,20 @@ actor{
movement: Y
}
actor{
name: GAT-NEGRE
bmp: gat.gif
bmp-rect: 0 0 24 28
bmp-offset: -4 32
pos: 16 48 2
size: 8 8 8
orient: XP
anim-wait: 2
flags: PUSHABLE REACTIVE DEADLY GRAVITY
react-mask: XP XN YP YN ZP ZN
movement: CCW
}
actor{
name: GAT-NEGRE01
bmp: gat2.gif
@@ -257,3 +190,46 @@ actor{
react-mask: XP XN YP YN ZP ZN
movement: Y
}
actor{
name: NEVERA103
bmp: caixes.gif
bmp-rect: 160 96 32 32
bmp-offset: 0 32
pos: 40 16 0
size: 8 8 8
orient: YP
movement: CW
}
actor{
name: NEVERA1
bmp: caixes.gif
bmp-rect: 160 96 32 32
bmp-offset: 0 32
pos: 40 24 0
size: 8 8 8
movement: CW
}
actor{
name: NEVERA101
bmp: caixes.gif
bmp-rect: 160 96 32 32
bmp-offset: 0 32
pos: 40 32 0
size: 8 8 8
orient: YP
movement: CW
}
actor{
name: NEVERA102
bmp: caixes.gif
bmp-rect: 160 96 32 32
bmp-offset: 0 32
pos: 40 40 0
size: 8 8 8
orient: YP
movement: CW
}

142
data/rooms/06.txt Normal file
View File

@@ -0,0 +1,142 @@
width: 2
height: 2
door-height-xp: 0
door-height-yn: 0
color: PURPLE
floor-texture: 3
wall-texture: 2
door-texture: 0
under-door-texture: 2
exit-xp: 7
exit-yn: 1
actor{
name: ROOMBA02
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 16 8 0
size: 8 8 2
orient: XN
flags: REACTIVE MOVING DEADLY
react-mask: XP XN YP YN ZP ZN
movement: CW
}
actor{
name: BOX
bmp: caixes.gif
bmp-rect: 32 0 32 32
bmp-offset: 0 32
pos: 16 16 0
size: 8 8 8
flags: PUSHABLE
movement: CW
}
actor{
name: BOX09
bmp: caixes.gif
bmp-rect: 0 0 32 32
bmp-offset: 0 32
pos: 16 24 0
size: 8 8 8
orient: YP
flags: PUSHABLE ORIENTABLE
movement: CCW
}
actor{
name: BOX08
bmp: caixes.gif
bmp-rect: 0 0 32 32
bmp-offset: 0 32
pos: 16 32 0
size: 8 8 8
flags: PUSHABLE
movement: CW
}
actor{
name: BOX02
bmp: caixes.gif
bmp-rect: 64 0 32 32
bmp-offset: 0 32
pos: 28 16 0
size: 8 8 8
flags: PUSHABLE
movement: CW
}
actor{
name: BOX03
bmp: caixes.gif
bmp-rect: 0 0 32 32
bmp-offset: 0 32
pos: 40 16 0
size: 8 8 8
flags: PUSHABLE
movement: CW
}
actor{
name: ROOMBA03
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 8 40 0
size: 8 8 2
orient: YP
flags: REACTIVE MOVING DEADLY
react-mask: XP XN YP YN ZP ZN
movement: CW
}
actor{
name: BOX06
bmp: caixes.gif
bmp-rect: 32 0 32 32
bmp-offset: 0 32
pos: 16 40 0
size: 8 8 8
flags: PUSHABLE
movement: CW
}
actor{
name: BOX11
bmp: caixes.gif
bmp-rect: 32 0 32 32
bmp-offset: 0 32
pos: 40 40 0
size: 8 8 8
orient: YP
flags: PUSHABLE
movement: CW
}
actor{
name: ROOMBA
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 40 48 0
size: 8 8 2
orient: XP
flags: REACTIVE MOVING DEADLY
react-mask: XP XN YP YN ZP ZN
movement: CW
}
actor{
name: ROOMBA01
bmp: caixes.gif
bmp-rect: 160 0 32 32
bmp-offset: 0 34
pos: 48 16 0
size: 8 8 2
orient: YN
flags: REACTIVE MOVING DEADLY
react-mask: XP XN YP YN ZP ZN
movement: CW
}

146
data/rooms/07.txt Normal file
View File

@@ -0,0 +1,146 @@
width: 2
height: 2
door-height-xn: 0
door-height-yp: 0
color: YELLOW
floor-texture: 3
wall-texture: 0
door-texture: 0
under-door-texture: 2
exit-xn: 6
exit-yp: 8
actor{
name: BOX
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 8 0
size: 8 8 8
movement: CW
}
actor{
name: BOX01
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 8 8
size: 8 8 8
movement: CW
}
actor{
name: BOX02
bmp: caixes.gif
bmp-rect: 96 128 32 32
bmp-offset: 0 32
pos: 8 8 16
size: 8 8 4
movement: CW
}
actor{
name: BOX05
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 48 0
size: 8 8 8
movement: CW
}
actor{
name: BOX08
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 8 48 8
size: 8 8 8
movement: CW
}
actor{
name: BOX10
bmp: caixes.gif
bmp-rect: 96 128 32 32
bmp-offset: 0 32
pos: 8 48 16
size: 8 8 4
movement: CW
}
actor{
name: BOX03
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 8 0
size: 8 8 8
movement: CW
}
actor{
name: BOX06
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 8 8
size: 8 8 8
movement: CW
}
actor{
name: BOX09
bmp: caixes.gif
bmp-rect: 96 128 32 32
bmp-offset: 0 32
pos: 48 8 16
size: 8 8 4
movement: CW
}
actor{
name: GAT-NEGRE
bmp: gat.gif
bmp-rect: 0 0 24 28
bmp-offset: -4 32
pos: 40 16 0
size: 8 8 8
orient: XP
anim-wait: 2
flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY
react-mask: XP XN YP YN ZP ZN
movement: HUNT
}
actor{
name: MESITA
bmp: caixes.gif
bmp-rect: 0 64 32 32
bmp-offset: 0 32
pos: 28 28 0
size: 8 8 4
flags: PUSHABLE
movement: CW
}
actor{
name: BOX04
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 48 0
size: 8 8 8
movement: CW
}
actor{
name: BOX07
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 48 48 8
size: 8 8 8
movement: CW
}

109
data/rooms/08.txt Normal file
View File

@@ -0,0 +1,109 @@
width: 0
height: 3
door-height-yn: 5
color: CYAN
floor-texture: 6
wall-texture: 0
door-texture: 0
under-door-texture: 0
exit-yn: 7
actor{
name: BOX
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 32 0 0
size: 8 8 8
movement: CW
}
actor{
name: BOX03
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 32 8 0
size: 8 8 8
movement: CW
}
actor{
name: BOX07
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 24 16 0
size: 8 8 8
movement: CW
}
actor{
name: BOX04
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 32 16 0
size: 8 8 8
movement: CW
}
actor{
name: BOX09
bmp: caixes.gif
bmp-rect: 128 128 32 32
bmp-offset: 0 32
pos: 24 24 0
size: 8 8 4
movement: CW
}
actor{
name: BOX08
bmp: caixes.gif
bmp-rect: 128 128 32 32
bmp-offset: 0 32
pos: 32 24 0
size: 8 8 4
movement: CW
}
actor{
name: BOX01
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 24 0 8
size: 8 8 8
movement: CW
}
actor{
name: BOX02
bmp: caixes.gif
bmp-rect: 64 64 32 32
bmp-offset: 0 32
pos: 32 0 8
size: 8 8 8
movement: CW
}
actor{
name: BOX06
bmp: caixes.gif
bmp-rect: 128 128 32 32
bmp-offset: 0 32
pos: 24 8 8
size: 8 8 4
movement: CW
}
actor{
name: BOX05
bmp: caixes.gif
bmp-rect: 128 128 32 32
bmp-offset: 0 32
pos: 32 8 8
size: 8 8 4
movement: CW
}

View File

@@ -709,10 +709,15 @@ namespace actor
break;
case MOV_HUNT:
actor_t *heroi = find("HERO");
if (heroi->pos.x < act->pos.x) act->mov_push=PUSH_XN;
if (heroi->pos.x > act->pos.x) act->mov_push=PUSH_XP;
if (heroi->pos.y < act->pos.y) act->mov_push=PUSH_YN;
if (heroi->pos.y > act->pos.y) act->mov_push=PUSH_YP;
if (heroi)
{
int tombola[2]; int tombola_pos = 0;
if (heroi->pos.x < act->pos.x) tombola[tombola_pos++]=PUSH_XN;
if (heroi->pos.x > act->pos.x) tombola[tombola_pos++]=PUSH_XP;
if (heroi->pos.y < act->pos.y) tombola[tombola_pos++]=PUSH_YN;
if (heroi->pos.y > act->pos.y) tombola[tombola_pos++]=PUSH_YP;
act->mov_push=tombola[rand()%tombola_pos];
}
break;
}
if (act->flags & FLAG_ORIENTABLE) act->orient = act->mov_push;
@@ -1006,7 +1011,10 @@ namespace actor
}
if (act->flags & FLAG_HERO) updateUserInput(act);
if (act->flags & FLAG_MOVING) updateMoving(act);
if (act->flags & FLAG_MOVING) {
if (act->movement==MOV_HUNT && ( (act->pos.x&7)==0 || (act->pos.y&7)==0) ) changeMoving(act);
updateMoving(act);
}
if (act->flags & FLAG_GRAVITY) act->push |= PUSH_ZN;
//if (act->flags & FLAG_PUSHABLE)

View File

@@ -393,27 +393,28 @@ namespace modules
if (mx>=0 && my>=0 && mx<320 && my<240) {
if (mx<32 && my<24) {
int room = room::editor::refExit(XN);
if (room>=0 || input::keyPressed(SDL_SCANCODE_LCTRL)) room::load(room, XP);
if (room>=0 || input::keyDown(SDL_SCANCODE_LCTRL)) room::load(room, XP);
}
if (mx>288 && my<24) {
int room = room::editor::refExit(YN);
if (room>=0 || input::keyPressed(SDL_SCANCODE_LCTRL)) room::load(room, YP);
if (room>=0 || input::keyDown(SDL_SCANCODE_LCTRL)) room::load(room, YP);
}
if (mx>288 && my>216) {
int room = room::editor::refExit(XP);
if (room>=0 || input::keyPressed(SDL_SCANCODE_LCTRL)) room::load(room, XN);
if (room>=0 || input::keyDown(SDL_SCANCODE_LCTRL)) room::load(room, XN);
}
if (mx<32 && my>216) {
int room = room::editor::refExit(YP);
if (room>=0 || input::keyPressed(SDL_SCANCODE_LCTRL)) room::load(room, YN);
if (room>=0 || input::keyDown(SDL_SCANCODE_LCTRL))
room::load(room, YN);
}
if (mx>144 && mx<176 && my<24) {
int room = room::editor::refExit(ZP);
if (room>=0 || input::keyPressed(SDL_SCANCODE_LCTRL)) room::load(room, ZN);
if (room>=0 || input::keyDown(SDL_SCANCODE_LCTRL)) room::load(room, ZN);
}
if (mx>144 && mx<176 && my>216) {
int room = room::editor::refExit(ZN);
if (room>=0 || input::keyPressed(SDL_SCANCODE_LCTRL)) room::load(room, ZP);
if (room>=0 || input::keyDown(SDL_SCANCODE_LCTRL)) room::load(room, ZP);
}
}
}
@@ -557,7 +558,11 @@ namespace modules
if (ui::button("EDITING", 2, 2, 96, 11, editor::isEditing()))
{
room::load(room::editor::getCurrentRoom());
if (!editor::isEditing()) actor::find("HERO")->pos.z=24;
if (!editor::isEditing())
{
actor::actor_t *hero = actor::find("HERO");
hero->pos.x = hero->pos.y = 32; hero->pos.z = 0;
}
editor::setEditing(!editor::isEditing());
}
@@ -733,7 +738,7 @@ namespace modules
}
line+=10;
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_RANDV, MOV_HUNT}, {"NONE", "X", "Y", "Z", "CW", "CCW", "RAND", "RANDV", "HUNT"}, 48);
line+=10;
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;