Dust implementation.
After Width: | Height: | Size: 207 B |
|
@ -23,6 +23,7 @@ extern image_t img_semi_solid; //semi solid texture, 16x16
|
|||
extern image_t img_teleporter_0; //teleporter 0 texture, 16x16
|
||||
extern image_t img_teleporter_1; //teleporter 1 texture, 16x16
|
||||
extern image_t img_elevator; //elevator texture, 16x16
|
||||
extern image_t img_dust; //dust texture, 16x16
|
||||
|
||||
void draw_anim_speed(int x, int y, image_t *image, int step, int speed)
|
||||
{
|
||||
|
@ -79,6 +80,9 @@ int *start_y, int tp_positions[])
|
|||
break;
|
||||
case '^':
|
||||
draw_anim_speed(x, y, &img_elevator, step, 2); //half speed
|
||||
break;
|
||||
case 'd':
|
||||
draw_anim(x, y, &img_dust, step);
|
||||
break;
|
||||
case 'S':
|
||||
erase_tile(x, y, level);
|
||||
|
|
|
@ -103,6 +103,7 @@ int main(void)
|
|||
break;
|
||||
}
|
||||
draw_player(drill_x, drill_y);
|
||||
collide_and_erase(drill_x, drill_y, level, 'd');
|
||||
draw_timer(step/2);
|
||||
dupdate();
|
||||
}
|
||||
|
|
After Width: | Height: | Size: 207 B |
After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 323 B |
Before Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 207 B |
|
@ -12,9 +12,11 @@ tiles = {
|
|||
love.graphics.newImage(img_path.."semi_solid.png"),
|
||||
love.graphics.newImage(img_path.."teleporter_0.png"),
|
||||
love.graphics.newImage(img_path.."teleporter_1.png"),
|
||||
love.graphics.newImage(img_path.."dust.png"),
|
||||
love.graphics.newImage(img_path.."spawn.png"),
|
||||
love.graphics.newImage(img_path.."exit.png"),
|
||||
}
|
||||
tiles_char = { '0', '1', 'r', 'b', 'v', '^', 'w', '*', '/', 't', 'T' ,'S', 'E' }
|
||||
tiles_char = { '0', '1', 'r', 'b', 'v', '^', 'w', '*', '/', 't', 'T', 'd', 'S',
|
||||
'E' }
|
||||
|
||||
selected_tile = 1
|
||||
|
|