设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2615|回复: 13
打印 上一主题 下一主题

[已经解决] 求降低分辨率工程

[复制链接]

Lv4.逐梦者

梦石
0
星屑
6035
在线时间
1196 小时
注册时间
2011-12-18
帖子
1285
跳转到指定楼层
1
发表于 2016-10-26 13:48:40 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 sdgn 于 2016-10-26 14:14 编辑

抱歉小弟不才只能當伸手党....
請問有方法能降低VA分辨率且可用這個分辨率全屏嗎?

______________________________________________________________
意思是說全屏時要能滿屏... 陽春做法 之前已經用過~ 不能滿屏

Lv4.逐梦者 (版主)

梦石
0
星屑
6891
在线时间
7027 小时
注册时间
2013-11-2
帖子
1344

开拓者剧作品鉴家

2
发表于 2016-10-26 13:55:28 | 只看该作者
实际上降低分辨率,是不需要额外运行库的。提升分辨率超过限制则需要。

打开脚本编辑器,然后照着截图做。


ALT+ENTER全屏应该是没问题的。如果有问题可以提出。

点评

此法之前就用過~ 我的意思不是不能全屏~ 而是不能真正全屏... 全屏後遊戲畫面不會滿屏  发表于 2016-10-26 14:01
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

梦石
0
星屑
6891
在线时间
7027 小时
注册时间
2013-11-2
帖子
1344

开拓者剧作品鉴家

3
发表于 2016-10-26 14:07:56 | 只看该作者
也许是显卡的问题吧(我自己在三台电脑上测试过,两台可以正常全屏但一台不能)

