BizHawk/BizHawk.MultiClient/Global.cs

105 lines
4.2 KiB
C#
Raw Normal View History

using BizHawk.DiscSystem;
using SlimDX.Direct3D9;
2011-01-11 02:55:51 +00:00
using SlimDX.DirectSound;
namespace BizHawk.MultiClient
{
public static class Global
{
public static MainForm MainForm;
public static DirectSound DSound;
public static Direct3D Direct3D;
public static Sound Sound;
public static IRenderer RenderPanel;
public static Config Config;
public static IEmulator Emulator;
public static CoreInputComm CoreInputComm;
public static GameInfo Game;
public static Controller SMSControls;
public static Controller PCEControls;
public static Controller GenControls;
public static Controller TI83Controls;
public static Controller NESControls;
public static Controller GBControls;
public static Controller NullControls;
public static CheatList CheatList;
public static AutofireController AutofireNullControls;
public static AutofireController AutofireNESControls;
public static AutofireController AutofireSMSControls;
public static AutofireController AutofirePCEControls;
public static AutofireController AutofireGBControls;
public static AutofireController AutofireGenControls;
/// <summary>
/// whether vsync is force-disabled by use of fast forward
/// </summary>
public static bool ForceNoVsync;
2011-07-24 23:14:16 +00:00
//the movie will be spliced inbetween these if it is present
public static CopyControllerAdapter MovieInputSourceAdapter = new CopyControllerAdapter();
2011-08-21 04:44:40 +00:00
public static CopyControllerAdapter MovieOutputHardpoint = new CopyControllerAdapter();
2011-07-24 23:14:16 +00:00
/// <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();
2011-07-24 23:14:16 +00:00
public static MovieSession MovieSession = new MovieSession();
2011-07-24 19:52:13 +00:00
//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?) -> ..
2011-07-24 23:14:16 +00:00
//.. -> 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.
2011-07-24 23:14:16 +00:00
public static CopyControllerAdapter ControllerOutput = new CopyControllerAdapter();
2011-07-10 07:39:40 +00:00
//input state which has been destined for game controller inputs are coalesced here
public static InputCoalescer ControllerInputCoalescer = new InputCoalescer();
//input state which has been destined for client hotkey consumption are colesced here
public static InputCoalescer HotkeyCoalescer = new InputCoalescer();
2011-07-10 06:24:04 +00:00
public static UD_LR_ControllerAdapter UD_LR_ControllerAdapter = new UD_LR_ControllerAdapter();
2011-07-10 02:14:58 +00:00
2011-07-24 19:52:13 +00:00
/// <summary>
/// provides an opportunity to mutate the player's input in an autohold style
/// </summary>
public static StickyXORAdapter StickyXORAdapter = new StickyXORAdapter();
/// <summary>
/// will OR together two IControllers
/// </summary>
public static ORAdapter OrControllerAdapter = new ORAdapter();
/// <summary>
/// fire off one-frame logical button clicks here. useful for things like ti-83 virtual pad and reset buttons
/// </summary>
2011-07-24 20:23:27 +00:00
public static ClickyVirtualPadController ClickyVirtualPadController = new ClickyVirtualPadController();
2011-07-24 23:14:16 +00:00
public static SimpleController MovieOutputController = new SimpleController();
2011-07-10 07:39:40 +00:00
public static Controller ClientControls;
public static string GetOutputControllersAsMnemonic()
{
MnemonicsGenerator mg = new MnemonicsGenerator();
mg.SetSource(Global.ControllerOutput);
return mg.GetControllersAsMnemonic();
}
public static DiscHopper DiscHopper = new DiscHopper();
2011-07-24 06:45:05 +00:00
public static CoreAccessor PsxCoreLibrary = new CoreAccessor(new Win32LibAccessor("PsxHawk.Core.dll"));
}
2011-01-11 02:55:51 +00:00
}