From b8a700967e074c4ea8fd083d8a163a8056d235a9 Mon Sep 17 00:00:00 2001 From: MattKC <34096995+itsmattkc@users.noreply.github.com> Date: Mon, 25 Sep 2023 14:57:49 -0700 Subject: [PATCH] matched MakeSourceName --- LEGO1/legoomni.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index 1dd7a561..0c84395e 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -39,10 +39,22 @@ int LegoOmni::GetCurrPathInfo(LegoPathBoundary **,int &) return 0; } -// OFFSET: LEGO1 0x100b6ff0 STUB -void MakeSourceName(char *, const char *) +// OFFSET: LEGO1 0x100b6ff0 +void MakeSourceName(char *p_output, const char *p_input) { - // TODO + const char *cln = strchr(p_input, ':'); + if (cln) { + p_input = cln + 1; + } + + strcpy(p_output, p_input); + + strlwr(p_output); + + char *extLoc = strstr(p_output, ".si"); + if (extLoc) { + *extLoc = 0; + } } // OFFSET: LEGO1 0x100b7050