Advertisement
Guest User

Untitled

a guest
Aug 24th, 2018
731
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. MEmu := "Cxbx-Reloaded"
  2. MEmuV := "61fc3c5f (Mar 18 2018)"
  3. MURL := ["https://github.com/Cxbx-Reloaded/Cxbx-Reloaded"]
  4. MAuthor := ["agent47"]
  5. MVersion := "1.0"
  6. MCRC := ""
  7. iCRC := ""
  8. MID := ""
  9. MSystem := ["Microsoft Xbox"]
  10. ;----------------------------------------------------------------------------
  11. ; Notes:
  12. ;
  13. ;----------------------------------------------------------------------------
  14. StartModule()
  15. FadeInStart()
  16.  
  17. primaryExe := new Emulator(emuPath . "\" . executable)
  18. emuPrimaryWindow := new Window(new WindowTitle(,"WndMain"))
  19. emuRenderWindow := new Window(new WindowTitle("Cxbx-Reloaded","CxbxRender"))
  20.  
  21. userSettingsFile := new File(A_AppData . "\Cxbx-Reloaded\settings.ini")
  22. portableSettingsFile := new File(emuPath . "\settings.ini")
  23.  
  24. fullscreen := moduleIni.Read("Settings","Fullscreen","true",,1)
  25. altXBE := moduleIni.Read(romName, "AlternateXBE",,,1)
  26.  
  27. altXBE := GetFullName(altXBE)
  28.  
  29. If (portableSettingsFile.Exist()) {
  30. cxbxIni := new IniFile(portableSettingsFile.FileFullPath)
  31. }
  32. Else If (userSettingsFile.Exist()) {
  33. cxbxIni := new IniFile(userSettingsFile.FileFullPath)
  34. }
  35. 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.")
  36.  
  37. cxbxIni.Write(fullscreen, "video", "FullScreen",1)
  38.  
  39. If (fullscreen = "true") {
  40. emuGameWindow := emuRenderWindow
  41. hideEmuObject := Object(emuPrimaryWindow,0,emuGameWindow,1)
  42. }
  43. Else {
  44. emuGameWindow := emuPrimaryWindow
  45. hideEmuObject := Object(emuGameWindow,1)
  46. }
  47.  
  48. gameDir := is7zExtension(romExtension) ? "" : "\" . romName
  49.  
  50. 7z(romPath, romName, romExtension, sevenZExtractPath)
  51. HideAppStart(hideEmuObj,hideEmu)
  52.  
  53. If (altXBE) {
  54. altXBEFile := new File(altXBE)
  55. altXBEFile.CheckFile()
  56. primaryExe.Run("""" . altXBEFile.FileFullPath . """")
  57. }
  58. Else {
  59. primaryExe.Run("""" . romPath . gameDir . "\default.xbe""")
  60. }
  61.  
  62. emuGameWindow.Wait()
  63. emuGameWindow.WaitActive()
  64.  
  65. HideAppEnd(hideEmuObj,hideEmu)
  66. FadeInExit()
  67. primaryExe.Process("WaitClose")
  68. 7zCleanUp()
  69. FadeOutExit()
  70. ExitModule()
  71.  
  72.  
  73. CloseProcess:
  74. FadeOutStart()
  75. If (fullscreen = "true")
  76. emuPrimaryWindow.Close()
  77. emuGameWindow.Close()
  78. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement