Project1
标题:
RMXP 分辨率增大
[打印本页]
作者:
cofemailen
时间:
2010-7-20 00:41
标题:
RMXP 分辨率增大
默认是640X480 如何把游戏制作的分辨率增大 比如800X600或者更高?
作者:
薄荷冰水
时间:
2010-7-20 01:42
这个本来有个脚本可以实现的,但是实现之后,虽然窗口变 800X600了,但是游戏内部的东西还是 640X480,比如说地图,比如说菜单,比如说战斗,什么都是640X480,所以,多出来的一部分是全黑的,解决办法,重新编写窗口数据,如果脚本不是很行,建议放弃该想法,要不你可以弄全屏呀...
作者:
无心孤云
时间:
2010-7-20 02:05
我一直觉得crte+enter是王道。。。。
作者:
幻域三影
时间:
2011-7-1 20:03
用这个试试看
# ————————————————————————————————————
# 分辨率放大
# ————————————————————————————————————
class Win32API
GAME_INI_FILE = ".\\Game.ini"
HWND_TOPMOST = 0
HWND_TOP = -1
SWP_NOMOVE = 0
SWP_FRAMECHANGED = 0
HWND_NOTTOPMOST = 0
WM_GETMINMAXINFO = 24
#——————————————————————————————————————
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
#——————————————————————————————————————
def Win32API.FindWindow(class_name, title)
fw = Win32API.new('user32', 'FindWindow', %(p, p), 'i')
hWnd = fw.call(class_name, title)
return hWnd
end
#——————————————————————————————————————
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, -3, -22, w + 6, h+32, WM_GETMINMAXINFO)
return win
end
#——————————————————————————————————————
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
$width = 800
$height = 600
win = Win32API.SetWindowPos($width, $height)
if(win == 0)
p "Size change has failed!"
end
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1