// 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
play_area_h = h;
}
-void gd_init_keystate(void)
+void gd_init_play_area(void)
{
set_play_area(SXSIZE, SYSIZE);
-
- gd_keystate = SDL_GetKeyboardState(NULL);
}
/*
return (gd_elements[element & O_MASK].properties & P_DIGGABLE) != 0;
}
+#if 0
// returns true if the element is collectible
static inline boolean el_collectible(const int element)
{
return (gd_elements[element & O_MASK].properties & P_COLLECTIBLE) != 0;
}
+#endif
// returns true if the element is pushable
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
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();