-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
201 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "game/field/obj/ObjectDrivable.hh" | ||
|
||
namespace Field { | ||
|
||
/// @addr{0x8081A6D0} | ||
ObjectDrivable::ObjectDrivable(const System::MapdataGeoObj ¶ms) : ObjectBase(params) {} | ||
|
||
/// @addr{0x8067EB3C} | ||
ObjectDrivable::~ObjectDrivable() = default; | ||
|
||
/// @addr{0x8081A79C} | ||
void ObjectDrivable::load() { | ||
createCollision(); | ||
initCollision(); | ||
loadAABB(getCollisionRadius()); | ||
|
||
// ObjectDrivableDirector::Instance()->addObject(this); | ||
} | ||
|
||
/// @addr{0x80682918} | ||
f32 ObjectDrivable::getCollisionRadius() const { | ||
return 5000.0f; | ||
} | ||
|
||
/// @addr{0x8081A85C} | ||
void ObjectDrivable::loadAABB(f32 radius) { | ||
auto *boxColMgr = BoxColManager::Instance(); | ||
const EGG::Vector3f &pos = getPosition(); | ||
m_boxColUnit = boxColMgr->insertDrivable(radius, 0.0f, &pos, false, this); | ||
} | ||
|
||
} // namespace Field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#pragma once | ||
|
||
#include "game/field/CourseColMgr.hh" | ||
#include "game/field/KCollisionTypes.hh" | ||
#include "game/field/ObjectCollisionBase.hh" | ||
#include "game/field/obj/ObjectBase.hh" | ||
|
||
namespace Field { | ||
|
||
class ObjectDrivable : public ObjectBase { | ||
public: | ||
ObjectDrivable(const System::MapdataGeoObj ¶ms); | ||
~ObjectDrivable() override; | ||
|
||
void load() override; | ||
[[nodiscard]] f32 getCollisionRadius() const override; | ||
|
||
virtual void initCollision() {} | ||
virtual void loadAABB(f32 radius); | ||
|
||
[[nodiscard]] virtual bool checkPointPartial(const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, | ||
CollisionInfoPartial *info, KCLTypeMask *maskOut) = 0; | ||
[[nodiscard]] virtual bool checkPointPartialPush(const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask flags, | ||
CollisionInfoPartial *info, KCLTypeMask *maskOut) = 0; | ||
[[nodiscard]] virtual bool checkPointFull(const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, | ||
KCLTypeMask *maskOut) = 0; | ||
[[nodiscard]] virtual bool checkPointFullPush(const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, | ||
KCLTypeMask *maskOut) = 0; | ||
|
||
[[nodiscard]] virtual bool checkSpherePartial(f32 radius, const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, | ||
CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) = 0; | ||
[[nodiscard]] virtual bool checkSpherePartialPush(f32 radius, const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, | ||
CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) = 0; | ||
[[nodiscard]] virtual bool checkSphereFull(f32 radius, const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, | ||
KCLTypeMask *maskOut, u32 timeOffset) = 0; | ||
[[nodiscard]] virtual bool checkSphereFullPush(f32 radius, const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, | ||
KCLTypeMask *maskOut, u32 timeOffset) = 0; | ||
|
||
virtual void narrScLocal(f32 radius, const EGG::Vector3f &pos, KCLTypeMask mask, | ||
u32 timeOffset) {} | ||
|
||
[[nodiscard]] virtual bool checkPointCachedPartial(const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, | ||
CollisionInfoPartial *info, KCLTypeMask *maskOut) = 0; | ||
[[nodiscard]] virtual bool checkPointCachedPartialPush(const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, | ||
CollisionInfoPartial *info, KCLTypeMask *maskOut) = 0; | ||
[[nodiscard]] virtual bool checkPointCachedFull(const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, | ||
KCLTypeMask *maskOut) = 0; | ||
[[nodiscard]] virtual bool checkPointCachedFullPush(const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, | ||
KCLTypeMask *maskOut) = 0; | ||
|
||
[[nodiscard]] virtual bool checkSphereCachedPartial(f32 radius, const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, | ||
CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) = 0; | ||
[[nodiscard]] virtual bool checkSphereCachedPartialPush(f32 radius, const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, | ||
CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) = 0; | ||
[[nodiscard]] virtual bool checkSphereCachedFull(f32 radius, const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, | ||
KCLTypeMask *maskOut, u32 timeOffset) = 0; | ||
[[nodiscard]] virtual bool checkSphereCachedFullPush(f32 radius, const EGG::Vector3f &pos, | ||
const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, | ||
KCLTypeMask *maskOut, u32 timeOffset) = 0; | ||
}; | ||
|
||
} // namespace Field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.