diff --git a/src/common/menu/messagebox.cpp b/src/common/menu/messagebox.cpp index 5b05b7e33..8b43d8d76 100644 --- a/src/common/menu/messagebox.cpp +++ b/src/common/menu/messagebox.cpp @@ -43,7 +43,7 @@ void M_StartControlPanel(bool makeSound, bool scaleoverride = false); FName MessageBoxClass = NAME_MessageBoxMenu; -CVAR(Bool, m_quickexit, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) +CVAR(Bool, m_quickexit, false, CVAR_ARCHIVE) typedef void(*hfunc)(); DEFINE_ACTION_FUNCTION(DMessageBoxMenu, CallHandler) diff --git a/src/common/rendering/hwrenderer/data/hw_skydome.cpp b/src/common/rendering/hwrenderer/data/hw_skydome.cpp index 9bbe5787f..8734b352c 100644 --- a/src/common/rendering/hwrenderer/data/hw_skydome.cpp +++ b/src/common/rendering/hwrenderer/data/hw_skydome.cpp @@ -455,7 +455,7 @@ void FSkyVertexBuffer::RenderRow(FRenderState& state, EDrawType prim, int row, T // //----------------------------------------------------------------------------- -void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, int mode, bool which) +void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, int mode, bool which, PalEntry color) { auto& primStart = which ? mPrimStartBuild : mPrimStartDoom; if (tex && tex->isValid()) @@ -471,6 +471,13 @@ void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, int mo if (mode == FSkyVertexBuffer::SKYMODE_MAINLAYER && tex != nullptr) { auto& col = R_GetSkyCapColor(tex); + col.first.r = col.first.r * color.r / 255; + col.first.g = col.first.g * color.g / 255; + col.first.b = col.first.b * color.b / 255; + col.second.r = col.second.r * color.r / 255; + col.second.g = col.second.g * color.g / 255; + col.second.b = col.second.b * color.b / 255; + state.SetObjectColor(col.first); state.EnableTexture(false); RenderRow(state, DT_TriangleFan, 0, primStart); @@ -497,13 +504,13 @@ void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, int mo // //----------------------------------------------------------------------------- -void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, float x_offset, float y_offset, bool mirror, int mode, bool tiled, float xscale, float yscale) +void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, float x_offset, float y_offset, bool mirror, int mode, bool tiled, float xscale, float yscale, PalEntry color) { if (tex) { SetupMatrices(tex, x_offset, y_offset, mirror, mode, state.mModelMatrix, state.mTextureMatrix, tiled, xscale, yscale); } - RenderDome(state, tex, mode, false); + RenderDome(state, tex, mode, false, color); } @@ -513,10 +520,11 @@ void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, float // //----------------------------------------------------------------------------- -void FSkyVertexBuffer::RenderBox(FRenderState& state, FSkyBox* tex, float x_offset, bool sky2, float stretch, const FVector3& skyrotatevector, const FVector3& skyrotatevector2) +void FSkyVertexBuffer::RenderBox(FRenderState& state, FSkyBox* tex, float x_offset, bool sky2, float stretch, const FVector3& skyrotatevector, const FVector3& skyrotatevector2, PalEntry color) { int faces; + state.SetObjectColor(color); state.EnableModelMatrix(true); state.mModelMatrix.loadIdentity(); state.mModelMatrix.scale(1, 1 / stretch, 1); // Undo the map's vertical scaling as skyboxes are true cubes. diff --git a/src/common/rendering/hwrenderer/data/hw_skydome.h b/src/common/rendering/hwrenderer/data/hw_skydome.h index 71ad85a08..213394c32 100644 --- a/src/common/rendering/hwrenderer/data/hw_skydome.h +++ b/src/common/rendering/hwrenderer/data/hw_skydome.h @@ -90,8 +90,8 @@ public: } void RenderRow(FRenderState& state, EDrawType prim, int row, TArray& mPrimStart, bool apply = true); - void RenderDome(FRenderState& state, FGameTexture* tex, int mode, bool which); - void RenderDome(FRenderState& state, FGameTexture* tex, float x_offset, float y_offset, bool mirror, int mode, bool tiled, float xscale = 0, float yscale = 0); - void RenderBox(FRenderState& state, FSkyBox* tex, float x_offset, bool sky2, float stretch, const FVector3& skyrotatevector, const FVector3& skyrotatevector2); + void RenderDome(FRenderState& state, FGameTexture* tex, int mode, bool which, PalEntry color = 0xffffffff); + void RenderDome(FRenderState& state, FGameTexture* tex, float x_offset, float y_offset, bool mirror, int mode, bool tiled, float xscale = 0, float yscale = 0, PalEntry color = 0xffffffff); + void RenderBox(FRenderState& state, FSkyBox* tex, float x_offset, bool sky2, float stretch, const FVector3& skyrotatevector, const FVector3& skyrotatevector2, PalEntry color = 0xffffffff); }; diff --git a/src/common/scripting/core/symbols.h b/src/common/scripting/core/symbols.h index 38412c078..b7d685339 100644 --- a/src/common/scripting/core/symbols.h +++ b/src/common/scripting/core/symbols.h @@ -272,4 +272,3 @@ struct AFuncDesc; struct FieldDesc; AFuncDesc *FindFunction(PContainerType *cls, const char * string); FieldDesc *FindField(PContainerType *cls, const char * string); -void SetImplicitArgs(TArray* args, TArray* argflags, TArray* argnames, PContainerType* cls, uint32_t funcflags, int useflags);