Msn_logo_doc_handle = -1
Msn_logo_fade_out_done = false
function msn_logo_init()
Msn_logo_doc_handle = vint_document_find("msn_logo")
vint_dataitem_add_subscription( "game_paused_item", "update", "msn_logo_game_is_paused" )
thread_new( "msn_logo_load_assets" )
end
function msn_logo_load_assets()
pause_map_dump( true )
game_peg_load_with_cb("msn_logo_peg_loaded", 1, "ui_msn_logo_splash")
end
function msn_logo_peg_loaded()
vint_set_glitch_preset("splash")
vint_spike_glitch( 10, .1 )
local logo_blue_h = vint_object_find("logo_blue", 0, Msn_logo_doc_handle)
vint_set_property(logo_blue_h, "image", "ui_msn_logo_splash")
local logo_red_h = vint_object_find("logo_red", 0, Msn_logo_doc_handle)
vint_set_property(logo_red_h, "image", "ui_msn_logo_splash")
local logo_green_h = vint_object_find("logo_green", 0, Msn_logo_doc_handle)
vint_set_property(logo_green_h, "image", "ui_msn_logo_splash")
local anim_h = vint_object_find("logo_anim", 0, Msn_logo_doc_handle)
vint_apply_start_values(anim_h)
lua_play_anim(anim_h)
end
function msn_logo_game_is_paused( di_h )
if Msn_logo_fade_out_done then
return
end
local is_paused = vint_dataitem_get(di_h)
local root_anim_h = vint_object_find( "logo_anim" )
vint_set_property( root_anim_h, "is_paused", is_paused )
end
function msn_logo_glitch_out()
vint_set_glitch_preset("splash")
vint_spike_glitch( 900, 0 )
end
--Called by game to unload when ready
function msn_logo_fade_out()
local anim_out_h = vint_object_find("logo_out_anim", 0, Msn_logo_doc_handle)
local twn_h = vint_object_find("end_event_twn", anim_out_h)
vint_set_property(twn_h, "end_event", "msn_logo_unload")
vint_set_property(twn_h, "start_event", "msn_logo_glitch_out")
lua_play_anim(anim_out_h)
end
function msn_logo_unload()
game_peg_unload_wait("ui_msn_logo_splash")
pause_map_restore()
Msn_logo_fade_out_done = true
end
function msn_logo_cleanup()
end