既然遇到这样的情况,
RUBY 代码复制
  1. # Fullscreen++ v2.2 for VX and VXace by Zeus81
  2. # Free for non commercial and commercial use
  3. # Licence : [url]http://creativecommons.org/licenses/by-sa/3.0/[/url]
  4. # Contact : [email][email protected][/email]
  5. # (fr) Manuel d'utilisation : [url]http://pastebin.com/raw.php?i=1TQfMnVJ[/url]
  6. # (en) User Guide           : [url]http://pastebin.com/raw.php?i=EgnWt9ur[/url]
  7.  
  8. $imported ||= {}
  9. $imported[:Zeus_Fullscreen] = __FILE__
  10.  
  11. class << Graphics
  12.   Disable_VX_Fullscreen = true
  13.  
  14.   CreateWindowEx            = Win32API.new('user32'  , 'CreateWindowEx'           , 'ippiiiiiiiii', 'i')
  15.   GetClientRect             = Win32API.new('user32'  , 'GetClientRect'            , 'ip'          , 'i')
  16.   GetDC                     = Win32API.new('user32'  , 'GetDC'                    , 'i'           , 'i')
  17.   GetSystemMetrics          = Win32API.new('user32'  , 'GetSystemMetrics'         , 'i'           , 'i')
  18.   GetWindowRect             = Win32API.new('user32'  , 'GetWindowRect'            , 'ip'          , 'i')
  19.   FillRect                  = Win32API.new('user32'  , 'FillRect'                 , 'ipi'         , 'i')
  20.   FindWindow                = Win32API.new('user32'  , 'FindWindow'               , 'pp'          , 'i')
  21.   ReleaseDC                 = Win32API.new('user32'  , 'ReleaseDC'                , 'ii'          , 'i')
  22.   SendInput                 = Win32API.new('user32'  , 'SendInput'                , 'ipi'         , 'i')
  23.   SetWindowLong             = Win32API.new('user32'  , 'SetWindowLong'            , 'iii'         , 'i')
  24.   SetWindowPos              = Win32API.new('user32'  , 'SetWindowPos'             , 'iiiiiii'     , 'i')
  25.   ShowWindow                = Win32API.new('user32'  , 'ShowWindow'               , 'ii'          , 'i')
  26.   SystemParametersInfo      = Win32API.new('user32'  , 'SystemParametersInfo'     , 'iipi'        , 'i')
  27.   UpdateWindow              = Win32API.new('user32'  , 'UpdateWindow'             , 'i'           , 'i')
  28.   GetPrivateProfileString   = Win32API.new('kernel32', 'GetPrivateProfileString'  , 'ppppip'      , 'i')
  29.   WritePrivateProfileString = Win32API.new('kernel32', 'WritePrivateProfileString', 'pppp'        , 'i')
  30.   CreateSolidBrush          = Win32API.new('gdi32'   , 'CreateSolidBrush'         , 'i'           , 'i')
  31.   DeleteObject              = Win32API.new('gdi32'   , 'DeleteObject'             , 'i'           , 'i')
  32.  
  33.   unless method_defined?(:zeus_fullscreen_update)
  34.     HWND     = FindWindow.call('RGSS Player', 0)
  35.     BackHWND = CreateWindowEx.call(0x08000008, 'Static', '', 0x80000000, 0, 0, 0, 0, 0, 0, 0, 0)
  36.     alias zeus_fullscreen_resize_screen resize_screen
  37.     alias zeus_fullscreen_update        update
  38.   end
  39. private
  40.   def initialize_fullscreen_rects
  41.     @borders_size    ||= borders_size
  42.     @fullscreen_rect ||= screen_rect
  43.     @workarea_rect   ||= workarea_rect
  44.   end
  45.   def borders_size
  46.     GetWindowRect.call(HWND, wrect = [0, 0, 0, 0].pack('l4'))
  47.     GetClientRect.call(HWND, crect = [0, 0, 0, 0].pack('l4'))
  48.     wrect, crect = wrect.unpack('l4'), crect.unpack('l4')
  49.     Rect.new(0, 0, wrect[2]-wrect[0]-crect[2], wrect[3]-wrect[1]-crect[3])
  50.   end
  51.   def screen_rect
  52.     Rect.new(0, 0, GetSystemMetrics.call(0), GetSystemMetrics.call(1))
  53.   end
  54.   def workarea_rect
  55.     SystemParametersInfo.call(0x30, 0, rect = [0, 0, 0, 0].pack('l4'), 0)
  56.     rect = rect.unpack('l4')
  57.     Rect.new(rect[0], rect[1], rect[2]-rect[0], rect[3]-rect[1])
  58.   end
  59.   def hide_borders() SetWindowLong.call(HWND, -16, 0x14000000) end
  60.   def show_borders() SetWindowLong.call(HWND, -16, 0x14CA0000) end
  61.   def hide_back()    ShowWindow.call(BackHWND, 0)              end
  62.   def show_back
  63.     ShowWindow.call(BackHWND, 3)
  64.     UpdateWindow.call(BackHWND)
  65.     dc    = GetDC.call(BackHWND)
  66.     rect  = [0, 0, @fullscreen_rect.width, @fullscreen_rect.height].pack('l4')
  67.     brush = CreateSolidBrush.call(0)
  68.     FillRect.call(dc, rect, brush)
  69.     ReleaseDC.call(BackHWND, dc)
  70.     DeleteObject.call(brush)
  71.   end
  72.   def resize_window(w, h)
  73.     if @fullscreen
  74.       x, y, z = (@fullscreen_rect.width-w)/2, (@fullscreen_rect.height-h)/2, -1
  75.     else
  76.       w += @borders_size.width
  77.       h += @borders_size.height
  78.       x = @workarea_rect.x + (@workarea_rect.width  - w) / 2
  79.       y = @workarea_rect.y + (@workarea_rect.height - h) / 2
  80.       z = -2
  81.     end
  82.     SetWindowPos.call(HWND, z, x, y, w, h, 0)
  83.   end
  84.   def release_alt
  85.     inputs = [1,18,2, 1,164,2, 1,165,2].pack('LSx2Lx16'*3)
  86.     SendInput.call(3, inputs, 28)
  87.   end
  88. public
  89.   def load_fullscreen_settings
  90.     buffer = [].pack('x256')
  91.     section = 'Fullscreen++'
  92.     filename = './Game.ini'
  93.     get_option = Proc.new do |key, default_value|
  94.       l = GetPrivateProfileString.call(section, key, default_value, buffer, buffer.size, filename)
  95.       buffer[0, l]
  96.     end
  97.     @fullscreen       = get_option.call('Fullscreen'     , '0') == '1'
  98.     @fullscreen_ratio = get_option.call('FullscreenRatio', '0').to_i
  99.     @windowed_ratio   = get_option.call('WindowedRatio'  , '1').to_i
  100.     toggle_vx_fullscreen if Disable_VX_Fullscreen and vx_fullscreen?
  101.     fullscreen? ? fullscreen_mode : windowed_mode
  102.   end
  103.   def save_fullscreen_settings
  104.     section = 'Fullscreen++'
  105.     filename = './Game.ini'
  106.     set_option = Proc.new do |key, value|
  107.       WritePrivateProfileString.call(section, key, value.to_s, filename)
  108.     end
  109.     set_option.call('Fullscreen'     , @fullscreen ? '1' : '0')
  110.     set_option.call('FullscreenRatio', @fullscreen_ratio)
  111.     set_option.call('WindowedRatio'  , @windowed_ratio)
  112.   end
  113.   def fullscreen?
  114.     @fullscreen or vx_fullscreen?
  115.   end
  116.   def vx_fullscreen?
  117.     rect = screen_rect
  118.     rect.width == 640 and rect.height == 480
  119.   end
  120.   def toggle_fullscreen
  121.     fullscreen? ? windowed_mode : fullscreen_mode
  122.   end
  123.   def toggle_vx_fullscreen
  124.     windowed_mode if @fullscreen and !vx_fullscreen?
  125.     inputs = [1,18,0, 1,13,0, 1,13,2, 1,18,2].pack('LSx2Lx16'*4)
  126.     SendInput.call(4, inputs, 28)
  127.     zeus_fullscreen_update
  128.     self.ratio += 0 # refresh window size
  129.   end
  130.   def vx_fullscreen_mode
  131.     return if vx_fullscreen?
  132.     toggle_vx_fullscreen
  133.   end
  134.   def fullscreen_mode
  135.     return if vx_fullscreen?
  136.     initialize_fullscreen_rects
  137.     show_back
  138.     hide_borders
  139.     @fullscreen = true
  140.     self.ratio += 0 # refresh window size
  141.   end
  142.   def windowed_mode
  143.     toggle_vx_fullscreen if vx_fullscreen?
  144.     initialize_fullscreen_rects
  145.     hide_back
  146.     show_borders
  147.     @fullscreen = false
  148.     self.ratio += 0 # refresh window size
  149.   end
  150.   def toggle_ratio
  151.     return if vx_fullscreen?
  152.     self.ratio += 1
  153.   end
  154.   def ratio
  155.     return 1 if vx_fullscreen?
  156.     @fullscreen ? @fullscreen_ratio : @windowed_ratio
  157.   end
  158.   def ratio=(r)
  159.     return if vx_fullscreen?
  160.     initialize_fullscreen_rects
  161.     r = 0 if r < 0
  162.     if @fullscreen
  163.       @fullscreen_ratio = r
  164.       w_max, h_max = @fullscreen_rect.width, @fullscreen_rect.height
  165.     else
  166.       @windowed_ratio = r
  167.       w_max = @workarea_rect.width  - @borders_size.width
  168.       h_max = @workarea_rect.height - @borders_size.height
  169.     end
  170.     if r == 0
  171.       w, h = w_max, w_max * height / width
  172.       h, w = h_max, h_max * width / height if h > h_max
  173.     else
  174.       w, h = width * r, height * r
  175.       return self.ratio = 0 if w > w_max or h > h_max
  176.     end
  177.     resize_window(w, h)
  178.     save_fullscreen_settings
  179.   end
  180.   def update
  181.     release_alt if Disable_VX_Fullscreen and Input.trigger?(Input::ALT)
  182.     zeus_fullscreen_update
  183.     toggle_fullscreen if Input.trigger?(Input::F5)
  184.     toggle_ratio      if Input.trigger?(Input::F6)
  185.   end
  186.   def resize_screen(width, height)
  187.     zeus_fullscreen_resize_screen(width, height)
  188.     self.ratio += 0 # refresh window size
  189.   end
  190. end
  191. Graphics.load_fullscreen_settings


