├── .editorconfig
├── .gitattributes
├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.yaml
│ ├── config.yml
│ └── enhancement.yaml
└── dependabot.yml
├── .gitignore
├── BaseLibs
└── NetStandardPatches
│ ├── System.Configuration.dll
│ ├── System.Core.dll
│ ├── System.Xml.dll
│ └── System.dll
├── CHANGELOG.md
├── Dependencies
├── CompatibilityLayers
│ ├── Demeo
│ │ ├── Demeo.csproj
│ │ ├── Demeo_LobbyRequirement.cs
│ │ └── Module.cs
│ ├── IPA
│ │ ├── IPA.csproj
│ │ ├── IPA
│ │ │ ├── IEnhancedPlugin.cs
│ │ │ ├── IPlugin.cs
│ │ │ ├── ModPrefs.cs
│ │ │ └── PluginManager.cs
│ │ ├── IPAPluginWrapper.cs
│ │ └── Module.cs
│ ├── Muse_Dash_Mono
│ │ ├── Module.cs
│ │ ├── MuseDashModLoader
│ │ │ ├── IMod.cs
│ │ │ ├── ModLoader.cs
│ │ │ └── ModLogger.cs
│ │ ├── MuseDashModWrapper.cs
│ │ └── Muse_Dash_Mono.csproj
│ └── Stress_Level_Zero_Il2Cpp
│ │ ├── Module.cs
│ │ └── Stress_Level_Zero_Il2Cpp.csproj
├── Il2CppAssemblyGenerator
│ ├── Config.cs
│ ├── Core.cs
│ ├── Extensions.cs
│ ├── FileHandler.cs
│ ├── Il2CppAssemblyGenerator.csproj
│ ├── Packages
│ │ ├── Cpp2IL.cs
│ │ ├── Cpp2IL_NetFramework.cs
│ │ ├── Cpp2IL_StrippedCodeRegSupport.cs
│ │ ├── DeobfuscationMap.cs
│ │ ├── DeobfuscationRegex.cs
│ │ ├── Il2CppInterop.cs
│ │ ├── Models
│ │ │ ├── ExecutablePackage.cs
│ │ │ └── PackageBase.cs
│ │ └── UnityDependencies.cs
│ └── RemoteAPI.cs
├── MelonStartScreen
│ ├── Core.cs
│ ├── MelonStartScreen.csproj
│ ├── ModLoadStep.cs
│ ├── NativeUtils
│ │ ├── NativeFieldValueAttribute.cs
│ │ ├── NativeSignatureAttribute.cs
│ │ ├── NativeSignatureFlags.cs
│ │ └── NativeSignatureResolver.cs
│ ├── ProgressParser.cs
│ ├── Resources
│ │ ├── Loading_Halloween.dat
│ │ ├── Loading_Lemon.dat
│ │ ├── Loading_Melon.dat
│ │ ├── Logo_Halloween.dat
│ │ ├── Logo_Lemon.dat
│ │ └── Logo_Melon.dat
│ ├── ScreenRenderer.cs
│ ├── TextMeshGenerator.cs
│ ├── UI
│ │ ├── Objects
│ │ │ ├── UI_AnimatedImage.cs
│ │ │ ├── UI_Background.cs
│ │ │ ├── UI_Image.cs
│ │ │ ├── UI_Object.cs
│ │ │ ├── UI_ProgressBar.cs
│ │ │ └── UI_Text.cs
│ │ ├── StartScreenResources.cs
│ │ ├── Themes
│ │ │ ├── UI_Theme_Default.cs
│ │ │ ├── UI_Theme_Lemon.cs
│ │ │ └── UI_Theme_Pumpkin.cs
│ │ ├── UI_Anchor.cs
│ │ ├── UI_Style.cs
│ │ ├── UI_Theme.cs
│ │ └── UI_Utils.cs
│ ├── UnhollowerMini
│ │ ├── Il2CppException.cs
│ │ ├── Il2CppSystem
│ │ │ ├── Byte.cs
│ │ │ ├── Int32.cs
│ │ │ └── Type.cs
│ │ ├── InternalClassPointerStore.cs
│ │ ├── InternalObjectBase.cs
│ │ ├── InternalType.cs
│ │ ├── ObjectCollectedException.cs
│ │ └── UnityInternals.cs
│ ├── UnityEngine
│ │ ├── CoreModule
│ │ │ ├── Color.cs
│ │ │ ├── Color32.cs
│ │ │ ├── FilterMode.cs
│ │ │ ├── GL.cs
│ │ │ ├── Graphics.cs
│ │ │ ├── HideFlags.cs
│ │ │ ├── ImageConversion.cs
│ │ │ ├── Internal_DrawTextureArguments.cs
│ │ │ ├── Material.cs
│ │ │ ├── Mesh.cs
│ │ │ ├── Quaternion.cs
│ │ │ ├── Rect.cs
│ │ │ ├── Resources.cs
│ │ │ ├── Screen.cs
│ │ │ ├── SystemInfo.cs
│ │ │ ├── Texture.cs
│ │ │ ├── Texture2D.cs
│ │ │ ├── UnityDebug.cs
│ │ │ ├── UnityObject.cs
│ │ │ ├── Vector2.cs
│ │ │ ├── Vector3.cs
│ │ │ ├── Vector4.cs
│ │ │ ├── VertexAttribute.cs
│ │ │ └── VerticalWrapMode.cs
│ │ └── TextRenderingModule
│ │ │ ├── Font.cs
│ │ │ ├── FontStyle.cs
│ │ │ ├── TextAnchor.cs
│ │ │ ├── TextGenerationSettings.cs
│ │ │ ├── TextGenerator.cs
│ │ │ └── UIVertex.cs
│ ├── UnityPlayer
│ │ └── GfxDevice.cs
│ ├── Windows
│ │ ├── DropFile.cs
│ │ ├── Msg.cs
│ │ ├── Point.cs
│ │ ├── User32.cs
│ │ └── WindowMessage.cs
│ └── mgGif
│ │ ├── Decoder.cs
│ │ ├── Image.cs
│ │ └── LICENSE.txt
└── SupportModules
│ ├── Component.cs
│ ├── ComponentSiblingFix.cs
│ ├── Il2Cpp
│ ├── Il2Cpp.csproj
│ ├── InteropInterface.cs
│ ├── Libs
│ │ ├── Il2CppSystem.dll
│ │ ├── Il2Cppmscorlib.dll
│ │ └── UnityEngine.CoreModule.dll
│ ├── Main.cs
│ └── MonoEnumeratorWrapper.cs
│ ├── Mono
│ ├── Libs
│ │ └── UnityEngine.dll
│ ├── Main.cs
│ └── Mono.csproj
│ ├── SceneHandler.cs
│ ├── SupportModule_To.cs
│ └── UnityMappers.cs
├── Directory.Build.props
├── LICENSE.md
├── MelonLoader.Bootstrap
├── BionicNativeAot.targets
├── Core.cs
├── Deps
│ ├── linux-bionic-arm64
│ │ ├── libdobby.a
│ │ └── libplthook.a
│ ├── linux-x64
│ │ ├── libdobby.a
│ │ └── libplthook.a
│ ├── osx-x64
│ │ ├── libdobby.a
│ │ └── libplthook.a
│ ├── win-x64
│ │ ├── dobby.lib
│ │ └── plthook.lib
│ └── win-x86
│ │ ├── dobby.lib
│ │ └── plthook.lib
├── Exports.cs
├── Exports.def
├── InternalLogger.cs
├── LibcNative.cs
├── Logging
│ ├── ColorRGB.cs
│ ├── ConsoleHandler.cs
│ ├── LinuxPlayerLogsMirroring.cs
│ ├── MelonLogger.cs
│ ├── PastelExtensions.cs
│ └── WindowsPlayerLogsMirroring.cs
├── MelonDebug.cs
├── MelonLoader.Bootstrap.csproj
├── OSXEntry
│ └── osxentry.cpp
├── PltHook.cs
├── Proxy
│ ├── Android
│ │ ├── AndroidBootstrap.cs
│ │ ├── AndroidProxy.cs
│ │ └── StdRedirect.cs
│ ├── Exports
│ │ ├── D3D10Exports.cs
│ │ ├── D3D11Exports.cs
│ │ ├── D3D12Exports.cs
│ │ ├── D3D8Exports.cs
│ │ ├── D3D9Exports.cs
│ │ ├── DDrawExports.cs
│ │ ├── DInput8Exports.cs
│ │ ├── DInputExports.cs
│ │ ├── DSoundExports.cs
│ │ ├── MSACM32Exports.cs
│ │ ├── SharedExports.cs
│ │ ├── VersionExports.cs
│ │ ├── WinHTTPExports.cs
│ │ └── WinMMExports.cs
│ ├── ProxyMap.cs
│ └── ProxyResolver.cs
├── RuntimeHandlers
│ ├── Il2Cpp
│ │ ├── ClrMonoLib.cs
│ │ ├── Dotnet.cs
│ │ ├── DotnetInstaller.cs
│ │ ├── Il2CppHandler.cs
│ │ └── Il2CppLib.cs
│ └── Mono
│ │ ├── MonoHandler.cs
│ │ └── MonoLib.cs
├── SharedDelegates.cs
├── TrimmerRoots.xml
├── Utils
│ ├── ArgParser.cs
│ ├── Dobby.cs
│ ├── NativeFunc.cs
│ └── WineUtils.cs
├── WindowsNative.cs
├── androidexports.def
├── linuxexports.def
└── osxexports.def
├── MelonLoader.NativeHost
├── MelonLoader.NativeHost.csproj
└── NativeEntryPoint.cs
├── MelonLoader.sln
├── MelonLoader
├── Assertions
│ ├── LemonAssert.cs
│ ├── LemonAssertException.cs
│ └── LemonAssertMapping.cs
├── Attributes
│ ├── HarmonyDontPatchAllAttribute.cs
│ ├── MelonAdditionalCreditsAttribute.cs
│ ├── MelonAdditionalDependenciesAttribute.cs
│ ├── MelonAuthorColorAttribute.cs
│ ├── MelonColorAttribute.cs
│ ├── MelonGameAttribute.cs
│ ├── MelonGameVersionAttribute.cs
│ ├── MelonIDAttribute.cs
│ ├── MelonIncompatibleAssembliesAttribute.cs
│ ├── MelonInfoAttribute.cs
│ ├── MelonOptionalDependenciesAttribute.cs
│ ├── MelonPlatformAttribute.cs
│ ├── MelonPlatformDomainAttribute.cs
│ ├── MelonPriorityAttribute.cs
│ ├── MelonProcessAttribute.cs
│ ├── PatchShield.cs
│ ├── RegisterTypeInIl2Cpp.cs
│ ├── RegisterTypeInIl2CppWithInterfaces.cs
│ ├── VerifyLoaderBuildAttribute.cs
│ └── VerifyLoaderVersionAttribute.cs
├── BackwardsCompatibility
│ ├── ForwardingAttributes
│ │ ├── 0Harmony.cs
│ │ ├── Mono.Cecil.Mdb.cs
│ │ ├── Mono.Cecil.Pdb.cs
│ │ ├── Mono.Cecil.Rocks.cs
│ │ ├── Mono.Cecil.cs
│ │ ├── MonoMod.RuntimeDetour.cs
│ │ ├── MonoMod.Utils.cs
│ │ └── Tomlet.cs
│ ├── Harmony
│ │ ├── Attributes.cs
│ │ ├── Extras
│ │ │ ├── DelegateTypeFactory.cs
│ │ │ ├── FastAccess.cs
│ │ │ └── MethodInvoker.cs
│ │ ├── HarmonyInstance.cs
│ │ ├── HarmonyMethod.cs
│ │ ├── Patch.cs
│ │ ├── Priority.cs
│ │ └── Tools
│ │ │ ├── AccessTools.cs
│ │ │ ├── Extensions.cs
│ │ │ └── SymbolExtensions.cs
│ ├── ICSharpCode
│ │ └── SharpZipLib
│ │ │ ├── BZip2
│ │ │ ├── BZip2.cs
│ │ │ ├── BZip2Constants.cs
│ │ │ ├── BZip2Exception.cs
│ │ │ ├── BZip2InputStream.cs
│ │ │ └── BZip2OutputStream.cs
│ │ │ ├── Checksum
│ │ │ ├── Adler32.cs
│ │ │ ├── BZip2Crc.cs
│ │ │ ├── Crc32.cs
│ │ │ ├── CrcUtilities.cs
│ │ │ └── IChecksum.cs
│ │ │ ├── Core
│ │ │ ├── EmptyRefs.cs
│ │ │ ├── Exceptions
│ │ │ │ ├── SharpZipBaseException.cs
│ │ │ │ ├── StreamDecodingException.cs
│ │ │ │ ├── StreamUnsupportedException.cs
│ │ │ │ ├── UnexpectedEndOfStreamException.cs
│ │ │ │ └── ValueOutOfRangeException.cs
│ │ │ ├── FileSystemScanner.cs
│ │ │ ├── INameTransform.cs
│ │ │ ├── IScanFilter.cs
│ │ │ ├── InvalidNameException.cs
│ │ │ ├── NameFilter.cs
│ │ │ ├── PathFilter.cs
│ │ │ ├── PathUtils.cs
│ │ │ └── StreamUtils.cs
│ │ │ ├── Encryption
│ │ │ ├── PkzipClassic.cs
│ │ │ ├── ZipAESStream.cs
│ │ │ └── ZipAESTransform.cs
│ │ │ ├── GZip
│ │ │ ├── GZIPConstants.cs
│ │ │ ├── GZip.cs
│ │ │ ├── GZipException.cs
│ │ │ ├── GzipInputStream.cs
│ │ │ └── GzipOutputStream.cs
│ │ │ ├── LICENSE.txt
│ │ │ ├── Lzw
│ │ │ ├── LzwConstants.cs
│ │ │ ├── LzwException.cs
│ │ │ └── LzwInputStream.cs
│ │ │ ├── README.md
│ │ │ ├── Tar
│ │ │ ├── InvalidHeaderException.cs
│ │ │ ├── TarArchive.cs
│ │ │ ├── TarBuffer.cs
│ │ │ ├── TarEntry.cs
│ │ │ ├── TarException.cs
│ │ │ ├── TarExtendedHeaderReader.cs
│ │ │ ├── TarHeader.cs
│ │ │ ├── TarInputStream.cs
│ │ │ └── TarOutputStream.cs
│ │ │ └── Zip
│ │ │ ├── Compression
│ │ │ ├── Deflater.cs
│ │ │ ├── DeflaterConstants.cs
│ │ │ ├── DeflaterEngine.cs
│ │ │ ├── DeflaterHuffman.cs
│ │ │ ├── DeflaterPending.cs
│ │ │ ├── Inflater.cs
│ │ │ ├── InflaterDynHeader.cs
│ │ │ ├── InflaterHuffmanTree.cs
│ │ │ ├── PendingBuffer.cs
│ │ │ └── Streams
│ │ │ │ ├── DeflaterOutputStream.cs
│ │ │ │ ├── InflaterInputStream.cs
│ │ │ │ ├── OutputWindow.cs
│ │ │ │ └── StreamManipulator.cs
│ │ │ ├── FastZip.cs
│ │ │ ├── IEntryFactory.cs
│ │ │ ├── WindowsNameTransform.cs
│ │ │ ├── ZipConstants.cs
│ │ │ ├── ZipEncryptionMethod.cs
│ │ │ ├── ZipEntry.cs
│ │ │ ├── ZipEntryExtensions.cs
│ │ │ ├── ZipEntryFactory.cs
│ │ │ ├── ZipException.cs
│ │ │ ├── ZipExtraData.cs
│ │ │ ├── ZipFile.cs
│ │ │ ├── ZipHelperStream.cs
│ │ │ ├── ZipInputStream.cs
│ │ │ ├── ZipNameTransform.cs
│ │ │ ├── ZipOutputStream.cs
│ │ │ └── ZipStrings.cs
│ ├── Melon
│ │ ├── AssemblyResolveInfo.cs
│ │ ├── HarmonyShield.cs
│ │ ├── Imports.cs
│ │ ├── Main.cs
│ │ ├── MelonConsole.cs
│ │ ├── MelonLoaderBase.cs
│ │ ├── MelonModGameAttribute.cs
│ │ ├── MelonModInfoAttribute.cs
│ │ ├── MelonModLogger.cs
│ │ ├── MelonPluginGameAttribute.cs
│ │ ├── MelonPluginInfoAttribute.cs
│ │ ├── MelonPrefs.cs
│ │ ├── ModPrefs.cs
│ │ ├── MonoLibrary.cs
│ │ ├── MonoResolveManager.cs
│ │ └── bHaptics.cs
│ └── TinyJSON
│ │ ├── Decoder.cs
│ │ ├── EncodeOptions.cs
│ │ ├── Encoder.cs
│ │ ├── Extensions.cs
│ │ ├── JSON.cs
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ └── Types
│ │ ├── ProxyArray.cs
│ │ ├── ProxyBoolean.cs
│ │ ├── ProxyNumber.cs
│ │ ├── ProxyObject.cs
│ │ ├── ProxyString.cs
│ │ └── Variant.cs
├── CompatibilityLayers
│ └── MelonCompatibilityLayer.cs
├── Core.cs
├── CoreClrUtils
│ ├── CoreClrDelegateFixer.cs
│ ├── MethodBaseHelper.cs
│ └── NativeStackWalk.cs
├── Fixes
│ ├── AsmResolverFix.cs
│ ├── DetourContextDisposeFix.cs
│ ├── DotnetAssemblyLoadContextFix.cs
│ ├── DotnetModHandlerRedirectionFix.cs
│ ├── ForcedCultureInfo.cs
│ ├── Il2CppICallInjector.cs
│ ├── Il2CppInteropFixes.cs
│ ├── InstancePatchFix.cs
│ ├── NativeLibraryFix.cs
│ ├── Net20Compatibility.cs
│ ├── ProcessFix.cs
│ ├── ProcessModulesFix.cs
│ ├── ServerCertificateValidation.cs
│ ├── UnhandledException.cs
│ └── XTermFix.cs
├── InternalUtils
│ ├── BootstrapInterop.cs
│ ├── BootstrapLibrary.cs
│ ├── DependencyGraph.cs
│ ├── HarmonyLogger.cs
│ ├── Il2CppAssemblyGenerator.cs
│ ├── MelonStartScreen.cs
│ ├── UnityInformationHandler.cs
│ └── UnityMagicMethods.cs
├── JNI
│ ├── JArray.cs
│ ├── JClass.cs
│ ├── JFieldID.cs
│ ├── JMethodID.cs
│ ├── JNI.cs
│ ├── JNIEnv.cs
│ ├── JNIResultException.cs
│ ├── JObject.cs
│ ├── JObjectArray.cs
│ ├── JString.cs
│ ├── JThrowable.cs
│ ├── JThrowableException.cs
│ ├── JValue.cs
│ ├── JavaVM.cs
│ ├── ReferenceType.cs
│ ├── ReleaseMode.cs
│ ├── Result.cs
│ ├── TypeSignature.cs
│ └── Version.cs
├── Lemons
│ ├── Cryptography
│ │ ├── LemonMD5.cs
│ │ ├── LemonSHA256.cs
│ │ └── LemonSHA512.cs
│ ├── LemonAction.cs
│ ├── LemonArraySegment.cs
│ ├── LemonEnumerator.cs
│ ├── LemonFunc.cs
│ └── LemonTuple.cs
├── LoaderConfig.cs
├── MelonEvents.cs
├── MelonLaunchOptions.cs
├── MelonLoader.csproj
├── MelonUtils.cs
├── Melons
│ ├── Events
│ │ ├── MelonAction.cs
│ │ └── MelonEvent.cs
│ ├── Melon.cs
│ ├── MelonAssembly.cs
│ ├── MelonBase.cs
│ ├── MelonFolderHandler.cs
│ ├── MelonHandler.cs
│ ├── MelonMod.cs
│ ├── MelonPlugin.cs
│ ├── MelonPreprocessor.cs
│ ├── MelonTypeBase.cs
│ ├── ResolvedMelons.cs
│ └── RottenMelon.cs
├── Modules
│ └── MelonModule.cs
├── NativeUtils
│ ├── CppUtils.cs
│ ├── NativeHooks.cs
│ └── PEParser
│ │ ├── ImageDataDirectory.cs
│ │ ├── ImageExportDirectory.cs
│ │ ├── ImageFileHeader.cs
│ │ ├── ImageNtHeaders.cs
│ │ ├── ImageResourceDirectory.cs
│ │ ├── ImageSectionHeader.cs
│ │ ├── ImageThunkData32.cs
│ │ ├── ImageThunkData64.cs
│ │ ├── OptionalFileHeader32.cs
│ │ ├── OptionalFileHeader64.cs
│ │ └── PEUtils.cs
├── Pastel
│ └── Pastel.cs
├── Preferences
│ ├── IO
│ │ ├── File.cs
│ │ └── Watcher.cs
│ ├── MelonPreferences.cs
│ ├── MelonPreferences_Category.cs
│ ├── MelonPreferences_Entry.cs
│ ├── MelonPreferences_ReflectiveCategory.cs
│ ├── TomlMapper.cs
│ └── ValueValidator.cs
├── Properties
│ └── BuildInfo.cs
├── Resolver
│ ├── AssemblyManager.cs
│ ├── AssemblyResolveInfo.cs
│ ├── MelonAssemblyResolver.cs
│ └── SearchDirectoryManager.cs
├── Resources
│ └── classdata.tpk
├── Semver
│ ├── IntExtensions.cs
│ ├── License.txt
│ ├── README.md
│ └── SemVersion.cs
├── SupportModule
│ ├── ISupportModule_From.cs
│ ├── ISupportModule_To.cs
│ ├── SupportModule.cs
│ └── SupportModule_From.cs
└── Utils
│ ├── APKAssetManager.cs
│ ├── AssemblyVerifier.cs
│ ├── Assertion.cs
│ ├── EnumExtensions.cs
│ ├── IniFile.cs
│ ├── InteropSupport.cs
│ ├── LoggerUtils.cs
│ ├── MelonCoroutines.cs
│ ├── MelonDebug.cs
│ ├── MelonEnvironment.cs
│ ├── MelonLogger.cs
│ ├── MonoLibrary.cs
│ ├── NativeLibrary.cs
│ └── SteamManifestReader.cs
├── NOTICE.txt
├── NuGet.config
├── PortablePdbToMdb
├── PortablePdbToMdb.cs
└── PortablePdbToMdb.csproj
├── README.md
├── UnityUtilities
├── UnityEngine.Il2CppAssetBundleManager
│ ├── Il2CppAssetBundle.cs
│ ├── Il2CppAssetBundleManager.cs
│ ├── Il2CppAssetBundleRequest.cs
│ └── UnityEngine.Il2CppAssetBundleManager.csproj
└── UnityEngine.Il2CppImageConversionManager
│ ├── Il2CppImageConversionManager.cs
│ └── UnityEngine.Il2CppImageConversionManager.csproj
├── compile_bootstrap_android.bat
└── compile_bootstrap_android_debug.bat
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.cs]
2 |
3 | # CS1591: Missing XML comment for publicly visible type or member
4 | dotnet_diagnostic.CS1591.severity = none
5 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
2 | patreon: # Replace with a single Patreon username
3 | open_collective: # Replace with a single Open Collective username
4 | ko_fi: # Replace with a single Ko-fi username
5 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
6 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
7 | liberapay: # Replace with a single Liberapay username
8 | issuehunt: # Replace with a single IssueHunt username
9 | otechie: # Replace with a single Otechie username
10 | custom: ['https://melonwiki.xyz/#/credits']
11 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/enhancement.yaml:
--------------------------------------------------------------------------------
1 | name: New feature or enhancement
2 | description: Suggest a feature or enhancement for MelonLoader
3 | title: "[Enhancement]: "
4 | labels: [enhancement]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: |
9 | Please provide as much detail as possible for your suggestion.
10 | - type: textarea
11 | id: description
12 | attributes:
13 | label: Describe the new feature or enhancement
14 | description: |
15 | Please go into as much detail as necessary in describing the new feature or enhancement.
16 | validations:
17 | required: true
18 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "nuget" # See documentation for possible values
9 | target-branch: "alpha-development"
10 | directory: "/" # Location of package manifests
11 | schedule:
12 | interval: "daily"
13 |
14 | - package-ecosystem: "cargo"
15 | directory: "/"
16 | schedule:
17 | interval: "monthly"
18 | ignore:
19 | - dependency-name: "*"
20 |
21 |
22 | - package-ecosystem: "github-actions"
23 | target-branch: "alpha-development"
24 | # Workflow files stored in the
25 | # default location of `.github/workflows`
26 | directory: "/"
27 | schedule:
28 | interval: "daily"
29 |
--------------------------------------------------------------------------------
/BaseLibs/NetStandardPatches/System.Configuration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/BaseLibs/NetStandardPatches/System.Configuration.dll
--------------------------------------------------------------------------------
/BaseLibs/NetStandardPatches/System.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/BaseLibs/NetStandardPatches/System.Core.dll
--------------------------------------------------------------------------------
/BaseLibs/NetStandardPatches/System.Xml.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/BaseLibs/NetStandardPatches/System.Xml.dll
--------------------------------------------------------------------------------
/BaseLibs/NetStandardPatches/System.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/BaseLibs/NetStandardPatches/System.dll
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/Demeo/Demeo.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | MelonLoader.CompatibilityLayers
4 | net472
5 | true
6 | $(MLOutDir)/MelonLoader/Dependencies/CompatibilityLayers
7 | true
8 | portable
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/Demeo/Demeo_LobbyRequirement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace MelonLoader
4 | {
5 | [AttributeUsage(AttributeTargets.Assembly)]
6 | public class Demeo_LobbyRequirement : Attribute
7 | {
8 | public Demeo_LobbyRequirement() { }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/IPA/IPA.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | MelonLoader.CompatibilityLayers
4 | net35
5 | true
6 | $(MLOutDir)/MelonLoader/Dependencies/CompatibilityLayers
7 | true
8 | portable
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/IPA/IPA/IEnhancedPlugin.cs:
--------------------------------------------------------------------------------
1 | namespace IllusionPlugin
2 | {
3 | public interface IEnhancedPlugin : IPlugin
4 | {
5 | string[] Filter { get; }
6 | void OnLateUpdate();
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/IPA/IPA/IPlugin.cs:
--------------------------------------------------------------------------------
1 | namespace IllusionPlugin
2 | {
3 | public interface IPlugin
4 | {
5 | string Name { get; }
6 | string Version { get; }
7 | void OnApplicationStart();
8 | void OnApplicationQuit();
9 | void OnLevelWasLoaded(int level);
10 | void OnLevelWasInitialized(int level);
11 | void OnUpdate();
12 | void OnFixedUpdate();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/IPA/IPA/PluginManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using IllusionPlugin;
3 | using MelonLoader.Utils;
4 |
5 | namespace IllusionInjector
6 | {
7 | public static class PluginManager
8 | {
9 | internal static List _Plugins = new List();
10 | public static IEnumerable Plugins { get => _Plugins; }
11 | public class AppInfo
12 | {
13 | public static string StartupPath { get => MelonEnvironment.GameRootDirectory; }
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/IPA/IPAPluginWrapper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Reflection;
6 | using IllusionPlugin;
7 | using IllusionInjector;
8 |
9 | namespace MelonLoader.CompatibilityLayers
10 | {
11 | internal class IPAPluginWrapper : MelonMod
12 | {
13 | internal IPlugin pluginInstance;
14 | public override void OnInitializeMelon() => pluginInstance.OnApplicationStart();
15 | public override void OnDeinitializeMelon() => pluginInstance.OnApplicationQuit();
16 | public override void OnSceneWasLoaded(int buildIndex, string sceneName) => pluginInstance.OnLevelWasLoaded(buildIndex);
17 | public override void OnSceneWasInitialized(int buildIndex, string sceneName) => pluginInstance.OnLevelWasInitialized(buildIndex);
18 | public override void OnUpdate() => pluginInstance.OnUpdate();
19 | public override void OnFixedUpdate() => pluginInstance.OnFixedUpdate();
20 | public override void OnLateUpdate() { if (pluginInstance is IEnhancedPlugin plugin) plugin.OnLateUpdate(); }
21 | }
22 | }
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/Muse_Dash_Mono/MuseDashModLoader/IMod.cs:
--------------------------------------------------------------------------------
1 | namespace ModHelper
2 | {
3 | public interface IMod
4 | {
5 | string Name { get; }
6 | string Description { get; }
7 | string Author { get; }
8 | string HomePage { get; }
9 | void DoPatching();
10 | }
11 | }
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/Muse_Dash_Mono/MuseDashModLoader/ModLoader.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Reflection;
3 | using MelonLoader;
4 | using ModHelper;
5 |
6 | namespace ModLoader
7 | {
8 | public class ModLoader
9 | {
10 | internal static List mods = new List();
11 | internal static Dictionary depends = new Dictionary();
12 |
13 | public static void LoadDependency(Assembly assembly)
14 | {
15 | foreach (string dependStr in assembly.GetManifestResourceNames())
16 | {
17 | string filter = $"{assembly.GetName().Name}.Depends.";
18 | if (dependStr.StartsWith(filter) && dependStr.EndsWith(".dll"))
19 | {
20 | string dependName = dependStr.Remove(dependStr.LastIndexOf(".dll")).Remove(0, filter.Length);
21 | if (depends.ContainsKey(dependName))
22 | {
23 | MelonLogger.Error($"Dependency conflict: {dependName} First at: {depends[dependName].GetName().Name}");
24 | continue;
25 | }
26 |
27 | Assembly dependAssembly;
28 | using (var stream = assembly.GetManifestResourceStream(dependStr))
29 | {
30 | byte[] buffer = new byte[stream.Length];
31 | stream.Read(buffer, 0, buffer.Length);
32 | dependAssembly = Assembly.Load(buffer);
33 | }
34 | depends.Add(dependName, dependAssembly);
35 | }
36 | }
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/Muse_Dash_Mono/MuseDashModLoader/ModLogger.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics;
2 | using MelonLoader;
3 |
4 | namespace ModHelper
5 | {
6 | public static class ModLogger
7 | {
8 | public static void Debug(object obj)
9 | {
10 | var frame = new StackTrace().GetFrame(1);
11 | var className = frame.GetMethod().ReflectedType.Name;
12 | var methodName = frame.GetMethod().Name;
13 | AddLog(className, methodName, obj);
14 | }
15 |
16 | public static void AddLog(string className, string methodName, object obj)
17 | {
18 | MelonLogger.Msg($"[{className}:{methodName}]: {obj}");
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/Muse_Dash_Mono/MuseDashModWrapper.cs:
--------------------------------------------------------------------------------
1 | using ModHelper;
2 |
3 | namespace MelonLoader
4 | {
5 | internal class MuseDashModWrapper : MelonMod
6 | {
7 | internal IMod modInstance;
8 | public override void OnInitializeMelon() => modInstance.DoPatching();
9 | }
10 | }
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/Muse_Dash_Mono/Muse_Dash_Mono.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | MelonLoader.CompatibilityLayers
4 | net35
5 | true
6 | $(MLOutDir)/MelonLoader/Dependencies/CompatibilityLayers
7 | true
8 | portable
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Dependencies/CompatibilityLayers/Stress_Level_Zero_Il2Cpp/Stress_Level_Zero_Il2Cpp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | MelonLoader.CompatibilityLayers
4 | net472
5 | true
6 | $(MLOutDir)/MelonLoader/Dependencies/CompatibilityLayers
7 | true
8 | None
9 |
10 |
11 |
12 |
13 | false
14 | false
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Dependencies/Il2CppAssemblyGenerator/Config.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using MelonLoader.Preferences;
5 |
6 | namespace MelonLoader.Il2CppAssemblyGenerator
7 | {
8 | internal class Config
9 | {
10 | private static string FilePath;
11 | private static MelonPreferences_ReflectiveCategory Category;
12 | internal static AssemblyGeneratorConfiguration Values;
13 |
14 | internal static void Initialize()
15 | {
16 | FilePath = Path.Combine(Core.BasePath, "Config.cfg");
17 |
18 | Category = MelonPreferences.CreateCategory("Il2CppAssemblyGenerator");
19 | Category.SetFilePath(FilePath, printmsg: false);
20 | Category.DestroyFileWatcher();
21 |
22 | Values = Category.GetValue();
23 |
24 | if (!File.Exists(FilePath))
25 | Save();
26 | }
27 |
28 | internal static void Save() => Category.SaveToFile(false);
29 |
30 | public class AssemblyGeneratorConfiguration
31 | {
32 | public string GameAssemblyHash = null;
33 | public string DeobfuscationRegex = null;
34 | public string UnityVersion = "0.0.0.0";
35 | public string DumperVersion = "0.0.0.0";
36 | public string DumperSCRSVersion = "0.0.0.0";
37 |
38 | [Obsolete("Il2CppAssemblyUnhollower support was discontinued. This will be removed in a future update.", true)]
39 | public bool UseInterop = true;
40 |
41 | public List OldFiles = new List();
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/Dependencies/Il2CppAssemblyGenerator/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Net.Http;
3 |
4 | namespace MelonLoader.Il2CppAssemblyGenerator;
5 |
6 | internal static class Extensions
7 | {
8 | public static void DownloadFile(this HttpClient client, string url, string dest)
9 | {
10 | using var dlStream = client.GetStreamAsync(url).Result;
11 | using var fileStream = File.Open(dest, FileMode.Create, FileAccess.Write);
12 | dlStream.CopyTo(fileStream);
13 | }
14 | }
--------------------------------------------------------------------------------
/Dependencies/Il2CppAssemblyGenerator/Il2CppAssemblyGenerator.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | MelonLoader.Il2CppAssemblyGenerator
4 | net6
5 | true
6 | true
7 | $(MLOutDir)/MelonLoader/Dependencies/Il2CppAssemblyGenerator
8 | true
9 | embedded
10 | false
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Dependencies/Il2CppAssemblyGenerator/Packages/Cpp2IL_StrippedCodeRegSupport.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader.Il2CppAssemblyGenerator.Packages.Models;
2 | using Semver;
3 | using System.IO;
4 |
5 | namespace MelonLoader.Il2CppAssemblyGenerator.Packages
6 | {
7 | internal class Cpp2IL_StrippedCodeRegSupport : PackageBase
8 | {
9 | private static SemVersion MinVersion = SemVersion.Parse("2022.1.0-pre-release.19");
10 | private string _pluginsFolder;
11 | private SemVersion VersionSem;
12 |
13 | internal Cpp2IL_StrippedCodeRegSupport(ExecutablePackage cpp2IL)
14 | {
15 | Name = $"{cpp2IL.Name}.Plugin.StrippedCodeRegSupport";
16 | Version = cpp2IL.Version;
17 | VersionSem = SemVersion.Parse(Version);
18 |
19 | string folderpath = Path.Combine(Core.BasePath, cpp2IL.Name);
20 | string fileName = $"{Name}.dll";
21 | _pluginsFolder = Path.Combine(folderpath, "Plugins");
22 |
23 | FilePath =
24 | Destination =
25 | Path.Combine(_pluginsFolder, fileName);
26 |
27 | URL = $"https://github.com/SamboyCoding/{cpp2IL.Name}/releases/download/{cpp2IL.Version}/{fileName}";
28 | }
29 |
30 | internal override bool ShouldSetup()
31 | {
32 | if (VersionSem < MinVersion)
33 | return false;
34 |
35 | return string.IsNullOrEmpty(Config.Values.DumperSCRSVersion)
36 | || !Config.Values.DumperSCRSVersion.Equals(Version);
37 | }
38 |
39 | internal override bool Setup()
40 | {
41 | if (VersionSem < Cpp2IL.NetCoreMinVersion)
42 | return true;
43 |
44 | if (!Directory.Exists(_pluginsFolder))
45 | Directory.CreateDirectory(_pluginsFolder);
46 |
47 | return base.Setup();
48 | }
49 |
50 | internal override void Save()
51 | => Save(ref Config.Values.DumperSCRSVersion);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Dependencies/Il2CppAssemblyGenerator/Packages/DeobfuscationMap.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Text;
4 | using MelonLoader.Lemons.Cryptography;
5 |
6 | namespace MelonLoader.Il2CppAssemblyGenerator.Packages
7 | {
8 | internal class DeobfuscationMap : Models.PackageBase
9 | {
10 | private static LemonSHA512 lemonSHA512 = new LemonSHA512();
11 |
12 | internal DeobfuscationMap()
13 | {
14 | Name = nameof(DeobfuscationMap);
15 | FilePath = Path.Combine(Core.BasePath, $"{Name}.csv.gz");
16 | Destination = FilePath;
17 | URL = RemoteAPI.Info.MappingURL;
18 | Version = RemoteAPI.Info.MappingFileSHA512;
19 | }
20 |
21 | internal override bool ShouldSetup()
22 | {
23 | if (string.IsNullOrEmpty(URL))
24 | return false;
25 | if (string.IsNullOrEmpty(Version))
26 | return false;
27 | else
28 | {
29 | if (!File.Exists(FilePath))
30 | return true;
31 | byte[] hash = lemonSHA512.ComputeHash(File.ReadAllBytes(FilePath));
32 | StringBuilder hashstrb = new StringBuilder(128);
33 | foreach (byte b in hash)
34 | hashstrb.Append(b.ToString("x2"));
35 | string hashstr = hashstrb.ToString();
36 | if (!hashstr.Equals(Version, StringComparison.OrdinalIgnoreCase))
37 | return true;
38 | }
39 | return false;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Dependencies/Il2CppAssemblyGenerator/Packages/DeobfuscationRegex.cs:
--------------------------------------------------------------------------------
1 | namespace MelonLoader.Il2CppAssemblyGenerator.Packages
2 | {
3 | internal class DeobfuscationRegex
4 | {
5 | internal string Regex = null;
6 |
7 | internal DeobfuscationRegex()
8 | {
9 | Regex = LoaderConfig.Current.UnityEngine.ForceGeneratorRegex;
10 | if (string.IsNullOrEmpty(Regex))
11 | Regex = RemoteAPI.Info.ObfuscationRegex;
12 | }
13 |
14 | internal void Setup()
15 | {
16 | if (string.IsNullOrEmpty(Regex))
17 | {
18 | if (!string.IsNullOrEmpty(Config.Values.DeobfuscationRegex))
19 | {
20 | Core.AssemblyGenerationNeeded = true;
21 | return;
22 | }
23 | }
24 | else
25 | {
26 | if (string.IsNullOrEmpty(Config.Values.DeobfuscationRegex))
27 | {
28 | Core.AssemblyGenerationNeeded = true;
29 | return;
30 | }
31 | if (!Config.Values.DeobfuscationRegex.Equals(Regex))
32 | {
33 | Core.AssemblyGenerationNeeded = true;
34 | return;
35 | }
36 | }
37 | }
38 |
39 | internal void Save()
40 | {
41 | Config.Values.DeobfuscationRegex = Regex;
42 | Config.Save();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Dependencies/Il2CppAssemblyGenerator/Packages/UnityDependencies.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 |
3 | namespace MelonLoader.Il2CppAssemblyGenerator.Packages
4 | {
5 | internal class UnityDependencies : Models.PackageBase
6 | {
7 | internal UnityDependencies()
8 | {
9 | Name = nameof(UnityDependencies);
10 | Version = InternalUtils.UnityInformationHandler.EngineVersion.ToStringWithoutType();
11 | URL = $"https://github.com/LavaGang/MelonLoader.UnityDependencies/releases/download/{Version}/Managed.zip";
12 | Destination = Path.Combine(Core.BasePath, Name);
13 | FilePath = Path.Combine(Core.BasePath, $"{Name}_{Version}.zip");
14 | }
15 |
16 | internal override bool ShouldSetup()
17 | => string.IsNullOrEmpty(Config.Values.UnityVersion)
18 | || !Config.Values.UnityVersion.Equals(Version);
19 |
20 | internal override void Save()
21 | => Save(ref Config.Values.UnityVersion);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/MelonStartScreen.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | MelonLoader.MelonStartScreen
4 | net35;net6
5 | true
6 | $(MLOutDir)/MelonLoader
7 | true
8 | true
9 | portable
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | Runtime
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/ModLoadStep.cs:
--------------------------------------------------------------------------------
1 | namespace MelonLoader.MelonStartScreen
2 | {
3 | internal enum ModLoadStep
4 | {
5 | Generation,
6 | LoadMelons,
7 | InitializeMelons,
8 | OnApplicationStart
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/NativeUtils/NativeFieldValueAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace MelonLoader.MelonStartScreen.NativeUtils
4 | {
5 | [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
6 | class NativeFieldValueAttribute : Attribute
7 | {
8 | internal uint LookupIndex { get; }
9 | internal NativeSignatureFlags Flags { get; }
10 | internal object Value { get; }
11 | internal string[] MinimalUnityVersions { get; }
12 |
13 | public NativeFieldValueAttribute(uint lookupIndex, NativeSignatureFlags flags, object value, params string[] minimalUnityVersions)
14 | {
15 | LookupIndex = lookupIndex;
16 | Flags = flags;
17 | Value = value;
18 | MinimalUnityVersions = minimalUnityVersions;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/NativeUtils/NativeSignatureAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace MelonLoader.MelonStartScreen.NativeUtils
4 | {
5 | [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
6 | internal class NativeSignatureAttribute : Attribute
7 | {
8 | internal uint LookupIndex { get; }
9 | internal NativeSignatureFlags Flags { get; }
10 | internal string Signature { get; }
11 | internal string[] MinimalUnityVersions { get; }
12 |
13 | internal NativeSignatureAttribute(uint lookupIndex, NativeSignatureFlags flags, string signature, params string[] minimalUnityVersions)
14 | {
15 | LookupIndex = lookupIndex;
16 | Flags = flags;
17 | Signature = signature;
18 | MinimalUnityVersions = minimalUnityVersions;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/NativeUtils/NativeSignatureFlags.cs:
--------------------------------------------------------------------------------
1 | namespace MelonLoader.MelonStartScreen.NativeUtils
2 | {
3 | internal enum NativeSignatureFlags
4 | {
5 | None = 0,
6 |
7 | Il2Cpp = 1,
8 | Mono = 2,
9 |
10 | //Dev = 4,
11 | //NonDev = 8
12 |
13 | X86 = 16,
14 | X64 = 32,
15 | //ARMEABIV7A = 64,
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/Resources/Loading_Halloween.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/Dependencies/MelonStartScreen/Resources/Loading_Halloween.dat
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/Resources/Loading_Lemon.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/Dependencies/MelonStartScreen/Resources/Loading_Lemon.dat
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/Resources/Loading_Melon.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/Dependencies/MelonStartScreen/Resources/Loading_Melon.dat
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/Resources/Logo_Halloween.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/Dependencies/MelonStartScreen/Resources/Logo_Halloween.dat
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/Resources/Logo_Lemon.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/Dependencies/MelonStartScreen/Resources/Logo_Lemon.dat
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/Resources/Logo_Melon.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/Dependencies/MelonStartScreen/Resources/Logo_Melon.dat
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UI/Objects/UI_Background.cs:
--------------------------------------------------------------------------------
1 | using MelonUnityEngine;
2 |
3 | namespace MelonLoader.MelonStartScreen.UI.Objects
4 | {
5 | internal class UI_Background : UI_Object
6 | {
7 | private UI_Theme.cBackground config;
8 | private UI_Image image;
9 | internal Texture2D solidTexture;
10 |
11 | internal UI_Background(UI_Theme.cBackground backgroundSettings)
12 | {
13 | config = backgroundSettings;
14 | image = UI_Utils.LoadImage(config, "Background");
15 |
16 | solidTexture = UI_Utils.CreateColorTexture(config.SolidColor);
17 | solidTexture.hideFlags = HideFlags.HideAndDontSave;
18 | solidTexture.DontDestroyOnLoad();
19 | AllElements.Add(this);
20 | }
21 |
22 | internal override void Render()
23 | {
24 | int sw = Screen.width;
25 | int sh = Screen.height;
26 |
27 | if (solidTexture != null)
28 | Graphics.DrawTexture(new Rect(0, 0, sw, sh), solidTexture);
29 |
30 | if (image != null)
31 | {
32 | if (config.StretchToScreen)
33 | image.Render(0, 0, sw, sh);
34 | else
35 | image.Render();
36 | }
37 | }
38 |
39 | internal override void Dispose()
40 | {
41 | if (solidTexture == null)
42 | return;
43 |
44 | solidTexture.DestroyImmediate();
45 | solidTexture = null;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UI/Objects/UI_Object.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace MelonLoader.MelonStartScreen.UI.Objects
5 | {
6 | internal abstract class UI_Object : IDisposable
7 | {
8 | internal static List AllElements = new List();
9 | private bool disposedValue;
10 |
11 | internal virtual void Dispose() { }
12 | internal abstract void Render();
13 |
14 | protected virtual void Dispose(bool managed)
15 | {
16 | if (disposedValue)
17 | return;
18 | if (managed)
19 | Dispose();
20 | disposedValue = true;
21 | }
22 |
23 | void IDisposable.Dispose()
24 | {
25 | Dispose(managed: true);
26 | GC.SuppressFinalize(this);
27 | }
28 |
29 | internal static void DisposeOfAll()
30 | {
31 | if (AllElements.Count <= 0)
32 | return;
33 | foreach (UI_Object obj in AllElements)
34 | obj.Dispose();
35 | AllElements.Clear();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UI/StartScreenResources.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Reflection;
3 | using MelonUnityEngine;
4 |
5 | namespace MelonLoader.MelonStartScreen.UI
6 | {
7 | internal static class StartScreenResources
8 | {
9 | public static byte[] HalloweenLoadingIcon => GetResource("Loading_Halloween.dat");
10 | public static byte[] MelonLoadingIcon => GetResource("Loading_Melon.dat");
11 | public static byte[] LemonLoadingIcon => GetResource("Loading_Lemon.dat");
12 |
13 | //Logos
14 | public static byte[] HalloweenLogo => GetResource("Logo_Halloween.dat");
15 | public static byte[] MelonLogo => GetResource("Logo_Melon.dat");
16 | public static byte[] LemonLogo => GetResource("Logo_Lemon.dat");
17 |
18 | private static byte[] GetResource(string name)
19 | {
20 | using var s = Assembly.GetExecutingAssembly().GetManifestResourceStream($"MelonLoader.MelonStartScreen.Resources.{name}");
21 | if (s == null)
22 | return null;
23 | #if NET6_0_OR_GREATER
24 | using var ms = new MemoryStream();
25 | s.CopyTo(ms);
26 | return ms.ToArray();
27 | #else
28 | var ret = new byte[s.Length];
29 | s.Read(ret, 0, ret.Length);
30 | return ret;
31 | #endif
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UI/Themes/UI_Theme_Default.cs:
--------------------------------------------------------------------------------
1 | namespace MelonLoader.MelonStartScreen.UI.Themes
2 | {
3 | internal class UI_Theme_Default : UI_Theme
4 | {
5 | internal UI_Theme_Default() => Defaults();
6 |
7 | internal override byte[] GetLoadingImage()
8 | => StartScreenResources.MelonLoadingIcon;
9 |
10 | internal override byte[] GetLogoImage()
11 | => StartScreenResources.MelonLogo;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UI/Themes/UI_Theme_Lemon.cs:
--------------------------------------------------------------------------------
1 | namespace MelonLoader.MelonStartScreen.UI.Themes
2 | {
3 | internal class UI_Theme_Lemon : UI_Theme
4 | {
5 | internal UI_Theme_Lemon() => Defaults();
6 |
7 | internal override byte[] GetLoadingImage()
8 | => StartScreenResources.LemonLoadingIcon;
9 |
10 | internal override byte[] GetLogoImage()
11 | => StartScreenResources.LemonLogo;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UI/Themes/UI_Theme_Pumpkin.cs:
--------------------------------------------------------------------------------
1 | using MelonUnityEngine;
2 |
3 | namespace MelonLoader.MelonStartScreen.UI.Themes
4 | {
5 | internal class UI_Theme_Pumpkin : UI_Theme
6 | {
7 | internal UI_Theme_Pumpkin()
8 | {
9 | Background = new hBackground();
10 | ProgressBar = new hProgressBar();
11 | VersionText = new hVersionTextSettings();
12 | Defaults();
13 | }
14 |
15 | internal override byte[] GetLoadingImage()
16 | => StartScreenResources.HalloweenLoadingIcon;
17 |
18 | internal override byte[] GetLogoImage()
19 | => StartScreenResources.HalloweenLogo;
20 |
21 | internal class hBackground : cBackground
22 | {
23 | public hBackground()
24 | => SolidColor = new Color(0.078f, 0f, 0.141f);
25 | }
26 |
27 | internal class hProgressBar : cProgressBar
28 | {
29 | public hProgressBar() : base()
30 | {
31 | OuterColor = new Color(0.478f, 0.169f, 0.749f);
32 | InnerColor = new Color(1f, 0.435f, 0f);
33 | Defaults();
34 | }
35 | }
36 |
37 | internal class hVersionTextSettings : VersionTextSettings
38 | {
39 | public hVersionTextSettings()
40 | {
41 | Text = $" v {(Is_ALPHA_PreRelease ? "ALPHA Pre-Release" : "Open-Beta")}";
42 | Defaults();
43 | }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UI/UI_Anchor.cs:
--------------------------------------------------------------------------------
1 | namespace MelonLoader.MelonStartScreen.UI
2 | {
3 | internal enum UI_Anchor
4 | {
5 | // Upper
6 | UpperLeft,
7 | UpperCenter,
8 | UpperRight,
9 |
10 | // Middle
11 | MiddleLeft,
12 | MiddleCenter,
13 | MiddleRight,
14 |
15 | // Lower
16 | LowerLeft,
17 | LowerCenter,
18 | LowerRight
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UI/UI_Style.cs:
--------------------------------------------------------------------------------
1 | using MelonUnityEngine;
2 | using System;
3 |
4 | namespace MelonLoader.MelonStartScreen.UI
5 | {
6 | internal class UI_Style
7 | {
8 | internal static Objects.UI_Background Background;
9 | internal static Objects.UI_Image LogoImage;
10 | internal static Objects.UI_Image LoadingImage;
11 | internal static Objects.UI_Text VersionText;
12 | internal static Objects.UI_ProgressBar ProgressBar;
13 |
14 | internal static void Init()
15 | {
16 | Background = new Objects.UI_Background(UI_Theme.Instance.Background);
17 | VersionText = new Objects.UI_Text(UI_Theme.Instance.VersionText);
18 | ProgressBar = new Objects.UI_ProgressBar(UI_Theme.Instance.ProgressBar, UI_Theme.Instance.ProgressText);
19 |
20 | if (UI_Theme.Instance.LogoImage.ScanForCustomImage)
21 | LogoImage = UI_Utils.LoadImage(UI_Theme.Instance.LogoImage, "Logo");
22 | if (LogoImage == null)
23 | LogoImage = new Objects.UI_Image(UI_Theme.Instance.LogoImage, UI_Theme.Instance.GetLogoImage());
24 |
25 | if (UI_Theme.Instance.LoadingImage.ScanForCustomImage)
26 | LoadingImage = UI_Utils.LoadImage(UI_Theme.Instance.LoadingImage, "Loading");
27 | if (LoadingImage == null)
28 | LoadingImage = new Objects.UI_AnimatedImage(UI_Theme.Instance.LoadingImage, UI_Theme.Instance.GetLoadingImage());
29 | }
30 |
31 |
32 | internal static void Render()
33 | {
34 | Background.Render();
35 | LogoImage.Render();
36 | LoadingImage.Render();
37 | ProgressBar.Render();
38 | VersionText.Render();
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnhollowerMini/Il2CppException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | #pragma warning disable 0649
4 |
5 | namespace UnhollowerMini
6 | {
7 | internal class Il2CppException : Exception
8 | {
9 | [ThreadStatic] private static byte[] ourMessageBytes;
10 |
11 | public static Func ParseMessageHook;
12 |
13 | public Il2CppException(IntPtr exception) : base(BuildMessage(exception)) { }
14 |
15 | private static unsafe string BuildMessage(IntPtr exception)
16 | {
17 | if (ParseMessageHook != null) return ParseMessageHook(exception);
18 | if (ourMessageBytes == null) ourMessageBytes = new byte[65536];
19 | fixed (byte* message = ourMessageBytes)
20 | UnityInternals.format_exception(exception, message, ourMessageBytes.Length);
21 | string builtMessage = Encoding.UTF8.GetString(ourMessageBytes, 0, Array.IndexOf(ourMessageBytes, (byte)0));
22 | fixed (byte* message = ourMessageBytes)
23 | UnityInternals.format_stack_trace(exception, message, ourMessageBytes.Length);
24 | builtMessage +=
25 | "\n" + Encoding.UTF8.GetString(ourMessageBytes, 0, Array.IndexOf(ourMessageBytes, (byte)0));
26 | return builtMessage;
27 | }
28 |
29 | public static void RaiseExceptionIfNecessary(IntPtr returnedException)
30 | {
31 | if (returnedException == IntPtr.Zero) return;
32 | throw new Il2CppException(returnedException);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnhollowerMini/Il2CppSystem/Byte.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 | using UnhollowerMini;
3 |
4 | namespace Il2CppSystem
5 | {
6 | [StructLayout(LayoutKind.Explicit)]
7 | internal class Byte
8 | {
9 | [FieldOffset(0)]
10 | public byte m_value;
11 |
12 | static Byte()
13 | {
14 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("mscorlib.dll", "System", "Byte");
15 | UnityInternals.runtime_class_init(InternalClassPointerStore.NativeClassPtr);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnhollowerMini/Il2CppSystem/Int32.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 | using UnhollowerMini;
3 |
4 | namespace Il2CppSystem
5 | {
6 | [StructLayout(LayoutKind.Explicit)]
7 | internal class Int32
8 | {
9 | [FieldOffset(0)]
10 | public int m_value;
11 |
12 | static Int32()
13 | {
14 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("mscorlib.dll", "System", "Int32");
15 | UnityInternals.runtime_class_init(InternalClassPointerStore.NativeClassPtr);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnhollowerMini/Il2CppSystem/Type.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader;
2 | using System;
3 | using UnhollowerMini;
4 |
5 | namespace Il2CppSystem
6 | {
7 | internal class Type : InternalObjectBase
8 | {
9 | private static readonly IntPtr m_internal_from_handle;
10 |
11 | static Type()
12 | {
13 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("mscorlib.dll", "System", "Type");
14 |
15 | m_internal_from_handle = UnityInternals.GetMethod(InternalClassPointerStore.NativeClassPtr, "internal_from_handle", "System.Type", "System.IntPtr");
16 | }
17 |
18 | public Type(IntPtr ptr) : base(ptr) { }
19 |
20 | public unsafe static Type internal_from_handle(IntPtr handle)
21 | {
22 | void** args = stackalloc void*[1];
23 | args[0] = &handle;
24 | IntPtr returnedException = default;
25 | IntPtr intPtr = UnityInternals.runtime_invoke(Type.m_internal_from_handle, IntPtr.Zero, (void**)args, ref returnedException);
26 | Il2CppException.RaiseExceptionIfNecessary(returnedException);
27 | return (intPtr != IntPtr.Zero) ? new Type(intPtr) : null;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnhollowerMini/InternalClassPointerStore.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader;
2 | using System;
3 | using System.Runtime.CompilerServices;
4 | #pragma warning disable 0649
5 |
6 | namespace UnhollowerMini
7 | {
8 | internal static class InternalClassPointerStore
9 | {
10 | public static IntPtr NativeClassPtr;
11 | public static Type CreatedTypeRedirect;
12 |
13 | static InternalClassPointerStore()
14 | {
15 | var targetType = typeof(T);
16 |
17 | RuntimeHelpers.RunClassConstructor(targetType.TypeHandle);
18 |
19 | if (targetType.IsPrimitive || targetType == typeof(string))
20 | {
21 | MelonDebug.Msg("Running class constructor on Il2Cpp" + targetType.FullName);
22 | RuntimeHelpers.RunClassConstructor(typeof(InternalClassPointerStore<>).Assembly.GetType("Il2Cpp" + targetType.FullName).TypeHandle);
23 | MelonDebug.Msg("Done running class constructor");
24 | }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnhollowerMini/InternalObjectBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UnhollowerMini
4 | {
5 | internal class InternalObjectBase
6 | {
7 | public IntPtr Pointer
8 | {
9 | get
10 | {
11 | var handleTarget = UnityInternals.gchandle_get_target(myGcHandle);
12 | if (handleTarget == IntPtr.Zero) throw new ObjectCollectedException("Object was garbage collected");
13 | return handleTarget;
14 | }
15 | }
16 |
17 | protected uint myGcHandle;
18 |
19 | protected InternalObjectBase() { }
20 |
21 | public InternalObjectBase(IntPtr pointer)
22 | {
23 | if (pointer == IntPtr.Zero)
24 | throw new NullReferenceException();
25 |
26 | myGcHandle = UnityInternals.gchandle_new(pointer, false);
27 | }
28 |
29 | ~InternalObjectBase()
30 | {
31 | UnityInternals.gchandle_free(myGcHandle);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnhollowerMini/InternalType.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader;
2 | using System;
3 |
4 | namespace UnhollowerMini
5 | {
6 | internal static class InternalType
7 | {
8 | public static Il2CppSystem.Type TypeFromPointer(IntPtr classPointer, string typeName = "")
9 | {
10 | if (classPointer == IntPtr.Zero) throw new ArgumentException($"{typeName} does not have a corresponding internal class pointer");
11 | var il2CppType = UnityInternals.class_get_type(classPointer);
12 | if (il2CppType == IntPtr.Zero) throw new ArgumentException($"{typeName} does not have a corresponding class type pointer");
13 | return Il2CppSystem.Type.internal_from_handle(il2CppType);
14 | }
15 |
16 | public static Il2CppSystem.Type Of()
17 | {
18 | var classPointer = InternalClassPointerStore.NativeClassPtr;
19 | return TypeFromPointer(classPointer, typeof(T).Name);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnhollowerMini/ObjectCollectedException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UnhollowerMini
4 | {
5 | internal class ObjectCollectedException : Exception
6 | {
7 | public ObjectCollectedException(string message) : base(message) { }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/Color.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using UnhollowerMini;
4 |
5 | namespace MelonUnityEngine
6 | {
7 | [StructLayout(LayoutKind.Explicit)]
8 | internal struct Color
9 | {
10 | private static readonly IntPtr m_ToString;
11 |
12 | [FieldOffset(0)]
13 | public float r;
14 | [FieldOffset(4)]
15 | public float g;
16 | [FieldOffset(8)]
17 | public float b;
18 | [FieldOffset(12)]
19 | public float a;
20 |
21 | static Color()
22 | {
23 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.CoreModule.dll", "UnityEngine", "Color");
24 | UnityInternals.runtime_class_init(InternalClassPointerStore.NativeClassPtr);
25 | m_ToString = UnityInternals.GetMethod(InternalClassPointerStore.NativeClassPtr, "ToString", "System.String");
26 | }
27 |
28 | public Color(float r, float g, float b, float a = 1f)
29 | {
30 | this.r = r;
31 | this.g = g;
32 | this.b = b;
33 | this.a = a;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/Color32.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using UnhollowerMini;
4 |
5 | namespace MelonUnityEngine
6 | {
7 | [StructLayout(LayoutKind.Explicit)]
8 | internal struct Color32
9 | {
10 | [FieldOffset(0)]
11 | public byte r;
12 | [FieldOffset(1)]
13 | public byte g;
14 | [FieldOffset(2)]
15 | public byte b;
16 | [FieldOffset(3)]
17 | public byte a;
18 |
19 | [FieldOffset(0)]
20 | public int rgba;
21 |
22 | static Color32()
23 | {
24 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.CoreModule.dll", "UnityEngine", "Color32");
25 | UnityInternals.runtime_class_init(InternalClassPointerStore.NativeClassPtr);
26 | }
27 |
28 | public Color32(byte r, byte g, byte b, byte a)
29 | {
30 | this.rgba = 0;
31 | this.r = r;
32 | this.g = g;
33 | this.b = b;
34 | this.a = a;
35 | }
36 |
37 | public static implicit operator Color(Color32 c)
38 | {
39 | return new Color(c.r / 255f, c.g / 255f, c.b / 255f, c.a / 255f);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/FilterMode.cs:
--------------------------------------------------------------------------------
1 | namespace MelonUnityEngine
2 | {
3 | internal enum FilterMode
4 | {
5 | Point,
6 | Bilinear,
7 | Trilinear
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/GL.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnhollowerMini;
3 |
4 | namespace MelonUnityEngine
5 | {
6 | internal sealed class GL
7 | {
8 | private delegate bool d_get_sRGBWrite();
9 | private static readonly d_get_sRGBWrite m_get_sRGBWrite;
10 |
11 | unsafe static GL()
12 | {
13 | m_get_sRGBWrite = UnityInternals.ResolveICall("UnityEngine.GL::get_sRGBWrite");
14 | }
15 |
16 | public unsafe static bool sRGBWrite
17 | {
18 | get => m_get_sRGBWrite();
19 | // set
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/HideFlags.cs:
--------------------------------------------------------------------------------
1 | namespace MelonUnityEngine
2 | {
3 | internal enum HideFlags
4 | {
5 | None = 0,
6 | HideInHierarchy = 1,
7 | HideInInspector = 2,
8 | DontSaveInEditor = 4,
9 | NotEditable = 8,
10 | DontSaveInBuild = 16,
11 | DontUnloadUnusedAsset = 32,
12 | DontSave = 52,
13 | HideAndDontSave = 61
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/ImageConversion.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader;
2 | using System;
3 | using System.Runtime.InteropServices;
4 | using UnhollowerMini;
5 |
6 | namespace MelonUnityEngine
7 | {
8 | internal static class ImageConversion
9 | {
10 | private delegate bool ImageConversion_LoadImage_Delegate(IntPtr tex, IntPtr data, bool markNonReadable);
11 | private static ImageConversion_LoadImage_Delegate ImageConversion_LoadImage;
12 |
13 | static ImageConversion()
14 | {
15 | IntPtr ptr = UnityInternals.ResolveICall("UnityEngine.ImageConversion::LoadImage(UnityEngine.Texture2D,System.Byte[],System.Boolean)");
16 | if (ptr != IntPtr.Zero)
17 | ImageConversion_LoadImage = (ImageConversion_LoadImage_Delegate)Marshal.GetDelegateForFunctionPointer(ptr, typeof(ImageConversion_LoadImage_Delegate));
18 | else
19 | MelonLogger.Error("Failed to resolve icall UnityEngine.ImageConversion::LoadImage(UnityEngine.Texture2D,System.Byte[],System.Boolean)");
20 | }
21 |
22 | public unsafe static bool LoadImage(Texture2D tex, byte[] data, bool markNonReadable)
23 | {
24 | if (ImageConversion_LoadImage == null)
25 | {
26 | MelonLogger.Error("Failed to run UnityEngine.ImageConversion::LoadImage(UnityEngine.Texture2D,System.Byte[],System.Boolean)");
27 | return false;
28 | }
29 |
30 | IntPtr dataPtr = UnityInternals.array_new(InternalClassPointerStore.NativeClassPtr, (uint)data.Length);
31 | for (var i = 0; i < data.Length; i++)
32 | {
33 | IntPtr arrayStartPointer = (IntPtr)((long)dataPtr + 4 * IntPtr.Size);
34 | ((byte*)arrayStartPointer.ToPointer())[i] = data[i];
35 | }
36 |
37 | return ImageConversion_LoadImage(tex.Pointer, dataPtr, markNonReadable);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/Material.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnhollowerMini;
3 |
4 | namespace MelonUnityEngine
5 | {
6 | internal class Material : UnityObject
7 | {
8 | private delegate bool d_SetPass(IntPtr @this, int pass);
9 | private static readonly d_SetPass m_SetPass;
10 |
11 | unsafe static Material()
12 | {
13 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.CoreModule.dll", "UnityEngine", "Material");
14 | UnityInternals.runtime_class_init(InternalClassPointerStore.NativeClassPtr);
15 |
16 | //m_SetPass = UnityInternals.GetMethod(InternalClassPointerStore.NativeClassPtr, "SetPass", "System.Boolean", "System.Int32");
17 | m_SetPass = UnityInternals.ResolveICall("UnityEngine.Material::SetPass");
18 | }
19 |
20 | public Material(IntPtr ptr) : base(ptr) { }
21 |
22 | public unsafe bool SetPass(int pass)
23 | {
24 | return m_SetPass(UnityInternals.ObjectBaseToPtrNotNull(this), pass);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/Quaternion.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 | using UnhollowerMini;
3 |
4 | namespace MelonUnityEngine
5 | {
6 | [StructLayout(LayoutKind.Explicit)]
7 | internal struct Quaternion
8 | {
9 | [FieldOffset(0)]
10 | public float x;
11 | [FieldOffset(4)]
12 | public float y;
13 | [FieldOffset(8)]
14 | public float z;
15 | [FieldOffset(12)]
16 | public float w;
17 |
18 | static Quaternion()
19 | {
20 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.CoreModule.dll", "UnityEngine", "Quaternion");
21 | }
22 |
23 | public static Quaternion identity => new Quaternion();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/Rect.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 | using UnhollowerMini;
3 |
4 | namespace MelonUnityEngine
5 | {
6 | [StructLayout(LayoutKind.Explicit)]
7 | internal struct Rect
8 | {
9 | [FieldOffset(0)]
10 | public float m_XMin;
11 | [FieldOffset(4)]
12 | public float m_YMin;
13 | [FieldOffset(8)]
14 | public float m_Width;
15 | [FieldOffset(12)]
16 | public float m_Height;
17 |
18 | static Rect()
19 | {
20 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.CoreModule.dll", "UnityEngine", "Rect");
21 | UnityInternals.runtime_class_init(InternalClassPointerStore.NativeClassPtr);
22 | }
23 |
24 | public Rect(int x, int y, int width, int height)
25 | {
26 | m_XMin = x;
27 | m_YMin = y;
28 | m_Width = width;
29 | m_Height = height;
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/Resources.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader;
2 | using System;
3 | using System.Runtime.InteropServices;
4 | using UnhollowerMini;
5 |
6 | namespace MelonUnityEngine
7 | {
8 | internal class Resources
9 | {
10 | private static readonly IntPtr m_GetBuiltinResource;
11 |
12 | static Resources()
13 | {
14 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.CoreModule.dll", "UnityEngine", "Resources");
15 | //UnityInternals.runtime_class_init(InternalClassPointerStore.NativeClassPtr);
16 |
17 | m_GetBuiltinResource = UnityInternals.GetMethod(InternalClassPointerStore.NativeClassPtr, "GetBuiltinResource", "UnityEngine.Object", "System.Type", "System.String");
18 |
19 | }
20 |
21 | public unsafe static IntPtr GetBuiltinResource(Il2CppSystem.Type type, string path)
22 | {
23 | void** ptr = stackalloc void*[2];
24 | ptr[0] = (void*)UnityInternals.ObjectBaseToPtr(type);
25 | ptr[1] = (void*)UnityInternals.ManagedStringToInternal(path);
26 | IntPtr returnedException = default;
27 | MelonDebug.Msg("Calling runtime_invoke for GetBuiltinResource");
28 | IntPtr objectPointer = UnityInternals.runtime_invoke(m_GetBuiltinResource, IntPtr.Zero, ptr, ref returnedException);
29 | MelonDebug.Msg("returnedException: " + returnedException + ", objectPointer: " + objectPointer);
30 | Il2CppException.RaiseExceptionIfNecessary(returnedException);
31 | return objectPointer;
32 | }
33 |
34 | public static T GetBuiltinResource(string path) where T : InternalObjectBase
35 | {
36 | MelonDebug.Msg("GetBuiltinResource");
37 | IntPtr ptr = GetBuiltinResource(InternalType.Of(), path);
38 | return ptr != IntPtr.Zero ? (T)typeof(T).GetConstructor(new[] { typeof(IntPtr) }).Invoke(new object[] { ptr }) : null;
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/Screen.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnhollowerMini;
3 |
4 | namespace MelonUnityEngine
5 | {
6 | internal class Screen
7 | {
8 | private static IntPtr m_get_width;
9 | private static IntPtr m_get_height;
10 |
11 | static Screen()
12 | {
13 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.CoreModule.dll", "UnityEngine", "Screen");
14 | m_get_width = UnityInternals.GetMethod(InternalClassPointerStore.NativeClassPtr, "get_width", "System.Int32");
15 | m_get_height = UnityInternals.GetMethod(InternalClassPointerStore.NativeClassPtr, "get_height", "System.Int32");
16 | }
17 |
18 | public unsafe static int width
19 | {
20 | get
21 | {
22 | IntPtr* param = null;
23 | IntPtr returnedException = IntPtr.Zero;
24 | IntPtr intPtr = UnityInternals.runtime_invoke(m_get_width, IntPtr.Zero, (void**)param, ref returnedException);
25 | Il2CppException.RaiseExceptionIfNecessary(returnedException);
26 | return *(int*)UnityInternals.object_unbox(intPtr);
27 | }
28 | }
29 |
30 | public unsafe static int height
31 | {
32 | get
33 | {
34 | IntPtr* param = null;
35 | IntPtr returnedException = IntPtr.Zero;
36 | IntPtr intPtr = UnityInternals.runtime_invoke(m_get_height, IntPtr.Zero, (void**)param, ref returnedException);
37 | Il2CppException.RaiseExceptionIfNecessary(returnedException);
38 | return *(int*)UnityInternals.object_unbox(intPtr);
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/SystemInfo.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader;
2 | using MelonLoader.MelonStartScreen.NativeUtils;
3 | using UnhollowerMini;
4 |
5 | namespace MelonUnityEngine.CoreModule
6 | {
7 | internal sealed class SystemInfo
8 | {
9 | private delegate uint d_GetGraphicsDeviceType();
10 | private static readonly d_GetGraphicsDeviceType m_GetGraphicsDeviceType;
11 |
12 | unsafe static SystemInfo()
13 | {
14 | if (NativeSignatureResolver.IsUnityVersionOverOrEqual(MelonLoader.InternalUtils.UnityInformationHandler.EngineVersion.ToStringWithoutType(), new string[] { "2018.1.0" }))
15 | m_GetGraphicsDeviceType = UnityInternals.ResolveICall("UnityEngine.SystemInfo::GetGraphicsDeviceType");
16 | else
17 | m_GetGraphicsDeviceType = UnityInternals.ResolveICall("UnityEngine.SystemInfo::get_graphicsDeviceType");
18 | }
19 |
20 | public static uint GetGraphicsDeviceType() =>
21 | m_GetGraphicsDeviceType();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/UnityDebug.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader;
2 | using System;
3 | using System.Runtime.InteropServices;
4 | using UnhollowerMini;
5 |
6 | namespace MelonUnityEngine
7 | {
8 | internal static class UnityDebug
9 | {
10 | private delegate bool get_isDebugBuild_Delegate();
11 | private static get_isDebugBuild_Delegate get_isDebugBuild_Ptr;
12 |
13 | static UnityDebug()
14 | {
15 | IntPtr ptr = UnityInternals.ResolveICall("UnityEngine.Debug::get_isDebugBuild");
16 | if (ptr != IntPtr.Zero)
17 | get_isDebugBuild_Ptr = (get_isDebugBuild_Delegate)Marshal.GetDelegateForFunctionPointer(ptr, typeof(get_isDebugBuild_Delegate));
18 | else
19 | MelonLogger.Error("Failed to resolve icall UnityEngine.Debug::get_isDebugBuild");
20 | }
21 |
22 | internal static bool isDebugBuild { get => get_isDebugBuild_Ptr(); }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/Vector2.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 | using UnhollowerMini;
3 |
4 | namespace MelonUnityEngine
5 | {
6 | [StructLayout(LayoutKind.Explicit)]
7 | internal struct Vector2
8 | {
9 | [FieldOffset(0)]
10 | public float x;
11 | [FieldOffset(4)]
12 | public float y;
13 |
14 | static Vector2()
15 | {
16 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.CoreModule.dll", "UnityEngine", "Vector2");
17 | }
18 |
19 | public Vector2(float x, float y)
20 | {
21 | this.x = x;
22 | this.y = y;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/Vector3.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 | using UnhollowerMini;
3 |
4 | namespace MelonUnityEngine
5 | {
6 | [StructLayout(LayoutKind.Explicit)]
7 | internal struct Vector3
8 | {
9 | [FieldOffset(0)]
10 | public float x;
11 | [FieldOffset(4)]
12 | public float y;
13 | [FieldOffset(8)]
14 | public float z;
15 |
16 | static Vector3()
17 | {
18 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.CoreModule.dll", "UnityEngine", "Vector3");
19 | }
20 |
21 | public static Vector3 zero => new Vector3();
22 |
23 | public Vector3(float x, float y, float z)
24 | {
25 | this.x = x;
26 | this.y = y;
27 | this.z = z;
28 | }
29 |
30 | public static Vector3 operator*(Vector3 a, float d)
31 | {
32 | return new Vector3(a.x * d, a.y * d, a.z * d);
33 | }
34 |
35 | public override string ToString()
36 | {
37 | return $"{x} {y} {z}";
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/Vector4.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 | using UnhollowerMini;
3 |
4 | namespace MelonUnityEngine
5 | {
6 | [StructLayout(LayoutKind.Explicit)]
7 | internal struct Vector4
8 | {
9 | [FieldOffset(0)]
10 | public float x;
11 | [FieldOffset(4)]
12 | public float y;
13 | [FieldOffset(8)]
14 | public float z;
15 | [FieldOffset(12)]
16 | public float w;
17 |
18 | static Vector4()
19 | {
20 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.CoreModule.dll", "UnityEngine", "Vector4");
21 | }
22 |
23 | public static explicit operator Vector2(Vector4 src) => new Vector2(src.x, src.y);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/VertexAttribute.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader.MelonStartScreen.NativeUtils;
2 |
3 | namespace MelonUnityEngine.Rendering
4 | {
5 | static class VertexAttribute
6 | {
7 | public static int Vertex = 0;
8 | public static int Normal = 1;
9 |
10 | [NativeFieldValue(01, NativeSignatureFlags.None, 7, "2017.1.0")]
11 | [NativeFieldValue(02, NativeSignatureFlags.None, 2, "2018.1.0")]
12 | public static int Tangent = 0;
13 |
14 | [NativeFieldValue(01, NativeSignatureFlags.None, 2, "2017.1.0")]
15 | [NativeFieldValue(02, NativeSignatureFlags.None, 3, "2018.1.0")]
16 | public static int Color = 0;
17 |
18 | [NativeFieldValue(01, NativeSignatureFlags.None, 3, "2017.1.0")]
19 | [NativeFieldValue(02, NativeSignatureFlags.None, 4, "2018.1.0")]
20 | public static int TexCoord0 = 0;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/CoreModule/VerticalWrapMode.cs:
--------------------------------------------------------------------------------
1 | namespace MelonUnityEngine
2 | {
3 | internal enum VerticalWrapMode
4 | {
5 | Truncate,
6 | Overflow
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/TextRenderingModule/Font.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnhollowerMini;
3 |
4 | namespace MelonUnityEngine
5 | {
6 | internal class Font : UnityObject
7 | {
8 | private static IntPtr m_get_material;
9 |
10 | static Font()
11 | {
12 | InternalClassPointerStore.NativeClassPtr = UnityInternals.GetClass("UnityEngine.TextRenderingModule.dll", "UnityEngine", "Font");
13 | UnityInternals.runtime_class_init(InternalClassPointerStore.NativeClassPtr);
14 |
15 | m_get_material = UnityInternals.GetMethod(InternalClassPointerStore.NativeClassPtr, "get_material", "UnityEngine.Material");
16 | }
17 |
18 | public Font(IntPtr ptr) : base(ptr) { }
19 |
20 | public unsafe Material material
21 | {
22 | get
23 | {
24 | UnityInternals.ObjectBaseToPtrNotNull(this);
25 | IntPtr returnedException = default;
26 | IntPtr intPtr = UnityInternals.runtime_invoke(Font.m_get_material, UnityInternals.ObjectBaseToPtrNotNull(this), (void**)0, ref returnedException);
27 | Il2CppException.RaiseExceptionIfNecessary(returnedException);
28 | return (intPtr != IntPtr.Zero) ? new Material(intPtr) : null;
29 | }
30 | // set
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/TextRenderingModule/FontStyle.cs:
--------------------------------------------------------------------------------
1 | namespace MelonUnityEngine
2 | {
3 | internal enum FontStyle
4 | {
5 | Normal,
6 | Bold,
7 | Italic,
8 | BoldAndItalic
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/UnityEngine/TextRenderingModule/TextAnchor.cs:
--------------------------------------------------------------------------------
1 | namespace MelonUnityEngine
2 | {
3 | internal enum TextAnchor
4 | {
5 | UpperLeft,
6 | UpperCenter,
7 | UpperRight,
8 | MiddleLeft,
9 | MiddleCenter,
10 | MiddleRight,
11 | LowerLeft,
12 | LowerCenter,
13 | LowerRight
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/Windows/DropFile.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | namespace Windows
4 | {
5 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
6 | class DropFile
7 | {
8 | uint pFiles = 14;
9 | public Point pt;
10 | public bool fNC;
11 | bool fWide = true;
12 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 300)] // Max path size on windows is 260
13 | public string file = "";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/Windows/Msg.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace Windows
5 | {
6 | [StructLayout(LayoutKind.Sequential)]
7 | internal struct Msg
8 | {
9 | public IntPtr hwnd;
10 | public WindowMessage message;
11 | public IntPtr wParam;
12 | public IntPtr lParam;
13 | public uint time;
14 | public Point pt;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/Windows/Point.cs:
--------------------------------------------------------------------------------
1 | namespace Windows
2 | {
3 | internal struct Point
4 | {
5 | public int x;
6 | public int y;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/Windows/User32.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace Windows
5 | {
6 | internal static class User32
7 | {
8 | [DllImport("user32.dll")]
9 | public static extern bool PeekMessage(out Msg lpMsg, IntPtr hWnd, uint wMsgFilterMin, uint wMsgFilterMax, uint wRemoveMsg);
10 |
11 | [DllImport("user32.dll")]
12 | public static extern bool TranslateMessage([In] ref Msg lpMsg);
13 |
14 | [DllImport("user32.dll")]
15 | public static extern IntPtr DispatchMessage([In] ref Msg lpmsg);
16 |
17 | [DllImport("user32.dll", SetLastError = false)]
18 | public static extern IntPtr GetMessageExtraInfo();
19 |
20 | [DllImport("user32.dll", ExactSpelling = true)]
21 | public static extern IntPtr SetTimer(IntPtr hWnd, IntPtr nIDEvent, uint uElapse, TimerProc lpTimerFunc);
22 | public delegate void TimerProc(IntPtr hWnd, uint uMsg, IntPtr nIDEvent, uint dwTime);
23 |
24 | [DllImport("user32.dll", ExactSpelling = true)]
25 | public static extern bool KillTimer(IntPtr hWnd, IntPtr uIDEvent);
26 |
27 | [DllImport("user32.dll")]
28 | public static extern IntPtr SetClipboardData(uint uFormat, ref DropFile hMem);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/mgGif/Image.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using MelonUnityEngine;
3 |
4 | namespace mgGif
5 | {
6 | internal class Image : ICloneable
7 | {
8 | public int Width;
9 | public int Height;
10 | public int Delay; // milliseconds
11 | public Color32[] RawImage;
12 |
13 | public Image() { }
14 |
15 | public Image(Image img)
16 | {
17 | Width = img.Width;
18 | Height = img.Height;
19 | Delay = img.Delay;
20 | RawImage = img.RawImage != null ? (Color32[])img.RawImage.Clone() : null;
21 | }
22 |
23 | public object Clone() => new Image(this);
24 |
25 | public Texture2D CreateTexture(FilterMode filterMode = FilterMode.Bilinear)
26 | {
27 | var tex = new Texture2D(Width, Height);
28 | tex.filterMode = filterMode;
29 |
30 | Color[] colors = new Color[RawImage.Length];
31 | for (int i = 0; i < colors.Length; i++)
32 | colors[i] = RawImage[i];
33 |
34 | tex.SetPixels(colors);
35 | tex.Apply();
36 |
37 | return tex;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Dependencies/MelonStartScreen/mgGif/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Gwaredd Mountain
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Dependencies/SupportModules/Il2Cpp/Libs/Il2CppSystem.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/Dependencies/SupportModules/Il2Cpp/Libs/Il2CppSystem.dll
--------------------------------------------------------------------------------
/Dependencies/SupportModules/Il2Cpp/Libs/Il2Cppmscorlib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/Dependencies/SupportModules/Il2Cpp/Libs/Il2Cppmscorlib.dll
--------------------------------------------------------------------------------
/Dependencies/SupportModules/Il2Cpp/Libs/UnityEngine.CoreModule.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/Dependencies/SupportModules/Il2Cpp/Libs/UnityEngine.CoreModule.dll
--------------------------------------------------------------------------------
/Dependencies/SupportModules/Mono/Libs/UnityEngine.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/Dependencies/SupportModules/Mono/Libs/UnityEngine.dll
--------------------------------------------------------------------------------
/Dependencies/SupportModules/Mono/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using MelonLoader.Support.Preferences;
4 | using UnityEngine;
5 |
6 | [assembly: MelonLoader.PatchShield]
7 |
8 | namespace MelonLoader.Support
9 | {
10 | internal static class Main
11 | {
12 | internal static ISupportModule_From Interface = null;
13 | internal static GameObject obj = null;
14 | internal static SM_Component component = null;
15 |
16 | private static ISupportModule_To Initialize(ISupportModule_From interface_from)
17 | {
18 | Interface = interface_from;
19 | UnityMappers.RegisterMappers();
20 |
21 | if (IsUnity53OrLower())
22 | SM_Component.Create();
23 | else
24 | SceneHandler.Init();
25 |
26 | return new SupportModule_To();
27 | }
28 |
29 | private static bool IsUnity53OrLower()
30 | {
31 | try
32 | {
33 | Assembly unityengine = Assembly.Load("UnityEngine");
34 | if (unityengine == null)
35 | return true;
36 | Type scenemanager = unityengine.GetType("UnityEngine.SceneManagement.SceneManager");
37 | if (scenemanager == null)
38 | return true;
39 | EventInfo sceneLoaded = scenemanager.GetEvent("sceneLoaded");
40 | if (sceneLoaded == null)
41 | return true;
42 | return false;
43 | }
44 | catch { return true; }
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/Dependencies/SupportModules/Mono/Mono.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | MelonLoader.Support
4 | net35
5 | true
6 | $(MLOutDir)/MelonLoader/Dependencies/SupportModules
7 | true
8 | portable
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Dependencies/SupportModules/SupportModule_To.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | namespace MelonLoader.Support
6 | {
7 | internal class SupportModule_To : ISupportModule_To
8 | {
9 | internal static readonly List QueuedCoroutines = new List();
10 | public object StartCoroutine(IEnumerator coroutine)
11 | {
12 | if (Main.component != null)
13 | #if SM_Il2Cpp
14 | return Main.component.StartCoroutine(new Il2CppSystem.Collections.IEnumerator(new MonoEnumeratorWrapper(coroutine).Pointer));
15 | #else
16 | return Main.component.StartCoroutine(coroutine);
17 | #endif
18 | QueuedCoroutines.Add(coroutine);
19 | return coroutine;
20 | }
21 | public void StopCoroutine(object coroutineToken)
22 | {
23 | if (Main.component == null)
24 | QueuedCoroutines.Remove(coroutineToken as IEnumerator);
25 | else
26 | Main.component.StopCoroutine(coroutineToken as Coroutine);
27 | }
28 | public void UnityDebugLog(string msg) => Debug.Log(msg);
29 | }
30 | }
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Deps/linux-bionic-arm64/libdobby.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/MelonLoader.Bootstrap/Deps/linux-bionic-arm64/libdobby.a
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Deps/linux-bionic-arm64/libplthook.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/MelonLoader.Bootstrap/Deps/linux-bionic-arm64/libplthook.a
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Deps/linux-x64/libdobby.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/MelonLoader.Bootstrap/Deps/linux-x64/libdobby.a
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Deps/linux-x64/libplthook.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/MelonLoader.Bootstrap/Deps/linux-x64/libplthook.a
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Deps/osx-x64/libdobby.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/MelonLoader.Bootstrap/Deps/osx-x64/libdobby.a
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Deps/osx-x64/libplthook.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/MelonLoader.Bootstrap/Deps/osx-x64/libplthook.a
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Deps/win-x64/dobby.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/MelonLoader.Bootstrap/Deps/win-x64/dobby.lib
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Deps/win-x64/plthook.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/MelonLoader.Bootstrap/Deps/win-x64/plthook.lib
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Deps/win-x86/dobby.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/MelonLoader.Bootstrap/Deps/win-x86/dobby.lib
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Deps/win-x86/plthook.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LemonLoader/MelonLoader/7b14dac3281fe9a88a1b8f0c96f5b9a46f558cdf/MelonLoader.Bootstrap/Deps/win-x86/plthook.lib
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/InternalLogger.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader.Bootstrap.Logging;
2 | using MelonLoader.Logging;
3 |
4 | namespace MelonLoader.Bootstrap;
5 |
6 | internal class InternalLogger(ColorARGB sectionColor, string sectionName)
7 | {
8 | public void Msg(string msg)
9 | {
10 | MelonLogger.Log(ColorARGB.LightGray, msg, sectionColor, sectionName);
11 | }
12 |
13 | public void Error(string msg)
14 | {
15 | MelonLogger.LogError(msg, sectionName);
16 | }
17 |
18 | public void Warning(string msg)
19 | {
20 | MelonLogger.LogWarning(msg, sectionName);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Logging/PastelExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 | using MelonLoader.Logging;
3 | using Pastel;
4 |
5 | namespace MelonLoader.Bootstrap.Logging;
6 |
7 | internal static class PastelExtensions
8 | {
9 | private static string _colorReset = new ReadOnlySpan().Pastel(Color.FromArgb(255, 211, 211, 211));
10 |
11 | internal static string Pastel(this string input, ColorARGB color)
12 | {
13 | return input.AsSpan().Pastel(color);
14 | }
15 |
16 | internal static string Pastel(in this ReadOnlySpan input, ColorARGB color)
17 | {
18 | // TODO: loader config option to disable color
19 | return input.Pastel(Color.FromArgb(color.R, color.G, color.B)) + _colorReset;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/MelonDebug.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader.Bootstrap.Logging;
2 | using MelonLoader.Logging;
3 |
4 | namespace MelonLoader.Bootstrap;
5 |
6 | internal static class MelonDebug
7 | {
8 | private static readonly InternalLogger logger = new(ColorARGB.CornflowerBlue, "BS DEBUG");
9 |
10 | public static void Log(string msg)
11 | {
12 | if (!LoaderConfig.Current.Loader.DebugMode)
13 | return;
14 |
15 | logger.Msg(msg);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/OSXEntry/osxentry.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | extern "C"
4 | {
5 | void Init();
6 | }
7 |
8 | #define DYLD_INTERPOSE(_replacement,_replacee) \
9 | __attribute__((used)) static struct{ const void* replacement; const void* replacee; } _interpose_##_replacee \
10 | __attribute__ ((section ("__DATA,__interpose"))) = { (const void*)(unsigned long)&_replacement, (const void*)(unsigned long)&_replacee };
11 |
12 | int SetRlimitHook(int resource, rlimit* rlp)
13 | {
14 | int result = setrlimit(resource, rlp);
15 | Init();
16 | return result;
17 | }
18 |
19 | DYLD_INTERPOSE(SetRlimitHook, setrlimit)
20 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Proxy/Exports/D3D8Exports.cs:
--------------------------------------------------------------------------------
1 | #if WINDOWS
2 | using System.Runtime.InteropServices;
3 |
4 | namespace MelonLoader.Bootstrap.Proxy.Exports;
5 |
6 | internal static class D3D8Exports
7 | {
8 | [UnmanagedCallersOnly(EntryPoint = "ImplDirect3DCreate8")]
9 | public static void ImplDirect3DCreate8() { }
10 | [UnmanagedCallersOnly(EntryPoint = "ImplDirect3D8EnableMaximizedWindowedModeShim")]
11 | public static void ImplDirect3D8EnableMaximizedWindowedModeShim() { }
12 | [UnmanagedCallersOnly(EntryPoint = "ImplValidatePixelShader")]
13 | public static void ImplValidatePixelShader() { }
14 | [UnmanagedCallersOnly(EntryPoint = "ImplValidateVertexShader")]
15 | public static void ImplValidateVertexShader() { }
16 | }
17 | #endif
18 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Proxy/Exports/DInput8Exports.cs:
--------------------------------------------------------------------------------
1 | #if WINDOWS
2 | using System.Runtime.InteropServices;
3 |
4 | namespace MelonLoader.Bootstrap.Proxy.Exports;
5 |
6 | internal static class DInput8Exports
7 | {
8 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectInput8Create")]
9 | public static void ImplDirectInput8Create() { }
10 | }
11 | #endif
12 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Proxy/Exports/DInputExports.cs:
--------------------------------------------------------------------------------
1 | #if WINDOWS
2 | using System.Runtime.InteropServices;
3 |
4 | namespace MelonLoader.Bootstrap.Proxy.Exports;
5 |
6 | internal static class DInputExports
7 | {
8 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectInputCreateA")]
9 | public static void ImplDirectInputCreateA() { }
10 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectInputCreateEx")]
11 | public static void ImplDirectInputCreateEx() { }
12 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectInputCreateW")]
13 | public static void ImplDirectInputCreateW() { }
14 | }
15 | #endif
16 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Proxy/Exports/DSoundExports.cs:
--------------------------------------------------------------------------------
1 | #if WINDOWS
2 | using System.Runtime.InteropServices;
3 |
4 | namespace MelonLoader.Bootstrap.Proxy.Exports;
5 |
6 | internal static class DSoundExports
7 | {
8 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectSoundCaptureCreate")]
9 | public static void ImplDirectSoundCaptureCreate() { }
10 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectSoundCaptureCreate8")]
11 | public static void ImplDirectSoundCaptureCreate8() { }
12 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectSoundCaptureEnumerateA")]
13 | public static void ImplDirectSoundCaptureEnumerateA() { }
14 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectSoundCaptureEnumerateW")]
15 | public static void ImplDirectSoundCaptureEnumerateW() { }
16 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectSoundCreate")]
17 | public static void ImplDirectSoundCreate() { }
18 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectSoundCreate8")]
19 | public static void ImplDirectSoundCreate8() { }
20 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectSoundEnumerateA")]
21 | public static void ImplDirectSoundEnumerateA() { }
22 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectSoundEnumerateW")]
23 | public static void ImplDirectSoundEnumerateW() { }
24 | [UnmanagedCallersOnly(EntryPoint = "ImplDirectSoundFullDuplexCreate")]
25 | public static void ImplDirectSoundFullDuplexCreate() { }
26 | }
27 | #endif
28 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Proxy/Exports/SharedExports.cs:
--------------------------------------------------------------------------------
1 | #if WINDOWS
2 | using System.Runtime.InteropServices;
3 |
4 | namespace MelonLoader.Bootstrap.Proxy.Exports;
5 |
6 | internal static class SharedExports
7 | {
8 | [UnmanagedCallersOnly(EntryPoint = "ImplDllCanUnloadNow")]
9 | public static void ImplDllCanUnloadNow() { }
10 | [UnmanagedCallersOnly(EntryPoint = "ImplDllGetClassObject")]
11 | public static void ImplDllGetClassObject() { }
12 | [UnmanagedCallersOnly(EntryPoint = "ImplDllRegisterServer")]
13 | public static void ImplDllRegisterServer() { }
14 | [UnmanagedCallersOnly(EntryPoint = "ImplDllUnregisterServer")]
15 | public static void ImplDllUnregisterServer() { }
16 | [UnmanagedCallersOnly(EntryPoint = "ImplPrivate1")]
17 | public static void ImplPrivate1() { }
18 | [UnmanagedCallersOnly(EntryPoint = "ImplDebugSetMute")]
19 | public static void ImplDebugSetMute() { }
20 | [UnmanagedCallersOnly(EntryPoint = "ImplDebugSetLevel")]
21 | public static void ImplDebugSetLevel() { }
22 | [UnmanagedCallersOnly(EntryPoint = "ImplGetDeviceID")]
23 | public static void ImplGetDeviceID() { }
24 | }
25 | #endif
26 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/SharedDelegates.cs:
--------------------------------------------------------------------------------
1 | using MelonLoader.Logging;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace MelonLoader.Bootstrap;
5 |
6 | [UnmanagedFunctionPointer(CallingConvention.StdCall)]
7 | internal unsafe delegate void NativeHookFn(nint* target, nint detour);
8 |
9 | [UnmanagedFunctionPointer(CallingConvention.StdCall, CharSet = CharSet.Unicode)]
10 | internal unsafe delegate void LogMsgFn(ColorARGB* msgColor, string msg, int msgLength, ColorARGB* sectionColor, string section, int sectionLength);
11 |
12 | [UnmanagedFunctionPointer(CallingConvention.StdCall, CharSet = CharSet.Unicode)]
13 | internal unsafe delegate void LogErrorFn(string msg, int msgLength, string section, int sectionLength, bool warning);
14 |
15 | [UnmanagedFunctionPointer(CallingConvention.StdCall, CharSet = CharSet.Unicode)]
16 | internal unsafe delegate void LogMelonInfoFn(ColorARGB* nameColor, string name, int nameLength, string info, int infoLength);
17 |
18 | [UnmanagedFunctionPointer(CallingConvention.StdCall)]
19 | internal delegate nint PtrRetFn();
20 |
21 | [UnmanagedFunctionPointer(CallingConvention.StdCall)]
22 | internal delegate nint CastManagedAssemblyPtrFn(nint ptr);
23 |
24 | [UnmanagedFunctionPointer(CallingConvention.StdCall)]
25 | internal delegate void ActionFn();
26 |
27 | [UnmanagedFunctionPointer(CallingConvention.StdCall)]
28 | [return: MarshalAs(UnmanagedType.U1)]
29 | internal delegate bool BoolRetFn();
30 |
31 | [UnmanagedFunctionPointer(CallingConvention.StdCall)]
32 | internal delegate void GetLoaderConfigFn(ref LoaderConfig config);
33 |
34 | #if ANDROID
35 | [UnmanagedFunctionPointer(CallingConvention.StdCall)]
36 | internal delegate System.IntPtr GetJavaVM();
37 | #endif
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/TrimmerRoots.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Utils/ArgParser.cs:
--------------------------------------------------------------------------------
1 | namespace MelonLoader.Bootstrap.Utils;
2 |
3 | internal static class ArgParser
4 | {
5 | private static readonly List arguments;
6 |
7 | static ArgParser()
8 | {
9 | arguments = [];
10 |
11 | var args = Environment.GetCommandLineArgs();
12 |
13 | for (var i = 1; i < args.Length; i++)
14 | {
15 | var arg = args[i];
16 |
17 | if (arg.StartsWith("--"))
18 | {
19 | arg = arg[2..];
20 | }
21 | else if (arg.StartsWith('-'))
22 | {
23 | arg = arg[1..];
24 | }
25 | else
26 | {
27 | continue;
28 | }
29 |
30 | string? value = null;
31 |
32 | var eqIdx = arg.IndexOf('=');
33 | if (eqIdx >= 0)
34 | {
35 | value = arg[(eqIdx + 1)..];
36 | arg = arg[..eqIdx];
37 | }
38 | else if (i + 1 < args.Length)
39 | {
40 | var next = args[i + 1];
41 |
42 | if (!next.StartsWith('-'))
43 | {
44 | value = next;
45 | i++;
46 | }
47 | }
48 |
49 | arguments.Add(new()
50 | {
51 | Name = arg,
52 | Value = value
53 | });
54 | }
55 | }
56 |
57 | public static bool IsDefined(string longName)
58 | {
59 | return arguments.Exists(x => x.Name.Equals(longName, StringComparison.OrdinalIgnoreCase));
60 | }
61 |
62 | public static string? GetValue(string longName)
63 | {
64 | var arg = arguments.Find(x => x.Name.Equals(longName, StringComparison.OrdinalIgnoreCase));
65 |
66 | return arg?.Value;
67 | }
68 |
69 | private class Argument
70 | {
71 | public required string Name { get; init; }
72 | public string? Value { get; init; }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Utils/NativeFunc.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics.CodeAnalysis;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace MelonLoader.Bootstrap.Utils;
5 |
6 | internal static class NativeFunc
7 | {
8 | public static T? GetExport(nint hModule, string name) where T : Delegate
9 | {
10 | return !NativeLibrary.TryGetExport(hModule, name, out var export) ? null : Marshal.GetDelegateForFunctionPointer(export);
11 | }
12 |
13 | public static bool GetExport(nint hModule, string name, [NotNullWhen(true)] out T? func) where T : Delegate
14 | {
15 | func = GetExport(hModule, name);
16 | return func != null;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/Utils/WineUtils.cs:
--------------------------------------------------------------------------------
1 | #if WINDOWS
2 | using System.Runtime.InteropServices;
3 | #endif
4 |
5 | namespace MelonLoader.Bootstrap.Utils;
6 |
7 | internal static class WineUtils
8 | {
9 | public static bool IsWine { get; }
10 |
11 | static WineUtils()
12 | {
13 | #if WINDOWS
14 | if (NativeLibrary.TryLoad("ntdll.dll", out var ntdll) && NativeLibrary.TryGetExport(ntdll, "wine_get_version", out _))
15 | IsWine = true;
16 | #endif
17 | #if LINUX || ANDROID
18 | IsWine = false;
19 | #endif
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/androidexports.def:
--------------------------------------------------------------------------------
1 | {
2 | global:
3 | DotNetRuntimeDebugHeader;
4 | NativeHookAttach;
5 | NativeHookDetach;
6 | LogMsg;
7 | LogError;
8 | LogMelonInfo;
9 | MonoInstallHooks;
10 | MonoGetDomainPtr;
11 | MonoGetRuntimeHandle;
12 | IsConsoleOpen;
13 | GetLoaderConfig;
14 | GetJavaVM;
15 | JNI_OnLoad;
16 | local: *;
17 | };
18 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/linuxexports.def:
--------------------------------------------------------------------------------
1 | {
2 | global:
3 | DotNetRuntimeDebugHeader;
4 | __libc_start_main;
5 | NativeHookAttach;
6 | NativeHookDetach;
7 | LogMsg;
8 | LogError;
9 | LogMelonInfo;
10 | MonoInstallHooks;
11 | MonoGetDomainPtr;
12 | MonoGetRuntimeHandle;
13 | IsConsoleOpen;
14 | GetLoaderConfig;
15 | local: *;
16 | };
17 |
--------------------------------------------------------------------------------
/MelonLoader.Bootstrap/osxexports.def:
--------------------------------------------------------------------------------
1 | _DotNetRuntimeDebugHeader
2 | _Init
3 | _NativeHookAttach
4 | _NativeHookDetach
5 | _LogMsg
6 | _LogError
7 | _LogMelonInfo
8 | _MonoInstallHooks
9 | _MonoGetDomainPtr
10 | _MonoGetRuntimeHandle
11 | _IsConsoleOpen
12 | _GetLoaderConfig
13 |
--------------------------------------------------------------------------------
/MelonLoader.NativeHost/MelonLoader.NativeHost.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6
5 | enable
6 | enable
7 | $(MLOutDir)/MelonLoader
8 | true
9 | True
10 | embedded
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/MelonLoader/Assertions/LemonAssertException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace MelonLoader.Assertions
4 | {
5 | public class LemonAssertException : Exception
6 | {
7 | private string UserMessage;
8 |
9 | public LemonAssertException(string exceptionMsg, string userMessage) : base(exceptionMsg)
10 | => UserMessage = userMessage;
11 |
12 | public override string Message
13 | {
14 | get
15 | {
16 | if (!string.IsNullOrEmpty(UserMessage))
17 | return $"{base.Message}\n{UserMessage}";
18 | return base.Message;
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/MelonLoader/Assertions/LemonAssertMapping.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace MelonLoader.Assertions
5 | {
6 | public static class LemonAssertMapping
7 | {
8 | internal static Dictionary IsNull = new Dictionary();
9 | internal static Dictionary IsEqual = new Dictionary();
10 |
11 | internal static void Setup()
12 | {
13 | Register_IsNull