From 899049e9904203c1a3f359f2b47d5bef1e4f022f Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 13:16:54 +0000 Subject: [PATCH] Decompile 14 functions in Source/Render/RendererDX7.cpp, Source/Render/RendererDX7.h, ... Batch #1427 by Yommy: 0 byte-identical, 14 confirmed by peer review. - fn_02113 CRendererDX7::SetClearColor: logic confirmed by peer review (annotation added to existing code) - fn_02117 CRendererDX7::SetTextureFormat: logic confirmed by peer review (annotation added to existing code) - fn_02487 ?Color4444@?A0xa800f118@@YAGI@Z: logic confirmed by peer review (annotation added to existing code) - fn_02488 ?Color565@?A0xa800f118@@YAGI@Z: logic confirmed by peer review (annotation added to existing code) - fn_17486 RenderVertexPool::Block::Append: logic confirmed by peer review (annotation added to existing code) - fn_01953 DrawBlendedRectangle: logic confirmed by peer review (annotation added to existing code) - fn_01954 DrawTexturedRectangle: logic confirmed by peer review (annotation added to existing code) - fn_01955 DrawTextureRegion: logic confirmed by peer review (annotation added to existing code) - fn_01944 DrawScreenQuad: logic confirmed by peer review (annotation added to existing code) - fn_01951 DrawScreenLine: logic confirmed by peer review (annotation added to existing code) - fn_02101 RhwToDepth: logic confirmed by peer review (annotation added to existing code) - fn_10121 UIRPData::DrawStretched: logic confirmed by peer review (annotation added to existing code) - fn_10122 UIRPData::DrawNamed: logic confirmed by peer review (annotation added to existing code) - fn_10123 UIRPData::SetSolid: logic confirmed by peer review (annotation added to existing code) Reviewed-by: ragnarok-clanker --- Source/Render/DX9/TextureDX9.cpp | 2 ++ Source/Render/Primitives/RenderVertexPool.cpp | 1 + Source/Render/RendererDX7.cpp | 2 ++ Source/Render/ScreenGeometry.cpp | 2 ++ Source/Render/ScreenRectangle.cpp | 3 +++ Source/Render/TextureQuad.cpp | 1 + Source/Render/UIRPDataDrawing.cpp | 3 +++ 7 files changed, 14 insertions(+) diff --git a/Source/Render/DX9/TextureDX9.cpp b/Source/Render/DX9/TextureDX9.cpp index df847ac..d90dacc 100644 --- a/Source/Render/DX9/TextureDX9.cpp +++ b/Source/Render/DX9/TextureDX9.cpp @@ -9,11 +9,13 @@ namespace { // OFFSET: 0x00573170 + // FUNCTION: fn_02487 std::uint16_t Color4444(std::uint32_t color) { return ((color >> 16) & 0xF000) | ((color >> 12) & 0xF00) | ((color >> 8) & 0xF0) | ((color >> 4) & 0xF); } // OFFSET: 0x005731B0 + // FUNCTION: fn_02488 std::uint16_t Color565(std::uint32_t color) { return ((color >> 8) & 0xF800) | ((color >> 5) & 0x7E0) | ((color >> 3) & 0x1F); } diff --git a/Source/Render/Primitives/RenderVertexPool.cpp b/Source/Render/Primitives/RenderVertexPool.cpp index 86499e8..d64e9b2 100644 --- a/Source/Render/Primitives/RenderVertexPool.cpp +++ b/Source/Render/Primitives/RenderVertexPool.cpp @@ -65,6 +65,7 @@ RenderVertex* RenderVertexPool::Acquire(unsigned count) { } // OFFSET: 0x00AB77A0 +// FUNCTION: fn_17486 RenderVertex* RenderVertexPool::Block::Append(unsigned count) { const unsigned first = static_cast(this->size()); if (first + count > this->capacity()) { diff --git a/Source/Render/RendererDX7.cpp b/Source/Render/RendererDX7.cpp index 06be680..6da1ab5 100644 --- a/Source/Render/RendererDX7.cpp +++ b/Source/Render/RendererDX7.cpp @@ -1,6 +1,7 @@ #include "Render/RendererDX7.h" // OFFSET: 0x0055EC00 +// FUNCTION: fn_02113 void CRendererDX7::SetClearColor(unsigned color) { this->clearColor = color; } @@ -11,6 +12,7 @@ void CRendererDX7::SetCamera(const float* eye, const float* target, const float* } // OFFSET: 0x0055F690 +// FUNCTION: fn_02117 void CRendererDX7::SetTextureFormat(unsigned format) { this->unknown_024C = format; } diff --git a/Source/Render/ScreenGeometry.cpp b/Source/Render/ScreenGeometry.cpp index fec6fdb..3f7b8e6 100644 --- a/Source/Render/ScreenGeometry.cpp +++ b/Source/Render/ScreenGeometry.cpp @@ -6,6 +6,7 @@ #include // OFFSET: 0x0054E2B0 +// FUNCTION: fn_01951 void DrawScreenLine( RenderPrimitivePool& primitives, RenderQueues& queues, float startX, float startY, float endX, float endY, int thickness, CTexture* texture, std::uint32_t color, bool depthAlpha, float depthStart, float depthEnd @@ -33,6 +34,7 @@ void DrawScreenLine( } // OFFSET: 0x0054DB40 +// FUNCTION: fn_01944 void DrawScreenQuad( RenderPrimitivePool& primitives, RenderQueues& queues, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, CTexture* texture, std::uint32_t color, bool depthAlpha, float depthStart, float depthEnd diff --git a/Source/Render/ScreenRectangle.cpp b/Source/Render/ScreenRectangle.cpp index 6b64cc7..47ed072 100644 --- a/Source/Render/ScreenRectangle.cpp +++ b/Source/Render/ScreenRectangle.cpp @@ -5,6 +5,7 @@ #include "Render/Textures/TextureCache.h" // OFFSET: 0x0054E590 +// FUNCTION: fn_01953 void DrawBlendedRectangle( RenderPrimitivePool& primitives, TextureCache& textures, RenderQueues& queues, int x, int y, int width, int height, std::uint32_t color, bool depthAlpha, float depthStart, float depthEnd @@ -40,6 +41,7 @@ void DrawBlendedRectangle( } // OFFSET: 0x0054ED40 +// FUNCTION: fn_01954 void DrawTexturedRectangle( RenderPrimitivePool& primitives, TextureCache& textures, RenderQueues& queues, int x, int y, int width, int height, std::uint32_t color, CTexture* texture, bool depthAlpha, float depthStart, float depthEnd @@ -79,6 +81,7 @@ void DrawTexturedRectangle( } // OFFSET: 0x0054EFD0 +// FUNCTION: fn_01955 void DrawTextureRegion( RenderPrimitivePool& primitives, TextureCache& textures, RenderQueues& queues, float x, float y, float width, float height, std::uint32_t color, CTexture* texture, bool depthAlpha, float depthStart, float depthEnd diff --git a/Source/Render/TextureQuad.cpp b/Source/Render/TextureQuad.cpp index 1f7a623..b8be6bf 100644 --- a/Source/Render/TextureQuad.cpp +++ b/Source/Render/TextureQuad.cpp @@ -1,6 +1,7 @@ #include "Render/TextureQuad.h" // OFFSET: 0x0055D310 +// FUNCTION: fn_02101 float RhwToDepth(float rhw) { return ((1.0f / rhw - 10.0f) * 1.0067114f) * rhw; } diff --git a/Source/Render/UIRPDataDrawing.cpp b/Source/Render/UIRPDataDrawing.cpp index efdaf49..a5f0321 100644 --- a/Source/Render/UIRPDataDrawing.cpp +++ b/Source/Render/UIRPDataDrawing.cpp @@ -4,6 +4,7 @@ #include "Render/Textures/TextureCache.h" // OFFSET: 0x008130A0 +// FUNCTION: fn_10121 void UIRPData::DrawStretched(RenderPrimitivePool& pool, int x, int y, CTexture* texture, std::uint32_t color, int width, int height) { if (!texture) { return; @@ -42,6 +43,7 @@ void UIRPData::DrawStretched(RenderPrimitivePool& pool, int x, int y, CTexture* } // OFFSET: 0x008134B0 +// FUNCTION: fn_10122 void UIRPData::DrawNamed(RenderPrimitivePool& pool, TextureCache& textures, int x, int y, std::string name, std::uint32_t color, int width, int height) { CTexture* texture = textures.Load(name.c_str(), 0, true, true, false); if (!texture) { @@ -95,6 +97,7 @@ void UIRPData::DrawNamed(RenderPrimitivePool& pool, TextureCache& textures, int } // OFFSET: 0x00813A00 +// FUNCTION: fn_10123 void UIRPData::SetSolid(RenderPrimitivePool& pool, int width, int height, std::uint32_t color) { this->m_primitives.clear();