Decompile 2 functions in Source/Render/AlphaRectangle.cpp, Source/Client/ModeFade.cpp, ...
Batch #1027 by ragnarok-clanker: 0 byte-identical, 2 confirmed by peer review. - fn_01952 DrawAlphaRectangle: logic confirmed by peer review - fn_17842 ModeFade::Draw: logic confirmed by peer review Reviewed-by: ragnarok-clanker Adds to the build: Source/Render/AlphaRectangle.cpp, Source/Client/ModeFade.cpp
This commit is contained in:
parent
51e57d4b27
commit
2035aa96de
4 changed files with 92 additions and 0 deletions
38
Source/Render/AlphaRectangle.cpp
Normal file
38
Source/Render/AlphaRectangle.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#include "Render/Primitives/AlphaRectangle.h"
|
||||
#include "Render/Primitives/RenderPrimitivePool.h"
|
||||
#include "Render/Primitives/RenderQueues.h"
|
||||
#include "Render/Textures/TextureCache.h"
|
||||
|
||||
// OFFSET: 0x0054E460
|
||||
// FUNCTION: fn_01952
|
||||
void DrawAlphaRectangle(
|
||||
RenderPrimitivePool& primitives, TextureCache& textures, RenderQueues& queues, int x, int y, int width, int height, std::uint32_t color, bool depthAlpha,
|
||||
float depthStart, float depthEnd
|
||||
) {
|
||||
if ((color & 0xFF000000u) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
RenderPrimitive* primitive = primitives.Acquire();
|
||||
primitive->texture = textures.Default();
|
||||
const float left = static_cast<float>(x);
|
||||
const float top = static_cast<float>(y);
|
||||
const float right = static_cast<float>(x + width);
|
||||
const float bottom = static_cast<float>(y + height);
|
||||
primitive->quad[0].x = left;
|
||||
primitive->quad[0].y = top;
|
||||
primitive->quad[1].x = right;
|
||||
primitive->quad[1].y = top;
|
||||
primitive->quad[2].x = left;
|
||||
primitive->quad[2].y = bottom;
|
||||
primitive->quad[3].x = right;
|
||||
primitive->quad[3].y = bottom;
|
||||
for (RenderVertex& vertex : primitive->quad) {
|
||||
vertex.z = 0.000001f;
|
||||
vertex.rhw = 0.999999f;
|
||||
vertex.diffuse = color;
|
||||
vertex.u = 0.0f;
|
||||
vertex.v = 0.0f;
|
||||
}
|
||||
queues.Submit(primitive, 513, depthAlpha, depthStart, depthEnd);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue