Skip to content

Commit f0765a3

Browse files
committed
fix build
remove underscore from non-private fields expose wipe screen setting
1 parent 9351a04 commit f0765a3

File tree

5 files changed

+69
-64
lines changed

5 files changed

+69
-64
lines changed

src/BizHawk.Emulation.Common/Base Implementations/Bk2MnemonicLookup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ public static string LookupAxis(string button, string systemId)
820820
},
821821
[VSystemID.Raw.Doom] = new()
822822
{
823-
["Automap"] = "M",
823+
["Automap"] = 'M',
824824
["Backward"] = 'v',
825825
["End Player"] = 'E',
826826
["Fire"] = 'F',

src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.IEmulator.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -64,57 +64,57 @@ public bool FrameAdvance(IController controller, bool renderVideo, bool renderAu
6464
}
6565

6666
// initial axis read
67-
players[i]._RunSpeed = potReaders[i](controller, 0);
68-
players[i]._StrafingSpeed = potReaders[i](controller, 1);
69-
players[i]._TurningSpeed = potReaders[i](controller, 2);
70-
players[i]._WeaponSelect = potReaders[i](controller, 3);
67+
players[i].RunSpeed = potReaders[i](controller, 0);
68+
players[i].StrafingSpeed = potReaders[i](controller, 1);
69+
players[i].TurningSpeed = potReaders[i](controller, 2);
70+
players[i].WeaponSelect = potReaders[i](controller, 3);
7171

7272
// override axis based on movement buttons (turning is reversed upstream)
73-
if (controller.IsPressed($"P{i+1} Forward")) players[i]._RunSpeed = _runSpeeds[speedIndex];
74-
if (controller.IsPressed($"P{i+1} Backward")) players[i]._RunSpeed = -_runSpeeds[speedIndex];
75-
if (controller.IsPressed($"P{i+1} Strafe Right")) players[i]._StrafingSpeed = _strafeSpeeds[speedIndex];
76-
if (controller.IsPressed($"P{i+1} Strafe Left")) players[i]._StrafingSpeed = -_strafeSpeeds[speedIndex];
77-
if (controller.IsPressed($"P{i + 1} Turn Right")) players[i]._TurningSpeed = -turnSpeed;
78-
if (controller.IsPressed($"P{i + 1} Turn Left")) players[i]._TurningSpeed = turnSpeed;
73+
if (controller.IsPressed($"P{i + 1} Forward")) players[i].RunSpeed = _runSpeeds[speedIndex];
74+
if (controller.IsPressed($"P{i + 1} Backward")) players[i].RunSpeed = -_runSpeeds[speedIndex];
75+
if (controller.IsPressed($"P{i + 1} Strafe Right")) players[i].StrafingSpeed = _strafeSpeeds[speedIndex];
76+
if (controller.IsPressed($"P{i + 1} Strafe Left")) players[i].StrafingSpeed = -_strafeSpeeds[speedIndex];
77+
if (controller.IsPressed($"P{i + 1} Turn Right")) players[i].TurningSpeed = -turnSpeed;
78+
if (controller.IsPressed($"P{i + 1} Turn Left")) players[i].TurningSpeed = turnSpeed;
7979

8080
// mouse-driven running
8181
// divider matches the core
82-
players[i]._RunSpeed -= (int)(potReaders[i](controller, 4) * _syncSettings.MouseRunSensitivity / 8.0);
83-
players[i]._RunSpeed = players[i]._RunSpeed.Clamp<int>(-_runSpeeds[1], _runSpeeds[1]);
82+
players[i].RunSpeed -= (int)(potReaders[i](controller, 4) * _syncSettings.MouseRunSensitivity / 8.0);
83+
players[i].RunSpeed = players[i].RunSpeed.Clamp<int>(-_runSpeeds[1], _runSpeeds[1]);
8484

8585
// mouse-driven turning
8686
// divider recalibrates minimal mouse movement to be 1 (requires global setting)
87-
players[i]._TurningSpeed -= (int)(potReaders[i](controller, 5) * _syncSettings.MouseTurnSensitivity / 272.0);
87+
players[i].TurningSpeed -= (int)(potReaders[i](controller, 5) * _syncSettings.MouseTurnSensitivity / 272.0);
8888
if (_syncSettings.TurningResolution == TurningResolution.Shorttics)
8989
{
9090
// calc matches the core
91-
players[i]._TurningSpeed = ((players[i]._TurningSpeed << 8) + 128) >> 8;
91+
players[i].TurningSpeed = ((players[i].TurningSpeed << 8) + 128) >> 8;
9292
}
9393

9494
// bool buttons
9595
var actionsBitfield = portReaders[i](controller);
96-
players[i]._Fire = actionsBitfield & 0b00001;
97-
players[i]._Action = (actionsBitfield & 0b00010) >> 1;
98-
players[i]._Automap = (actionsBitfield & 0b00100) >> 2;
96+
players[i].Fire = actionsBitfield & 0b00001;
97+
players[i].Action = (actionsBitfield & 0b00010) >> 1;
98+
players[i].Automap = (actionsBitfield & 0b00100) >> 2;
9999

100100
// Raven Games
101101
if (_syncSettings.InputFormat is DoomControllerTypes.Heretic or DoomControllerTypes.Hexen)
102102
{
103-
players[i]._FlyLook = potReaders[i](controller, 6);
104-
players[i]._ArtifactUse = potReaders[i](controller, 7);
103+
players[i].FlyLook = potReaders[i](controller, 6);
104+
players[i].ArtifactUse = potReaders[i](controller, 7);
105105
if (_syncSettings.InputFormat is DoomControllerTypes.Hexen)
106106
{
107-
players[i]._Jump = (actionsBitfield & 0b01000) >> 3;
108-
players[i]._EndPlayer = (actionsBitfield & 0b10000) >> 4;
107+
players[i].Jump = (actionsBitfield & 0b01000) >> 3;
108+
players[i].EndPlayer = (actionsBitfield & 0b10000) >> 4;
109109
}
110110
}
111111
}
112112
}
113113

