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
11sprite_animation = {
12
13	-- The file to load the frames from
14	image_filename = "data/entities/map/npcs/npc_man01_spritesheet.png",
15	-- The number of rows and columns of images, will be used to compute
16	-- the images width and height, and also the frames number (row x col)
17	rows = 4,
18	columns = 6,
19	-- The frames duration in milliseconds
20    frames = {
21        [ANIM_SOUTH] = {
22            [0] = { id = 1, duration = 150 },
23            [1] = { id = 2, duration = 150 },
24            [2] = { id = 3, duration = 150 },
25            [3] = { id = 1, duration = 150 },
26            [4] = { id = 4, duration = 150 },
27            [5] = { id = 5, duration = 150 }
28        },
29        [ANIM_NORTH] = {
30            [0] = { id = 7, duration = 150 },
31            [1] = { id = 8, duration = 150 },
32            [2] = { id = 9, duration = 150 },
33            [3] = { id = 7, duration = 150 },
34            [4] = { id = 10, duration = 150 },
35            [5] = { id = 11, duration = 150 }
36        },
37        [ANIM_WEST] = {
38            [0] = { id = 13, duration = 150 },
39            [1] = { id = 14, duration = 150 },
40            [2] = { id = 15, duration = 150 },
41            [3] = { id = 13, duration = 150 },
42            [4] = { id = 16, duration = 150 },
43            [5] = { id = 17, duration = 150 }
44        },
45        [ANIM_EAST] = {
46            [0] = { id = 19, duration = 150 },
47            [1] = { id = 20, duration = 150 },
48            [2] = { id = 21, duration = 150 },
49            [3] = { id = 19, duration = 150 },
50            [4] = { id = 22, duration = 150 },
51            [5] = { id = 23, duration = 150 }
52        }
53    }
54}
55