public static bool BeginMethod(int index, int baseClass, string methodName) { // set thread type to 1 so CScaleformMgr::BeginMethod adds the method call to the same queue as if it was done using natives long v = UsingTls.Get(0xB4); UsingTls.Set(0xB4, 1); bool b = InvokeRetBool(Memory.CScaleformMgr_BeginMethod, index, baseClass, methodName); UsingTls.Set(0xB4, v); return(b); }
public static bool IsMovieRendering(int index) { // CScaleformMgr::IsMovieRendering checks if the current thread is the render thread, // so temporarily set this thread type to the render thread type (2) // doesn't seem to cause any issue in this case long v = UsingTls.Get(0xB4); UsingTls.Set(0xB4, 2); bool b = InvokeRetBool(Memory.CScaleformMgr_IsMovieRendering, index); UsingTls.Set(0xB4, v); return(b); }
public static void DrawRect(float x, float y, float width, float height, int r, int g, int b, int a, bool unk) { using var tls = UsingTls.Scope(); Invoke(Memory.Native_DrawRect, x, y, width, height, r, g, b, a, unk); }
public static void DrawSprite(string textureDict, string textureName, float x, float y, float width, float height, float rotation, int r, int g, int b, int a, bool unk) { using var tls = UsingTls.Scope(); Invoke(Memory.Native_DrawSprite, textureDict, textureName, x, y, width, height, rotation, r, g, b, a, unk); }