114114
PackedRenderInfo renderInfo = new PackedRenderInfo();
115-
renderInfo._RenderVideo = renderVideo ? 1 : 0;
116-
renderInfo._RenderAudio = renderAudio ? 1 : 0;
117-
renderInfo._PlayerPointOfView = _settings.DisplayPlayer - 1;
115+
renderInfo.RenderVideo = renderVideo ? 1 : 0;
116+
renderInfo.RenderAudio = renderAudio ? 1 : 0;
117+
renderInfo.PlayerPointOfView = _settings.DisplayPlayer - 1;
118118

119119
IsLagFrame = _core.dsda_frame_advance(
120120
ref players[0],

src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.ISettable.cs

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ public class DoomSyncSettings
259259
[DefaultValue(true)]
260260
public bool AlwaysRun { get; set; }
261261

262+
[DisplayName("Render Wipescreen")]
263+
[Description("Enables screen melt - an effect seen when Doom changes scene, for example, when starting or exiting a level.")]
264+
[DefaultValue(true)]
265+
public bool RenderWipescreen { get; set; }
266+
262267
[DisplayName("Turning Resolution")]
263268
[Description("\"Shorttics\" refers to decreased turning resolution used for demos. \"Longtics\" refers to the regular turning resolution outside of a demo-recording environment.")]
264269
[DefaultValue(TurningResolution.Longtics)]
@@ -313,16 +318,16 @@ public CInterface.InitSettings GetNativeSettings(GameInfo game)
313318
{
314319
return new CInterface.InitSettings
315320
{
316-
_Player1Present = Player1Present ? 1 : 0,
317-
_Player2Present = Player2Present ? 1 : 0,
318-
_Player3Present = Player3Present ? 1 : 0,
319-
_Player4Present = Player4Present ? 1 : 0,
320-
_Player1Class = (int) Player1Class,
321-
_Player2Class = (int) Player2Class,
322-
_Player3Class = (int) Player3Class,
323-
_Player4Class = (int) Player4Class,
324-
_PreventLevelExit = PreventLevelExit ? 1 : 0,
325-
_PreventGameEnd = PreventGameEnd ? 1 : 0
321+
Player1Present = Player1Present ? 1 : 0,
322+
Player2Present = Player2Present ? 1 : 0,
323+
Player3Present = Player3Present ? 1 : 0,
324+
Player4Present = Player4Present ? 1 : 0,
325+
Player1Class = (int) Player1Class,
326+
Player2Class = (int) Player2Class,
327+
Player3Class = (int) Player3Class,
328+
Player4Class = (int) Player4Class,
329+
PreventLevelExit = PreventLevelExit ? 1 : 0,
330+
PreventGameEnd = PreventGameEnd ? 1 : 0
326331
// MouseRunSensitivity is handled at Bizhawk level
327332
// MouseTurnSensitivity is handled at Bizhawk level
328333
};

src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ public DSDA(CoreLoadParameters<DoomSettings, DoomSyncSettings> lp)
7777
_nativeResolution.X * _settings.ScaleFactor}x{
7878
_nativeResolution.Y * _settings.ScaleFactor}\"\n"
7979
+ $"usegamma {_settings.Gamma}\n"
80-
+ "dsda_exhud 0\n"
81-
+ "dsda_pistol_start 0\n"
82-
+ "uncapped_framerate 0\n"
80+
+ $"render_wipescreen {(_syncSettings.RenderWipescreen ? 1 : 0)}\n"
8381
+ "render_aspect 3\n" // 4:3, controls FOV on higher resolutions (see SetRatio())
8482
+ "render_stretch_hud 0\n"
8583
+ "render_stretchsky 0\n"
8684
+ "render_doom_lightmaps 1\n"
87-
+ "render_wipescreen 1\n"
85+
+ "dsda_exhud 0\n"
86+
+ "uncapped_framerate 0\n"
8887
+ "map_coordinates 0\n"
8988
+ "map_totals 0\n"
89+
+ "map_time 0\n"
9090
);
9191

