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

Project1

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

[已经过期] 宽屏分辨率全屏的问题

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1206
在线时间
561 小时
注册时间
2014-11-30
帖子
155
跳转到指定楼层
1
发表于 2015-7-20 19:50:47 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 309988769 于 2015-7-20 19:53 编辑

不知道谁能帮我解决这个问题,XP版的宽屏没法全屏,我看到一个帖子,上面有人解决了,但是已经失效了,不知道版主有没有,https://rpg.blue/thread-89835-1-1.html这一个帖的6楼上面的解决办法,谁知不知道

Lv3.寻梦者

梦石
0
星屑
1495
在线时间
1101 小时
注册时间
2015-7-4
帖子
1561

开拓者

2
发表于 2015-7-20 21:43:29 | 只看该作者
实际上,现在并没有完美的宽屏解决方法
如果只是单纯的想要放大窗口,可以按下alt+enter
根本不需要什么最后的落脚处,只需要不断前行就够了。只要脚步不停下来,道路就会在脚下不断延伸!
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1206
在线时间
561 小时
注册时间
2014-11-30
帖子
155
3
 楼主| 发表于 2015-7-20 22:32:53 | 只看该作者
ACE宽屏的全屏问题,已经解决了,但是XP的宽屏全屏还是没有办法解决,附上ACE的脚本,大家看看
  1. # Fullscreen++ v2.2 for VX and VXace by Zeus81
  2. # Free for non commercial and commercial use
  3. # Licence : http://creativecommons.org/licenses/by-sa/3.0/
  4. # Contact : [email protected]
  5. # (fr) Manuel d'utilisation : http://pastebin.com/raw.php?i=1TQfMnVJ
  6. # (en) User Guide           : http://pastebin.com/raw.php?i=EgnWt9ur

  7. $imported ||= {}
  8. $imported[:Zeus_Fullscreen] = __FILE__

  9. class << Graphics
  10.   Disable_VX_Fullscreen = false

  11.   CreateWindowEx            = Win32API.new('user32'  , 'CreateWindowEx'           , 'ippiiiiiiiii', 'i')
  12.   GetClientRect             = Win32API.new('user32'  , 'GetClientRect'            , 'ip'          , 'i')
  13.   GetDC                     = Win32API.new('user32'  , 'GetDC'                    , 'i'           , 'i')
  14.   GetSystemMetrics          = Win32API.new('user32'  , 'GetSystemMetrics'         , 'i'           , 'i')
  15.   GetWindowRect             = Win32API.new('user32'  , 'GetWindowRect'            , 'ip'          , 'i')
  16.   FillRect                  = Win32API.new('user32'  , 'FillRect'                 , 'ipi'         , 'i')
  17.   FindWindow                = Win32API.new('user32'  , 'FindWindow'               , 'pp'          , 'i')
  18.   ReleaseDC                 = Win32API.new('user32'  , 'ReleaseDC'                , 'ii'          , 'i')
  19.   SendInput                 = Win32API.new('user32'  , 'SendInput'                , 'ipi'         , 'i')
  20.   SetWindowLong             = Win32API.new('user32'  , 'SetWindowLong'            , 'iii'         , 'i')
  21.   SetWindowPos              = Win32API.new('user32'  , 'SetWindowPos'             , 'iiiiiii'     , 'i')
  22.   ShowWindow                = Win32API.new('user32'  , 'ShowWindow'               , 'ii'          , 'i')
  23.   SystemParametersInfo      = Win32API.new('user32'  , 'SystemParametersInfo'     , 'iipi'        , 'i')
  24.   UpdateWindow              = Win32API.new('user32'  , 'UpdateWindow'             , 'i'           , 'i')
  25.   GetPrivateProfileString   = Win32API.new('kernel32', 'GetPrivateProfileString'  , 'ppppip'      , 'i')
  26.   WritePrivateProfileString = Win32API.new('kernel32', 'WritePrivateProfileString', 'pppp'        , 'i')
  27.   CreateSolidBrush          = Win32API.new('gdi32'   , 'CreateSolidBrush'         , 'i'           , 'i')
  28.   DeleteObject              = Win32API.new('gdi32'   , 'DeleteObject'             , 'i'           , 'i')

  29.   unless method_defined?(:zeus_fullscreen_update)
  30.     HWND     = FindWindow.call('RGSS Player', 0)
  31.     BackHWND = CreateWindowEx.call(0x08000008, 'Static', '', 0x80000000, 0, 0, 0, 0, 0, 0, 0, 0)
  32.     alias zeus_fullscreen_resize_screen resize_screen
  33.     alias zeus_fullscreen_update        update
  34.   end
  35. private
  36.   def initialize_fullscreen_rects
  37.     @borders_size    ||= borders_size
  38.     @fullscreen_rect ||= screen_rect
  39.     @workarea_rect   ||= workarea_rect
  40.   end
  41.   def borders_size
  42.     GetWindowRect.call(HWND, wrect = [0, 0, 0, 0].pack('l4'))
  43.     GetClientRect.call(HWND, crect = [0, 0, 0, 0].pack('l4'))
  44.     wrect, crect = wrect.unpack('l4'), crect.unpack('l4')
  45.     Rect.new(0, 0, wrect[2]-wrect[0]-crect[2], wrect[3]-wrect[1]-crect[3])
  46.   end
  47.   def screen_rect
  48.     Rect.new(0, 0, GetSystemMetrics.call(0), GetSystemMetrics.call(1))
  49.   end
  50.   def workarea_rect
  51.     SystemParametersInfo.call(0x30, 0, rect = [0, 0, 0, 0].pack('l4'), 0)
  52.     rect = rect.unpack('l4')
  53.     Rect.new(rect[0], rect[1], rect[2]-rect[0], rect[3]-rect[1])
  54.   end
  55.   def hide_borders() SetWindowLong.call(HWND, -16, 0x14000000) end
  56.   def show_borders() SetWindowLong.call(HWND, -16, 0x14CA0000) end
  57.   def hide_back()    ShowWindow.call(BackHWND, 0)              end
  58.   def show_back
  59.     ShowWindow.call(BackHWND, 3)
  60.     UpdateWindow.call(BackHWND)
  61.     dc    = GetDC.call(BackHWND)
  62.     rect  = [0, 0, @fullscreen_rect.width, @fullscreen_rect.height].pack('l4')
  63.     brush = CreateSolidBrush.call(0)
  64.     FillRect.call(dc, rect, brush)
  65.     ReleaseDC.call(BackHWND, dc)
  66.     DeleteObject.call(brush)
  67.   end
  68.   def resize_window(w, h)
  69.     if @fullscreen
  70.       x, y, z = (@fullscreen_rect.width-w)/2, (@fullscreen_rect.height-h)/2, -1
  71.     else
  72.       w += @borders_size.width
  73.       h += @borders_size.height
  74.       x = @workarea_rect.x + (@workarea_rect.width  - w) / 2
  75.       y = @workarea_rect.y + (@workarea_rect.height - h) / 2
  76.       z = -2
  77.     end
  78.     SetWindowPos.call(HWND, z, x, y, w, h, 0)
  79.   end
  80.   def release_alt
  81.     inputs = [1,18,2, 1,164,2, 1,165,2].pack('LSx2Lx16'*3)
  82.     SendInput.call(3, inputs, 28)
  83.   end
  84. public
  85.   def load_fullscreen_settings
  86.     buffer = [].pack('x256')
  87.     section = 'Fullscreen++'
  88.     filename = './Game.ini'
  89.     get_option = Proc.new do |key, default_value|
  90.       l = GetPrivateProfileString.call(section, key, default_value, buffer, buffer.size, filename)
  91.       buffer[0, l]
  92.     end
  93.     @fullscreen       = get_option.call('Fullscreen'     , '0') == '1'
  94.     @fullscreen_ratio = get_option.call('FullscreenRatio', '0').to_i
  95.     @windowed_ratio   = get_option.call('WindowedRatio'  , '1').to_i
  96.     toggle_vx_fullscreen if Disable_VX_Fullscreen and vx_fullscreen?
  97.     fullscreen? ? fullscreen_mode : windowed_mode
  98.   end
  99.   def save_fullscreen_settings
  100.     section = 'Fullscreen++'
  101.     filename = './Game.ini'
  102.     set_option = Proc.new do |key, value|
  103.       WritePrivateProfileString.call(section, key, value.to_s, filename)
  104.     end
  105.     set_option.call('Fullscreen'     , @fullscreen ? '1' : '0')
  106.     set_option.call('FullscreenRatio', @fullscreen_ratio)
  107.     set_option.call('WindowedRatio'  , @windowed_ratio)
  108.   end
  109.   def fullscreen?
  110.     @fullscreen or vx_fullscreen?
  111.   end
  112.   def vx_fullscreen?
  113.     rect = screen_rect
  114.     rect.width == 640 and rect.height == 480
  115.   end
  116.   def toggle_fullscreen
  117.     fullscreen? ? windowed_mode : fullscreen_mode
  118.   end
  119.   def toggle_vx_fullscreen
  120.     windowed_mode if @fullscreen and !vx_fullscreen?
  121.     inputs = [1,18,0, 1,13,0, 1,13,2, 1,18,2].pack('LSx2Lx16'*4)
  122.     SendInput.call(4, inputs, 28)
  123.     zeus_fullscreen_update
  124.     self.ratio += 0 # refresh window size
  125.   end
  126.   def vx_fullscreen_mode
  127.     return if vx_fullscreen?
  128.     toggle_vx_fullscreen
  129.   end
  130.   def fullscreen_mode
  131.     return if vx_fullscreen?
  132.     initialize_fullscreen_rects
  133.     show_back
  134.     hide_borders
  135.     @fullscreen = true
  136.     self.ratio += 0 # refresh window size
  137.   end
  138.   def windowed_mode
  139.     toggle_vx_fullscreen if vx_fullscreen?
  140.     initialize_fullscreen_rects
  141.     hide_back
  142.     show_borders
  143.     @fullscreen = false
  144.     self.ratio += 0 # refresh window size
  145.   end
  146.   def toggle_ratio
  147.     return if vx_fullscreen?
  148.     self.ratio += 1
  149.   end
  150.   def ratio
  151.     return 1 if vx_fullscreen?
  152.     @fullscreen ? @fullscreen_ratio : @windowed_ratio
  153.   end
  154.   def ratio=(r)
  155.     return if vx_fullscreen?
  156.     initialize_fullscreen_rects
  157.     r = 0 if r < 0
  158.     if @fullscreen
  159.       @fullscreen_ratio = r
  160.       w_max, h_max = @fullscreen_rect.width, @fullscreen_rect.height
  161.     else
  162.       @windowed_ratio = r
  163.       w_max = @workarea_rect.width  - @borders_size.width
  164.       h_max = @workarea_rect.height - @borders_size.height
  165.     end
  166.     if r == 0
  167.       w, h = w_max, w_max * height / width
  168.       h, w = h_max, h_max * width / height if h > h_max
  169.     else
  170.       w, h = width * r, height * r
  171.       return self.ratio = 0 if w > w_max or h > h_max
  172.     end
  173.     resize_window(w, h)
  174.     save_fullscreen_settings
  175.   end
  176.   def update
  177.     release_alt if Disable_VX_Fullscreen and Input.trigger?(Input::ALT)
  178.     zeus_fullscreen_update
  179.     toggle_fullscreen if Input.trigger?(Input::F5)
  180.     toggle_ratio      if Input.trigger?(Input::F6)
  181.   end
  182.   def resize_screen(width, height)
  183.     zeus_fullscreen_resize_screen(width, height)
  184.     self.ratio += 0 # refresh window size
  185.   end
  186. end
  187. Graphics.load_fullscreen_settings
复制代码
要是能移植的话,最好了,有谁能帮忙,移植,或者其他方法,只要能解决XP宽屏全屏,可以奉上报酬
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-23 03:20

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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