Project1
标题:
【应求脚本】vx用一键截图(xp改造)
[打印本页]
作者:
柳之一
时间:
2008-8-1 23:21
标题:
【应求脚本】vx用一键截图(xp改造)
原问题:
http://rpg.blue/viewthread.php?tid=96611
效果:按f5,可以截图,保存在Graphics/Pictures/下面
使用方法:将脚本插在Scene_Map之后,main之前,并把下面连接中的dll解压在你的游戏文件夹内即可。
#===============================================================================
#
# Screenshot V2
#
# Screenshot Script v1 & screenshot.dll v1 created by: Andreas21
# Screenshot Script v2 created/edit by: cybersam
# the autor is found on a german board...
# the comments are added by me...
# since the autor didnt want to add any comment...
# so thats it from here...
# have fund with it... ^-^
#
# oh yea.. the needed command line is found in "Scene_Map" in "def update"
#
#===============================================================================
module Screen
##
##
@screen = Win32API.new 'screenshot', 'Screenshot', %w(l l l l p l l), ''
@readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
@findwindow = Win32API.new 'user32', 'FindWindowA', %w(p p), 'l'
module_function
#-----------------------------------------------------------------------------
# here comes the stuff...
# i add here the stuff for automatic change of the number for the screenshot
# so it wont overrite the old one...
# if you want to change so stuff change them in this line below
# or you can change them in your command line... like
# Screen::shot("screenshot", 2)
# this change the name and the type of the screenshot
# (0 = bmp, 1 = jpg and 2 = png)
# ----------------------------------------------------------------------------
def shot(file = "screenshot", typ = 2)
# to add the right extension...
if typ == 0
typname = ".bmp"
elsif typ == 1
typname = ".jpg"
elsif typ == 2
typname = ".png"
end
file_index = 0
dir = "Graphics/Pictures/"
# make the filename....
file_name = dir + file.to_s + typname.to_s
# make the screenshot.... Attention dont change anything from here on....
@screen.call(0,0,544,416,file_name,handel,typ)
end
# find the game window...
def handel
game_name = "\0" * 256
@readini.call('Game','Title','',game_name,255,".\\Game.ini")
game_name.delete!("\0")
return @findwindow.call('RGSS Player',game_name)
end
end
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# ● 开始处理
#--------------------------------------------------------------------------
def update
super
$game_map.interpreter.update # 更新解释器
$game_map.update # 更新滴入
$game_player.update # 更新玩家
$game_system.update # 更新计时器
@spriteset.update # 更新活动块元件
@message_window.update
# 更新消息窗口
unless $game_message.visible # 正在显示消息以外的情况
update_transfer_player
update_encounter
update_call_menu
update_call_debug
update_scene_change
end
if Input.press?(Input::F5)
Screen::shot
end
end
end
复制代码
http://rpg.blue/UP_PIC/200801/screenshot_98032718.rar
作者:
沉影不器
时间:
2008-8-1 23:54
提示:
作者被禁止或删除 内容自动屏蔽
作者:
星辰天羽
时间:
2008-8-2 00:18
以下引用
沉影不器于2008-8-1 15:54:15
的发言:
真奇怪...
换做别人也就算了,楼主竟然会用screenshot.dll保存截图
XP的时候都是这样啊!!
作者:
RXVincent
时间:
2008-8-2 01:08
VX可以用LZ发布的Marshal屏幕储存来截屏,所以才说LZ用sceenshot很奇怪。
作者:
越前リョーマ
时间:
2008-8-2 03:21
偷懒专用…… = =
作者:
幻獬豸
时间:
2008-8-4 23:23
提示:
作者被禁止或删除 内容自动屏蔽
作者:
yangff
时间:
2008-8-5 02:59
lz为什么会。。。
Graphics.snap_to_bitmap (RGSS2)
Gets the current game screen image as a bitmap object.
This reflects the graphics that should be displayed, without relation to use of the freeze method.
The created bitmap must be freed when it is no longer needed.
作者:
yangff
时间:
2008-8-5 03:03
http://rpg.blue/viewthread.php?tid=75512
这个里面就有
作者:
御灵
时间:
2008-8-8 03:24
http://rpg.blue/web/htm/news1141.htm
vip+2
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1