2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 12:24:56 +00:00

Huge shader refactor

This commit is contained in:
Jack Andersen
2018-10-06 16:59:17 -10:00
parent 0a0a581f2d
commit c307e354ca
184 changed files with 8777 additions and 14295 deletions

View File

@@ -101,7 +101,9 @@ target_link_libraries(urde
UrdeIcons
UrdeBadging
RuntimeCommon NESEmulator
specter specter-fonts freetype ${DATA_SPEC_LIBS}
specter specter-fonts
${HECL_APPLICATION_REPS_TARGETS_LIST}
freetype ${DATA_SPEC_LIBS}
hecl-full hecl-blender-addon
athena-core nod logvisor athena-libyaml amuse boo
${PNG_LIB} libjpeg-turbo squish xxhash zeus

View File

@@ -98,7 +98,7 @@ void SplitSpace::joinViews(specter::SplitView* thisSplit, int thisSlot, specter:
{
if (thisSplit == otherSplit)
{
SplitSpace* thisSS = dynamic_cast<SplitSpace*>(m_slots[thisSlot].get());
SplitSpace* thisSS = m_slots[thisSlot]->castToSplitSpace();
if (thisSS)
{
int ax = thisSS->m_state.axis == specter::SplitView::Axis::Horizontal ? 1 : 0;
@@ -115,7 +115,7 @@ void SplitSpace::joinViews(specter::SplitView* thisSplit, int thisSlot, specter:
{
for (int i=0 ; i<2 ; ++i)
{
SplitSpace* otherSS = dynamic_cast<SplitSpace*>(m_slots[i].get());
SplitSpace* otherSS = m_slots[i]->castToSplitSpace();
if (otherSS && otherSS->m_splitView.get() == otherSplit)
{
int ax = m_state.axis == specter::SplitView::Axis::Horizontal ? 1 : 0;
@@ -248,23 +248,23 @@ void Space::SpaceMenuNode::SubNode::activated(const boo::SWindowCoord &coord)
switch(m_data.m_cls)
{
case Class::InformationCenter:
if (typeid(InformationCenter) != typeid(m_space))
if (m_space.cls() == Class::InformationCenter)
newSpace.reset(new InformationCenter(m_space.m_parent->m_vm, m_space.m_parent));
break;
case Class::EffectEditor:
if (typeid(EffectEditor) != typeid(m_space))
if (m_space.cls() == Class::EffectEditor)
newSpace.reset(new EffectEditor(m_space.m_parent->m_vm, m_space.m_parent));
break;
case Class::ResourceBrowser:
if (typeid(ResourceBrowser) != typeid(m_space))
if (m_space.cls() == Class::ResourceBrowser)
newSpace.reset(new ResourceBrowser(m_space.m_parent->m_vm, m_space.m_parent));
break;
case Class::ModelViewer:
if (typeid(ModelViewer) != typeid(m_space))
if (m_space.cls() == Class::ModelViewer)
newSpace.reset(new ModelViewer(m_space.m_parent->m_vm, m_space.m_parent));
break;
case Class::GameMode:
if (typeid(GameMode) != typeid(m_space))
if (m_space.cls() == Class::GameMode)
newSpace.reset(new GameMode(m_space.m_parent->m_vm, m_space.m_parent));
break;
default: break;

View File

@@ -22,6 +22,7 @@ namespace urde
{
class ViewManager;
class RootSpace;
class SplitSpace;
class Space : public specter::ISpaceController
{
@@ -160,6 +161,8 @@ public:
{return std::unique_ptr<Space>();}
virtual specter::View* basisView() {return m_spaceView.get();}
Class cls() const { return m_class; }
SplitSpace* castToSplitSpace();
};
class RootSpace : public Space
@@ -359,6 +362,8 @@ public:
specter::View* basisView() {return m_splitView.get();}
};
inline SplitSpace* Space::castToSplitSpace()
{ return cls() == Class::SplitSpace ? static_cast<SplitSpace*>(this) : nullptr; }
class ViewerSpace : public Space
{

View File

@@ -20,6 +20,7 @@
#include "Audio/CStreamAudioManager.hpp"
#include "Runtime/CStateManager.hpp"
#include "Runtime/World/CPlayer.hpp"
#include "hecl/Pipeline.hpp"
#include <cstdio>
using YAMLNode = athena::io::YAMLNode;
@@ -292,6 +293,8 @@ void ViewManager::init(boo::IApplication* app)
float pixelFactor = m_mainWindow->getVirtualPixelFactor();
m_mainBooFactory = m_mainWindow->getMainContextDataFactory();
m_pipelineConv = hecl::NewPipelineConverter(m_mainBooFactory);
hecl::conv = m_pipelineConv.get();
m_mainPlatformName = m_mainBooFactory->platformName();
m_mainWindow->setTitle(_S("URDE [") + hecl::SystemString(m_mainPlatformName) + _S("]"));
m_mainCommandQueue = m_mainWindow->getCommandQueue();

View File

@@ -22,6 +22,8 @@
#include "Runtime/Graphics/Shaders/CCameraBlurFilter.hpp"
#include "Runtime/Audio/CStaticAudioPlayer.hpp"
namespace hecl { class PipelineConverterBase; }
namespace urde
{
class SplashScreen;
@@ -43,6 +45,7 @@ class ViewManager final : public specter::IViewManager
specter::Translator m_translator;
boo::IGraphicsDataFactory* m_mainBooFactory = nullptr;
boo::IGraphicsCommandQueue* m_mainCommandQueue = nullptr;
std::unique_ptr<hecl::PipelineConverterBase> m_pipelineConv;
boo::ObjToken<boo::ITextureR> m_renderTex;
const boo::SystemChar* m_mainPlatformName;