BizHawk/BizHawk.Client.Common/Global.cs

60 lines
2.3 KiB
C#
Raw Normal View History

2013-10-27 16:26:37 +00:00
using BizHawk.DiscSystem;
namespace BizHawk.Client.Common
2013-10-25 00:59:34 +00:00
{
public static class Global
{
public static IEmulator Emulator;
2013-10-27 16:26:37 +00:00
public static CoreComm CoreComm;
2013-10-25 00:59:34 +00:00
public static Config Config;
public static GameInfo Game;
public static CheatList CheatList;
//Movie
/// <summary>
/// the global MovieSession can use this to deal with multitrack player remapping (should this be here? maybe it should be in MovieSession)
/// </summary>
public static MultitrackRewiringControllerAdapter MultitrackRewiringControllerAdapter = new MultitrackRewiringControllerAdapter();
public static MovieSession MovieSession = new MovieSession();
public static bool ReadOnly = true; //Global Movie Read only setting
2013-10-27 07:54:00 +00:00
/// <summary>
/// whether throttling is force-disabled by use of fast forward
/// </summary>
public static bool ForceNoThrottle;
2013-10-27 16:26:37 +00:00
public static Controller NullControls;
public static AutofireController AutofireNullControls;
//the movie will be spliced inbetween these if it is present
public static CopyControllerAdapter MovieInputSourceAdapter = new CopyControllerAdapter();
public static CopyControllerAdapter MovieOutputHardpoint = new CopyControllerAdapter();
//dont take my word for it, since the final word is actually in RewireInputChain, but here is a guide...
//user -> Input -> ActiveController -> UDLR -> StickyXORPlayerInputAdapter -> TurboAdapter(TBD) -> Lua(?TBD?) -> ..
//.. -> MultitrackRewiringControllerAdapter -> MovieInputSourceAdapter -> (MovieSession) -> MovieOutputAdapter -> ControllerOutput(1) -> Game
//(1)->Input Display
//the original source controller, bound to the user, sort of the "input" port for the chain, i think
public static Controller ActiveController;
//rapid fire version on the user controller, has its own key bindings and is OR'ed against ActiveController
public static AutofireController AutoFireController;
//the "output" port for the controller chain.
public static CopyControllerAdapter ControllerOutput = new CopyControllerAdapter();
public static string GetOutputControllersAsMnemonic()
{
MnemonicsGenerator mg = new MnemonicsGenerator();
mg.SetSource(ControllerOutput);
return mg.GetControllersAsMnemonic();
}
public static DiscHopper DiscHopper = new DiscHopper();
2013-10-25 00:59:34 +00:00
}
}