Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Khi đó thì nhúng cái gì vào mà chả được? Đâu cứ nhất thiết phải là C++ mà có khi Visual Basic,...đều nhúng được...
Cách hay nhất là cứ viết bằng C++ 1 file DLL trước rồi sau đó dùng RPG Maker gọi lệnh ra...
Nói vậy mà không hiểu nữa thì...bó tay...
Lý do: thí dụ có lệnh ABC đi, vậy thì máy sẽ đoán là sẽ có lệnh BBC, CBC,... nên sẽ chừa chỗ ra và như vậy thì...ui chà...hơi nhiều đó...nói chung kéo dài lệnh ra nhưng mà đừng dài quá ^_^class Scene_Movie
def initialize(movie,length)
@readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
@movie_name = Dir.getwd()+"\\Movies\\"+movie+".avi"
@counter = length*10
main
end
def main
game_name = "\0" * 256
@readini.call('Game','Title','',game_name,255,".\\Game.ini")
game_name.delete!("\0")
@wnd = Win32API.new('user32','FindWindowEx','%w(l,l,p,p)','L')
@temp = @wnd.call(0,0,nil,game_name).to_s
@movie = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','V')
@movie.call("open \""+@movie_name+"\" alias FILE style 1073741824 parent " + @temp.to_s,0,0,0)
@message = Win32API.new('user32','SendMessage','%w(l,l,l,l)','V')
@detector = Win32API.new('user32','GetSystemMetrics','%w(l)','L')
@width = @detector.call(0)
if @width == 640
fullscreen
Graphics.update
sleep(1)
Graphics.update
sleep(1)
Graphics.update
sleep(1)
end
@movie.call("play FILE",0,0,0)
loop do
sleep(0.1)
@message.call(@temp.to_i,11,0,0)
Graphics.update
@message.call(@temp.to_i,11,1,0)
Input.update
if Input.trigger?(Input::B)
Input.update
break
end
@counter = @counter - 1
if @counter <= 0
break
end
end
@movie.call("close FILE",0,0,0)
bail
end
def bail
if @width == 640
fullscreen
end
end
end
def fullscreen()
$full.call(18,0,0,0)
$full.call(13,0,0,0)
$full.call(18,0,2,0)
$full.call(13,0,2,0)
end
$full = Win32API.new('user32','keybd_event','%w(l,l,l,l)','')
Nếu đã gọi như vậy rồi thì sao không thêm cái hàm Autoresize đi (Windows Media Player làm vậy được) tui nghe nói có người làm vậy để chèn các phim có độ phân giải lớn hơn 640x480 vào (hình ảnh đẹp hơn nếu có kèm theo D3D Filter) nhưng chưa thử vì...không biết :P