|
call PlayCinematic()竟然可以播放avi,rmvb格式的视频
http://bbs.islga.org/read-htm-tid-2704-fpage-15.html
挖出来的东西
谁去研究下这个玩意能不能掉线……
如果连机各方有人没有解码会怎样
不过大约也没什么意义
毕竟一个视频压到8m以下也不用看了
可以实现AVI播放,无法实现RMVB。
电影是从外部读取,API函数是:
native PlayCinematic takes string movieName returns nothing
将所要播放电影放到movie目录下,貌似这个目录吧,不记得了,把AVI电影文件后缀改为mpq,例如sy.avi那么改为sy.mpq。
调用办法很简单,只用调用文件名:
call PlayCinematic("sy")
PS:注意只能在游戏结尾播放喔。。。。呃,不然后果自负。
[jass]
具体用法参照blizzard.j里面的:
function SetCinematicAvailableBJ takes boolean available, integer cinematicIndex returns nothing
if ( cinematicIndex == bj_CINEMATICINDEX_TOP ) then
call SetOpCinematicAvailable( bj_CAMPAIGN_INDEX_T, available )
call PlayCinematic( "TutorialOp" )
elseif (cinematicIndex == bj_CINEMATICINDEX_HOP) then
call SetOpCinematicAvailable( bj_CAMPAIGN_INDEX_H, available )
call PlayCinematic( "HumanOp" )
elseif (cinematicIndex == bj_CINEMATICINDEX_HED) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_H, available )
call PlayCinematic( "HumanEd" )
elseif (cinematicIndex == bj_CINEMATICINDEX_OOP) then
call SetOpCinematicAvailable( bj_CAMPAIGN_INDEX_O, available )
call PlayCinematic( "OrcOp" )
elseif (cinematicIndex == bj_CINEMATICINDEX_OED) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_O, available )
call PlayCinematic( "OrcEd" )
elseif (cinematicIndex == bj_CINEMATICINDEX_UOP) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_U, available )
call PlayCinematic( "UndeadOp" )
elseif (cinematicIndex == bj_CINEMATICINDEX_UED) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_U, available )
call PlayCinematic( "UndeadEd" )
elseif (cinematicIndex == bj_CINEMATICINDEX_NOP) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_N, available )
call PlayCinematic( "NightElfOp" )
elseif (cinematicIndex == bj_CINEMATICINDEX_NED) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_N, available )
call PlayCinematic( "NightElfEd" )
elseif (cinematicIndex == bj_CINEMATICINDEX_XOP) then
call SetOpCinematicAvailable( bj_CAMPAIGN_OFFSET_XN, available )
call PlayCinematic( "IntroX" )
elseif (cinematicIndex == bj_CINEMATICINDEX_XED) then
call SetEdCinematicAvailable( bj_CAMPAIGN_OFFSET_XU, available )
call PlayCinematic( "OutroX" )
else
// Unrecognized cinematic - ignore the request.
endif
endfunction
[/jass] |
|