mirror of https://github.com/AxioDL/metaforce.git
Start naming EMaterialTypes values
This commit is contained in:
parent
b3cae0d4d5
commit
af1e22a62d
|
@ -161,7 +161,7 @@ public:
|
|||
{
|
||||
return *msg.GetParm<CArchMsgParmVoidPtr>();
|
||||
}
|
||||
static CArchitectureMessage CreateFrameBegin(EArchMsgTarget target, int a)
|
||||
static CArchitectureMessage CreateFrameBegin(EArchMsgTarget target, const int& a)
|
||||
{
|
||||
return CArchitectureMessage(target, EArchMsgType::FrameBegin, new CArchMsgParmInt32(a));
|
||||
}
|
||||
|
|
|
@ -109,8 +109,10 @@ public:
|
|||
CWorldState& CurrentWorldState() { return StateForWorld(x84_mlvlId); }
|
||||
ResId CurrentWorldAssetId() const { return x84_mlvlId; }
|
||||
void SetHardMode(bool v) { x228_24_hardMode = v; }
|
||||
void SetPersistentOptions(const CPersistentOptions& opts) { xa8_systemOptions = opts; }
|
||||
void ImportPersistentOptions(const CPersistentOptions& opts);
|
||||
void ExportPersistentOptions(CPersistentOptions& opts) const;
|
||||
void SetGameOptions(const CGameOptions& opts) { x17c_gameOptions = opts; }
|
||||
void WriteBackupBuf();
|
||||
void SetCardSerial(u64 serial) { x210_cardSerial = serial; }
|
||||
void PutTo(CBitStreamWriter& writer) const;
|
||||
|
|
|
@ -188,7 +188,7 @@ CHealthInfo CPlayerState::GetHealthInfo() const
|
|||
|
||||
CPlayerState::EPlayerSuit CPlayerState::GetCurrentSuit() const
|
||||
{
|
||||
if (GetFusion())
|
||||
if (IsFusionEnabled())
|
||||
return EPlayerSuit::FusionPower;
|
||||
|
||||
return x20_currentSuit;
|
||||
|
|
|
@ -136,8 +136,8 @@ public:
|
|||
CHealthInfo& HealthInfo();
|
||||
CHealthInfo GetHealthInfo() const;
|
||||
u32 GetPickupTotal() { return 99; }
|
||||
void SetFusion(bool val) { x0_26_fusion = val; }
|
||||
bool GetFusion() const { return x0_26_fusion; }
|
||||
void SetIsFusionEnabled(bool val) { x0_26_fusion = val; }
|
||||
bool IsFusionEnabled() const { return x0_26_fusion; }
|
||||
EPlayerSuit GetCurrentSuit() const;
|
||||
EBeamId GetCurrentBeam() const { return x8_currentBeam; }
|
||||
bool CanVisorSeeFog(const CStateManager& stateMgr) const;
|
||||
|
|
|
@ -674,8 +674,8 @@ void CStateManager::CreateStandardGameObjects()
|
|||
auto q = zeus::CQuaternion::fromAxisAngle(zeus::CVector3f{0.f, 0.f, 1.f}, zeus::degToRad(129.6f));
|
||||
x84c_player.reset(new CPlayer(AllocateUniqueId(), zeus::CTransform(q), pBounds, 0,
|
||||
zeus::CVector3f{1.65f, 1.65f, 1.65f},
|
||||
200.f, unk1, unk2, unk3, CMaterialList(EMaterialTypes::ThirtyTwo,
|
||||
EMaterialTypes::Nineteen, EMaterialTypes::ThirtySeven)));
|
||||
200.f, unk1, unk2, unk3, CMaterialList(EMaterialTypes::Player,
|
||||
EMaterialTypes::Solid, EMaterialTypes::GroundCollider)));
|
||||
AddObject(*x84c_player);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,17 +4,13 @@ namespace urde
|
|||
{
|
||||
|
||||
CCinematicCamera::CCinematicCamera(TUniqueId uid, const std::string& name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, bool active, float, float a, float b, float c, float d, u32 e)
|
||||
const zeus::CTransform& xf, bool active, float, float a, float b, float c, float d,
|
||||
u32 e)
|
||||
: CGameCamera(uid, active, name, info, xf, a, b, c, d, kInvalidUniqueId, e & 0x20, 0)
|
||||
{
|
||||
}
|
||||
|
||||
void CCinematicCamera::ProcessInput(const CFinalInput&, CStateManager& mgr)
|
||||
{
|
||||
}
|
||||
|
||||
void CCinematicCamera::Reset(const zeus::CTransform&, CStateManager& mgr)
|
||||
{
|
||||
}
|
||||
void CCinematicCamera::ProcessInput(const CFinalInput&, CStateManager& mgr) {}
|
||||
|
||||
void CCinematicCamera::Reset(const zeus::CTransform&, CStateManager& mgr) {}
|
||||
}
|
||||
|
|
|
@ -98,8 +98,7 @@ void CFirstPersonCamera::UpdateTransform(CStateManager& mgr, float dt)
|
|||
if (player->x304_ == 4 || player->x304_ == 1)
|
||||
{
|
||||
const CActor* act = dynamic_cast<const CActor*>(mgr.GetObjectById(player->x310_grapplePointId));
|
||||
/* TODO: Not sure about this */
|
||||
if (act && act->GetMaterialList().BitPosition(0x200) != -1)
|
||||
if (act && act->GetMaterialList().Intersection(CMaterialList(EMaterialTypes::Lava)) != 0)
|
||||
{
|
||||
zeus::CVector3f v = player->x318_ - eyePos;
|
||||
if (v.canBeNormalized())
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace urde
|
|||
CGameCamera::CGameCamera(TUniqueId uid, bool active, const std::string& name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, float fovy, float znear, float zfar, float aspect, TUniqueId uid2,
|
||||
bool b1, u32 w1)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Zero),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_watchedObject(uid2)
|
||||
, x12c_(xf)
|
||||
|
|
|
@ -13,7 +13,7 @@ CMaterialFilter::CMaterialFilter(const CMaterialList& include, const CMaterialLi
|
|||
|
||||
CMaterialFilter CMaterialFilter::MakeInclude(const CMaterialList& include)
|
||||
{
|
||||
return CMaterialFilter(include, {EMaterialTypes::Zero}, EFilterType::Zero);
|
||||
return CMaterialFilter(include, {EMaterialTypes::Unknown}, EFilterType::Zero);
|
||||
}
|
||||
|
||||
CMaterialFilter CMaterialFilter::MakeExclude(const CMaterialList& exclude)
|
||||
|
|
|
@ -7,41 +7,53 @@ namespace urde
|
|||
{
|
||||
enum class EMaterialTypes
|
||||
{
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
Two = 2,
|
||||
Three = 3,
|
||||
Four = 4,
|
||||
Five = 5,
|
||||
Six = 6,
|
||||
Seven = 7,
|
||||
Eight = 8,
|
||||
Nine = 9,
|
||||
Unknown = 0,
|
||||
Stone = 1,
|
||||
Metal = 2,
|
||||
Grass = 3,
|
||||
Ice = 4,
|
||||
Pillar = 5,
|
||||
MetalGrating = 6,
|
||||
Phazon = 7,
|
||||
Dirt = 8,
|
||||
Lava = 9,
|
||||
Ten = 10,
|
||||
Eleven = 11,
|
||||
Twelve = 12,
|
||||
Thirten = 13,
|
||||
Fourteen = 14,
|
||||
Fifteen = 15,
|
||||
Eighteen = 18,
|
||||
Nineteen = 19,
|
||||
TwentyOne = 21,
|
||||
ThirtyTwo = 32,
|
||||
ThirtyThree = 33,
|
||||
ThirtyFour = 34,
|
||||
ThirtyFive = 35,
|
||||
ThirtySeven = 37,
|
||||
Snow = 11,
|
||||
MudSlow = 12,
|
||||
HalfPipe = 13,
|
||||
Mud = 14,
|
||||
Glass = 15,
|
||||
Shield = 16,
|
||||
Sand = 17,
|
||||
ProjectilePassthrough = 18,
|
||||
Solid = 19,
|
||||
CameraPassthrough = 21,
|
||||
Wood = 22,
|
||||
Organic = 23,
|
||||
TwentyFour = 24,
|
||||
RedundantEdgeOrFlippedTri = 25,
|
||||
SeeThrough = 26,
|
||||
ScanPassthrough = 27,
|
||||
AIPassthrough = 28,
|
||||
Ceiling = 29,
|
||||
Wall = 30,
|
||||
Floor = 31,
|
||||
Player = 32,
|
||||
Character = 33,
|
||||
Trigger = 34,
|
||||
Projectile = 35,
|
||||
GroundCollider = 37,
|
||||
ThirtyEight = 38,
|
||||
ThirtyNine = 39,
|
||||
Fourty = 40,
|
||||
FourtyOne = 41,
|
||||
FourtyTwo = 42,
|
||||
FourtyThree = 43,
|
||||
FourtyFour = 44,
|
||||
FourtyEight = 48,
|
||||
FourtyNine = 49,
|
||||
Fifty = 50,
|
||||
FiftySix = 56,
|
||||
Scannable = 39,
|
||||
Target = 40,
|
||||
Orbit = 41,
|
||||
Occluder = 42,
|
||||
Immovable = 43,
|
||||
Debris = 44,
|
||||
AIBlock = 48,
|
||||
Platform = 49,
|
||||
NonSolidDamageable = 50,
|
||||
ExcludeFromLineOfSightTest = 56,
|
||||
SixtyThree = 63
|
||||
};
|
||||
|
||||
|
@ -115,6 +127,11 @@ public:
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
u64 Intersection(const CMaterialList& other) const
|
||||
{
|
||||
return other.x0_list & x0_list;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -26,29 +26,29 @@ namespace MP1
|
|||
CGameArchitectureSupport::CGameArchitectureSupport(CMain& parent, boo::IAudioVoiceEngine* voiceEngine,
|
||||
amuse::IBackendVoiceAllocator& backend)
|
||||
: m_parent(parent),
|
||||
m_audioSys(voiceEngine, backend, 0,0,0,0,0),
|
||||
m_inputGenerator(g_tweakPlayer->GetLeftLogicalThreshold(),
|
||||
x0_audioSys(voiceEngine, backend, 0,0,0,0,0),
|
||||
x30_inputGenerator(g_tweakPlayer->GetLeftLogicalThreshold(),
|
||||
g_tweakPlayer->GetRightLogicalThreshold()),
|
||||
m_guiSys(*g_ResFactory, *g_SimplePool, CGuiSys::EUsageMode::Zero)
|
||||
x44_guiSys(*g_ResFactory, *g_SimplePool, CGuiSys::EUsageMode::Zero)
|
||||
{
|
||||
g_GuiSys = &m_guiSys;
|
||||
m_inputGenerator.startScanning();
|
||||
g_GuiSys = &x44_guiSys;
|
||||
x30_inputGenerator.startScanning();
|
||||
g_Main->ResetGameState();
|
||||
|
||||
std::shared_ptr<CIOWin> splash = std::make_shared<CSplashScreen>(CSplashScreen::ESplashScreen::Nintendo);
|
||||
m_ioWinManager.AddIOWin(splash, 1000, 10000);
|
||||
x58_ioWinManager.AddIOWin(splash, 1000, 10000);
|
||||
|
||||
std::shared_ptr<CIOWin> mf = std::make_shared<CMainFlow>();
|
||||
m_ioWinManager.AddIOWin(mf, 0, 0);
|
||||
x58_ioWinManager.AddIOWin(mf, 0, 0);
|
||||
|
||||
std::shared_ptr<CIOWin> console = std::make_shared<CConsoleOutputWindow>(8, 5.f, 0.75f);
|
||||
m_ioWinManager.AddIOWin(console, 100, 0);
|
||||
x58_ioWinManager.AddIOWin(console, 100, 0);
|
||||
|
||||
std::shared_ptr<CIOWin> audState = std::make_shared<CAudioStateWin>();
|
||||
m_ioWinManager.AddIOWin(audState, 100, -1);
|
||||
x58_ioWinManager.AddIOWin(audState, 100, -1);
|
||||
|
||||
std::shared_ptr<CIOWin> errWin = std::make_shared<CErrorOutputWindow>(false);
|
||||
m_ioWinManager.AddIOWin(errWin, 10000, 100000);
|
||||
x58_ioWinManager.AddIOWin(errWin, 10000, 100000);
|
||||
}
|
||||
|
||||
bool CGameArchitectureSupport::Update()
|
||||
|
@ -57,39 +57,19 @@ bool CGameArchitectureSupport::Update()
|
|||
m_parent.x128_globalObjects.MemoryCardInitializePump();
|
||||
|
||||
bool finished = false;
|
||||
m_inputGenerator.Update(1.0 / 60.0, m_archQueue);
|
||||
|
||||
g_GameState->GetWorldTransitionManager()->TouchModels();
|
||||
int unk = 0;
|
||||
m_archQueue.Push(MakeMsg::CreateFrameBegin(EArchMsgTarget::Game, unk));
|
||||
m_archQueue.Push(MakeMsg::CreateTimerTick(EArchMsgTarget::Game, 1.f / 60.f));
|
||||
x4_archQueue.Push(MakeMsg::CreateFrameBegin(EArchMsgTarget::Game, x78_));
|
||||
x4_archQueue.Push(MakeMsg::CreateTimerTick(EArchMsgTarget::Game, 1.f / 60.f));
|
||||
|
||||
m_ioWinManager.PumpMessages(m_archQueue);
|
||||
x58_ioWinManager.PumpMessages(x4_archQueue);
|
||||
|
||||
/*
|
||||
while (m_archQueue)
|
||||
{
|
||||
CArchitectureMessage msg = m_archQueue.Pop();
|
||||
if (msg.GetTarget() == EArchMsgTarget::ArchitectureSupport)
|
||||
{
|
||||
if (msg.GetType() == EArchMsgType::ApplicationExit)
|
||||
finished = true;
|
||||
}
|
||||
|
||||
if (msg.GetTarget() == EArchMsgTarget::Game && msg.GetType() == EArchMsgType::UserInput)
|
||||
{
|
||||
const CArchMsgParmUserInput* input = msg.GetParm<CArchMsgParmUserInput>();
|
||||
if (input->x4_parm.DStart())
|
||||
m_archQueue.Push(std::move(MakeMsg::CreateApplicationExit(EArchMsgTarget::ArchitectureSupport)));
|
||||
}
|
||||
}
|
||||
*/
|
||||
return finished;
|
||||
}
|
||||
|
||||
void CGameArchitectureSupport::Draw()
|
||||
{
|
||||
m_ioWinManager.Draw();
|
||||
x58_ioWinManager.Draw();
|
||||
}
|
||||
|
||||
CMain::CMain(IFactory& resFactory, CSimplePool& resStore,
|
||||
|
@ -123,6 +103,12 @@ void CMain::RegisterResourceTweaks()
|
|||
}
|
||||
void CMain::ResetGameState()
|
||||
{
|
||||
CPersistentOptions sysOpts = g_GameState->SystemOptions();
|
||||
CGameOptions gameOpts = g_GameState->GameOptions();
|
||||
x128_globalObjects.ResetGameState();
|
||||
g_GameState->ImportPersistentOptions(sysOpts);
|
||||
g_GameState->SetGameOptions(gameOpts);
|
||||
g_GameState->GetPlayerState()->SetIsFusionEnabled(g_GameState->SystemOptions().GetPlayerHasFusion());
|
||||
}
|
||||
|
||||
void CMain::InitializeSubsystems(const hecl::Runtime::FileStoreManager& storeMgr)
|
||||
|
|
|
@ -53,7 +53,7 @@ class CGameGlobalObjects
|
|||
CSimplePool& xcc_simplePool;
|
||||
CCharacterFactoryBuilder xec_charFactoryBuilder;
|
||||
CAiFuncMap x110_aiFuncMap;
|
||||
CGameState x134_gameState;
|
||||
std::unique_ptr<CGameState> x134_gameState;
|
||||
TLockedToken<CStringTable> x13c_mainStringTable;
|
||||
CInGameTweakManager x150_tweakManager;
|
||||
std::unique_ptr<CBooRenderer> m_renderer;
|
||||
|
@ -79,7 +79,8 @@ public:
|
|||
g_SimplePool = &xcc_simplePool;
|
||||
g_CharFactoryBuilder = &xec_charFactoryBuilder;
|
||||
g_AiFuncMap = &x110_aiFuncMap;
|
||||
g_GameState = &x134_gameState;
|
||||
x134_gameState.reset(new CGameState());
|
||||
g_GameState = x134_gameState.get();
|
||||
g_TweakManager = &x150_tweakManager;
|
||||
}
|
||||
|
||||
|
@ -99,6 +100,12 @@ public:
|
|||
g_MemoryCardSys = x0_memoryCardSys.get();
|
||||
}
|
||||
}
|
||||
|
||||
void ResetGameState()
|
||||
{
|
||||
x134_gameState.reset(new CGameState());
|
||||
g_GameState = x134_gameState.get();
|
||||
}
|
||||
};
|
||||
|
||||
#if MP1_USE_BOO
|
||||
|
@ -108,36 +115,37 @@ class CGameArchitectureSupport
|
|||
#endif
|
||||
{
|
||||
CMain& m_parent;
|
||||
CArchitectureQueue m_archQueue;
|
||||
CAudioSys m_audioSys;
|
||||
CInputGenerator m_inputGenerator;
|
||||
CGuiSys m_guiSys;
|
||||
CIOWinManager m_ioWinManager;
|
||||
CArchitectureQueue x4_archQueue;
|
||||
CAudioSys x0_audioSys;
|
||||
CInputGenerator x30_inputGenerator;
|
||||
CGuiSys x44_guiSys;
|
||||
CIOWinManager x58_ioWinManager;
|
||||
s32 x78_;
|
||||
boo::SWindowRect m_windowRect;
|
||||
bool m_rectIsDirty;
|
||||
|
||||
void mouseDown(const boo::SWindowCoord &coord, boo::EMouseButton button, boo::EModifierKey mods)
|
||||
{ m_inputGenerator.mouseDown(coord, button, mods); }
|
||||
{ x30_inputGenerator.mouseDown(coord, button, mods); }
|
||||
void mouseUp(const boo::SWindowCoord &coord, boo::EMouseButton button, boo::EModifierKey mods)
|
||||
{ m_inputGenerator.mouseUp(coord, button, mods); }
|
||||
{ x30_inputGenerator.mouseUp(coord, button, mods); }
|
||||
void mouseMove(const boo::SWindowCoord &coord)
|
||||
{ m_inputGenerator.mouseMove(coord); }
|
||||
{ x30_inputGenerator.mouseMove(coord); }
|
||||
void scroll(const boo::SWindowCoord &coord, const boo::SScrollDelta &scroll)
|
||||
{ m_inputGenerator.scroll(coord, scroll); }
|
||||
{ x30_inputGenerator.scroll(coord, scroll); }
|
||||
void charKeyDown(unsigned long charCode, boo::EModifierKey mods, bool isRepeat)
|
||||
{ m_inputGenerator.charKeyDown(charCode, mods, isRepeat); }
|
||||
{ x30_inputGenerator.charKeyDown(charCode, mods, isRepeat); }
|
||||
void charKeyUp(unsigned long charCode, boo::EModifierKey mods)
|
||||
{ m_inputGenerator.charKeyUp(charCode, mods); }
|
||||
{ x30_inputGenerator.charKeyUp(charCode, mods); }
|
||||
void specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool isRepeat)
|
||||
{ m_inputGenerator.specialKeyDown(key, mods, isRepeat); }
|
||||
{ x30_inputGenerator.specialKeyDown(key, mods, isRepeat); }
|
||||
void specialKeyUp(boo::ESpecialKey key, boo::EModifierKey mods)
|
||||
{ m_inputGenerator.specialKeyUp(key, mods); }
|
||||
{ x30_inputGenerator.specialKeyUp(key, mods); }
|
||||
void modKeyDown(boo::EModifierKey mod, bool isRepeat)
|
||||
{ m_inputGenerator.modKeyDown(mod, isRepeat);}
|
||||
{ x30_inputGenerator.modKeyDown(mod, isRepeat);}
|
||||
void modKeyUp(boo::EModifierKey mod)
|
||||
{ m_inputGenerator.modKeyUp(mod); }
|
||||
{ x30_inputGenerator.modKeyUp(mod); }
|
||||
|
||||
void destroyed() { m_archQueue.Push(MakeMsg::CreateApplicationExit(EArchMsgTarget::ArchitectureSupport)); }
|
||||
void destroyed() { x4_archQueue.Push(MakeMsg::CreateApplicationExit(EArchMsgTarget::ArchitectureSupport)); }
|
||||
|
||||
void resized(const boo::SWindowRect &rect)
|
||||
{
|
||||
|
|
|
@ -8,10 +8,10 @@ CGameProjectile::CGameProjectile(bool active, const TToken<CWeaponDescription>&,
|
|||
u32 w1, bool b2, const zeus::CVector3f&,
|
||||
const rstl::optional_object<TLockedToken<CGenDescription>>&, s16, bool b3)
|
||||
: CWeapon(owner, aid, uid, active, wType, name, xf,
|
||||
CMaterialFilter(
|
||||
CMaterialList(EMaterialTypes::Fifty, matType),
|
||||
CMaterialList(EMaterialTypes::ThirtyFive, EMaterialTypes::Eighteen, matType, EMaterialTypes::Nineteen),
|
||||
CMaterialFilter::EFilterType::Three),
|
||||
CMaterialFilter(CMaterialList(EMaterialTypes::NonSolidDamageable, matType),
|
||||
CMaterialList(EMaterialTypes::Projectile, EMaterialTypes::ProjectilePassthrough, matType,
|
||||
EMaterialTypes::Solid),
|
||||
CMaterialFilter::EFilterType::Three),
|
||||
CMaterialList(), dInfo, EProjectileAttrib(w1) | GetBeamAttribType(wType), CModelData::CModelDataNull())
|
||||
{
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@ static CMaterialList MakeActorMaterialList(const CMaterialList& materialList, co
|
|||
{
|
||||
CMaterialList ret = materialList;
|
||||
if (params.GetVisorParameters().x0_28_b3)
|
||||
ret.Add(EMaterialTypes::Fourteen);
|
||||
ret.Add(EMaterialTypes::Mud);
|
||||
if (params.GetVisorParameters().x0_29_b4)
|
||||
ret.Add(EMaterialTypes::Fifteen);
|
||||
ret.Add(EMaterialTypes::Glass);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ CActor::CActor(TUniqueId uid, bool active, const std::string& name, const CEntit
|
|||
CModelData&& mData, const CMaterialList& list, const CActorParameters& params, TUniqueId otherUid)
|
||||
: CEntity(uid, info, active, name)
|
||||
, x60_material(MakeActorMaterialList(list, params))
|
||||
, x70_(CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Nineteen}, {EMaterialTypes::Zero}))
|
||||
, x70_(CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {EMaterialTypes::Unknown}))
|
||||
, xc6_(otherUid)
|
||||
{
|
||||
if (mData.x10_animData || mData.x1c_normalModel)
|
||||
|
@ -42,10 +42,10 @@ void CActor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateMana
|
|||
break;
|
||||
case EScriptObjectMessage::InternalMessage11: // 33
|
||||
{
|
||||
if (x94_simpleShadow)
|
||||
AddMaterial(EMaterialTypes::ThirtyNine, mgr);
|
||||
if (x98_scanObjectInfo)
|
||||
AddMaterial(EMaterialTypes::Scannable, mgr);
|
||||
else
|
||||
RemoveMaterial(EMaterialTypes::ThirtyNine, mgr);
|
||||
RemoveMaterial(EMaterialTypes::Scannable, mgr);
|
||||
|
||||
if (HasModelData() && x64_modelData->AnimationData())
|
||||
{
|
||||
|
|
|
@ -9,8 +9,8 @@ namespace urde
|
|||
static CMaterialList MakeAiMaterialList(const CMaterialList& in)
|
||||
{
|
||||
CMaterialList ret = in;
|
||||
ret.Add(EMaterialTypes::FourtyEight);
|
||||
ret.Add(EMaterialTypes::TwentyOne);
|
||||
ret.Add(EMaterialTypes::AIBlock);
|
||||
ret.Add(EMaterialTypes::CameraPassthrough);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
namespace urde
|
||||
{
|
||||
|
||||
CMaterialList gkPatternedGroundMaterialList(EMaterialTypes::ThirtyThree, EMaterialTypes::Nineteen,
|
||||
EMaterialTypes::FourtyOne, EMaterialTypes::ThirtySeven,
|
||||
EMaterialTypes::Fourty);
|
||||
CMaterialList gkPatternedFlyerMaterialList(EMaterialTypes::ThirtyThree, EMaterialTypes::Nineteen,
|
||||
EMaterialTypes::FourtyOne, EMaterialTypes::Fourty);
|
||||
CMaterialList gkPatternedGroundMaterialList(EMaterialTypes::Character, EMaterialTypes::Solid,
|
||||
EMaterialTypes::Orbit, EMaterialTypes::GroundCollider,
|
||||
EMaterialTypes::Target);
|
||||
CMaterialList gkPatternedFlyerMaterialList(EMaterialTypes::Character, EMaterialTypes::Solid,
|
||||
EMaterialTypes::Orbit, EMaterialTypes::Target);
|
||||
|
||||
CPatterned::CPatterned(EUnknown, TUniqueId uid, const std::string& name, CPatterned::EFlavorType flavor,
|
||||
const CEntityInfo& info, const zeus::CTransform& xf, CModelData&& mData,
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace urde
|
|||
{
|
||||
CScriptAiJumpPoint::CScriptAiJumpPoint(TUniqueId uid, const std::string& name, const CEntityInfo& info,
|
||||
zeus::CTransform& xf, bool active, float f1)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Zero),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_(f1)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ void CScriptBeam::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CSt
|
|||
x154_projectileId = mgr.AllocateUniqueId();
|
||||
mgr.AddObject(new CPlasmaProjectile(xe8_weaponDescription, x10_name + "-Projectile",
|
||||
x138_damageInfo.GetWeaponMode().GetType(), xf4_beamInfo, x34_transform,
|
||||
EMaterialTypes::ThirtyFive, x138_damageInfo, x8_uid, x4_areaId,
|
||||
EMaterialTypes::Projectile, x138_damageInfo, x8_uid, x4_areaId,
|
||||
x154_projectileId, 8, false, 2));
|
||||
}
|
||||
else if (msg == EScriptObjectMessage::InternalMessage12)
|
||||
|
|
|
@ -9,7 +9,7 @@ CScriptCameraHint::CScriptCameraHint(TUniqueId uid, const std::string& name, con
|
|||
const zeus::CTransform& xf, bool active, u32, u32, u32, float, float, float,
|
||||
const zeus::CVector3f&, const zeus::CVector3f&, const zeus::CVector3f&, float,
|
||||
float, float, float, float, float, float, float, float, float)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Zero),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace urde
|
|||
CScriptCameraHintTrigger::CScriptCameraHintTrigger(TUniqueId uid, bool active, const std::string& name,
|
||||
const CEntityInfo& info, const zeus::CVector3f& scale,
|
||||
const zeus::CTransform& xf, bool b2, bool b3)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::ThirtyFour),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Trigger),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_obb(xf, scale)
|
||||
, x124_scale(scale)
|
||||
|
|
|
@ -13,7 +13,7 @@ CScriptCameraPitchVolume::CScriptCameraPitchVolume(TUniqueId uid, bool active, c
|
|||
const CEntityInfo& info, const zeus::CVector3f& scale,
|
||||
const zeus::CTransform& xf, const zeus::CRelAngle& r1,
|
||||
const zeus::CRelAngle& r2, float maxInterpDistance)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::ThirtyFour),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Trigger),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_obbox(xf, scale * skScaleFactor)
|
||||
, x124_(r1)
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace urde
|
|||
|
||||
CScriptCameraWaypoint::CScriptCameraWaypoint(TUniqueId uid, const std::string& name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, bool active, float, u32)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Zero),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
{
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace urde
|
|||
CScriptCoverPoint::CScriptCoverPoint(TUniqueId uid, const std::string &name, const CEntityInfo &info,
|
||||
zeus::CTransform xf, bool active, u32 flags, bool crouch, float horizontalAngle, float verticalAngle, float coverTime)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(),
|
||||
CMaterialList(EMaterialTypes::Zero), CActorParameters::None(), kInvalidUniqueId),
|
||||
CMaterialList(EMaterialTypes::Unknown), CActorParameters::None(), kInvalidUniqueId),
|
||||
xe8_flags(flags),
|
||||
xf4_coverTime(coverTime),
|
||||
xf8_24_crouch(crouch)
|
||||
|
|
|
@ -13,10 +13,10 @@ CActorParameters MakeDamageableTriggerActorParms(const CActorParameters& aParams
|
|||
CMaterialList MakeDamageableTriggerMaterial(CScriptDamageableTrigger::ECanOrbit canOrbit)
|
||||
{
|
||||
if (canOrbit == CScriptDamageableTrigger::ECanOrbit::Orbit)
|
||||
return CMaterialList(EMaterialTypes::FourtyOne, EMaterialTypes::ThirtyFour, EMaterialTypes::FourtyThree,
|
||||
EMaterialTypes::Fifty, EMaterialTypes::FiftySix);
|
||||
return CMaterialList(EMaterialTypes::ThirtyFour, EMaterialTypes::FourtyThree,
|
||||
EMaterialTypes::Fifty, EMaterialTypes::FiftySix);
|
||||
return CMaterialList(EMaterialTypes::Orbit, EMaterialTypes::Trigger, EMaterialTypes::Immovable,
|
||||
EMaterialTypes::NonSolidDamageable, EMaterialTypes::ExcludeFromLineOfSightTest);
|
||||
return CMaterialList(EMaterialTypes::Trigger, EMaterialTypes::Immovable,
|
||||
EMaterialTypes::NonSolidDamageable, EMaterialTypes::ExcludeFromLineOfSightTest);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ CScriptDebris::CScriptDebris(TUniqueId uid, const std::string& name, const CEnti
|
|||
const zeus::CVector3f&, const zeus::CColor&, float f1, float f2, float f3,
|
||||
CScriptDebris::EScaleType, bool, bool, bool active)
|
||||
: CPhysicsActor(uid, active, name, info, xf, std::move(mData),
|
||||
CMaterialList(EMaterialTypes::Nineteen, EMaterialTypes::FourtyFour),
|
||||
CMaterialList(EMaterialTypes::Solid, EMaterialTypes::Debris),
|
||||
mData.GetBounds(xf.getRotation()), SMoverData(f2), aParams, 0.3, 0.1)
|
||||
{
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace urde
|
|||
CMaterialList MakeDockMaterialList()
|
||||
{
|
||||
CMaterialList list;
|
||||
list.Add(EMaterialTypes::ThirtyFour);
|
||||
list.Add(EMaterialTypes::FourtyThree);
|
||||
list.Add(EMaterialTypes::FourtyEight);
|
||||
list.Add(EMaterialTypes::Trigger);
|
||||
list.Add(EMaterialTypes::Immovable);
|
||||
list.Add(EMaterialTypes::AIBlock);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
namespace urde
|
||||
{
|
||||
|
||||
static CMaterialList MakeDoorMaterialList(bool material)
|
||||
static CMaterialList MakeDoorMaterialList(bool open)
|
||||
{
|
||||
CMaterialList ret;
|
||||
ret.Add(EMaterialTypes::Nineteen);
|
||||
ret.Add(EMaterialTypes::FourtyThree);
|
||||
ret.Add(EMaterialTypes::FourtyOne);
|
||||
if (material)
|
||||
ret.Add(EMaterialTypes::FourtyTwo);
|
||||
ret.Add(EMaterialTypes::Solid);
|
||||
ret.Add(EMaterialTypes::Immovable);
|
||||
ret.Add(EMaterialTypes::Orbit);
|
||||
if (!open)
|
||||
ret.Add(EMaterialTypes::Occluder);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -27,19 +27,19 @@ static CMaterialList MakeDoorMaterialList(bool material)
|
|||
CScriptDoor::CScriptDoor(TUniqueId uid, const std::string& name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, CModelData&& mData, const CActorParameters& actParms,
|
||||
const zeus::CVector3f&, const zeus::CAABox& aabb, bool active,
|
||||
bool material, bool b2, float, bool ballDoor)
|
||||
: CPhysicsActor(uid, active, name, info, xf, std::move(mData), MakeDoorMaterialList(material),
|
||||
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_(material),
|
||||
x2a8_26_(material),
|
||||
x2a8_25_(open),
|
||||
x2a8_26_(open),
|
||||
x2a8_28_(b2),
|
||||
x2a8_27_(true)
|
||||
{
|
||||
x264_ = GetBoundingBox();
|
||||
x284_modelBounds = x64_modelData->GetBounds(xf.getRotation());
|
||||
|
||||
if (material)
|
||||
if (open)
|
||||
SetDoorAnimation(EDoorAnimType::Open);
|
||||
|
||||
SetMass(0.f);
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
CScriptDoor(TUniqueId, const std::string& name, const CEntityInfo& info,
|
||||
const zeus::CTransform&, CModelData&&, const CActorParameters&,
|
||||
const zeus::CVector3f&, const zeus::CAABox&,
|
||||
bool active, bool material, bool, float, bool ballDoor);
|
||||
bool active, bool open, bool, float, bool ballDoor);
|
||||
|
||||
zeus::CVector3f GetOrbitPosition(const CStateManager& mgr) const;
|
||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr);
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace urde
|
|||
{
|
||||
CScriptGrapplePoint::CScriptGrapplePoint(TUniqueId uid, const std::string &name, const CEntityInfo& info,
|
||||
const zeus::CTransform &transform, bool active, const CGrappleParameters ¶ms)
|
||||
: CActor(uid, active, name, info, transform, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::FourtyOne),
|
||||
: CActor(uid, active, name, info, transform, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Orbit),
|
||||
CActorParameters::None(),
|
||||
kInvalidUniqueId),
|
||||
xe8_(x34_transform.origin - 0.5f,
|
||||
|
|
|
@ -7,10 +7,10 @@ namespace urde
|
|||
static CMaterialList MakePlatformMaterialList()
|
||||
{
|
||||
CMaterialList ret;
|
||||
ret.Add(EMaterialTypes::Nineteen);
|
||||
ret.Add(EMaterialTypes::FourtyThree);
|
||||
ret.Add(EMaterialTypes::FourtyNine);
|
||||
ret.Add(EMaterialTypes::FourtyTwo);
|
||||
ret.Add(EMaterialTypes::Solid);
|
||||
ret.Add(EMaterialTypes::Immovable);
|
||||
ret.Add(EMaterialTypes::Platform);
|
||||
ret.Add(EMaterialTypes::Occluder);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace urde
|
|||
CScriptPointOfInterest::CScriptPointOfInterest(TUniqueId uid, const std::string& name, const CEntityInfo info,
|
||||
const zeus::CTransform& xf, bool active,
|
||||
const CScannableParameters& parms, float f1)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(u64(EMaterialTypes::FourtyOne)),
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(u64(EMaterialTypes::Orbit)),
|
||||
CActorParameters::None().Scannable(parms), kInvalidUniqueId)
|
||||
, xe8_pointSize(f1)
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@ CScriptTrigger::CScriptTrigger(TUniqueId uid, const std::string& name, const CEn
|
|||
const CDamageInfo& dInfo, const zeus::CVector3f& forceField,
|
||||
ETriggerFlags triggerFlags, bool active, bool b2, bool b3)
|
||||
: CActor(uid, active, name, info, zeus::CTransform::Translate(pos), CModelData::CModelDataNull(),
|
||||
CMaterialList(EMaterialTypes::ThirtyFour), CActorParameters::None(), kInvalidUniqueId),
|
||||
CMaterialList(EMaterialTypes::Trigger), CActorParameters::None(), kInvalidUniqueId),
|
||||
x100_damageInfo(dInfo),
|
||||
x11c_forceField(forceField),
|
||||
x128_forceMagnitude(forceField.magnitude()),
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace urde
|
|||
int CWorldTransManager::GetSuitCharIdx()
|
||||
{
|
||||
CPlayerState& state = *g_GameState->GetPlayerState();
|
||||
if (state.GetFusion())
|
||||
if (state.IsFusionEnabled())
|
||||
{
|
||||
switch (state.x20_currentSuit)
|
||||
{
|
||||
|
|
|
@ -385,9 +385,9 @@ CEntity* ScriptLoader::LoadActor(CStateManager& mgr, CInputStream& in, int propC
|
|||
CActorParameters actParms = LoadActorParameters(in);
|
||||
|
||||
bool b1 = in.readBool();
|
||||
bool b2 = in.readBool();
|
||||
bool b3 = in.readBool();
|
||||
bool b4 = in.readBool();
|
||||
bool snow = in.readBool();
|
||||
bool grass = in.readBool();
|
||||
bool metalGrating = in.readBool();
|
||||
bool b5 = in.readBool();
|
||||
u32 w2 = in.readUint32Big();
|
||||
float f3 = in.readFloatBig();
|
||||
|
@ -403,14 +403,14 @@ CEntity* ScriptLoader::LoadActor(CStateManager& mgr, CInputStream& in, int propC
|
|||
zeus::CAABox aabb = GetCollisionBox(mgr, info.GetAreaId(), collisionExtent, centroid);
|
||||
|
||||
CMaterialList list;
|
||||
if (b2)
|
||||
list.Add(EMaterialTypes::Eleven);
|
||||
if (snow) // Bool 2
|
||||
list.Add(EMaterialTypes::Snow);
|
||||
|
||||
if (b3)
|
||||
list.Add(EMaterialTypes::Three);
|
||||
if (grass) // Bool 3
|
||||
list.Add(EMaterialTypes::Grass);
|
||||
|
||||
if (b4)
|
||||
list.Add(EMaterialTypes::Six);
|
||||
if (metalGrating) // Bool 4
|
||||
list.Add(EMaterialTypes::MetalGrating);
|
||||
|
||||
bool generateExtent = false;
|
||||
if (collisionExtent.x < 0.f || collisionExtent.y < 0.f || collisionExtent.z < 0.f)
|
||||
|
|
2
kabufuda
2
kabufuda
|
@ -1 +1 @@
|
|||
Subproject commit 6892853a14673334e155da5abc7d8c9cca859085
|
||||
Subproject commit 3121f67f4da34f64bcef3aecab1d269fc5a4e035
|
Loading…
Reference in New Issue