Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MEmu = Pinball FX2
- MEmuV = N/A
- MURL = http://www.pinballfx.com/
- MAuthor = djvj,bleasby
- MVersion = 2.0.8 beta
- MCRC = 5B89702C
- iCRC = 28ABC285
- mId = 635244873683327779
- MSystem = "Pinball FX2","Pinball"
- ;----------------------------------------------------------------------------
- ; Notes:
- ; If launching as a Steam game:
- ; When setting this up in RocketLauncherUI under the global emulators tab, make sure to select it as a Virtual Emulator. Also no rom extensions, executable, or rom paths need to be defined.
- ; Set Skip Checks to "Rom and Emu" when using this module as roms do not exist.
- ;
- ; If not launching through Steam:
- ; Add this as any other standard emulator and define the PInball FX2.exe as your executable, but still select Virtual Emulator as you do not need rom extensions or rom paths
- ; Set Skip Checks to "Rom and Emu" when using this module as roms do not exist.
- ;
- ; When setting this up in RocketLauncherUI under the global emulators tab, make sure to set rom extensions to pxp
- ; Also make your rom path the Pinball FX2\data_steam folder if you want audit to show green
- ;
- ; Windowed mode:
- ; - The original game does not support windowed mode, therefore it is necessary to use the dxwnd for forcing this mode. Use this option at your own risk, as this could be eventually considered as an injected code and may end up in a banned licence (I did not had any problem in this subject until now).
- ; - Windowed mode requires to set the dxwnd to run as admin. Go to the folder RocketLauncher\Module Extensions\dxwnd\dxwnd.exe and righht click the executable to set it to run as admin.
- ; - If dxwnd is not closing, that is because dxwnd cannot be closed by a script not also running as admin. So make sure RocketLauncher.exe is set to run as admin also by right clicking it and going to Properties -> Compatibility -> Run as Administrator should be checked.
- ; - It is also required to set on the modules options the WindowedResolution to match your Pinball FX2 game resolution. If you don't do it, the game will crash as dxwnd will not be able to set the windowed mode.
- ;
- ; Bezel:
- ; Bezel uses the fixResMode and requires the use of windowed mode, therefore you need to set the resolution on the module options to the same resolution that you set in Pinball FX2.
- ; By default, the module will use the resolution of your desktop. Your bezel is most likely smaller, so make sure to set the correct windowed resolution in RocketLauncherUI for this module.
- ;
- ; DMD (Dot Matrix Display)
- ; The module will support and hide the window components of detached DMD
- ; To see it, you must have a 2nd monitor connected as an extension of your desktop, and placement will be on that monitor
- ; To Detach:
- ; Run Pinball FX2 manually, and goto Help & Options -> Settings -> Video
- ; Set Dot Matrix Size to Off, and close Pinball FX2
- ; The module will automatically create the dotmatrix.cfg file in the same folder of the "Pinball FX2.exe" (your installation folder) for you
- ; Edit the module's settings in RLUI to customize the DMD size and placement of this window
- ;----------------------------------------------------------------------------
- StartModule()
- BezelGUI()
- FadeInStart()
- settingsFile := modulePath . "\" . moduleName . ".ini"
- pinballTitleClass := "Pinball FX2 ahk_class PxWindowClass"
- Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
- WindowedResolution := IniReadCheck(settingsFile, "Settings", "Windowed_Resolution",A_ScreenWidth . "x" . A_ScreenHeight,,1)
- externalDMD := IniReadCheck(settingsFile, "Settings", "External_DMD","false",,1)
- dmdX := IniReadCheck(settingsFile, "Settings", "DMD_X",A_ScreenWidth,,1)
- dmdY := IniReadCheck(settingsFile, "Settings", "DMD_Y",0,,1)
- dmdW := IniReadCheck(settingsFile, "Settings", "DMD_Width",0,,1)
- dmdH := IniReadCheck(settingsFile, "Settings", "DMD_Height",0,,1)
- BezelStart("fixResMode")
- DXWndGame :=
- If (!Fullscreen || Fullscreen = "false"){
- StringSplit, WindowedResolution, WindowedResolution, x
- DxwndIniRW("target", "sizx", WindowedResolution1,, "Pinball FX2")
- DxwndIniRW("target", "sizy", WindowedResolution2,, "Pinball FX2")
- If executable
- DxwndIniRW("target", "path", emuPath . "\" . executable,, "Pinball FX2")
- If !executable {
- If !steamPath
- GetSteamPath()
- DxwndIniRW("target", "path", steamPath . "\SteamApps\common\Pinball FX2\Pinball FX2.exe",, "Pinball FX2")
- }
- DxwndRun()
- DXWndGame := 1
- }
- If (externalDMD = "true") {
- Log("Module - Updating external DMD window placement values",4)
- If !executable
- If !steamPath
- GetSteamPath()
- dotmatrixCFGFile := If executable ? emuPath . "\dotmatrix.cfg" : steamPath . "\SteamApps\common\Pinball FX2\dotmatrix.cfg"
- IfNotExist, %dotmatrixCFGFile%
- FileAppend, %dotmatrixCFGFile% ; create a new blank file if one does not exist
- Log("Module - Using this dotmatrix.cfg: " . dotmatrixCFGFile,4)
- dotmatrixCFG := LoadProperties(dotmatrixCFGFile)
- WriteProperty(dotmatrixCFG, "x", dmdX, 1)
- WriteProperty(dotmatrixCFG, "y", dmdY, 1)
- WriteProperty(dotmatrixCFG, "width", dmdW, 1)
- WriteProperty(dotmatrixCFG, "height", dmdH, 1)
- SaveProperties(dotmatrixCFGFile, dotmatrixCFG)
- }
- hideEmuObj := Object(pinballTitleClass,1) ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
- HideEmuStart()
- If executable {
- Log("Module - Running Pinball FX2 as a stand alone game and not through Steam as an executable was defined.")
- Run(executable, emuPath)
- } Else {
- Log("Module - Running Pinball FX2 through Steam.")
- Steam(226980,,romName)
- }
- WinWait(pinballTitleClass)
- WinWaitActive(pinballTitleClass)
- ; Attempt to hide window components of the detached DMD
- If (externalDMD = "true") {
- Gui +LastFound
- hWnd := WinExist()
- DllCall("RegisterShellHookWindow", UInt,hWnd)
- MsgNum := DllCall("RegisterWindowMessage", Str,"SHELLHOOK")
- OnMessage(MsgNum, "ShellMessage")
- }
- BezelDraw()
- HideEmuEnd()
- FadeInExit()
- Process("WaitClose", "Pinball FX2.exe")
- BezelExit()
- FadeOutExit()
- ExitModule()
- ShellMessage(wParam, lParam) {
- Log("Module - DMD external window - " . wParam,4)
- If (wParam = 1)
- IfWinExist Pinball FX2 DotMatrix ahk_class PxWindowClass
- {
- WinSet, Style, -0xC00000 ; hide title bar
- WinSet, Style, -0x800000 ; hide thin-line border
- WinSet, Style, -0x400000 ; hide dialog frame
- WinSet, Style, -0x40000 ; hide thickframe/sizebox
- ;WinMove, , , 0, 0, 1920, 1080
- }
- }
- CloseProcess:
- FadeOutStart()
- WinClose(pinballTitleClass)
- If DXWndGame
- DxwndClose()
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement