- Ja pinta be les portes i les traspasa
This commit is contained in:
@@ -314,7 +314,7 @@ namespace actor
|
|||||||
if (act->push & PUSH_XN) {
|
if (act->push & PUSH_XN) {
|
||||||
act->pos.x--;
|
act->pos.x--;
|
||||||
actor::actor_t *other = actor::get_collision(act);
|
actor::actor_t *other = actor::get_collision(act);
|
||||||
if (other || ( act->pos.x<min.x && ( !(room::getDoors()&DOOR_XN) || (act->pos.y!=28) ) ))
|
if (other || ( act->pos.x<min.x && ( !(room::getDoors()&DOOR_XN) || (act->pos.y!=28) || !(act->flags&FLAG_HERO) ) ))
|
||||||
{
|
{
|
||||||
if (other && other->flags & FLAG_PUSHABLE) other->push |= PUSH_XN;
|
if (other && other->flags & FLAG_PUSHABLE) other->push |= PUSH_XN;
|
||||||
act->pos.x++;
|
act->pos.x++;
|
||||||
@@ -368,7 +368,7 @@ namespace actor
|
|||||||
if (act->push & PUSH_YN) {
|
if (act->push & PUSH_YN) {
|
||||||
act->pos.y--;
|
act->pos.y--;
|
||||||
actor::actor_t *other = actor::get_collision(act);
|
actor::actor_t *other = actor::get_collision(act);
|
||||||
if (other || ( act->pos.y<min.y && ( !(room::getDoors()&DOOR_YN) || (act->pos.x!=28) ) ))
|
if (other || ( act->pos.y<min.y && ( !(room::getDoors()&DOOR_YN) || (act->pos.x!=28) || !(act->flags&FLAG_HERO) ) ))
|
||||||
{
|
{
|
||||||
if (other && other->flags & FLAG_PUSHABLE) other->push |= PUSH_YN;
|
if (other && other->flags & FLAG_PUSHABLE) other->push |= PUSH_YN;
|
||||||
act->pos.y++;
|
act->pos.y++;
|
||||||
@@ -395,7 +395,7 @@ namespace actor
|
|||||||
if (act->push & PUSH_YP) {
|
if (act->push & PUSH_YP) {
|
||||||
act->pos.y++;
|
act->pos.y++;
|
||||||
actor::actor_t *other = actor::get_collision(act);
|
actor::actor_t *other = actor::get_collision(act);
|
||||||
if (other || ( act->pos.y>max.y && ( !(room::getDoors()&DOOR_YP) || (act->pos.x!=28) ) ))
|
if (other || ( act->pos.y>max.y && ( !(room::getDoors()&DOOR_YP) || (act->pos.x!=28) || !(act->flags&FLAG_HERO) ) ))
|
||||||
{
|
{
|
||||||
if (other && other->flags & FLAG_PUSHABLE) other->push |= PUSH_YP;
|
if (other && other->flags & FLAG_PUSHABLE) other->push |= PUSH_YP;
|
||||||
act->pos.y--;
|
act->pos.y--;
|
||||||
@@ -520,8 +520,9 @@ namespace actor
|
|||||||
const int ao = (act->flags & FLAG_ANIMATED) ? anims[act->anim_cycle][anim_frame]*act->bmp_rect.w : 0;
|
const int ao = (act->flags & FLAG_ANIMATED) ? anims[act->anim_cycle][anim_frame]*act->bmp_rect.w : 0;
|
||||||
|
|
||||||
draw::draw(x, y, act->bmp_rect.w, act->bmp_rect.h, act->bmp_rect.x+ao, act->bmp_rect.y+oo, flip);
|
draw::draw(x, y, act->bmp_rect.w, act->bmp_rect.h, act->bmp_rect.x+ao, act->bmp_rect.y+oo, flip);
|
||||||
print(x+5,y,act->pos.x);
|
//print(x+5,y,act->pos.x);
|
||||||
print(x+5,y+6,act->pos.y);
|
//print(x+5,y+6,act->pos.y);
|
||||||
|
print(x+5,y,act->pos.z);
|
||||||
//print(x+5,y+12,order);
|
//print(x+5,y+12,order);
|
||||||
//print(x+5,y,act->flags);
|
//print(x+5,y,act->flags);
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ void game::init()
|
|||||||
draw::loadPalette("test.gif");
|
draw::loadPalette("test.gif");
|
||||||
game::setUpdateTicks(64);
|
game::setUpdateTicks(64);
|
||||||
|
|
||||||
room::load(1,3);
|
room::load(2,2);
|
||||||
|
|
||||||
box = actor::create({16,16,0}, {8,8,4}, {64,0,32,24}, {0,24});
|
box = actor::create({16,16,0}, {8,8,4}, {64,0,32,24}, {0,24});
|
||||||
box->flags = FLAG_MOVING;
|
box->flags = FLAG_MOVING;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace room
|
|||||||
draw::draw(148+(tmin.x-1)*16-3*16,76+(tmin.x-1)*8+3*8,32,15,0,1); // Tile de Piso
|
draw::draw(148+(tmin.x-1)*16-3*16,76+(tmin.x-1)*8+3*8,32,15,0,1); // Tile de Piso
|
||||||
draw::draw(148+(tmin.x-1)*16-4*16,76+(tmin.x-1)*8+4*8,32,15,0,1); // Tile de Piso
|
draw::draw(148+(tmin.x-1)*16-4*16,76+(tmin.x-1)*8+4*8,32,15,0,1); // Tile de Piso
|
||||||
|
|
||||||
draw::draw( 164+tmin.x*16-4*16-16, 32+3*8+4+tmin.x*8, 40,59, 64,133);
|
draw::draw(164+(tmin.x-1)*16-4*16-8, 32+3*8+9+(tmin.x-1)*8, 40,59, 64,133);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int x=tmin.x;x<=tmax.x;++x)
|
for (int x=tmin.x;x<=tmax.x;++x)
|
||||||
|
|||||||
Reference in New Issue
Block a user