9292
_elf = new WaterboxHost(new WaterboxOptions
@@ -178,7 +178,7 @@ private void CreateArguments(CInterface.InitSettings initSettings)
178178
ConditionalArg(_syncSettings.MultiplayerMode == MultiplayerMode.Deathmatch, "-deathmatch");
179179
ConditionalArg(_syncSettings.MultiplayerMode == MultiplayerMode.Altdeath, "-altdeath");
180180
ConditionalArg(_syncSettings.Turbo > 0, $"-turbo {_syncSettings.Turbo}");
181-
ConditionalArg((initSettings._Player1Present + initSettings._Player2Present + initSettings._Player3Present + initSettings._Player4Present) > 1, "-solo-net");
181+
ConditionalArg((initSettings.Player1Present + initSettings.Player2Present + initSettings.Player3Present + initSettings.Player4Present) > 1, "-solo-net");
182182
}
183183

184184
private void ConditionalArg(bool condition, string setting)

src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,44 +29,44 @@ public enum GameMode : int
2929
[StructLayout(LayoutKind.Sequential)]
3030
public struct InitSettings
3131
{
32-
public int _Player1Present;
33-
public int _Player2Present;
34-
public int _Player3Present;
35-
public int _Player4Present;
36-
public int _Player1Class;
37-
public int _Player2Class;
38-
public int _Player3Class;
39-
public int _Player4Class;
40-
public int _PreventLevelExit;
41-
public int _PreventGameEnd;
32+
public int Player1Present;
33+
public int Player2Present;
34+
public int Player3Present;
35+
public int Player4Present;
36+
public int Player1Class;
37+
public int Player2Class;
38+
public int Player3Class;
39+
public int Player4Class;
40+
public int PreventLevelExit;
41+
public int PreventGameEnd;
4242
}
4343

4444
[StructLayout(LayoutKind.Sequential)]
4545
public struct PackedPlayerInput
4646
{
47-
public int _RunSpeed;
48-
public int _StrafingSpeed;
49-
public int _TurningSpeed;
50-
public int _WeaponSelect;
51-
public int _Fire;
52-
public int _Action;
53-
public int _Automap;
47+
public int RunSpeed;
48+
public int StrafingSpeed;
49+
public int TurningSpeed;
50+
public int WeaponSelect;
51+
public int Fire;
52+
public int Action;
53+
public int Automap;
5454

5555
// Hexen + Heretic (Raven Games)
56-
public int _FlyLook;
57-
public int _ArtifactUse;
56+
public int FlyLook;
57+
public int ArtifactUse;
5858

5959
// Hexen only
60-
public int _Jump;
61-
public int _EndPlayer;
60+
public int Jump;
61+
public int EndPlayer;
6262
}
6363

6464
[StructLayout(LayoutKind.Sequential)]
6565
public struct PackedRenderInfo
6666
{
67-
public int _RenderVideo;
68-
public int _RenderAudio;
69-
public int _PlayerPointOfView;
67+
public int RenderVideo;
68+
public int RenderAudio;
69+
public int PlayerPointOfView;
7070
}
7171

7272
[BizImport(CallingConvention.Cdecl)]

0 commit comments

Comments
 (0)