|
@@ -1,6 +1,8 @@
|
1
|
1
|
#include <pokeagb/pokeagb.h>
|
2
|
2
|
#include <tileset_animation/smoke.h>
|
3
|
|
-
|
|
3
|
+#include <tileset_animation/water_stone.h>
|
|
4
|
+#include <tileset_animation/flowers_mag.h>
|
|
5
|
+#include <tileset_animation/flowers_ora.h>
|
4
|
6
|
struct TilesetAnimation {
|
5
|
7
|
u16 tile_start;
|
6
|
8
|
u16 frame_length;
|
|
@@ -10,7 +12,10 @@ struct TilesetAnimation {
|
10
|
12
|
};
|
11
|
13
|
|
12
|
14
|
const struct TilesetAnimation hesperia_second_animations[] = {
|
13
|
|
- {.tile_start = 0x114, .frame_length = 7, .tile_length = 4, .frame_count = 5, .image = smokeTiles},
|
|
15
|
+ {.tile_start = 0x10C, .frame_length = 14, .tile_length = 4, .frame_count = 10, .image = flowers_magTiles},
|
|
16
|
+ {.tile_start = 0x110, .frame_length = 14, .tile_length = 4, .frame_count = 15, .image = flowers_oraTiles},
|
|
17
|
+ {.tile_start = 0x114, .frame_length = 7, .tile_length = 4, .frame_count = 8, .image = smokeTiles},
|
|
18
|
+ {.tile_start = 0x13C, .frame_length = 7, .tile_length = 4, .frame_count = 4, .image = water_stoneTiles},
|
14
|
19
|
{.tile_start = 0, .frame_length = 0, .tile_length = 0, .frame_count = 0, .image = (void *)0xFFFFFFFF},
|
15
|
20
|
};
|
16
|
21
|
|
|
@@ -22,6 +27,7 @@ void animate_from_structure(const struct TilesetAnimation *anim, u16 tile_skip,
|
22
|
27
|
u16 max_frame = anim[current_animation].frame_length * anim[current_animation].frame_count;
|
23
|
28
|
u16 used_frame = current_frame % max_frame;
|
24
|
29
|
used_frame /= anim[current_animation].frame_length;
|
|
30
|
+ dprintf("using tile %d.\n",used_frame);
|
25
|
31
|
memcpy(current_vram, anim[current_animation].image + (0x20 * anim[current_animation].tile_length * used_frame),
|
26
|
32
|
anim[current_animation].tile_length * 0x20);
|
27
|
33
|
current_animation++;
|
|
@@ -45,6 +51,6 @@ void main_animator_init(void) {
|
45
|
51
|
|
46
|
52
|
void main_second_animator_init(void) {
|
47
|
53
|
blockset_two_current_frame = 0;
|
48
|
|
- blockset_two_max_frame = 0x100;
|
|
54
|
+ blockset_two_max_frame = 0x3C0;
|
49
|
55
|
blockset_two_animator = main_second_animator;
|
50
|
56
|
}
|