diff --git a/decompile/General/DecalGlobal/DecalGlobal_3_FindInLEV.c b/decompile/General/DecalGlobal/DecalGlobal_3_FindInLEV.c new file mode 100644 index 000000000..a7db52889 --- /dev/null +++ b/decompile/General/DecalGlobal/DecalGlobal_3_FindInLEV.c @@ -0,0 +1,23 @@ +#include + +struct IconGroup* DECOMP_DecalGlobal_FindInLEV(struct Level* level, char* str) +{ + struct LevTexLookup* levTexLookup = level->levTexLookup; + + if (levTexLookup == NULL) + { + return NULL; + } + + for (int i = 0; i < levTexLookup->numIconGroup; i++) + { + struct IconGroup* iconGroupPtr = levTexLookup->firstIconGroupPtr[i]; + if (((*(int*)(iconGroupPtr->name + 0)) == (*(int*)(str + 0))) && + ((*(int*)(iconGroupPtr->name + 4)) == (*(int*)(str + 4))) && + ((*(int*)(iconGroupPtr->name + 8)) == (*(int*)(str + 8))) && + ((*(int*)(iconGroupPtr->name + 12)) == (*(int*)(str + 12)))) + { + return iconGroupPtr; + } + } +} diff --git a/decompile/buildList.txt b/decompile/buildList.txt index 58572015d..a5b1e7f72 100644 --- a/decompile/buildList.txt +++ b/decompile/buildList.txt @@ -414,7 +414,7 @@ common, exe, DecalFont_DrawMultiLine, 0x0, General/DecalFont/DecalFo //common, exe, DecalGlobal_EmptyFunc_MainFrame_ResetDB General/DecalGlobal/DecalGlobal_0_EmptyFunc_MainFrame_ResetDB.c //TODO common, exe, DecalGlobal_Clear, 0x0, General/DecalGlobal/DecalGlobal_1_Clear.c common, exe, DecalGlobal_Store, 0x0, General/DecalGlobal/DecalGlobal_2_Store.c -//common, exe, DecalGlobal_FindInLEV, 0x0, General/DecalGlobal/DecalGlobal_3_FindInLEV.c //TODO +common, exe, DecalGlobal_FindInLEV, 0x0, General/DecalGlobal/DecalGlobal_3_FindInLEV.c //common, exe, DecalGlobal_FindInMPK, 0x0, General/DecalGlobal/DecalGlobal_4_FindInMPK.c //TODO // ====================================================================================================================