mirror of
https://github.com/zeldaret/ss
synced 2026-07-08 13:56:15 -04:00
Merge pull request #53 from robojumper/d_t_sound_area
Basically give up on d_t_sound_area
This commit is contained in:
@@ -81,9 +81,9 @@ public:
|
||||
/* 8002f190 */ void createChildAttached2(fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot,
|
||||
mVec3_c *scale, u32 params2, u32 roomId);
|
||||
// These may not belong here
|
||||
/* 8002f1c0 */ static dAcBase_c createActorUnkGroup3(fProfile::PROFILE_NAME_e actorId, u32 roomId, u32 params1,
|
||||
/* 8002f1c0 */ static dAcBase_c *createActorUnkGroup3(fProfile::PROFILE_NAME_e actorId, u32 roomId, u32 params1,
|
||||
mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2);
|
||||
/* 8002f260 */ static dAcBase_c createActorUnkGroup3(char *name, u32 roomId, u32 params1, mVec3_c *pos,
|
||||
/* 8002f260 */ static dAcBase_c *createActorUnkGroup3(char *name, u32 roomId, u32 params1, mVec3_c *pos,
|
||||
mAng3_c *rot, mVec3_c *scale, u32 params2, u16 id, u8 viewclipId);
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef D_T_SOUND_AREA_H
|
||||
#define D_T_SOUND_AREA_H
|
||||
|
||||
#include <d/tg/d_tg.h>
|
||||
#include <m/m_mtx.h>
|
||||
#include <m/m_vec.h>
|
||||
#include <toBeSorted/actor_on_rail.h>
|
||||
|
||||
|
||||
class dTgSndAr_c : public dTg_c {
|
||||
public:
|
||||
dTgSndAr_c() {}
|
||||
virtual ~dTgSndAr_c() {}
|
||||
virtual int draw() override;
|
||||
virtual int actorExecute() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int create() override;
|
||||
|
||||
private:
|
||||
int getTypeFromParams() {
|
||||
return params >> 0x1C;
|
||||
}
|
||||
bool checkPosInArea(mVec3_c &pos);
|
||||
|
||||
bool checkAlg0(const mVec3_c &pos);
|
||||
bool checkAlg1(const mVec3_c &pos);
|
||||
bool checkAlg2(const mVec3_c &pos);
|
||||
bool checkAlg3(const mVec3_c &pos);
|
||||
|
||||
mMtx_c mtx;
|
||||
ActorOnRail mRail;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -111,7 +111,7 @@ struct Vector3f : public nw4r::math::VEC3 {
|
||||
struct Vector2f : nw4r::math::VEC2 {
|
||||
inline Vector2f() {}
|
||||
Vector2f(f32 fx, f32 fy) : VEC2(fx, fy) {}
|
||||
inline ~Vector2f() {}
|
||||
inline ~Vector2f() {}
|
||||
|
||||
public:
|
||||
/* 805767c0 */ static const Vector2f zero;
|
||||
|
||||
+2
-1
@@ -16,7 +16,6 @@ class mAng3_c {
|
||||
public:
|
||||
mAng3_c() {}
|
||||
|
||||
s16 x, y, z;
|
||||
mAng3_c(s16 fx, s16 fy, s16 fz) : x(fx), y(fy), z(fz) {}
|
||||
|
||||
void set(s16 fx, s16 fy, s16 fz) {
|
||||
@@ -25,6 +24,8 @@ public:
|
||||
z = fz;
|
||||
}
|
||||
|
||||
mAng x, y, z;
|
||||
|
||||
static mAng3_c Zero;
|
||||
};
|
||||
|
||||
|
||||
+7
-6
@@ -9,16 +9,17 @@
|
||||
#include <common.h>
|
||||
|
||||
class mMtx_c {
|
||||
public:
|
||||
mMtx_c(){};
|
||||
/* 802f1660 */ mMtx_c(f32 xx, f32 xy, f32 xz, f32 xw, f32 yx, f32 yy, f32 yz, f32 yw, f32 zx, f32 zy, f32 zz,
|
||||
f32 zw);
|
||||
|
||||
/* 802f16b0 */ void XrotS(mAng angle); ///< Generates a rotation matrix for the X axis with the given angle.
|
||||
/* 802f1770 */ void XrotM(mAng angle); ///< Rotates the matrix on the X axis by the given angle.
|
||||
/* 802f17c0 */ void YrotS(mAng angle); ///< Generates a rotation matrix for the Y axis with the given angle.
|
||||
/* 802f1880 */ void YrotM(mAng angle); ///< Rotates the matrix on the Y axis by the given angle.
|
||||
/* 802f18d0 */ void ZrotS(mAng angle); ///< Generates a rotation matrix for the Z axis with the given angle.
|
||||
/* 802f1990 */ void ZrotM(mAng angle); ///< Rotates the matrix on the Z axis by the given angle.
|
||||
/* 802f16b0 */ void XrotS(const mAng &angle); ///< Generates a rotation matrix for the X axis with the given angle.
|
||||
/* 802f1770 */ void XrotM(const mAng &angle); ///< Rotates the matrix on the X axis by the given angle.
|
||||
/* 802f17c0 */ void YrotS(const mAng &angle); ///< Generates a rotation matrix for the Y axis with the given angle.
|
||||
/* 802f1880 */ void YrotM(const mAng &angle); ///< Rotates the matrix on the Y axis by the given angle.
|
||||
/* 802f18d0 */ void ZrotS(const mAng &angle); ///< Generates a rotation matrix for the Z axis with the given angle.
|
||||
/* 802f1990 */ void ZrotM(const mAng &angle); ///< Rotates the matrix on the Z axis by the given angle.
|
||||
|
||||
/* 802f19e0 */ void ZXYrotS(mAng xRot, mAng yRot,
|
||||
mAng zRot); ///< Generates the matrix on the Y, X and Z axes by the given angles.
|
||||
|
||||
+7
-8
@@ -9,7 +9,7 @@ class mVec3_c : public EGG::Vector3f {
|
||||
public:
|
||||
/// @brief Constructs an empty vector.
|
||||
/* 80009ee0 */ mVec3_c() {}
|
||||
// /* 80007460 */ ~mVec3_c() {}
|
||||
/* 80007460 */ ~mVec3_c() {}
|
||||
|
||||
/// @brief Constructs a vector from a float array.
|
||||
mVec3_c(const f32 *p) {
|
||||
@@ -19,16 +19,11 @@ public:
|
||||
}
|
||||
|
||||
mVec3_c(const mVec3_c &other) {
|
||||
x = other.x;
|
||||
y = other.y;
|
||||
z = other.z;
|
||||
set(other.x, other.y, other.z);
|
||||
}
|
||||
|
||||
/// @brief Constructs a vector from three floating point values.
|
||||
mVec3_c(f32 fx, f32 fy, f32 fz) {
|
||||
x = fx;
|
||||
y = fy;
|
||||
z = fz;
|
||||
set(fx, fy, fz);
|
||||
}
|
||||
|
||||
mVec3_c &operator=(const mVec3_c &r) {
|
||||
@@ -65,6 +60,10 @@ public:
|
||||
return (Vec *)&x;
|
||||
}
|
||||
|
||||
operator EGG::Vector3f *() {
|
||||
return (EGG::Vector3f *)&x;
|
||||
}
|
||||
|
||||
/// @brief Const Vec cast operator.
|
||||
operator const Vec *() const {
|
||||
return (const Vec *)&x;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef ACTOR_ON_RAIL_H
|
||||
#define ACTOR_ON_RAIL_H
|
||||
|
||||
#include <common.h>
|
||||
|
||||
class ActorOnRail {
|
||||
private:
|
||||
void *mpPathPtr;
|
||||
int mRoomIndex;
|
||||
u8 mPathSubtype;
|
||||
|
||||
public:
|
||||
/* 800A6690 */
|
||||
ActorOnRail();
|
||||
/* 800A66D0 */
|
||||
virtual ~ActorOnRail();
|
||||
|
||||
/* 800A6D90 */
|
||||
bool init(int pathIndex, int roomId, int pathSubtype);
|
||||
/* 800A68B0 */
|
||||
mVec3_c *getPntPosForIndex(int index);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user