mirror of https://github.com/AxioDL/metaforce.git
Bitfield initializer bug fixes
This commit is contained in:
parent
87ab1a1f86
commit
da91c921cb
|
@ -65,19 +65,12 @@ public:
|
|||
s16 xa_prio;
|
||||
//CSfxHandle xc_handle;
|
||||
TAreaId x10_area;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool x14_24_isActive:1;
|
||||
bool x14_25_isPlaying:1;
|
||||
bool x14_26_looped:1;
|
||||
bool x14_27_inArea:1;
|
||||
bool x14_28_available:1;
|
||||
bool x14_29_useAcoustics:1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
public:
|
||||
virtual ~CBaseSfxWrapper() = default;
|
||||
virtual void SetActive(bool v) { x14_24_isActive = v; }
|
||||
|
|
|
@ -78,6 +78,7 @@ public:
|
|||
return m_reader->readBytesToBuf(buf, len);
|
||||
}
|
||||
u64 Length() {return m_reader->length();}
|
||||
const std::string& GetPath() const { return x18_path; }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -18,14 +18,8 @@ class CGameCamera : public CActor
|
|||
float x164_zfar;
|
||||
float x168_aspect;
|
||||
u32 x16c_;
|
||||
union {
|
||||
struct
|
||||
{
|
||||
bool x170_24_perspDirty : 1;
|
||||
bool x170_25_disablesInput : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
float x174_ = 0.f;
|
||||
float x178_ = 0.f;
|
||||
float x17c_ = 0.f;
|
||||
|
|
|
@ -358,8 +358,11 @@ u32 CMoviePlayer::THPAudioDecode(s16* buffer, const u8* audioFrame, bool stereo)
|
|||
}
|
||||
|
||||
CMoviePlayer::CMoviePlayer(const char* path, float preLoadSeconds, bool loop, bool deinterlace)
|
||||
: CDvdFile(path), xec_preLoadSeconds(preLoadSeconds), xf4_24_loop(loop), m_deinterlace(deinterlace)
|
||||
: CDvdFile(path), xec_preLoadSeconds(preLoadSeconds)
|
||||
{
|
||||
xf4_24_loop = loop;
|
||||
m_deinterlace = deinterlace;
|
||||
|
||||
/* Read THP header information */
|
||||
u8 buf[64];
|
||||
SyncRead(buf, 64);
|
||||
|
|
|
@ -121,12 +121,12 @@ private:
|
|||
|
||||
union
|
||||
{
|
||||
u32 m_dummy = 0;
|
||||
struct
|
||||
{
|
||||
bool xf4_24_loop : 1; bool xf4_25_hasAudio : 1;
|
||||
bool xf4_26_fieldFlip : 1; bool m_deinterlace : 1;
|
||||
};
|
||||
u8 m_dummy = 0;
|
||||
};
|
||||
|
||||
specter::View::ViewBlock m_viewVertBlock;
|
||||
|
|
|
@ -14,8 +14,9 @@ namespace MP1
|
|||
|
||||
CMFGame::CMFGame(const std::weak_ptr<CStateManager>& stateMgr, const std::weak_ptr<CInGameGuiManager>& guiMgr,
|
||||
const CArchitectureQueue&)
|
||||
: CMFGameBase("CMFGame"), x14_stateManager(stateMgr.lock()), x18_guiManager(guiMgr.lock()), x2a_25_(true)
|
||||
: CMFGameBase("CMFGame"), x14_stateManager(stateMgr.lock()), x18_guiManager(guiMgr.lock())
|
||||
{
|
||||
x2a_25_ = true;
|
||||
//g_Main->x160_25_ = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,12 @@ class CGunController
|
|||
};
|
||||
|
||||
public:
|
||||
CGunController(CModelData& modelData) : x0_modelData(modelData), x58_24_(true) {}
|
||||
CGunController(CModelData& modelData)
|
||||
: x0_modelData(modelData)
|
||||
{
|
||||
x58_24_ = true;
|
||||
}
|
||||
|
||||
void UnLoadFidget();
|
||||
void LoadFidgetAnimAsync(CStateManager&, s32, s32, s32);
|
||||
void GetFreeLookSetId() const;
|
||||
|
|
|
@ -7,7 +7,10 @@ const std::vector<SConnection> CEntity::NullConnectionList;
|
|||
|
||||
CEntity::CEntity(TUniqueId uniqueId, const CEntityInfo& info, bool active, const std::string& name)
|
||||
: x4_areaId(info.GetAreaId()), x8_uid(uniqueId), xc_editorId(info.GetEditorId()), x10_name(name),
|
||||
x20_conns(info.GetConnectionList()), x30_24_active(active) {}
|
||||
x20_conns(info.GetConnectionList())
|
||||
{
|
||||
x30_24_active = active;
|
||||
}
|
||||
|
||||
void CEntity::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr)
|
||||
{
|
||||
|
|
|
@ -355,8 +355,9 @@ const zeus::CTransform& CDummyGameArea::IGetTM() const
|
|||
}
|
||||
|
||||
CGameArea::CGameArea(CInputStream& in, int idx, int mlvlVersion)
|
||||
: x4_selfIdx(idx), xf0_25_active(true)
|
||||
: x4_selfIdx(idx)
|
||||
{
|
||||
xf0_25_active = true;
|
||||
x8_nameSTRG = in.readUint32Big();
|
||||
xc_transform.read34RowMajor(in);
|
||||
x3c_invTransform = xc_transform.inverse();
|
||||
|
|
|
@ -10,7 +10,6 @@ CPhysicsActor::CPhysicsActor(TUniqueId uid, bool active, const std::string& name
|
|||
: CActor(uid, active, name, info, xf, std::move(mData), matList, actorParms, kInvalidUniqueId)
|
||||
, xe8_mass(moverData.x30_mass)
|
||||
, xec_massRecip(moverData.x30_mass <= 0.f ? 1.f : 1.f / moverData.x30_mass)
|
||||
, xf8_24_(true)
|
||||
, x150_momentum(moverData.x18_)
|
||||
, x1c0_collisionPrimitive(box, matList)
|
||||
, x1f4_translation(xf.origin)
|
||||
|
@ -18,6 +17,7 @@ CPhysicsActor::CPhysicsActor(TUniqueId uid, bool active, const std::string& name
|
|||
, x23c_stepUpHeight(stepUp)
|
||||
, x240_stepDownHeight(stepDown)
|
||||
{
|
||||
xf8_24_ = true;
|
||||
SetMass(moverData.x30_mass);
|
||||
MoveCollisionPrimitive(zeus::CVector3f::skZero);
|
||||
SetVelocityOR(moverData.x0_velocity);
|
||||
|
|
|
@ -10,10 +10,10 @@ CScriptActorKeyframe::CScriptActorKeyframe(TUniqueId uid, const std::string& nam
|
|||
, x38_(f1)
|
||||
, x3c_(totalPlayback)
|
||||
, x40_(f1)
|
||||
, x44_24_(b1)
|
||||
, x44_25_(b2)
|
||||
, x44_26_(w2)
|
||||
{
|
||||
x44_24_ = b1;
|
||||
x44_25_ = b2;
|
||||
x44_26_ = w2;
|
||||
}
|
||||
|
||||
void CScriptActorKeyframe::Accept(IVisitor& visitor)
|
||||
|
|
|
@ -12,9 +12,9 @@ CScriptCameraHintTrigger::CScriptCameraHintTrigger(TUniqueId uid, bool active, c
|
|||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_obb(xf, scale)
|
||||
, x124_scale(scale)
|
||||
, x130_24_(b2)
|
||||
, x130_25_(b3)
|
||||
{
|
||||
x130_24_ = b2;
|
||||
x130_25_ = b3;
|
||||
}
|
||||
|
||||
void CScriptCameraHintTrigger::Accept(IVisitor& visitor)
|
||||
|
|
|
@ -9,19 +9,18 @@ CScriptColorModulate::CScriptColorModulate(TUniqueId uid, const std::string& nam
|
|||
const zeus::CColor& c1, const zeus::CColor& c2,
|
||||
EBlendMode bm, float f1, float f2,
|
||||
bool b1, bool b2, bool b3, bool b4, bool b5, bool active)
|
||||
: CEntity(uid, info, active, name),
|
||||
: CEntity(uid, info, active, name),
|
||||
x40_(c1),
|
||||
x44_(c2),
|
||||
x48_blendMode(bm),
|
||||
x4c_(f1),
|
||||
x50_(f2),
|
||||
x54_24_(b1),
|
||||
x54_25_(b2),
|
||||
x54_26_(b3),
|
||||
x54_27_(b4),
|
||||
x54_28_(b5)
|
||||
x50_(f2)
|
||||
{
|
||||
|
||||
x54_24_ = b1;
|
||||
x54_25_ = b2;
|
||||
x54_26_ = b3;
|
||||
x54_27_ = b4;
|
||||
x54_28_ = b5;
|
||||
}
|
||||
|
||||
void CScriptColorModulate::Accept(IVisitor& visitor)
|
||||
|
|
|
@ -10,9 +10,9 @@ CScriptCoverPoint::CScriptCoverPoint(TUniqueId uid, const std::string &name, con
|
|||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(),
|
||||
CMaterialList(EMaterialTypes::Unknown), CActorParameters::None(), kInvalidUniqueId),
|
||||
xe8_flags(flags),
|
||||
xf4_coverTime(coverTime),
|
||||
xf8_24_crouch(crouch)
|
||||
xf4_coverTime(coverTime)
|
||||
{
|
||||
xf8_24_crouch = crouch;
|
||||
xec_cosHorizontalAngle = std::cos(zeus::degToRad(horizontalAngle) * 0.5f);
|
||||
xf0_sinVerticalAngle = std::sin(zeus::degToRad(verticalAngle) * 0.5f);
|
||||
x100_touchBounds.emplace(xf.origin, xf.origin);
|
||||
|
|
|
@ -28,8 +28,8 @@ CScriptDock::CScriptDock(TUniqueId uid, const std::string& name, const CEntityIn
|
|||
, x258_dockReferenceCount(dockReferenceCount)
|
||||
, x25c_dock(dock)
|
||||
, x260_area(area)
|
||||
, x268_25_loadConnected(loadConnected)
|
||||
{
|
||||
x268_25_loadConnected = loadConnected;
|
||||
}
|
||||
|
||||
void CScriptDock::Accept(IVisitor& visitor)
|
||||
|
|
|
@ -30,13 +30,13 @@ CScriptDoor::CScriptDoor(TUniqueId uid, const std::string& name, const CEntityIn
|
|||
const zeus::CVector3f&, const zeus::CAABox& aabb, bool active,
|
||||
bool open, bool b2, float, bool ballDoor)
|
||||
: CPhysicsActor(uid, active, name, info, xf, std::move(mData), MakeDoorMaterialList(open),
|
||||
aabb, SMoverData(1.f), actParms, 0.3f, 0.1f),
|
||||
x2a8_29_ballDoor(ballDoor),
|
||||
x2a8_25_(open),
|
||||
x2a8_26_(open),
|
||||
x2a8_28_(b2),
|
||||
x2a8_27_(true)
|
||||
aabb, SMoverData(1.f), actParms, 0.3f, 0.1f)
|
||||
{
|
||||
x2a8_29_ballDoor = ballDoor;
|
||||
x2a8_25_ = open;
|
||||
x2a8_26_ = open;
|
||||
x2a8_28_ = b2;
|
||||
x2a8_27_ = true;
|
||||
x264_ = GetBoundingBox();
|
||||
x284_modelBounds = x64_modelData->GetBounds(xf.getRotation());
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ CScriptShadowProjector::CScriptShadowProjector(TUniqueId uid, const std::string&
|
|||
, xfc_opacity(opacity)
|
||||
, x100_opacityRecip(opacity < 0.00001 ? 1.f : opacityQ / opacity)
|
||||
, x10c_textureSize(textureSize)
|
||||
, x110_24_persistent(b2)
|
||||
{
|
||||
x110_24_persistent = b2;
|
||||
}
|
||||
|
||||
void CScriptShadowProjector::Accept(IVisitor& visitor)
|
||||
|
|
|
@ -24,14 +24,14 @@ CScriptSound::CScriptSound(TUniqueId uid, const std::string& name, const CEntity
|
|||
, x114_(w5)
|
||||
, x116_(w6)
|
||||
, x118_(w7 + 8192)
|
||||
, x11c_25_(b1)
|
||||
, x11c_26_(b2)
|
||||
, x11c_27_(b3)
|
||||
, x11c_28_(b4)
|
||||
, x11c_29_(b5)
|
||||
, x11c_30_(b6)
|
||||
, x11d_24_(b7)
|
||||
{
|
||||
x11c_25_ = b1;
|
||||
x11c_26_ = b2;
|
||||
x11c_27_ = b3;
|
||||
x11c_28_ = b4;
|
||||
x11c_29_ = b5;
|
||||
x11c_30_ = b6;
|
||||
x11d_24_ = b7;
|
||||
if (x11c_30_ && (!x11c_26_ || !x11c_25_))
|
||||
x11c_30_ = false;
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ CScriptSpecialFunction::CScriptSpecialFunction(TUniqueId uid, const std::string&
|
|||
, x1bc_(aId1)
|
||||
, x1c0_(aId2)
|
||||
, x1c4_(aId3)
|
||||
, x1e4_26_(true)
|
||||
{
|
||||
x1e4_26_ = true;
|
||||
if (xe8_function == ESpecialFunction::HUDTarget)
|
||||
x1c8_ = {{zeus::CVector3f(-1.f), zeus::CVector3f(1.f)}};
|
||||
}
|
||||
|
|
|
@ -23,9 +23,9 @@ CScriptTrigger::CScriptTrigger(TUniqueId uid, const std::string& name, const CEn
|
|||
, x128_forceMagnitude(forceField.magnitude())
|
||||
, x12c_flags(triggerFlags)
|
||||
, x130_bounds(bounds)
|
||||
, x148_26_deactivateOnEntered(b2)
|
||||
, x148_27_deactivateOnExited(b3)
|
||||
{
|
||||
x148_26_deactivateOnEntered = b2;
|
||||
x148_27_deactivateOnExited = b3;
|
||||
}
|
||||
|
||||
void CScriptTrigger::Accept(IVisitor& visitor)
|
||||
|
|
|
@ -99,7 +99,7 @@ private:
|
|||
void DrawText();
|
||||
|
||||
public:
|
||||
CWorldTransManager() : x44_24_transFinished(true) {}
|
||||
CWorldTransManager() { x44_24_transFinished = true; }
|
||||
|
||||
|
||||
void Update(float);
|
||||
|
|
Loading…
Reference in New Issue