mirror of
https://github.com/MonsterDruide1/OdysseyDecomp.git
synced 2024-11-23 05:19:52 +00:00
Player: Implement PlayerCounterQuickTurnJump (#62)
This commit is contained in:
parent
ce4f31b30d
commit
1a4ea12519
@ -27277,9 +27277,9 @@ Address,Quality,Size,Name
|
||||
0x000000710043ef2c,U,000084,_ZNK21PlayerCounterIceWater15isTriggerDamageEv
|
||||
0x000000710043ef80,U,000208,_ZN21PlayerCounterIceWater23updateRecoveryCountImplEv
|
||||
0x000000710043f050,U,000020,_ZN21PlayerCounterIceWater13killIceEffectEv
|
||||
0x000000710043f064,U,000012,_ZN26PlayerCounterQuickTurnJumpC2EPK11PlayerConstPK13PlayerTrigger
|
||||
0x000000710043f070,U,000084,_ZN26PlayerCounterQuickTurnJump6updateEv
|
||||
0x000000710043f0c4,U,000064,_ZNK26PlayerCounterQuickTurnJump16isEnableTurnJumpEv
|
||||
0x000000710043f064,O,000012,_ZN26PlayerCounterQuickTurnJumpC2EPK11PlayerConstPK13PlayerTrigger
|
||||
0x000000710043f070,O,000084,_ZN26PlayerCounterQuickTurnJump6updateEv
|
||||
0x000000710043f0c4,O,000064,_ZNK26PlayerCounterQuickTurnJump16isEnableTurnJumpEv
|
||||
0x000000710043f104,U,000024,_ZN18PlayerDamageKeeperC1EPN2al9LiveActorEP12PlayerEffect
|
||||
0x000000710043f11c,U,000028,_ZN18PlayerDamageKeeper10invalidateEi
|
||||
0x000000710043f138,U,000028,_ZN18PlayerDamageKeeper21invalidateIncludePushEi
|
||||
|
Can't render this file because it is too large.
|
22
src/Player/PlayerCounterQuickTurnJump.cpp
Normal file
22
src/Player/PlayerCounterQuickTurnJump.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include "Player/PlayerCounterQuickTurnJump.h"
|
||||
|
||||
#include "Library/Math/MathUtil.h"
|
||||
|
||||
#include "Player/PlayerConst.h"
|
||||
#include "Player/PlayerTrigger.h"
|
||||
|
||||
PlayerCounterQuickTurnJump::PlayerCounterQuickTurnJump(const PlayerConst* pConst,
|
||||
const PlayerTrigger* trigger)
|
||||
: mConst(pConst), mTrigger(trigger) {}
|
||||
|
||||
void PlayerCounterQuickTurnJump::update() {
|
||||
if (mTrigger->isOn(PlayerTrigger::EActionTrigger_QuickTurn)) {
|
||||
mCounter = mConst->getQuickTurnJumpFrame();
|
||||
} else {
|
||||
mCounter = al::converge(mCounter, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
bool PlayerCounterQuickTurnJump::isEnableTurnJump() const {
|
||||
return mTrigger->isOn(PlayerTrigger::EActionTrigger_QuickTurn) || mCounter > 0;
|
||||
}
|
19
src/Player/PlayerCounterQuickTurnJump.h
Normal file
19
src/Player/PlayerCounterQuickTurnJump.h
Normal file
@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <basis/seadTypes.h>
|
||||
|
||||
class PlayerConst;
|
||||
class PlayerTrigger;
|
||||
|
||||
class PlayerCounterQuickTurnJump {
|
||||
public:
|
||||
PlayerCounterQuickTurnJump(const PlayerConst* pConst, const PlayerTrigger* trigger);
|
||||
|
||||
void update();
|
||||
bool isEnableTurnJump() const;
|
||||
|
||||
private:
|
||||
const PlayerConst* mConst;
|
||||
const PlayerTrigger* mTrigger;
|
||||
s32 mCounter = 0;
|
||||
};
|
@ -7,7 +7,9 @@ class PlayerTrigger {
|
||||
public:
|
||||
enum ECollisionTrigger : u32 {};
|
||||
enum EAttackSensorTrigger : u32 {};
|
||||
enum EActionTrigger : u32 {};
|
||||
enum EActionTrigger : u32 {
|
||||
EActionTrigger_QuickTurn = 34,
|
||||
};
|
||||
enum EReceiveSensorTrigger : u32 {};
|
||||
enum EPreMovementTrigger : u32 {};
|
||||
enum EDemoEndTrigger : u32 {};
|
||||
|
Loading…
Reference in New Issue
Block a user