diff --git a/Source/Render/AuxiliarySubmission.cpp b/Source/Render/AuxiliarySubmission.cpp new file mode 100644 index 00000000..c2c1ecad --- /dev/null +++ b/Source/Render/AuxiliarySubmission.cpp @@ -0,0 +1,18 @@ +#include "Render/AuxiliarySubmission.h" +#include "Render/Renderer.h" +#include "Render/Primitives/DepthAlpha.h" + +// OFFSET: 0x00569520 +// FUNCTION: fn_02262 +static void ApplyAuxiliaryDepthAlpha(LightmappedPrimitive& primitive, const float& depthStart, const float& depthEnd) { + for (int index = 0; index < primitive.vertexCount; ++index) { + primitive.vertices[index].specular = DepthAlpha(primitive.vertices[index].rhw, depthStart, depthEnd); + } +} + +// OFFSET: 0x00559C50 +// FUNCTION: fn_02072 +void SubmitAuxiliaryPrimitive(CRenderer& renderer, LightmappedPrimitive* primitive, const float& depthStart, const float& depthEnd) { + ApplyAuxiliaryDepthAlpha(*primitive, depthStart, depthEnd); + renderer.queues.queue_0240.push_back(primitive); +} diff --git a/Source/Render/AuxiliarySubmission.h b/Source/Render/AuxiliarySubmission.h new file mode 100644 index 00000000..d9b2e3c0 --- /dev/null +++ b/Source/Render/AuxiliarySubmission.h @@ -0,0 +1,9 @@ +#ifndef RAGNAROK_SOURCE_RENDER_AUXILIARYSUBMISSION_H +#define RAGNAROK_SOURCE_RENDER_AUXILIARYSUBMISSION_H + +class CRenderer; +struct LightmappedPrimitive; + +void SubmitAuxiliaryPrimitive(CRenderer& renderer, LightmappedPrimitive* primitive, const float& depthStart, const float& depthEnd); + +#endif diff --git a/data/compile.json b/data/compile.json index 9138ec83..eb4fcafc 100644 --- a/data/compile.json +++ b/data/compile.json @@ -500,6 +500,7 @@ "Source/Render/AlphaQueuesDX7.cpp": 0, "Source/Render/AlphaRectangle.cpp": 0, "Source/Render/AuxiliaryQueuesDX7.cpp": 0, + "Source/Render/AuxiliarySubmission.cpp": 0, "Source/Render/BitmapDrawing.cpp": 0, "Source/Render/BlendColor.cpp": 0, "Source/Render/DX7/BackBufferDX7.cpp": 0,