{ "bdx_grass", UNDEFINED_FILENAME },
{ "bdx_grass.clone_from", "emc_grass" },
+ { "bdx_grass.CRUMBLED", UNDEFINED_FILENAME },
+ { "bdx_grass.CRUMBLED.clone_from", "emc_grass.CRUMBLED" },
+ { "bdx_grass.digging.left", UNDEFINED_FILENAME },
+ { "bdx_grass.digging.left.clone_from", "emc_grass.digging.left" },
+ { "bdx_grass.digging.right", UNDEFINED_FILENAME },
+ { "bdx_grass.digging.right.clone_from", "emc_grass.digging.right" },
+ { "bdx_grass.digging.up", UNDEFINED_FILENAME },
+ { "bdx_grass.digging.up.clone_from", "emc_grass.digging.up" },
+ { "bdx_grass.digging.down", UNDEFINED_FILENAME },
+ { "bdx_grass.digging.down.clone_from", "emc_grass.digging.down" },
+ { "bdx_grass.digging.left.CRUMBLED", UNDEFINED_FILENAME },
+ { "bdx_grass.digging.left.CRUMBLED.clone_from", "emc_grass.digging.left.CRUMBLED" },
+ { "bdx_grass.digging.right.CRUMBLED", UNDEFINED_FILENAME },
+ { "bdx_grass.digging.right.CRUMBLED.clone_from", "emc_grass.digging.right.CRUMBLED" },
+ { "bdx_grass.digging.up.CRUMBLED", UNDEFINED_FILENAME },
+ { "bdx_grass.digging.up.CRUMBLED.clone_from", "emc_grass.digging.up.CRUMBLED" },
+ { "bdx_grass.digging.down.CRUMBLED", UNDEFINED_FILENAME },
+ { "bdx_grass.digging.down.CRUMBLED.clone_from", "emc_grass.digging.down.CRUMBLED" },
{ "bdx_grass_ball", "RocksBD.png" },
{ "bdx_grass_ball.xpos", "9" },
{ "bdx_sand_glued", UNDEFINED_FILENAME },
{ "bdx_sand_glued.clone_from", "bdx_sand" },
+ { "bdx_sand_glued.CRUMBLED", UNDEFINED_FILENAME },
+ { "bdx_sand_glued.CRUMBLED.clone_from", "bdx_sand.CRUMBLED" },
{ "bdx_sand_glued.EDITOR", "RocksBD2.png" },
{ "bdx_sand_glued.EDITOR.xpos", "2" },
{ "bdx_sand_glued.EDITOR.ypos", "4" },
{ "bdx_biter_switch_1.xpos", "4" },
{ "bdx_biter_switch_1.ypos", "4" },
{ "bdx_biter_switch_1.frames", "1" },
+ { "bdx_biter_switch_1.CRUMBLED", UNDEFINED_FILENAME },
+ { "bdx_biter_switch_1.CRUMBLED.clone_from", "bdx_sand.CRUMBLED" },
{ "bdx_biter_switch_2", "RocksBD.png" },
{ "bdx_biter_switch_2.xpos", "5" },
{ "bdx_biter_switch_2.ypos", "4" },
{ "bdx_biter_switch_2.frames", "1" },
+ { "bdx_biter_switch_2.CRUMBLED", UNDEFINED_FILENAME },
+ { "bdx_biter_switch_2.CRUMBLED.clone_from", "bdx_sand.CRUMBLED" },
{ "bdx_biter_switch_3", "RocksBD.png" },
{ "bdx_biter_switch_3.xpos", "6" },
{ "bdx_biter_switch_3.ypos", "4" },
{ "bdx_biter_switch_3.frames", "1" },
+ { "bdx_biter_switch_3.CRUMBLED", UNDEFINED_FILENAME },
+ { "bdx_biter_switch_3.CRUMBLED.clone_from", "bdx_sand.CRUMBLED" },
{ "bdx_biter_switch_4", "RocksBD.png" },
{ "bdx_biter_switch_4.xpos", "7" },
{ "bdx_biter_switch_4.ypos", "4" },
{ "bdx_biter_switch_4.frames", "1" },
+ { "bdx_biter_switch_4.CRUMBLED", UNDEFINED_FILENAME },
+ { "bdx_biter_switch_4.CRUMBLED.clone_from", "bdx_sand.CRUMBLED" },
{ "bdx_replicator", UNDEFINED_FILENAME },
{ "bdx_replicator.clone_from", "emc_magic_ball" },
P_DIRT | P_AMOEBA_CONSUMES | P_DIGGABLE,
"DIRT2", 0, 3, 3, 3
},
+ {
+ O_DIRT2_CRUMBLED, O_DIRT2_CRUMBLED, N_("Dirt 2 (crumbled)"),
+ P_DIRT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRT2_CRUMBLED", 0, 3, 3, 3
+ },
+ {
+ O_DIRT2_DIGGING_LEFT, O_DIRT2_DIGGING_LEFT, N_("Dirt 2 (digging left)"),
+ P_DIRT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRT2_DIGGING_LEFT", 0, 3, 3, 3
+ },
+ {
+ O_DIRT2_DIGGING_RIGHT, O_DIRT2_DIGGING_RIGHT, N_("Dirt 2 (digging right)"),
+ P_DIRT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRT2_DIGGING_RIGHT", 0, 3, 3, 3
+ },
+ {
+ O_DIRT2_DIGGING_UP, O_DIRT2_DIGGING_UP, N_("Dirt 2 (digging up)"),
+ P_DIRT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRT2_DIGGING_UP", 0, 3, 3, 3
+ },
+ {
+ O_DIRT2_DIGGING_DOWN, O_DIRT2_DIGGING_DOWN, N_("Dirt 2 (digging down)"),
+ P_DIRT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRT2_DIGGING_", 0, 3, 3, 3
+ },
+ {
+ O_DIRT2_DIGGING_LEFT_CRUMBLED, O_DIRT2_DIGGING_LEFT_CRUMBLED, N_("Dirt 2 (digging left, crumbled)"),
+ P_DIRT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRT2_DIGGING_LEFT_CRUMBLED", 0, 3, 3, 3
+ },
+ {
+ O_DIRT2_DIGGING_RIGHT_CRUMBLED, O_DIRT2_DIGGING_RIGHT_CRUMBLED, N_("Dirt 2 (digging right, crumbled)"),
+ P_DIRT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRT2_DIGGING_RIGHT_CRUMBLED", 0, 3, 3, 3
+ },
+ {
+ O_DIRT2_DIGGING_UP_CRUMBLED, O_DIRT2_DIGGING_UP_CRUMBLED, N_("Dirt 2 (digging up, crumbled)"),
+ P_DIRT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRT2_DIGGING_UP_CRUMBLED", 0, 3, 3, 3
+ },
+ {
+ O_DIRT2_DIGGING_DOWN_CRUMBLED, O_DIRT2_DIGGING_DOWN_CRUMBLED, N_("Dirt 2 (digging down, crumbled)"),
+ P_DIRT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRT2_DIGGING_DOWN_CRUMBLED", 0, 3, 3, 3
+ },
{
O_BRICK, O_BRICK, N_("Brick wall"),
P_SLOPED|P_BLADDER_SLOPED|P_CAN_BE_HAMMERED,
0,
"GLUEDDIRT", 0, i_dirt_glued, i_dirt_glued, 2
},
+ {
+ O_DIRT_GLUED_CRUMBLED, O_DIRT_GLUED_CRUMBLED, N_("Glued dirt (crumbled)"),
+ 0,
+ "GLUEDDIRT_CRUMBLED", 0, i_dirt_glued, i_dirt_glued, 2
+ },
{
O_KEY_1, O_KEY_1, N_("Key 1"),
P_COLLECTIBLE,
0,
NULL, 0, 15, 15, 15
},
+ {
+ O_BITER_SWITCH_1_CRUMBLED, O_BITER_SWITCH_1_CRUMBLED, NULL,
+ 0,
+ NULL, 0, 12, 12, 12
+ },
+ {
+ O_BITER_SWITCH_2_CRUMBLED, O_BITER_SWITCH_2_CRUMBLED, NULL,
+ 0,
+ NULL, 0, 13, 13, 13
+ },
+ {
+ O_BITER_SWITCH_3_CRUMBLED, O_BITER_SWITCH_3_CRUMBLED, NULL,
+ 0,
+ NULL, 0, 14, 14, 14
+ },
+ {
+ O_BITER_SWITCH_4_CRUMBLED, O_BITER_SWITCH_4_CRUMBLED, NULL,
+ 0,
+ NULL, 0, 15, 15, 15
+ },
{
O_STONE_MOVE_LEFT, O_STONE_MOVE_LEFT, N_("Stone, moved left"),
O_DIRT_LOOSE_F,
O_DIRT_LOOSE_F_scanned,
O_DIRT2,
+ O_DIRT2_CRUMBLED,
+ O_DIRT2_DIGGING_LEFT,
+ O_DIRT2_DIGGING_RIGHT,
+ O_DIRT2_DIGGING_UP,
+ O_DIRT2_DIGGING_DOWN,
+ O_DIRT2_DIGGING_LEFT_CRUMBLED,
+ O_DIRT2_DIGGING_RIGHT_CRUMBLED,
+ O_DIRT2_DIGGING_UP_CRUMBLED,
+ O_DIRT2_DIGGING_DOWN_CRUMBLED,
O_BRICK,
O_BRICK_SLOPED_UP_RIGHT,
O_BRICK_SLOPED_UP_LEFT,
O_TRAPPED_DIAMOND,
O_CLOCK,
O_DIRT_GLUED,
+ O_DIRT_GLUED_CRUMBLED,
O_KEY_1,
O_KEY_2,
O_KEY_3,
O_BITER_SWITCH_2,
O_BITER_SWITCH_3,
O_BITER_SWITCH_4,
+ O_BITER_SWITCH_1_CRUMBLED,
+ O_BITER_SWITCH_2_CRUMBLED,
+ O_BITER_SWITCH_3_CRUMBLED,
+ O_BITER_SWITCH_4_CRUMBLED,
O_STONE_MOVE_LEFT,
O_STONE_MOVE_RIGHT,
static inline boolean el_has_crumbled(const int element)
{
int tile_gfx = element;
- int tile_crm = (element == O_DIRT ? O_DIRT_CRUMBLED : element);
+ int tile_crm = (element == O_DIRT ? O_DIRT_CRUMBLED :
+ element == O_DIRT2 ? O_DIRT2_CRUMBLED :
+ element == O_DIRT_GLUED ? O_DIRT_GLUED_CRUMBLED :
+ element == O_BITER_SWITCH_1 ? O_BITER_SWITCH_1_CRUMBLED :
+ element == O_BITER_SWITCH_2 ? O_BITER_SWITCH_2_CRUMBLED :
+ element == O_BITER_SWITCH_3 ? O_BITER_SWITCH_3_CRUMBLED :
+ element == O_BITER_SWITCH_4 ? O_BITER_SWITCH_4_CRUMBLED :
+ element);
struct GraphicInfo_BD *gfx = &graphic_info_bd_object[tile_gfx][0];
struct GraphicInfo_BD *crm = &graphic_info_bd_object[tile_crm][0];
el_pushable(element));
}
+static int get_dirt_element(int element, int dir, boolean crumbled)
+{
+ switch (element)
+ {
+ case O_DIRT:
+ return (crumbled ?
+ (dir == GD_MV_LEFT ? O_DIRT_DIGGING_LEFT_CRUMBLED :
+ dir == GD_MV_RIGHT ? O_DIRT_DIGGING_RIGHT_CRUMBLED :
+ dir == GD_MV_UP ? O_DIRT_DIGGING_UP_CRUMBLED :
+ dir == GD_MV_DOWN ? O_DIRT_DIGGING_DOWN_CRUMBLED : O_DIRT_CRUMBLED) :
+
+ (dir == GD_MV_LEFT ? O_DIRT_DIGGING_LEFT :
+ dir == GD_MV_RIGHT ? O_DIRT_DIGGING_RIGHT :
+ dir == GD_MV_UP ? O_DIRT_DIGGING_UP :
+ dir == GD_MV_DOWN ? O_DIRT_DIGGING_DOWN : O_DIRT));
+
+ case O_DIRT2:
+ return (crumbled ?
+ (dir == GD_MV_LEFT ? O_DIRT2_DIGGING_LEFT_CRUMBLED :
+ dir == GD_MV_RIGHT ? O_DIRT2_DIGGING_RIGHT_CRUMBLED :
+ dir == GD_MV_UP ? O_DIRT2_DIGGING_UP_CRUMBLED :
+ dir == GD_MV_DOWN ? O_DIRT2_DIGGING_DOWN_CRUMBLED : O_DIRT2_CRUMBLED) :
+
+ (dir == GD_MV_LEFT ? O_DIRT2_DIGGING_LEFT :
+ dir == GD_MV_RIGHT ? O_DIRT2_DIGGING_RIGHT :
+ dir == GD_MV_UP ? O_DIRT2_DIGGING_UP :
+ dir == GD_MV_DOWN ? O_DIRT2_DIGGING_DOWN : O_DIRT2));
+
+ case O_DIRT_GLUED:
+ return (crumbled ? O_DIRT_GLUED_CRUMBLED : O_DIRT_GLUED);
+
+ case O_BITER_SWITCH_1:
+ return (crumbled ? O_BITER_SWITCH_1_CRUMBLED : O_BITER_SWITCH_1);
+
+ case O_BITER_SWITCH_2:
+ return (crumbled ? O_BITER_SWITCH_2_CRUMBLED : O_BITER_SWITCH_2);
+
+ case O_BITER_SWITCH_3:
+ return (crumbled ? O_BITER_SWITCH_3_CRUMBLED : O_BITER_SWITCH_3);
+
+ case O_BITER_SWITCH_4:
+ return (crumbled ? O_BITER_SWITCH_4_CRUMBLED : O_BITER_SWITCH_4);
+
+ default:
+ break;
+ }
+
+ return element;
+}
+
static void gd_drawcave_crumbled(Bitmap *dest, GdGame *game, int x, int y, boolean draw_masked)
{
void (*blit_bitmap)(Bitmap *, Bitmap *, int, int, int, int, int, int) =
int sy = y * cell_size - scroll_y;
int frame = game->animcycle;
int border_size = cell_size / 8;
+ int draw = game->drawing_buffer[y][x];
+ int draw_last = game->last_drawing_buffer[y][x];
int dir_to = game->dir_buffer_to[y][x];
boolean is_moving_to = (dir_to != GD_MV_STILL);
- int tile_gfx = (!is_moving_to ? O_DIRT :
- dir_to == GD_MV_LEFT ? O_DIRT_DIGGING_LEFT :
- dir_to == GD_MV_RIGHT ? O_DIRT_DIGGING_RIGHT :
- dir_to == GD_MV_UP ? O_DIRT_DIGGING_UP :
- dir_to == GD_MV_DOWN ? O_DIRT_DIGGING_DOWN : O_DIRT);
- int tile_crm = (!is_moving_to ? O_DIRT_CRUMBLED :
- dir_to == GD_MV_LEFT ? O_DIRT_DIGGING_LEFT_CRUMBLED :
- dir_to == GD_MV_RIGHT ? O_DIRT_DIGGING_RIGHT_CRUMBLED :
- dir_to == GD_MV_UP ? O_DIRT_DIGGING_UP_CRUMBLED :
- dir_to == GD_MV_DOWN ? O_DIRT_DIGGING_DOWN_CRUMBLED : O_DIRT_CRUMBLED);
+ boolean is_diggable_last = el_diggable(draw_last);
+ int tile = (is_moving_to && is_diggable_last ? draw_last : draw);
+ int tile_gfx = get_dirt_element(tile, dir_to, FALSE);
+ int tile_crm = get_dirt_element(tile, dir_to, TRUE);
struct GraphicInfo_BD *gfx = &graphic_info_bd_object[tile_gfx][frame];
struct GraphicInfo_BD *crm = &graphic_info_bd_object[tile_crm][frame];
int dirs[] = { GD_MV_UP, GD_MV_LEFT, GD_MV_RIGHT, GD_MV_DOWN };
int dy = gd_dy[dir];
int xx = (x + dx + cave->w) % cave->w;
int yy = (y + dy + cave->h) % cave->h;
- int tile = game->element_buffer[yy][xx];
- int tile_last = game->last_element_buffer[yy][xx];
int xoffset = (dx > 0 ? cell_size - border_size : 0);
int yoffset = (dy > 0 ? cell_size - border_size : 0);
int xsize = (dx == 0 ? cell_size : border_size);
int ysize = (dy == 0 ? cell_size : border_size);
+ draw = game->drawing_buffer[yy][xx];
+ draw_last = game->last_drawing_buffer[yy][xx];
dir_to = game->dir_buffer_to[yy][xx];
is_moving_to = (dir_to != GD_MV_STILL);
// do not crumble border if next tile is also crumbled or is just being digged away
- boolean draw_normal = ((el_has_crumbled(tile)) ||
- (el_has_crumbled(tile_last) && is_moving_to));
+ boolean draw_normal = ((el_has_crumbled(draw)) ||
+ (el_has_crumbled(draw_last) && is_moving_to));
if (draw_normal)
blit_bitmap(gfx->bitmap, dest, gfx->src_x + xoffset, gfx->src_y + yoffset,
int draw_back = (!is_moving_to ? draw : digging_tile ? draw_last : O_SPACE);
struct GraphicInfo_BD *g = &graphic_info_bd_object[draw_back][frame];
- if (el_has_crumbled(draw_last))
+ if (el_has_crumbled(draw_back))
{
gd_drawcave_crumbled(dest, game, x, y, draw_masked);
O_DIRT2, TRUE,
EL_BDX_GRASS, -1, -1
},
+ {
+ O_DIRT2_CRUMBLED, FALSE,
+ EL_BDX_GRASS, -1, -1
+ },
+ {
+ O_DIRT2_DIGGING_LEFT, FALSE,
+ EL_BDX_GRASS, ACTION_DIGGING, MV_BIT_LEFT
+ },
+ {
+ O_DIRT2_DIGGING_RIGHT, FALSE,
+ EL_BDX_GRASS, ACTION_DIGGING, MV_BIT_RIGHT
+ },
+ {
+ O_DIRT2_DIGGING_UP, FALSE,
+ EL_BDX_GRASS, ACTION_DIGGING, MV_BIT_UP
+ },
+ {
+ O_DIRT2_DIGGING_DOWN, FALSE,
+ EL_BDX_GRASS, ACTION_DIGGING, MV_BIT_DOWN
+ },
+ {
+ O_DIRT2_DIGGING_LEFT_CRUMBLED, FALSE,
+ EL_BDX_GRASS, ACTION_DIGGING, MV_BIT_LEFT
+ },
+ {
+ O_DIRT2_DIGGING_RIGHT_CRUMBLED, FALSE,
+ EL_BDX_GRASS, ACTION_DIGGING, MV_BIT_RIGHT
+ },
+ {
+ O_DIRT2_DIGGING_UP_CRUMBLED, FALSE,
+ EL_BDX_GRASS, ACTION_DIGGING, MV_BIT_UP
+ },
+ {
+ O_DIRT2_DIGGING_DOWN_CRUMBLED, FALSE,
+ EL_BDX_GRASS, ACTION_DIGGING, MV_BIT_DOWN
+ },
{
O_BRICK, TRUE,
EL_BDX_WALL, -1, -1
O_DIRT_GLUED, TRUE,
EL_BDX_SAND_GLUED, -1, -1
},
+ {
+ O_DIRT_GLUED_CRUMBLED, FALSE,
+ EL_BDX_SAND_GLUED, -1, -1
+ },
{
O_KEY_1, TRUE,
EL_BDX_KEY_1, -1, -1
O_BITER_SWITCH_4, FALSE,
EL_BDX_BITER_SWITCH_4, -1, -1
},
+ {
+ O_BITER_SWITCH_1_CRUMBLED, FALSE,
+ EL_BDX_BITER_SWITCH_1, -1, -1
+ },
+ {
+ O_BITER_SWITCH_2_CRUMBLED, FALSE,
+ EL_BDX_BITER_SWITCH_2, -1, -1
+ },
+ {
+ O_BITER_SWITCH_3_CRUMBLED, FALSE,
+ EL_BDX_BITER_SWITCH_3, -1, -1
+ },
+ {
+ O_BITER_SWITCH_4_CRUMBLED, FALSE,
+ EL_BDX_BITER_SWITCH_4, -1, -1
+ },
{
O_STONE_MOVE_LEFT, FALSE,
EL_BDX_ROCK, ACTION_MOVING, MV_BIT_LEFT
{
int effective_element = element;
int effective_action = action;
- int graphic = (i == O_DIRT_CRUMBLED ?
+ int graphic = (i == O_DIRT_CRUMBLED ||
+ i == O_DIRT2_CRUMBLED ||
+ i == O_DIRT_GLUED_CRUMBLED ||
+ i == O_BITER_SWITCH_1_CRUMBLED ||
+ i == O_BITER_SWITCH_2_CRUMBLED ||
+ i == O_BITER_SWITCH_3_CRUMBLED ||
+ i == O_BITER_SWITCH_4_CRUMBLED ?
graphic = el_act2crm(effective_element, effective_action) :
- i == O_DIRT_DIGGING_LEFT_CRUMBLED ||
- i == O_DIRT_DIGGING_RIGHT_CRUMBLED ||
- i == O_DIRT_DIGGING_UP_CRUMBLED ||
- i == O_DIRT_DIGGING_DOWN_CRUMBLED ?
+ i == O_DIRT_DIGGING_LEFT_CRUMBLED ||
+ i == O_DIRT_DIGGING_RIGHT_CRUMBLED ||
+ i == O_DIRT_DIGGING_UP_CRUMBLED ||
+ i == O_DIRT_DIGGING_DOWN_CRUMBLED ||
+ i == O_DIRT2_DIGGING_LEFT_CRUMBLED ||
+ i == O_DIRT2_DIGGING_RIGHT_CRUMBLED ||
+ i == O_DIRT2_DIGGING_UP_CRUMBLED ||
+ i == O_DIRT2_DIGGING_DOWN_CRUMBLED ?
graphic = el_act_dir2crm(effective_element, effective_action, direction) :
direction == MV_NONE ?
el_act2img(effective_element, effective_action) :
BD_GFX_RANGE(O_NITRO_EXPL_1, 4, e) ? BD_GFX_FRAME(O_NITRO_EXPL_1, e) :
BD_GFX_RANGE(O_AMOEBA_2_EXPL_1, 4, e) ? BD_GFX_FRAME(O_AMOEBA_2_EXPL_1, e):
e == O_INBOX_OPEN || e == O_OUTBOX_OPEN ? j :
- e == O_DIRT_DIGGING_LEFT ||
- e == O_DIRT_DIGGING_RIGHT ||
- e == O_DIRT_DIGGING_UP ||
- e == O_DIRT_DIGGING_DOWN ||
- e == O_DIRT_DIGGING_LEFT_CRUMBLED ||
- e == O_DIRT_DIGGING_RIGHT_CRUMBLED ||
- e == O_DIRT_DIGGING_UP_CRUMBLED ||
- e == O_DIRT_DIGGING_DOWN_CRUMBLED ? j * 2 % 8:
+ e == O_DIRT_DIGGING_LEFT ||
+ e == O_DIRT_DIGGING_RIGHT ||
+ e == O_DIRT_DIGGING_UP ||
+ e == O_DIRT_DIGGING_DOWN ||
+ e == O_DIRT_DIGGING_LEFT_CRUMBLED ||
+ e == O_DIRT_DIGGING_RIGHT_CRUMBLED ||
+ e == O_DIRT_DIGGING_UP_CRUMBLED ||
+ e == O_DIRT_DIGGING_DOWN_CRUMBLED ||
+ e == O_DIRT2_DIGGING_LEFT ||
+ e == O_DIRT2_DIGGING_RIGHT ||
+ e == O_DIRT2_DIGGING_UP ||
+ e == O_DIRT2_DIGGING_DOWN ||
+ e == O_DIRT2_DIGGING_LEFT_CRUMBLED ||
+ e == O_DIRT2_DIGGING_RIGHT_CRUMBLED ||
+ e == O_DIRT2_DIGGING_UP_CRUMBLED ||
+ e == O_DIRT2_DIGGING_DOWN_CRUMBLED ? j * 2 % 8:
j * 2);
int frame = getAnimationFrame(g->anim_frames,
g->anim_delay,