comparison examples/example-animation/example-animation.c @ 468:91ce23a36143

core: sprite -> mlk_sprite
author David Demelier <markand@malikania.fr>
date Mon, 27 Feb 2023 11:08:28 +0100
parents 01f5580e43d1
children 0d6206cee6b9
comparison
equal deleted inserted replaced
467:7420c78018dc 468:91ce23a36143
46 }; 46 };
47 47
48 static struct state *states[1]; 48 static struct state *states[1];
49 static struct texture numbers; 49 static struct texture numbers;
50 static struct mlk_animation animation; 50 static struct mlk_animation animation;
51 static struct sprite sprite; 51 static struct mlk_sprite sprite;
52 static int completed = 1; 52 static int completed = 1;
53 53
54 static void 54 static void
55 init(void) 55 init(void)
56 { 56 {
117 .handle = handle, 117 .handle = handle,
118 .update = update, 118 .update = update,
119 .draw = draw 119 .draw = draw
120 }; 120 };
121 121
122 sprite_init(&sprite, &numbers, 48, 48); 122 mlk_sprite_init(&sprite, &numbers, 48, 48);
123 mlk_animation_init(&animation, &sprite, 1000); 123 mlk_animation_init(&animation, &sprite, 1000);
124 124
125 mlk_game_init(states, UTIL_SIZE(states)); 125 mlk_game_init(states, UTIL_SIZE(states));
126 mlk_game_push(&state); 126 mlk_game_push(&state);
127 mlk_game_loop(); 127 mlk_game_loop();