NEW] Amb ALT es pot moure un actor fora dels limits de l'habitació.

- Més habitacions
This commit is contained in:
2024-09-24 11:26:51 +02:00
parent 15ca066e9b
commit 5a22961c47
6 changed files with 267 additions and 22 deletions

View File

@@ -8,6 +8,50 @@ door-texture: 1
under-door-texture: 0
exit-yp: 10
actor{
name: FINESTRA-00
bmp: altres.gif
bmp-rect: 0 75 20 33
bmp-offset: 0 39
pos: -1 36 4
size: 1 1 9
movement: CW
}
actor{
name: FINESTRA-01
bmp: altres.gif
bmp-rect: 0 75 20 33
bmp-offset: 0 39
pos: -1 44 4
size: 1 1 9
movement: CW
}
actor{
name: FINESTRA-02
bmp: altres.gif
bmp-rect: 0 75 20 33
bmp-offset: 0 39
pos: 48 2 5
size: 1 1 9
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: FINESTRA-03
bmp: altres.gif
bmp-rect: 0 75 20 33
bmp-offset: 0 39
pos: 40 2 5
size: 1 1 9
orient: YP
flags: ORIENTABLE
movement: CW
}
actor{
name: GAT-BATMAN
bmp: gat.gif

View File

@@ -1,13 +1,158 @@
width: 2
height: 2
door-height-xp: 0
door-height-xn: 0
width: 3
height: 1
door-height-xp: 5
door-height-xn: 5
door-height-yn: 0
color: GREEN
floor-texture: 3
floor-texture: 0
wall-texture: 3
door-texture: 1
under-door-texture: 3
exit-xp: 13
exit-xn: 9
exit-yn: 15
actor{
name: ABAD
bmp: abad.gif
bmp-rect: 0 0 20 33
bmp-offset: -6 38
pos: 0 40 0
size: 8 8 8
orient: XP
anim-wait: 1
flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY
react-mask: XP XN YP YN ZP ZN
movement: X
}
actor{
name: BATMAN
bmp: batman.gif
bmp-rect: 0 0 21 32
bmp-offset: -5 35
pos: 56 40 0
size: 8 8 8
orient: XN
anim-wait: 1
flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY
react-mask: XP XN YP YN ZP ZN
movement: X
}
actor{
name: BOX-A-00
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 0 24 16
size: 8 8 4
movement: CW
}
actor{
name: BOX-A-01
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 8 28 16
size: 8 8 4
flags: PUSHABLE
movement: CW
}
actor{
name: BOX-A-02
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 16 28 16
size: 8 8 4
flags: PUSHABLE
movement: CW
}
actor{
name: BOX-A-03
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 24 28 16
size: 8 8 4
flags: PUSHABLE
movement: CW
}
actor{
name: BOX-A-04
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 32 28 16
size: 8 8 4
flags: DISAPPEAR
movement: CW
}
actor{
name: BOX-A-05
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 40 28 16
size: 8 8 4
flags: PUSHABLE
movement: CW
}
actor{
name: BOX-A-06
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 48 28 16
size: 8 8 4
flags: PUSHABLE
movement: CW
}
actor{
name: BOX-A-07
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 56 24 16
size: 8 8 4
movement: CW
}
actor{
name: BOX-A-08
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 0 32 16
size: 8 8 4
movement: CW
}
actor{
name: BOX-A-09
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 56 32 16
size: 8 8 4
movement: CW
}
actor{
name: PILOTA
bmp: altres.gif
bmp-rect: 0 108 21 21
bmp-offset: -6 26
pos: 40 40 0
size: 8 8 8
flags: PUSHABLE INERTIA
movement: CW
}

View File

@@ -1,13 +1,24 @@
width: 2
height: 2
width: 1
height: 3
door-height-xp: 0
door-height-yp: 0
door-height-yn: 0
door-height-yn: 3
color: YELLOW
floor-texture: 0
wall-texture: 0
door-texture: 0
under-door-texture: 0
floor-texture: 6
wall-texture: 3
door-texture: 1
under-door-texture: 3
exit-xp: 14
exit-yp: 12
exit-yn: 16
actor{
name: PILOTA
bmp: altres.gif
bmp-rect: 0 108 21 21
bmp-offset: -6 26
pos: 24 32 0
size: 8 8 8
flags: PUSHABLE INERTIA
movement: CW
}

View File

@@ -2,14 +2,14 @@ width: 3
height: 1
door-height-yp: 0
color: PURPLE
floor-texture: 0
wall-texture: 0
door-texture: 0
floor-texture: 4
wall-texture: 1
door-texture: 2
under-door-texture: 0
exit-yp: 15
actor{
name: BOX-A
name: BOX-A-00
bmp: caixes.gif
bmp-rect: 0 0 32 32
bmp-offset: 0 32
@@ -19,6 +19,17 @@ actor{
movement: CW
}
actor{
name: BOX-A-01
bmp: caixes.gif
bmp-rect: 0 0 32 32
bmp-offset: 0 32
pos: 0 40 0
size: 8 8 8
flags: PUSHABLE
movement: CW
}
actor{
name: BOX-B
bmp: caixes.gif

View File

@@ -152,6 +152,17 @@ category{
movement: CW
}
actor{
name: PILOTA
bmp: altres.gif
bmp-rect: 0 108 21 21
bmp-offset: -6 26
pos: 24 32 0
size: 8 8 8
flags: PUSHABLE INERTIA
movement: CW
}
}
category{

View File

@@ -244,12 +244,35 @@ namespace modules
vec3_t min = room::getMin();
vec3_t max = room::getMax();
if ( input::keyDown(SDL_SCANCODE_LEFT) && selected->pos.x>min.x ) { selected->pos.x-=adv; actor::setDirty(selected); room::editor::modify(); }
if ( input::keyDown(SDL_SCANCODE_RIGHT) && (selected->pos.x+selected->size.x)<max.x ) { selected->pos.x+=adv; actor::setDirty(selected); room::editor::modify(); }
if ( input::keyDown(SDL_SCANCODE_UP) && selected->pos.y>min.y ) { selected->pos.y-=adv; actor::setDirty(selected); room::editor::modify(); }
if ( input::keyDown(SDL_SCANCODE_DOWN) && (selected->pos.y+selected->size.y)<max.y ) { selected->pos.y+=adv; actor::setDirty(selected); room::editor::modify(); }
if ( input::keyDown(SDL_SCANCODE_PAGEDOWN) && selected->pos.z>min.z ) { selected->pos.z-=adv; actor::setDirty(selected); room::editor::modify(); }
if ( input::keyDown(SDL_SCANCODE_PAGEUP) /*&& selected->pos.z<max.z*/ ) { selected->pos.z+=adv; actor::setDirty(selected); room::editor::modify(); }
if ( input::keyDown(SDL_SCANCODE_LEFT) && (input::keyDown(SDL_SCANCODE_LALT) || selected->pos.x>min.x ))
{
selected->pos.x-=adv; actor::setDirty(selected); room::editor::modify();
}
if ( input::keyDown(SDL_SCANCODE_RIGHT) && (input::keyDown(SDL_SCANCODE_LALT) || (selected->pos.x+selected->size.x)<max.x ))
{
selected->pos.x+=adv; actor::setDirty(selected); room::editor::modify();
}
if ( input::keyDown(SDL_SCANCODE_UP) && (input::keyDown(SDL_SCANCODE_LALT) || selected->pos.y>min.y ))
{
selected->pos.y-=adv; actor::setDirty(selected); room::editor::modify();
}
if ( input::keyDown(SDL_SCANCODE_DOWN) && (input::keyDown(SDL_SCANCODE_LALT) || (selected->pos.y+selected->size.y)<max.y ))
{
selected->pos.y+=adv; actor::setDirty(selected); room::editor::modify();
}
if ( input::keyDown(SDL_SCANCODE_PAGEDOWN) && (input::keyDown(SDL_SCANCODE_LALT) || selected->pos.z>min.z ))
{
selected->pos.z-=adv; actor::setDirty(selected); room::editor::modify();
}
if ( input::keyDown(SDL_SCANCODE_PAGEUP) /*&& selected->pos.z<max.z*/ )
{
selected->pos.z+=adv; actor::setDirty(selected); room::editor::modify();
}
}
int loop()