- [FIX] Els boosts tornaven a apareixer
- [FIX] Molts objectes que debien no tenien activada la gravetat - [FIX] El objecte pickat es pintava en coordenades rares depenent de la Z original - [FIX] Al soltar un objecte se podia quedar enganxat en XP o YP
This commit is contained in:
@@ -71,7 +71,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 14 24 0
|
pos: 14 24 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 13 16 0
|
pos: 13 16 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 24 32 0
|
pos: 24 32 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 19 40 0
|
pos: 19 40 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 56 16 0
|
pos: 56 16 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 16 16 0
|
pos: 16 16 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 28 16 0
|
pos: 28 16 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 40 16 0
|
pos: 40 16 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ actor{
|
|||||||
pos: 16 24 0
|
pos: 16 24 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
orient: YP
|
orient: YP
|
||||||
flags: PUSHABLE ORIENTABLE
|
flags: PICKABLE PUSHABLE ORIENTABLE GRAVITY
|
||||||
movement: CCW
|
movement: CCW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 16 32 0
|
pos: 16 32 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 16 40 0
|
pos: 16 40 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ actor{
|
|||||||
pos: 40 40 0
|
pos: 40 40 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
orient: YP
|
orient: YP
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -332,6 +332,7 @@ actor{
|
|||||||
pos: 40 32 0
|
pos: 40 32 0
|
||||||
size: 8 8 4
|
size: 8 8 4
|
||||||
orient: ZP
|
orient: ZP
|
||||||
|
flags: DISAPPEAR
|
||||||
movement: Z
|
movement: Z
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,17 +9,6 @@ under-door-texture: 0
|
|||||||
exit-yp: 15
|
exit-yp: 15
|
||||||
editor-done: 1
|
editor-done: 1
|
||||||
|
|
||||||
actor{
|
|
||||||
name: BOX-A-00
|
|
||||||
bmp: caixes.gif
|
|
||||||
bmp-rect: 0 0 32 32
|
|
||||||
bmp-offset: 0 32
|
|
||||||
pos: 25 24 0
|
|
||||||
size: 8 8 8
|
|
||||||
flags: PICKABLE PUSHABLE
|
|
||||||
movement: CW
|
|
||||||
}
|
|
||||||
|
|
||||||
actor{
|
actor{
|
||||||
name: BOX-A-01
|
name: BOX-A-01
|
||||||
bmp: caixes.gif
|
bmp: caixes.gif
|
||||||
@@ -27,18 +16,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 0 40 0
|
pos: 0 40 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
|
||||||
}
|
|
||||||
|
|
||||||
actor{
|
|
||||||
name: BOX-B
|
|
||||||
bmp: caixes.gif
|
|
||||||
bmp-rect: 32 0 32 32
|
|
||||||
bmp-offset: 0 32
|
|
||||||
pos: 40 35 0
|
|
||||||
size: 8 8 8
|
|
||||||
flags: PICKABLE PUSHABLE
|
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,8 +98,9 @@ actor{
|
|||||||
bmp: altres.gif
|
bmp: altres.gif
|
||||||
bmp-rect: 21 101 26 24
|
bmp-rect: 21 101 26 24
|
||||||
bmp-offset: -6 27
|
bmp-offset: -6 27
|
||||||
pos: 56 16 0
|
pos: 56 17 0
|
||||||
size: 8 5 6
|
size: 8 5 6
|
||||||
|
flags: PUSHABLE
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 32 40 0
|
pos: 32 40 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PICKABLE PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ actor{
|
|||||||
pos: 8 9 8
|
pos: 8 9 8
|
||||||
size: 8 6 2
|
size: 8 6 2
|
||||||
orient: YP
|
orient: YP
|
||||||
flags: PUSHABLE ORIENTABLE
|
flags: PICKABLE PUSHABLE ORIENTABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ actor{
|
|||||||
pos: 16 32 0
|
pos: 16 32 0
|
||||||
size: 6 5 8
|
size: 6 5 8
|
||||||
orient: YP
|
orient: YP
|
||||||
|
flags: PUSHABLE
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,3 +12,25 @@ exit-xn: 31
|
|||||||
exit-yp: 28
|
exit-yp: 28
|
||||||
exit-yn: 30
|
exit-yn: 30
|
||||||
editor-done: 1
|
editor-done: 1
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: CUADRO-00
|
||||||
|
bmp: altres.gif
|
||||||
|
bmp-rect: 66 75 18 32
|
||||||
|
bmp-offset: 0 39
|
||||||
|
pos: 23 8 6
|
||||||
|
size: 1 1 9
|
||||||
|
orient: YP
|
||||||
|
movement: CW
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: CUADRO-01
|
||||||
|
bmp: altres.gif
|
||||||
|
bmp-rect: 102 75 18 32
|
||||||
|
bmp-offset: 0 39
|
||||||
|
pos: 23 48 6
|
||||||
|
size: 1 1 9
|
||||||
|
orient: YP
|
||||||
|
movement: CW
|
||||||
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 26 29 0
|
pos: 26 29 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PICKABLE PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 8 8 8
|
pos: 8 8 8
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PICKABLE PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ actor{
|
|||||||
bmp-offset: 0 32
|
bmp-offset: 0 32
|
||||||
pos: 32 32 0
|
pos: 32 32 0
|
||||||
size: 8 8 8
|
size: 8 8 8
|
||||||
flags: PICKABLE PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ actor{
|
|||||||
bmp-offset: -2 33
|
bmp-offset: -2 33
|
||||||
pos: 32 16 4
|
pos: 32 16 4
|
||||||
size: 8 7 6
|
size: 8 7 6
|
||||||
flags: PICKABLE PUSHABLE
|
flags: PICKABLE PUSHABLE GRAVITY
|
||||||
movement: CW
|
movement: CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -369,6 +369,18 @@ namespace actor
|
|||||||
(obj1->pos.y + obj1->size.y > obj2->pos.y );
|
(obj1->pos.y + obj1->size.y > obj2->pos.y );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool does_collide(actor_t *obj1)
|
||||||
|
{
|
||||||
|
actor_t *obj2 = first;
|
||||||
|
actor_t *hero = find("HERO");
|
||||||
|
while (obj2)
|
||||||
|
{
|
||||||
|
if (obj2 != hero && obj1 != obj2 && check_2d_collision(obj1, obj2)) return true;
|
||||||
|
obj2 = obj2->next;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const bool is_above(actor_t *obj1, actor_t *obj2)
|
const bool is_above(actor_t *obj1, actor_t *obj2)
|
||||||
{
|
{
|
||||||
return check_2d_collision(obj1, obj2) && (obj1->pos.z==obj2->pos.z+obj2->size.z);
|
return check_2d_collision(obj1, obj2) && (obj1->pos.z==obj2->pos.z+obj2->size.z);
|
||||||
@@ -647,6 +659,14 @@ namespace actor
|
|||||||
picked->pos.x = act->pos.x; if (picked->pos.x + picked->size.x > room::getMax().x) picked->pos.x = room::getMax().x - picked->size.x;
|
picked->pos.x = act->pos.x; if (picked->pos.x + picked->size.x > room::getMax().x) picked->pos.x = room::getMax().x - picked->size.x;
|
||||||
picked->pos.y = act->pos.y; if (picked->pos.y + picked->size.y > room::getMax().y) picked->pos.y = room::getMax().y - picked->size.y;
|
picked->pos.y = act->pos.y; if (picked->pos.y + picked->size.y > room::getMax().y) picked->pos.y = room::getMax().y - picked->size.y;
|
||||||
picked->pos.z = act->pos.z;
|
picked->pos.z = act->pos.z;
|
||||||
|
if (does_collide(picked))
|
||||||
|
{
|
||||||
|
picked->pos.x-=2;
|
||||||
|
if (does_collide(picked))
|
||||||
|
{
|
||||||
|
picked->pos.x+=2; picked->pos.y-=2;
|
||||||
|
}
|
||||||
|
}
|
||||||
act->pos.z += picked->size.z;
|
act->pos.z += picked->size.z;
|
||||||
actor::actor_t *above = act->above;
|
actor::actor_t *above = act->above;
|
||||||
while (above) { above->pos.z += picked->size.z; above = above->above; }
|
while (above) { above->pos.z += picked->size.z; above = above->above; }
|
||||||
@@ -663,7 +683,7 @@ namespace actor
|
|||||||
}
|
}
|
||||||
else if (act->below && act->below->flags&FLAG_PICKABLE)
|
else if (act->below && act->below->flags&FLAG_PICKABLE)
|
||||||
{
|
{
|
||||||
const int height = act->below->size.z;
|
//const int height = act->below->size.z;
|
||||||
pick(act->below);
|
pick(act->below);
|
||||||
//if (!(( input::keyDown(SDL_SCANCODE_SPACE) || input::keyDown(config::getKey(KEY_JUMP)) ) && (hero::getSkills()&SKILL_SHOES) && (act->pos.y+act->size.y)<=max.y && act->pos.y>=min.y && (act->pos.x+act->size.x)<=max.x && act->pos.x>=min.x && act->react_mask==0 && (act->pos.z==0 || act->below)))
|
//if (!(( input::keyDown(SDL_SCANCODE_SPACE) || input::keyDown(config::getKey(KEY_JUMP)) ) && (hero::getSkills()&SKILL_SHOES) && (act->pos.y+act->size.y)<=max.y && act->pos.y>=min.y && (act->pos.x+act->size.x)<=max.x && act->pos.x>=min.x && act->react_mask==0 && (act->pos.z==0 || act->below)))
|
||||||
// act->pos.z -= height;
|
// act->pos.z -= height;
|
||||||
@@ -1320,8 +1340,9 @@ namespace actor
|
|||||||
if (act->next) act->next->prev = act->prev;
|
if (act->next) act->next->prev = act->prev;
|
||||||
if (act==selected) selected = nullptr;
|
if (act==selected) selected = nullptr;
|
||||||
picked = act;
|
picked = act;
|
||||||
picked->pos.x=26;
|
picked->pos.x=24;
|
||||||
picked->pos.y=84;
|
picked->pos.y=80;
|
||||||
|
picked->pos.z=0;
|
||||||
picked->inner_x = 148-act->bmp_offset.x + act->pos.x*2 - act->pos.y*2;
|
picked->inner_x = 148-act->bmp_offset.x + act->pos.x*2 - act->pos.y*2;
|
||||||
picked->inner_y = 91-act->bmp_offset.y + act->pos.x + act->pos.y - act->pos.z*2;
|
picked->inner_y = 91-act->bmp_offset.y + act->pos.x + act->pos.y - act->pos.z*2;
|
||||||
|
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ namespace room
|
|||||||
if (!::editor::isEditing() && act->flags & FLAG_SPECIAL)
|
if (!::editor::isEditing() && act->flags & FLAG_SPECIAL)
|
||||||
{
|
{
|
||||||
if (act->name[0]=='B') { // Es un booster
|
if (act->name[0]=='B') { // Es un booster
|
||||||
if (!::editor::isDevMode() && actor::hero::wasBoosterCollected((act->name[3]-48)*10+(act->name[4]-48)))
|
if (!::editor::isDevMode() && actor::hero::wasBoosterCollected((act->name[2]-48)*10+(act->name[3]-48)))
|
||||||
{
|
{
|
||||||
actor::remove(act);
|
actor::remove(act);
|
||||||
act = nullptr;
|
act = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user