1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
use crate::api::dungeon_mode::traps::TrapId;
use crate::api::items::ItemId;
use crate::api::moves::MoveId;
use crate::api::overlay::OverlayLoadLease;
use crate::ffi;

/// Get an effect animation by effect ID.
///
/// Note: unverified, ported from Irdkwia's notes
pub fn get_effect_animation(anim_id: i32, _ov10: &OverlayLoadLease<10>) -> &ffi::effect_animation {
    unsafe { &*ffi::GetEffectAnimation(anim_id) }
}

/// Get the move animation corresponding to the given move ID.
///
/// Note: unverified, ported from Irdkwia's notes
pub fn get_move_animation(move_id: MoveId, _ov10: &OverlayLoadLease<10>) -> &ffi::move_animation {
    unsafe { &*ffi::GetMoveAnimation(move_id) }
}

/// Get the special move animation corresponding to the entity ID.
///
/// Note: unverified, ported from Irdkwia's notes
pub fn get_special_monster_move_animation(
    ent_id: i32,
    _ov10: &OverlayLoadLease<10>,
) -> &ffi::special_monster_move_animation {
    unsafe { &*ffi::GetSpecialMonsterMoveAnimation(ent_id) }
}

/// Get the trap animation corresponding to the trap ID.
///
/// Note: unverified, ported from Irdkwia's notes
pub fn get_trap_animation(trap_id: TrapId, _ov10: &OverlayLoadLease<10>) -> i16 {
    unsafe { ffi::GetTrapAnimation(trap_id) }
}

/// Get the item animation corresponding to the item ID.
///
/// Note: unverified, ported from Irdkwia's notes
pub fn get_item_animation1(item_id: ItemId, _ov10: &OverlayLoadLease<10>) -> i16 {
    unsafe { ffi::GetItemAnimation1(item_id) }
}

/// Get the item animation corresponding to the item ID.
///
/// Note: unverified, ported from Irdkwia's notes
pub fn get_item_animation2(item_id: ItemId, _ov10: &OverlayLoadLease<10>) -> i16 {
    unsafe { ffi::GetItemAnimation2(item_id) }
}

/// Get the animation speed for a move.
///
/// Note: unverified, ported from Irdkwia's notes
pub fn get_move_animation_speed(move_id: MoveId, _ov10: &OverlayLoadLease<10>) -> i32 {
    unsafe { ffi::GetMoveAnimationSpeed(move_id) }
}