./msn_cyber.lua

  1.  
  2. Input_tracker_cyber = {} 
  3. Input_tracker_lock = {} 
  4.  
  5. function msn_cyber_init() 
  6.  
  7. 	-- set it up so we can hijack all player input 
  8. 	Input_tracker_cyber = Vdo_input_tracker:new() 
  9. 	Input_tracker_cyber:add_input("select", "msn_cyber_button_a", 150) 
  10. 	Input_tracker_cyber:add_input("back", "msn_cyber_button_b", 150)		 
  11. 	Input_tracker_cyber:add_input("pause", "msn_cyber_button_a", 150)		 
  12. 	Input_tracker_cyber:add_input("map", "msn_cyber_button_a", 150)		 
  13. 	Input_tracker_cyber:add_input("alt_exit", "msn_cyber_button_a", 150) 
  14. 	Input_tracker_cyber:add_input("exit", "msn_cyber_button_a", 150) 
  15. 	Input_tracker_cyber:add_input("alt_select", "msn_cyber_button_a", 150)		 
  16. 	Input_tracker_cyber:add_input("nav_up", "msn_cyber_button_a", 150)		 
  17. 	Input_tracker_cyber:add_input("nav_down", "msn_cyber_button_a", 150)		 
  18. 	Input_tracker_cyber:add_input("nav_left", "msn_cyber_button_a", 150)		 
  19. 	Input_tracker_cyber:add_input("nav_right", "msn_cyber_button_a", 150)		 
  20. 	Input_tracker_cyber:add_input("dpad_up", "msn_cyber_button_a", 150)		 
  21. 	Input_tracker_cyber:add_input("dpad_down", "msn_cyber_button_a", 150)		 
  22. 	Input_tracker_cyber:add_input("dpad_left", "msn_cyber_button_a", 150)		 
  23. 	Input_tracker_cyber:add_input("dpad_right", "msn_cyber_button_a", 150)			 
  24. 	Input_tracker_cyber:add_input("scroll_up", "msn_cyber_button_a", 150)	 
  25. 	Input_tracker_cyber:add_input("scroll_down", "msn_cyber_button_a", 150)	 
  26. 	Input_tracker_cyber:add_input("scroll_left", "msn_cyber_button_a", 150)	 
  27. 	Input_tracker_cyber:add_input("scroll_right", "msn_cyber_button_a", 150)	 
  28. 	Input_tracker_cyber:add_input("joy_up", "msn_cyber_button_a", 150)	 
  29. 	Input_tracker_cyber:add_input("joy_down", "msn_cyber_button_a", 150)		 
  30. 	Input_tracker_cyber:add_input("joy_left", "msn_cyber_button_a", 150)		 
  31. 	Input_tracker_cyber:add_input("joy_right", "msn_cyber_button_a", 150)		 
  32. 	Input_tracker_cyber:add_input("white", "msn_cyber_button_a", 150)	 
  33. 	Input_tracker_cyber:add_input("black", "msn_cyber_button_a", 150)			 
  34. 	Input_tracker_cyber:add_input("all_unassigned", "msn_cyber_button_a", 150) 
  35. 	if game_get_platform() == "PC" then 
  36. 		Input_tracker_cyber:add_input("any_key", "msn_cyber_button_a", 150) 
  37. 	end 
  38. 	Input_tracker_cyber:subscribe(false) 
  39. 	 
  40. 	Input_tracker_lock = Vdo_input_tracker:new() 
  41. 	Input_tracker_lock:add_input("all_unassigned", "msn_cyber_lock_controls", 50) 
  42. 	Input_tracker_lock:subscribe(true) 
  43.  
  44. 	msn_cyber_start() 
  45. 	 
  46. 	local error_msg1 = Vdo_base_object:new("error_msg1") 
  47. 	local error_msg2 = Vdo_base_object:new("error_msg2") 
  48. 	local error_msg3 = Vdo_base_object:new("error_msg3") 
  49. 	local error_msg4 = Vdo_base_object:new("error_msg4") 
  50. 	 
  51. 	--use body font for other languages to support special characters	 
  52. 	if game_get_language() ~= "US" then 
  53. 		error_msg1:set_property("font","thin") 
  54. 		error_msg2:set_property("font","thin") 
  55. 		error_msg3:set_property("font","thin") 
  56. 		error_msg4:set_property("font","thin") 
  57. 		 
  58. 		error_msg1:set_property("text_scale",.8,.8) 
  59. 		error_msg2:set_property("text_scale",.8,.8) 
  60. 		error_msg3:set_property("text_scale",.8,.8) 
  61. 		error_msg4:set_property("text_scale",.8,.8) 
  62. 	end 
  63. 	 
  64. 	error_msg1:set_text("*** STOP: 0x000001E (0X80000003, 0x80102035, 0x8025ea21, 0xfd682e9)\nUnhandled Kernel exception c000047 from fa8418b4 (8025ea21, fd6829e8)") 
  65. 	 
  66. 	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") 
  67. 	 
  68. 	if game_get_platform() == "PC" then 
  69. 		error_msg3:set_text("M17_ERROR_SCREEN_CONTINUE_MSG_PC") 
  70. 	else 
  71. 		error_msg3:set_text("M17_ERROR_SCREEN_CONTINUE_MSG") 
  72. 	end 
  73. 	 
  74. 	--reposition cursor at end of last sentence 
  75. 	local text_width, text_height = element_get_actual_size(error_msg3.handle) 
  76. 	local text_x, text_y = error_msg3:get_anchor() 
  77. 	 
  78. 	error_msg4:set_anchor(text_x + text_width, text_y)	 
  79. end 
  80.  
  81. function msn_cyber_cleanup() 
  82. 	Input_tracker_cyber:subscribe(false) 
  83. 	Input_tracker_lock:subscribe(false) 
  84. end 
  85.  
  86. function msn_cyber_start() 
  87. 	--play animation 
  88. 	local error_screen_anim = Vdo_anim_object:new("error_screen_anim") 
  89. 	local end_event_twn = Vdo_tween_object:new("end_event_twn",error_screen_anim.handle) 
  90. 	 
  91. 	end_event_twn:set_end_event("msn_cyber_enable_control") 
  92. 	 
  93. 	vint_apply_start_values(error_screen_anim.handle) 
  94. 	 
  95. 	error_screen_anim:play(0)	 
  96. end 
  97.  
  98. function msn_cyber_enable_control() 
  99. 	-- start hijacking input 
  100. 	Input_tracker_cyber:subscribe(true) 
  101. 	Input_tracker_lock:subscribe(false) 
  102.  
  103. end 
  104.  
  105. function msn_cyber_end() 
  106. 	-- stop hijacking input 
  107. 	Input_tracker_cyber:subscribe(false) 
  108. end 
  109.  
  110. function msn_cyber_button_a() 
  111. 	audio_object_post_event("Screen_Crash_Confirm") 
  112. 	pop_screen() 
  113. end 
  114.  
  115. function msn_cyber_button_b() 
  116. 	audio_object_post_event("Screen_Crash_Confirm") 
  117. 	pop_screen() 
  118. end