|
|
|
|
19
|
while (anim[current_animation].image != (void*)0xFFFFFFFF) {
|
19
|
while (anim[current_animation].image != (void*)0xFFFFFFFF) {
|
20
|
void *current_vram = vram_address + (0x20 * anim[current_animation].tile_start);
|
20
|
void *current_vram = vram_address + (0x20 * anim[current_animation].tile_start);
|
21
|
u16 max_frame = anim[current_animation].frame_lenght * anim[current_animation].frame_count;
|
21
|
u16 max_frame = anim[current_animation].frame_lenght * anim[current_animation].frame_count;
|
22
|
- current_frame = current_frame % max_frame;
|
|
|
23
|
- current_frame /= anim[current_animation].frame_lenght;
|
|
|
|
|
22
|
+ u16 used_frame = current_frame % max_frame;
|
|
|
23
|
+ used_frame /= anim[current_animation].frame_lenght;
|
24
|
memcpy(current_vram,
|
24
|
memcpy(current_vram,
|
25
|
- anim[current_animation].image + (0x20 * anim[current_animation].tile_length * current_frame),
|
|
|
|
|
25
|
+ anim[current_animation].image + (0x20 * anim[current_animation].tile_length * used_frame),
|
26
|
anim[current_animation].tile_length * 0x20);
|
26
|
anim[current_animation].tile_length * 0x20);
|
27
|
current_animation++;
|
27
|
current_animation++;
|
28
|
}
|
28
|
}
|