Im using this screen resolution script to change it to 720p resolution and im having troubles with the map fitting the resolution.
Im aware of the resolution script that stretches instead of changing and i dont want it.
Here is what it looks like if you were to use the script.
#==============================================================================
# ■ Win32API
#------------------------------------------------------------------------------
# by Squall squall@loeher.znn.com
# Change the window size
# I must thank cybersam for his mouse and keyboard scripts. they were very
# useful finding some winapi function.
#
# !! this script MUST be on top of all other or the game will crash,
# if you use scripts to enlarge maps!
#==============================================================================
class Win32API
#--------------------------------------------------------------------------
# - define constant
#--------------------------------------------------------------------------
GAME_INI_FILE = ".\\Game.ini" # define "Game.ini" file
HWND_TOPMOST = 0 # window always active
HWND_TOP = -1 # window active when used only
SWP_NOMOVE = 0 # window pos and sizes can be changed
#--------------------------------------------------------------------------
# - Win32API.GetPrivateProfileString // check your game title in Game.ini
#--------------------------------------------------------------------------
def Win32API.GetPrivateProfileString(section, key)
val = "\0"*256
gps = Win32API.new('kernel32', 'GetPrivateProfileString',%w(p p p p l p), 'l')
gps.call(section, key, "", val, 256, GAME_INI_FILE)
val.delete!("\0")
return val
end
#--------------------------------------------------------------------------
# - Win32API.FindWindow // find the RGSS window
#--------------------------------------------------------------------------
def Win32API.FindWindow(class_name, title)
fw = Win32API.new('user32', 'FindWindow', %(p, p), 'i')
hWnd = fw.call(class_name, title)
return hWnd
end
#--------------------------------------------------------------------------
# - Win32API.SetWindowPos // change window positions and sizes
#--------------------------------------------------------------------------
def Win32API.SetWindowPos(w, h)
title = Win32API.GetPrivateProfileString("Game", "Title")
hWnd = Win32API.FindWindow("RGSS Player", title)
swp = Win32API.new('user32', 'SetWindowPos', %(l, l, i, i, i, i, i), 'i')
win = swp.call(hWnd, HWND_TOP, 240, 240, w + 6, h + 32, 0)
#the line below makes the window on top of all others
#win = swp.call(hWnd, HWND_TOPMOST, 0, 0, w + 6, h + 32, SWP_NOMOVE)
return win
end
#--------------------------------------------------------------------------
# - Win32API.client_size // check the window width and height
#--------------------------------------------------------------------------
def Win32API.client_size
title = Win32API.GetPrivateProfileString("Game", "Title")
hWnd = Win32API.FindWindow("RGSS Player", title)
rect = [0, 0, 0, 0].pack('l4')
Win32API.new('user32', 'GetClientRect', %w(l p), 'i').call(hWnd, rect)
width, height = rect.unpack('l4')[2..3]
return width, height
end
end
#==============================================================================
# - proceed with creation of the window
#------------------------------------------------------------------------------
# the width and height variables set the screen size.
#==============================================================================
$width = 1280
$height = 720
win = Win32API.SetWindowPos($width, $height)
if(win == 0)
p "Size change has failed!"
end
I tried editing viewports in the Spriteset_Map but had nothing but fail.
What scripts would i need to change and what parts in order to see the map all the way and do scrolling correctly?
Im using this screen resolution script to change it to 720p resolution and im having troubles with the map fitting the resolution.
Im aware of the resolution script that stretches instead of changing and i dont want it.
Here is what it looks like if you were to use the script.
I tried editing viewports in the Spriteset_Map but had nothing but fail.
What scripts would i need to change and what parts in order to see the map all the way and do scrolling correctly?
Thanks in advance.
Share this post
Link to post
Share on other sites