------------------------------------------------------------------------------
-- Screen to handle cutscene effects
------------------------------------------------------------------------------
local Cutscene_peg_loaded = false
local Starburst_grp = -1
local Starburst_anim = -1
local Fan_grp = -1
local Bg_saints_grp = -1
local Bg_saints_anim = -1
local Kanji_grp = -1
local Kanji_anim = -1
local Purple_glow_grp = -1
local Purple_glow_anim = -1
local White_fade_grp = -1
local White_fade_in_anim = -1
local Cutscene_effects_doc_handle = -1
local FAN_X = 640
local FAN_Y = 360
function cutscene_effects_init()
Cutscene_effects_doc_handle = vint_document_find("cutscene_effects")
pause_map_dump()
-- Delay loading new peg until pause map is fully dumped.
thread_new("cutscene_effects_peg_delay_load")
Starburst_grp = Vdo_base_object:new("starburst_grp", 0 , Cutscene_effects_doc_handle)
Bg_saints_grp = Vdo_base_object:new("crib_bg_grp", 0 , Cutscene_effects_doc_handle)
Fan_grp = Vdo_base_object:new("fan_grp", 0 , Cutscene_effects_doc_handle)
Kanji_grp = Vdo_base_object:new("kanji_grp", 0 , Cutscene_effects_doc_handle)
Purple_glow_grp = Vdo_base_object:new("purple_glow_grp", 0 , Cutscene_effects_doc_handle)
White_fade_grp = Vdo_base_object:new("white_fade_grp", 0 , Cutscene_effects_doc_handle)
Starburst_anim = Vdo_anim_object:new("starburst_anim", 0, Cutscene_effects_doc_handle)
Bg_saints_anim = Vdo_anim_object:new("crib_bg_loop_anim", 0, Cutscene_effects_doc_handle)
Kanji_anim = Vdo_anim_object:new("kanji_anim", 0, Cutscene_effects_doc_handle)
Purple_glow_anim = Vdo_anim_object:new("purple_glow_anim", 0, Cutscene_effects_doc_handle)
White_fade_in_anim = Vdo_anim_object:new("white_fade_in_anim", 0, Cutscene_effects_doc_handle)
Starburst_grp:set_visible(false)
Bg_saints_grp:set_visible(false)
Kanji_grp:set_visible(false)
Purple_glow_grp:set_visible(false)
White_fade_grp:set_visible(false)
local disclaimer_txt = Vdo_base_object:new("disclaimer_txt", 0, Cutscene_effects_doc_handle)
disclaimer_txt:set_text("CUTSCENE01_PROHIBITED")
end
------------------------------------------------------------------------------
-- Peg load functions
------------------------------------------------------------------------------
function cutscene_effects_peg_delay_load()
delay(2)
cutscene_effects_peg_load()
end
function cutscene_effects_peg_load()
game_peg_load_with_cb("cutscene_effects_peg_load_complete", 1, "ui_bms_cutscene_01")
end
function cutscene_effects_peg_load_complete()
--JM: This might not be necessary because we know we don't have to show images for the first ~2 frames
Cutscene_peg_loaded = true
end
function cutscene_effects_cleanup()
game_peg_unload("ui_bms_cutscene_01")
end
------------------------------------------------------------------------------
-- Shot specific functions
------------------------------------------------------------------------------
function cutscene_effects_shot_1()
White_fade_grp:set_visible(false)
if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then
hud_msg_subtitle_top()
end
end
function cutscene_effects_shot_2()
White_fade_grp:set_visible(true)
White_fade_in_anim:play(0)
if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then
hud_msg_subtitle_bottom()
end
end
function cutscene_effects_shot_3()
White_fade_grp:set_visible(false)
end
function cutscene_effects_shot_6()
Starburst_grp:set_visible(false)
Bg_saints_grp:set_visible(false)
end
function cutscene_effects_shot_7()
Fan_grp:set_anchor(FAN_X, FAN_Y)
Starburst_grp:set_visible(true)
Bg_saints_grp:set_visible(true)
Starburst_anim:play(0)
Bg_saints_anim:play(0)
Purple_glow_grp:set_visible(false)
end
function cutscene_effects_shot_8()
-- Clone fleur outline animation and object. Then Retarget and store handles for later...
local fleur_outline = Vdo_anim_object:new("fleur_outline", 0 , Cutscene_effects_doc_handle)
local fleur_outline_anim = Vdo_anim_object:new("fleur_outline_zoom_anim", 0 , Cutscene_effects_doc_handle)
local fluer_outline_anims = {}
for index = 1, 5 do
local fleur_outline_clone = Vdo_base_object:clone(fleur_outline.handle)
local anim = Vdo_anim_object:clone(fleur_outline_anim.handle)
anim:set_target_handle(fleur_outline_clone.handle)
anim:stop()
fluer_outline_anims[index] = anim
end
fleur_outline_anim:play()
--Play Fleur outline animation...
for index = 1, 5 do
fluer_outline_anims[index]:play(index * .125)
end
Purple_glow_anim:play(0)
Purple_glow_grp:set_visible(true)
end
function cutscene_effects_shot_9()
Purple_glow_grp:set_visible(false)
Starburst_grp:set_visible(false)
Bg_saints_grp:set_visible(false)
Starburst_anim:set_property("is_paused", true)
Bg_saints_anim:set_property("is_paused", true)
end
function cutscene_effects_shot_10()
end
function cutscene_effects_shot_11()
end
function cutscene_effects_shot_20()
end
function cutscene_effects_shot_21()
end
function cutscene_effects_shot_23()
end
function cutscene_effects_shot_24()
Kanji_grp:set_visible(false)
end
function cutscene_effects_shot_25()
Kanji_grp:set_visible(true)
Kanji_anim:play(0)
end
function cutscene_effects_shot_26()
Kanji_grp:set_visible(false)
Kanji_anim:set_property("is_paused", true)
end