mirror of https://github.com/AxioDL/metaforce.git
Runtime: Windows compile fixes
This commit is contained in:
parent
b9376280aa
commit
21f54ca09d
|
@ -4,6 +4,15 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "Runtime/CInfiniteLoopDetector.hpp"
|
#include "Runtime/CInfiniteLoopDetector.hpp"
|
||||||
|
|
||||||
|
#include "ImGuiEngine.hpp"
|
||||||
|
#include "Runtime/Graphics/CGraphics.hpp"
|
||||||
|
#include "Runtime/MP1/MP1.hpp"
|
||||||
|
#include "Runtime/ConsoleVariables/FileStoreManager.hpp"
|
||||||
|
#include "Runtime/ConsoleVariables/CVarManager.hpp"
|
||||||
|
#include "amuse/BooBackend.hpp"
|
||||||
|
|
||||||
|
#include "logvisor/logvisor.hpp"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
@ -14,15 +23,6 @@
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "logvisor/logvisor.hpp"
|
|
||||||
|
|
||||||
#include "ImGuiEngine.hpp"
|
|
||||||
#include "Runtime/Graphics/CGraphics.hpp"
|
|
||||||
#include "Runtime/MP1/MP1.hpp"
|
|
||||||
#include "Runtime/ConsoleVariables/FileStoreManager.hpp"
|
|
||||||
#include "Runtime/ConsoleVariables/CVarManager.hpp"
|
|
||||||
#include "amuse/BooBackend.hpp"
|
|
||||||
|
|
||||||
#include "../version.h"
|
#include "../version.h"
|
||||||
|
|
||||||
//#include <fenv.h>
|
//#include <fenv.h>
|
||||||
|
|
|
@ -102,7 +102,7 @@ void CVirtualBone::BuildAccumulatedTransform(const CPoseAsTransforms& pose, cons
|
||||||
x50_rotation = pose.GetRotation(x0_weights[0].x0_id);
|
x50_rotation = pose.GetRotation(x0_weights[0].x0_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr zeus::CMatrix3f WeightedMatrix(const zeus::CMatrix3f& m1, float w1, const zeus::CMatrix3f& m2, float w2) {
|
static inline zeus::CMatrix3f WeightedMatrix(const zeus::CMatrix3f& m1, float w1, const zeus::CMatrix3f& m2, float w2) {
|
||||||
return {
|
return {
|
||||||
m1[0] * w1 + m2[0] * w2,
|
m1[0] * w1 + m2[0] * w2,
|
||||||
m1[1] * w1 + m2[1] * w2,
|
m1[1] * w1 + m2[1] * w2,
|
||||||
|
@ -110,7 +110,7 @@ static constexpr zeus::CMatrix3f WeightedMatrix(const zeus::CMatrix3f& m1, float
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr zeus::CVector3f WeightedVector(const zeus::CVector3f& v1, float w1, const zeus::CVector3f& v2, float w2) {
|
static inline zeus::CVector3f WeightedVector(const zeus::CVector3f& v1, float w1, const zeus::CVector3f& v2, float w2) {
|
||||||
return v1 * w1 + v2 * w2;
|
return v1 * w1 + v2 * w2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ void CCubeRenderer::RemoveStaticGeometry(const std::vector<CMetroidModelInstance
|
||||||
void CCubeRenderer::DrawUnsortedGeometry(s32 areaIdx, s32 mask, s32 targetMask, bool shadowRender) {
|
void CCubeRenderer::DrawUnsortedGeometry(s32 areaIdx, s32 mask, s32 targetMask, bool shadowRender) {
|
||||||
SCOPED_GRAPHICS_DEBUG_GROUP(
|
SCOPED_GRAPHICS_DEBUG_GROUP(
|
||||||
fmt::format(FMT_STRING("CCubeRenderer::DrawUnsortedGeometry areaIdx={} mask={} targetMask={} shadowRender={}"),
|
fmt::format(FMT_STRING("CCubeRenderer::DrawUnsortedGeometry areaIdx={} mask={} targetMask={} shadowRender={}"),
|
||||||
areaIdx, mask, targetMask, shadowRender),
|
areaIdx, mask, targetMask, shadowRender).c_str(),
|
||||||
zeus::skBlue);
|
zeus::skBlue);
|
||||||
|
|
||||||
SetupRendererStates(true);
|
SetupRendererStates(true);
|
||||||
|
@ -366,7 +366,7 @@ void CCubeRenderer::DrawUnsortedGeometry(s32 areaIdx, s32 mask, s32 targetMask,
|
||||||
void CCubeRenderer::DrawSortedGeometry(s32 areaIdx, s32 mask, s32 targetMask) {
|
void CCubeRenderer::DrawSortedGeometry(s32 areaIdx, s32 mask, s32 targetMask) {
|
||||||
SCOPED_GRAPHICS_DEBUG_GROUP(
|
SCOPED_GRAPHICS_DEBUG_GROUP(
|
||||||
fmt::format(FMT_STRING("CCubeRenderer::DrawSortedGeometry areaIdx={} mask={} targetMask={}"), areaIdx, mask,
|
fmt::format(FMT_STRING("CCubeRenderer::DrawSortedGeometry areaIdx={} mask={} targetMask={}"), areaIdx, mask,
|
||||||
targetMask),
|
targetMask).c_str(),
|
||||||
zeus::skBlue);
|
zeus::skBlue);
|
||||||
|
|
||||||
SetupRendererStates(true);
|
SetupRendererStates(true);
|
||||||
|
@ -399,7 +399,7 @@ void CCubeRenderer::DrawStaticGeometry(s32 areaIdx, s32 mask, s32 targetMask) {
|
||||||
void CCubeRenderer::DrawAreaGeometry(s32 areaIdx, s32 mask, s32 targetMask) {
|
void CCubeRenderer::DrawAreaGeometry(s32 areaIdx, s32 mask, s32 targetMask) {
|
||||||
SCOPED_GRAPHICS_DEBUG_GROUP(
|
SCOPED_GRAPHICS_DEBUG_GROUP(
|
||||||
fmt::format(FMT_STRING("CCubeRenderer::DrawAreaGeometry areaIdx={} mask={} targetMask={}"), areaIdx, mask,
|
fmt::format(FMT_STRING("CCubeRenderer::DrawAreaGeometry areaIdx={} mask={} targetMask={}"), areaIdx, mask,
|
||||||
targetMask),
|
targetMask).c_str(),
|
||||||
zeus::skBlue);
|
zeus::skBlue);
|
||||||
|
|
||||||
x318_30_inAreaDraw = true;
|
x318_30_inAreaDraw = true;
|
||||||
|
@ -442,7 +442,7 @@ void CCubeRenderer::DrawAreaGeometry(s32 areaIdx, s32 mask, s32 targetMask) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCubeRenderer::RenderBucketItems(const CAreaListItem* item) {
|
void CCubeRenderer::RenderBucketItems(const CAreaListItem* item) {
|
||||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CCubeRenderer::RenderBucketItems areaIdx={}"), item->x18_areaIdx),
|
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CCubeRenderer::RenderBucketItems areaIdx={}"), item->x18_areaIdx).c_str(),
|
||||||
zeus::skBlue);
|
zeus::skBlue);
|
||||||
|
|
||||||
CCubeModel* lastModel = nullptr;
|
CCubeModel* lastModel = nullptr;
|
||||||
|
|
|
@ -754,9 +754,9 @@ static std::string BytesToString(size_t bytes) {
|
||||||
count /= 1024.0;
|
count /= 1024.0;
|
||||||
}
|
}
|
||||||
if (count - floor(count) == 0.0) {
|
if (count - floor(count) == 0.0) {
|
||||||
return fmt::format("{}{}", static_cast<size_t>(count), suffixes[s]);
|
return fmt::format(FMT_STRING("{}{}"), static_cast<size_t>(count), suffixes[s]);
|
||||||
}
|
}
|
||||||
return fmt::format("{:.1f}{}", count, suffixes[s]);
|
return fmt::format(FMT_STRING("{:.1f}{}"), count, suffixes[s]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGuiConsole::ShowDebugOverlay() {
|
void ImGuiConsole::ShowDebugOverlay() {
|
||||||
|
|
|
@ -868,7 +868,7 @@ void CElementGen::Render() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CElementGen::RenderModels() {
|
void CElementGen::RenderModels() {
|
||||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CElementGen::RenderModels")), zeus::skYellow);
|
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CElementGen::RenderModels")).c_str(), zeus::skYellow);
|
||||||
|
|
||||||
CParticleGlobals::instance()->m_particleAccessParameters = nullptr;
|
CParticleGlobals::instance()->m_particleAccessParameters = nullptr;
|
||||||
if (x26d_26_modelsUseLights) {
|
if (x26d_26_modelsUseLights) {
|
||||||
|
@ -1093,7 +1093,7 @@ void CElementGen::RenderModels() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CElementGen::RenderLines() {
|
void CElementGen::RenderLines() {
|
||||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CElementGen::RenderLines")), zeus::skYellow);
|
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CElementGen::RenderLines")).c_str(), zeus::skYellow);
|
||||||
|
|
||||||
CGenDescription* desc = x1c_genDesc.GetObj();
|
CGenDescription* desc = x1c_genDesc.GetObj();
|
||||||
CGlobalRandom gr(x27c_randState);
|
CGlobalRandom gr(x27c_randState);
|
||||||
|
@ -1202,7 +1202,7 @@ void CElementGen::RenderParticles() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CElementGen::RenderParticles")), zeus::skYellow);
|
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CElementGen::RenderParticles")).c_str(), zeus::skYellow);
|
||||||
|
|
||||||
CRealElement* size = desc->x4c_x38_SIZE.get();
|
CRealElement* size = desc->x4c_x38_SIZE.get();
|
||||||
if (size && size->IsConstant()) {
|
if (size && size->IsConstant()) {
|
||||||
|
@ -1636,7 +1636,7 @@ void CElementGen::RenderParticles() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CElementGen::RenderParticlesIndirectTexture() {
|
void CElementGen::RenderParticlesIndirectTexture() {
|
||||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CElementGen::RenderParticlesIndirectTexture")), zeus::skYellow);
|
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CElementGen::RenderParticlesIndirectTexture")).c_str(), zeus::skYellow);
|
||||||
|
|
||||||
CGenDescription* desc = x1c_genDesc.GetObj();
|
CGenDescription* desc = x1c_genDesc.GetObj();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue