Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MEmu := "Cxbx-Reloaded"
- MEmuV := "61fc3c5f (Mar 18 2018)"
- MURL := ["https://github.com/Cxbx-Reloaded/Cxbx-Reloaded"]
- MAuthor := ["agent47"]
- MVersion := "1.0"
- MCRC := ""
- iCRC := ""
- MID := ""
- MSystem := ["Microsoft Xbox"]
- ;----------------------------------------------------------------------------
- ; Notes:
- ;
- ;----------------------------------------------------------------------------
- StartModule()
- FadeInStart()
- primaryExe := new Emulator(emuPath . "\" . executable)
- emuPrimaryWindow := new Window(new WindowTitle(,"WndMain"))
- emuRenderWindow := new Window(new WindowTitle("Cxbx-Reloaded","CxbxRender"))
- userSettingsFile := new File(A_AppData . "\Cxbx-Reloaded\settings.ini")
- portableSettingsFile := new File(emuPath . "\settings.ini")
- fullscreen := moduleIni.Read("Settings","Fullscreen","true",,1)
- altXBE := moduleIni.Read(romName, "AlternateXBE",,,1)
- altXBE := GetFullName(altXBE)
- If (portableSettingsFile.Exist()) {
- cxbxIni := new IniFile(portableSettingsFile.FileFullPath)
- }
- Else If (userSettingsFile.Exist()) {
- cxbxIni := new IniFile(userSettingsFile.FileFullPath)
- }
- cxbxIni.CheckFile("Could not find Cxbx-Reloaded's ini file. Please run the emulator manually first and make sure that you use the module recomended emulator version.")
- cxbxIni.Write(fullscreen, "video", "FullScreen",1)
- If (fullscreen = "true") {
- emuGameWindow := emuRenderWindow
- hideEmuObject := Object(emuPrimaryWindow,0,emuGameWindow,1)
- }
- Else {
- emuGameWindow := emuPrimaryWindow
- hideEmuObject := Object(emuGameWindow,1)
- }
- gameDir := is7zExtension(romExtension) ? "" : "\" . romName
- 7z(romPath, romName, romExtension, sevenZExtractPath)
- HideAppStart(hideEmuObj,hideEmu)
- If (altXBE) {
- altXBEFile := new File(altXBE)
- altXBEFile.CheckFile()
- primaryExe.Run("""" . altXBEFile.FileFullPath . """")
- }
- Else {
- primaryExe.Run("""" . romPath . gameDir . "\default.xbe""")
- }
- emuGameWindow.Wait()
- emuGameWindow.WaitActive()
- HideAppEnd(hideEmuObj,hideEmu)
- FadeInExit()
- primaryExe.Process("WaitClose")
- 7zCleanUp()
- FadeOutExit()
- ExitModule()
- CloseProcess:
- FadeOutStart()
- If (fullscreen = "true")
- emuPrimaryWindow.Close()
- emuGameWindow.Close()
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement