- Portes almost completades
This commit is contained in:
@@ -182,7 +182,7 @@ namespace actor
|
||||
if ( input::keyDown(SDL_SCANCODE_UP) )
|
||||
{
|
||||
act->orient=PUSH_YN;
|
||||
if ( (act->pos.y>min.y && act->pos.x>=min.y && act->pos.x<=max.x) || ( (room::getDoors()&DOOR_YN) && (act->pos.x>=24) && (act->pos.x<=32) ) )
|
||||
if ( (act->pos.y>min.y && act->pos.x>=min.x && act->pos.x<=max.x) || ( (room::getDoors()&DOOR_YN) && (act->pos.x>=24) && (act->pos.x<=32) ) )
|
||||
{
|
||||
act->push |= PUSH_YN;
|
||||
moving = true;
|
||||
@@ -191,13 +191,13 @@ namespace actor
|
||||
if ( input::keyDown(SDL_SCANCODE_DOWN) )
|
||||
{
|
||||
act->orient=PUSH_YP;
|
||||
if ( (act->pos.y<max.y && act->pos.x>=min.y && act->pos.x<=max.x) || ( (room::getDoors()&DOOR_YP) && (act->pos.x>=24) && (act->pos.x<=32) ) )
|
||||
if ( (act->pos.y<max.y && act->pos.x>=min.x && act->pos.x<=max.x) || ( (room::getDoors()&DOOR_YP) && (act->pos.x>=24) && (act->pos.x<=32) ) )
|
||||
{
|
||||
act->push |= PUSH_YP;
|
||||
moving = true;
|
||||
}
|
||||
}
|
||||
if ( input::keyDown(SDL_SCANCODE_SPACE) && act->react_mask==0 && (act->pos.z==0 || act->below))
|
||||
if ( input::keyDown(SDL_SCANCODE_SPACE) && act->pos.y<=max.y && act->pos.y>=min.y && act->pos.x<=max.x && act->pos.x>=min.x && act->react_mask==0 && (act->pos.z==0 || act->below))
|
||||
{
|
||||
act->react_mask=1;
|
||||
act->react_push=0;
|
||||
@@ -520,9 +520,9 @@ namespace actor
|
||||
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);
|
||||
//print(x+5,y,act->pos.x);
|
||||
//print(x+5,y+6,act->pos.y);
|
||||
print(x+5,y,act->pos.z);
|
||||
print(x+5,y,act->pos.x);
|
||||
print(x+5,y+6,act->pos.y);
|
||||
print(x+5,y+12,act->pos.z);
|
||||
//print(x+5,y+12,order);
|
||||
//print(x+5,y,act->flags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user