插入这个脚本,将取消Alt+Enter的效果。
全屏键换成F5。按F6则是在非全屏的状态下更改窗口大小(分辨率照旧)。

点评

我不這麼認為.... 該有的成效還是要有...  发表于 2016-12-1 17:40
别执着于反锯齿了吧…RM是像素游戏啊  发表于 2016-12-1 16:59
我在 GT435M 和 HD6670 都不行... 不知道是不是沒安裝DX8  发表于 2016-12-1 16:54
还是显卡的锅。不同电脑,不同牌子和质量的显卡,难免会出现不同的效果。  发表于 2016-12-1 16:25
等等... 我是說在 320*240 的時候沒反鋸齒  发表于 2016-12-1 15:42

评分

参与人数 2星屑 +259 梦石 +1 收起 理由
怪蜀黍 + 250 + 1 楼主认可的解答
sdgn + 9

查看全部评分

回复 支持 1 反对 0

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
6035
在线时间
1196 小时
注册时间
2011-12-18
帖子
1285
4
 楼主| 发表于 2016-10-26 14:18:21 | 只看该作者
RaidenInfinity 发表于 2016-10-26 14:07
也许是显卡的问题吧(我自己在三台电脑上测试过,两台可以正常全屏但一台不能)

既然遇到这样的情况,

請問如何使用呢?
搭配 Graphics.resize_screen 嗎?

点评

搭配Graphcis.resize_screen,然后这个脚本主要的用途是增添F5和F6键的功能,并屏蔽默认的Alt+Enter (玩家应该不会在意这个)  发表于 2016-10-26 14:20
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-7-20 23:51

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表