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