Project1
标题:
雙屏幕腳本
[打印本页]
作者:
y6831174
时间:
2010-8-26 16:31
标题:
雙屏幕腳本
本帖最后由 传说VS天涯 于 2010-9-2 14:29 编辑
module Resolution
GetWindowPlacement = Win32API.new('user32','GetWindowPlacement',['l','p'],'l')
GetSystemMetrics = Win32API.new('user32', 'GetSystemMetrics',['i'],'i')
MoveWindow = Win32API.new('user32','MoveWindow',['l','i','i','i','i','l'],'l')
FindWindowEx = Win32API.new('user32','FindWindowEx',['l','l','p','p'],'i')
def self.windowloc(window)
string = ' ' * 44
Resolution::GetWindowPlacement.call(window,string)
windowdetails = string.unpack('L11')
result = []
result.push((windowdetails[9] - windowdetails[7]))
result.push((windowdetails[10] - windowdetails[8]))
result.push(windowdetails[7])
result.push(windowdetails[8])
return result
end
end
class Screen
def self.center
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
width,height = Resolution.windowloc(window)[0..1]
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
Resolution::MoveWindow.call(window,(screenwidth - width) / 2,(screenheight - height) / 2,width,height,1)
end
def self.resize2(width,height,x,y)
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
Resolution::MoveWindow.call(window,x,y,width,height,1)
end
def self.move(x,y)
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
width,height = Resolution.windowloc(window)[0..1]
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
Resolution::MoveWindow.call(window,x,y,width,height,1)
end
def self.resize(width,height,center = true)
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
if center
Resolution::MoveWindow.call(window,(screenwidth - width) / 2,(screenheight - height) / 2,width,height,1)
else
x,y = Resolution.windowloc(window)[2..3]
Resolution::MoveWindow.call(window,x,y,width,height,1)
end
end
def self.half(center = true)
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
if center
Resolution::MoveWindow.call(window,(screenwidth - 326) / 2,(screenheight - 272) / 2,326,272,1)
else
x,y = Resolution.windowloc(window)[2..3]
Resolution::MoveWindow.call(window,x,y,326,272,1)
end
end
def self.default
window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
screenwidth = Resolution::GetSystemMetrics.call(0)
screenheight = Resolution::GetSystemMetrics.call(1)
Resolution::MoveWindow.call(window,(screenwidth - 646) / 2,(screenheight / 2) - 273,646,512,1)
end
end
#========================R E S I Z E S C R E E N===============================
# Tamaño De La Pantalla
Screen.resize(246,358)
# Barra De Separacion
$spacer = Sprite.new
$spacer.bitmap = RPG::Cache.picture("Spacer")
$spacer.y = 321
$spacer.z = 99999
#========================F I N R E S I Z E S C R E E N===============================
module Graphics
@@fadeoutvp=Viewport.new(0,0,480,680)
@@fadeoutvp.z=0x3FFFFFFF
@@fadeoutvp.color=Color.new(0,0,0,0)
end
复制代码
9vds3c.png
(28.67 KB, 下载次数: 26)
下载附件
保存到相册
2010-8-26 16:30 上传
這個我在外國找的
這裏有相關的腳本
http://wahackforo.com/f-Hacking-RPG-Maker-Game-Maker
作者:
azdet54639
时间:
2010-8-26 16:55
帮忙移动一下
LZ你发错去了
出门左转到发布区
作者:
不是马甲
时间:
2010-8-26 17:04
哦 觉得没什么用处
作者:
越前リョーマ
时间:
2010-8-26 17:14
具体用法呢……
不过NDS的双屏幕模式还是比较赞的。
作者:
法尔希
时间:
2010-8-26 17:55
那游戏怎么做呢?难道二个地图?人物是不是要在两个地图之间切换?
作者:
lxdsh2009
时间:
2010-8-26 17:58
其实都有RPG MAKER DS 了……
要想做双屏在NDS上用RMDS做不就行了……
作者:
退屈£无聊
时间:
2010-8-26 18:00
啊咧咧,双屏幕是什么?
作者:
赛露休斯
时间:
2010-9-8 20:55
居然还有这种脚本,不可思议,不知道能不能用
作者:
星之璇
时间:
2010-9-9 22:30
回复
lxdsh2009
的帖子
关键要有NDS啊……米啊~
作者:
流星的瞬间
时间:
2010-9-10 18:40
下面可以鼠标点击控制么??
作者:
缔辋
时间:
2010-10-26 10:31
神奇啊~但是没多大用处,,
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1