mirror of
https://github.com/zeldaret/ss
synced 2026-07-09 22:21:32 -04:00
porgress
This commit is contained in:
@@ -149,10 +149,14 @@ public:
|
||||
return mRotation;
|
||||
}
|
||||
|
||||
mVec3_c getPostionDifference(const dAcBase_c &other) {
|
||||
mVec3_c getPostionDifference(const dAcBase_c &other) const {
|
||||
return mPosition - other.mPosition;
|
||||
}
|
||||
|
||||
f32 getHeightDifference(const dAcBase_c &b) const {
|
||||
return mPosition.y - b.mPosition.y;
|
||||
}
|
||||
|
||||
f32 getSquareDistanceTo(const mVec3_c &point) const {
|
||||
mVec3_c diff = mPosition - point;
|
||||
return diff.x * diff.x + diff.z * diff.z;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define D_A_PLAYER_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_base.h"
|
||||
#include "d/a/d_a_item.h"
|
||||
#include "d/col/c/c_bg_s_poly_info.h"
|
||||
#include "d/d_player_mdl.h"
|
||||
@@ -93,6 +94,12 @@ public:
|
||||
return LINK;
|
||||
}
|
||||
|
||||
static dAcPy_c &GetLinkRM() {
|
||||
return *LINK;
|
||||
}
|
||||
static const dAcPy_c &GetLinkR() {
|
||||
return *LINK;
|
||||
}
|
||||
static dAcPy_c *GetLinkM() {
|
||||
return LINK;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ public:
|
||||
virtual ~dAcNpcCeFriend_c() {}
|
||||
|
||||
bool fn_11_17C0(dAcObjBase_c *);
|
||||
bool fn_11_2A40();
|
||||
|
||||
private:
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dAcNpcCeFriend_c);
|
||||
|
||||
@@ -65,23 +65,29 @@ public:
|
||||
/** fn_293_4200 */
|
||||
void fn_293_4200();
|
||||
|
||||
/** fn_293_45A0 */
|
||||
/** Check to see if the Barrel should break */
|
||||
bool fn_293_45A0();
|
||||
|
||||
/** fn_293_4A90 */
|
||||
bool fn_293_4A90(const mAng &);
|
||||
|
||||
/** fn_293_4BC0 */
|
||||
/** Checks if On Lava or Sink Sand */
|
||||
bool fn_293_4BC0();
|
||||
|
||||
/** Checks if On Lava */
|
||||
bool fn_293_4C20() const;
|
||||
|
||||
/** fn_293_4C60 */
|
||||
bool fn_293_4C60();
|
||||
|
||||
/** fn_293_4D00 */
|
||||
/** Check to see if its below some range */
|
||||
bool fn_293_4CE0() const;
|
||||
|
||||
/** Check to see if its being moved. (like Conveyor) */
|
||||
bool fn_293_4D00();
|
||||
|
||||
/** fn_293_4ED0 */
|
||||
bool fn_293_4ED0();
|
||||
/** Check to see if it is being moved upwards? */
|
||||
bool fn_293_4ED0() const;
|
||||
|
||||
/** fn_293_4F80 */
|
||||
bool fn_293_4F80();
|
||||
@@ -89,12 +95,18 @@ public:
|
||||
/** fn_293_50B0 */
|
||||
bool fn_293_50B0();
|
||||
|
||||
/** fn_293_5150 */
|
||||
bool fn_293_5150();
|
||||
/** Perform Timeslip */
|
||||
void fn_293_5150();
|
||||
|
||||
/** fn_293_5360 */
|
||||
void fn_293_5360();
|
||||
|
||||
/** fn_293_5440 */
|
||||
void fn_293_5440();
|
||||
|
||||
/** fn_293_54D0 */
|
||||
void fn_293_54D0();
|
||||
|
||||
/** fn_293_5850 */
|
||||
void fn_293_5850(f32 *, bool);
|
||||
|
||||
@@ -151,7 +163,7 @@ private:
|
||||
/* 0xD80 */ mQuat_c quat_0xD80;
|
||||
/* 0xD90 */ mQuat_c quat_0xD90;
|
||||
/* 0xDA0 */ mQuat_c quat_0xDA0;
|
||||
/* 0xDB0 */ u8 _DB0[0xDBC - 0xDB0];
|
||||
/* 0xDB0 */ mVec3_c field_0xDB0; //< player direction vector
|
||||
/* 0xDBC */ mVec3_c field_0xDBC;
|
||||
/* 0xDC8 */ mVec3_c field_0xDC8;
|
||||
/* 0xDD4 */ f32 field_0xDD4;
|
||||
@@ -162,8 +174,12 @@ private:
|
||||
/* 0xDEE */ mAng field_0xDEE;
|
||||
/* 0xDF0 */ mAng field_0xDF0;
|
||||
/* 0xDF2 */ mAng field_0xDF2;
|
||||
/* 0xDF4 */ u8 _DF4[0xDFE - 0xDF4];
|
||||
/* 0xDF4 */ u16 field_0xDFE;
|
||||
/* 0xDF4 */ mAng field_0xDF4;
|
||||
/* 0xDF6 */ mAng field_0xDF6;
|
||||
/* 0xDF8 */ mAng field_0xDF8;
|
||||
/* 0xDFA */ mAng field_0xDFA;
|
||||
/* 0xDFC */ u16 field_0xDFC;
|
||||
/* 0xDFE */ u16 field_0xDFE;
|
||||
/* 0xE00 */ bool field_0xE00; //< Can Damage ?
|
||||
/* 0xE01 */ bool field_0xE01;
|
||||
/* 0xE02 */ bool field_0xE02;
|
||||
@@ -176,8 +192,8 @@ private:
|
||||
/* 0xE09 */ bool field_0xE09; //< for OBJ_VSD Present
|
||||
/* 0xE0A */ bool field_0xE0A;
|
||||
/* 0xE0B */ bool field_0xE0B;
|
||||
/* 0xE0C */ bool field_0xE0C;
|
||||
/* 0xE0D */ bool field_0xE0D;
|
||||
/* 0xE0C */ bool field_0xE0C; //< Timeslip Active
|
||||
/* 0xE0D */ bool field_0xE0D; //< Timeslip_rev Active
|
||||
/* 0xE0E */ bool field_0xE0E;
|
||||
/* 0xE0F */ u8 mType;
|
||||
/* 0xE10 */ u8 field_0xE10;
|
||||
|
||||
@@ -113,14 +113,18 @@ public:
|
||||
return mYOffset;
|
||||
}
|
||||
|
||||
bool checkStopped() const {
|
||||
return getVelocityMag() <= EGG::Math<f32>::epsilon();
|
||||
bool isFullyStopped(f32 speed = EGG::Math<f32>::epsilon()) const {
|
||||
return getVelocityMag() <= speed;
|
||||
}
|
||||
|
||||
bool checkSlower(f32 speed) const {
|
||||
bool isSpeedStopped(f32 speed = EGG::Math<f32>::epsilon()) const {
|
||||
return std::fabsf(mSpeed) <= speed;
|
||||
}
|
||||
|
||||
bool isVerticalSpeedStopped(f32 speed = EGG::Math<f32>::epsilon()) const {
|
||||
return std::fabsf(mVelocity.y) <= speed;
|
||||
}
|
||||
|
||||
bool checkYOffsetField_0x100() const {
|
||||
return mYOffset <= field_0x100;
|
||||
}
|
||||
@@ -205,7 +209,7 @@ public:
|
||||
u32 roomId
|
||||
);
|
||||
void fn_8002efa0();
|
||||
bool fn_8002eff0(f32 *, s16 *, f32 *, f32 *, f32 *);
|
||||
bool fn_8002eff0(const f32 &, const s16 &, cCcD_Obj *, const f32 &, const f32 &);
|
||||
void createChildAttached2(
|
||||
fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2,
|
||||
u32 roomId
|
||||
|
||||
@@ -6,13 +6,11 @@
|
||||
#include "d/col/bg/d_bg_w.h"
|
||||
#include "d/col/cc/d_cc_d.h"
|
||||
#include "d/d_shadow.h"
|
||||
#include "d/flag/sceneflag_manager.h"
|
||||
#include "m/m3d/m_smdl.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateMgr.hpp"
|
||||
|
||||
class dAcOChair_c : public dAcObjBase_c {
|
||||
public:
|
||||
|
||||
@@ -521,10 +521,16 @@ public:
|
||||
dBgS_GndChk &GetGnd() {
|
||||
return mGnd;
|
||||
}
|
||||
const dBgS_GndChk &GetGnd() const {
|
||||
return mGnd;
|
||||
}
|
||||
|
||||
dBgS_RoofChk &GetRoof() {
|
||||
return mRoof;
|
||||
}
|
||||
const dBgS_RoofChk &GetRoof() const {
|
||||
return mRoof;
|
||||
}
|
||||
|
||||
void SetField_0xD4(f32 v) {
|
||||
field_0x0D4 = v;
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
cM3d_CalcPla(v1, v2, v3, &mNormal, &mD);
|
||||
}
|
||||
f32 getCrossY_NonIsZero(const mVec3_c *param_1) {
|
||||
return ((-mNormal.x * param_1->x - mNormal.z * param_1->z) - mD) / mNormal.y;
|
||||
return -(mNormal.x * param_1->x + mNormal.z * param_1->z) / mNormal.y;
|
||||
}
|
||||
|
||||
f32 GetXZDist() const {
|
||||
|
||||
+9
-1
@@ -6,6 +6,7 @@
|
||||
#include "m/m_vec.h"
|
||||
#include "math.h"
|
||||
#include "nw4r/math/math_triangular.h"
|
||||
#include "s/s_Math.h"
|
||||
|
||||
struct mAng {
|
||||
mAng() {}
|
||||
@@ -35,6 +36,9 @@ struct mAng {
|
||||
void set(s16 val) {
|
||||
mVal = val;
|
||||
}
|
||||
void setF(const f32 &val) {
|
||||
mVal = val;
|
||||
}
|
||||
|
||||
s16 *ref() {
|
||||
return &mVal;
|
||||
@@ -65,6 +69,10 @@ struct mAng {
|
||||
return *this;
|
||||
}
|
||||
|
||||
s32 absDiff(const mAng &other) const {
|
||||
return sLib::absDiff(mVal, other.mVal);
|
||||
}
|
||||
|
||||
static s32 abs(const mAng b) {
|
||||
return labs(b);
|
||||
}
|
||||
@@ -98,7 +106,7 @@ struct mAng {
|
||||
return mVal * sAngToRad;
|
||||
}
|
||||
|
||||
static s16 fromRad(f32 rad) {
|
||||
static mAng fromRad(f32 rad) {
|
||||
return rad * sRadToAng;
|
||||
}
|
||||
|
||||
|
||||
+6
-2
@@ -147,11 +147,15 @@ public:
|
||||
MTXMultVecSR(*this, in, out);
|
||||
}
|
||||
mVec3_c multVecSR(const mVec3_c &v) const {
|
||||
mVec3_c ret = v;
|
||||
MTXMultVecSR(*this, ret, ret);
|
||||
mVec3_c ret;
|
||||
multVecSR(v, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void multVecSR(mVec3_c &v) const {
|
||||
multVecSR(v, v);
|
||||
}
|
||||
|
||||
mMtx_c &operator+=(const mMtx_c &rhs) {
|
||||
MTXConcat(*this, rhs, *this);
|
||||
return *this;
|
||||
|
||||
@@ -174,7 +174,12 @@ private:
|
||||
|
||||
public:
|
||||
static AttentionManager *sInstance;
|
||||
|
||||
enum Flags_e {
|
||||
FLAGS_0,
|
||||
FLAGS_1,
|
||||
FLAGS_2,
|
||||
FLAGS_3,
|
||||
};
|
||||
bool create();
|
||||
bool createHeap();
|
||||
bool execute();
|
||||
@@ -183,7 +188,7 @@ public:
|
||||
void addTarget(dAcObjBase_c &actor, const InteractionTargetDef &def, u32, mVec3_c *);
|
||||
|
||||
void addPickUpTarget(dAcObjBase_c &actor, f32 field_0x14);
|
||||
void addSitTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14);
|
||||
void addSitTarget(dAcObjBase_c &actor, f32 field_0x14, Flags_e flags);
|
||||
|
||||
void addTalkTarget_unused(dAcObjBase_c &actor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user