- fixes copied from Raze.

This commit is contained in:
Christoph Oelckers 2020-04-29 23:58:50 +02:00
parent 652712d970
commit d71ef66957
13 changed files with 17 additions and 17 deletions

View file

@ -1504,7 +1504,7 @@ template<> FSerializer &Serialize(FSerializer &arc, const char *key, Dictionary
{ {
if (arc.isWriting()) if (arc.isWriting())
{ {
FString contents { dict ? DictionaryToString(*dict) : "null" }; FString contents { dict ? DictionaryToString(*dict) : FString("null") };
return arc(key, contents); return arc(key, contents);
} }
else else

View file

@ -110,7 +110,7 @@ enum EInPlace { EC_InPlace };
#define DECLARE_ABSTRACT_CLASS(cls,parent) \ #define DECLARE_ABSTRACT_CLASS(cls,parent) \
public: \ public: \
virtual PClass *StaticType() const; \ PClass *StaticType() const override; \
static ClassReg RegistrationInfo, * const RegistrationInfoPtr; \ static ClassReg RegistrationInfo, * const RegistrationInfoPtr; \
typedef parent Super; \ typedef parent Super; \
private: \ private: \

View file

@ -35,7 +35,6 @@
#endif // __APPLE__ #endif // __APPLE__
#include "cmdlib.h" #include "cmdlib.h"
#include "d_protocol.h"
#include "i_system.h" #include "i_system.h"
#include "gameconfigfile.h" #include "gameconfigfile.h"
#include "x86.h" #include "x86.h"

View file

@ -51,7 +51,7 @@
#include "gl_framebuffer.h" #include "gl_framebuffer.h"
#ifdef HAVE_VULKAN #ifdef HAVE_VULKAN
#include "rendering/vulkan/system/vk_framebuffer.h" #include "vk_framebuffer.h"
#endif #endif
#ifdef HAVE_SOFTPOLY #ifdef HAVE_SOFTPOLY

View file

@ -20,13 +20,13 @@ class FLightBuffer;
class DPSprite; class DPSprite;
class FGLRenderBuffers; class FGLRenderBuffers;
class FGL2DDrawer; class FGL2DDrawer;
class FHardwareTexture;
class SWSceneDrawer; class SWSceneDrawer;
class HWViewpointBuffer; class HWViewpointBuffer;
struct FRenderViewpoint; struct FRenderViewpoint;
namespace OpenGLRenderer namespace OpenGLRenderer
{ {
class FHardwareTexture;
class FShaderManager; class FShaderManager;
class FSamplerManager; class FSamplerManager;
class OpenGLFrameBuffer; class OpenGLFrameBuffer;

View file

@ -27,7 +27,7 @@ public:
PolyFrameBuffer(void *hMonitor, bool fullscreen); PolyFrameBuffer(void *hMonitor, bool fullscreen);
~PolyFrameBuffer(); ~PolyFrameBuffer();
void Update(); void Update() override;
bool IsPoly() override { return true; } bool IsPoly() override { return true; }
@ -65,7 +65,7 @@ public:
private: private:
void RenderTextureView(FCanvasTexture* tex, std::function<void(IntRect &)> renderFunc) override; void RenderTextureView(FCanvasTexture* tex, std::function<void(IntRect &)> renderFunc) override;
void UpdateShadowMap(); void UpdateShadowMap() override;
void CheckCanvas(); void CheckCanvas();

View file

@ -24,6 +24,7 @@
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
#include <float.h>
#include "renderstyle.h" #include "renderstyle.h"
//#include "rendering/swrenderer/drawers/r_draw.h" //#include "rendering/swrenderer/drawers/r_draw.h"

View file

@ -533,10 +533,10 @@ void VkPPRenderState::RenderScreenQuad(VkPPRenderPassSetup *passSetup, VulkanDes
auto cmdbuffer = fb->GetDrawCommands(); auto cmdbuffer = fb->GetDrawCommands();
VkViewport viewport = { }; VkViewport viewport = { };
viewport.x = x; viewport.x = (float)x;
viewport.y = y; viewport.y = (float)y;
viewport.width = width; viewport.width = (float)width;
viewport.height = height; viewport.height = (float)height;
viewport.minDepth = 0.0f; viewport.minDepth = 0.0f;
viewport.maxDepth = 1.0f; viewport.maxDepth = 1.0f;
@ -761,7 +761,7 @@ void VkPPRenderPassSetup::CreatePipeline(const VkPPRenderPassKey &key)
builder.addDynamicState(VK_DYNAMIC_STATE_SCISSOR); builder.addDynamicState(VK_DYNAMIC_STATE_SCISSOR);
// Note: the actual values are ignored since we use dynamic viewport+scissor states // Note: the actual values are ignored since we use dynamic viewport+scissor states
builder.setViewport(0.0f, 0.0f, 320.0f, 200.0f); builder.setViewport(0.0f, 0.0f, 320.0f, 200.0f);
builder.setScissor(0.0f, 0.0f, 320.0f, 200.0f); builder.setScissor(0, 0, 320, 200);
if (key.StencilTest) if (key.StencilTest)
{ {
builder.addDynamicState(VK_DYNAMIC_STATE_STENCIL_REFERENCE); builder.addDynamicState(VK_DYNAMIC_STATE_STENCIL_REFERENCE);

View file

@ -404,7 +404,7 @@ std::unique_ptr<VulkanPipeline> VkRenderPassSetup::CreatePipeline(const VkPipeli
// Note: the actual values are ignored since we use dynamic viewport+scissor states // Note: the actual values are ignored since we use dynamic viewport+scissor states
builder.setViewport(0.0f, 0.0f, 320.0f, 200.0f); builder.setViewport(0.0f, 0.0f, 320.0f, 200.0f);
builder.setScissor(0, 0, 320.0f, 200.0f); builder.setScissor(0, 0, 320, 200);
static const VkPrimitiveTopology vktopology[] = { static const VkPrimitiveTopology vktopology[] = {
VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_POINT_LIST,

View file

@ -68,7 +68,7 @@ public:
~VulkanFrameBuffer(); ~VulkanFrameBuffer();
bool IsVulkan() override { return true; } bool IsVulkan() override { return true; }
void Update(); void Update() override;
void InitializeState() override; void InitializeState() override;

View file

@ -198,7 +198,7 @@ struct ExpVal
const FString GetString() const const FString GetString() const
{ {
return Type == TypeString ? *(FString *)&pointer : Type == TypeName ? FString(FName(ENamedName(Int)).GetChars()) : ""; return Type == TypeString ? *(FString *)&pointer : Type == TypeName ? FString(FName(ENamedName(Int)).GetChars()) : FString();
} }
bool GetBool() const bool GetBool() const

View file

@ -62,7 +62,7 @@ static void DictInsert(Dictionary *dict, const FString &key, const FString &valu
static void DictAt(const Dictionary *dict, const FString &key, FString *result) static void DictAt(const Dictionary *dict, const FString &key, FString *result)
{ {
const FString *value = dict->Map.CheckKey(key); const FString *value = dict->Map.CheckKey(key);
*result = value ? *value : ""; *result = value ? *value : FString();
} }
static void DictToString(const Dictionary *dict, FString *result) static void DictToString(const Dictionary *dict, FString *result)

View file

@ -352,7 +352,7 @@ protected:
void SetFromImage(); void SetFromImage();
public: public:
FImageTexture(FImageSource* image) noexcept; FImageTexture(FImageSource* image) noexcept;
virtual TArray<uint8_t> Get8BitPixels(bool alphatex); TArray<uint8_t> Get8BitPixels(bool alphatex) override;
void SetImage(FImageSource* img) void SetImage(FImageSource* img)
{ {