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

Project1

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

[有事请教] RPGMaker地圖縮放後跑掉

[复制链接]

Lv1.梦旅人

梦石
0
星屑
29
在线时间
3 小时
注册时间
2022-10-9
帖子
1
跳转到指定楼层
1
发表于 2022-10-12 16:36:50 | 显示全部楼层 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
大家好,近期再用rpgmaker vx做遊戲
因為覺得預設的畫面太小了所以這邊有用腳本把它手動調大
腳本如下
============================================
#==============================================================================
# ■ 畫面大小更改
#------------------------------------------------------------------------------
# 畫面大小更改
#==============================================================================
Graphics.resize_screen(1080,750)
#Basic Window Resizer v1.1
#----------#
#Features: Allows you to resize the window to whatever size you like! (This is not
#            like Graphics.resize, this will scale to fit)
#
#Usage:   Script calls:
#           Window_Resize.r(width, height)     - Self-explanatory
#           Window_Resize.f                    - fits the game window to monitor size
#           Window_Resize.full                 - switches to full screen unless already fullscreened
#           Window_Resize.window               - same as full but opposite
#           Window_Resize.toggle               - toggles between full and window
#
#No Customization
#
#----------#
#-- Script by: V.M of D.T
#
#- Questions or comments can be:
#    posted on the thread for the script
#    given by email: [email protected]
#    provided on facebook: http://www.facebook.com/DaimoniousTailsGames
#    posed on site: daimonioustails.wordpress.com
#
#- Free to use in any project with credit given, donations always welcome!

SWPO = Win32API.new 'user32', 'SetWindowPos', ['l','i','i','i','i','i','p'], 'i'
WINX = Win32API.new 'user32', 'FindWindowEx', ['l','l','p','p'], 'i'
SMET = Win32API.new 'user32', 'GetSystemMetrics', ['i'], 'i'

module Window_Resize
  def self.r(width, height)
    resw = SMET.call(0)
    resh = SMET.call(1)
    window_loc = WINX.call(0,0,"RGSS Player",0)
    width += (SMET.call(5) + SMET.call(45)) * 2
    height += (SMET.call(6) + SMET.call(45)) * 2 + SMET.call(4)
    x = (resw - width) / 2; y = (resh - height) / 2
    y = 0 if y < 0;x = 0 if x < 0
    SWPO.call(window_loc,0,x,y,width,height,0)
  end
  def self.f
    resw = SMET.call(0)
    resh = SMET.call(1)
    window_loc = WINX.call(0,0,"RGSS Player",0)
    SWPO.call(window_loc,0,0,0,resw,resh,0)
  end
  def self.full
    resw = SMET.call(0)
    return unless resw > 640
    toggle
  end
  def self.window
    resw = SMET.call(0)
    return unless resw < 640
    toggle
  end
  def self.toggle
    keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
    keybd.call 0xA4, 0, 0, 0
    keybd.call 13, 0, 0, 0
    keybd.call 13, 0, 2, 0
    keybd.call 0xA4, 0, 2, 0
  end
end
Window_Resize.r(1080,750)
=======================================================

出來的結果的確是放大了

但是卻有一個L型的邊框,設定事件點的時候也與遊戲執行時的位置不同
確定目前圖片的大小是有超過設定大小的
想問這樣要怎麼調整定位跟圖片邊框問題呢
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-5-9 08:32

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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