Skip to content

Commit

Permalink
Player: Implement PlayerJudgeForceRolling (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsterDruide1 authored Jun 10, 2024
1 parent 307f18a commit 44cc1b0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data/odyssey_functions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -27842,10 +27842,10 @@ Address,Quality,Size,Name
0x00000071004595dc,U,000064,_ZNK20PlayerJudgeForceLand5judgeEv
0x000000710045961c,U,000004,_ZN20PlayerJudgeForceLand5resetEv
0x0000007100459620,U,000004,_ZN20PlayerJudgeForceLand6updateEv
0x0000007100459624,U,000024,_ZN23PlayerJudgeForceRollingC1EPKN2al9LiveActorEPK19IUsePlayerCollision
0x000000710045963c,U,000012,_ZNK23PlayerJudgeForceRolling5judgeEv
0x0000007100459648,U,000004,_ZN23PlayerJudgeForceRolling5resetEv
0x000000710045964c,U,000004,_ZN23PlayerJudgeForceRolling6updateEv
0x0000007100459624,O,000024,_ZN23PlayerJudgeForceRollingC1EPKN2al9LiveActorEPK19IUsePlayerCollision
0x000000710045963c,O,000012,_ZNK23PlayerJudgeForceRolling5judgeEv
0x0000007100459648,O,000004,_ZN23PlayerJudgeForceRolling5resetEv
0x000000710045964c,O,000004,_ZN23PlayerJudgeForceRolling6updateEv
0x0000007100459650,O,000028,_ZN26PlayerJudgeForceSlopeSlideC1EPKN2al9LiveActorEPK11PlayerConstPK19IUsePlayerCollision
0x000000710045966c,O,000008,_ZN26PlayerJudgeForceSlopeSlide5resetEv
0x0000007100459674,O,000048,_ZN26PlayerJudgeForceSlopeSlide6updateEv
Expand Down
14 changes: 14 additions & 0 deletions src/Player/PlayerJudgeForceRolling.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "Player/PlayerJudgeForceRolling.h"

#include "Util/PlayerCollisionUtil.h"

PlayerJudgeForceRolling::PlayerJudgeForceRolling(const al::LiveActor* player,
const IUsePlayerCollision* collider)
: mPlayer(player), mCollider(collider) {}

bool PlayerJudgeForceRolling::judge() const {
return rs::isOnGroundForceRollingCode(mPlayer, mCollider);
}

void PlayerJudgeForceRolling::reset() {}
void PlayerJudgeForceRolling::update() {}
20 changes: 20 additions & 0 deletions src/Player/PlayerJudgeForceRolling.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once

#include "Player/IJudge.h"

namespace al {
class LiveActor;
}
class IUsePlayerCollision;

class PlayerJudgeForceRolling : public IJudge {
public:
PlayerJudgeForceRolling(const al::LiveActor* player, const IUsePlayerCollision* collider);
void reset() override;
void update() override;
bool judge() const override;

private:
const al::LiveActor* mPlayer;
const IUsePlayerCollision* mCollider;
};
1 change: 1 addition & 0 deletions src/Util/PlayerCollisionUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const sead::Vector3f& getCollidedGroundNormal(const IUsePlayerCollision*);
bool isCollidedGround(const IUsePlayerCollision*);
bool isCollidedGroundRunAngle(const al::LiveActor*, const IUsePlayerCollision*, const PlayerConst*);
bool isOnGroundForceSlideCode(const al::LiveActor*, const IUsePlayerCollision*, const PlayerConst*);
bool isOnGroundForceRollingCode(const al::LiveActor*, const IUsePlayerCollision*);
bool isPlayerOnGround(const al::LiveActor*);
bool isOnGround(const al::LiveActor*, const IUsePlayerCollision*);
bool isJustLand(const IUsePlayerCollision*);
Expand Down

0 comments on commit 44cc1b0

Please sign in to comment.