MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / GetWeaponAnimData

Function GetWeaponAnimData

TombEngine/Game/Lara/lara_two_guns.cpp:35–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33};
34
35static WeaponAnimData GetWeaponAnimData(LaraWeaponType weaponType)
36{
37 static const auto ANIM_DATA_MAP = std::unordered_map<LaraWeaponType, WeaponAnimData>
38 {
39 { LaraWeaponType::None, WeaponAnimData{ ID_LARA, 0, 0, 0, 0 } },
40 { LaraWeaponType::Pistol, WeaponAnimData{ ID_PISTOLS_ANIM, 4, 5, 13, 24 } },
41 { LaraWeaponType::Revolver, WeaponAnimData{ ID_REVOLVER_ANIM , 7, 8, 15, 29 } },
42 { LaraWeaponType::Uzi, WeaponAnimData{ ID_UZI_ANIM, 4, 5, 13, 24 } }
43 };
44
45 auto it = ANIM_DATA_MAP.find(weaponType);
46 return ((it != ANIM_DATA_MAP.end()) ? it->second : ANIM_DATA_MAP.at(LaraWeaponType::None));
47}
48
49static void SetArmInfo(const ItemInfo& laraItem, ArmInfo& arm, int frame)
50{

Callers 5

SetArmInfoFunction · 0.85
AnimateWeaponFunction · 0.85
AnimateWeaponUndrawFunction · 0.85
DrawPistolsFunction · 0.85
UndrawPistolsFunction · 0.85

Calls 3

findMethod · 0.45
endMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected