Project1

标题: 雙屏幕腳本 [打印本页]

作者: y6831174    时间: 2010-8-26 16:31
标题: 雙屏幕腳本
本帖最后由 传说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
作者: 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