rfancella

DICE.ahk

Jun 8th, 2014
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. MEmu = Dice
  2. MEmuV = v0.8
  3. MURL = http://adamulation.blogspot.com/
  4. MAuthor = djvj
  5. MVersion = 2.0.1
  6. MCRC = C5F266C7
  7. iCRC = 1E716C97
  8. MID = 635038268883967308
  9. MSystem = "DICE"
  10. ;----------------------------------------------------------------------------
  11. ; Notes:
  12. ; Create 4 txt files in the emu dir, one each for Gotcha, Pong, Rebound and SpaceRace.
  13. ; romExtension should be txt
  14. ; Point both emu and rom dirs to the dir that contains Dice.exe
  15. ; Dice stores its config in your user dir: C:\Users\username\AppData\Roaming\dice
  16. ; Bezels do not work yet, emu has a statusbar at the bottom that even when removed, still shows up in windowed mode
  17. ;----------------------------------------------------------------------------
  18. StartModule()
  19. BezelGui()
  20. FadeInStart()
  21.  
  22. settingsFile := modulePath . "\" . moduleName . ".ini"
  23. Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
  24.  
  25. BezelStart()
  26. 7z(romPath, romName, romExtension, 7zExtractPath)
  27.  
  28. StringLower, romName, romName ; the rom's name must be passed lowercase to the emu otherwise it doesn't work
  29.  
  30. fullscreen := If fullscreen = "true" ? "" : " -window"
  31.  
  32. Run(executable . " " . romName . fullscreen, emuPath, "Hide") ; need Hide here otherwise the app pops into view over our GUI
  33.  
  34. WinWait("DICE ahk_class phoenix_window")
  35.  
  36. Control, Hide, , msctls_statusbar321, DICE ahk_class phoenix_window ; Removes the StatusBar
  37.  
  38. WinActivate, DICE ahk_class phoenix_window ; dice 0.8 does not give focus properly, this ensures it gets focus
  39. WinWaitActive("DICE ahk_class phoenix_window") ; dice 0.8 has a status bar at the bottom
  40. Control, Hide, , msctls_statusbar321, DICE ahk_class phoenix_window ; Removes the StatusBar
  41.  
  42. BezelDraw()
  43. Sleep, 1000 ; small sleep required ottherwise Hyperspin flashes back into view
  44.  
  45. FadeInExit()
  46. Process("WaitClose", executable)
  47. 7zCleanUp()
  48. BezelExit()
  49. FadeOutExit()
  50. ExitModule()
  51.  
  52.  
  53. CloseProcess:
  54. FadeOutStart()
  55. WinClose("DICE ahk_class phoenix_window")
  56. Return
Advertisement
Add Comment
Please, Sign In to add comment