mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-23 13:40:02 +00:00
Rename variables logically
This commit is contained in:
parent
021aef7127
commit
370013efbf
@ -180,7 +180,7 @@ checkPass__12XanimePlayerCFf,XanimePlayer.o,Animation.a,false
|
||||
getSimpleGroup__12XanimePlayerCFv,XanimePlayer.o,Animation.a,false
|
||||
duplicateSimpleGroup__12XanimePlayerFv,XanimePlayer.o,Animation.a,false
|
||||
__ct__15XanimeFrameCtrlFv,XanimePlayer.o,Animation.a,false
|
||||
changeCurrentAnimation__12XanimePlayerFPC15XanimeGroupInfo,XanimePlayer.o,Animation.a,false
|
||||
changeCurrentAnimation__12XanimePlayerFPC15XanimeGroupInfo,XanimePlayer.o,Animation.a,true
|
||||
__dt__15XanimeFrameCtrlFv,XanimePlayer.o,Animation.a,false
|
||||
init__19XanimeResourceTableFv,XanimeResource.o,Animation.a,false
|
||||
getGroupInfo__19XanimeResourceTableCFPCc,XanimeResource.o,Animation.a,false
|
||||
|
|
@ -582,11 +582,11 @@ getUpperFrame__13MarioAnimatorCFv,MarioAnimator.o,Player.a,false
|
||||
setWalkMode__13MarioAnimatorFv,MarioAnimator.o,Player.a,false
|
||||
calc__13MarioAnimatorFv,MarioAnimator.o,Player.a,false
|
||||
change__13MarioAnimatorFPCc,MarioAnimator.o,Player.a,false
|
||||
changeUpper__13MarioAnimatorFPCc,MarioAnimator.o,Player.a,false
|
||||
changeUpper__13MarioAnimatorFPCc,MarioAnimator.o,Player.a,true
|
||||
stopUpper__13MarioAnimatorFPCc,MarioAnimator.o,Player.a,false
|
||||
changeDefault__13MarioAnimatorFPCc,MarioAnimator.o,Player.a,false
|
||||
changeDefault__13MarioAnimatorFPCc,MarioAnimator.o,Player.a,true
|
||||
isDefaultAnimationRun__13MarioAnimatorCFPCc,MarioAnimator.o,Player.a,false
|
||||
changeDefaultUpper__13MarioAnimatorFPCc,MarioAnimator.o,Player.a,false
|
||||
changeDefaultUpper__13MarioAnimatorFPCc,MarioAnimator.o,Player.a,true
|
||||
getUpperJointID__13MarioAnimatorCFv,MarioAnimator.o,Player.a,false
|
||||
updateJointRumble__13MarioAnimatorFv,MarioAnimator.o,Player.a,false
|
||||
addRumblePower__13MarioAnimatorFfUl,MarioAnimator.o,Player.a,false
|
||||
|
|
@ -33,9 +33,10 @@ public:
|
||||
void setDefaultAnimation(const char *);
|
||||
|
||||
void changeAnimation(const char *);
|
||||
|
||||
void changeAnimation(const XanimeGroupInfo *);
|
||||
|
||||
void changeCurrentAnimation(const XanimeGroupInfo *);
|
||||
|
||||
inline XanimeCore* getCore() {
|
||||
return mCore;
|
||||
}
|
||||
@ -44,8 +45,9 @@ public:
|
||||
J3DModelData *mModelData; // _4
|
||||
u8 _8[0x5C-8];
|
||||
const XanimeGroupInfo *mDefaultAnimation; // _5C
|
||||
const XanimeGroupInfo *mStopAnimation; // _60
|
||||
u8 _64[8];
|
||||
const XanimeGroupInfo *mCurrentAnimation; // _60
|
||||
const XanimeGroupInfo *mPrevAnimation; // _64
|
||||
const XanimeGroupInfo *_68;
|
||||
XanimeCore *mCore; // _6C
|
||||
XanimeResourceTable *mResourceTable; // _70
|
||||
u8 _74[0x8];
|
||||
|
@ -22,6 +22,8 @@ public:
|
||||
void waterToGround();
|
||||
void initCallbackTable();
|
||||
void change(const char *);
|
||||
void changeDefault(const char *);
|
||||
void changeUpper(const char *);
|
||||
void changeDefaultUpper(const char *);
|
||||
void entryCallback(const char *);
|
||||
|
||||
@ -29,8 +31,7 @@ public:
|
||||
{
|
||||
getPlayer()->startBas(nullptr, false, 0.0f, 0.0f);
|
||||
|
||||
_C->setDefaultAnimation(name);
|
||||
change(name);
|
||||
mXanimePlayer->setDefaultAnimation(name);
|
||||
}
|
||||
|
||||
inline bool isTeresaClear() const {
|
||||
@ -38,8 +39,8 @@ public:
|
||||
}
|
||||
|
||||
XanimeResourceTable *mResourceTable; // _8
|
||||
XanimePlayer *_C;
|
||||
XanimePlayer *_10;
|
||||
XanimePlayer *mXanimePlayer; // _C
|
||||
XanimePlayer *mXanimePlayerUpper; // _10
|
||||
u8 _14;
|
||||
u8 _15;
|
||||
u8 _16;
|
||||
@ -51,7 +52,7 @@ public:
|
||||
f32 _58;
|
||||
f32 _5C;
|
||||
TVec3f _60;
|
||||
u8 _6C;
|
||||
bool _6C;
|
||||
f32 _70;
|
||||
u32 _74;
|
||||
u16 _78;
|
||||
@ -60,7 +61,7 @@ public:
|
||||
TMtx34f _DC;
|
||||
u8 _10C;
|
||||
u8 _10D;
|
||||
u8 _10E;
|
||||
bool mUpperDefaultSet; // _10E
|
||||
f32 _110;
|
||||
const char *mCurrBck; // _114
|
||||
f32 _118;
|
||||
|
@ -1,10 +1,17 @@
|
||||
#include "Game/Animation/XanimePlayer.hpp"
|
||||
|
||||
void XanimePlayer::setDefaultAnimation(const char *name) {
|
||||
const XanimeGroupInfo *animation = mResourceTable->getGroupInfo(name);
|
||||
if(mStopAnimation == mDefaultAnimation) {
|
||||
changeAnimation(animation);
|
||||
const XanimeGroupInfo *defaultAnimation = mResourceTable->getGroupInfo(name);
|
||||
if(mCurrentAnimation == mDefaultAnimation) {
|
||||
changeAnimation(defaultAnimation);
|
||||
}
|
||||
mDefaultAnimation = animation;
|
||||
mDefaultAnimation = defaultAnimation;
|
||||
_7D = true;
|
||||
}
|
||||
|
||||
void XanimePlayer::changeCurrentAnimation(const XanimeGroupInfo *animation) {
|
||||
if(mCurrentAnimation == animation) return;
|
||||
mPrevAnimation = mCurrentAnimation;
|
||||
mCurrentAnimation = animation;
|
||||
updateAfterMovement();
|
||||
}
|
||||
|
@ -35,10 +35,10 @@ void MarioAnimator::init()
|
||||
_5C = 0.0f;
|
||||
_60.zero();
|
||||
|
||||
_6C = 0;
|
||||
_6C = false;
|
||||
_10C = 0;
|
||||
_10D = 0;
|
||||
_10E = 0;
|
||||
mUpperDefaultSet = false;
|
||||
mCurrBck = 0;
|
||||
_118 = 0.0f;
|
||||
_70 = 0.0f;
|
||||
@ -48,23 +48,24 @@ void MarioAnimator::init()
|
||||
|
||||
initCallbackTable();
|
||||
|
||||
_C = new XanimePlayer(MR::getJ3DModel(mActor), mResourceTable);
|
||||
mXanimePlayer = new XanimePlayer(MR::getJ3DModel(mActor), mResourceTable);
|
||||
|
||||
f1("Šî–{");
|
||||
changeDefault("Šî–{");
|
||||
change("Šî–{");
|
||||
|
||||
_C->getCore()->enableJointTransform(MR::getJ3DModelData(mActor));
|
||||
mXanimePlayer->getCore()->enableJointTransform(MR::getJ3DModelData(mActor));
|
||||
|
||||
mActor->mModelManager->mXanimePlayer = _C;
|
||||
_10 = new XanimePlayer(MR::getJ3DModel(mActor), mResourceTable, _C);
|
||||
mActor->mModelManager->mXanimePlayer = mXanimePlayer;
|
||||
mXanimePlayerUpper = new XanimePlayer(MR::getJ3DModel(mActor), mResourceTable, mXanimePlayer);
|
||||
changeDefaultUpper("Šî–{");
|
||||
_10->changeAnimation("Šî–{");
|
||||
_10->mCore->shareJointTransform(_C->mCore);
|
||||
mXanimePlayerUpper->changeAnimation("Šî–{");
|
||||
mXanimePlayerUpper->mCore->shareJointTransform(mXanimePlayer->mCore);
|
||||
PSMTXCopy(MR::tmpMtxRotYRad(3.14159274101f), _DC.toMtxPtr());
|
||||
}
|
||||
|
||||
bool MarioAnimator::isAnimationStop() const
|
||||
{
|
||||
return _C->mStopAnimation == _C->mDefaultAnimation;
|
||||
return mXanimePlayer->mCurrentAnimation == mXanimePlayer->mDefaultAnimation;
|
||||
}
|
||||
|
||||
void MarioAnimator::change(const char *name) {
|
||||
@ -72,12 +73,12 @@ void MarioAnimator::change(const char *name) {
|
||||
if(mActor->_B90) return;
|
||||
|
||||
if(!isTeresaClear()) {
|
||||
_C->changeAnimation(name);
|
||||
mXanimePlayer->changeAnimation(name);
|
||||
}
|
||||
|
||||
const char *bck = _C->getCurrentBckName();
|
||||
const char *bck = mXanimePlayer->getCurrentBckName();
|
||||
if(bck) {
|
||||
const XanimeGroupInfo *info = _C->mStopAnimation;
|
||||
const XanimeGroupInfo *info = mXanimePlayer->mCurrentAnimation;
|
||||
if(info->_18 == 2) {
|
||||
f32 arg1 = info->_14, arg2 = info->_10;
|
||||
getPlayer()->startBas(bck, false, arg1, arg2);
|
||||
@ -96,3 +97,24 @@ void MarioAnimator::change(const char *name) {
|
||||
entryCallback(name);
|
||||
|
||||
}
|
||||
|
||||
void MarioAnimator::changeUpper(const char *name) {
|
||||
mXanimePlayerUpper->changeAnimation(name);
|
||||
_6C = true;
|
||||
}
|
||||
|
||||
void MarioAnimator::changeDefault(const char *name) {
|
||||
getPlayer()->startBas(nullptr, false, 0.0f, 0.0f);
|
||||
|
||||
mXanimePlayer->setDefaultAnimation(name);
|
||||
}
|
||||
|
||||
void MarioAnimator::changeDefaultUpper(const char *name) {
|
||||
if(name) {
|
||||
mUpperDefaultSet = true;
|
||||
mXanimePlayerUpper->setDefaultAnimation(name);
|
||||
}
|
||||
else {
|
||||
mUpperDefaultSet = false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user