diff --git a/source/build/include/compat.h b/source/build/include/compat.h index ceeddd802..bd950a9a0 100644 --- a/source/build/include/compat.h +++ b/source/build/include/compat.h @@ -72,7 +72,7 @@ #elif defined __cplusplus && __cplusplus >= 201103L # define CXXSTD 2011 #elif defined __cplusplus && __cplusplus >= 199711L -# define CXXSTD 1998 +# define CXXSTD 2014 // Thanks, Microsoft... :? #else # define CXXSTD 0 #endif diff --git a/source/common/engine/serializer.cpp b/source/common/engine/serializer.cpp index ae2f872f9..9270e4629 100644 --- a/source/common/engine/serializer.cpp +++ b/source/common/engine/serializer.cpp @@ -1062,6 +1062,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, float &value, float *d FSerializer &Serialize(FSerializer &arc, const char *key, FTextureID &value, FTextureID *defval) { +#if 0 if (arc.isWriting()) { if (!arc.w->inObject() || defval == nullptr || value != *defval) @@ -1138,6 +1139,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FTextureID &value, FTe } } } +#endif return arc; } @@ -1503,7 +1505,7 @@ template<> FSerializer &Serialize(FSerializer &arc, const char *key, Dictionary { if (arc.isWriting()) { - FString contents { dict ? DictionaryToString(*dict) : "null" }; + FString contents { dict ? DictionaryToString(*dict) : FString("null") }; return arc(key, contents); } else diff --git a/source/common/scripting/backend/codegen.cpp b/source/common/scripting/backend/codegen.cpp index aaef459a6..10d1677da 100644 --- a/source/common/scripting/backend/codegen.cpp +++ b/source/common/scripting/backend/codegen.cpp @@ -2917,6 +2917,7 @@ ExpEmit FxAddSub::Emit(VMFunctionBuilder *build) texcheck: // Do a bounds check for the texture index. Note that count can change at run time so this needs to read the value from the texture manager. +#if 0 auto * ptr = (FArray*)&TexMan.Textures; auto * countptr = &ptr->Count; ExpEmit bndp(build, REGT_POINTER); @@ -2926,6 +2927,7 @@ texcheck: build->Emit(OP_BOUND_R, to.RegNum, bndc.RegNum); bndp.Free(build); bndc.Free(build); +#endif return to; } diff --git a/source/common/scripting/backend/codegen.h b/source/common/scripting/backend/codegen.h index 5a0fc0664..bcadae39d 100644 --- a/source/common/scripting/backend/codegen.h +++ b/source/common/scripting/backend/codegen.h @@ -198,7 +198,7 @@ struct ExpVal 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 diff --git a/source/common/scripting/core/dictionary.cpp b/source/common/scripting/core/dictionary.cpp index b8dacd2bc..50551c059 100644 --- a/source/common/scripting/core/dictionary.cpp +++ b/source/common/scripting/core/dictionary.cpp @@ -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) { const FString *value = dict->Map.CheckKey(key); - *result = value ? *value : ""; + *result = value ? *value : FString(""); } static void DictToString(const Dictionary *dict, FString *result) diff --git a/source/common/scripting/jit/jit_move.cpp b/source/common/scripting/jit/jit_move.cpp index 584de35a1..8e3f6ab4c 100644 --- a/source/common/scripting/jit/jit_move.cpp +++ b/source/common/scripting/jit/jit_move.cpp @@ -53,7 +53,11 @@ static void CastCo2S(FString *a, int b) { PalEntry c(b); a->Format("%02x %02x %0 static int CastS2So(FString *b) { return FSoundID(*b); } static void CastSo2S(FString* a, int b) { *a = soundEngine->GetSoundName(b); } static void CastSID2S(FString* a, unsigned int b) { VM_CastSpriteIDToString(a, b); } +#if 0 static void CastTID2S(FString *a, int b) { auto tex = TexMan.GetTexture(*(FTextureID*)&b); *a = (tex == nullptr) ? "(null)" : tex->GetName().GetChars(); } +#else +static void CastTID2S(FString* a, int b) { *a = "(null)"; } +#endif void JitCompiler::EmitCAST() { diff --git a/source/common/scripting/vm/vmexec.h b/source/common/scripting/vm/vmexec.h index 72e0d0199..f3565f388 100644 --- a/source/common/scripting/vm/vmexec.h +++ b/source/common/scripting/vm/vmexec.h @@ -1848,8 +1848,10 @@ static void DoCast(const VMRegisters ®, const VMFrame *f, int a, int b, int c case CAST_TID2S: { ASSERTS(a); ASSERTD(b); +#if 0 auto tex = TexMan.GetTexture(*(FTextureID*)&(reg.d[b])); reg.s[a] = tex == nullptr ? "(null)" : tex->GetName().GetChars(); +#endif break; } diff --git a/source/common/thirdparty/sfmt/SFMT.h b/source/common/thirdparty/sfmt/SFMT.h index ddaabf246..b7d3c42f3 100644 --- a/source/common/thirdparty/sfmt/SFMT.h +++ b/source/common/thirdparty/sfmt/SFMT.h @@ -28,6 +28,8 @@ * unsigned int and 64-bit unsigned int in hexadecimal format. */ +#include + #ifndef SFMT_H #define SFMT_H diff --git a/source/core/texturemanager.h b/source/core/texturemanager.h new file mode 100644 index 000000000..a8884b29a --- /dev/null +++ b/source/core/texturemanager.h @@ -0,0 +1,6 @@ +#pragma once + +// just a dummy to avoid editing other files. + +inline int V_GetColor(const void *m, const char *, void * a= nullptr) { return 0; } +