Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Scale
- #==============================================================================
- # Author : OriginalWij
- # Version : 1.2
- #==============================================================================
- #==============================================================================
- # To use:
- # set the scale in the config below, the rest is automatic (Plug & Play)
- #==============================================================================
- #==============================================================================
- # What this does:
- # scales the game window to make it appear larger
- #==============================================================================
- #==============================================================================
- # Config
- #==============================================================================
- module OW_SCALE
- # Factor to scale the game window by (do NOT scale = 1.00)
- SCALE = 2.00
- end
- #==============================================================================
- # Scale [New]
- #==============================================================================
- class Scale
- #--------------------------------------------------------------------------
- # Scale Game Window
- #--------------------------------------------------------------------------
- def self.game_window(scale = 1.00)
- return 0 if scale == false
- w, h = Graphics.width * scale, Graphics.height * scale
- find = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
- size = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
- move = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
- window = find.call(0, 0, 'RGSS Player', 0)
- window_w, window_h = size.call(0), size.call(1)
- move.call(window,(window_w - w) / 2,(window_h - h) / 2, w, h, 1)
- end
- end
- Scale.game_window(OW_SCALE::SCALE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement