Runtime: Windows compile fixes

This commit is contained in:
Luke Street 2022-05-03 20:27:19 -04:00
parent b9376280aa
commit 21f54ca09d
5 changed files with 21 additions and 21 deletions

View File

@ -4,6 +4,15 @@
#include <iostream>
#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
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
@ -14,15 +23,6 @@
#include <Windows.h>
#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 <fenv.h>

View File

@ -102,7 +102,7 @@ void CVirtualBone::BuildAccumulatedTransform(const CPoseAsTransforms& pose, cons
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 {
m1[0] * w1 + m2[0] * 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;
}

View File

@ -289,7 +289,7 @@ void CCubeRenderer::RemoveStaticGeometry(const std::vector<CMetroidModelInstance
void CCubeRenderer::DrawUnsortedGeometry(s32 areaIdx, s32 mask, s32 targetMask, bool shadowRender) {
SCOPED_GRAPHICS_DEBUG_GROUP(
fmt::format(FMT_STRING("CCubeRenderer::DrawUnsortedGeometry areaIdx={} mask={} targetMask={} shadowRender={}"),
areaIdx, mask, targetMask, shadowRender),
areaIdx, mask, targetMask, shadowRender).c_str(),
zeus::skBlue);
SetupRendererStates(true);
@ -366,7 +366,7 @@ void CCubeRenderer::DrawUnsortedGeometry(s32 areaIdx, s32 mask, s32 targetMask,
void CCubeRenderer::DrawSortedGeometry(s32 areaIdx, s32 mask, s32 targetMask) {
SCOPED_GRAPHICS_DEBUG_GROUP(
fmt::format(FMT_STRING("CCubeRenderer::DrawSortedGeometry areaIdx={} mask={} targetMask={}"), areaIdx, mask,
targetMask),
targetMask).c_str(),
zeus::skBlue);
SetupRendererStates(true);
@ -399,7 +399,7 @@ void CCubeRenderer::DrawStaticGeometry(s32 areaIdx, s32 mask, s32 targetMask) {
void CCubeRenderer::DrawAreaGeometry(s32 areaIdx, s32 mask, s32 targetMask) {
SCOPED_GRAPHICS_DEBUG_GROUP(
fmt::format(FMT_STRING("CCubeRenderer::DrawAreaGeometry areaIdx={} mask={} targetMask={}"), areaIdx, mask,
targetMask),
targetMask).c_str(),
zeus::skBlue);
x318_30_inAreaDraw = true;
@ -442,7 +442,7 @@ void CCubeRenderer::DrawAreaGeometry(s32 areaIdx, s32 mask, s32 targetMask) {
}
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);
CCubeModel* lastModel = nullptr;

View File

@ -754,9 +754,9 @@ static std::string BytesToString(size_t bytes) {
count /= 1024.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() {

View File

@ -868,7 +868,7 @@ void CElementGen::Render() {
}
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;
if (x26d_26_modelsUseLights) {
@ -1093,7 +1093,7 @@ void CElementGen::RenderModels() {
}
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();
CGlobalRandom gr(x27c_randState);
@ -1202,7 +1202,7 @@ void CElementGen::RenderParticles() {
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();
if (size && size->IsConstant()) {
@ -1636,7 +1636,7 @@ void CElementGen::RenderParticles() {
}
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();