From 9d512edf7f59cf29011b906f5f0d686d38e23d63 Mon Sep 17 00:00:00 2001 From: Briggs Baltzell Date: Tue, 3 Feb 2026 22:39:43 -0600 Subject: [PATCH] Match `dMCloth_c::init`. --- src/d/d_menu_cloth.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/d/d_menu_cloth.cpp b/src/d/d_menu_cloth.cpp index 6d826216f..1d967d68e 100644 --- a/src/d/d_menu_cloth.cpp +++ b/src/d/d_menu_cloth.cpp @@ -134,7 +134,33 @@ void dMCloth_c::cloth_init() { /* 80199CD0-80199E1C .text init__9dMCloth_cFv */ void dMCloth_c::init() { - /* Nonmatching */ + cloth_init(); + + ResTIMG* image = (ResTIMG*)JKRArchive::getGlbResource('TIMG', "cloth_piece01.bti", mpArc); + JUT_ASSERT(0x212, image != NULL); + + GXInitTexObj( + &mTexObj, + (u8*)image + image->imageOffset, + image->width, + image->height, + GXTexFmt(image->format), + GXTexWrapMode(image->wrapS), + GXTexWrapMode(image->wrapT), + image->mipmapCount > 1 + ); + + GXInitTexObjLOD( + &mTexObj, + GXTexFilter(image->minFilter), + GXTexFilter(image->magFilter), + image->minLOD * 0.125f, + image->maxLOD * 0.125f, + image->LODBias * 0.01f, + image->biasClamp, + image->doEdgeLOD, + GXAnisotropy(image->maxAnisotropy) + ); } /* 80199E1C-80199F48 .text __ct__9dMCloth_cFv */