mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-15 12:46:08 +00:00
Update submodules, initial CTextureCache
This commit is contained in:
@@ -1,64 +1,69 @@
|
||||
#include "MP1.hpp"
|
||||
#include "Graphics/Shaders/CModelShaders.hpp"
|
||||
#include "Graphics/Shaders/CThermalColdFilter.hpp"
|
||||
#include "Graphics/Shaders/CThermalHotFilter.hpp"
|
||||
#include "Graphics/Shaders/CSpaceWarpFilter.hpp"
|
||||
#include "Graphics/Shaders/CColoredQuadFilter.hpp"
|
||||
#include "Graphics/Shaders/CColoredStripShader.hpp"
|
||||
#include "Graphics/Shaders/CTexturedQuadFilter.hpp"
|
||||
#include "Graphics/Shaders/CCameraBlurFilter.hpp"
|
||||
#include "Graphics/Shaders/CXRayBlurFilter.hpp"
|
||||
#include "Graphics/Shaders/CTextSupportShader.hpp"
|
||||
#include "Graphics/Shaders/CEnergyBarShader.hpp"
|
||||
#include "Graphics/Shaders/CRadarPaintShader.hpp"
|
||||
#include "Graphics/Shaders/CMapSurfaceShader.hpp"
|
||||
#include "Graphics/Shaders/CPhazonSuitFilter.hpp"
|
||||
#include "Graphics/Shaders/CScanLinesFilter.hpp"
|
||||
#include "Graphics/Shaders/CRandomStaticFilter.hpp"
|
||||
#include "Graphics/Shaders/CFluidPlaneShader.hpp"
|
||||
#include "Graphics/Shaders/CAABoxShader.hpp"
|
||||
#include "Graphics/Shaders/CWorldShadowShader.hpp"
|
||||
#include "Graphics/Shaders/CParticleSwooshShaders.hpp"
|
||||
#include "Graphics/Shaders/CEnvFxShaders.hpp"
|
||||
#include "NESEmulator/CNESShader.hpp"
|
||||
#include "Audio/CStreamAudioManager.hpp"
|
||||
#include "CGBASupport.hpp"
|
||||
#include "Runtime/MP1/MP1.hpp"
|
||||
|
||||
#include "CGameHintInfo.hpp"
|
||||
#include "Particle/CParticleDataFactory.hpp"
|
||||
#include "Particle/CGenDescription.hpp"
|
||||
#include "Particle/CElectricDescription.hpp"
|
||||
#include "Particle/CSwooshDescription.hpp"
|
||||
#include "Particle/CParticleElectricDataFactory.hpp"
|
||||
#include "Particle/CParticleSwooshDataFactory.hpp"
|
||||
#include "Particle/CWeaponDescription.hpp"
|
||||
#include "Particle/CProjectileWeaponDataFactory.hpp"
|
||||
#include "Particle/CDecalDataFactory.hpp"
|
||||
#include "GuiSys/CGuiFrame.hpp"
|
||||
#include "GuiSys/CRasterFont.hpp"
|
||||
#include "GuiSys/CStringTable.hpp"
|
||||
#include "Graphics/CModel.hpp"
|
||||
#include "Graphics/CTexture.hpp"
|
||||
#include "Character/CCharLayoutInfo.hpp"
|
||||
#include "Character/CSkinRules.hpp"
|
||||
#include "Character/CAnimCharacterSet.hpp"
|
||||
#include "Character/CAllFormatsAnimSource.hpp"
|
||||
#include "Character/CAnimPOIData.hpp"
|
||||
#include "Collision/CCollidableOBBTreeGroup.hpp"
|
||||
#include "Collision/CCollisionResponseData.hpp"
|
||||
#include "CSaveWorld.hpp"
|
||||
#include "AutoMapper/CMapWorld.hpp"
|
||||
#include "AutoMapper/CMapArea.hpp"
|
||||
#include "AutoMapper/CMapUniverse.hpp"
|
||||
#include "World/CStateMachine.hpp"
|
||||
#include "CScannableObjectInfo.hpp"
|
||||
#include "Audio/CAudioGroupSet.hpp"
|
||||
#include "Audio/CSfxManager.hpp"
|
||||
#include "Audio/CMidiManager.hpp"
|
||||
#include "CDependencyGroup.hpp"
|
||||
#include "CStateManager.hpp"
|
||||
#include "World/CPlayer.hpp"
|
||||
#include "CStopwatch.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CModelShaders.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CThermalColdFilter.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CThermalHotFilter.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CSpaceWarpFilter.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CColoredQuadFilter.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CColoredStripShader.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CTexturedQuadFilter.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CCameraBlurFilter.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CXRayBlurFilter.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CTextSupportShader.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CEnergyBarShader.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CRadarPaintShader.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CMapSurfaceShader.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CPhazonSuitFilter.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CScanLinesFilter.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CRandomStaticFilter.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CFluidPlaneShader.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CAABoxShader.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CWorldShadowShader.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CParticleSwooshShaders.hpp"
|
||||
#include "Runtime/Graphics/Shaders/CEnvFxShaders.hpp"
|
||||
#include "NESEmulator/CNESShader.hpp"
|
||||
#include "Runtime/Audio/CStreamAudioManager.hpp"
|
||||
#include "Runtime/MP1/CGBASupport.hpp"
|
||||
|
||||
#include "Runtime/CGameHintInfo.hpp"
|
||||
#include "Runtime/Particle/CParticleDataFactory.hpp"
|
||||
#include "Runtime/Particle/CParticleElectricDataFactory.hpp"
|
||||
#include "Runtime/Particle/CParticleSwooshDataFactory.hpp"
|
||||
#include "Runtime/Particle/CWeaponDescription.hpp"
|
||||
#include "Runtime/Particle/CProjectileWeaponDataFactory.hpp"
|
||||
#include "Runtime/Particle/CDecalDataFactory.hpp"
|
||||
#include "Runtime/GuiSys/CGuiFrame.hpp"
|
||||
#include "Runtime/GuiSys/CRasterFont.hpp"
|
||||
#include "Runtime/GuiSys/CStringTable.hpp"
|
||||
#include "Runtime/Graphics/CModel.hpp"
|
||||
#include "Runtime/Graphics/CTexture.hpp"
|
||||
#include "Runtime/Character/CCharLayoutInfo.hpp"
|
||||
#include "Runtime/Character/CSkinRules.hpp"
|
||||
#include "Runtime/Character/CAnimCharacterSet.hpp"
|
||||
#include "Runtime/Character/CAllFormatsAnimSource.hpp"
|
||||
#include "Runtime/Character/CAnimPOIData.hpp"
|
||||
#include "Runtime/Collision/CCollidableOBBTreeGroup.hpp"
|
||||
#include "Runtime/Collision/CCollisionResponseData.hpp"
|
||||
#include "Runtime/CTextureCache.hpp"
|
||||
#include "Runtime/CSaveWorld.hpp"
|
||||
#include "Runtime/AutoMapper/CMapWorld.hpp"
|
||||
#include "Runtime/AutoMapper/CMapArea.hpp"
|
||||
#include "Runtime/AutoMapper/CMapUniverse.hpp"
|
||||
#include "Runtime/World/CStateMachine.hpp"
|
||||
#include "Runtime/CScannableObjectInfo.hpp"
|
||||
#include "Runtime/Audio/CAudioGroupSet.hpp"
|
||||
#include "Runtime/Audio/CSfxManager.hpp"
|
||||
#include "Runtime/Audio/CMidiManager.hpp"
|
||||
#include "Runtime/CDependencyGroup.hpp"
|
||||
#include "Runtime/CStateManager.hpp"
|
||||
#include "Runtime/World/CPlayer.hpp"
|
||||
#include "Runtime/CStopwatch.hpp"
|
||||
|
||||
#include <DataSpec/DNAMP1/SFX/Misc.h>
|
||||
#include <DataSpec/DNAMP1/SFX/MiscSamus.h>
|
||||
#include <DataSpec/DNAMP1/SFX/UI.h>
|
||||
#include <DataSpec/DNAMP1/SFX/Weapons.h>
|
||||
#include <DataSpec/DNAMP1/SFX/ZZZ.h>
|
||||
#include <discord_rpc.h>
|
||||
|
||||
namespace hecl {
|
||||
@@ -126,8 +131,11 @@ struct AudioGroupInfo {
|
||||
u32 id;
|
||||
};
|
||||
|
||||
static const AudioGroupInfo StaticAudioGroups[] = {
|
||||
{"Misc_AGSC", 39}, {"MiscSamus_AGSC", 41}, {"UI_AGSC", 40}, {"Weapons_AGSC", 43}, {"ZZZ_AGSC", 65}};
|
||||
static const AudioGroupInfo StaticAudioGroups[] = {{"Misc_AGSC", GRPmisc},
|
||||
{"MiscSamus_AGSC", GRPmiscSamus},
|
||||
{"UI_AGSC", GRPui},
|
||||
{"Weapons_AGSC", GRPweapons},
|
||||
{"ZZZ_AGSC", GRPzzz}};
|
||||
|
||||
bool CGameArchitectureSupport::LoadAudio() {
|
||||
if (x88_audioLoadStatus == EAudioLoadStatus::Loaded)
|
||||
@@ -270,7 +278,6 @@ void CGameGlobalObjects::AddPaksAndFactories() {
|
||||
loader->AddPakFileAsync("SamGunFx", true, false);
|
||||
loader->AddPakFileAsync("MidiData", false, false);
|
||||
loader->AddPakFileAsync("GGuiSys", false, false);
|
||||
loader->AddPakFileAsync("!original_ids", false, false);
|
||||
loader->WaitForPakFileLoadingComplete();
|
||||
}
|
||||
|
||||
@@ -304,6 +311,7 @@ void CGameGlobalObjects::AddPaksAndFactories() {
|
||||
fmgr->AddFactory(FOURCC('MAPU'), FFactoryFunc(FMapUniverseFactory));
|
||||
fmgr->AddFactory(FOURCC('AFSM'), FFactoryFunc(FAiFiniteStateMachineFactory));
|
||||
fmgr->AddFactory(FOURCC('PATH'), FMemFactoryFunc(FPathFindAreaFactory));
|
||||
fmgr->AddFactory(FOURCC('TMET'), FFactoryFunc(FTextureCacheFactory));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,12 +346,20 @@ void CMain::AddOverridePaks() {
|
||||
if (!loader)
|
||||
return;
|
||||
|
||||
/* Inversely load each pak starting at 999, to ensure proper priority order
|
||||
* the higher the number the higer the priority, e.g: Override0 has less priority than Override1 etc.
|
||||
*/
|
||||
for (size_t i = 999; i > 0; --i) {
|
||||
std::string path = fmt::format(fmt("Override{}"), i);
|
||||
if (CDvdFile::FileExists((path + ".upak").c_str()))
|
||||
loader->AddPakFileAsync(path, false, false, true);
|
||||
}
|
||||
/* Make sure all Override paks are ready before attempting to load URDE.upak */
|
||||
loader->WaitForPakFileLoadingComplete();
|
||||
|
||||
/* Attempt to load URDE.upak
|
||||
* NOTE(phil): Should we fatal here if it's not found?
|
||||
*/
|
||||
if (CDvdFile::FileExists("URDE.upak"))
|
||||
loader->AddPakFile("URDE", false, false, true);
|
||||
}
|
||||
|
||||
@@ -61,11 +61,16 @@ class CGameGlobalObjects {
|
||||
TLockedToken<CStringTable> x13c_mainStringTable;
|
||||
CInGameTweakManager x150_tweakManager;
|
||||
std::unique_ptr<IRenderer> m_renderer;
|
||||
TLockedToken<CTextureCache> m_textureCache;
|
||||
|
||||
void LoadStringTable() {
|
||||
x13c_mainStringTable = g_SimplePool->GetObj("STRG_Main");
|
||||
g_MainStringTable = x13c_mainStringTable.GetObj();
|
||||
}
|
||||
void LoadTextureCache() {
|
||||
m_textureCache = g_SimplePool->GetObj("TextureCache"sv);
|
||||
g_TextureCache = m_textureCache.GetObj();
|
||||
}
|
||||
void AddPaksAndFactories();
|
||||
static IRenderer* AllocateRenderer(IObjectStore& store, IFactory& resFactory) {
|
||||
g_Renderer = new CBooRenderer(store, resFactory);
|
||||
@@ -96,6 +101,7 @@ public:
|
||||
|
||||
void PostInitialize() {
|
||||
AddPaksAndFactories();
|
||||
LoadTextureCache();
|
||||
LoadStringTable();
|
||||
m_renderer.reset(AllocateRenderer(*xcc_simplePool, *x4_resFactory));
|
||||
CEnvFxManager::Initialize();
|
||||
|
||||
@@ -50,7 +50,7 @@ void CJellyZap::Think(float dt, CStateManager& mgr) {
|
||||
if (!GetActive())
|
||||
return;
|
||||
if (x5b8_24_)
|
||||
x450_bodyController->FaceDirection(GetTranslation() - mgr.GetPlayer().GetTranslation(), dt);
|
||||
x450_bodyController->FaceDirection(mgr.GetPlayer().GetTranslation() - GetTranslation(), dt);
|
||||
|
||||
float fv = (x5b8_25_ && x450_bodyController->GetPercentageFrozen() == 0.f ? x50c_baseDamageMag + (dt / 0.3f)
|
||||
: x50c_baseDamageMag - (dt / 0.75f));
|
||||
@@ -96,9 +96,21 @@ void CJellyZap::Suck(CStateManager& mgr, EStateMsg msg, float arg) {
|
||||
x32c_animState = EAnimState::Ready;
|
||||
RemoveAllAttractors(mgr);
|
||||
} else if (msg == EStateMsg::Update) {
|
||||
|
||||
TryCommand(mgr, pas::EAnimationState::LoopReaction, &CPatterned::TryLoopReaction, 0);
|
||||
x450_bodyController->GetCommandMgr().SetTargetVector(
|
||||
(mgr.GetPlayer().GetTranslation() + zeus::CVector3f(0.f, 0.f, 1.f)) - GetTranslation());
|
||||
zeus::CVector3f diff = (mgr.GetPlayer().GetTranslation() - GetTranslation());
|
||||
float f1 = diff.magnitude();
|
||||
float f3 = 5.f;
|
||||
float f2 = x58c_;
|
||||
if (mgr.GetPlayer().GetMorphballTransitionState() == CPlayer::EPlayerMorphBallState::Morphed)
|
||||
f2 = x594_;
|
||||
else if (mgr.GetPlayerState()->GetCurrentSuitRaw() == CPlayerState::EPlayerSuit::Gravity)
|
||||
f2 = x590_;
|
||||
float f4 = f3 * f2;
|
||||
float f5 = 1.f / f1;
|
||||
|
||||
} else if (msg == EStateMsg::Deactivate) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +122,7 @@ void CJellyZap::Active(CStateManager& mgr, EStateMsg msg, float arg) {
|
||||
x330_stateMachineState.SetDelay(x3d0_playerLeashTime);
|
||||
} else if (msg == EStateMsg::Update) {
|
||||
zeus::CVector3f targetVector =
|
||||
GetTranslation() - (zeus::CVector3f(0.f, 0.f, 1.f) + mgr.GetPlayer().GetTranslation());
|
||||
GetTranslation() - (zeus::CVector3f(0.f, 0.f, 1.f) + mgr.GetPlayer().GetTranslation());
|
||||
x450_bodyController->GetCommandMgr().SetTargetVector(targetVector);
|
||||
if (x5b8_26_) {
|
||||
zeus::CVector3f moveToImpulse =
|
||||
|
||||
Reference in New Issue
Block a user