Input_tracker_cyber = {}
Input_tracker_lock = {}
function msn_cyber_init()
-- set it up so we can hijack all player input
Input_tracker_cyber = Vdo_input_tracker:new()
Input_tracker_cyber:add_input("select", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("back", "msn_cyber_button_b", 150)
Input_tracker_cyber:add_input("pause", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("map", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("alt_exit", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("exit", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("alt_select", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("nav_up", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("nav_down", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("nav_left", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("nav_right", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("dpad_up", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("dpad_down", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("dpad_left", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("dpad_right", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("scroll_up", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("scroll_down", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("scroll_left", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("scroll_right", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("joy_up", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("joy_down", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("joy_left", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("joy_right", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("white", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("black", "msn_cyber_button_a", 150)
Input_tracker_cyber:add_input("all_unassigned", "msn_cyber_button_a", 150)
if game_get_platform() == "PC" then
Input_tracker_cyber:add_input("any_key", "msn_cyber_button_a", 150)
end
Input_tracker_cyber:subscribe(false)
Input_tracker_lock = Vdo_input_tracker:new()
Input_tracker_lock:add_input("all_unassigned", "msn_cyber_lock_controls", 50)
Input_tracker_lock:subscribe(true)
msn_cyber_start()
local error_msg1 = Vdo_base_object:new("error_msg1")
local error_msg2 = Vdo_base_object:new("error_msg2")
local error_msg3 = Vdo_base_object:new("error_msg3")
local error_msg4 = Vdo_base_object:new("error_msg4")
--use body font for other languages to support special characters
if game_get_language() ~= "US" then
error_msg1:set_property("font","thin")
error_msg2:set_property("font","thin")
error_msg3:set_property("font","thin")
error_msg4:set_property("font","thin")
error_msg1:set_property("text_scale",.8,.8)
error_msg2:set_property("text_scale",.8,.8)
error_msg3:set_property("text_scale",.8,.8)
error_msg4:set_property("text_scale",.8,.8)
end
error_msg1:set_text("*** STOP: 0x000001E (0X80000003, 0x80102035, 0x8025ea21, 0xfd682e9)\nUnhandled Kernel exception c000047 from fa8418b4 (8025ea21, fd6829e8)")
error_msg2:set_text("Ejecting core system heap - Name\nfa810000 2bdaab00 - Null fa820000 2bdaab01 - Root\nfa810000 2bdaab02 - System fa820000 2bdaab03 - Root\nfa810000 2bdaab04 - Ctrl fa820000 2bdaab05 - Base\nfa810000 2bdaab06 - Encrypted fa820000 2bdaab07 - Null\nfa810000 2bdaab08 - How fa820000 2bdaab09 - Root\nfa810000 2bdaab10 - Could fa820000 2bdaab11 - Root\nfa810000 2bdaab12 - You fa820000 2bdaab13 - Root\nfa810000 2bdaab14 - Let fa820000 2bdaab15 - Root\nfa810000 2bdaab16 - Johnny fa820000 2bdaab17 - Root\nfa810000 2bdaab18 - Die? fa820000 2bdaab19 - Root")
if game_get_platform() == "PC" then
error_msg3:set_text("M17_ERROR_SCREEN_CONTINUE_MSG_PC")
else
error_msg3:set_text("M17_ERROR_SCREEN_CONTINUE_MSG")
end
--reposition cursor at end of last sentence
local text_width, text_height = element_get_actual_size(error_msg3.handle)
local text_x, text_y = error_msg3:get_anchor()
error_msg4:set_anchor(text_x + text_width, text_y)
end
function msn_cyber_cleanup()
Input_tracker_cyber:subscribe(false)
Input_tracker_lock:subscribe(false)
end
function msn_cyber_start()
--play animation
local error_screen_anim = Vdo_anim_object:new("error_screen_anim")
local end_event_twn = Vdo_tween_object:new("end_event_twn",error_screen_anim.handle)
end_event_twn:set_end_event("msn_cyber_enable_control")
vint_apply_start_values(error_screen_anim.handle)
error_screen_anim:play(0)
end
function msn_cyber_enable_control()
-- start hijacking input
Input_tracker_cyber:subscribe(true)
Input_tracker_lock:subscribe(false)
end
function msn_cyber_end()
-- stop hijacking input
Input_tracker_cyber:subscribe(false)
end
function msn_cyber_button_a()
audio_object_post_event("Screen_Crash_Confirm")
pop_screen()
end
function msn_cyber_button_b()
audio_object_post_event("Screen_Crash_Confirm")
pop_screen()
end