X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_bd%2Fbd_graphics.c;h=aab4330160292ff3727b75f758cd0a99efda7313;hb=edaa850fd2d2cae7ec31961fae3d56487e710c71;hp=edc8003788e68ef268ee792eb1903716c47eeca2;hpb=6fe46ea9fbf85c0ea5d27a452184b9a0183193c7;p=rocksndiamonds.git diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index edc80037..aab43301 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -58,8 +58,6 @@ static int scroll_x, scroll_y; // quit, global variable which is set to true if the application should quit boolean gd_quit = FALSE; -const byte *gd_keystate; - static int cell_size = 0; // graphic info for game objects/frames and players/actions/frames @@ -113,8 +111,6 @@ void set_play_area(int w, int h) void gd_init_keystate(void) { set_play_area(SXSIZE, SYSIZE); - - gd_keystate = SDL_GetKeyboardState(NULL); } /* @@ -555,15 +551,15 @@ static inline boolean el_pushable(const int element) } // returns true if the element can move -static inline boolean can_move(const int element) +static inline boolean el_can_move(const int element) { return (gd_elements[element & O_MASK].properties & P_CAN_MOVE) != 0; } // returns true if the element can fall -static inline boolean can_fall(const int element) +static inline boolean el_falling(const int element) { - return (gd_elements[element & O_MASK].properties & P_CAN_FALL) != 0; + return (gd_elements[element & O_MASK].properties & P_FALLING) != 0; } // returns true if the element is exploding @@ -584,7 +580,8 @@ static void gd_drawcave_tile(Bitmap *dest, GdGame *game, int x, int y, boolean d int frame = game->animcycle; struct GraphicInfo_BD *g = &graphic_info_bd_object[tile][frame]; Bitmap *tile_bitmap = gd_get_tile_bitmap(g->bitmap); - boolean is_movable = (can_move(tile) || can_fall(tile) || el_pushable(tile) || el_player(tile)); + boolean is_movable = (el_can_move(tile) || el_falling(tile) || el_pushable(tile) || + el_player(tile)); boolean is_movable_or_diggable = (is_movable || el_diggable(game->last_element_buffer[y][x])); boolean is_moving = (is_movable_or_diggable && dir != GD_MV_STILL); boolean use_smooth_movements = use_bd_smooth_movements();