Advertisement
djvj

Untitled

Jul 30th, 2015
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. MEmu = EDuke32
  2. MEmuV = v5.307
  3. MURL = http://eduke32.com/
  4. MAuthor = 10cold,djvj
  5. MVersion = 0.2
  6. MCRC =
  7. iCRC =
  8. MID =
  9. MSystem = "Duke Nukem"
  10. ;----------------------------------------------------------------------------
  11. ; Notes:
  12. ; For this module to work, you need to place Duke3d.grp inside EDuke32 folder
  13. ; Each rom shall be packed with .7z file containing a dummy .txt file named
  14. ; according rom name.
  15. ; For each rom, create an entries with the launching commands on EDuke32.ini file
  16. ;----------------------------------------------------------------------------
  17. StartModule()
  18. BezelGUI()
  19. FadeInStart()
  20.  
  21. settingsFile := modulePath . "\" . moduleName . ".ini"
  22. eduke32cfg := CheckFile(emuPath . "\eduke32.cfg")
  23.  
  24. fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen", "true",,1)
  25. gprRomFiles := IniReadCheck(settingsFile, "" romName "", "gprRomFiles",,,1)
  26. conRomFiles := IniReadCheck(settingsFile, "" romName "", "conRomFiles",,,1)
  27. defRomFiles := IniReadCheck(settingsFile, "" romName "", "defRomFiles",,,1)
  28. AditionalCommands := IniReadCheck(settingsFile, "" romName "", "AditionalCommands",,,1)
  29.  
  30. hideEmuObj := Object("Duke Nukem ahk_class SDL_app",1) ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
  31. 7z(romPath, romName, romExtension, 7zExtractPath)
  32.  
  33.  
  34. If bezelEnabled = true
  35. { BezelStart()
  36. edukeWidth := Round(bezelScreenWidth)
  37. edukeHeight := Round(bezelScreenHeight)
  38. IniWrite, 0, %eduke32cfg%, Screen Setup, ScreenMode
  39. IniWrite, %edukeWidth%, %eduke32cfg%, Screen Setup, ScreenWidth
  40. IniWrite, %edukeHeight%, %eduke32cfg%, Screen Setup, ScreenHeight
  41. }
  42.  
  43. IniRead, currentFullScreen, %eduke32cfg%, Screen Setup, ScreenMode
  44. If (currentFullScreen = 0) and (fullscreen = "true") {
  45. IniWrite, 1, %eduke32cfg%, Screen Setup, ScreenMode
  46. IniWrite, %A_ScreenWidth%, %eduke32cfg%, Screen Setup, ScreenWidth
  47. IniWrite, %A_ScreenHeight%, %eduke32cfg%, Screen Setup, ScreenHeight
  48. } Else If (currentFullScreen = 1) and (fullscreen = "false") {
  49. IniWrite, 0, %eduke32cfg%, Screen Setup, ScreenMode
  50. }
  51.  
  52. HideEmuStart() ; This fully ensures windows are completely hidden even faster than winwait
  53.  
  54. Run(executable . " -j""" . romPath . """" . " " . gprRomFiles . " " . conRomFiles . " " . defRomFiles . " " . AditionalCommands . " -nosetup" , emuPath)
  55.  
  56. WinWait("Duke Nukem ahk_class SDL_app")
  57. WinWaitActive("Duke Nukem ahk_class SDL_app")
  58.  
  59. BezelDraw()
  60. HideEmuEnd()
  61. FadeInExit()
  62. Process("WaitClose", executable)
  63. 7zCleanUp()
  64. BezelExit()
  65. FadeOutExit()
  66. ExitModule()
  67.  
  68. CloseProcess:
  69. FadeOutStart()
  70. ; WinClose("Duke Nukem ahk_class SDL_app")
  71. Process("Close", executable) ; this is the only thing that can close the application
  72. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement