BizHawk/BizHawk.Client.Common/Global.cs

74 lines
3.4 KiB
C#
Raw Normal View History

2019-12-20 16:22:42 +00:00
using System.Collections.Generic;
using BizHawk.Emulation.Common;
// ReSharper disable StyleCop.SA1401
2013-10-27 16:26:37 +00:00
namespace BizHawk.Client.Common
2013-10-25 00:59:34 +00:00
{
public static class Global
{
public static IEmulator Emulator;
public static Config Config;
public static GameInfo Game;
public static CheatCollection CheatList;
public static FirmwareManager FirmwareManager;
2013-10-25 00:59:34 +00:00
public static IMovieSession MovieSession = new MovieSession();
2013-10-27 07:54:00 +00:00
/// <summary>
/// Used to disable secondary throttling (e.g. vsync, audio) for unthrottled modes or when the primary (clock) throttle is taking over (e.g. during fast forward/rewind).
2013-10-27 07:54:00 +00:00
/// </summary>
public static bool DisableSecondaryThrottling;
2013-10-27 16:26:37 +00:00
/// <summary>
/// The maximum number of milliseconds the sound output buffer can go below full before causing a noticeable sound interruption.
/// </summary>
public static int SoundMaxBufferDeficitMs;
2019-12-20 16:24:54 +00:00
// the movie will be spliced in between these if it is present
2017-05-19 18:17:07 +00:00
public static readonly CopyControllerAdapter MovieInputSourceAdapter = new CopyControllerAdapter();
public static readonly CopyControllerAdapter MovieOutputHardpoint = new CopyControllerAdapter();
public static readonly MultitrackRewiringControllerAdapter MultitrackRewiringAdapter = new MultitrackRewiringControllerAdapter();
2013-10-27 16:26:37 +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?) -> ..
// .. -> MultitrackRewiringControllerAdapter -> MovieInputSourceAdapter -> (MovieSession) -> MovieOutputAdapter -> ControllerOutput(1) -> Game
// (1)->Input Display
2013-10-27 16:26:37 +00:00
// the original source controller, bound to the user, sort of the "input" port for the chain, i think
2013-10-27 16:26:37 +00:00
public static Controller ActiveController;
2017-05-09 18:19:55 +00:00
// rapid fire version on the user controller, has its own key bindings and is OR'ed against ActiveController
2013-10-27 16:26:37 +00:00
public static AutofireController AutoFireController;
// the "output" port for the controller chain.
2017-05-19 18:17:07 +00:00
public static readonly CopyControllerAdapter ControllerOutput = new CopyControllerAdapter();
2013-10-27 16:26:37 +00:00
2017-05-19 18:17:07 +00:00
public static readonly UD_LR_ControllerAdapter UD_LR_ControllerAdapter = new UD_LR_ControllerAdapter();
2013-11-03 16:47:21 +00:00
2017-05-19 18:17:07 +00:00
public static readonly AutoFireStickyXorAdapter AutofireStickyXORAdapter = new AutoFireStickyXorAdapter();
2013-11-03 16:47:21 +00:00
/// <summary>
/// provides an opportunity to mutate the player's input in an autohold style
/// </summary>
2017-05-19 18:17:07 +00:00
public static readonly StickyXorAdapter StickyXORAdapter = new StickyXorAdapter();
/// <summary>
/// Used to AND to another controller, used for <see cref="JoypadApi.Set(System.Collections.Generic.Dictionary{string,bool},System.Nullable{int})">JoypadApi.Set</see>
/// </summary>
public static readonly OverrideAdaptor ButtonOverrideAdaptor = new OverrideAdaptor();
/// <summary>
/// fire off one-frame logical button clicks here. useful for things like ti-83 virtual pad and reset buttons
/// </summary>
2017-05-19 18:17:07 +00:00
public static readonly ClickyVirtualPadController ClickyVirtualPadController = new ClickyVirtualPadController();
2013-11-03 16:47:21 +00:00
public static Controller ClientControls;
// Input state which has been estine for game controller inputs are coalesce here
// This relies on a client specific implementation!
public static SimpleController ControllerInputCoalescer;
public static Dictionary<string, object> UserBag = new Dictionary<string, object>();
2013-10-25 00:59:34 +00:00
}
}