summaryrefslogtreecommitdiff
path: root/src/SSystem
diff options
context:
space:
mode:
authorCaroline Madsen <69010899+randomsalience@users.noreply.github.com>2024-10-27 00:35:25 -0400
committerGitHub <noreply@github.com>2024-10-26 21:35:25 -0700
commitf5e80cf9fda54894e97af8629386e2a7c562479a (patch)
tree033b66397086e01b49bb30968cc30e3480a11c76 /src/SSystem
parent606178dc88e162969a636644f410c72cbb5eca64 (diff)
d_camera work (#2226)
Diffstat (limited to 'src/SSystem')
-rw-r--r--src/SSystem/SComponent/c_angle.cpp24
-rw-r--r--src/SSystem/SComponent/c_bg_s_lin_chk.cpp12
2 files changed, 18 insertions, 18 deletions
diff --git a/src/SSystem/SComponent/c_angle.cpp b/src/SSystem/SComponent/c_angle.cpp
index 9778537b48..bf2e8af648 100644
--- a/src/SSystem/SComponent/c_angle.cpp
+++ b/src/SSystem/SComponent/c_angle.cpp
@@ -264,13 +264,13 @@ cSGlobe::cSGlobe(const cXyz& xyz) {
cSGlobe& cSGlobe::Formal() {
if (mRadius < 0.0f) {
mRadius = -mRadius;
- mAzimuth = -mAzimuth;
- mInclination.Val(mInclination.Inv());
+ mInclination = -mInclination;
+ mAzimuth.Val(mAzimuth.Inv());
}
- if (mAzimuth.Val() < -0x4000 || 0x4000 < mAzimuth.Val()) {
- mAzimuth = cSAngle((s16)-0x8000) - mAzimuth;
- mInclination.Val(mInclination.Inv());
+ if (mInclination.Val() < -0x4000 || 0x4000 < mInclination.Val()) {
+ mInclination = cSAngle((s16)-0x8000) - mInclination;
+ mAzimuth.Val(mAzimuth.Inv());
}
return *this;
@@ -279,24 +279,24 @@ cSGlobe& cSGlobe::Formal() {
/* 8027196C-802719A4 0038+00 s=1 e=0 z=0 None .text Val__7cSGlobeFRC7cSGlobe */
void cSGlobe::Val(const cSGlobe& other) {
mRadius = other.mRadius;
- mAzimuth = other.mAzimuth;
mInclination = other.mInclination;
+ mAzimuth = other.mAzimuth;
Formal();
}
/* 802719A4-80271A08 0064+00 s=2 e=3 z=0 None .text Val__7cSGlobeFfss */
void cSGlobe::Val(f32 f, s16 s1, s16 s2) {
mRadius = f;
- mAzimuth = cSAngle(s1);
- mInclination = cSAngle(s2);
+ mInclination = cSAngle(s1);
+ mAzimuth = cSAngle(s2);
Formal();
}
/* 80271A08-80271A70 0068+00 s=1 e=11 z=0 None .text Val__7cSGlobeFfRC7cSAngleRC7cSAngle */
void cSGlobe::Val(f32 f, const cSAngle& a1, const cSAngle& a2) {
mRadius = f;
- mAzimuth = cSAngle(a1.Val());
- mInclination = cSAngle(a2.Val());
+ mInclination = cSAngle(a1.Val());
+ mAzimuth = cSAngle(a2.Val());
Formal();
}
@@ -316,12 +316,12 @@ cXyz cSGlobe::Xyz() const {
/* 80271AF4-80271B30 003C+00 s=1 e=0 z=0 None .text Polar__7cSGlobeCFP7cSPolar */
void cSGlobe::Polar(cSPolar* csp) const {
- csp->Val(mRadius, 0x4000 - mAzimuth.Val(), mInclination.Val());
+ csp->Val(mRadius, 0x4000 - mInclination.Val(), mAzimuth.Val());
}
/* 80271B30-80271B7C 004C+00 s=0 e=3 z=0 None .text Norm__7cSGlobeCFv */
cXyz cSGlobe::Norm() const {
- cSGlobe glob(1.0f, mAzimuth, mInclination);
+ cSGlobe glob(1.0f, mInclination, mAzimuth);
return glob.Xyz();
}
diff --git a/src/SSystem/SComponent/c_bg_s_lin_chk.cpp b/src/SSystem/SComponent/c_bg_s_lin_chk.cpp
index 6c21826bab..a17e202f2c 100644
--- a/src/SSystem/SComponent/c_bg_s_lin_chk.cpp
+++ b/src/SSystem/SComponent/c_bg_s_lin_chk.cpp
@@ -20,7 +20,7 @@ void cBgS_LinChk::ct() {
field_0x40 = start_end;
SetActorPid(UINT32_MAX);
- field_0x4c = 0;
+ mStts = 0;
mFrontFlag = 1;
mBackFlag = 0;
}
@@ -30,13 +30,13 @@ void cBgS_LinChk::Set2(cXyz const* startPos, cXyz const* endPos, unsigned int ac
mLin.SetStartEnd(*startPos, *endPos);
field_0x40 = *endPos;
SetActorPid(actorPid);
- field_0x4c &= ~0x10;
+ mStts &= ~STTS_HIT;
ClearPi();
}
/* 80267F40-80267F80 262880 0040+00 0/0 1/1 0/0 .text PreCalc__11cBgS_LinChkFv */
void cBgS_LinChk::PreCalc() {
- mPreWallChk = !(field_0x4c & 0x40000000);
- mPreGroundChk = !(field_0x4c & 0x80000000);
- mPreRoofChk = !(field_0x4c & 0x20000000);
-} \ No newline at end of file
+ mPreWallChk = !(mStts & STTS_WALL_OFF);
+ mPreGroundChk = !(mStts & STTS_GROUND_OFF);
+ mPreRoofChk = !(mStts & STTS_ROOF_OFF);
+}