1-- Sprite animation file descriptor
2-- This file will describe the frames used to load the sprite animations
3
4-- This files is following a special format compared to other animation scripts.
5
6local ANIM_SOUTH = vt_map.MapMode.ANIM_SOUTH;
7local ANIM_NORTH = vt_map.MapMode.ANIM_NORTH;
8local ANIM_WEST = vt_map.MapMode.ANIM_WEST;
9local ANIM_EAST = vt_map.MapMode.ANIM_EAST;
10
11
12sprite_animation = {
13
14    -- The file to load the frames from
15    image_filename = "data/entities/map/npcs/friendly_mushroom_spritesheet.png",
16    -- The number of rows and columns of images, will be used to compute
17    -- the images width and height, and also the frames number (row x col)
18    rows = 4,
19    columns = 1,
20    -- The frames duration in milliseconds
21    frames = {
22        [ANIM_SOUTH] = {
23            [0] = { id = 0, duration = 0 } -- 0 means forever
24        },
25        [ANIM_NORTH] = {
26            [0] = { id = 2, duration = 0 }
27        },
28        [ANIM_WEST] = {
29            [0] = { id = 1, duration = 0 }
30        },
31        [ANIM_EAST] = {
32            [0] = { id = 3, duration = 0 }
33        }
34    }
35}
36