mirror of
https://github.com/encounter/Petari.git
synced 2026-03-30 11:34:15 -07:00
22 lines
591 B
C++
22 lines
591 B
C++
#include "Game/Animation/XanimePlayer.hpp"
|
|
|
|
void XanimePlayer::setDefaultAnimation(const char *name)
|
|
{
|
|
const XanimeGroupInfo *defaultAnimation = mResourceTable->getGroupInfo(name);
|
|
if (mCurrentAnimation == mDefaultAnimation) {
|
|
changeAnimation(defaultAnimation);
|
|
}
|
|
mDefaultAnimation = defaultAnimation;
|
|
_7D = true;
|
|
}
|
|
|
|
void XanimePlayer::changeCurrentAnimation(const XanimeGroupInfo *animation)
|
|
{
|
|
if (mCurrentAnimation == animation) {
|
|
return;
|
|
}
|
|
mPrevAnimation = mCurrentAnimation;
|
|
mCurrentAnimation = animation;
|
|
updateAfterMovement();
|
|
}
|