mirror of https://github.com/AxioDL/metaforce.git
Initial Console integration
This commit is contained in:
parent
7c699172cc
commit
030e80d843
|
@ -3,10 +3,16 @@
|
||||||
|
|
||||||
#include "../DNACommon.hpp"
|
#include "../DNACommon.hpp"
|
||||||
|
|
||||||
|
namespace hecl
|
||||||
|
{
|
||||||
|
class CVarManager;
|
||||||
|
}
|
||||||
namespace DataSpec
|
namespace DataSpec
|
||||||
{
|
{
|
||||||
struct ITweak : BigYAML
|
struct ITweak : BigYAML
|
||||||
{
|
{
|
||||||
|
|
||||||
|
virtual void initCVars(hecl::CVarManager*) {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#ifndef __DNACOMMON_ITWEAKGUICOLORS_HPP__
|
#ifndef __DNACOMMON_ITWEAKGUICOLORS_HPP__
|
||||||
#define __DNACOMMON_ITWEAKGUICOLORS_HPP__
|
#define __DNACOMMON_ITWEAKGUICOLORS_HPP__
|
||||||
|
|
||||||
#include "../DNACommon.hpp"
|
#include "ITweak.hpp"
|
||||||
|
|
||||||
namespace DataSpec
|
namespace DataSpec
|
||||||
{
|
{
|
||||||
struct ITweakGuiColors : BigYAML
|
struct ITweakGuiColors : ITweak
|
||||||
{
|
{
|
||||||
struct VisorEnergyInitColors
|
struct VisorEnergyInitColors
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,8 @@ set(DNAMP1_SOURCES
|
||||||
DeafBabe.cpp
|
DeafBabe.cpp
|
||||||
Tweaks/CTweakPlayer.cpp
|
Tweaks/CTweakPlayer.cpp
|
||||||
Tweaks/CTweakTargeting.cpp
|
Tweaks/CTweakTargeting.cpp
|
||||||
Tweaks/CTweakBall.cpp)
|
Tweaks/CTweakBall.cpp
|
||||||
|
Tweaks/CTweakGame.cpp)
|
||||||
|
|
||||||
dataspec_add_list(DNAMP1 DNAMP1_SOURCES)
|
dataspec_add_list(DNAMP1 DNAMP1_SOURCES)
|
||||||
list(APPEND DNAMP1_SOURCES ${liblist})
|
list(APPEND DNAMP1_SOURCES ${liblist})
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#include "CTweakGame.hpp"
|
||||||
|
#include "hecl/CVarManager.hpp"
|
||||||
|
|
||||||
|
namespace DataSpec::DNAMP1
|
||||||
|
{
|
||||||
|
void CTweakGame::initCVars(hecl::CVarManager* mgr)
|
||||||
|
{
|
||||||
|
mgr->findOrMakeCVar("tweaks.game.hardmodeDamageMult", "", x60_hardmodeDamageMult, hecl::CVar::EFlags::Game | hecl::CVar::Archive | hecl::CVar::Cheat);
|
||||||
|
mgr->findOrMakeCVar("tweaks.game.hardmodeWeaponMult", "", x64_hardmodeWeaponMult, hecl::CVar::EFlags::Game | hecl::CVar::Archive | hecl::CVar::Cheat);
|
||||||
|
}
|
||||||
|
}
|
|
@ -55,6 +55,8 @@ struct CTweakGame final : ITweakGame
|
||||||
this->read(in);
|
this->read(in);
|
||||||
x2b_splashScreensDisabled = false;
|
x2b_splashScreensDisabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void initCVars(hecl::CVarManager* mgr);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace urde
|
||||||
|
|
||||||
void ViewManager::InitMP1(MP1::CMain& main)
|
void ViewManager::InitMP1(MP1::CMain& main)
|
||||||
{
|
{
|
||||||
main.Init(m_fileStoreManager, m_mainWindow.get(), m_voiceEngine.get(), *m_amuseAllocWrapper);
|
main.Init(m_fileStoreManager, &m_cvarManager, m_mainWindow.get(), m_voiceEngine.get(), *m_amuseAllocWrapper);
|
||||||
if (!m_noShaderWarmup)
|
if (!m_noShaderWarmup)
|
||||||
main.WarmupShaders();
|
main.WarmupShaders();
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@ enum class EArchMsgTarget
|
||||||
{
|
{
|
||||||
IOWinManager = 0,
|
IOWinManager = 0,
|
||||||
Game = 1,
|
Game = 1,
|
||||||
/* URDE targets, we start at 255 */
|
|
||||||
ArchitectureSupport = 255,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class EArchMsgType
|
enum class EArchMsgType
|
||||||
|
@ -30,8 +28,6 @@ enum class EArchMsgType
|
||||||
QuitGameplay = 8,
|
QuitGameplay = 8,
|
||||||
FrameBegin = 10,
|
FrameBegin = 10,
|
||||||
FrameEnd = 11,
|
FrameEnd = 11,
|
||||||
/* URDE messages, we start at 255 */
|
|
||||||
ApplicationExit = 255,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct IArchMsgParm
|
struct IArchMsgParm
|
||||||
|
@ -176,9 +172,9 @@ public:
|
||||||
std::make_shared<CArchMsgParmInt32>(a));
|
std::make_shared<CArchMsgParmInt32>(a));
|
||||||
}
|
}
|
||||||
/* URDE Messages */
|
/* URDE Messages */
|
||||||
static CArchitectureMessage CreateApplicationExit(EArchMsgTarget target)
|
static CArchitectureMessage CreateRemoveAllIOWins(EArchMsgTarget target)
|
||||||
{
|
{
|
||||||
return CArchitectureMessage(target, EArchMsgType::ApplicationExit,
|
return CArchitectureMessage(target, EArchMsgType::RemoveAllIOWins,
|
||||||
std::make_shared<CArchMsgParmNull>());
|
std::make_shared<CArchMsgParmNull>());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,6 +7,11 @@
|
||||||
#include <amuse/amuse.hpp>
|
#include <amuse/amuse.hpp>
|
||||||
#include "RetroTypes.hpp"
|
#include "RetroTypes.hpp"
|
||||||
|
|
||||||
|
namespace hecl
|
||||||
|
{
|
||||||
|
class CVarManager;
|
||||||
|
}
|
||||||
|
|
||||||
namespace urde
|
namespace urde
|
||||||
{
|
{
|
||||||
class CStopWatch;
|
class CStopWatch;
|
||||||
|
@ -34,6 +39,7 @@ class IMain
|
||||||
public:
|
public:
|
||||||
virtual ~IMain() = default;
|
virtual ~IMain() = default;
|
||||||
virtual void Init(const hecl::Runtime::FileStoreManager& storeMgr,
|
virtual void Init(const hecl::Runtime::FileStoreManager& storeMgr,
|
||||||
|
hecl::CVarManager* cvarMgr,
|
||||||
boo::IWindow* window,
|
boo::IWindow* window,
|
||||||
boo::IAudioVoiceEngine* voiceEngine,
|
boo::IAudioVoiceEngine* voiceEngine,
|
||||||
amuse::IBackendVoiceAllocator& backend)=0;
|
amuse::IBackendVoiceAllocator& backend)=0;
|
||||||
|
|
|
@ -36,7 +36,7 @@ static const SObjectTag& IDFromFactory(CResFactory& factory, const char* name)
|
||||||
return *tag;
|
return *tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTweaks::RegisterTweaks()
|
void CTweaks::RegisterTweaks(hecl::CVarManager* cvarMgr)
|
||||||
{
|
{
|
||||||
std::experimental::optional<CMemoryInStream> strm;
|
std::experimental::optional<CMemoryInStream> strm;
|
||||||
const SObjectTag* tag;
|
const SObjectTag* tag;
|
||||||
|
@ -45,11 +45,13 @@ void CTweaks::RegisterTweaks()
|
||||||
tag = g_ResFactory->GetResourceIdByName("Particle");
|
tag = g_ResFactory->GetResourceIdByName("Particle");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakParticle = new DataSpec::DNAMP1::CTweakParticle(*strm);
|
g_tweakParticle = new DataSpec::DNAMP1::CTweakParticle(*strm);
|
||||||
|
g_tweakParticle->initCVars(cvarMgr);
|
||||||
|
|
||||||
/* Player */
|
/* Player */
|
||||||
tag = g_ResFactory->GetResourceIdByName("Player");
|
tag = g_ResFactory->GetResourceIdByName("Player");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakPlayer = new DataSpec::DNAMP1::CTweakPlayer(*strm);
|
g_tweakPlayer = new DataSpec::DNAMP1::CTweakPlayer(*strm);
|
||||||
|
g_tweakPlayer->initCVars(cvarMgr);
|
||||||
|
|
||||||
/* CameraBob */
|
/* CameraBob */
|
||||||
tag = g_ResFactory->GetResourceIdByName("CameraBob");
|
tag = g_ResFactory->GetResourceIdByName("CameraBob");
|
||||||
|
@ -60,37 +62,44 @@ void CTweaks::RegisterTweaks()
|
||||||
tag = g_ResFactory->GetResourceIdByName("Ball");
|
tag = g_ResFactory->GetResourceIdByName("Ball");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakBall = new DataSpec::DNAMP1::CTweakBall(*strm);
|
g_tweakBall = new DataSpec::DNAMP1::CTweakBall(*strm);
|
||||||
|
g_tweakBall->initCVars(cvarMgr);
|
||||||
|
|
||||||
/* PlayerGun */
|
/* PlayerGun */
|
||||||
tag = g_ResFactory->GetResourceIdByName("PlayerGun");
|
tag = g_ResFactory->GetResourceIdByName("PlayerGun");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakPlayerGun = new DataSpec::DNAMP1::CTweakPlayerGun(*strm);
|
g_tweakPlayerGun = new DataSpec::DNAMP1::CTweakPlayerGun(*strm);
|
||||||
|
g_tweakPlayerGun->initCVars(cvarMgr);
|
||||||
|
|
||||||
/* Targeting */
|
/* Targeting */
|
||||||
tag = g_ResFactory->GetResourceIdByName("Targeting");
|
tag = g_ResFactory->GetResourceIdByName("Targeting");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakTargeting = new DataSpec::DNAMP1::CTweakTargeting(*strm);
|
g_tweakTargeting = new DataSpec::DNAMP1::CTweakTargeting(*strm);
|
||||||
|
g_tweakTargeting->initCVars(cvarMgr);
|
||||||
|
|
||||||
/* Game */
|
/* Game */
|
||||||
tag = g_ResFactory->GetResourceIdByName("Game");
|
tag = g_ResFactory->GetResourceIdByName("Game");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakGame = new DataSpec::DNAMP1::CTweakGame(*strm);
|
g_tweakGame = new DataSpec::DNAMP1::CTweakGame(*strm);
|
||||||
|
g_tweakGame->initCVars(cvarMgr);
|
||||||
|
|
||||||
/* GuiColors */
|
/* GuiColors */
|
||||||
tag = g_ResFactory->GetResourceIdByName("GuiColors");
|
tag = g_ResFactory->GetResourceIdByName("GuiColors");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakGuiColors = new DataSpec::DNAMP1::CTweakGuiColors(*strm);
|
g_tweakGuiColors = new DataSpec::DNAMP1::CTweakGuiColors(*strm);
|
||||||
|
g_tweakGuiColors->initCVars(cvarMgr);
|
||||||
|
|
||||||
/* AutoMapper */
|
/* AutoMapper */
|
||||||
tag = g_ResFactory->GetResourceIdByName("AutoMapper");
|
tag = g_ResFactory->GetResourceIdByName("AutoMapper");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakAutoMapper = new DataSpec::DNAMP1::CTweakAutoMapper(*strm);
|
g_tweakAutoMapper = new DataSpec::DNAMP1::CTweakAutoMapper(*strm);
|
||||||
CMappableObject::ReadAutoMapperTweaks(*g_tweakAutoMapper);
|
CMappableObject::ReadAutoMapperTweaks(*g_tweakAutoMapper);
|
||||||
|
g_tweakPlayerGun->initCVars(cvarMgr);
|
||||||
|
|
||||||
/* Gui */
|
/* Gui */
|
||||||
tag = g_ResFactory->GetResourceIdByName("Gui");
|
tag = g_ResFactory->GetResourceIdByName("Gui");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakGui = new DataSpec::DNAMP1::CTweakGui(*strm);
|
g_tweakGui = new DataSpec::DNAMP1::CTweakGui(*strm);
|
||||||
|
g_tweakPlayerGun->initCVars(cvarMgr);
|
||||||
|
|
||||||
/* PlayerControls */
|
/* PlayerControls */
|
||||||
tag = g_ResFactory->GetResourceIdByName("PlayerControls");
|
tag = g_ResFactory->GetResourceIdByName("PlayerControls");
|
||||||
|
@ -108,9 +117,11 @@ void CTweaks::RegisterTweaks()
|
||||||
tag = g_ResFactory->GetResourceIdByName("SlideShow");
|
tag = g_ResFactory->GetResourceIdByName("SlideShow");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakSlideShow = new DataSpec::DNAMP1::CTweakSlideShow(*strm);
|
g_tweakSlideShow = new DataSpec::DNAMP1::CTweakSlideShow(*strm);
|
||||||
|
g_tweakSlideShow->initCVars(cvarMgr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTweaks::RegisterResourceTweaks()
|
void CTweaks::RegisterResourceTweaks(hecl::CVarManager* cvarMgr)
|
||||||
{
|
{
|
||||||
std::experimental::optional<CMemoryInStream> strm;
|
std::experimental::optional<CMemoryInStream> strm;
|
||||||
|
|
||||||
|
@ -118,11 +129,13 @@ void CTweaks::RegisterResourceTweaks()
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakGunRes = new DataSpec::DNAMP1::CTweakGunRes(*strm);
|
g_tweakGunRes = new DataSpec::DNAMP1::CTweakGunRes(*strm);
|
||||||
g_tweakGunRes->ResolveResources(*g_ResFactory);
|
g_tweakGunRes->ResolveResources(*g_ResFactory);
|
||||||
|
g_tweakGunRes->initCVars(cvarMgr);
|
||||||
|
|
||||||
tag = g_ResFactory->GetResourceIdByName("PlayerRes");
|
tag = g_ResFactory->GetResourceIdByName("PlayerRes");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
g_tweakPlayerRes = new DataSpec::DNAMP1::CTweakPlayerRes(*strm);
|
g_tweakPlayerRes = new DataSpec::DNAMP1::CTweakPlayerRes(*strm);
|
||||||
g_tweakPlayerRes->ResolveResources(*g_ResFactory);
|
g_tweakPlayerRes->ResolveResources(*g_ResFactory);
|
||||||
|
g_tweakPlayerRes->initCVars(cvarMgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#define __URDE_CTWEAKS_HPP__
|
#define __URDE_CTWEAKS_HPP__
|
||||||
|
|
||||||
#include "RetroTypes.hpp"
|
#include "RetroTypes.hpp"
|
||||||
|
namespace hecl
|
||||||
|
{
|
||||||
|
class CVarManager;
|
||||||
|
}
|
||||||
|
|
||||||
namespace urde
|
namespace urde
|
||||||
{
|
{
|
||||||
|
@ -12,8 +16,8 @@ namespace MP1
|
||||||
class CTweaks
|
class CTweaks
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void RegisterTweaks();
|
void RegisterTweaks(hecl::CVarManager* cvarMgr);
|
||||||
void RegisterResourceTweaks();
|
void RegisterResourceTweaks(hecl::CVarManager* cvarMgr);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,11 +239,31 @@ CGameArchitectureSupport::~CGameArchitectureSupport()
|
||||||
CStreamAudioManager::Shutdown();
|
CStreamAudioManager::Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGameArchitectureSupport::charKeyDown(unsigned long charCode, boo::EModifierKey mods, bool isRepeat)
|
||||||
|
{
|
||||||
|
x30_inputGenerator.charKeyDown(charCode, mods, isRepeat);
|
||||||
|
m_parent.m_console->handleCharCode(charCode, mods, isRepeat);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGameArchitectureSupport::specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool isRepeat)
|
||||||
|
{
|
||||||
|
x30_inputGenerator.specialKeyDown(key, mods, isRepeat);
|
||||||
|
m_parent.m_console->handleSpecialKeyDown(key, mods, isRepeat);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGameArchitectureSupport::specialKeyUp(boo::ESpecialKey key, boo::EModifierKey mods)
|
||||||
|
{
|
||||||
|
x30_inputGenerator.specialKeyUp(key, mods);
|
||||||
|
m_parent.m_console->handleSpecialKeyUp(key, mods);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CMain::CMain(IFactory* resFactory, CSimplePool* resStore,
|
CMain::CMain(IFactory* resFactory, CSimplePool* resStore,
|
||||||
boo::IGraphicsDataFactory* gfxFactory,
|
boo::IGraphicsDataFactory* gfxFactory,
|
||||||
boo::IGraphicsCommandQueue* cmdQ,
|
boo::IGraphicsCommandQueue* cmdQ,
|
||||||
const boo::ObjToken<boo::ITextureR>& spareTex)
|
const boo::ObjToken<boo::ITextureR>& spareTex)
|
||||||
: m_booSetter(gfxFactory, cmdQ, spareTex),
|
: m_booSetter(gfxFactory, cmdQ, spareTex),
|
||||||
x128_globalObjects(resFactory, resStore)
|
x128_globalObjects(resFactory, resStore)
|
||||||
{
|
{
|
||||||
xe4_gameplayResult = EGameplayResult::Playing;
|
xe4_gameplayResult = EGameplayResult::Playing;
|
||||||
|
@ -418,15 +438,19 @@ void CMain::StreamNewGameState(CBitStreamReader& r, u32 idx)
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMain::Init(const hecl::Runtime::FileStoreManager& storeMgr,
|
void CMain::Init(const hecl::Runtime::FileStoreManager& storeMgr,
|
||||||
|
hecl::CVarManager* cvarMgr,
|
||||||
boo::IWindow* window,
|
boo::IWindow* window,
|
||||||
boo::IAudioVoiceEngine* voiceEngine,
|
boo::IAudioVoiceEngine* voiceEngine,
|
||||||
amuse::IBackendVoiceAllocator& backend)
|
amuse::IBackendVoiceAllocator& backend)
|
||||||
{
|
{
|
||||||
m_mainWindow = window;
|
m_mainWindow = window;
|
||||||
|
m_cvarMgr = cvarMgr;
|
||||||
|
m_console = std::make_unique<hecl::Console>(m_cvarMgr);
|
||||||
|
m_console->registerCommand("quit"sv, "Quits the game immediately"sv, ""sv, std::bind(&CMain::quit, this, std::placeholders::_1, std::placeholders::_2));
|
||||||
InitializeSubsystems(storeMgr);
|
InitializeSubsystems(storeMgr);
|
||||||
x128_globalObjects.PostInitialize();
|
x128_globalObjects.PostInitialize();
|
||||||
x70_tweaks.RegisterTweaks();
|
x70_tweaks.RegisterTweaks(m_cvarMgr);
|
||||||
x70_tweaks.RegisterResourceTweaks();
|
x70_tweaks.RegisterResourceTweaks(m_cvarMgr);
|
||||||
AddWorldPaks();
|
AddWorldPaks();
|
||||||
FillInAssetIDs();
|
FillInAssetIDs();
|
||||||
x164_archSupport.reset(new CGameArchitectureSupport(*this, voiceEngine, backend));
|
x164_archSupport.reset(new CGameArchitectureSupport(*this, voiceEngine, backend));
|
||||||
|
@ -480,11 +504,16 @@ bool CMain::Proc()
|
||||||
if (m_warmupTags.size())
|
if (m_warmupTags.size())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CGBASupport::GlobalPoll();
|
m_console->proc();
|
||||||
x164_archSupport->UpdateTicks();
|
if (!m_console->isOpen())
|
||||||
x164_archSupport->Update();
|
{
|
||||||
CSfxManager::Update(1.f / 60.f);
|
CGBASupport::GlobalPoll();
|
||||||
CStreamAudioManager::Update(1.f / 60.f);
|
x164_archSupport->UpdateTicks();
|
||||||
|
x164_archSupport->Update();
|
||||||
|
CSfxManager::Update(1.f / 60.f);
|
||||||
|
CStreamAudioManager::Update(1.f / 60.f);
|
||||||
|
}
|
||||||
|
|
||||||
if (x164_archSupport->GetIOWinManager().IsEmpty() || CheckReset())
|
if (x164_archSupport->GetIOWinManager().IsEmpty() || CheckReset())
|
||||||
{
|
{
|
||||||
CStreamAudioManager::StopAll();
|
CStreamAudioManager::StopAll();
|
||||||
|
@ -536,6 +565,7 @@ void CMain::Draw()
|
||||||
|
|
||||||
CGraphics::g_BooMainCommandQueue->clearTarget(true, true);
|
CGraphics::g_BooMainCommandQueue->clearTarget(true, true);
|
||||||
x164_archSupport->Draw();
|
x164_archSupport->Draw();
|
||||||
|
m_console->draw(CGraphics::g_BooMainCommandQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMain::ShutdownSubsystems()
|
void CMain::ShutdownSubsystems()
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "DataSpec/DNAMP1/Tweaks/CTweakPlayer.hpp"
|
#include "DataSpec/DNAMP1/Tweaks/CTweakPlayer.hpp"
|
||||||
#include "DataSpec/DNAMP1/Tweaks/CTweakGame.hpp"
|
#include "DataSpec/DNAMP1/Tweaks/CTweakGame.hpp"
|
||||||
#include "World/CScriptMazeNode.hpp"
|
#include "World/CScriptMazeNode.hpp"
|
||||||
|
#include "hecl/Console.hpp"
|
||||||
|
|
||||||
namespace urde
|
namespace urde
|
||||||
{
|
{
|
||||||
|
@ -122,6 +123,7 @@ class CGameArchitectureSupport : public boo::IWindowCallback
|
||||||
class CGameArchitectureSupport
|
class CGameArchitectureSupport
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
friend class CMain;
|
||||||
CMain& m_parent;
|
CMain& m_parent;
|
||||||
CArchitectureQueue x4_archQueue;
|
CArchitectureQueue x4_archQueue;
|
||||||
CAudioSys x0_audioSys;
|
CAudioSys x0_audioSys;
|
||||||
|
@ -142,7 +144,7 @@ class CGameArchitectureSupport
|
||||||
boo::SWindowRect m_windowRect;
|
boo::SWindowRect m_windowRect;
|
||||||
bool m_rectIsDirty;
|
bool m_rectIsDirty;
|
||||||
|
|
||||||
void destroyed() { x4_archQueue.Push(MakeMsg::CreateApplicationExit(EArchMsgTarget::ArchitectureSupport)); }
|
void destroyed() { x4_archQueue.Push(MakeMsg::CreateRemoveAllIOWins(EArchMsgTarget::IOWinManager)); }
|
||||||
|
|
||||||
void resized(const boo::SWindowRect &rect)
|
void resized(const boo::SWindowRect &rect)
|
||||||
{
|
{
|
||||||
|
@ -164,14 +166,11 @@ public:
|
||||||
{ x30_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)
|
||||||
{ x30_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);
|
||||||
{ x30_inputGenerator.charKeyDown(charCode, mods, isRepeat); }
|
void charKeyUp(unsigned long charCode, boo::EModifierKey mods) { x30_inputGenerator.charKeyUp(charCode, mods); }
|
||||||
void charKeyUp(unsigned long charCode, boo::EModifierKey mods)
|
void specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool isRepeat);
|
||||||
{ x30_inputGenerator.charKeyUp(charCode, mods); }
|
|
||||||
void specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool isRepeat)
|
void specialKeyUp(boo::ESpecialKey key, boo::EModifierKey mods);
|
||||||
{ x30_inputGenerator.specialKeyDown(key, mods, isRepeat); }
|
|
||||||
void specialKeyUp(boo::ESpecialKey key, boo::EModifierKey mods)
|
|
||||||
{ x30_inputGenerator.specialKeyUp(key, mods); }
|
|
||||||
void modKeyDown(boo::EModifierKey mod, bool isRepeat)
|
void modKeyDown(boo::EModifierKey mod, bool isRepeat)
|
||||||
{ x30_inputGenerator.modKeyDown(mod, isRepeat);}
|
{ x30_inputGenerator.modKeyDown(mod, isRepeat);}
|
||||||
void modKeyUp(boo::EModifierKey mod)
|
void modKeyUp(boo::EModifierKey mod)
|
||||||
|
@ -255,6 +254,8 @@ private:
|
||||||
|
|
||||||
boo::IWindow* m_mainWindow = nullptr;
|
boo::IWindow* m_mainWindow = nullptr;
|
||||||
|
|
||||||
|
hecl::CVarManager* m_cvarMgr = nullptr;
|
||||||
|
std::unique_ptr<hecl::Console> m_console;
|
||||||
// Warmup state
|
// Warmup state
|
||||||
std::vector<SObjectTag> m_warmupTags;
|
std::vector<SObjectTag> m_warmupTags;
|
||||||
std::vector<SObjectTag>::iterator m_warmupIt;
|
std::vector<SObjectTag>::iterator m_warmupIt;
|
||||||
|
@ -277,6 +278,7 @@ public:
|
||||||
|
|
||||||
//int RsMain(int argc, const boo::SystemChar* argv[]);
|
//int RsMain(int argc, const boo::SystemChar* argv[]);
|
||||||
void Init(const hecl::Runtime::FileStoreManager& storeMgr,
|
void Init(const hecl::Runtime::FileStoreManager& storeMgr,
|
||||||
|
hecl::CVarManager* cvarManager,
|
||||||
boo::IWindow* window,
|
boo::IWindow* window,
|
||||||
boo::IAudioVoiceEngine* voiceEngine,
|
boo::IAudioVoiceEngine* voiceEngine,
|
||||||
amuse::IBackendVoiceAllocator& backend);
|
amuse::IBackendVoiceAllocator& backend);
|
||||||
|
@ -312,6 +314,9 @@ public:
|
||||||
CGameArchitectureSupport* GetArchSupport() const { return x164_archSupport.get(); }
|
CGameArchitectureSupport* GetArchSupport() const { return x164_archSupport.get(); }
|
||||||
|
|
||||||
size_t GetExpectedIdSize() const { return sizeof(u32); }
|
size_t GetExpectedIdSize() const { return sizeof(u32); }
|
||||||
|
void quit(hecl::Console*, const std::vector<std::string>&)
|
||||||
|
{
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit 38e5245735472af75dec1c8d4df7b6062c16b718
|
Subproject commit b9f410a2f87eb837ffc5937ed6a7cc637d91ac79
|
2
hecl-gui
2
hecl-gui
|
@ -1 +1 @@
|
||||||
Subproject commit c2d4a17ccaca7fb17405cb5a78537b7050d8df04
|
Subproject commit b9a0bec10b812738cbfdaa14ebef2e570b8c800d
|
Loading…
Reference in New Issue