mirror of https://github.com/AxioDL/metaforce.git
ANCS PAS I/O fix
This commit is contained in:
parent
dac8fc3eb5
commit
f184291461
|
@ -48,15 +48,15 @@ void ANCS::CharacterSet::CharacterInfo::PASDatabase::AnimState::ParmInfo::Enumer
|
||||||
case DataType::UInt32:
|
case DataType::UInt32:
|
||||||
case DataType::Enum:
|
case DataType::Enum:
|
||||||
writer.writeUint32Big(range[0].uint32);
|
writer.writeUint32Big(range[0].uint32);
|
||||||
writer.writeUint32Big(range[0].uint32);
|
writer.writeUint32Big(range[1].uint32);
|
||||||
break;
|
break;
|
||||||
case DataType::Float:
|
case DataType::Float:
|
||||||
writer.writeFloatBig(range[0].float32);
|
writer.writeFloatBig(range[0].float32);
|
||||||
writer.writeFloatBig(range[0].float32);
|
writer.writeFloatBig(range[1].float32);
|
||||||
break;
|
break;
|
||||||
case DataType::Bool:
|
case DataType::Bool:
|
||||||
writer.writeBool(range[0].bool1);
|
writer.writeBool(range[0].bool1);
|
||||||
writer.writeBool(range[0].bool1);
|
writer.writeBool(range[1].bool1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,15 +124,15 @@ void ANCS::CharacterSet::CharacterInfo::PASDatabase::AnimState::ParmInfo::Enumer
|
||||||
case DataType::UInt32:
|
case DataType::UInt32:
|
||||||
case DataType::Enum:
|
case DataType::Enum:
|
||||||
writer.writeUint32(nullptr, range[0].uint32);
|
writer.writeUint32(nullptr, range[0].uint32);
|
||||||
writer.writeUint32(nullptr, range[0].uint32);
|
writer.writeUint32(nullptr, range[1].uint32);
|
||||||
break;
|
break;
|
||||||
case DataType::Float:
|
case DataType::Float:
|
||||||
writer.writeFloat(nullptr, range[0].float32);
|
writer.writeFloat(nullptr, range[0].float32);
|
||||||
writer.writeFloat(nullptr, range[0].float32);
|
writer.writeFloat(nullptr, range[1].float32);
|
||||||
break;
|
break;
|
||||||
case DataType::Bool:
|
case DataType::Bool:
|
||||||
writer.writeBool(nullptr, range[0].bool1);
|
writer.writeBool(nullptr, range[0].bool1);
|
||||||
writer.writeBool(nullptr, range[0].bool1);
|
writer.writeBool(nullptr, range[1].bool1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,8 +84,10 @@ void ViewManager::TestGameView::think() {
|
||||||
" Roll: %f, Pitch: %f, Yaw: %f\n"
|
" Roll: %f, Pitch: %f, Yaw: %f\n"
|
||||||
"Camera Position: x %f, y %f, z %f\n"
|
"Camera Position: x %f, y %f, z %f\n"
|
||||||
" Roll: %f, Pitch: %f, Yaw: %f\n",
|
" Roll: %f, Pitch: %f, Yaw: %f\n",
|
||||||
pl.GetTranslation().x(), pl.GetTranslation().y(), pl.GetTranslation().z(), plQ.roll(), plQ.pitch(), plQ.yaw(),
|
pl.GetTranslation().x(), pl.GetTranslation().y(), pl.GetTranslation().z(),
|
||||||
camXf.origin.x(), camXf.origin.y(), camXf.origin.z(), camQ.roll(), camQ.pitch(), camQ.yaw());
|
zeus::radToDeg(plQ.roll()), zeus::radToDeg(plQ.pitch()), zeus::radToDeg(plQ.yaw()),
|
||||||
|
camXf.origin.x(), camXf.origin.y(), camXf.origin.z(),
|
||||||
|
zeus::radToDeg(camQ.roll()), zeus::radToDeg(camQ.pitch()), zeus::radToDeg(camQ.yaw()));
|
||||||
}
|
}
|
||||||
if (worldInfo && worldInfo->toBoolean()) {
|
if (worldInfo && worldInfo->toBoolean()) {
|
||||||
TLockedToken<CStringTable> tbl =
|
TLockedToken<CStringTable> tbl =
|
||||||
|
|
|
@ -662,12 +662,12 @@ void CBooModel::UVAnimationBuffer::ProcessAnimation(u8*& bufOut, const UVAnimati
|
||||||
}
|
}
|
||||||
case UVAnimation::Mode::HStrip: {
|
case UVAnimation::Mode::HStrip: {
|
||||||
float value = anim.vals[0] * anim.vals[2] * (anim.vals[3] + CGraphics::GetSecondsMod900());
|
float value = anim.vals[0] * anim.vals[2] * (anim.vals[3] + CGraphics::GetSecondsMod900());
|
||||||
texMtxOut.m[3].x() = (float)(short)(anim.vals[1] * fmod(value, 1.0f)) * anim.vals[2];
|
texMtxOut.m[3].x() = std::trunc(anim.vals[1] * fmod(value, 1.0f)) * anim.vals[2];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case UVAnimation::Mode::VStrip: {
|
case UVAnimation::Mode::VStrip: {
|
||||||
float value = anim.vals[0] * anim.vals[2] * (anim.vals[3] + CGraphics::GetSecondsMod900());
|
float value = anim.vals[0] * anim.vals[2] * (anim.vals[3] + CGraphics::GetSecondsMod900());
|
||||||
texMtxOut.m[3].y() = (float)(short)(anim.vals[1] * fmod(value, 1.0f)) * anim.vals[2];
|
texMtxOut.m[3].y() = std::trunc(anim.vals[1] * fmod(value, 1.0f)) * anim.vals[2];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case UVAnimation::Mode::Model: {
|
case UVAnimation::Mode::Model: {
|
||||||
|
@ -685,9 +685,9 @@ void CBooModel::UVAnimationBuffer::ProcessAnimation(u8*& bufOut, const UVAnimati
|
||||||
|
|
||||||
const zeus::CVector3f& viewOrigin = CGraphics::g_ViewMatrix.origin;
|
const zeus::CVector3f& viewOrigin = CGraphics::g_ViewMatrix.origin;
|
||||||
float xy = (viewOrigin.x() + viewOrigin.y()) * 0.025f * anim.vals[1];
|
float xy = (viewOrigin.x() + viewOrigin.y()) * 0.025f * anim.vals[1];
|
||||||
xy = (xy - (int)xy);
|
xy = (xy - std::trunc(xy));
|
||||||
float z = (viewOrigin.z()) * 0.05f * anim.vals[1];
|
float z = (viewOrigin.z()) * 0.05f * anim.vals[1];
|
||||||
z = (z - (int)z);
|
z = (z - std::trunc(z));
|
||||||
|
|
||||||
float halfA = anim.vals[0] * 0.5f;
|
float halfA = anim.vals[0] * 0.5f;
|
||||||
|
|
||||||
|
|
|
@ -405,6 +405,9 @@ CSpacePirate::CSpacePirate(TUniqueId uid, std::string_view name, const CEntityIn
|
||||||
else if (GetDamageVulnerability()->WeaponHurts(CWeaponMode(EWeaponType::Wave), false))
|
else if (GetDamageVulnerability()->WeaponHurts(CWeaponMode(EWeaponType::Wave), false))
|
||||||
x8cc_trooperColor = zeus::CColor(0.776f, 0.054f, 1.f, 1.f);
|
x8cc_trooperColor = zeus::CColor(0.776f, 0.054f, 1.f, 1.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GetEditorId().Id() == 0x77)
|
||||||
|
SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSpacePirate::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
void CSpacePirate::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||||
|
|
|
@ -185,6 +185,8 @@ void CPhysicsActor::MoveToWR(const zeus::CVector3f& trans, float d) {
|
||||||
zeus::CAxisAngle CPhysicsActor::GetRotateToORAngularMomentumWR(const zeus::CQuaternion& q, float d) const {
|
zeus::CAxisAngle CPhysicsActor::GetRotateToORAngularMomentumWR(const zeus::CQuaternion& q, float d) const {
|
||||||
if (q.w() > 0.99999976)
|
if (q.w() > 0.99999976)
|
||||||
return zeus::CAxisAngle::skZero;
|
return zeus::CAxisAngle::skZero;
|
||||||
|
if (GetEditorId().Id() == 0x77)
|
||||||
|
printf("%f\n", q.yaw());
|
||||||
return (xf0_inertiaTensor *
|
return (xf0_inertiaTensor *
|
||||||
(((2.f * std::acos(q.w())) * (1.f / d)) * x34_transform.rotate(q.getImaginary()).normalized()));
|
(((2.f * std::acos(q.w())) * (1.f / d)) * x34_transform.rotate(q.getImaginary()).normalized()));
|
||||||
}
|
}
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit 40d23980dec1cf5addab4b0dbd2539d460c37fe0
|
Subproject commit ce11625af079a4449796b129b463f7d78d6a39d5
|
2
kabufuda
2
kabufuda
|
@ -1 +1 @@
|
||||||
Subproject commit f126245eeffa5df2f755949843cf850dd748384e
|
Subproject commit 3a6ee9a70cc7cd015a9dccef18852c434103988a
|
2
specter
2
specter
|
@ -1 +1 @@
|
||||||
Subproject commit e86cce5a6f6ad0182d9d2e01fb31bac47f4df882
|
Subproject commit 9ea12bded618ec4ac3198e86cb1937dece17239b
|
Loading…
Reference in New Issue