dsda: parse our own config file
set vanilla res as a start
This commit is contained in:
parent
cde108b928
commit
905c972738
Binary file not shown.
|
@ -1,6 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
using BizHawk.BizInvoke;
|
||||
using BizHawk.Common;
|
||||
|
@ -71,6 +72,8 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
|||
uint totalWadSizeKb = (totalWadSize / 1024) + 1;
|
||||
Console.WriteLine("Reserving {0}kb for WAD file memory", totalWadSizeKb);
|
||||
|
||||
_configFile = Encoding.ASCII.GetBytes("screen_resolution \"320x200\"");
|
||||
|
||||
_elf = new WaterboxHost(new WaterboxOptions
|
||||
{
|
||||
Path = PathUtils.DllDirectoryPath,
|
||||
|
@ -105,6 +108,8 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
|||
if (!loadWadResult) throw new Exception($"Could not load WAD file: '{wadFile.RomPath}'");
|
||||
}
|
||||
|
||||
_elf.AddReadonlyFile(_configFile, "dsda-doom.cfg");
|
||||
|
||||
var initSettings = _syncSettings.GetNativeSettings(lp.Game);
|
||||
CreateArguments(initSettings);
|
||||
var initResult = Core.dsda_init(ref initSettings, _args.Count, _args.ToArray());
|
||||
|
@ -142,6 +147,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
|||
_args.AddRange([ "-skill", $"{(int)_syncSettings.SkillLevel}" ]);
|
||||
_args.AddRange([ "-warp", $"{_syncSettings.InitialEpisode}", $"{_syncSettings.InitialMap}" ]);
|
||||
_args.AddRange([ "-complevel", $"{(int)_syncSettings.CompatibilityMode}" ]);
|
||||
_args.AddRange([ "-config", "dsda-doom.cfg" ]);
|
||||
|
||||
ConditionalArg(!_syncSettings.StrictMode, "-tas");
|
||||
ConditionalArg(_syncSettings.MonstersRespawn, "-respawn");
|
||||
|
@ -169,6 +175,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
|||
private readonly CInterface Core;
|
||||
private readonly WaterboxHost _elf;
|
||||
private readonly DoomControllerDeck _controllerDeck;
|
||||
private readonly byte[] _configFile;
|
||||
private readonly int[] _runSpeeds = [ 25, 50 ];
|
||||
private readonly int[] _strafeSpeeds = [ 24, 40 ];
|
||||
private readonly int[] _turnSpeeds = [ 640, 1280, 320 ];
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 792aca883a380d18182545413f6b0fa441fb4524
|
||||
Subproject commit 2f1f11a633b504f79adc7670a97e17ba0c2adb77
|
Loading…
Reference in New Issue