I Wanna Be The Forums!

Please login or register.

Login with username, password and session length
Advanced search  

News:

Gaiden 1.2 patch released. Click here to download!

Author Topic: Fullscreen?  (Read 12820 times)

yuke

  • Newbie
  • *
  • Posts: 1
    • View Profile
Fullscreen?
« on: July 20, 2012, 01:16:57 pm »

Love the game, but would like to make it fullscreen? Is this possible or is there some kind of work around that I could use?

Thanks.
Logged

ghutch92

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Fullscreen?
« Reply #1 on: September 16, 2012, 04:39:02 pm »

I wrote this script in auto hot key. It works for me, but make sure there are no programs running that can steal focus. Also ESC lets you exit the game. Be sure to place in same folder as the executable. Use this script to start the game instead of the normal executable.

Code: [Select]
---------------------------------------------------------
Author: ghutch92
Description: Launch "I wanna be the guy" in fullscreen mode
---------------------------------------------------------
;get current resolution
BeforeGuyWidth := %A_ScreenWidth%
BeforeGuyHeight := %A_ScreenHeight%

;blackout screen for resolution change
Gui, Color, 000000
Gui, -Caption +ToolWindow -AlwaysOnTop
Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%
SystemCursor(0)

;hide windows tray and button
WinTaskbar(0)

;change resolution to match window
ChangeDisplaySettings( (ClrDep:=32) , (Wid:=800) , (Hei:=600) , (Hz:=60) )

;hide titlebar
Gui, 2:Color, 000000
Gui, 2:-Caption +ToolWindow +AlwaysOnTop +LastFound
ID := WinExist()
Gui, 2:Add, Text,,
Gui, 2:Show, x0 y0 w%A_ScreenWidth% h26
WinSet, ExStyle, +0x80020, ahk_id %ID%  ;( WS_EX_LAYERED:=0x00080000 ) Or ( WS_EX_TRANSPARENT:=0x20 )

;run game (in same folder as this launcher)
Run, iwbtgbeta(fs).exe
WinWait, ahk_class Mf2MainClassTh
WinActivate, ahk_class Mf2MainClassTh

;remove menubar and maximize window
Send, {F8}
WinMaximize, ahk_class Mf2MainClassTh

;wait until game closes
Process, WaitClose, iwbtgbeta(fs).exe
Process, WaitClose, stdrt.exe

;restore windows tray and button
WinTaskbar(1)

;run blackout on top
Gui, 2:destroy
Gui, destroy
Gui, Color, 000000
Gui, -Caption +ToolWindow +AlwaysOnTop
Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%

;change screenresolution
ChangeDisplaySettings( (ClrDep:=32) , (Wid:=BeforeGuyWidth) , (Hei:=BeforeGuyHeight) , (Hz:=60) )

;sleep for it to take effect
sleep, 1000

;remove blackout and exit
SystemCursor(1)
Gui,destroy
ExitApp

;function for changing display settings
ChangeDisplaySettings( cD, sW, sH, rR ) {
  VarSetCapacity(dM,156,0), NumPut(156,2,&dM,36)
  DllCall( "EnumDisplaySettings", UInt,0, UInt,-1, UInt,&dM ), NumPut(0x5c0000,dM,40)
  NumPut(cD,dM,104),  NumPut(sW,dM,108),  NumPut(sH,dM,112),  NumPut(rR,dM,120)
  Return DllCall( "ChangeDisplaySettings", UInt,&dM, UInt,0 )
}

;function for hiding cursor
SystemCursor(OnOff=1)   ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others
{
   static AndMask, XorMask, $, h_cursor
      ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13  ; system cursors
        , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13  ; blank cursors
        , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13  ; handles of default cursors
   if (OnOff = "Init" or OnOff = "I" or $ = "")       ; init when requested or at first call
   {
      $ = h                                           ; active default cursors
      VarSetCapacity( h_cursor,4444, 1 )
      VarSetCapacity( AndMask, 32*4, 0xFF )
      VarSetCapacity( XorMask, 32*4, 0 )
      system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650
      StringSplit c, system_cursors, `,
      Loop %c0%
      {
         h_cursor   := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% )
         h%A_Index% := DllCall( "CopyImage",  "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 )
         b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0
                             , "int",32, "int",32, "uint",&AndMask, "uint",&XorMask )
      }
   }
   if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T"))
      $ = b       ; use blank cursors
   else
      $ = h       ; use the saved cursors

   Loop %c0%
   {
      h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 )
      DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% )
   }
}

;function for hiding taskbar
WinTaskbar(OnOff=1) ; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others
{
VarSetCapacity(area, 16)
if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T"))
{
           top := A_ScreenHeight
             WinHide ahk_class Shell_TrayWnd
WinHide ahk_class Button
$ = s
}
else {
          top := A_ScreenHeight - 30 ;60 = 2 "lines" for the taskbar, 30 if regular height
          WinShow ahk_class Shell_TrayWnd
      WinShow ahk_class Button
      $ = h
     }
DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 0, UInt,4, UInt,0)
DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 4, UInt,4, UInt,0)
DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 8, UInt,4, UInt,A_ScreenWidth)
DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 12,UInt,4, UInt,top)
DllCall("SystemParametersInfo", UInt,0x2F, UInt,0, UInt,&area, UInt,0)
}

Escape::
Process, Close, iwbtgbeta(fs).exe
Process, Close, stdrt.exe
return
Logged