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

Project1

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

[转载] 雙屏幕腳本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
30 小时
注册时间
2010-8-16
帖子
20
跳转到指定楼层
1
发表于 2010-8-26 16:31:22 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 传说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
复制代码

這個我在外國找的
這裏有相關的腳本
http://wahackforo.com/f-Hacking-RPG-Maker-Game-Maker

点评

就像NDS一样,不错嘛。  发表于 2012-8-17 18:56

Lv1.梦旅人

梦石
0
星屑
60
在线时间
39 小时
注册时间
2008-9-25
帖子
294
2
发表于 2010-8-26 16:55:17 | 只看该作者
帮忙移动一下
LZ你发错去了
出门左转到发布区
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
89
在线时间
308 小时
注册时间
2010-8-10
帖子
794
3
发表于 2010-8-26 17:04:32 | 只看该作者
哦 觉得没什么用处

点评

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

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3263
在线时间
3616 小时
注册时间
2006-9-6
帖子
37399

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

4
发表于 2010-8-26 17:14:20 | 只看该作者
具体用法呢……
不过NDS的双屏幕模式还是比较赞的。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
30 小时
注册时间
2010-8-24
帖子
54
5
发表于 2010-8-26 17:55:46 | 只看该作者
那游戏怎么做呢?难道二个地图?人物是不是要在两个地图之间切换?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
65
在线时间
107 小时
注册时间
2009-7-5
帖子
513
6
发表于 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
回复 支持 反对

使用道具 举报

Lv1.梦旅人

小小的百鬼夜行<

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

贵宾

7
发表于 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
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
167
在线时间
434 小时
注册时间
2009-1-1
帖子
643
8
发表于 2010-9-8 20:55:36 | 只看该作者
居然还有这种脚本,不可思议,不知道能不能用
最近在研究XAS
回复 支持 反对

使用道具 举报

Lv3.寻梦者

小睡

梦石
0
星屑
2091
在线时间
508 小时
注册时间
2010-8-1
帖子
1378
9
发表于 2010-9-9 22:30:58 | 只看该作者
回复 lxdsh2009 的帖子

关键要有NDS啊……米啊~
   

点评

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

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
59
在线时间
536 小时
注册时间
2010-6-20
帖子
1489
10
发表于 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]
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-29 12:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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