紫英晓狼1130 发表于 2015-7-6 12:12
现在还没有完美的分辨率更改方法
这是在下的帖子
https://rpg.blue/forum.php?mod=viewthread&tid=36255 ...
360反馈意见截图16350913111112117.png (67.94 KB, 下载次数: 18)
紫英晓狼1130 发表于 2015-7-6 12:12
现在还没有完美的分辨率更改方法
这是在下的帖子
https://rpg.blue/forum.php?mod=viewthread&tid=36255 ...
kuerlulu 发表于 2015-7-6 14:47
听说主站可以用http://6rweb.sinaapp.com/articles/3287
噩梦瞳.png (1 KB, 下载次数: 17)
黑嘴.png (864 Bytes, 下载次数: 13)
花皇.png (593 Bytes, 下载次数: 12)
火龙竿.png (618 Bytes, 下载次数: 16)
嗜骨.png (653 Bytes, 下载次数: 18)
#============================================================================== # ■ Graphics #------------------------------------------------------------------------------ # 图像模块 #============================================================================== #-------------------------------------------------------------------------- # ● 更待指定帧数 #-------------------------------------------------------------------------- def Graphics.wait(n) n.times{self.update;yield if defined? yield} end #-------------------------------------------------------------------------- # ● 获取窗口宽 #-------------------------------------------------------------------------- def Graphics.width @width ||= 640 end #-------------------------------------------------------------------------- # ● 获取窗口高 #-------------------------------------------------------------------------- def Graphics.height @height ||= 480 end #-------------------------------------------------------------------------- # ● 更改窗口大小 #-------------------------------------------------------------------------- def Graphics.resize_screen(width, height) @width ||= 640 @height ||= 480 游戏ini名=".\\Game.ini" val = "\0"*256 gps = Win32API.new('kernel32', 'GetPrivateProfileString','pppplp', 'l') gps.call("Game", "Title", "", val, 256, 游戏ini名) val.delete!("\0") title = val fw = Win32API.new('user32', 'FindWindow', 'pp', 'i') hWnd = fw.call("RGSS Player", title) swp = Win32API.new('user32', 'SetWindowPos', 'lliiiii', 'i') pointwds = [0,0,0,0].pack('llll') pointcet = [0, 0].pack('ll') wdsrect = Win32API.new('user32.dll', 'GetWindowRect', 'lp', 'l') client_screen = Win32API.new("user32", "ClientToScreen", 'ip', 'i') wdsrect.call(hWnd,pointwds) client_screen.call(hWnd, pointcet) wds = pointwds.unpack('llll') cet = pointcet.unpack('ll') addw = wds[2] - wds[0] - @width addh = wds[3] - wds[1] - @height x = wds[0] - (width - @width) / 2 y = wds[1] - (height - @height) / 2 @width = width @height = height swp.call(hWnd, 0, x, y, @width + addw, @height + addh, 0x20) end Graphics.resize_screen(1280, 960)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |