Skip to content

Commit

Permalink
Update cleohelpers.h
Browse files Browse the repository at this point in the history
  • Loading branch information
RusJJ authored Apr 3, 2024
1 parent 3142f85 commit 87ffc79
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cleohelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,17 @@ inline void* CLEO_GetScriptFromFilename(const char* filename)
}
return NULL;
}
inline void* CLEO_GetScriptFilename(void* handle)
{
int len = GetScriptsStorageSize();
for(int i = 0; i < len; ++i)
{
int storageItem = *(int*)(*pScriptsStorage + i * 4);
void* scriptHandle = *(void**)(storageItem + 28);
if(scriptHandle == handle) return *(const char**)(storageItem + 20);
}
return NULL;
}
inline const char* GetVarTypeName(eScriptParameterType type)
{
#define STRP(__param) case SCRIPT_PARAM_##__param: return #__param
Expand Down

0 comments on commit 87ffc79

Please sign in to comment.