Compare commits
2 Commits
eb86874244
...
5a22961c47
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a22961c47 | |||
| 15ca066e9b |
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace actor
|
||||
int value = 0;
|
||||
while (str)
|
||||
{
|
||||
value |= util::stringToInt(str, { "none", "hero", "pushable", "reactive", "moving", "animated", "orientable", "deadly", "gravity", "pickable", "special", "noeditor", "inertia" },{ FLAG_NONE, FLAG_HERO, FLAG_PUSHABLE, FLAG_REACTIVE, FLAG_MOVING, FLAG_ANIMATED, FLAG_ORIENTABLE, FLAG_DEADLY, FLAG_GRAVITY, FLAG_PICKABLE, FLAG_SPECIAL, FLAG_NOEDITOR, FLAG_INERTIA });
|
||||
value |= util::stringToInt(str, { "none", "hero", "pushable", "reactive", "moving", "animated", "orientable", "deadly", "gravity", "pickable", "special", "noeditor", "inertia", "disappear" },{ FLAG_NONE, FLAG_HERO, FLAG_PUSHABLE, FLAG_REACTIVE, FLAG_MOVING, FLAG_ANIMATED, FLAG_ORIENTABLE, FLAG_DEADLY, FLAG_GRAVITY, FLAG_PICKABLE, FLAG_SPECIAL, FLAG_NOEDITOR, FLAG_INERTIA, FLAG_DISAPPEAR });
|
||||
str = file::readString(buffer, true);
|
||||
}
|
||||
t->flags = value;
|
||||
@@ -268,6 +268,7 @@ namespace actor
|
||||
if (value & FLAG_GRAVITY) strcat(tmp, "GRAVITY ");
|
||||
if (value & FLAG_SPECIAL) strcat(tmp, "SPECIAL ");
|
||||
if (value & FLAG_INERTIA) strcat(tmp, "INERTIA ");
|
||||
if (value & FLAG_DISAPPEAR) strcat(tmp, "DISAPPEAR ");
|
||||
return tmp;
|
||||
}
|
||||
|
||||
@@ -515,7 +516,7 @@ namespace actor
|
||||
uint8_t push(actor_t *source, actor_t *act, uint8_t push)
|
||||
{
|
||||
uint8_t result = 0;
|
||||
if ( (act->flags & FLAG_PUSHABLE) && ( !(source->flags&FLAG_HERO) || (hero::getSkills()&SKILL_GLOVES) ) ) act->push |= push;
|
||||
if ( (act->flags & FLAG_PUSHABLE) && ( !(source->flags&FLAG_HERO) || (hero::getSkills()&SKILL_GLOVES) || (push == PUSH_ZN) ) ) act->push |= push;
|
||||
if ( (act->flags & FLAG_REACTIVE) && (act->react_mask & push) )
|
||||
{
|
||||
if (act->flags & FLAG_DEADLY)
|
||||
@@ -523,6 +524,12 @@ namespace actor
|
||||
else
|
||||
result = act->react_push;
|
||||
}
|
||||
if (act->flags & FLAG_DISAPPEAR)
|
||||
{
|
||||
act = actor::replaceWithTemplate(act, "EXPLOSION");
|
||||
act->name[0]='_';
|
||||
}
|
||||
|
||||
if (source->flags & FLAG_DEADLY) {
|
||||
result |= PUSH_KILL;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define FLAG_SPECIAL 512 // Especial (habilitats, poders temporals i parts de l'excavadora)
|
||||
#define FLAG_NOEDITOR 1024 // No es seleccionable a l'editor (son les portes)
|
||||
#define FLAG_INERTIA 2048 // Al rebre una espenta, continua fins tropesar en algo
|
||||
#define FLAG_DISAPPEAR 4096 // Al tocar-lo, desapareix
|
||||
|
||||
#define FLAG_SENSIBLE 6 // PUSHABLE or REACTIVE
|
||||
#define FLAG_IGNORE 1025 // HERO or NOEDITOR
|
||||
|
||||
@@ -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()
|
||||
@@ -781,6 +804,7 @@ namespace modules
|
||||
line+=10;
|
||||
|
||||
ui::label("FLAGS", 2, line, 96, 11, GRAY);
|
||||
changed |= btn_check(26, line, "DISA", act->flags, FLAG_DISAPPEAR);
|
||||
changed |= btn_check(50, line, "INER", act->flags, FLAG_INERTIA);
|
||||
changed |= btn_check(74, line, "SPEC", act->flags, FLAG_SPECIAL);
|
||||
line+=10;
|
||||
|
||||
Reference in New Issue
Block a user