d_camera work (#2226)

This commit is contained in:
Caroline Madsen
2024-10-27 00:35:25 -04:00
committed by GitHub
parent 731da09105
commit f4b2f9c8f2
29 changed files with 1858 additions and 2121 deletions
+12 -12
View File
@@ -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();
}
+6 -6
View File
@@ -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);
}
mPreWallChk = !(mStts & STTS_WALL_OFF);
mPreGroundChk = !(mStts & STTS_GROUND_OFF);
mPreRoofChk = !(mStts & STTS_ROOF_OFF);
}