dsda: full vision option

I was unable to make it launch with full vision on the very first frame unless it's set during init. which means there will be savestate problems if we allow switching this on the fly. setting it on init only is probably fine too.
This commit is contained in:
feos 2025-06-28 23:45:36 +03:00
parent 396d67caac
commit 5a105a156f
6 changed files with 22 additions and 1 deletions

Binary file not shown.

View File

@ -246,6 +246,11 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
[TypeConverter(typeof(DescribableEnumConverter))]
public MapDetail MapDetails { get; set; }
[DisplayName("Full Vision")]
[Description("Disables all darkness.\n\nAvailable in vanilla via the IDBEHOLDL cheat code.\n\nRequires restart.")]
[DefaultValue(false)]
public bool FullVision { get; set; }
[DisplayName("Player Point of View")]
[Description("Which of the players' point of view to use during rendering.")]
[Range(1, 4)]
@ -271,7 +276,8 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
paramName: nameof(o));
}
var ret = (_settings.ScaleFactor == o.ScaleFactor
&& _settings.InternalAspect == o.InternalAspect)
&& _settings.InternalAspect == o.InternalAspect
&& _settings.FullVision == o.FullVision)
? PutSettingsDirtyBits.None
: PutSettingsDirtyBits.RebootCore;
_settings = o;

View File

@ -179,6 +179,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
_elf.AddReadonlyFile(_configFile, "dsda-doom.cfg");
var initSettings = _syncSettings.GetNativeSettings();
initSettings.FullVision = _settings.FullVision ? 1 : 0;
CreateArguments(initSettings);
var initResult = _core.dsda_init(ref initSettings, _args.Count, _args.ToArray());
if (!initResult)

View File

@ -58,6 +58,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
public int Player4Class;
public int PreventLevelExit;
public int PreventGameEnd;
public int FullVision;
//public uint RNGSeed;
}

View File

@ -368,6 +368,18 @@ ECL_EXPORT int dsda_init(struct InitSettings *settings, int argc, char **argv)
// Enabling DSDA output, for debugging
enableOutput = 1;
if (settings->FullVision)
{
for (int i = 0; i < 4; i++)
{
if (playeringame[i])
{
players[i].fixedcolormap = 1;
players[i].powers[pw_infrared] = -1;
}
}
}
return 1;
}

View File

@ -155,6 +155,7 @@ struct InitSettings
int Player4Class;
int PreventLevelExit;
int PreventGameEnd;
int FullVision;
//unsigned int RNGSeed;
} __attribute__((packed));