mirror of https://github.com/AxioDL/metaforce.git
Fix more things that didn't commit for some reason
This commit is contained in:
parent
036e769210
commit
c7f87333af
|
@ -28,37 +28,39 @@ enum class EFilterType {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <EFilterType FT, hsh::Compare ZComp = hsh::Always>
|
template <EFilterType FT, hsh::Compare ZComp = hsh::Always>
|
||||||
struct FilterPipeline : hsh::pipeline::pipeline<hsh::pipeline::color_attachment<>,
|
struct FilterPipeline : hsh::pipeline::pipeline<hsh::pipeline::topology<hsh::TriangleStrip>,
|
||||||
hsh::pipeline::depth_write<false>> {};
|
hsh::pipeline::color_attachment<>, hsh::pipeline::depth_write<false>> {
|
||||||
|
};
|
||||||
|
|
||||||
template <hsh::Compare ZComp>
|
template <hsh::Compare ZComp>
|
||||||
struct FilterPipeline<EFilterType::Passthru, ZComp>
|
struct FilterPipeline<EFilterType::Passthru, ZComp>
|
||||||
: hsh::pipeline::pipeline<hsh::pipeline::color_attachment<>, hsh::pipeline::depth_compare<ZComp>,
|
: hsh::pipeline::pipeline<hsh::pipeline::topology<hsh::TriangleStrip>, hsh::pipeline::color_attachment<>,
|
||||||
hsh::pipeline::depth_write<false>> {};
|
hsh::pipeline::depth_compare<ZComp>, hsh::pipeline::depth_write<false>> {};
|
||||||
|
|
||||||
template <hsh::Compare ZComp>
|
template <hsh::Compare ZComp>
|
||||||
struct FilterPipeline<EFilterType::Multiply, ZComp>
|
struct FilterPipeline<EFilterType::Multiply, ZComp>
|
||||||
: hsh::pipeline::pipeline<MultiplyAttachment<false>, hsh::pipeline::depth_compare<ZComp>,
|
: hsh::pipeline::pipeline<hsh::pipeline::topology<hsh::TriangleStrip>, MultiplyAttachment<false>,
|
||||||
hsh::pipeline::depth_write<false>> {};
|
hsh::pipeline::depth_compare<ZComp>, hsh::pipeline::depth_write<false>> {};
|
||||||
|
|
||||||
template <hsh::Compare ZComp>
|
template <hsh::Compare ZComp>
|
||||||
struct FilterPipeline<EFilterType::Add, ZComp>
|
struct FilterPipeline<EFilterType::Add, ZComp>
|
||||||
: hsh::pipeline::pipeline<AdditiveAttachment<false>, hsh::pipeline::depth_compare<ZComp>,
|
: hsh::pipeline::pipeline<hsh::pipeline::topology<hsh::TriangleStrip>, AdditiveAttachment<false>,
|
||||||
hsh::pipeline::depth_write<false>> {};
|
hsh::pipeline::depth_compare<ZComp>, hsh::pipeline::depth_write<false>> {};
|
||||||
|
|
||||||
template <hsh::Compare ZComp>
|
template <hsh::Compare ZComp>
|
||||||
struct FilterPipeline<EFilterType::Blend, ZComp>
|
struct FilterPipeline<EFilterType::Blend, ZComp>
|
||||||
: hsh::pipeline::pipeline<BlendAttachment<false>, hsh::pipeline::depth_compare<ZComp>,
|
: hsh::pipeline::pipeline<hsh::pipeline::topology<hsh::TriangleStrip>, BlendAttachment<false>,
|
||||||
hsh::pipeline::depth_write<false>> {};
|
hsh::pipeline::depth_compare<ZComp>, hsh::pipeline::depth_write<false>> {};
|
||||||
|
|
||||||
template <hsh::Compare ZComp>
|
template <hsh::Compare ZComp>
|
||||||
struct FilterPipeline<EFilterType::NoColor, ZComp>
|
struct FilterPipeline<EFilterType::NoColor, ZComp>
|
||||||
: hsh::pipeline::pipeline<NoColorAttachmentExt<AlphaMode::AlphaReplace>, hsh::pipeline::depth_compare<ZComp>,
|
: hsh::pipeline::pipeline<hsh::pipeline::topology<hsh::TriangleStrip>, NoColorAttachmentExt<AlphaMode::AlphaReplace>,
|
||||||
hsh::pipeline::depth_write<false>> {};
|
hsh::pipeline::depth_compare<ZComp>, hsh::pipeline::depth_write<false>> {};
|
||||||
|
|
||||||
template <hsh::Compare ZComp>
|
template <hsh::Compare ZComp>
|
||||||
struct FilterPipeline<EFilterType::InvDstMultiply, ZComp>
|
struct FilterPipeline<EFilterType::InvDstMultiply, ZComp>
|
||||||
: hsh::pipeline::pipeline<InvDstMultiplyAttachmentExt<AlphaMode::AlphaReplace>, hsh::pipeline::depth_compare<ZComp>,
|
: hsh::pipeline::pipeline<hsh::pipeline::topology<hsh::TriangleStrip>,
|
||||||
|
InvDstMultiplyAttachmentExt<AlphaMode::AlphaReplace>, hsh::pipeline::depth_compare<ZComp>,
|
||||||
hsh::pipeline::depth_write<false>> {};
|
hsh::pipeline::depth_write<false>> {};
|
||||||
|
|
||||||
enum class EFilterShape {
|
enum class EFilterShape {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
namespace urde {
|
namespace urde {
|
||||||
using namespace hsh::pipeline;
|
using namespace hsh::pipeline;
|
||||||
|
|
||||||
struct CMoviePlayerPipeline : pipeline<color_attachment<>> {
|
struct CMoviePlayerPipeline : pipeline<topology<hsh::TriangleStrip>, BlendAttachment<true>, depth_write<false>> {
|
||||||
CMoviePlayerPipeline(hsh::vertex_buffer<TexUVVert> vbo, hsh::uniform_buffer<ViewBlock> uniBuf, hsh::texture2d Y,
|
CMoviePlayerPipeline(hsh::vertex_buffer<TexUVVert> vbo, hsh::uniform_buffer<ViewBlock> uniBuf, hsh::texture2d Y,
|
||||||
hsh::texture2d U, hsh::texture2d V) {
|
hsh::texture2d U, hsh::texture2d V) {
|
||||||
position = uniBuf->m_mv * hsh::float4(vbo->m_pos, 1.0);
|
position = uniBuf->m_mv * hsh::float4(vbo->m_pos, 1.0);
|
||||||
|
@ -219,7 +219,7 @@ CMoviePlayer::CMoviePlayer(const char* path, float preLoadSeconds, bool loop, bo
|
||||||
if (deinterlace) {
|
if (deinterlace) {
|
||||||
/* urde addition: this way interlaced THPs don't look horrible */
|
/* urde addition: this way interlaced THPs don't look horrible */
|
||||||
set.Y[0] = hsh::create_dynamic_texture2d({x6c_videoInfo.width, x6c_videoInfo.height / 2}, hsh::R8_UNORM, 1);
|
set.Y[0] = hsh::create_dynamic_texture2d({x6c_videoInfo.width, x6c_videoInfo.height / 2}, hsh::R8_UNORM, 1);
|
||||||
set.Y[0] = hsh::create_dynamic_texture2d({x6c_videoInfo.width, x6c_videoInfo.height / 2}, hsh::R8_UNORM, 1);
|
set.Y[1] = hsh::create_dynamic_texture2d({x6c_videoInfo.width, x6c_videoInfo.height / 2}, hsh::R8_UNORM, 1);
|
||||||
set.U = hsh::create_dynamic_texture2d({x6c_videoInfo.width / 2, x6c_videoInfo.height / 2}, hsh::R8_UNORM, 1);
|
set.U = hsh::create_dynamic_texture2d({x6c_videoInfo.width / 2, x6c_videoInfo.height / 2}, hsh::R8_UNORM, 1);
|
||||||
set.V = hsh::create_dynamic_texture2d({x6c_videoInfo.width / 2, x6c_videoInfo.height / 2}, hsh::R8_UNORM, 1);
|
set.V = hsh::create_dynamic_texture2d({x6c_videoInfo.width / 2, x6c_videoInfo.height / 2}, hsh::R8_UNORM, 1);
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ CMoviePlayer::CMoviePlayer(const char* path, float preLoadSeconds, bool loop, bo
|
||||||
m_frame[3].m_uv = {1.f, 1.f};
|
m_frame[3].m_uv = {1.f, 1.f};
|
||||||
SetFrame({-0.5f, 0.5f, 0.f}, {-0.5f, -0.5f, 0.f}, {0.5f, -0.5f, 0.f}, {0.5f, 0.5f, 0.f});
|
SetFrame({-0.5f, 0.5f, 0.f}, {-0.5f, -0.5f, 0.f}, {0.5f, -0.5f, 0.f}, {0.5f, 0.5f, 0.f});
|
||||||
|
|
||||||
m_viewVertBlock.finalAssign(m_viewVertBlock);
|
m_viewVertBlock.m_mv = zeus::CMatrix4f{};
|
||||||
m_blockBuf.load(m_viewVertBlock);
|
m_blockBuf.load(m_viewVertBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#include "zeus/CMatrix4f.hpp"
|
#include "zeus/CMatrix4f.hpp"
|
||||||
#include "zeus/CRectangle.hpp"
|
#include "zeus/CRectangle.hpp"
|
||||||
|
|
||||||
|
#include "hsh/hsh.h"
|
||||||
|
|
||||||
namespace urde {
|
namespace urde {
|
||||||
class CTexture;
|
class CTexture;
|
||||||
|
|
||||||
|
@ -13,8 +15,7 @@ enum class EFilterShape;
|
||||||
enum class EFilterType;
|
enum class EFilterType;
|
||||||
|
|
||||||
class CColoredQuadFilter {
|
class CColoredQuadFilter {
|
||||||
template <EFilterType Type>
|
public:
|
||||||
friend struct CColoredQuadFilterPipeline;
|
|
||||||
struct Uniform {
|
struct Uniform {
|
||||||
hsh::float4x4 m_matrix;
|
hsh::float4x4 m_matrix;
|
||||||
hsh::float4 m_color;
|
hsh::float4 m_color;
|
||||||
|
@ -22,6 +23,8 @@ class CColoredQuadFilter {
|
||||||
struct Vert {
|
struct Vert {
|
||||||
hsh::float3 m_pos;
|
hsh::float3 m_pos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
hsh::owner<hsh::vertex_buffer<Vert>> m_vbo;
|
hsh::owner<hsh::vertex_buffer<Vert>> m_vbo;
|
||||||
hsh::dynamic_owner<hsh::uniform_buffer<Uniform>> m_uniBuf;
|
hsh::dynamic_owner<hsh::uniform_buffer<Uniform>> m_uniBuf;
|
||||||
hsh::binding m_dataBind;
|
hsh::binding m_dataBind;
|
||||||
|
|
|
@ -7,16 +7,18 @@
|
||||||
#include "zeus/CRectangle.hpp"
|
#include "zeus/CRectangle.hpp"
|
||||||
#include "zeus/CVector4f.hpp"
|
#include "zeus/CVector4f.hpp"
|
||||||
|
|
||||||
|
#include "hsh/hsh.h"
|
||||||
|
|
||||||
namespace urde {
|
namespace urde {
|
||||||
|
|
||||||
class CFogVolumePlaneShader {
|
class CFogVolumePlaneShader {
|
||||||
template <size_t I>
|
public:
|
||||||
friend struct CFogVolumePlanePipeline;
|
|
||||||
struct Vert {
|
struct Vert {
|
||||||
hsh::float4 pos;
|
hsh::float4 pos;
|
||||||
Vert(hsh::float4 pos) : pos(pos) {}
|
Vert(hsh::float4 pos) : pos(pos) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
hsh::dynamic_owner<hsh::vertex_buffer<Vert>> m_vbo;
|
hsh::dynamic_owner<hsh::vertex_buffer<Vert>> m_vbo;
|
||||||
std::array<hsh::binding, 4> m_dataBinds;
|
std::array<hsh::binding, 4> m_dataBinds;
|
||||||
std::vector<Vert> m_verts;
|
std::vector<Vert> m_verts;
|
||||||
|
|
|
@ -25,7 +25,7 @@ template struct CWorldShadowShaderPipeline<false>;
|
||||||
CWorldShadowShader::CWorldShadowShader(u32 w, u32 h) : m_w(w), m_h(h) {
|
CWorldShadowShader::CWorldShadowShader(u32 w, u32 h) : m_w(w), m_h(h) {
|
||||||
m_vbo = hsh::create_dynamic_vertex_buffer<Vert>(4);
|
m_vbo = hsh::create_dynamic_vertex_buffer<Vert>(4);
|
||||||
m_uniBuf = hsh::create_dynamic_uniform_buffer<Uniform>();
|
m_uniBuf = hsh::create_dynamic_uniform_buffer<Uniform>();
|
||||||
m_tex = hsh::create_render_texture2d({m_w, m_h}, hsh::RGBA8_UNORM, 1, 0);
|
m_tex = hsh::create_render_texture2d({m_w, m_h}, 1, 0);
|
||||||
|
|
||||||
// FIXME hsh bug: can't bind all constant values
|
// FIXME hsh bug: can't bind all constant values
|
||||||
bool depth = false;
|
bool depth = false;
|
||||||
|
|
|
@ -70,15 +70,12 @@ CCompoundTargetReticle::CCompoundTargetReticle(const CStateManager& mgr)
|
||||||
}
|
}
|
||||||
|
|
||||||
CCompoundTargetReticle::SScanReticuleRenderer::SScanReticuleRenderer() {
|
CCompoundTargetReticle::SScanReticuleRenderer::SScanReticuleRenderer() {
|
||||||
CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx) {
|
|
||||||
for (size_t i = 0; i < m_lineRenderers.size(); ++i) {
|
for (size_t i = 0; i < m_lineRenderers.size(); ++i) {
|
||||||
m_lineRenderers[i].emplace(ctx, CLineRenderer::EPrimitiveMode::Lines, 8, nullptr, true, true);
|
m_lineRenderers[i].emplace(CLineRenderer::EPrimitiveMode::Lines, 8, hsh::texture2d{}, true, hsh::LEqual);
|
||||||
for (auto& stripRenderer : m_stripRenderers[i]) {
|
for (auto& stripRenderer : m_stripRenderers[i]) {
|
||||||
stripRenderer.emplace(ctx, CLineRenderer::EPrimitiveMode::LineStrip, 4, nullptr, true, true);
|
stripRenderer.emplace(CLineRenderer::EPrimitiveMode::LineStrip, 4, hsh::texture2d{}, true, hsh::LEqual);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
} BooTrace);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CCompoundTargetReticle::EReticleState CCompoundTargetReticle::GetDesiredReticleState(const CStateManager& mgr) const {
|
CCompoundTargetReticle::EReticleState CCompoundTargetReticle::GetDesiredReticleState(const CStateManager& mgr) const {
|
||||||
|
|
|
@ -10,7 +10,7 @@ CGuiPane::CGuiPane(const CGuiWidgetParms& parms, const zeus::CVector2f& dim, con
|
||||||
void CGuiPane::ScaleDimensions(const zeus::CVector3f& scale) {
|
void CGuiPane::ScaleDimensions(const zeus::CVector3f& scale) {
|
||||||
InitializeBuffers();
|
InitializeBuffers();
|
||||||
|
|
||||||
for (specter::View::TexShaderVert& v : xc0_verts) {
|
for (auto& v : xc0_verts) {
|
||||||
v.m_pos -= xc8_scaleCenter;
|
v.m_pos -= xc8_scaleCenter;
|
||||||
v.m_pos *= scale;
|
v.m_pos *= scale;
|
||||||
v.m_pos += xc8_scaleCenter;
|
v.m_pos += xc8_scaleCenter;
|
||||||
|
@ -29,10 +29,10 @@ void CGuiPane::InitializeBuffers() {
|
||||||
if (xc0_verts.size() < 4)
|
if (xc0_verts.size() < 4)
|
||||||
xc0_verts.resize(4);
|
xc0_verts.resize(4);
|
||||||
|
|
||||||
xc0_verts[0].m_pos.assign(-xb8_dim.x() * 0.5f, 0.f, xb8_dim.y() * 0.5f);
|
xc0_verts[0].m_pos = {-xb8_dim.x() * 0.5f, 0.f, xb8_dim.y() * 0.5f};
|
||||||
xc0_verts[1].m_pos.assign(-xb8_dim.x() * 0.5f, 0.f, -xb8_dim.y() * 0.5f);
|
xc0_verts[1].m_pos = {-xb8_dim.x() * 0.5f, 0.f, -xb8_dim.y() * 0.5f};
|
||||||
xc0_verts[2].m_pos.assign(xb8_dim.x() * 0.5f, 0.f, xb8_dim.y() * 0.5f);
|
xc0_verts[2].m_pos = {xb8_dim.x() * 0.5f, 0.f, xb8_dim.y() * 0.5f};
|
||||||
xc0_verts[3].m_pos.assign(xb8_dim.x() * 0.5f, 0.f, -xb8_dim.y() * 0.5f);
|
xc0_verts[3].m_pos = {xb8_dim.x() * 0.5f, 0.f, -xb8_dim.y() * 0.5f};
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiPane::WriteData(COutputStream& out, bool flag) const {}
|
void CGuiPane::WriteData(COutputStream& out, bool flag) const {}
|
||||||
|
|
|
@ -159,7 +159,7 @@ constexpr std::array<ControlMapper::EKBMFunctionList, 70> skKBMMapping{
|
||||||
ControlMapper::EKBMFunctionList::KeyPress + 'w', // LookDown,
|
ControlMapper::EKBMFunctionList::KeyPress + 'w', // LookDown,
|
||||||
ControlMapper::EKBMFunctionList::KeyPress + ' ', // JumpOrBoost = 10,
|
ControlMapper::EKBMFunctionList::KeyPress + ' ', // JumpOrBoost = 10,
|
||||||
ControlMapper::EKBMFunctionList::MousePress + boo2::MouseButton::Primary, // FireOrBomb = 11,
|
ControlMapper::EKBMFunctionList::MousePress + boo2::MouseButton::Primary, // FireOrBomb = 11,
|
||||||
ControlMapper::EKBMFunctionList::MousePress + boo::EMouseButton::Secondary, // MissileOrPowerBomb = 12,
|
ControlMapper::EKBMFunctionList::MousePress + boo2::MouseButton::Secondary, // MissileOrPowerBomb = 12,
|
||||||
ControlMapper::EKBMFunctionList::KeyPress + 'c', // Morph,
|
ControlMapper::EKBMFunctionList::KeyPress + 'c', // Morph,
|
||||||
ControlMapper::EKBMFunctionList::None, // AimUp,
|
ControlMapper::EKBMFunctionList::None, // AimUp,
|
||||||
ControlMapper::EKBMFunctionList::None, // AimDown,
|
ControlMapper::EKBMFunctionList::None, // AimDown,
|
||||||
|
@ -189,18 +189,18 @@ constexpr std::array<ControlMapper::EKBMFunctionList, 70> skKBMMapping{
|
||||||
ControlMapper::EKBMFunctionList::KeyPress + 'w', // MapCircleDown,
|
ControlMapper::EKBMFunctionList::KeyPress + 'w', // MapCircleDown,
|
||||||
ControlMapper::EKBMFunctionList::KeyPress + 'a', // MapCircleLeft,
|
ControlMapper::EKBMFunctionList::KeyPress + 'a', // MapCircleLeft,
|
||||||
ControlMapper::EKBMFunctionList::KeyPress + 'd', // MapCircleRight,
|
ControlMapper::EKBMFunctionList::KeyPress + 'd', // MapCircleRight,
|
||||||
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo::ESpecialKey::Up, // MapMoveForward,
|
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo2::Keycode::UP, // MapMoveForward,
|
||||||
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo::ESpecialKey::Down, // MapMoveBack,
|
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo2::Keycode::DOWN, // MapMoveBack,
|
||||||
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo::ESpecialKey::Left, // MapMoveLeft,
|
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo2::Keycode::LEFT, // MapMoveLeft,
|
||||||
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo::ESpecialKey::Right, // MapMoveRight,
|
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo2::Keycode::RIGHT, // MapMoveRight,
|
||||||
ControlMapper::EKBMFunctionList::KeyPress + 'e', // MapZoomIn,
|
ControlMapper::EKBMFunctionList::KeyPress + 'e', // MapZoomIn,
|
||||||
ControlMapper::EKBMFunctionList::KeyPress + 'q', // MapZoomOut,
|
ControlMapper::EKBMFunctionList::KeyPress + 'q', // MapZoomOut,
|
||||||
ControlMapper::EKBMFunctionList::KeyPress + 'e', // SpiderBall,
|
ControlMapper::EKBMFunctionList::KeyPress + 'e', // SpiderBall,
|
||||||
ControlMapper::EKBMFunctionList::KeyPress + 'q', // ChaseCamera,
|
ControlMapper::EKBMFunctionList::KeyPress + 'q', // ChaseCamera,
|
||||||
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo::ESpecialKey::Right, // XrayVisor = 50,
|
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo2::Keycode::RIGHT, // XrayVisor = 50,
|
||||||
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo::ESpecialKey::Down, // ThermoVisor = 51,
|
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo2::Keycode::DOWN, // ThermoVisor = 51,
|
||||||
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo::ESpecialKey::Left, // InviroVisor = 52,
|
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo2::Keycode::LEFT, // InviroVisor = 52,
|
||||||
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo::ESpecialKey::Up, // NoVisor = 53,
|
ControlMapper::EKBMFunctionList::SpecialKeyPress + boo2::Keycode::UP, // NoVisor = 53,
|
||||||
ControlMapper::EKBMFunctionList::None, // VisorMenu,
|
ControlMapper::EKBMFunctionList::None, // VisorMenu,
|
||||||
ControlMapper::EKBMFunctionList::None, // VisorUp,
|
ControlMapper::EKBMFunctionList::None, // VisorUp,
|
||||||
ControlMapper::EKBMFunctionList::None, // VisorDown,
|
ControlMapper::EKBMFunctionList::None, // VisorDown,
|
||||||
|
@ -311,10 +311,10 @@ static float KBToWASDY(const CKeyboardMouseControllerData& data) {
|
||||||
|
|
||||||
static float KBToArrowsX(const CKeyboardMouseControllerData& data) {
|
static float KBToArrowsX(const CKeyboardMouseControllerData& data) {
|
||||||
float retval = 0.0;
|
float retval = 0.0;
|
||||||
if (data.m_specialKeys[size_t(boo::ESpecialKey::Left)]) {
|
if (data.m_specialKeys[size_t(boo2::Keycode::LEFT)]) {
|
||||||
retval -= 1.0;
|
retval -= 1.0;
|
||||||
}
|
}
|
||||||
if (data.m_specialKeys[size_t(boo::ESpecialKey::Right)]) {
|
if (data.m_specialKeys[size_t(boo2::Keycode::RIGHT)]) {
|
||||||
retval += 1.0;
|
retval += 1.0;
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
|
@ -322,10 +322,10 @@ static float KBToArrowsX(const CKeyboardMouseControllerData& data) {
|
||||||
|
|
||||||
static float KBToArrowsY(const CKeyboardMouseControllerData& data) {
|
static float KBToArrowsY(const CKeyboardMouseControllerData& data) {
|
||||||
float retval = 0.0;
|
float retval = 0.0;
|
||||||
if (data.m_specialKeys[size_t(boo::ESpecialKey::Down)]) {
|
if (data.m_specialKeys[size_t(boo2::Keycode::DOWN)]) {
|
||||||
retval -= 1.0;
|
retval -= 1.0;
|
||||||
}
|
}
|
||||||
if (data.m_specialKeys[size_t(boo::ESpecialKey::Up)]) {
|
if (data.m_specialKeys[size_t(boo2::Keycode::UP)]) {
|
||||||
retval += 1.0;
|
retval += 1.0;
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
|
|
|
@ -30,9 +30,6 @@ void CDecalManager::Initialize() {
|
||||||
m_DeltaTimeSinceLastDecalCreation = 0.f;
|
m_DeltaTimeSinceLastDecalCreation = 0.f;
|
||||||
m_LastDecalCreatedIndex = -1;
|
m_LastDecalCreatedIndex = -1;
|
||||||
m_LastDecalCreatedAssetId = -1;
|
m_LastDecalCreatedAssetId = -1;
|
||||||
|
|
||||||
/* Compile shaders */
|
|
||||||
CDecalShaders::Initialize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDecalManager::Reinitialize() {
|
void CDecalManager::Reinitialize() {
|
||||||
|
@ -52,7 +49,6 @@ void CDecalManager::Reinitialize() {
|
||||||
void CDecalManager::Shutdown() {
|
void CDecalManager::Shutdown() {
|
||||||
m_ActiveIndexList.clear();
|
m_ActiveIndexList.clear();
|
||||||
m_DecalPool.clear();
|
m_DecalPool.clear();
|
||||||
CDecalShaders::Shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDecalManager::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) {
|
void CDecalManager::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) {
|
||||||
|
|
|
@ -100,7 +100,7 @@ void CParticleElectric::DrawLineStrip(const std::vector<zeus::CVector3f>& verts,
|
||||||
}
|
}
|
||||||
if (!m_lineRenderers[useIdx]) {
|
if (!m_lineRenderers[useIdx]) {
|
||||||
m_lineRenderers[useIdx] =
|
m_lineRenderers[useIdx] =
|
||||||
std::make_unique<CLineRenderer>(CLineRenderer::EPrimitiveMode::LineStrip, x150_SSEG, nullptr, true, true);
|
std::make_unique<CLineRenderer>(CLineRenderer::EPrimitiveMode::LineStrip, x150_SSEG, hsh::texture2d{}, true, hsh::LEqual);
|
||||||
}
|
}
|
||||||
CLineRenderer& renderer = *m_lineRenderers[useIdx];
|
CLineRenderer& renderer = *m_lineRenderers[useIdx];
|
||||||
const zeus::CColor useColor = x1b8_moduColor * color;
|
const zeus::CColor useColor = x1b8_moduColor * color;
|
||||||
|
|
|
@ -12,18 +12,17 @@
|
||||||
|
|
||||||
namespace urde {
|
namespace urde {
|
||||||
|
|
||||||
CPlasmaProjectile::RenderObjects::RenderObjects(boo::IGraphicsDataFactory::Context& ctx,
|
CPlasmaProjectile::RenderObjects::RenderObjects(hsh::texture2d tex,
|
||||||
boo::ObjToken<boo::ITexture> tex,
|
hsh::texture2d glowTex)
|
||||||
boo::ObjToken<boo::ITexture> glowTex)
|
: m_beamStrip1(8, CColoredStripShader::Mode::Additive, hsh::texture2d{})
|
||||||
: m_beamStrip1(ctx, 8, CColoredStripShader::Mode::Additive, {})
|
, m_beamStrip2(10, CColoredStripShader::Mode::FullAdditive, tex)
|
||||||
, m_beamStrip2(ctx, 10, CColoredStripShader::Mode::FullAdditive, tex)
|
, m_beamStrip3(18, CColoredStripShader::Mode::FullAdditive, tex)
|
||||||
, m_beamStrip3(ctx, 18, CColoredStripShader::Mode::FullAdditive, tex)
|
, m_beamStrip4(14, CColoredStripShader::Mode::Additive, glowTex)
|
||||||
, m_beamStrip4(ctx, 14, CColoredStripShader::Mode::Additive, glowTex)
|
, m_beamStrip1Sub(8, CColoredStripShader::Mode::Subtractive, hsh::texture2d{})
|
||||||
, m_beamStrip1Sub(ctx, 8, CColoredStripShader::Mode::Subtractive, {})
|
, m_beamStrip2Sub(10, CColoredStripShader::Mode::Subtractive, tex)
|
||||||
, m_beamStrip2Sub(ctx, 10, CColoredStripShader::Mode::Subtractive, tex)
|
, m_beamStrip3Sub(18, CColoredStripShader::Mode::Subtractive, tex)
|
||||||
, m_beamStrip3Sub(ctx, 18, CColoredStripShader::Mode::Subtractive, tex)
|
, m_beamStrip4Sub(14, CColoredStripShader::Mode::Subtractive, glowTex)
|
||||||
, m_beamStrip4Sub(ctx, 14, CColoredStripShader::Mode::Subtractive, glowTex)
|
, m_motionBlurStrip(16, CColoredStripShader::Mode::Alpha, hsh::texture2d{}) {}
|
||||||
, m_motionBlurStrip(ctx, 16, CColoredStripShader::Mode::Alpha, {}) {}
|
|
||||||
|
|
||||||
CPlasmaProjectile::CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, std::string_view name, EWeaponType wType,
|
CPlasmaProjectile::CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, std::string_view name, EWeaponType wType,
|
||||||
const CBeamInfo& bInfo, const zeus::CTransform& xf, EMaterialTypes matType,
|
const CBeamInfo& bInfo, const zeus::CTransform& xf, EMaterialTypes matType,
|
||||||
|
@ -61,10 +60,7 @@ CPlasmaProjectile::CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, st
|
||||||
x518_contactGen->SetParticleEmission(false);
|
x518_contactGen->SetParticleEmission(false);
|
||||||
x51c_pulseGen->SetParticleEmission(false);
|
x51c_pulseGen->SetParticleEmission(false);
|
||||||
|
|
||||||
CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx) {
|
m_renderObjs.emplace(x4e8_texture->GetBooTexture(), x4f4_glowTexture->GetBooTexture());
|
||||||
m_renderObjs.emplace(ctx, x4e8_texture->GetBooTexture(), x4f4_glowTexture->GetBooTexture());
|
|
||||||
return true;
|
|
||||||
} BooTrace);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlasmaProjectile::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
void CPlasmaProjectile::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||||
|
|
|
@ -36,7 +36,7 @@ void CMorphBallShadow::RenderIdBuffer(const zeus::CAABox& aabb, const CStateMana
|
||||||
|
|
||||||
SViewport backupVp = g_Viewport;
|
SViewport backupVp = g_Viewport;
|
||||||
g_Renderer->BindBallShadowIdTarget();
|
g_Renderer->BindBallShadowIdTarget();
|
||||||
CGraphics::g_BooMainCommandQueue->clearTarget();
|
hsh::clear_attachments();
|
||||||
|
|
||||||
zeus::CTransform backupViewMtx = CGraphics::g_ViewMatrix;
|
zeus::CTransform backupViewMtx = CGraphics::g_ViewMatrix;
|
||||||
CGraphics::CProjectionState backupProjection = CGraphics::g_Proj;
|
CGraphics::CProjectionState backupProjection = CGraphics::g_Proj;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <logvisor/logvisor.hpp>
|
#include <logvisor/logvisor.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "hsh/hsh.h"
|
#include "hsh/bits/builtin_types.h"
|
||||||
|
|
||||||
namespace rstl {
|
namespace rstl {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue