查看: 6483|回复: 10

[转载] 雙屏幕腳本

[复制链接]
梦石
0
星屑
55
在线时间
30 小时
注册时间
2010-8-16
回帖
11
发表于 2010-8-26 16:31:22 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 传说VS天涯 于 2010-9-2 14:29 编辑
  1. module Resolution
  2. GetWindowPlacement = Win32API.new('user32','GetWindowPlacement',['l','p'],'l')
  3. GetSystemMetrics = Win32API.new('user32', 'GetSystemMetrics',['i'],'i')
  4. MoveWindow = Win32API.new('user32','MoveWindow',['l','i','i','i','i','l'],'l')
  5. FindWindowEx = Win32API.new('user32','FindWindowEx',['l','l','p','p'],'i')
  6. def self.windowloc(window)
  7. string = ' ' * 44
  8. Resolution::GetWindowPlacement.call(window,string)
  9. windowdetails = string.unpack('L11')
  10. result = []
  11. result.push((windowdetails[9] - windowdetails[7]))
  12. result.push((windowdetails[10] - windowdetails[8]))
  13. result.push(windowdetails[7])
  14. result.push(windowdetails[8])
  15. return result
  16. end
  17. end
  18. class Screen
  19. def self.center
  20. window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
  21. width,height = Resolution.windowloc(window)[0..1]
  22. screenwidth = Resolution::GetSystemMetrics.call(0)
  23. screenheight = Resolution::GetSystemMetrics.call(1)
  24. Resolution::MoveWindow.call(window,(screenwidth - width) / 2,(screenheight - height) / 2,width,height,1)
  25. end
  26. def self.resize2(width,height,x,y)
  27. window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
  28. screenwidth = Resolution::GetSystemMetrics.call(0)
  29. screenheight = Resolution::GetSystemMetrics.call(1)
  30. Resolution::MoveWindow.call(window,x,y,width,height,1)
  31. end
  32. def self.move(x,y)
  33. window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
  34. width,height = Resolution.windowloc(window)[0..1]
  35. screenwidth = Resolution::GetSystemMetrics.call(0)
  36. screenheight = Resolution::GetSystemMetrics.call(1)
  37. Resolution::MoveWindow.call(window,x,y,width,height,1)
  38. end
  39. def self.resize(width,height,center = true)
  40. window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
  41. screenwidth = Resolution::GetSystemMetrics.call(0)
  42. screenheight = Resolution::GetSystemMetrics.call(1)
  43. if center
  44. Resolution::MoveWindow.call(window,(screenwidth - width) / 2,(screenheight - height) / 2,width,height,1)
  45. else
  46. x,y = Resolution.windowloc(window)[2..3]
  47. Resolution::MoveWindow.call(window,x,y,width,height,1)
  48. end
  49. end
  50. def self.half(center = true)
  51. window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
  52. screenwidth = Resolution::GetSystemMetrics.call(0)
  53. screenheight = Resolution::GetSystemMetrics.call(1)
  54. if center
  55. Resolution::MoveWindow.call(window,(screenwidth - 326) / 2,(screenheight - 272) / 2,326,272,1)
  56. else
  57. x,y = Resolution.windowloc(window)[2..3]
  58. Resolution::MoveWindow.call(window,x,y,326,272,1)
  59. end
  60. end
  61. def self.default
  62. window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
  63. screenwidth = Resolution::GetSystemMetrics.call(0)
  64. screenheight = Resolution::GetSystemMetrics.call(1)
  65. Resolution::MoveWindow.call(window,(screenwidth - 646) / 2,(screenheight / 2) - 273,646,512,1)
  66. end
  67. end

  68. #========================R E S I Z E S C R E E N===============================
  69. # Tamaño De La Pantalla
  70. Screen.resize(246,358)
  71. # Barra De Separacion
  72. $spacer = Sprite.new
  73. $spacer.bitmap = RPG::Cache.picture("Spacer")
  74. $spacer.y = 321
  75. $spacer.z = 99999
  76. #========================F I N R E S I Z E S C R E E N===============================

  77. module Graphics
  78. @@fadeoutvp=Viewport.new(0,0,480,680)
  79. @@fadeoutvp.z=0x3FFFFFFF
  80. @@fadeoutvp.color=Color.new(0,0,0,0)
  81. end
复制代码
9vds3c.png
這個我在外國找的
這裏有相關的腳本
http://wahackforo.com/f-Hacking-RPG-Maker-Game-Maker

点评

就像NDS一样,不错嘛。  发表于 2012-8-17 18:56
梦石
0
星屑
80
在线时间
39 小时
注册时间
2008-9-25
回帖
291
发表于 2010-8-26 16:55:17 | 显示全部楼层
帮忙移动一下
LZ你发错去了
出门左转到发布区
回复

使用道具 举报

梦石
0
星屑
89
在线时间
308 小时
注册时间
2010-8-10
回帖
728
发表于 2010-8-26 17:04:32 | 显示全部楼层
哦 觉得没什么用处

点评

这儿L真多  发表于 2011-4-5 00:02
回复

使用道具 举报

名侦探小柯

梦石
10
星屑
4393
在线时间
3739 小时
注册时间
2006-9-6
回帖
36595

极短27获奖MZ评测员开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

发表于 2010-8-26 17:14:20 | 显示全部楼层
具体用法呢……
不过NDS的双屏幕模式还是比较赞的。
不定期回归 ~ 游戏开发之旅
———————————————————————————————
回复

使用道具 举报

梦石
0
星屑
50
在线时间
30 小时
注册时间
2010-8-24
回帖
47
发表于 2010-8-26 17:55:46 | 显示全部楼层
那游戏怎么做呢?难道二个地图?人物是不是要在两个地图之间切换?
回复

使用道具 举报

梦石
0
星屑
65
在线时间
107 小时
注册时间
2009-7-5
回帖
501
发表于 2010-8-26 17:58:26 | 显示全部楼层
其实都有RPG MAKER DS 了……
要想做双屏在NDS上用RMDS做不就行了……

点评

moy
有DS才行啊.......  发表于 2010-8-27 08:53
人只有临死前才会发觉自己只不过是头野兽。
回合制战棋 延长的灰烬 → http://rpg.blue/thread-236963-1-2.html
回复

使用道具 举报

小小的百鬼夜行<

梦石
0
星屑
54
在线时间
579 小时
注册时间
2010-7-29
回帖
2593

贵宾

发表于 2010-8-26 18:00:15 | 显示全部楼层
啊咧咧,双屏幕是什么?
某只PHP/HTML小白鼠→退屈の间


Cause I knew you were trouble when you walked in
So shame is on me now
I flow me to place i ve never been
till you put me down oh
Now Im lying on the cold hard ground
回复

使用道具 举报

梦石
0
星屑
167
在线时间
434 小时
注册时间
2009-1-1
回帖
557
发表于 2010-9-8 20:55:36 | 显示全部楼层
居然还有这种脚本,不可思议,不知道能不能用
最近在研究XAS
回复

使用道具 举报

小睡

梦石
0
星屑
2351
在线时间
508 小时
注册时间
2010-8-1
回帖
1311
发表于 2010-9-9 22:30:58 | 显示全部楼层
回复 lxdsh2009 的帖子

关键要有NDS啊……米啊~
   

点评

no$gba可以完美模拟的啦,不过rmds在pc上做确实有些囧,不过个人觉得在pc上做伪nds游戏却又不能用nds玩这样更囧,pia飞...  发表于 2010-9-10 16:58
回复

使用道具 举报

梦石
0
星屑
59
在线时间
536 小时
注册时间
2010-6-20
回帖
1256
发表于 2010-9-10 18:40:01 | 显示全部楼层
下面可以鼠标点击控制么??
[url=http://rpg.blue/thread-329159-1-1.html]http://attach.66rpg.com/bbs/attachment/forum/201308/24/132414sa8au7zgh7ab21gx.png[/url]   [b]
无尽之旅--永无止尽的旅程。[/b]
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部