mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 20:41:29 -04:00
f_op_actor_mng split & started decomp (#112)
* fop-actor-mng * rodata * more actor mng progress * actor mng progress * format * cleanup * fix Mtx function signatures * PR suggestion Co-authored-by: Pheenoh <pheenoh@gmail.com>
This commit is contained in:
@@ -3,12 +3,19 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
class csXyz {
|
||||
private:
|
||||
struct SVec {
|
||||
s16 mX, mY, mZ;
|
||||
};
|
||||
|
||||
class csXyz : public SVec {
|
||||
public:
|
||||
csXyz() {}
|
||||
csXyz(const csXyz& other) : SVec(other){};
|
||||
csXyz(s16, s16, s16);
|
||||
~csXyz() {}
|
||||
s16 GetX() const { return mX; }
|
||||
s16 GetY() const { return mY; }
|
||||
s16 GetZ() const { return mZ; }
|
||||
csXyz operator+(csXyz&);
|
||||
void operator+=(csXyz&);
|
||||
csXyz operator-(csXyz&);
|
||||
|
||||
@@ -55,6 +55,11 @@ public:
|
||||
y -= f;
|
||||
z -= f;
|
||||
}
|
||||
void operator+=(const Vec& vec) {
|
||||
x += vec.x;
|
||||
y += vec.y;
|
||||
z += vec.z;
|
||||
}
|
||||
cXyz getCrossProduct(const Vec&) const;
|
||||
cXyz outprod(const Vec&) const;
|
||||
cXyz norm(void) const;
|
||||
@@ -75,6 +80,12 @@ public:
|
||||
x = f;
|
||||
}
|
||||
|
||||
void set(f32 pX, f32 pY, f32 pZ) {
|
||||
x = pX;
|
||||
y = pY;
|
||||
z = pZ;
|
||||
}
|
||||
|
||||
void setMin(const cXyz& other) {
|
||||
if (x > other.x) {
|
||||
x = other.x;
|
||||
@@ -100,6 +111,12 @@ public:
|
||||
}
|
||||
|
||||
bool checkEpsilon() const { return !(PSVECSquareMag(this) < lbl_80455074); }
|
||||
f32 getSquareMag() const { return PSVECSquareMag(this); }
|
||||
f32 abs2() const { return this->getSquareMag(); }
|
||||
f32 abs2XZ() const {
|
||||
cXyz tmp(this->x, 0, this->z);
|
||||
return tmp.abs2();
|
||||
}
|
||||
};
|
||||
|
||||
extern cXyz lbl_80430CF4; // SComponent::cXyz::Zero
|
||||
|
||||
Reference in New Issue
Block a user