From 3140ba73eb12782cdcefe6edb8fa2ea0c00bc494 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 28 Dec 2024 11:10:02 -0700 Subject: [PATCH] Match `TglD3DRMIMAGE::FillRowsOfTexture` (#1300) --- LEGO1/tgl/d3drm/impl.h | 2 +- LEGO1/tgl/d3drm/texture.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/LEGO1/tgl/d3drm/impl.h b/LEGO1/tgl/d3drm/impl.h index a2998c7a..eba702cb 100644 --- a/LEGO1/tgl/d3drm/impl.h +++ b/LEGO1/tgl/d3drm/impl.h @@ -411,7 +411,7 @@ public: Result CreateBuffer(int width, int height, int depth, void* pBuffer, int useBuffer); void Destroy(); - void FillRowsOfTexture(int y, int height, char* content); + Result FillRowsOfTexture(int y, int height, char* content); Result InitializePalette(int paletteSize, PaletteEntry* pEntries); D3DRMIMAGE m_image; diff --git a/LEGO1/tgl/d3drm/texture.cpp b/LEGO1/tgl/d3drm/texture.cpp index d02b8840..79452ba6 100644 --- a/LEGO1/tgl/d3drm/texture.cpp +++ b/LEGO1/tgl/d3drm/texture.cpp @@ -129,10 +129,11 @@ Result TglD3DRMIMAGE::CreateBuffer(int width, int height, int depth, void* pBuff } // FUNCTION: LEGO1 0x100a1510 -void TglD3DRMIMAGE::FillRowsOfTexture(int y, int height, char* pContent) +Result TglD3DRMIMAGE::FillRowsOfTexture(int y, int height, char* pContent) { // The purpose is clearly this but I can't get the assembly to line up. memcpy((char*) m_image.buffer1 + (y * m_image.bytes_per_line), pContent, height * m_image.bytes_per_line); + return Success; } // FUNCTION: LEGO1 0x100a1550