diff --git a/SRC/Aura_Boot/Aura_Boot.csproj b/SRC/Aura_Boot/Aura_Boot.csproj
index 45453b67..0eea096d 100644
--- a/SRC/Aura_Boot/Aura_Boot.csproj
+++ b/SRC/Aura_Boot/Aura_Boot.csproj
@@ -12,7 +12,7 @@
Source
False
bin\Debug\net6.0\Aura_Boot.iso
- True
+ False
False
VMware
Pipe: Cosmos\Serial
diff --git a/SRC/Aura_OS/Aura_OS.csproj b/SRC/Aura_OS/Aura_OS.csproj
index cf8351d1..8cc1058d 100644
--- a/SRC/Aura_OS/Aura_OS.csproj
+++ b/SRC/Aura_OS/Aura_OS.csproj
@@ -24,10 +24,12 @@
+
+
diff --git a/SRC/Aura_OS/Files.cs b/SRC/Aura_OS/Files.cs
index 86d7e1b7..121416a3 100644
--- a/SRC/Aura_OS/Files.cs
+++ b/SRC/Aura_OS/Files.cs
@@ -21,6 +21,9 @@ public class Files
[ManifestResourceStream(ResourceName = "Aura_OS.Resources.wallpaper1920.bmp")]
public static byte[] Wallpaper;
+ [ManifestResourceStream(ResourceName = "Aura_OS.Resources.doom1.wad")]
+ public static byte[] DoomWad;
+
public static void LoadFiles()
{
CustomConsole.WriteLineInfo("Checking for ISO9660 volume...");
diff --git a/SRC/Aura_OS/Kernel.cs b/SRC/Aura_OS/Kernel.cs
index 3e696413..31fe8b0d 100644
--- a/SRC/Aura_OS/Kernel.cs
+++ b/SRC/Aura_OS/Kernel.cs
@@ -181,8 +181,6 @@ public static void BeforeRun()
Running = true;
}
- private static int lastHeapCollectTime = -1;
-
public static void Run()
{
try
@@ -192,18 +190,12 @@ public static void Run()
_fps = _frames;
_frames = 0;
_deltaT = RTC.Second;
-
- lastHeapCollectTime++;
-
- if (lastHeapCollectTime >= 3)
- {
- FreeCount = Heap.Collect();
- lastHeapCollectTime = 0;
- }
}
_frames++;
+ FreeCount = Heap.Collect();
+
UpdateUI();
canvas.Display();
diff --git a/SRC/Aura_OS/Properties/VersionInfo.cs b/SRC/Aura_OS/Properties/VersionInfo.cs
index 2b82cf75..aa85d742 100644
--- a/SRC/Aura_OS/Properties/VersionInfo.cs
+++ b/SRC/Aura_OS/Properties/VersionInfo.cs
@@ -2,6 +2,6 @@ namespace Aura_OS
{
public class VersionInfo
{
- public static string revision = "090120241014";
+ public static string revision = "150120241337";
}
}
diff --git a/SRC/Aura_OS/Resources/doom1.wad b/SRC/Aura_OS/Resources/doom1.wad
new file mode 100644
index 00000000..1a58f662
Binary files /dev/null and b/SRC/Aura_OS/Resources/doom1.wad differ
diff --git a/SRC/Aura_OS/System/Processing/Application/Emulators/GameBoyEmu/Utils/DirectBitmap.cs b/SRC/Aura_OS/System/Graphics/UI/GUI/Components/DirectBitmap.cs
similarity index 70%
rename from SRC/Aura_OS/System/Processing/Application/Emulators/GameBoyEmu/Utils/DirectBitmap.cs
rename to SRC/Aura_OS/System/Graphics/UI/GUI/Components/DirectBitmap.cs
index aa0a857b..8a02b5ec 100644
--- a/SRC/Aura_OS/System/Processing/Application/Emulators/GameBoyEmu/Utils/DirectBitmap.cs
+++ b/SRC/Aura_OS/System/Graphics/UI/GUI/Components/DirectBitmap.cs
@@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using Cosmos.System.Graphics;
-namespace Aura_OS.System.Processing.Application.Emulators.GameBoyEmu.Utils
+namespace Aura_OS.System.Graphics.UI.GUI.Components
{
public class DirectBitmap
{
@@ -17,6 +17,18 @@ public DirectBitmap()
Bitmap = new Bitmap((uint)Width, (uint)Height, ColorDepth.ColorDepth32);
}
+ public DirectBitmap(byte[] data)
+ {
+ Bitmap = new Bitmap(data);
+ }
+
+ public DirectBitmap(int width, int height)
+ {
+ Width = width;
+ Height = height;
+ Bitmap = new Bitmap((uint)Width, (uint)Height, ColorDepth.ColorDepth32);
+ }
+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void SetPixel(int x, int y, int colour)
{
diff --git a/SRC/Aura_OS/System/Processing/Application/ApplicationManager.cs b/SRC/Aura_OS/System/Processing/Application/ApplicationManager.cs
index 2f453d19..fb59ab10 100644
--- a/SRC/Aura_OS/System/Processing/Application/ApplicationManager.cs
+++ b/SRC/Aura_OS/System/Processing/Application/ApplicationManager.cs
@@ -49,6 +49,7 @@ public void LoadApplications()
RegisterApplication(typeof(SystemInfo), 40, 40, 402, 360);
RegisterApplication(typeof(Cube), 40, 40, 200, 200);
RegisterApplication(typeof(GameBoyEmu), 40, 40, 160 + 4, 144 + 22);
+ RegisterApplication(typeof(DoomApp), 40, 40, 320 + 4, 200 + 22 + 200);
}
public void RegisterApplication(ApplicationConfig config)
@@ -92,6 +93,10 @@ public Graphics.UI.GUI.Application Instantiate(ApplicationConfig config)
{
app = new Explorer(Kernel.CurrentVolume, config.Weight, config.Height, config.X, config.Y);
}
+ else if (config.Template == typeof(DoomApp))
+ {
+ app = new DoomApp(config.Weight, config.Height, config.X, config.Y);
+ }
else
{
throw new InvalidOperationException("Type d'application non reconnu.");
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/Debugger.cs b/SRC/Aura_OS/System/Processing/Application/Doom/Debugger.cs
new file mode 100644
index 00000000..be4b3e1e
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/Debugger.cs
@@ -0,0 +1,26 @@
+using Aura_OS.System.Graphics.UI.GUI.Components;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aura_OS.System.Processing.Application.Doom
+{
+ public class Debugger
+ {
+ public string Text = "";
+
+ public Debugger() { }
+
+ public void Write(string message)
+ {
+ Text += message;
+ }
+
+ public void WriteLine(string message)
+ {
+ Text += message += "\n";
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/Doom.cs b/SRC/Aura_OS/System/Processing/Application/Doom/Doom.cs
new file mode 100644
index 00000000..646fce46
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/Doom.cs
@@ -0,0 +1,100 @@
+/*
+* PROJECT: Aura Operating System Development
+* CONTENT: Doom
+* PROGRAMMERS: Valentin Charbonnier
+*/
+
+using Aura_OS.System.Graphics;
+using Aura_OS.System.Graphics.UI.GUI.Components;
+using Aura_OS.System.Processing.Application.Doom;
+using Cosmos.System;
+using Cosmos.System.FileSystem;
+using System;
+using System.IO;
+
+namespace Aura_OS.System.Processing.Application
+{
+ public class DoomApp : Graphics.UI.GUI.Application
+ {
+ public static string ApplicationName = "Doom";
+
+ public Panel TopPanel;
+ public Button Screenshot;
+
+ static ManagedDoom.DoomApplication app = null;
+
+ public static Debugger debugger = new Debugger();
+
+ bool calledAfterRender = false;
+
+ static float framesPerSecond;
+
+ private string[] args = { };
+ private string[] configLines = { };
+
+ public DoomApp(int width, int height, int x = 0, int y = 0) : base(ApplicationName, width, height, x, y)
+ {
+ TopPanel = new Panel(Kernel.Gray, x + 1, y + 1, width - 6, 22);
+ TopPanel.Borders = true;
+
+ string text = "Screenshot";
+ int textWidth = text.Length * (Kernel.font.Width + 1);
+ Screenshot = new Button(text, x + 3, y + 3, textWidth, 18);
+ Screenshot.Action = new Action(() =>
+ {
+ File.Create(Kernel.CurrentDirectory + "screenshot.bmp");
+ app.renderer.bitmap.Bitmap.Save(Kernel.CurrentDirectory + "screenshot.bmp");
+ });
+
+ app = null;
+ var commandLineArgs = new ManagedDoom.CommandLineArgs(args);
+ app = new ManagedDoom.DoomApplication(commandLineArgs, configLines);
+ }
+
+ public override void UpdateApp()
+ {
+ app.renderer.X = x;
+ app.renderer.Y = y + 23;
+
+ if (app == null)
+ {
+ return;
+ }
+
+ uint[] upKeys = { };
+ uint[] downKeys = { };
+
+ app.Run(upKeys, downKeys);
+
+ string[] lines = debugger.Text.Split('\n');
+ int maxLinesToShow = 17;
+ int startIndex = Math.Max(0, lines.Length - maxLinesToShow); // Ensure you don't go below 0
+ int dy = 0;
+
+ for (int i = startIndex; i < lines.Length; i++)
+ {
+ string line = lines[i];
+ Kernel.canvas.DrawString(line, Kernel.font, Kernel.BlackColor, x + 2, y + 23 + 200 + 4 + dy);
+ dy += 12;
+ }
+
+ TopPanel.X = x + 1;
+ TopPanel.Y = y + 1;
+ TopPanel.Update();
+ Screenshot.X = x + 3;
+ Screenshot.Y = y + 3;
+ Screenshot.Update();
+ }
+
+ public override void HandleLeftClick()
+ {
+ base.HandleLeftClick();
+
+ if (Screenshot.IsInside((int)MouseManager.X, (int)MouseManager.Y))
+ {
+ Screenshot.Action();
+ return;
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/ApplicationInfo.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/ApplicationInfo.cs
new file mode 100644
index 00000000..e415d20e
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/ApplicationInfo.cs
@@ -0,0 +1,26 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static class ApplicationInfo
+ {
+ public static readonly string Title = "Managed Doom v1.1b";
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/ApplicationState.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/ApplicationState.cs
new file mode 100644
index 00000000..c76e9abd
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/ApplicationState.cs
@@ -0,0 +1,29 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum ApplicationState
+ {
+ None,
+ Opening,
+ DemoPlayback,
+ Game
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/Bgm.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/Bgm.cs
new file mode 100644
index 00000000..e31e0a3a
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/Bgm.cs
@@ -0,0 +1,93 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum Bgm
+ {
+ NONE,
+ E1M1,
+ E1M2,
+ E1M3,
+ E1M4,
+ E1M5,
+ E1M6,
+ E1M7,
+ E1M8,
+ E1M9,
+ E2M1,
+ E2M2,
+ E2M3,
+ E2M4,
+ E2M5,
+ E2M6,
+ E2M7,
+ E2M8,
+ E2M9,
+ E3M1,
+ E3M2,
+ E3M3,
+ E3M4,
+ E3M5,
+ E3M6,
+ E3M7,
+ E3M8,
+ E3M9,
+ INTER,
+ INTRO,
+ BUNNY,
+ VICTOR,
+ INTROA,
+ RUNNIN,
+ STALKS,
+ COUNTD,
+ BETWEE,
+ DOOM,
+ THE_DA,
+ SHAWN,
+ DDTBLU,
+ IN_CIT,
+ DEAD,
+ STLKS2,
+ THEDA2,
+ DOOM2,
+ DDTBL2,
+ RUNNI2,
+ DEAD2,
+ STLKS3,
+ ROMERO,
+ SHAWN2,
+ MESSAG,
+ COUNT2,
+ DDTBL3,
+ AMPIE,
+ THEDA3,
+ ADRIAN,
+ MESSG2,
+ ROMER2,
+ TENSE,
+ SHAWN3,
+ OPENIN,
+ EVIL,
+ ULTIMA,
+ READ_M,
+ DM2TTL,
+ DM2INT
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/IMusic.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/IMusic.cs
new file mode 100644
index 00000000..b0ed5e55
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/IMusic.cs
@@ -0,0 +1,29 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom.Audio
+{
+ public interface IMusic
+ {
+ void StartMusic(Bgm bgm, bool loop);
+
+ public int MaxVolume { get; }
+ public int Volume { get; set; }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/ISound.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/ISound.cs
new file mode 100644
index 00000000..9ffda617
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/ISound.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom.Audio
+{
+ public interface ISound
+ {
+ public void SetListener(Mobj listener);
+ public void Update();
+ public void StartSound(Sfx sfx);
+ public void StartSound(Mobj mobj, Sfx sfx, SfxType type);
+ public void StartSound(Mobj mobj, Sfx sfx, SfxType type, int volume);
+ public void StopSound(Mobj mobj);
+ public void Reset();
+ public void Pause();
+ public void Resume();
+
+ public int MaxVolume { get; }
+ public int Volume { get; set; }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/NullMusic.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/NullMusic.cs
new file mode 100644
index 00000000..43393139
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/NullMusic.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom.Audio
+{
+ public sealed class NullMusic : IMusic
+ {
+ private static NullMusic instance;
+
+ public static NullMusic GetInstance()
+ {
+ if (instance == null)
+ {
+ instance = new NullMusic();
+ }
+
+ return instance;
+ }
+
+ public void StartMusic(Bgm bgm, bool loop)
+ {
+ }
+
+ public int MaxVolume
+ {
+ get
+ {
+ return 15;
+ }
+ }
+
+ public int Volume
+ {
+ get
+ {
+ return 0;
+ }
+
+ set
+ {
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/NullSound.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/NullSound.cs
new file mode 100644
index 00000000..9805e856
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/NullSound.cs
@@ -0,0 +1,92 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom.Audio
+{
+ public sealed class NullSound : ISound
+ {
+ private static NullSound instance;
+
+ public static NullSound GetInstance()
+ {
+ if (instance == null)
+ {
+ instance = new NullSound();
+ }
+
+ return instance;
+ }
+
+ public void SetListener(Mobj listerner)
+ {
+ }
+
+ public void Update()
+ {
+ }
+
+ public void StartSound(Sfx sfx)
+ {
+ }
+
+ public void StartSound(Mobj mobj, Sfx sfx, SfxType type)
+ {
+ }
+
+ public void StartSound(Mobj mobj, Sfx sfx, SfxType type, int volume)
+ {
+ }
+
+ public void StopSound(Mobj mobj)
+ {
+ }
+
+ public void Reset()
+ {
+ }
+
+ public void Pause()
+ {
+ }
+
+ public void Resume()
+ {
+ }
+
+ public int MaxVolume
+ {
+ get
+ {
+ return 15;
+ }
+ }
+
+ public int Volume
+ {
+ get
+ {
+ return 0;
+ }
+
+ set
+ {
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/Sfx.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/Sfx.cs
new file mode 100644
index 00000000..1d57cfe5
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/Sfx.cs
@@ -0,0 +1,134 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum Sfx
+ {
+ NONE,
+ PISTOL,
+ SHOTGN,
+ SGCOCK,
+ DSHTGN,
+ DBOPN,
+ DBCLS,
+ DBLOAD,
+ PLASMA,
+ BFG,
+ SAWUP,
+ SAWIDL,
+ SAWFUL,
+ SAWHIT,
+ RLAUNC,
+ RXPLOD,
+ FIRSHT,
+ FIRXPL,
+ PSTART,
+ PSTOP,
+ DOROPN,
+ DORCLS,
+ STNMOV,
+ SWTCHN,
+ SWTCHX,
+ PLPAIN,
+ DMPAIN,
+ POPAIN,
+ VIPAIN,
+ MNPAIN,
+ PEPAIN,
+ SLOP,
+ ITEMUP,
+ WPNUP,
+ OOF,
+ TELEPT,
+ POSIT1,
+ POSIT2,
+ POSIT3,
+ BGSIT1,
+ BGSIT2,
+ SGTSIT,
+ CACSIT,
+ BRSSIT,
+ CYBSIT,
+ SPISIT,
+ BSPSIT,
+ KNTSIT,
+ VILSIT,
+ MANSIT,
+ PESIT,
+ SKLATK,
+ SGTATK,
+ SKEPCH,
+ VILATK,
+ CLAW,
+ SKESWG,
+ PLDETH,
+ PDIEHI,
+ PODTH1,
+ PODTH2,
+ PODTH3,
+ BGDTH1,
+ BGDTH2,
+ SGTDTH,
+ CACDTH,
+ SKLDTH,
+ BRSDTH,
+ CYBDTH,
+ SPIDTH,
+ BSPDTH,
+ VILDTH,
+ KNTDTH,
+ PEDTH,
+ SKEDTH,
+ POSACT,
+ BGACT,
+ DMACT,
+ BSPACT,
+ BSPWLK,
+ VILACT,
+ NOWAY,
+ BAREXP,
+ PUNCH,
+ HOOF,
+ METAL,
+ CHGUN,
+ TINK,
+ BDOPN,
+ BDCLS,
+ ITMBK,
+ FLAME,
+ FLAMST,
+ GETPOW,
+ BOSPIT,
+ BOSCUB,
+ BOSSIT,
+ BOSPN,
+ BOSDTH,
+ MANATK,
+ MANDTH,
+ SSSIT,
+ SSDTH,
+ KEENPN,
+ KEENDT,
+ SKEACT,
+ SKESIT,
+ SKEATK,
+ RADIO
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/SfxType.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/SfxType.cs
new file mode 100644
index 00000000..59dc98c8
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Audio/SfxType.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum SfxType
+ {
+ Diffuse,
+ Weapon,
+ Voice,
+ Footstep,
+ Misc
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/CommandLineArgs.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/CommandLineArgs.cs
new file mode 100644
index 00000000..0e3e7123
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/CommandLineArgs.cs
@@ -0,0 +1,237 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+
+namespace ManagedDoom
+{
+ public sealed class CommandLineArgs
+ {
+ public readonly Arg iwad;
+ public readonly Arg file;
+ public readonly Arg deh;
+
+ public readonly Arg> warp;
+ public readonly Arg skill;
+
+ public readonly Arg deathmatch;
+ public readonly Arg altdeath;
+ public readonly Arg fast;
+ public readonly Arg respawn;
+ public readonly Arg nomonsters;
+
+ public readonly Arg playdemo;
+ public readonly Arg timedemo;
+
+ public readonly Arg loadgame;
+
+ public readonly Arg nomouse;
+ public readonly Arg nosound;
+ public readonly Arg nosfx;
+ public readonly Arg nomusic;
+
+ public CommandLineArgs(string[] args)
+ {
+ iwad = GetString(args, "-iwad");
+ file = Check_file(args);
+ deh = Check_deh(args);
+
+ warp = Check_warp(args);
+ skill = GetInt(args, "-skill");
+
+ deathmatch = new Arg(args.Contains("-deathmatch"));
+ altdeath = new Arg(args.Contains("-altdeath"));
+ fast = new Arg(args.Contains("-fast"));
+ respawn = new Arg(args.Contains("-respawn"));
+ nomonsters = new Arg(args.Contains("-nomonsters"));
+
+ playdemo = GetString(args, "-playdemo");
+ timedemo = GetString(args, "-timedemo");
+
+ loadgame = GetInt(args, "-loadgame");
+
+ nomouse = new Arg(args.Contains("-nomouse"));
+ nosound = new Arg(args.Contains("-nosound"));
+ nosfx = new Arg(args.Contains("-nosfx"));
+ nomusic = new Arg(args.Contains("-nomusic"));
+ }
+
+ private static Arg Check_file(string[] args)
+ {
+ // PWAD file paths can be specified without "-file" option for drag & drop support.
+ if (args.Length > 0 && args.All(arg => arg.FirstOrDefault() != '-'))
+ {
+ var values = args.Where(arg => Path.GetExtension(arg).ToLower() == ".wad").ToArray();
+ if (values.Length >= 1)
+ {
+ return new Arg(values);
+ }
+ }
+ else
+ {
+ var values = GetValues(args, "-file");
+ if (values.Length >= 1)
+ {
+ return new Arg(values);
+ }
+ }
+
+ return new Arg();
+ }
+
+ private static Arg Check_deh(string[] args)
+ {
+ // DEH file paths can be specified without "-deh" option for drag & drop support.
+ if (args.Length > 0 && args.All(arg => arg.FirstOrDefault() != '-'))
+ {
+ var values = args.Where(arg => Path.GetExtension(arg).ToLower() == ".deh").ToArray();
+ if (values.Length >= 1)
+ {
+ return new Arg(values);
+ }
+ }
+ else
+ {
+ var values = GetValues(args, "-deh");
+ if (values.Length >= 1)
+ {
+ return new Arg(values);
+ }
+ }
+
+ return new Arg();
+ }
+
+ private static Arg> Check_warp(string[] args)
+ {
+ var values = GetValues(args, "-warp");
+ if (values.Length == 1)
+ {
+ int map;
+ if (int.TryParse(values[0], out map))
+ {
+ return new Arg>(Tuple.Create(1, map));
+ }
+ }
+ else if (values.Length == 2)
+ {
+ int episode;
+ int map;
+ if (int.TryParse(values[0], out episode) && int.TryParse(values[1], out map))
+ {
+ return new Arg>(Tuple.Create(episode, map));
+ }
+ }
+
+ return new Arg>();
+ }
+
+ private static Arg GetString(string[] args, string name)
+ {
+ var values = GetValues(args, name);
+ if (values.Length == 1)
+ {
+ return new Arg(values[0]);
+ }
+
+ return new Arg();
+ }
+
+ private static Arg GetInt(string[] args, string name)
+ {
+ var values = GetValues(args, name);
+ if (values.Length == 1)
+ {
+ int result;
+ if (int.TryParse(values[0], out result))
+ {
+ return new Arg(result);
+ }
+ }
+
+ return new Arg();
+ }
+
+ private static string[] GetValues(string[] args, string name)
+ {
+ List result = new List();
+ bool nameFound = false;
+
+ foreach (string arg in args)
+ {
+ if (!nameFound)
+ {
+ if (arg == name)
+ {
+ nameFound = true;
+ }
+ }
+ else
+ {
+ if (arg.StartsWith("-"))
+ {
+ break;
+ }
+ result.Add(arg);
+ }
+ }
+
+ return result.ToArray();
+ }
+
+ public class Arg
+ {
+ private bool present;
+
+ public Arg()
+ {
+ this.present = false;
+ }
+
+ public Arg(bool present)
+ {
+ this.present = present;
+ }
+
+ public bool Present => present;
+ }
+
+ public class Arg
+ {
+ private bool present;
+ private T value;
+
+ public Arg()
+ {
+ this.present = false;
+ this.value = default;
+ }
+
+ public Arg(T value)
+ {
+ this.present = true;
+ this.value = value;
+ }
+
+ public bool Present => present;
+ public T Value => value;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Config.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Config.cs
new file mode 100644
index 00000000..b972492c
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Config.cs
@@ -0,0 +1,284 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+
+namespace ManagedDoom
+{
+ public sealed class Config
+ {
+ public KeyBinding key_forward;
+ public KeyBinding key_backward;
+ public KeyBinding key_strafeleft;
+ public KeyBinding key_straferight;
+ public KeyBinding key_turnleft;
+ public KeyBinding key_turnright;
+ public KeyBinding key_fire;
+ public KeyBinding key_use;
+ public KeyBinding key_run;
+ public KeyBinding key_strafe;
+
+ public int mouse_sensitivity;
+ public bool mouse_disableyaxis;
+
+ public bool game_alwaysrun;
+
+ public int video_screenwidth;
+ public int video_screenheight;
+ public bool video_fullscreen;
+ public bool video_highresolution;
+ public bool video_displaymessage;
+ public int video_gamescreensize;
+ public int video_gammacorrection;
+
+ public int audio_soundvolume;
+ public int audio_musicvolume;
+ public bool audio_randompitch;
+
+ // Default settings.
+ public Config()
+ {
+ key_forward = new KeyBinding(
+ new DoomKey[]
+ {
+ DoomKey.Up,
+ DoomKey.W
+ });
+ key_backward = new KeyBinding(
+ new DoomKey[]
+ {
+ DoomKey.Down,
+ DoomKey.S
+ });
+ key_strafeleft = new KeyBinding(
+ new DoomKey[]
+ {
+ DoomKey.A
+ });
+ key_straferight = new KeyBinding(
+ new DoomKey[]
+ {
+ DoomKey.D
+ });
+ key_turnleft = new KeyBinding(
+ new DoomKey[]
+ {
+ DoomKey.Left
+ });
+ key_turnright = new KeyBinding(
+ new DoomKey[]
+ {
+ DoomKey.Right
+ });
+ key_fire = new KeyBinding(
+ new DoomKey[]
+ {
+ DoomKey.ControlKey,
+ DoomKey.LControl,
+ DoomKey.RControl
+ },
+ new DoomMouseButton[]
+ {
+ DoomMouseButton.Mouse1
+ });
+ key_use = new KeyBinding(
+ new DoomKey[]
+ {
+ DoomKey.Space
+ },
+ new DoomMouseButton[]
+ {
+ DoomMouseButton.Mouse2
+ });
+ key_run = new KeyBinding(
+ new DoomKey[]
+ {
+ DoomKey.LShift,
+ DoomKey.RShift,
+ DoomKey.ShiftKey
+ });
+ key_strafe = new KeyBinding(
+ new DoomKey[]
+ {
+ DoomKey.LAlt,
+ DoomKey.RAlt,
+ DoomKey.Alt
+ });
+
+ mouse_sensitivity = 3;
+ mouse_disableyaxis = false;
+
+ game_alwaysrun = true;
+
+ // TODO: do not use const values
+ video_screenwidth = 320;
+ video_screenheight = 200;
+ video_fullscreen = false;
+ video_highresolution = false;
+ video_gamescreensize = 7;
+ video_displaymessage = true;
+ video_gammacorrection = 0;
+
+ audio_soundvolume = 8;
+ audio_musicvolume = 8;
+ audio_randompitch = true;
+ }
+
+ public Config(string[] configLines) : this()
+ {
+ try
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.Write("Restore settings: ");
+
+ var dic = new Dictionary();
+ foreach (var line in configLines)
+ {
+ var split = line.Split('=', StringSplitOptions.RemoveEmptyEntries);
+ if (split.Length == 2)
+ {
+ dic[split[0].Trim()] = split[1].Trim();
+ }
+ }
+
+ key_forward = GetKeyBinding(dic, nameof(key_forward), key_forward);
+ key_backward = GetKeyBinding(dic, nameof(key_backward), key_backward);
+ key_strafeleft = GetKeyBinding(dic, nameof(key_strafeleft), key_strafeleft);
+ key_straferight = GetKeyBinding(dic, nameof(key_straferight), key_straferight);
+ key_turnleft = GetKeyBinding(dic, nameof(key_turnleft), key_turnleft);
+ key_turnright = GetKeyBinding(dic, nameof(key_turnright), key_turnright);
+ key_fire = GetKeyBinding(dic, nameof(key_fire), key_fire);
+ key_use = GetKeyBinding(dic, nameof(key_use), key_use);
+ key_run = GetKeyBinding(dic, nameof(key_run), key_run);
+ key_strafe = GetKeyBinding(dic, nameof(key_strafe), key_strafe);
+
+ mouse_sensitivity = GetInt(dic, nameof(mouse_sensitivity), mouse_sensitivity);
+ mouse_disableyaxis = GetBool(dic, nameof(mouse_disableyaxis), mouse_disableyaxis);
+
+ game_alwaysrun = GetBool(dic, nameof(game_alwaysrun), game_alwaysrun);
+
+ video_screenwidth = GetInt(dic, nameof(video_screenwidth), video_screenwidth);
+ video_screenheight = GetInt(dic, nameof(video_screenheight), video_screenheight);
+ video_fullscreen = GetBool(dic, nameof(video_fullscreen), video_fullscreen);
+ video_highresolution = GetBool(dic, nameof(video_highresolution), video_highresolution);
+ video_displaymessage = GetBool(dic, nameof(video_displaymessage), video_displaymessage);
+ video_gamescreensize = GetInt(dic, nameof(video_gamescreensize), video_gamescreensize);
+ video_gammacorrection = GetInt(dic, nameof(video_gammacorrection), video_gammacorrection);
+
+ audio_soundvolume = GetInt(dic, nameof(audio_soundvolume), audio_soundvolume);
+ audio_musicvolume = GetInt(dic, nameof(audio_musicvolume), audio_musicvolume);
+ audio_randompitch = GetBool(dic, nameof(audio_randompitch), audio_randompitch);
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("OK");
+ }
+ catch
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("Failed");
+ }
+ }
+
+ public void Save(string path)
+ {
+ try
+ {
+ using (var writer = new StreamWriter(path))
+ {
+ writer.WriteLine(nameof(key_forward) + " = " + key_forward);
+ writer.WriteLine(nameof(key_strafeleft) + " = " + key_strafeleft);
+ writer.WriteLine(nameof(key_straferight) + " = " + key_straferight);
+ writer.WriteLine(nameof(key_turnleft) + " = " + key_turnleft);
+ writer.WriteLine(nameof(key_turnright) + " = " + key_turnright);
+ writer.WriteLine(nameof(key_fire) + " = " + key_fire);
+ writer.WriteLine(nameof(key_use) + " = " + key_use);
+ writer.WriteLine(nameof(key_run) + " = " + key_run);
+ writer.WriteLine(nameof(key_strafe) + " = " + key_strafe);
+
+ writer.WriteLine(nameof(mouse_sensitivity) + " = " + mouse_sensitivity);
+ writer.WriteLine(nameof(mouse_disableyaxis) + " = " + BoolToString(mouse_disableyaxis));
+
+ writer.WriteLine(nameof(game_alwaysrun) + " = " + BoolToString(game_alwaysrun));
+
+ writer.WriteLine(nameof(video_screenwidth) + " = " + video_screenwidth);
+ writer.WriteLine(nameof(video_screenheight) + " = " + video_screenheight);
+ writer.WriteLine(nameof(video_fullscreen) + " = " + BoolToString(video_fullscreen));
+ writer.WriteLine(nameof(video_highresolution) + " = " + BoolToString(video_highresolution));
+ writer.WriteLine(nameof(video_displaymessage) + " = " + BoolToString(video_displaymessage));
+ writer.WriteLine(nameof(video_gamescreensize) + " = " + video_gamescreensize);
+ writer.WriteLine(nameof(video_gammacorrection) + " = " + video_gammacorrection);
+
+ writer.WriteLine(nameof(audio_soundvolume) + " = " + audio_soundvolume);
+ writer.WriteLine(nameof(audio_musicvolume) + " = " + audio_musicvolume);
+ writer.WriteLine(nameof(audio_randompitch) + " = " + BoolToString(audio_randompitch));
+ }
+ }
+ catch
+ {
+ }
+ }
+
+ private static int GetInt(Dictionary dic, string name, int defaultValue)
+ {
+ string stringValue;
+ if (dic.TryGetValue(name, out stringValue))
+ {
+ int value;
+ if (int.TryParse(stringValue, out value))
+ {
+ return value;
+ }
+ }
+
+ return defaultValue;
+ }
+
+ private static bool GetBool(Dictionary dic, string name, bool defaultValue)
+ {
+ string stringValue;
+ if (dic.TryGetValue(name, out stringValue))
+ {
+ if (stringValue == "true")
+ {
+ return true;
+ }
+ else if (stringValue == "false")
+ {
+ return false;
+ }
+ }
+
+ return defaultValue;
+ }
+
+ private static KeyBinding GetKeyBinding(Dictionary dic, string name, KeyBinding defaultValue)
+ {
+ string stringValue;
+ if (dic.TryGetValue(name, out stringValue))
+ {
+ return KeyBinding.Parse(stringValue);
+ }
+
+ return defaultValue;
+ }
+
+ private static string BoolToString(bool value)
+ {
+ return value ? "true" : "false";
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/ConfigUtilities.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/ConfigUtilities.cs
new file mode 100644
index 00000000..678cbd27
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/ConfigUtilities.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.IO;
+using ManagedDoom.Audio;
+using SFML.Window;
+
+namespace ManagedDoom
+{
+ public static class ConfigUtilities
+ {
+
+ static string[] names = new string[]
+ {
+ "DOOM2.WAD",
+ "PLUTONIA.WAD",
+ "TNT.WAD",
+ "DOOM.WAD",
+ "DOOM1.WAD"
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/DeHackEd.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/DeHackEd.cs
new file mode 100644
index 00000000..f38733cb
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/DeHackEd.cs
@@ -0,0 +1,608 @@
+//
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.ExceptionServices;
+using System.Text;
+
+namespace ManagedDoom
+{
+ public static class DeHackEd
+ {
+ private static Tuple, Action>[] sourcePointerTable;
+
+ public static void ReadFiles(params string[] fileNames)
+ {
+ try
+ {
+ // Ensure the static members are initialized.
+ DoomInfo.Strings.PRESSKEY.GetHashCode();
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.Write("Apply DeHackEd patches: ");
+
+ foreach (var fileName in fileNames)
+ {
+ ReadFile(fileName);
+ }
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("OK (" + string.Join(", ", fileNames.Select(x => Path.GetFileName(x))) + ")");
+ }
+ catch (Exception e)
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("Failed");
+ ExceptionDispatchInfo.Throw(e);
+ }
+ }
+
+ private static void ReadFile(string fileName)
+ {
+ if (sourcePointerTable == null)
+ {
+ sourcePointerTable = new Tuple, Action>[DoomInfo.States.Length];
+ for (var i = 0; i < sourcePointerTable.Length; i++)
+ {
+ var playerAction = DoomInfo.States[i].PlayerAction;
+ var mobjAction = DoomInfo.States[i].MobjAction;
+ sourcePointerTable[i] = Tuple.Create(playerAction, mobjAction);
+ }
+ }
+
+ var data = new List();
+ var last = Block.None;
+ foreach (var line in File.ReadLines(fileName))
+ {
+ var split = line.Split(' ');
+ var blockType = GetBlockType(split);
+ if (blockType == Block.None)
+ {
+ data.Add(line);
+ }
+ else
+ {
+ ProcessBlock(last, data);
+ data.Clear();
+ data.Add(line);
+ last = blockType;
+ }
+ }
+ ProcessBlock(last, data);
+ }
+
+ private static void ProcessBlock(Block type, List data)
+ {
+ switch (type)
+ {
+ case Block.Thing:
+ ProcessThingBlock(data);
+ break;
+ case Block.Frame:
+ ProcessFrameBlock(data);
+ break;
+ case Block.Pointer:
+ ProcessPointerBlock(data);
+ break;
+ case Block.Sound:
+ ProcessSoundBlock(data);
+ break;
+ case Block.Ammo:
+ ProcessAmmoBlock(data);
+ break;
+ case Block.Weapon:
+ ProcessWeaponBlock(data);
+ break;
+ case Block.Cheat:
+ ProcessCheatBlock(data);
+ break;
+ case Block.Misc:
+ ProcessMiscBlock(data);
+ break;
+ case Block.Text:
+ ProcessTextBlock(data);
+ break;
+ case Block.Sprite:
+ ProcessSpriteBlock(data);
+ break;
+ }
+ }
+
+ private static void ProcessThingBlock(List data)
+ {
+ var thingNumber = int.Parse(data[0].Split(' ')[1]) - 1;
+ var info = DoomInfo.MobjInfos[thingNumber];
+ var dic = GetKeyValuePairs(data);
+
+ info.DoomEdNum = GetInt(dic, "ID #", info.DoomEdNum);
+ info.SpawnState = (MobjState)GetInt(dic, "Initial frame", (int)info.SpawnState);
+ info.SpawnHealth = GetInt(dic, "Hit points", info.SpawnHealth);
+ info.SeeState = (MobjState)GetInt(dic, "First moving frame", (int)info.SeeState);
+ info.SeeSound = (Sfx)GetInt(dic, "Alert sound", (int)info.SeeSound);
+ info.ReactionTime = GetInt(dic, "Reaction time", info.ReactionTime);
+ info.AttackSound = (Sfx)GetInt(dic, "Attack sound", (int)info.AttackSound);
+ info.PainState = (MobjState)GetInt(dic, "Injury frame", (int)info.PainState);
+ info.PainChance = GetInt(dic, "Pain chance", info.PainChance);
+ info.PainSound = (Sfx)GetInt(dic, "Pain sound", (int)info.PainSound);
+ info.MeleeState = (MobjState)GetInt(dic, "Close attack frame", (int)info.MeleeState);
+ info.MissileState = (MobjState)GetInt(dic, "Far attack frame", (int)info.MissileState);
+ info.DeathState = (MobjState)GetInt(dic, "Death frame", (int)info.DeathState);
+ info.XdeathState = (MobjState)GetInt(dic, "Exploding frame", (int)info.XdeathState);
+ info.DeathSound = (Sfx)GetInt(dic, "Death sound", (int)info.DeathSound);
+ info.Speed = GetInt(dic, "Speed", info.Speed);
+ info.Radius = new Fixed(GetInt(dic, "Width", info.Radius.Data));
+ info.Height = new Fixed(GetInt(dic, "Height", info.Height.Data));
+ info.Mass = GetInt(dic, "Mass", info.Mass);
+ info.Damage = GetInt(dic, "Missile damage", info.Damage);
+ info.ActiveSound = (Sfx)GetInt(dic, "Action sound", (int)info.ActiveSound);
+ info.Flags = (MobjFlags)GetInt(dic, "Bits", (int)info.Flags);
+ info.Raisestate = (MobjState)GetInt(dic, "Respawn frame", (int)info.Raisestate);
+ }
+
+ private static void ProcessFrameBlock(List data)
+ {
+ var frameNumber = int.Parse(data[0].Split(' ')[1]);
+ var info = DoomInfo.States[frameNumber];
+ var dic = GetKeyValuePairs(data);
+
+ info.Sprite = (Sprite)GetInt(dic, "Sprite number", (int)info.Sprite);
+ info.Frame = GetInt(dic, "Sprite subnumber", info.Frame);
+ info.Tics = GetInt(dic, "Duration", info.Tics);
+ info.Next = (MobjState)GetInt(dic, "Next frame", (int)info.Next);
+ info.Misc1 = GetInt(dic, "Unknown 1", info.Misc1);
+ info.Misc2 = GetInt(dic, "Unknown 2", info.Misc2);
+ }
+
+ private static void ProcessPointerBlock(List data)
+ {
+ var dic = GetKeyValuePairs(data);
+ var start = data[0].IndexOf('(') + 1;
+ var end = data[0].IndexOf(')');
+ var length = end - start;
+ var targetFrameNumber = int.Parse(data[0].Substring(start, length).Split(' ')[1]);
+ var sourceFrameNumber = GetInt(dic, "Codep Frame", -1);
+ if (sourceFrameNumber == -1)
+ {
+ return;
+ }
+ var info = DoomInfo.States[targetFrameNumber];
+
+ info.PlayerAction = sourcePointerTable[sourceFrameNumber].Item1;
+ info.MobjAction = sourcePointerTable[sourceFrameNumber].Item2;
+ }
+
+ private static void ProcessSoundBlock(List data)
+ {
+ }
+
+ private static void ProcessAmmoBlock(List data)
+ {
+ var ammoNumber = int.Parse(data[0].Split(' ')[1]);
+ var dic = GetKeyValuePairs(data);
+ var max = DoomInfo.AmmoInfos.Max;
+ var clip = DoomInfo.AmmoInfos.Clip;
+
+ max[ammoNumber] = GetInt(dic, "Max ammo", max[ammoNumber]);
+ clip[ammoNumber] = GetInt(dic, "Per ammo", clip[ammoNumber]);
+ }
+
+ private static void ProcessWeaponBlock(List data)
+ {
+ var weaponNumber = int.Parse(data[0].Split(' ')[1]);
+ var info = DoomInfo.WeaponInfos[weaponNumber];
+ var dic = GetKeyValuePairs(data);
+
+ info.Ammo = (AmmoType)GetInt(dic, "Ammo type", (int)info.Ammo);
+ info.UpState = (MobjState)GetInt(dic, "Deselect frame", (int)info.UpState);
+ info.DownState = (MobjState)GetInt(dic, "Select frame", (int)info.DownState);
+ info.ReadyState = (MobjState)GetInt(dic, "Bobbing frame", (int)info.ReadyState);
+ info.AttackState = (MobjState)GetInt(dic, "Shooting frame", (int)info.AttackState);
+ info.FlashState = (MobjState)GetInt(dic, "Firing frame", (int)info.FlashState);
+ }
+
+ private static void ProcessCheatBlock(List data)
+ {
+ }
+
+ private static void ProcessMiscBlock(List data)
+ {
+ var dic = GetKeyValuePairs(data);
+
+ DoomInfo.DeHackEdConst.InitialHealth = GetInt(dic, "Initial Health", DoomInfo.DeHackEdConst.InitialHealth);
+ DoomInfo.DeHackEdConst.InitialBullets = GetInt(dic, "Initial Bullets", DoomInfo.DeHackEdConst.InitialBullets);
+ DoomInfo.DeHackEdConst.MaxHealth = GetInt(dic, "Max Health", DoomInfo.DeHackEdConst.MaxHealth);
+ DoomInfo.DeHackEdConst.MaxArmor = GetInt(dic, "Max Armor", DoomInfo.DeHackEdConst.MaxArmor);
+ DoomInfo.DeHackEdConst.GreenArmorClass = GetInt(dic, "Green Armor Class", DoomInfo.DeHackEdConst.GreenArmorClass);
+ DoomInfo.DeHackEdConst.BlueArmorClass = GetInt(dic, "Blue Armor Class", DoomInfo.DeHackEdConst.BlueArmorClass);
+ DoomInfo.DeHackEdConst.MaxSoulsphere = GetInt(dic, "Max Soulsphere", DoomInfo.DeHackEdConst.MaxSoulsphere);
+ DoomInfo.DeHackEdConst.SoulsphereHealth = GetInt(dic, "Soulsphere Health", DoomInfo.DeHackEdConst.SoulsphereHealth);
+ DoomInfo.DeHackEdConst.MegasphereHealth = GetInt(dic, "Megasphere Health", DoomInfo.DeHackEdConst.MegasphereHealth);
+ DoomInfo.DeHackEdConst.GodModeHealth = GetInt(dic, "God Mode Health", DoomInfo.DeHackEdConst.GodModeHealth);
+ DoomInfo.DeHackEdConst.IdfaArmor = GetInt(dic, "IDFA Armor", DoomInfo.DeHackEdConst.IdfaArmor);
+ DoomInfo.DeHackEdConst.IdfaArmorClass = GetInt(dic, "IDFA Armor Class", DoomInfo.DeHackEdConst.IdfaArmorClass);
+ DoomInfo.DeHackEdConst.IdkfaArmor = GetInt(dic, "IDKFA Armor", DoomInfo.DeHackEdConst.IdkfaArmor);
+ DoomInfo.DeHackEdConst.IdkfaArmorClass = GetInt(dic, "IDKFA Armor Class", DoomInfo.DeHackEdConst.IdkfaArmorClass);
+ DoomInfo.DeHackEdConst.BfgCellsPerShot = GetInt(dic, "BFG Cells/Shot", DoomInfo.DeHackEdConst.BfgCellsPerShot);
+ DoomInfo.DeHackEdConst.MonstersInfight = GetInt(dic, "Monsters Infight", 0) == 221;
+ }
+
+ private static void ProcessTextBlock(List data)
+ {
+ var split = data[0].Split(' ');
+ var length1 = int.Parse(split[1]);
+ var length2 = int.Parse(split[2]);
+
+ var line = 1;
+ var pos = 0;
+
+ var sb1 = new StringBuilder();
+ for (var i = 0; i < length1; i++)
+ {
+ if (pos == data[line].Length)
+ {
+ sb1.Append('\n');
+ line++;
+ pos = 0;
+ }
+ else
+ {
+ sb1.Append(data[line][pos]);
+ pos++;
+ }
+ }
+
+ var sb2 = new StringBuilder();
+ for (var i = 0; i < length2; i++)
+ {
+ if (pos == data[line].Length)
+ {
+ sb2.Append('\n');
+ line++;
+ pos = 0;
+ }
+ else
+ {
+ sb2.Append(data[line][pos]);
+ pos++;
+ }
+ }
+
+ DoomString.Replace(sb1.ToString(), sb2.ToString());
+ }
+
+ private static void ProcessSpriteBlock(List data)
+ {
+ }
+
+ private static Block GetBlockType(string[] split)
+ {
+ if (IsThingBlockStart(split))
+ {
+ return Block.Thing;
+ }
+ else if (IsFrameBlockStart(split))
+ {
+ return Block.Frame;
+ }
+ else if (IsPointerBlockStart(split))
+ {
+ return Block.Pointer;
+ }
+ else if (IsSoundBlockStart(split))
+ {
+ return Block.Sound;
+ }
+ else if (IsAmmoBlockStart(split))
+ {
+ return Block.Ammo;
+ }
+ else if (IsWeaponBlockStart(split))
+ {
+ return Block.Weapon;
+ }
+ else if (IsCheatBlockStart(split))
+ {
+ return Block.Cheat;
+ }
+ else if (IsMiscBlockStart(split))
+ {
+ return Block.Misc;
+ }
+ else if (IsTextBlockStart(split))
+ {
+ return Block.Text;
+ }
+ else if (IsSpriteBlockStart(split))
+ {
+ return Block.Sprite;
+ }
+ else
+ {
+ return Block.None;
+ }
+ }
+
+ private static bool IsThingBlockStart(string[] split)
+ {
+ if (split.Length < 2)
+ {
+ return false;
+ }
+
+ if (split[0] != "Thing")
+ {
+ return false;
+ }
+
+ if (!IsNumber(split[1]))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool IsFrameBlockStart(string[] split)
+ {
+ if (split.Length < 2)
+ {
+ return false;
+ }
+
+ if (split[0] != "Frame")
+ {
+ return false;
+ }
+
+ if (!IsNumber(split[1]))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool IsPointerBlockStart(string[] split)
+ {
+ if (split.Length < 2)
+ {
+ return false;
+ }
+
+ if (split[0] != "Pointer")
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool IsSoundBlockStart(string[] split)
+ {
+ if (split.Length < 2)
+ {
+ return false;
+ }
+
+ if (split[0] != "Sound")
+ {
+ return false;
+ }
+
+ if (!IsNumber(split[1]))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool IsAmmoBlockStart(string[] split)
+ {
+ if (split.Length < 2)
+ {
+ return false;
+ }
+
+ if (split[0] != "Ammo")
+ {
+ return false;
+ }
+
+ if (!IsNumber(split[1]))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool IsWeaponBlockStart(string[] split)
+ {
+ if (split.Length < 2)
+ {
+ return false;
+ }
+
+ if (split[0] != "Weapon")
+ {
+ return false;
+ }
+
+ if (!IsNumber(split[1]))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool IsCheatBlockStart(string[] split)
+ {
+ if (split.Length < 2)
+ {
+ return false;
+ }
+
+ if (split[0] != "Cheat")
+ {
+ return false;
+ }
+
+ if (split[1] != "0")
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool IsMiscBlockStart(string[] split)
+ {
+ if (split.Length < 2)
+ {
+ return false;
+ }
+
+ if (split[0] != "Misc")
+ {
+ return false;
+ }
+
+ if (split[1] != "0")
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool IsTextBlockStart(string[] split)
+ {
+ if (split.Length < 3)
+ {
+ return false;
+ }
+
+ if (split[0] != "Text")
+ {
+ return false;
+ }
+
+ if (!IsNumber(split[1]))
+ {
+ return false;
+ }
+
+ if (!IsNumber(split[2]))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool IsSpriteBlockStart(string[] split)
+ {
+ if (split.Length < 2)
+ {
+ return false;
+ }
+
+ if (split[0] != "Sprite")
+ {
+ return false;
+ }
+
+ if (!IsNumber(split[1]))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool IsNumber(string value)
+ {
+ foreach (var ch in value)
+ {
+ if (!('0' <= ch && ch <= '9'))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private static Dictionary GetKeyValuePairs(List data)
+ {
+ var dic = new Dictionary();
+ foreach (var line in data)
+ {
+ var split = line.Split('=');
+ if (split.Length == 2)
+ {
+ dic[split[0].Trim()] = split[1].Trim();
+ }
+ }
+ return dic;
+ }
+
+ private static string GetString(Dictionary dic, string key, string defaultValue)
+ {
+ string value;
+ if (dic.TryGetValue(key, out value))
+ {
+ return value;
+ }
+
+ return defaultValue;
+ }
+
+ private static int GetInt(Dictionary dic, string key, int defaultValue)
+ {
+ string value;
+ if (dic.TryGetValue(key, out value))
+ {
+ int intValue;
+ if (int.TryParse(value, out intValue))
+ {
+ return intValue;
+ }
+ }
+
+ return defaultValue;
+ }
+
+
+
+ private enum Block
+ {
+ None,
+ Thing,
+ Frame,
+ Pointer,
+ Sound,
+ Ammo,
+ Weapon,
+ Cheat,
+ Misc,
+ Text,
+ Sprite
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/CommonResource.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/CommonResource.cs
new file mode 100644
index 00000000..9400bf27
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/CommonResource.cs
@@ -0,0 +1,85 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Runtime.ExceptionServices;
+
+namespace ManagedDoom
+{
+ public sealed class CommonResource : IDisposable
+ {
+ private Wad wad;
+ private Palette palette;
+ private ColorMap colorMap;
+ private TextureLookup textures;
+ private FlatLookup flats;
+ private SpriteLookup sprites;
+ private TextureAnimation animation;
+
+ private CommonResource()
+ {
+ }
+
+ public CommonResource(string[] wadPaths)
+ {
+ try
+ {
+ wad = new Wad(wadPaths);
+ palette = new Palette(wad);
+ colorMap = new ColorMap(wad);
+ textures = new TextureLookup(wad);
+ flats = new FlatLookup(wad);
+ sprites = new SpriteLookup(wad);
+ animation = new TextureAnimation(textures, flats);
+ }
+ catch (Exception e)
+ {
+ ExceptionDispatchInfo.Throw(e);
+ }
+ }
+
+ public static CommonResource CreateDummy(params string[] wadPaths)
+ {
+ var resource = new CommonResource();
+ resource.wad = new Wad(wadPaths);
+ resource.palette = new Palette(resource.wad);
+ resource.colorMap = new ColorMap(resource.wad);
+ resource.textures = new TextureLookup(resource.wad, true);
+ resource.flats = new FlatLookup(resource.wad, true);
+ resource.sprites = new SpriteLookup(resource.wad, true);
+ resource.animation = new TextureAnimation(resource.textures, resource.flats);
+ return resource;
+ }
+
+ public void Dispose()
+ {
+ if (wad != null)
+ {
+ wad.Dispose();
+ wad = null;
+ }
+ }
+
+ public Wad Wad => wad;
+ public Palette Palette => palette;
+ public ColorMap ColorMap => colorMap;
+ public TextureLookup Textures => textures;
+ public FlatLookup Flats => flats;
+ public SpriteLookup Sprites => sprites;
+ public TextureAnimation Animation => animation;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomDebug.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomDebug.cs
new file mode 100644
index 00000000..52c0ecec
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomDebug.cs
@@ -0,0 +1,150 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Text;
+
+namespace ManagedDoom
+{
+ public static class DoomDebug
+ {
+ public static int CombineHash(int a, int b)
+ {
+ return (3 * a) ^ b;
+ }
+
+ public static int GetMobjHash(Mobj mobj)
+ {
+ var hash = 0;
+
+ hash = CombineHash(hash, mobj.X.Data);
+ hash = CombineHash(hash, mobj.Y.Data);
+ hash = CombineHash(hash, mobj.Z.Data);
+
+ hash = CombineHash(hash, (int)mobj.Angle.Data);
+ hash = CombineHash(hash, (int)mobj.Sprite);
+ hash = CombineHash(hash, mobj.Frame);
+
+ hash = CombineHash(hash, mobj.FloorZ.Data);
+ hash = CombineHash(hash, mobj.CeilingZ.Data);
+
+ hash = CombineHash(hash, mobj.Radius.Data);
+ hash = CombineHash(hash, mobj.Height.Data);
+
+ hash = CombineHash(hash, mobj.MomX.Data);
+ hash = CombineHash(hash, mobj.MomY.Data);
+ hash = CombineHash(hash, mobj.MomZ.Data);
+
+ hash = CombineHash(hash, mobj.Tics);
+ hash = CombineHash(hash, (int)mobj.Flags);
+ hash = CombineHash(hash, mobj.Health);
+
+ hash = CombineHash(hash, (int)mobj.MoveDir);
+ hash = CombineHash(hash, mobj.MoveCount);
+
+ hash = CombineHash(hash, mobj.ReactionTime);
+ hash = CombineHash(hash, mobj.Threshold);
+
+ return hash;
+ }
+
+ public static int GetMobjHash(World world)
+ {
+ var hash = 0;
+ foreach (var thinker in world.Thinkers)
+ {
+ var mobj = thinker as Mobj;
+ if (mobj != null)
+ {
+ hash = CombineHash(hash, GetMobjHash(mobj));
+ }
+ }
+ return hash;
+ }
+
+ private static string GetMobjCsv(Mobj mobj)
+ {
+ var sb = new StringBuilder();
+
+ sb.Append(mobj.X.Data).Append(",");
+ sb.Append(mobj.Y.Data).Append(",");
+ sb.Append(mobj.Z.Data).Append(",");
+
+ sb.Append((int)mobj.Angle.Data).Append(",");
+ sb.Append((int)mobj.Sprite).Append(",");
+ sb.Append(mobj.Frame).Append(",");
+
+ sb.Append(mobj.FloorZ.Data).Append(",");
+ sb.Append(mobj.CeilingZ.Data).Append(",");
+
+ sb.Append(mobj.Radius.Data).Append(",");
+ sb.Append(mobj.Height.Data).Append(",");
+
+ sb.Append(mobj.MomX.Data).Append(",");
+ sb.Append(mobj.MomY.Data).Append(",");
+ sb.Append(mobj.MomZ.Data).Append(",");
+
+ sb.Append((int)mobj.Tics).Append(",");
+ sb.Append((int)mobj.Flags).Append(",");
+ sb.Append(mobj.Health).Append(",");
+
+ sb.Append((int)mobj.MoveDir).Append(",");
+ sb.Append(mobj.MoveCount).Append(",");
+
+ sb.Append(mobj.ReactionTime).Append(",");
+ sb.Append(mobj.Threshold);
+
+ return sb.ToString();
+ }
+
+ public static void DumpMobjCsv(string path, World world)
+ {
+ using (var writer = new System.IO.StreamWriter(path))
+ {
+ foreach (var thinker in world.Thinkers)
+ {
+ var mobj = thinker as Mobj;
+ if (mobj != null)
+ {
+ writer.WriteLine(GetMobjCsv(mobj));
+ }
+ }
+ }
+ }
+
+ public static int GetSectorHash(Sector sector)
+ {
+ var hash = 0;
+
+ hash = CombineHash(hash, sector.FloorHeight.Data);
+ hash = CombineHash(hash, sector.CeilingHeight.Data);
+ hash = CombineHash(hash, sector.LightLevel);
+
+ return hash;
+ }
+
+ public static int GetSectorHash(World world)
+ {
+ var hash = 0;
+ foreach (var sector in world.Map.Sectors)
+ {
+ hash = CombineHash(hash, GetSectorHash(sector));
+ }
+ return hash;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomInterop.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomInterop.cs
new file mode 100644
index 00000000..b0a152a6
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomInterop.cs
@@ -0,0 +1,48 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static class DoomInterop
+ {
+ public static string ToString(byte[] data, int offset, int maxLength)
+ {
+ var length = 0;
+ for (var i = 0; i < maxLength; i++)
+ {
+ if (data[offset + i] == 0)
+ {
+ break;
+ }
+ length++;
+ }
+ var chars = new char[length];
+ for (var i = 0; i < chars.Length; i++)
+ {
+ var c = data[offset + i];
+ if ('a' <= c && c <= 'z')
+ {
+ c -= 0x20;
+ }
+ chars[i] = (char)c;
+ }
+ return new string(chars);
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomRandom.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomRandom.cs
new file mode 100644
index 00000000..7bf70f4b
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomRandom.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class DoomRandom
+ {
+ private static readonly int[] table = new int[]
+ {
+ 0, 8, 109, 220, 222, 241, 149, 107, 75, 248, 254, 140, 16, 66,
+ 74, 21, 211, 47, 80, 242, 154, 27, 205, 128, 161, 89, 77, 36,
+ 95, 110, 85, 48, 212, 140, 211, 249, 22, 79, 200, 50, 28, 188,
+ 52, 140, 202, 120, 68, 145, 62, 70, 184, 190, 91, 197, 152, 224,
+ 149, 104, 25, 178, 252, 182, 202, 182, 141, 197, 4, 81, 181, 242,
+ 145, 42, 39, 227, 156, 198, 225, 193, 219, 93, 122, 175, 249, 0,
+ 175, 143, 70, 239, 46, 246, 163, 53, 163, 109, 168, 135, 2, 235,
+ 25, 92, 20, 145, 138, 77, 69, 166, 78, 176, 173, 212, 166, 113,
+ 94, 161, 41, 50, 239, 49, 111, 164, 70, 60, 2, 37, 171, 75,
+ 136, 156, 11, 56, 42, 146, 138, 229, 73, 146, 77, 61, 98, 196,
+ 135, 106, 63, 197, 195, 86, 96, 203, 113, 101, 170, 247, 181, 113,
+ 80, 250, 108, 7, 255, 237, 129, 226, 79, 107, 112, 166, 103, 241,
+ 24, 223, 239, 120, 198, 58, 60, 82, 128, 3, 184, 66, 143, 224,
+ 145, 224, 81, 206, 163, 45, 63, 90, 168, 114, 59, 33, 159, 95,
+ 28, 139, 123, 98, 125, 196, 15, 70, 194, 253, 54, 14, 109, 226,
+ 71, 17, 161, 93, 186, 87, 244, 138, 20, 52, 123, 251, 26, 36,
+ 17, 46, 52, 231, 232, 76, 31, 221, 84, 37, 216, 165, 212, 106,
+ 197, 242, 98, 43, 39, 175, 254, 145, 190, 84, 118, 222, 187, 136,
+ 120, 163, 236, 249
+ };
+
+ private int index;
+
+ public DoomRandom()
+ {
+ index = 0;
+ }
+
+ public DoomRandom(int seed)
+ {
+ index = seed & 0xff;
+ }
+
+ public int Next()
+ {
+ index = (index + 1) & 0xff;
+ return table[index];
+ }
+
+ public void Clear()
+ {
+ index = 0;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomString.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomString.cs
new file mode 100644
index 00000000..d78e6f04
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Common/DoomString.cs
@@ -0,0 +1,68 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public sealed class DoomString
+ {
+ private static Dictionary table = new Dictionary();
+
+ private string original;
+ private string replaced;
+
+ public DoomString(string original)
+ {
+ this.original = original;
+ replaced = original;
+
+ if (!table.ContainsKey(original))
+ {
+ table.Add(original, this);
+ }
+ }
+
+ public override string ToString()
+ {
+ return replaced;
+ }
+
+ public char this[int index]
+ {
+ get
+ {
+ return replaced[index];
+ }
+ }
+
+ public static implicit operator string(DoomString ds)
+ {
+ return ds.replaced;
+ }
+
+ public static void Replace(string original, string replaced)
+ {
+ DoomString ds;
+ if (table.TryGetValue(original, out ds))
+ {
+ ds.replaced = replaced;
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/DemoPlayback.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/DemoPlayback.cs
new file mode 100644
index 00000000..257ba9e4
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/DemoPlayback.cs
@@ -0,0 +1,99 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Diagnostics;
+using System.IO;
+
+namespace ManagedDoom
+{
+ public sealed class DemoPlayback
+ {
+ private Demo demo;
+ private TicCmd[] cmds;
+ private DoomGame game;
+
+ private Stopwatch stopwatch;
+ private int frameCount;
+
+ public DemoPlayback(CommonResource resource, GameOptions options, string demoName)
+ {
+ if (File.Exists(demoName))
+ {
+ demo = new Demo(demoName);
+ }
+ else if (File.Exists(demoName + ".lmp"))
+ {
+ demo = new Demo(demoName + ".lmp");
+ }
+ else
+ {
+ var lumpName = demoName.ToUpper();
+ if (resource.Wad.GetLumpNumber(lumpName) == -1)
+ {
+ throw new Exception("Demo '" + demoName + "' was not found!");
+ }
+ demo = new Demo(resource.Wad.ReadLump(lumpName));
+ }
+
+ demo.Options.GameVersion = options.GameVersion;
+ demo.Options.GameMode = options.GameMode;
+ demo.Options.MissionPack = options.MissionPack;
+ demo.Options.Renderer = options.Renderer;
+ demo.Options.Sound = options.Sound;
+ demo.Options.Music = options.Music;
+
+ cmds = new TicCmd[Player.MaxPlayerCount];
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ cmds[i] = new TicCmd();
+ }
+
+ game = new DoomGame(resource, demo.Options);
+ game.DeferedInitNew();
+
+ stopwatch = new Stopwatch();
+ }
+
+ public UpdateResult Update()
+ {
+ if (!stopwatch.IsRunning)
+ {
+ stopwatch.Start();
+ }
+
+ if (!demo.ReadCmd(cmds))
+ {
+ stopwatch.Stop();
+ return UpdateResult.Completed;
+ }
+ else
+ {
+ frameCount++;
+ return game.Update(cmds);
+ }
+ }
+
+ public void DoEvent(DoomEvent e)
+ {
+ game.DoEvent(e);
+ }
+
+ public DoomGame Game => game;
+ public double Fps => frameCount / stopwatch.Elapsed.TotalSeconds;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Event/DoomEvent.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Event/DoomEvent.cs
new file mode 100644
index 00000000..12288275
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Event/DoomEvent.cs
@@ -0,0 +1,36 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class DoomEvent
+ {
+ private EventType type;
+ private DoomKey key;
+
+ public DoomEvent(EventType type, DoomKey key)
+ {
+ this.type = type;
+ this.key = key;
+ }
+
+ public EventType Type => type;
+ public DoomKey Key => key;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Event/EventType.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Event/EventType.cs
new file mode 100644
index 00000000..1dbaf511
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Event/EventType.cs
@@ -0,0 +1,29 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum EventType
+ {
+ KeyDown,
+ KeyUp,
+ Mouse,
+ Joystick
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/Demo.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/Demo.cs
new file mode 100644
index 00000000..03540fdc
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/Demo.cs
@@ -0,0 +1,113 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.IO;
+
+namespace ManagedDoom
+{
+ public sealed class Demo
+ {
+ private int p;
+ private byte[] data;
+
+ private GameOptions options;
+
+ private int playerCount;
+
+ public Demo(byte[] data)
+ {
+ p = 0;
+
+ if (data[p++] != 109)
+ {
+ throw new Exception("Demo is from a different game version!");
+ }
+
+ this.data = data;
+
+ options = new GameOptions();
+ options.Skill = (GameSkill)data[p++];
+ options.Episode = data[p++];
+ options.Map = data[p++];
+ options.Deathmatch = data[p++];
+ options.RespawnMonsters = data[p++] != 0;
+ options.FastMonsters = data[p++] != 0;
+ options.NoMonsters = data[p++] != 0;
+ options.ConsolePlayer = data[p++];
+
+ options.Players[0].InGame = data[p++] != 0;
+ options.Players[1].InGame = data[p++] != 0;
+ options.Players[2].InGame = data[p++] != 0;
+ options.Players[3].InGame = data[p++] != 0;
+
+ options.DemoPlayback = true;
+
+ playerCount = 0;
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (options.Players[i].InGame)
+ {
+ playerCount++;
+ }
+ }
+ if (playerCount >= 2)
+ {
+ options.NetGame = true;
+ }
+ }
+
+ public Demo(string fileName) : this(File.ReadAllBytes(fileName))
+ {
+ }
+
+ public bool ReadCmd(TicCmd[] cmds)
+ {
+ if (p == data.Length)
+ {
+ return false;
+ }
+
+ if (data[p] == 0x80)
+ {
+ return false;
+ }
+
+ if (p + 4 * playerCount > data.Length)
+ {
+ return false;
+ }
+
+ var players = options.Players;
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (players[i].InGame)
+ {
+ var cmd = cmds[i];
+ cmd.ForwardMove = (sbyte)data[p++];
+ cmd.SideMove = (sbyte)data[p++];
+ cmd.AngleTurn = (short)(data[p++] << 8);
+ cmd.Buttons = data[p++];
+ }
+ }
+
+ return true;
+ }
+
+ public GameOptions Options => options;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/DoomGame.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/DoomGame.cs
new file mode 100644
index 00000000..b28dbd4a
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/DoomGame.cs
@@ -0,0 +1,626 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.IO;
+
+namespace ManagedDoom
+{
+ public sealed class DoomGame
+ {
+ private CommonResource resource;
+ private GameOptions options;
+
+ private GameAction gameAction;
+ private GameState gameState;
+
+ private int gameTic;
+ private DoomRandom random;
+
+ private World world;
+ private Intermission intermission;
+ private Finale finale;
+
+ private bool paused;
+
+ private int loadGameSlotNumber;
+ private int saveGameSlotNumber;
+ private string saveGameDescription;
+
+ public DoomGame(CommonResource resource, GameOptions options)
+ {
+ this.resource = resource;
+ this.options = options;
+
+ gameAction = GameAction.Nothing;
+
+ gameTic = 0;
+ random = new DoomRandom();
+ }
+
+
+ ////////////////////////////////////////////////////////////
+ // Public methods to control the game state
+ ////////////////////////////////////////////////////////////
+
+ ///
+ /// Start a new game.
+ /// Can be called by the startup code or the menu task.
+ ///
+ public void DeferedInitNew()
+ {
+ gameAction = GameAction.NewGame;
+ }
+
+ ///
+ /// Start a new game.
+ /// Can be called by the startup code or the menu task.
+ ///
+ public void DeferedInitNew(GameSkill skill, int episode, int map)
+ {
+ options.Skill = skill;
+ options.Episode = episode;
+ options.Map = map;
+ gameAction = GameAction.NewGame;
+ }
+
+ ///
+ /// Load the saved game at the given slot number.
+ /// Can be called by the startup code or the menu task.
+ ///
+ public void LoadGame(int slotNumber)
+ {
+ loadGameSlotNumber = slotNumber;
+ gameAction = GameAction.LoadGame;
+ }
+
+ ///
+ /// Save the game at the given slot number.
+ /// Can be called by the startup code or the menu task.
+ ///
+ public void SaveGame(int slotNumber, string description)
+ {
+ saveGameSlotNumber = slotNumber;
+ saveGameDescription = description;
+ gameAction = GameAction.SaveGame;
+ }
+
+ ///
+ /// Advance the game one frame.
+ ///
+ public UpdateResult Update(TicCmd[] cmds)
+ {
+ // Do player reborns if needed.
+ var players = options.Players;
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (players[i].InGame && players[i].PlayerState == PlayerState.Reborn)
+ {
+ DoReborn(i);
+ }
+ }
+
+ // Do things to change the game state.
+ while (gameAction != GameAction.Nothing)
+ {
+ switch (gameAction)
+ {
+ case GameAction.LoadLevel:
+ DoLoadLevel();
+ break;
+ case GameAction.NewGame:
+ DoNewGame();
+ break;
+ case GameAction.LoadGame:
+ DoLoadGame();
+ break;
+ case GameAction.SaveGame:
+ DoSaveGame();
+ break;
+ case GameAction.Completed:
+ DoCompleted();
+ break;
+ case GameAction.Victory:
+ DoFinale();
+ break;
+ case GameAction.WorldDone:
+ DoWorldDone();
+ break;
+ case GameAction.Nothing:
+ break;
+ }
+ }
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (players[i].InGame)
+ {
+ var cmd = players[i].Cmd;
+ cmd.CopyFrom(cmds[i]);
+
+ /*
+ if (demorecording)
+ {
+ G_WriteDemoTiccmd(cmd);
+ }
+ */
+
+ // Check for turbo cheats.
+ if (cmd.ForwardMove > GameConst.TurboThreshold &&
+ (world.LevelTime & 31) == 0 &&
+ ((world.LevelTime >> 5) & 3) == i)
+ {
+ var player = players[options.ConsolePlayer];
+ player.SendMessage(players[i].Name + " is turbo!");
+ }
+ }
+ }
+
+ // Check for special buttons.
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (players[i].InGame)
+ {
+ if ((players[i].Cmd.Buttons & TicCmdButtons.Special) != 0)
+ {
+ if ((players[i].Cmd.Buttons & TicCmdButtons.SpecialMask) == TicCmdButtons.Pause)
+ {
+ paused = !paused;
+ if (paused)
+ {
+ options.Sound.Pause();
+ }
+ else
+ {
+ options.Sound.Resume();
+ }
+ }
+ }
+ }
+ }
+
+ // Do main actions.
+ var result = UpdateResult.None;
+ switch (gameState)
+ {
+ case GameState.Level:
+ if (!paused || world.FirstTicIsNotYetDone)
+ {
+ result = world.Update();
+ if (result == UpdateResult.Completed)
+ {
+ gameAction = GameAction.Completed;
+ }
+ }
+ break;
+
+ case GameState.Intermission:
+ result = intermission.Update();
+ if (result == UpdateResult.Completed)
+ {
+ gameAction = GameAction.WorldDone;
+
+ if (world.SecretExit)
+ {
+ players[options.ConsolePlayer].DidSecret = true;
+ }
+
+ if (options.GameMode == GameMode.Commercial)
+ {
+ switch (options.Map)
+ {
+ case 6:
+ case 11:
+ case 20:
+ case 30:
+ DoFinale();
+ result = UpdateResult.NeedWipe;
+ break;
+
+ case 15:
+ case 31:
+ if (world.SecretExit)
+ {
+ DoFinale();
+ result = UpdateResult.NeedWipe;
+ }
+ break;
+ }
+ }
+ }
+ break;
+
+ case GameState.Finale:
+ result = finale.Update();
+ if (result == UpdateResult.Completed)
+ {
+ gameAction = GameAction.WorldDone;
+ }
+ break;
+ }
+
+ gameTic++;
+
+ if (result == UpdateResult.NeedWipe)
+ {
+ return UpdateResult.NeedWipe;
+ }
+ else
+ {
+ return UpdateResult.None;
+ }
+ }
+
+
+ ////////////////////////////////////////////////////////////
+ // Actual game actions
+ ////////////////////////////////////////////////////////////
+
+ // It seems that these methods should not be called directly
+ // from outside for some reason.
+ // So if you want to start a new game or do load / save, use
+ // the following public methods.
+ //
+ // - DeferedInitNew
+ // - LoadGame
+ // - SaveGame
+
+ private void DoLoadLevel()
+ {
+ gameAction = GameAction.Nothing;
+
+ gameState = GameState.Level;
+
+ var players = options.Players;
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (players[i].InGame && players[i].PlayerState == PlayerState.Dead)
+ {
+ players[i].PlayerState = PlayerState.Reborn;
+ }
+ Array.Clear(players[i].Frags, 0, players[i].Frags.Length);
+ }
+
+ intermission = null;
+
+ options.Sound.Reset();
+
+ world = new World(resource, options, this);
+
+ options.UserInput.Reset();
+ }
+
+ private void DoNewGame()
+ {
+ gameAction = GameAction.Nothing;
+
+ InitNew(options.Skill, options.Episode, options.Map);
+ }
+
+ private void DoLoadGame()
+ {
+ /*gameAction = GameAction.Nothing;
+
+ var directory = ConfigUtilities.GetExeDirectory();
+ var path = Path.Combine(directory, "doomsav" + loadGameSlotNumber + ".dsg");
+ SaveAndLoad.Load(this, path);*/
+ // TODO: implement load game
+ }
+
+ private void DoSaveGame()
+ {
+ /*gameAction = GameAction.Nothing;
+
+ var directory = ConfigUtilities.GetExeDirectory();
+ var path = Path.Combine(directory, "doomsav" + saveGameSlotNumber + ".dsg");
+ SaveAndLoad.Save(this, saveGameDescription, path);
+ world.ConsolePlayer.SendMessage(DoomInfo.Strings.GGSAVED);*/
+ // TODO: implement save game
+ }
+
+ private void DoCompleted()
+ {
+ gameAction = GameAction.Nothing;
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (options.Players[i].InGame)
+ {
+ // Take away cards and stuff.
+ options.Players[i].FinishLevel();
+ }
+ }
+
+ if (options.GameMode != GameMode.Commercial)
+ {
+ switch (options.Map)
+ {
+ case 8:
+ gameAction = GameAction.Victory;
+ return;
+ case 9:
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ options.Players[i].DidSecret = true;
+ }
+ break;
+ }
+ }
+
+ if ((options.Map == 8) && (options.GameMode != GameMode.Commercial))
+ {
+ // Victory.
+ gameAction = GameAction.Victory;
+ return;
+ }
+
+ if ((options.Map == 9) && (options.GameMode != GameMode.Commercial))
+ {
+ // Exit secret level.
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ options.Players[i].DidSecret = true;
+ }
+ }
+
+ var imInfo = options.IntermissionInfo;
+
+ imInfo.DidSecret = options.Players[options.ConsolePlayer].DidSecret;
+ imInfo.Episode = options.Episode - 1;
+ imInfo.LastLevel = options.Map - 1;
+
+ // IntermissionInfo.Next is 0 biased, unlike GameOptions.Map.
+ if (options.GameMode == GameMode.Commercial)
+ {
+ if (world.SecretExit)
+ {
+ switch (options.Map)
+ {
+ case 15:
+ imInfo.NextLevel = 30;
+ break;
+ case 31:
+ imInfo.NextLevel = 31;
+ break;
+ }
+ }
+ else
+ {
+ switch (options.Map)
+ {
+ case 31:
+ case 32:
+ imInfo.NextLevel = 15;
+ break;
+ default:
+ imInfo.NextLevel = options.Map;
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (world.SecretExit)
+ {
+ // Go to secret level.
+ imInfo.NextLevel = 8;
+ }
+ else if (options.Map == 9)
+ {
+ // Returning from secret level.
+ switch (options.Episode)
+ {
+ case 1:
+ imInfo.NextLevel = 3;
+ break;
+ case 2:
+ imInfo.NextLevel = 5;
+ break;
+ case 3:
+ imInfo.NextLevel = 6;
+ break;
+ case 4:
+ imInfo.NextLevel = 2;
+ break;
+ }
+ }
+ else
+ {
+ // Go to next level.
+ imInfo.NextLevel = options.Map;
+ }
+ }
+
+ imInfo.MaxKillCount = world.TotalKills;
+ imInfo.MaxItemCount = world.TotalItems;
+ imInfo.MaxSecretCount = world.TotalSecrets;
+ imInfo.TotalFrags = 0;
+ if (options.GameMode == GameMode.Commercial)
+ {
+ imInfo.ParTime = 35 * DoomInfo.ParTimes.Doom2[options.Map - 1];
+ }
+ else
+ {
+ imInfo.ParTime = 35 * DoomInfo.ParTimes.Doom1[options.Episode - 1][options.Map - 1];
+ }
+
+ var players = options.Players;
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ imInfo.Players[i].InGame = players[i].InGame;
+ imInfo.Players[i].KillCount = players[i].KillCount;
+ imInfo.Players[i].ItemCount = players[i].ItemCount;
+ imInfo.Players[i].SecretCount = players[i].SecretCount;
+ imInfo.Players[i].Time = world.LevelTime;
+ Array.Copy(players[i].Frags, imInfo.Players[i].Frags, Player.MaxPlayerCount);
+ }
+
+ gameState = GameState.Intermission;
+ intermission = new Intermission(options, imInfo);
+ }
+
+ private void DoWorldDone()
+ {
+ gameAction = GameAction.Nothing;
+
+ gameState = GameState.Level;
+ options.Map = options.IntermissionInfo.NextLevel + 1;
+ DoLoadLevel();
+ }
+
+ private void DoFinale()
+ {
+ gameAction = GameAction.Nothing;
+
+ gameState = GameState.Finale;
+ finale = new Finale(options);
+ }
+
+
+ ////////////////////////////////////////////////////////////
+ // Miscellaneous things
+ ////////////////////////////////////////////////////////////
+
+ public void InitNew(GameSkill skill, int episode, int map)
+ {
+ skill = (GameSkill)Math.Clamp((int)skill, (int)GameSkill.Baby, (int)GameSkill.Nightmare);
+
+ if (options.GameMode == GameMode.Retail)
+ {
+ episode = Math.Clamp(episode, 1, 4);
+ }
+ else if (options.GameMode == GameMode.Shareware)
+ {
+ episode = 1;
+ }
+ else
+ {
+ episode = Math.Clamp(episode, 1, 3);
+ }
+
+ if (options.GameMode == GameMode.Commercial)
+ {
+ map = Math.Clamp(map, 1, 32);
+ }
+ else
+ {
+ map = Math.Clamp(map, 1, 9);
+ }
+
+ random.Clear();
+
+ // Force players to be initialized upon first level load.
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ options.Players[i].PlayerState = PlayerState.Reborn;
+ }
+
+ DoLoadLevel();
+ }
+
+ public bool DoEvent(DoomEvent e)
+ {
+ if (gameState == GameState.Level)
+ {
+ return world.DoEvent(e);
+ }
+ else if (gameState == GameState.Finale)
+ {
+ return finale.DoEvent(e);
+ }
+
+ return false;
+ }
+
+ private void DoReborn(int playerNumber)
+ {
+ if (!options.NetGame)
+ {
+ // Reload the level from scratch.
+ gameAction = GameAction.LoadLevel;
+ }
+ else
+ {
+ // Respawn at the start.
+
+ // First dissasociate the corpse.
+ options.Players[playerNumber].Mobj.Player = null;
+
+ var ta = world.ThingAllocation;
+
+ // Spawn at random spot if in death match.
+ if (options.Deathmatch != 0)
+ {
+ ta.DeathMatchSpawnPlayer(playerNumber);
+ return;
+ }
+
+ if (ta.CheckSpot(playerNumber, ta.PlayerStarts[playerNumber]))
+ {
+ ta.SpawnPlayer(ta.PlayerStarts[playerNumber]);
+ return;
+ }
+
+ // Try to spawn at one of the other players spots.
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (ta.CheckSpot(playerNumber, ta.PlayerStarts[i]))
+ {
+ // Fake as other player.
+ ta.PlayerStarts[i].Type = playerNumber + 1;
+
+ world.ThingAllocation.SpawnPlayer(ta.PlayerStarts[i]);
+
+ // Restore.
+ ta.PlayerStarts[i].Type = i + 1;
+
+ return;
+ }
+ }
+
+ // He's going to be inside something.
+ // Too bad.
+ world.ThingAllocation.SpawnPlayer(ta.PlayerStarts[playerNumber]);
+ }
+ }
+
+
+ public GameOptions Options => options;
+ public Player[] Players => options.Players;
+ public GameState State => gameState;
+ public int GameTic => gameTic;
+ public DoomRandom Random => random;
+ public World World => world;
+ public Intermission Intermission => intermission;
+ public Finale Finale => finale;
+ public bool Paused => paused;
+
+
+
+ private enum GameAction
+ {
+ Nothing,
+ LoadLevel,
+ NewGame,
+ LoadGame,
+ SaveGame,
+ Completed,
+ Victory,
+ WorldDone
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameConst.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameConst.cs
new file mode 100644
index 00000000..9d37c06b
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameConst.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static class GameConst
+ {
+ public static readonly int TicRate = 35;
+
+ public static readonly Fixed MaxThingRadius = Fixed.FromInt(32);
+
+ public static readonly int TurboThreshold = 0x32;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameMode.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameMode.cs
new file mode 100644
index 00000000..4a3d7135
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameMode.cs
@@ -0,0 +1,31 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum GameMode
+ {
+ Shareware, // DOOM 1 shareware, E1, M9
+ Registered, // DOOM 1 registered, E3, M27
+ Commercial, // DOOM 2 retail, E1 M34
+ // DOOM 2 german edition not handled
+ Retail, // DOOM 1 retail, E4, M36
+ Indetermined // Well, no IWAD found.
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameOptions.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameOptions.cs
new file mode 100644
index 00000000..5a41ff36
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameOptions.cs
@@ -0,0 +1,232 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using ManagedDoom.SoftwareRendering;
+using ManagedDoom.Audio;
+using ManagedDoom.UserInput;
+
+namespace ManagedDoom
+{
+ public sealed class GameOptions
+ {
+ private GameVersion gameVersion;
+ private GameMode gameMode;
+ private MissionPack missionPack;
+
+ private Player[] players;
+ private int consolePlayer;
+
+ private int episode;
+ private int map;
+ private GameSkill skill;
+
+ private bool demoPlayback;
+ private bool netGame;
+
+ private int deathmatch;
+ private bool fastMonsters;
+ private bool respawnMonsters;
+ private bool noMonsters;
+
+ private IntermissionInfo intermissionInfo;
+
+ private IRenderer renderer;
+ private ISound sound;
+ private IMusic music;
+ private IUserInput userInput;
+
+ public GameOptions()
+ {
+ gameVersion = GameVersion.Version109;
+ gameMode = GameMode.Commercial;
+ missionPack = MissionPack.Doom2;
+
+ players = new Player[Player.MaxPlayerCount];
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ players[i] = new Player(i);
+ }
+ players[0].InGame = true;
+ consolePlayer = 0;
+
+ episode = 1;
+ map = 1;
+ skill = GameSkill.Medium;
+
+ demoPlayback = false;
+ netGame = false;
+
+ deathmatch = 0;
+ fastMonsters = false;
+ respawnMonsters = false;
+ noMonsters = false;
+
+ intermissionInfo = new IntermissionInfo();
+
+ renderer = null;
+ sound = NullSound.GetInstance();
+ music = NullMusic.GetInstance();
+ userInput = NullUserInput.GetInstance();
+ }
+
+ public GameVersion GameVersion
+ {
+ get => gameVersion;
+ set => gameVersion = value;
+ }
+
+ public GameMode GameMode
+ {
+ get => gameMode;
+ set => gameMode = value;
+ }
+
+ public MissionPack MissionPack
+ {
+ get => missionPack;
+ set => missionPack = value;
+ }
+
+ public Player[] Players
+ {
+ get => players;
+ }
+
+ public int ConsolePlayer
+ {
+ get => consolePlayer;
+ set => consolePlayer = value;
+ }
+
+ public int Episode
+ {
+ get => episode;
+ set => episode = value;
+ }
+
+ public int Map
+ {
+ get => map;
+ set => map = value;
+ }
+
+ public GameSkill Skill
+ {
+ get => skill;
+ set => skill = value;
+ }
+
+ public bool DemoPlayback
+ {
+ get => demoPlayback;
+ set => demoPlayback = value;
+ }
+
+ public bool NetGame
+ {
+ get => netGame;
+ set => netGame = value;
+ }
+
+ public int Deathmatch
+ {
+ get => deathmatch;
+ set => deathmatch = value;
+ }
+
+ public bool FastMonsters
+ {
+ get => fastMonsters;
+ set => fastMonsters = value;
+ }
+
+ public bool RespawnMonsters
+ {
+ get => respawnMonsters;
+ set => respawnMonsters = value;
+ }
+
+ public bool NoMonsters
+ {
+ get => noMonsters;
+ set => noMonsters = value;
+ }
+
+ public IntermissionInfo IntermissionInfo
+ {
+ get => intermissionInfo;
+ }
+
+ public IRenderer Renderer
+ {
+ get => renderer;
+ set => renderer = value;
+ }
+
+ public ISound Sound
+ {
+ get => sound;
+
+ set
+ {
+ if (value != null)
+ {
+ sound = value;
+ }
+ else
+ {
+ sound = NullSound.GetInstance();
+ }
+ }
+ }
+
+ public IMusic Music
+ {
+ get => music;
+
+ set
+ {
+ if (value != null)
+ {
+ music = value;
+ }
+ else
+ {
+ music = NullMusic.GetInstance();
+ }
+ }
+ }
+
+ public IUserInput UserInput
+ {
+ get => userInput;
+
+ set
+ {
+ if (value != null)
+ {
+ userInput = value;
+ }
+ else
+ {
+ userInput = NullUserInput.GetInstance();
+ }
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameSkill.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameSkill.cs
new file mode 100644
index 00000000..bff20952
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameSkill.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum GameSkill
+ {
+ Baby,
+ Easy,
+ Medium,
+ Hard,
+ Nightmare
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameState.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameState.cs
new file mode 100644
index 00000000..07463b37
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameState.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum GameState
+ {
+ Level,
+ Intermission,
+ Finale
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameVersion.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameVersion.cs
new file mode 100644
index 00000000..e3fab599
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/GameVersion.cs
@@ -0,0 +1,29 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum GameVersion
+ {
+ Version109,
+ Ultimate,
+ Final,
+ Final2
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/MissionPack.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/MissionPack.cs
new file mode 100644
index 00000000..dc375874
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/MissionPack.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum MissionPack
+ {
+ Doom2,
+ Plutonia,
+ Tnt
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/Player.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/Player.cs
new file mode 100644
index 00000000..05a3b4d4
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/Player.cs
@@ -0,0 +1,523 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class Player
+ {
+ public static readonly int MaxPlayerCount = 4;
+
+ public static readonly Fixed NormalViewHeight = Fixed.FromInt(41);
+
+ private static readonly string[] defaultPlayerNames = new string[]
+ {
+ "Green",
+ "Indigo",
+ "Brown",
+ "Red"
+ };
+
+ private int number;
+ private string name;
+ private bool inGame;
+
+ private Mobj mobj;
+ private PlayerState playerState;
+ private TicCmd cmd;
+
+ // Determine POV, including viewpoint bobbing during movement.
+ // Focal origin above mobj.Z.
+ private Fixed viewZ;
+
+ // Base height above floor for viewz.
+ private Fixed viewHeight;
+
+ // Bob / squat speed.
+ private Fixed deltaViewHeight;
+
+ // Bounded / scaled total momentum.
+ private Fixed bob;
+
+ // This is only used between levels,
+ // mobj.Health is used during levels.
+ private int health;
+ private int armorPoints;
+
+ // Armor type is 0-2.
+ private int armorType;
+
+ // Power ups. invinc and invis are tic counters.
+ private int[] powers;
+ private bool[] cards;
+ private bool backpack;
+
+ // Frags, kills of other players.
+ private int[] frags;
+
+ private WeaponType readyWeapon;
+
+ // Is WeanponType.NoChange if not changing.
+ private WeaponType pendingWeapon;
+
+ private bool[] weaponOwned;
+ private int[] ammo;
+ private int[] maxAmmo;
+
+ // True if button down last tic.
+ private bool attackDown;
+ private bool useDown;
+
+ // Bit flags, for cheats and debug.
+ private CheatFlags cheats;
+
+ // Refired shots are less accurate.
+ private int refire;
+
+ // For intermission stats.
+ private int killCount;
+ private int itemCount;
+ private int secretCount;
+
+ // Hint messages.
+ private string message;
+ private int messageTime;
+
+ // For screen flashing (red or bright).
+ private int damageCount;
+ private int bonusCount;
+
+ // Who did damage (null for floors / ceilings).
+ private Mobj attacker;
+
+ // So gun flashes light up areas.
+ private int extraLight;
+
+ // Current PLAYPAL, ???
+ // can be set to REDCOLORMAP for pain, etc.
+ private int fixedColorMap;
+
+ // Player skin colorshift,
+ // 0-3 for which color to draw player.
+ private int colorMap;
+
+ // Overlay view sprites (gun, etc).
+ private PlayerSpriteDef[] playerSprites;
+
+ // True if secret level has been done.
+ private bool didSecret;
+
+ public Player(int number)
+ {
+ this.number = number;
+
+ name = defaultPlayerNames[number];
+
+ cmd = new TicCmd();
+
+ powers = new int[(int)PowerType.Count];
+ cards = new bool[(int)CardType.Count];
+
+ frags = new int[MaxPlayerCount];
+
+ weaponOwned = new bool[(int)WeaponType.Count];
+ ammo = new int[(int)AmmoType.Count];
+ maxAmmo = new int[(int)AmmoType.Count];
+
+ playerSprites = new PlayerSpriteDef[(int)PlayerSprite.Count];
+ for (var i = 0; i < playerSprites.Length; i++)
+ {
+ playerSprites[i] = new PlayerSpriteDef();
+ }
+ }
+
+ public void Clear()
+ {
+ mobj = null;
+ playerState = 0;
+ cmd.Clear();
+
+ viewZ = Fixed.Zero;
+ viewHeight = Fixed.Zero;
+ deltaViewHeight = Fixed.Zero;
+ bob = Fixed.Zero;
+
+ health = 0;
+ armorPoints = 0;
+ armorType = 0;
+
+ Array.Clear(powers, 0, powers.Length);
+ Array.Clear(cards, 0, cards.Length);
+ backpack = false;
+
+ Array.Clear(frags, 0, frags.Length);
+
+ readyWeapon = 0;
+ pendingWeapon = 0;
+
+ Array.Clear(weaponOwned, 0, weaponOwned.Length);
+ Array.Clear(ammo, 0, ammo.Length);
+ Array.Clear(maxAmmo, 0, maxAmmo.Length);
+
+ useDown = false;
+ attackDown = false;
+
+ cheats = 0;
+
+ refire = 0;
+
+ killCount = 0;
+ itemCount = 0;
+ secretCount = 0;
+
+ message = null;
+ messageTime = 0;
+
+ damageCount = 0;
+ bonusCount = 0;
+
+ attacker = null;
+
+ extraLight = 0;
+
+ fixedColorMap = 0;
+
+ colorMap = 0;
+
+ foreach (var psp in playerSprites)
+ {
+ psp.Clear();
+ }
+
+ didSecret = false;
+ }
+
+ public void Reborn()
+ {
+ mobj = null;
+ playerState = PlayerState.Live;
+ cmd.Clear();
+
+ viewZ = Fixed.Zero;
+ viewHeight = Fixed.Zero;
+ deltaViewHeight = Fixed.Zero;
+ bob = Fixed.Zero;
+
+ health = DoomInfo.DeHackEdConst.InitialHealth;
+ armorPoints = 0;
+ armorType = 0;
+
+ Array.Clear(powers, 0, powers.Length);
+ Array.Clear(cards, 0, cards.Length);
+ backpack = false;
+
+ readyWeapon = WeaponType.Pistol;
+ pendingWeapon = WeaponType.Pistol;
+
+ Array.Clear(weaponOwned, 0, weaponOwned.Length);
+ Array.Clear(ammo, 0, ammo.Length);
+ Array.Clear(maxAmmo, 0, maxAmmo.Length);
+
+ weaponOwned[(int)WeaponType.Fist] = true;
+ weaponOwned[(int)WeaponType.Pistol] = true;
+ ammo[(int)AmmoType.Clip] = DoomInfo.DeHackEdConst.InitialBullets;
+ for (var i = 0; i < (int)AmmoType.Count; i++)
+ {
+ maxAmmo[i] = DoomInfo.AmmoInfos.Max[i];
+ }
+
+ // Don't do anything immediately.
+ useDown = true;
+ attackDown = true;
+
+ cheats = 0;
+
+ refire = 0;
+
+ message = null;
+ messageTime = 0;
+
+ damageCount = 0;
+ bonusCount = 0;
+
+ attacker = null;
+
+ extraLight = 0;
+
+ fixedColorMap = 0;
+
+ colorMap = 0;
+
+ foreach (var psp in playerSprites)
+ {
+ psp.Clear();
+ }
+
+ didSecret = false;
+ }
+
+ public void FinishLevel()
+ {
+ Array.Clear(powers, 0, powers.Length);
+ Array.Clear(cards, 0, cards.Length);
+
+ // Cancel invisibility.
+ mobj.Flags &= ~MobjFlags.Shadow;
+
+ // Cancel gun flashes.
+ extraLight = 0;
+
+ // Cancel ir gogles.
+ fixedColorMap = 0;
+
+ // No palette changes.
+ damageCount = 0;
+ bonusCount = 0;
+ }
+
+ public void SendMessage(string message)
+ {
+ if (ReferenceEquals(this.message, (string)DoomInfo.Strings.MSGOFF) &&
+ !ReferenceEquals(message, (string)DoomInfo.Strings.MSGON))
+ {
+ return;
+ }
+
+ this.message = message;
+ messageTime = 4 * GameConst.TicRate;
+ }
+
+ public int Number => number;
+
+ public string Name => name;
+
+ public bool InGame
+ {
+ get => inGame;
+ set => inGame = value;
+ }
+
+ public Mobj Mobj
+ {
+ get => mobj;
+ set => mobj = value;
+ }
+
+ public PlayerState PlayerState
+ {
+ get => playerState;
+ set => playerState = value;
+ }
+
+ public TicCmd Cmd
+ {
+ get => cmd;
+ }
+
+ public Fixed ViewZ
+ {
+ get => viewZ;
+ set => viewZ = value;
+ }
+
+ public Fixed ViewHeight
+ {
+ get => viewHeight;
+ set => viewHeight = value;
+ }
+
+ public Fixed DeltaViewHeight
+ {
+ get => deltaViewHeight;
+ set => deltaViewHeight = value;
+ }
+
+ public Fixed Bob
+ {
+ get => bob;
+ set => bob = value;
+ }
+
+ public int Health
+ {
+ get => health;
+ set => health = value;
+ }
+
+ public int ArmorPoints
+ {
+ get => armorPoints;
+ set => armorPoints = value;
+ }
+
+ public int ArmorType
+ {
+ get => armorType;
+ set => armorType = value;
+ }
+
+ public int[] Powers
+ {
+ get => powers;
+ }
+
+ public bool[] Cards
+ {
+ get => cards;
+ }
+
+ public bool Backpack
+ {
+ get => backpack;
+ set => backpack = value;
+ }
+
+ public int[] Frags
+ {
+ get => frags;
+ }
+
+ public WeaponType ReadyWeapon
+ {
+ get => readyWeapon;
+ set => readyWeapon = value;
+ }
+
+ public WeaponType PendingWeapon
+ {
+ get => pendingWeapon;
+ set => pendingWeapon = value;
+ }
+
+ public bool[] WeaponOwned
+ {
+ get => weaponOwned;
+ }
+
+ public int[] Ammo
+ {
+ get => ammo;
+ }
+
+ public int[] MaxAmmo
+ {
+ get => maxAmmo;
+ }
+
+ public bool AttackDown
+ {
+ get => attackDown;
+ set => attackDown = value;
+ }
+
+ public bool UseDown
+ {
+ get => useDown;
+ set => useDown = value;
+ }
+
+ public CheatFlags Cheats
+ {
+ get => cheats;
+ set => cheats = value;
+ }
+
+ public int Refire
+ {
+ get => refire;
+ set => refire = value;
+ }
+
+ public int KillCount
+ {
+ get => killCount;
+ set => killCount = value;
+ }
+
+ public int ItemCount
+ {
+ get => itemCount;
+ set => itemCount = value;
+ }
+
+ public int SecretCount
+ {
+ get => secretCount;
+ set => secretCount = value;
+ }
+
+ public string Message
+ {
+ get => message;
+ set => message = value;
+ }
+
+ public int MessageTime
+ {
+ get => messageTime;
+ set => messageTime = value;
+ }
+
+ public int DamageCount
+ {
+ get => damageCount;
+ set => damageCount = value;
+ }
+
+ public int BonusCount
+ {
+ get => bonusCount;
+ set => bonusCount = value;
+ }
+
+ public Mobj Attacker
+ {
+ get => attacker;
+ set => attacker = value;
+ }
+
+ public int ExtraLight
+ {
+ get => extraLight;
+ set => extraLight = value;
+ }
+
+ public int FixedColorMap
+ {
+ get => fixedColorMap;
+ set => fixedColorMap = value;
+ }
+
+ public int ColorMap
+ {
+ get => colorMap;
+ set => colorMap = value;
+ }
+
+ public PlayerSpriteDef[] PlayerSprites
+ {
+ get => playerSprites;
+ }
+
+ public bool DidSecret
+ {
+ get => didSecret;
+ set => didSecret = value;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/PlayerState.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/PlayerState.cs
new file mode 100644
index 00000000..f633fe4c
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/PlayerState.cs
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum PlayerState
+ {
+ // Playing or camping.
+ Live,
+
+ // Dead on the ground, view follows killer.
+ Dead,
+
+ // Ready to restart / respawn???
+ Reborn
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/SaveAndLoad.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/SaveAndLoad.cs
new file mode 100644
index 00000000..46bd262d
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/SaveAndLoad.cs
@@ -0,0 +1,1012 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.IO;
+
+namespace ManagedDoom
+{
+ ///
+ /// Vanilla-compatible save and load, full of messy binary handling code.
+ ///
+ public static class SaveAndLoad
+ {
+ public static readonly int DescriptionSize = 24;
+
+ private static readonly int versionSize = 16;
+ private static readonly int saveBufferSize = 360 * 1024;
+
+ private enum ThinkerClass
+ {
+ End,
+ Mobj
+ }
+
+ private enum SpecialClass
+ {
+ Ceiling,
+ Door,
+ Floor,
+ Plat,
+ Flash,
+ Strobe,
+ Glow,
+ EndSpecials
+ }
+
+ public static void Save(DoomGame game, string description, string path)
+ {
+ var sg = new SaveGame(description);
+ sg.Save(game, path);
+ }
+
+ public static void Load(DoomGame game, string path)
+ {
+ var options = game.Options;
+ game.InitNew(options.Skill, options.Episode, options.Map);
+
+ var lg = new LoadGame(File.ReadAllBytes(path));
+ lg.Load(game);
+ }
+
+
+
+ ////////////////////////////////////////////////////////////
+ // Save game
+ ////////////////////////////////////////////////////////////
+
+ private class SaveGame
+ {
+ private byte[] data;
+ private int ptr;
+
+ public SaveGame(string description)
+ {
+ data = new byte[saveBufferSize];
+ ptr = 0;
+
+ WriteDescription(description);
+ WriteVersion();
+ }
+
+ private void WriteDescription(string description)
+ {
+ for (var i = 0; i < description.Length; i++)
+ {
+ data[i] = (byte)description[i];
+ }
+ ptr += DescriptionSize;
+ }
+
+ private void WriteVersion()
+ {
+ var version = "version 109";
+ for (var i = 0; i < version.Length; i++)
+ {
+ data[ptr + i] = (byte)version[i];
+ }
+ ptr += versionSize;
+ }
+
+ public void Save(DoomGame game, string path)
+ {
+ var options = game.World.Options;
+ data[ptr++] = (byte)options.Skill;
+ data[ptr++] = (byte)options.Episode;
+ data[ptr++] = (byte)options.Map;
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ data[ptr++] = options.Players[i].InGame ? (byte)1 : (byte)0;
+ }
+
+ data[ptr++] = (byte)(game.World.LevelTime >> 16);
+ data[ptr++] = (byte)(game.World.LevelTime >> 8);
+ data[ptr++] = (byte)(game.World.LevelTime);
+
+ ArchivePlayers(game.World);
+ ArchiveWorld(game.World);
+ ArchiveThinkers(game.World);
+ ArchiveSpecials(game.World);
+
+ data[ptr++] = 0x1d;
+
+ using (var writer = new FileStream(path, FileMode.Create, FileAccess.Write))
+ {
+ writer.Write(data, 0, ptr);
+ }
+ }
+
+ private void PadPointer()
+ {
+ ptr += (4 - (ptr & 3)) & 3;
+ }
+
+ private void ArchivePlayers(World world)
+ {
+ var players = world.Options.Players;
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (!players[i].InGame)
+ {
+ continue;
+ }
+
+ PadPointer();
+
+ ptr = ArchivePlayer(players[i], data, ptr);
+ }
+ }
+
+ private void ArchiveWorld(World world)
+ {
+ // Do sectors.
+ var sectors = world.Map.Sectors;
+ for (var i = 0; i < sectors.Length; i++)
+ {
+ ptr = ArchiveSector(sectors[i], data, ptr);
+ }
+
+ // Do lines.
+ var lines = world.Map.Lines;
+ for (var i = 0; i < lines.Length; i++)
+ {
+ ptr = ArchiveLine(lines[i], data, ptr);
+ }
+ }
+
+ private void ArchiveThinkers(World world)
+ {
+ var thinkers = world.Thinkers;
+
+ // Read in saved thinkers.
+ foreach (var thinker in thinkers)
+ {
+ var mobj = thinker as Mobj;
+ if (mobj != null)
+ {
+ data[ptr++] = (byte)ThinkerClass.Mobj;
+ PadPointer();
+
+ WriteThinkerState(data, ptr + 8, mobj.ThinkerState);
+ Write(data, ptr + 12, mobj.X.Data);
+ Write(data, ptr + 16, mobj.Y.Data);
+ Write(data, ptr + 20, mobj.Z.Data);
+ Write(data, ptr + 32, mobj.Angle.Data);
+ Write(data, ptr + 36, (int)mobj.Sprite);
+ Write(data, ptr + 40, mobj.Frame);
+ Write(data, ptr + 56, mobj.FloorZ.Data);
+ Write(data, ptr + 60, mobj.CeilingZ.Data);
+ Write(data, ptr + 64, mobj.Radius.Data);
+ Write(data, ptr + 68, mobj.Height.Data);
+ Write(data, ptr + 72, mobj.MomX.Data);
+ Write(data, ptr + 76, mobj.MomY.Data);
+ Write(data, ptr + 80, mobj.MomZ.Data);
+ Write(data, ptr + 88, (int)mobj.Type);
+ Write(data, ptr + 96, mobj.Tics);
+ Write(data, ptr + 100, mobj.State.Number);
+ Write(data, ptr + 104, (int)mobj.Flags);
+ Write(data, ptr + 108, mobj.Health);
+ Write(data, ptr + 112, (int)mobj.MoveDir);
+ Write(data, ptr + 116, mobj.MoveCount);
+ Write(data, ptr + 124, mobj.ReactionTime);
+ Write(data, ptr + 128, mobj.Threshold);
+ if (mobj.Player == null)
+ {
+ Write(data, ptr + 132, 0);
+ }
+ else
+ {
+ Write(data, ptr + 132, mobj.Player.Number + 1);
+ }
+ Write(data, ptr + 136, mobj.LastLook);
+ if (mobj.SpawnPoint == null)
+ {
+ Write(data, ptr + 140, (short)0);
+ Write(data, ptr + 142, (short)0);
+ Write(data, ptr + 144, (short)0);
+ Write(data, ptr + 146, (short)0);
+ Write(data, ptr + 148, (short)0);
+ }
+ else
+ {
+ Write(data, ptr + 140, (short)mobj.SpawnPoint.X.ToIntFloor());
+ Write(data, ptr + 142, (short)mobj.SpawnPoint.Y.ToIntFloor());
+ Write(data, ptr + 144, (short)Math.Round(mobj.SpawnPoint.Angle.ToDegree()));
+ Write(data, ptr + 146, (short)mobj.SpawnPoint.Type);
+ Write(data, ptr + 148, (short)mobj.SpawnPoint.Flags);
+ }
+ ptr += 154;
+ }
+ }
+
+ data[ptr++] = (byte)ThinkerClass.End;
+ }
+
+ private void ArchiveSpecials(World world)
+ {
+ var thinkers = world.Thinkers;
+ var sa = world.SectorAction;
+
+ // Read in saved thinkers.
+ foreach (var thinker in thinkers)
+ {
+ if (thinker.ThinkerState == ThinkerState.InStasis)
+ {
+ var ceiling = thinker as CeilingMove;
+ if (sa.CheckActiveCeiling(ceiling))
+ {
+ data[ptr++] = (byte)SpecialClass.Ceiling;
+ PadPointer();
+ WriteThinkerState(data, ptr + 8, ceiling.ThinkerState);
+ Write(data, ptr + 12, (int)ceiling.Type);
+ Write(data, ptr + 16, ceiling.Sector.Number);
+ Write(data, ptr + 20, ceiling.BottomHeight.Data);
+ Write(data, ptr + 24, ceiling.TopHeight.Data);
+ Write(data, ptr + 28, ceiling.Speed.Data);
+ Write(data, ptr + 32, ceiling.Crush ? 1 : 0);
+ Write(data, ptr + 36, ceiling.Direction);
+ Write(data, ptr + 40, ceiling.Tag);
+ Write(data, ptr + 44, ceiling.OldDirection);
+ ptr += 48;
+ }
+ continue;
+ }
+
+ {
+ var ceiling = thinker as CeilingMove;
+ if (ceiling != null)
+ {
+ data[ptr++] = (byte)SpecialClass.Ceiling;
+ PadPointer();
+ WriteThinkerState(data, ptr + 8, ceiling.ThinkerState);
+ Write(data, ptr + 12, (int)ceiling.Type);
+ Write(data, ptr + 16, ceiling.Sector.Number);
+ Write(data, ptr + 20, ceiling.BottomHeight.Data);
+ Write(data, ptr + 24, ceiling.TopHeight.Data);
+ Write(data, ptr + 28, ceiling.Speed.Data);
+ Write(data, ptr + 32, ceiling.Crush ? 1 : 0);
+ Write(data, ptr + 36, ceiling.Direction);
+ Write(data, ptr + 40, ceiling.Tag);
+ Write(data, ptr + 44, ceiling.OldDirection);
+ ptr += 48;
+ continue;
+ }
+ }
+
+ {
+ var door = thinker as VerticalDoor;
+ if (door != null)
+ {
+ data[ptr++] = (byte)SpecialClass.Door;
+ PadPointer();
+ WriteThinkerState(data, ptr + 8, door.ThinkerState);
+ Write(data, ptr + 12, (int)door.Type);
+ Write(data, ptr + 16, door.Sector.Number);
+ Write(data, ptr + 20, door.TopHeight.Data);
+ Write(data, ptr + 24, door.Speed.Data);
+ Write(data, ptr + 28, door.Direction);
+ Write(data, ptr + 32, door.TopWait);
+ Write(data, ptr + 36, door.TopCountDown);
+ ptr += 40;
+ continue;
+ }
+ }
+
+ {
+ var floor = thinker as FloorMove;
+ if (floor != null)
+ {
+ data[ptr++] = (byte)SpecialClass.Floor;
+ PadPointer();
+ WriteThinkerState(data, ptr + 8, floor.ThinkerState);
+ Write(data, ptr + 12, (int)floor.Type);
+ Write(data, ptr + 16, floor.Crush ? 1 : 0);
+ Write(data, ptr + 20, floor.Sector.Number);
+ Write(data, ptr + 24, floor.Direction);
+ Write(data, ptr + 28, (int)floor.NewSpecial);
+ Write(data, ptr + 32, floor.Texture);
+ Write(data, ptr + 36, floor.FloorDestHeight.Data);
+ Write(data, ptr + 40, floor.Speed.Data);
+ ptr += 44;
+ continue;
+ }
+ }
+
+ {
+ var plat = thinker as Platform;
+ if (plat != null)
+ {
+ data[ptr++] = (byte)SpecialClass.Plat;
+ PadPointer();
+ WriteThinkerState(data, ptr + 8, plat.ThinkerState);
+ Write(data, ptr + 12, plat.Sector.Number);
+ Write(data, ptr + 16, plat.Speed.Data);
+ Write(data, ptr + 20, plat.Low.Data);
+ Write(data, ptr + 24, plat.High.Data);
+ Write(data, ptr + 28, plat.Wait);
+ Write(data, ptr + 32, plat.Count);
+ Write(data, ptr + 36, (int)plat.Status);
+ Write(data, ptr + 40, (int)plat.OldStatus);
+ Write(data, ptr + 44, plat.Crush ? 1 : 0);
+ Write(data, ptr + 48, plat.Tag);
+ Write(data, ptr + 52, (int)plat.Type);
+ ptr += 56;
+ continue;
+ }
+ }
+
+ {
+ var flash = thinker as LightFlash;
+ if (flash != null)
+ {
+ data[ptr++] = (byte)SpecialClass.Flash;
+ PadPointer();
+ WriteThinkerState(data, ptr + 8, flash.ThinkerState);
+ Write(data, ptr + 12, flash.Sector.Number);
+ Write(data, ptr + 16, flash.Count);
+ Write(data, ptr + 20, flash.MaxLight);
+ Write(data, ptr + 24, flash.MinLight);
+ Write(data, ptr + 28, flash.MaxTime);
+ Write(data, ptr + 32, flash.MinTime);
+ ptr += 36;
+ continue;
+ }
+ }
+
+ {
+ var strobe = thinker as StrobeFlash;
+ if (strobe != null)
+ {
+ data[ptr++] = (byte)SpecialClass.Strobe;
+ PadPointer();
+ WriteThinkerState(data, ptr + 8, strobe.ThinkerState);
+ Write(data, ptr + 12, strobe.Sector.Number);
+ Write(data, ptr + 16, strobe.Count);
+ Write(data, ptr + 20, strobe.MinLight);
+ Write(data, ptr + 24, strobe.MaxLight);
+ Write(data, ptr + 28, strobe.DarkTime);
+ Write(data, ptr + 32, strobe.BrightTime);
+ ptr += 36;
+ continue;
+ }
+ }
+
+ {
+ var glow = thinker as GlowingLight;
+ if (glow != null)
+ {
+ data[ptr++] = (byte)SpecialClass.Glow;
+ PadPointer();
+ WriteThinkerState(data, ptr + 8, glow.ThinkerState);
+ Write(data, ptr + 12, glow.Sector.Number);
+ Write(data, ptr + 16, glow.MinLight);
+ Write(data, ptr + 20, glow.MaxLight);
+ Write(data, ptr + 24, glow.Direction);
+ ptr += 28;
+ continue;
+ }
+ }
+ }
+
+ data[ptr++] = (byte)SpecialClass.EndSpecials;
+ }
+
+ private static int ArchivePlayer(Player player, byte[] data, int p)
+ {
+ Write(data, p + 4, (int)player.PlayerState);
+ Write(data, p + 16, player.ViewZ.Data);
+ Write(data, p + 20, player.ViewHeight.Data);
+ Write(data, p + 24, player.DeltaViewHeight.Data);
+ Write(data, p + 28, player.Bob.Data);
+ Write(data, p + 32, player.Health);
+ Write(data, p + 36, player.ArmorPoints);
+ Write(data, p + 40, player.ArmorType);
+ for (var i = 0; i < (int)PowerType.Count; i++)
+ {
+ Write(data, p + 44 + 4 * i, player.Powers[i]);
+ }
+ for (var i = 0; i < (int)PowerType.Count; i++)
+ {
+ Write(data, p + 68 + 4 * i, player.Cards[i] ? 1 : 0);
+ }
+ Write(data, p + 92, player.Backpack ? 1 : 0);
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ Write(data, p + 96 + 4 * i, player.Frags[i]);
+ }
+ Write(data, p + 112, (int)player.ReadyWeapon);
+ Write(data, p + 116, (int)player.PendingWeapon);
+ for (var i = 0; i < (int)WeaponType.Count; i++)
+ {
+ Write(data, p + 120 + 4 * i, player.WeaponOwned[i] ? 1 : 0);
+ }
+ for (var i = 0; i < (int)AmmoType.Count; i++)
+ {
+ Write(data, p + 156 + 4 * i, player.Ammo[i]);
+ }
+ for (var i = 0; i < (int)AmmoType.Count; i++)
+ {
+ Write(data, p + 172 + 4 * i, player.MaxAmmo[i]);
+ }
+ Write(data, p + 188, player.AttackDown ? 1 : 0);
+ Write(data, p + 192, player.UseDown ? 1 : 0);
+ Write(data, p + 196, (int)player.Cheats);
+ Write(data, p + 200, player.Refire);
+ Write(data, p + 204, player.KillCount);
+ Write(data, p + 208, player.ItemCount);
+ Write(data, p + 212, player.SecretCount);
+ Write(data, p + 220, player.DamageCount);
+ Write(data, p + 224, player.BonusCount);
+ Write(data, p + 232, player.ExtraLight);
+ Write(data, p + 236, player.FixedColorMap);
+ Write(data, p + 240, player.ColorMap);
+ for (var i = 0; i < (int)PlayerSprite.Count; i++)
+ {
+ if (player.PlayerSprites[i].State == null)
+ {
+ Write(data, p + 244 + 16 * i, 0);
+ }
+ else
+ {
+ Write(data, p + 244 + 16 * i, player.PlayerSprites[i].State.Number);
+ }
+ Write(data, p + 244 + 16 * i + 4, player.PlayerSprites[i].Tics);
+ Write(data, p + 244 + 16 * i + 8, player.PlayerSprites[i].Sx.Data);
+ Write(data, p + 244 + 16 * i + 12, player.PlayerSprites[i].Sy.Data);
+ }
+ Write(data, p + 276, player.DidSecret ? 1 : 0);
+
+ return p + 280;
+ }
+
+ private static int ArchiveSector(Sector sector, byte[] data, int p)
+ {
+ Write(data, p, (short)(sector.FloorHeight.ToIntFloor()));
+ Write(data, p + 2, (short)(sector.CeilingHeight.ToIntFloor()));
+ Write(data, p + 4, (short)sector.FloorFlat);
+ Write(data, p + 6, (short)sector.CeilingFlat);
+ Write(data, p + 8, (short)sector.LightLevel);
+ Write(data, p + 10, (short)sector.Special);
+ Write(data, p + 12, (short)sector.Tag);
+ return p + 14;
+ }
+
+ private static int ArchiveLine(LineDef line, byte[] data, int p)
+ {
+ Write(data, p, (short)line.Flags);
+ Write(data, p + 2, (short)line.Special);
+ Write(data, p + 4, (short)line.Tag);
+ p += 6;
+
+ if (line.FrontSide != null)
+ {
+ var side = line.FrontSide;
+ Write(data, p, (short)side.TextureOffset.ToIntFloor());
+ Write(data, p + 2, (short)side.RowOffset.ToIntFloor());
+ Write(data, p + 4, (short)side.TopTexture);
+ Write(data, p + 6, (short)side.BottomTexture);
+ Write(data, p + 8, (short)side.MiddleTexture);
+ p += 10;
+ }
+
+ if (line.BackSide != null)
+ {
+ var side = line.BackSide;
+ Write(data, p, (short)side.TextureOffset.ToIntFloor());
+ Write(data, p + 2, (short)side.RowOffset.ToIntFloor());
+ Write(data, p + 4, (short)side.TopTexture);
+ Write(data, p + 6, (short)side.BottomTexture);
+ Write(data, p + 8, (short)side.MiddleTexture);
+ p += 10;
+ }
+
+ return p;
+ }
+
+ private static void Write(byte[] data, int p, int value)
+ {
+ data[p] = (byte)value;
+ data[p + 1] = (byte)(value >> 8);
+ data[p + 2] = (byte)(value >> 16);
+ data[p + 3] = (byte)(value >> 24);
+ }
+
+ private static void Write(byte[] data, int p, uint value)
+ {
+ data[p] = (byte)value;
+ data[p + 1] = (byte)(value >> 8);
+ data[p + 2] = (byte)(value >> 16);
+ data[p + 3] = (byte)(value >> 24);
+ }
+
+ private static void Write(byte[] data, int p, short value)
+ {
+ data[p] = (byte)value;
+ data[p + 1] = (byte)(value >> 8);
+ }
+
+ private static void WriteThinkerState(byte[] data, int p, ThinkerState state)
+ {
+ switch (state)
+ {
+ case ThinkerState.InStasis:
+ Write(data, p, 0);
+ break;
+ default:
+ Write(data, p, 1);
+ break;
+ }
+ }
+ }
+
+
+
+ ////////////////////////////////////////////////////////////
+ // Load game
+ ////////////////////////////////////////////////////////////
+
+ private class LoadGame
+ {
+ private byte[] data;
+ private int ptr;
+
+ public LoadGame(byte[] data)
+ {
+ this.data = data;
+ ptr = 0;
+
+ ReadDescription();
+
+ var version = ReadVersion();
+ if (version != "VERSION 109")
+ {
+ throw new Exception("Unsupported version!");
+ }
+ }
+
+ public void Load(DoomGame game)
+ {
+ var options = game.World.Options;
+ options.Skill = (GameSkill)data[ptr++];
+ options.Episode = data[ptr++];
+ options.Map = data[ptr++];
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ options.Players[i].InGame = data[ptr++] != 0;
+ }
+
+ game.InitNew(options.Skill, options.Episode, options.Map);
+
+ var a = data[ptr++];
+ var b = data[ptr++];
+ var c = data[ptr++];
+ var levelTime = (a << 16) + (b << 8) + c;
+
+ UnArchivePlayers(game.World);
+ UnArchiveWorld(game.World);
+ UnArchiveThinkers(game.World);
+ UnArchiveSpecials(game.World);
+
+ if (data[ptr] != 0x1d)
+ {
+ throw new Exception("Bad savegame!");
+ }
+
+ game.World.LevelTime = levelTime;
+
+ options.Sound.SetListener(game.World.ConsolePlayer.Mobj);
+ }
+
+ private void PadPointer()
+ {
+ ptr += (4 - (ptr & 3)) & 3;
+ }
+
+ private string ReadDescription()
+ {
+ var value = DoomInterop.ToString(data, ptr, DescriptionSize);
+ ptr += DescriptionSize;
+ return value;
+ }
+
+ private string ReadVersion()
+ {
+ var value = DoomInterop.ToString(data, ptr, versionSize);
+ ptr += versionSize;
+ return value;
+ }
+
+ private void UnArchivePlayers(World world)
+ {
+ var players = world.Options.Players;
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (!players[i].InGame)
+ {
+ continue;
+ }
+
+ PadPointer();
+
+ ptr = UnArchivePlayer(players[i], data, ptr);
+ }
+ }
+
+ private void UnArchiveWorld(World world)
+ {
+ // Do sectors.
+ var sectors = world.Map.Sectors;
+ for (var i = 0; i < sectors.Length; i++)
+ {
+ ptr = UnArchiveSector(sectors[i], data, ptr);
+ }
+
+ // Do lines.
+ var lines = world.Map.Lines;
+ for (var i = 0; i < lines.Length; i++)
+ {
+ ptr = UnArchiveLine(lines[i], data, ptr);
+ }
+ }
+
+ private void UnArchiveThinkers(World world)
+ {
+ var thinkers = world.Thinkers;
+ var ta = world.ThingAllocation;
+
+ // Remove all the current thinkers.
+ foreach (var thinker in thinkers)
+ {
+ var mobj = thinker as Mobj;
+ if (mobj != null)
+ {
+ ta.RemoveMobj(mobj);
+ }
+ }
+ thinkers.Reset();
+
+ // Read in saved thinkers.
+ while (true)
+ {
+ var tclass = (ThinkerClass)data[ptr++];
+ switch (tclass)
+ {
+ case ThinkerClass.End:
+ // End of list.
+ return;
+
+ case ThinkerClass.Mobj:
+ PadPointer();
+ var mobj = new Mobj(world);
+ mobj.ThinkerState = ReadThinkerState(data, ptr + 8);
+ mobj.X = new Fixed(BitConverter.ToInt32(data, ptr + 12));
+ mobj.Y = new Fixed(BitConverter.ToInt32(data, ptr + 16));
+ mobj.Z = new Fixed(BitConverter.ToInt32(data, ptr + 20));
+ mobj.Angle = new Angle(BitConverter.ToInt32(data, ptr + 32));
+ mobj.Sprite = (Sprite)BitConverter.ToInt32(data, ptr + 36);
+ mobj.Frame = BitConverter.ToInt32(data, ptr + 40);
+ mobj.FloorZ = new Fixed(BitConverter.ToInt32(data, ptr + 56));
+ mobj.CeilingZ = new Fixed(BitConverter.ToInt32(data, ptr + 60));
+ mobj.Radius = new Fixed(BitConverter.ToInt32(data, ptr + 64));
+ mobj.Height = new Fixed(BitConverter.ToInt32(data, ptr + 68));
+ mobj.MomX = new Fixed(BitConverter.ToInt32(data, ptr + 72));
+ mobj.MomY = new Fixed(BitConverter.ToInt32(data, ptr + 76));
+ mobj.MomZ = new Fixed(BitConverter.ToInt32(data, ptr + 80));
+ mobj.Type = (MobjType)BitConverter.ToInt32(data, ptr + 88);
+ mobj.Info = DoomInfo.MobjInfos[(int)mobj.Type];
+ mobj.Tics = BitConverter.ToInt32(data, ptr + 96);
+ mobj.State = DoomInfo.States[BitConverter.ToInt32(data, ptr + 100)];
+ mobj.Flags = (MobjFlags)BitConverter.ToInt32(data, ptr + 104);
+ mobj.Health = BitConverter.ToInt32(data, ptr + 108);
+ mobj.MoveDir = (Direction)BitConverter.ToInt32(data, ptr + 112);
+ mobj.MoveCount = BitConverter.ToInt32(data, ptr + 116);
+ mobj.ReactionTime = BitConverter.ToInt32(data, ptr + 124);
+ mobj.Threshold = BitConverter.ToInt32(data, ptr + 128);
+ var playerNumber = BitConverter.ToInt32(data, ptr + 132);
+ if (playerNumber != 0)
+ {
+ mobj.Player = world.Options.Players[playerNumber - 1];
+ mobj.Player.Mobj = mobj;
+ }
+ mobj.LastLook = BitConverter.ToInt32(data, ptr + 136);
+ mobj.SpawnPoint = new MapThing(
+ Fixed.FromInt(BitConverter.ToInt16(data, ptr + 140)),
+ Fixed.FromInt(BitConverter.ToInt16(data, ptr + 142)),
+ new Angle(Angle.Ang45.Data * (uint)(BitConverter.ToInt16(data, ptr + 144) / 45)),
+ BitConverter.ToInt16(data, ptr + 146),
+ (ThingFlags)BitConverter.ToInt16(data, ptr + 148));
+ ptr += 154;
+
+ world.ThingMovement.SetThingPosition(mobj);
+ // mobj.FloorZ = mobj.Subsector.Sector.FloorHeight;
+ // mobj.CeilingZ = mobj.Subsector.Sector.CeilingHeight;
+ thinkers.Add(mobj);
+ break;
+
+ default:
+ throw new Exception("Unknown thinker class in savegame!");
+ }
+ }
+ }
+
+ private void UnArchiveSpecials(World world)
+ {
+ var thinkers = world.Thinkers;
+ var sa = world.SectorAction;
+
+ // Read in saved thinkers.
+ while (true)
+ {
+ var tclass = (SpecialClass)data[ptr++];
+ switch (tclass)
+ {
+ case SpecialClass.EndSpecials:
+ // End of list.
+ return;
+
+ case SpecialClass.Ceiling:
+ PadPointer();
+ var ceiling = new CeilingMove(world);
+ ceiling.ThinkerState = ReadThinkerState(data, ptr + 8);
+ ceiling.Type = (CeilingMoveType)BitConverter.ToInt32(data, ptr + 12);
+ ceiling.Sector = world.Map.Sectors[BitConverter.ToInt32(data, ptr + 16)];
+ ceiling.Sector.SpecialData = ceiling;
+ ceiling.BottomHeight = new Fixed(BitConverter.ToInt32(data, ptr + 20));
+ ceiling.TopHeight = new Fixed(BitConverter.ToInt32(data, ptr + 24));
+ ceiling.Speed = new Fixed(BitConverter.ToInt32(data, ptr + 28));
+ ceiling.Crush = BitConverter.ToInt32(data, ptr + 32) != 0;
+ ceiling.Direction = BitConverter.ToInt32(data, ptr + 36);
+ ceiling.Tag = BitConverter.ToInt32(data, ptr + 40);
+ ceiling.OldDirection = BitConverter.ToInt32(data, ptr + 44);
+ ptr += 48;
+
+ thinkers.Add(ceiling);
+ sa.AddActiveCeiling(ceiling);
+ break;
+
+ case SpecialClass.Door:
+ PadPointer();
+ var door = new VerticalDoor(world);
+ door.ThinkerState = ReadThinkerState(data, ptr + 8);
+ door.Type = (VerticalDoorType)BitConverter.ToInt32(data, ptr + 12);
+ door.Sector = world.Map.Sectors[BitConverter.ToInt32(data, ptr + 16)];
+ door.Sector.SpecialData = door;
+ door.TopHeight = new Fixed(BitConverter.ToInt32(data, ptr + 20));
+ door.Speed = new Fixed(BitConverter.ToInt32(data, ptr + 24));
+ door.Direction = BitConverter.ToInt32(data, ptr + 28);
+ door.TopWait = BitConverter.ToInt32(data, ptr + 32);
+ door.TopCountDown = BitConverter.ToInt32(data, ptr + 36);
+ ptr += 40;
+
+ thinkers.Add(door);
+ break;
+
+ case SpecialClass.Floor:
+ PadPointer();
+ var floor = new FloorMove(world);
+ floor.ThinkerState = ReadThinkerState(data, ptr + 8);
+ floor.Type = (FloorMoveType)BitConverter.ToInt32(data, ptr + 12);
+ floor.Crush = BitConverter.ToInt32(data, ptr + 16) != 0;
+ floor.Sector = world.Map.Sectors[BitConverter.ToInt32(data, ptr + 20)];
+ floor.Sector.SpecialData = floor;
+ floor.Direction = BitConverter.ToInt32(data, ptr + 24);
+ floor.NewSpecial = (SectorSpecial)BitConverter.ToInt32(data, ptr + 28);
+ floor.Texture = BitConverter.ToInt32(data, ptr + 32);
+ floor.FloorDestHeight = new Fixed(BitConverter.ToInt32(data, ptr + 36));
+ floor.Speed = new Fixed(BitConverter.ToInt32(data, ptr + 40));
+ ptr += 44;
+
+ thinkers.Add(floor);
+ break;
+
+ case SpecialClass.Plat:
+ PadPointer();
+ var plat = new Platform(world);
+ plat.ThinkerState = ReadThinkerState(data, ptr + 8);
+ plat.Sector = world.Map.Sectors[BitConverter.ToInt32(data, ptr + 12)];
+ plat.Sector.SpecialData = plat;
+ plat.Speed = new Fixed(BitConverter.ToInt32(data, ptr + 16));
+ plat.Low = new Fixed(BitConverter.ToInt32(data, ptr + 20));
+ plat.High = new Fixed(BitConverter.ToInt32(data, ptr + 24));
+ plat.Wait = BitConverter.ToInt32(data, ptr + 28);
+ plat.Count = BitConverter.ToInt32(data, ptr + 32);
+ plat.Status = (PlatformState)BitConverter.ToInt32(data, ptr + 36);
+ plat.OldStatus = (PlatformState)BitConverter.ToInt32(data, ptr + 40);
+ plat.Crush = BitConverter.ToInt32(data, ptr + 44) != 0;
+ plat.Tag = BitConverter.ToInt32(data, ptr + 48);
+ plat.Type = (PlatformType)BitConverter.ToInt32(data, ptr + 52);
+ ptr += 56;
+
+ thinkers.Add(plat);
+ sa.AddActivePlatform(plat);
+ break;
+
+ case SpecialClass.Flash:
+ PadPointer();
+ var flash = new LightFlash(world);
+ flash.ThinkerState = ReadThinkerState(data, ptr + 8);
+ flash.Sector = world.Map.Sectors[BitConverter.ToInt32(data, ptr + 12)];
+ flash.Count = BitConverter.ToInt32(data, ptr + 16);
+ flash.MaxLight = BitConverter.ToInt32(data, ptr + 20);
+ flash.MinLight = BitConverter.ToInt32(data, ptr + 24);
+ flash.MaxTime = BitConverter.ToInt32(data, ptr + 28);
+ flash.MinTime = BitConverter.ToInt32(data, ptr + 32);
+ ptr += 36;
+
+ thinkers.Add(flash);
+ break;
+
+ case SpecialClass.Strobe:
+ PadPointer();
+ var strobe = new StrobeFlash(world);
+ strobe.ThinkerState = ReadThinkerState(data, ptr + 8);
+ strobe.Sector = world.Map.Sectors[BitConverter.ToInt32(data, ptr + 12)];
+ strobe.Count = BitConverter.ToInt32(data, ptr + 16);
+ strobe.MinLight = BitConverter.ToInt32(data, ptr + 20);
+ strobe.MaxLight = BitConverter.ToInt32(data, ptr + 24);
+ strobe.DarkTime = BitConverter.ToInt32(data, ptr + 28);
+ strobe.BrightTime = BitConverter.ToInt32(data, ptr + 32);
+ ptr += 36;
+
+ thinkers.Add(strobe);
+ break;
+
+ case SpecialClass.Glow:
+ PadPointer();
+ var glow = new GlowingLight(world);
+ glow.ThinkerState = ReadThinkerState(data, ptr + 8);
+ glow.Sector = world.Map.Sectors[BitConverter.ToInt32(data, ptr + 12)];
+ glow.MinLight = BitConverter.ToInt32(data, ptr + 16);
+ glow.MaxLight = BitConverter.ToInt32(data, ptr + 20);
+ glow.Direction = BitConverter.ToInt32(data, ptr + 24);
+ ptr += 28;
+
+ thinkers.Add(glow);
+ break;
+
+ default:
+ throw new Exception("Unknown special in savegame!");
+ }
+ }
+ }
+
+ private static ThinkerState ReadThinkerState(byte[] data, int p)
+ {
+ switch (BitConverter.ToInt32(data, p))
+ {
+ case 0:
+ return ThinkerState.InStasis;
+ default:
+ return ThinkerState.Active;
+ }
+ }
+
+ private static int UnArchivePlayer(Player player, byte[] data, int p)
+ {
+ player.Clear();
+
+ player.PlayerState = (PlayerState)BitConverter.ToInt32(data, p + 4);
+ player.ViewZ = new Fixed(BitConverter.ToInt32(data, p + 16));
+ player.ViewHeight = new Fixed(BitConverter.ToInt32(data, p + 20));
+ player.DeltaViewHeight = new Fixed(BitConverter.ToInt32(data, p + 24));
+ player.Bob = new Fixed(BitConverter.ToInt32(data, p + 28));
+ player.Health = BitConverter.ToInt32(data, p + 32);
+ player.ArmorPoints = BitConverter.ToInt32(data, p + 36);
+ player.ArmorType = BitConverter.ToInt32(data, p + 40);
+ for (var i = 0; i < (int)PowerType.Count; i++)
+ {
+ player.Powers[i] = BitConverter.ToInt32(data, p + 44 + 4 * i);
+ }
+ for (var i = 0; i < (int)PowerType.Count; i++)
+ {
+ player.Cards[i] = BitConverter.ToInt32(data, p + 68 + 4 * i) != 0;
+ }
+ player.Backpack = BitConverter.ToInt32(data, p + 92) != 0;
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ player.Frags[i] = BitConverter.ToInt32(data, p + 96 + 4 * i);
+ }
+ player.ReadyWeapon = (WeaponType)BitConverter.ToInt32(data, p + 112);
+ player.PendingWeapon = (WeaponType)BitConverter.ToInt32(data, p + 116);
+ for (var i = 0; i < (int)WeaponType.Count; i++)
+ {
+ player.WeaponOwned[i] = BitConverter.ToInt32(data, p + 120 + 4 * i) != 0;
+ }
+ for (var i = 0; i < (int)AmmoType.Count; i++)
+ {
+ player.Ammo[i] = BitConverter.ToInt32(data, p + 156 + 4 * i);
+ }
+ for (var i = 0; i < (int)AmmoType.Count; i++)
+ {
+ player.MaxAmmo[i] = BitConverter.ToInt32(data, p + 172 + 4 * i);
+ }
+ player.AttackDown = BitConverter.ToInt32(data, p + 188) != 0;
+ player.UseDown = BitConverter.ToInt32(data, p + 192) != 0;
+ player.Cheats = (CheatFlags)BitConverter.ToInt32(data, p + 196);
+ player.Refire = BitConverter.ToInt32(data, p + 200);
+ player.KillCount = BitConverter.ToInt32(data, p + 204);
+ player.ItemCount = BitConverter.ToInt32(data, p + 208);
+ player.SecretCount = BitConverter.ToInt32(data, p + 212);
+ player.DamageCount = BitConverter.ToInt32(data, p + 220);
+ player.BonusCount = BitConverter.ToInt32(data, p + 224);
+ player.ExtraLight = BitConverter.ToInt32(data, p + 232);
+ player.FixedColorMap = BitConverter.ToInt32(data, p + 236);
+ player.ColorMap = BitConverter.ToInt32(data, p + 240);
+ for (var i = 0; i < (int)PlayerSprite.Count; i++)
+ {
+ player.PlayerSprites[i].State = DoomInfo.States[BitConverter.ToInt32(data, p + 244 + 16 * i)];
+ if (player.PlayerSprites[i].State.Number == (int)MobjState.Null)
+ {
+ player.PlayerSprites[i].State = null;
+ }
+ player.PlayerSprites[i].Tics = BitConverter.ToInt32(data, p + 244 + 16 * i + 4);
+ player.PlayerSprites[i].Sx = new Fixed(BitConverter.ToInt32(data, p + 244 + 16 * i + 8));
+ player.PlayerSprites[i].Sy = new Fixed(BitConverter.ToInt32(data, p + 244 + 16 * i + 12));
+ }
+ player.DidSecret = BitConverter.ToInt32(data, p + 276) != 0;
+
+ return p + 280;
+ }
+
+ private static int UnArchiveSector(Sector sector, byte[] data, int p)
+ {
+ sector.FloorHeight = Fixed.FromInt(BitConverter.ToInt16(data, p));
+ sector.CeilingHeight = Fixed.FromInt(BitConverter.ToInt16(data, p + 2));
+ sector.FloorFlat = BitConverter.ToInt16(data, p + 4);
+ sector.CeilingFlat = BitConverter.ToInt16(data, p + 6);
+ sector.LightLevel = BitConverter.ToInt16(data, p + 8);
+ sector.Special = (SectorSpecial)BitConverter.ToInt16(data, p + 10);
+ sector.Tag = BitConverter.ToInt16(data, p + 12);
+ sector.SpecialData = null;
+ sector.SoundTarget = null;
+ return p + 14;
+ }
+
+ private static int UnArchiveLine(LineDef line, byte[] data, int p)
+ {
+ line.Flags = (LineFlags)BitConverter.ToInt16(data, p);
+ line.Special = (LineSpecial)BitConverter.ToInt16(data, p + 2);
+ line.Tag = BitConverter.ToInt16(data, p + 4);
+ p += 6;
+
+ if (line.FrontSide != null)
+ {
+ var side = line.FrontSide;
+ side.TextureOffset = Fixed.FromInt(BitConverter.ToInt16(data, p));
+ side.RowOffset = Fixed.FromInt(BitConverter.ToInt16(data, p + 2));
+ side.TopTexture = BitConverter.ToInt16(data, p + 4);
+ side.BottomTexture = BitConverter.ToInt16(data, p + 6);
+ side.MiddleTexture = BitConverter.ToInt16(data, p + 8);
+ p += 10;
+ }
+
+ if (line.BackSide != null)
+ {
+ var side = line.BackSide;
+ side.TextureOffset = Fixed.FromInt(BitConverter.ToInt16(data, p));
+ side.RowOffset = Fixed.FromInt(BitConverter.ToInt16(data, p + 2));
+ side.TopTexture = BitConverter.ToInt16(data, p + 4);
+ side.BottomTexture = BitConverter.ToInt16(data, p + 6);
+ side.MiddleTexture = BitConverter.ToInt16(data, p + 8);
+ p += 10;
+ }
+
+ return p;
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/TicCmd.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/TicCmd.cs
new file mode 100644
index 00000000..04d54ec8
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/TicCmd.cs
@@ -0,0 +1,69 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class TicCmd
+ {
+ private sbyte forwardMove;
+ private sbyte sideMove;
+ private short angleTurn;
+ private byte buttons;
+
+ public void Clear()
+ {
+ forwardMove = 0;
+ sideMove = 0;
+ angleTurn = 0;
+ buttons = 0;
+ }
+
+ public void CopyFrom(TicCmd cmd)
+ {
+ forwardMove = cmd.forwardMove;
+ sideMove = cmd.sideMove;
+ angleTurn = cmd.angleTurn;
+ buttons = cmd.buttons;
+ }
+
+ public sbyte ForwardMove
+ {
+ get => forwardMove;
+ set => forwardMove = value;
+ }
+
+ public sbyte SideMove
+ {
+ get => sideMove;
+ set => sideMove = value;
+ }
+
+ public short AngleTurn
+ {
+ get => angleTurn;
+ set => angleTurn = value;
+ }
+
+ public byte Buttons
+ {
+ get => buttons;
+ set => buttons = value;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/TicCmdButtons.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/TicCmdButtons.cs
new file mode 100644
index 00000000..f25ef05a
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/TicCmdButtons.cs
@@ -0,0 +1,44 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static class TicCmdButtons
+ {
+ public static readonly byte Attack = 1;
+
+ // Use button, to open doors, activate switches.
+ public static readonly byte Use = 2;
+
+ // Flag: game events, not really buttons.
+ public static readonly byte Special = 128;
+ public static readonly byte SpecialMask = 3;
+
+ // Flag, weapon change pending.
+ // If true, the next 3 bits hold weapon num.
+ public static readonly byte Change = 4;
+
+ // The 3bit weapon mask and shift, convenience.
+ public static readonly byte WeaponMask = 8 + 16 + 32;
+ public static readonly byte WeaponShift = 3;
+
+ // Pause the game.
+ public static readonly byte Pause = 1;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/UpdateResult.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/UpdateResult.cs
new file mode 100644
index 00000000..08b3bfe3
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Game/UpdateResult.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum UpdateResult
+ {
+ None,
+ Completed,
+ NeedWipe
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/AnimationDef.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/AnimationDef.cs
new file mode 100644
index 00000000..2d537862
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/AnimationDef.cs
@@ -0,0 +1,42 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class AnimationDef
+ {
+ private bool isTexture;
+ private string endName;
+ private string startName;
+ private int speed;
+
+ public AnimationDef(bool isTexture, string endName, string startName, int speed)
+ {
+ this.isTexture = isTexture;
+ this.endName = endName;
+ this.startName = startName;
+ this.speed = speed;
+ }
+
+ public bool IsTexture => isTexture;
+ public string EndName => endName;
+ public string StartName => startName;
+ public int Speed => speed;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/ColorMap.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/ColorMap.cs
new file mode 100644
index 00000000..1fd83a78
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/ColorMap.cs
@@ -0,0 +1,73 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Runtime.ExceptionServices;
+
+namespace ManagedDoom
+{
+ public sealed class ColorMap
+ {
+ public static readonly int Inverse = 32;
+
+ private byte[][] data;
+
+ public ColorMap(Wad wad)
+ {
+ try
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.Write("Load color map: ");
+
+ var raw = wad.ReadLump("COLORMAP");
+ var num = raw.Length / 256;
+ data = new byte[num][];
+ for (var i = 0; i < num; i++)
+ {
+ data[i] = new byte[256];
+ var offset = 256 * i;
+ for (var c = 0; c < 256; c++)
+ {
+ data[i][c] = raw[offset + c];
+ }
+ }
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("OK");
+ }
+ catch (Exception e)
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("Failed");
+ ExceptionDispatchInfo.Throw(e);
+ }
+ }
+
+ public byte[] this[int index]
+ {
+ get
+ {
+ return data[index];
+ }
+ }
+
+ public byte[] FullBright
+ {
+ get
+ {
+ return data[0];
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Column.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Column.cs
new file mode 100644
index 00000000..ea0ff2f8
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Column.cs
@@ -0,0 +1,44 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class Column
+ {
+ public const int Last = 0xFF;
+
+ private int topDelta;
+ private byte[] data;
+ private int offset;
+ private int length;
+
+ public Column(int topDelta, byte[] data, int offset, int length)
+ {
+ this.topDelta = topDelta;
+ this.data = data;
+ this.offset = offset;
+ this.length = length;
+ }
+
+ public int TopDelta => topDelta;
+ public byte[] Data => data;
+ public int Offset => offset;
+ public int Length => length;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Dummy.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Dummy.cs
new file mode 100644
index 00000000..a7980f16
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Dummy.cs
@@ -0,0 +1,125 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public static class Dummy
+ {
+ private static Patch dummyPatch;
+
+ public static Patch GetPatch()
+ {
+ if (dummyPatch != null)
+ {
+ return dummyPatch;
+ }
+ else
+ {
+ var width = 64;
+ var height = 128;
+
+ var data = new byte[height + 32];
+ for (var y = 0; y < data.Length; y++)
+ {
+ data[y] = y / 32 % 2 == 0 ? (byte)80 : (byte)96;
+ }
+
+ var columns = new Column[width][];
+ var c1 = new Column[] { new Column(0, data, 0, height) };
+ var c2 = new Column[] { new Column(0, data, 32, height) };
+ for (var x = 0; x < width; x++)
+ {
+ columns[x] = x / 32 % 2 == 0 ? c1 : c2;
+ }
+
+ dummyPatch = new Patch("DUMMY", width, height, 32, 128, columns);
+
+ return dummyPatch;
+ }
+ }
+
+
+
+ private static Dictionary dummyTextures = new Dictionary();
+
+ public static Texture GetTexture(int height)
+ {
+ if (dummyTextures.ContainsKey(height))
+ {
+ return dummyTextures[height];
+ }
+ else
+ {
+ var patch = new TexturePatch[] { new TexturePatch(0, 0, GetPatch()) };
+
+ dummyTextures.Add(height, new Texture("DUMMY", false, 64, height, patch));
+
+ return dummyTextures[height];
+ }
+ }
+
+
+
+ private static Flat dummyFlat;
+
+ public static Flat GetFlat()
+ {
+ if (dummyFlat != null)
+ {
+ return dummyFlat;
+ }
+ else
+ {
+ var data = new byte[64 * 64];
+ var spot = 0;
+ for (var y = 0; y < 64; y++)
+ {
+ for (var x = 0; x < 64; x++)
+ {
+ data[spot] = ((x / 32) ^ (y / 32)) == 0 ? (byte)80 : (byte)96;
+ spot++;
+ }
+ }
+
+ dummyFlat = new Flat("DUMMY", data);
+
+ return dummyFlat;
+ }
+ }
+
+
+
+ private static Flat dummySkyFlat;
+
+ public static Flat GetSkyFlat()
+ {
+ if (dummySkyFlat != null)
+ {
+ return dummySkyFlat;
+ }
+ else
+ {
+ dummySkyFlat = new Flat("DUMMY", GetFlat().Data);
+
+ return dummySkyFlat;
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Flat.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Flat.cs
new file mode 100644
index 00000000..8e56f2e7
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Flat.cs
@@ -0,0 +1,46 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class Flat
+ {
+ private string name;
+ private byte[] data;
+
+ public Flat(string name, byte[] data)
+ {
+ this.name = name;
+ this.data = data;
+ }
+
+ public static Flat FromData(string name, byte[] data)
+ {
+ return new Flat(name, data);
+ }
+
+ public override string ToString()
+ {
+ return name;
+ }
+
+ public string Name => name;
+ public byte[] Data => data;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/FlatLookup.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/FlatLookup.cs
new file mode 100644
index 00000000..45b7efa4
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/FlatLookup.cs
@@ -0,0 +1,278 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.ExceptionServices;
+
+namespace ManagedDoom
+{
+ public sealed class FlatLookup : IReadOnlyList
+ {
+ private Flat[] flats;
+
+ private Dictionary nameToFlat;
+ private Dictionary nameToNumber;
+
+ private int skyFlatNumber;
+ private Flat skyFlat;
+
+ public FlatLookup(Wad wad) : this(wad, false)
+ {
+ }
+
+ public FlatLookup(Wad wad, bool useDummy)
+ {
+ if (!useDummy)
+ {
+ var fStartCount = CountLump(wad, "F_START");
+ var fEndCount = CountLump(wad, "F_END");
+ var ffStartCount = CountLump(wad, "FF_START");
+ var ffEndCount = CountLump(wad, "FF_END");
+
+ // Usual case.
+ var standard =
+ fStartCount == 1 &&
+ fEndCount == 1 &&
+ ffStartCount == 0 &&
+ ffEndCount == 0;
+
+ // A trick to add custom flats is used.
+ // https://www.doomworld.com/tutorials/fx2.php
+ var customFlatTrick =
+ fStartCount == 1 &&
+ fEndCount >= 2;
+
+ // Need deutex to add flats.
+ var deutexMerge =
+ fStartCount + ffStartCount >= 2 &&
+ fEndCount + ffEndCount >= 2;
+
+ if (standard || customFlatTrick)
+ {
+ InitStandard(wad);
+ }
+ else if (deutexMerge)
+ {
+ InitDeuTexMerge(wad);
+ }
+ else
+ {
+ throw new Exception("Faild to read flats.");
+ }
+ }
+ else
+ {
+ InitDummy(wad);
+ }
+ }
+
+ private void InitStandard(Wad wad)
+ {
+ try
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.Write("Load flats: ");
+
+ var firstFlat = wad.GetLumpNumber("F_START") + 1;
+ var lastFlat = wad.GetLumpNumber("F_END") - 1;
+ var count = lastFlat - firstFlat + 1;
+
+ flats = new Flat[count];
+
+ nameToFlat = new Dictionary();
+ nameToNumber = new Dictionary();
+
+ for (var lump = firstFlat; lump <= lastFlat; lump++)
+ {
+ if (wad.GetLumpSize(lump) != 4096)
+ {
+ continue;
+ }
+
+ var number = lump - firstFlat;
+ var name = wad.LumpInfos[lump].Name;
+ var flat = new Flat(name, wad.ReadLump(lump));
+
+ flats[number] = flat;
+ nameToFlat[name] = flat;
+ nameToNumber[name] = number;
+ }
+
+ skyFlatNumber = nameToNumber["F_SKY1"];
+ skyFlat = nameToFlat["F_SKY1"];
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("OK (" + nameToFlat.Count + " flats)");
+ }
+ catch (Exception e)
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("Failed");
+ ExceptionDispatchInfo.Throw(e);
+ }
+ }
+
+ private void InitDeuTexMerge(Wad wad)
+ {
+ try
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.Write("Load flats: ");
+
+ var allFlats = new List();
+ var flatZone = false;
+ for (var lump = 0; lump < wad.LumpInfos.Count; lump++)
+ {
+ var name = wad.LumpInfos[lump].Name;
+ if (flatZone)
+ {
+ if (name == "F_END" || name == "FF_END")
+ {
+ flatZone = false;
+ }
+ else
+ {
+ allFlats.Add(lump);
+ }
+ }
+ else
+ {
+ if (name == "F_START" || name == "FF_START")
+ {
+ flatZone = true;
+ }
+ }
+ }
+ allFlats.Reverse();
+
+ var dupCheck = new HashSet();
+ var distinctFlats = new List();
+ foreach (var lump in allFlats)
+ {
+ if (!dupCheck.Contains(wad.LumpInfos[lump].Name))
+ {
+ distinctFlats.Add(lump);
+ dupCheck.Add(wad.LumpInfos[lump].Name);
+ }
+ }
+ distinctFlats.Reverse();
+
+ flats = new Flat[distinctFlats.Count];
+
+ nameToFlat = new Dictionary();
+ nameToNumber = new Dictionary();
+
+ for (var number = 0; number < flats.Length; number++)
+ {
+ var lump = distinctFlats[number];
+
+ if (wad.GetLumpSize(lump) != 4096)
+ {
+ continue;
+ }
+
+ var name = wad.LumpInfos[lump].Name;
+ var flat = new Flat(name, wad.ReadLump(lump));
+
+ flats[number] = flat;
+ nameToFlat[name] = flat;
+ nameToNumber[name] = number;
+ }
+
+ skyFlatNumber = nameToNumber["F_SKY1"];
+ skyFlat = nameToFlat["F_SKY1"];
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("OK (" + nameToFlat.Count + " flats)");
+ }
+ catch (Exception e)
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("Failed");
+ ExceptionDispatchInfo.Throw(e);
+ }
+ }
+
+ private void InitDummy(Wad wad)
+ {
+ var firstFlat = wad.GetLumpNumber("F_START") + 1;
+ var lastFlat = wad.GetLumpNumber("F_END") - 1;
+ var count = lastFlat - firstFlat + 1;
+
+ flats = new Flat[count];
+
+ nameToFlat = new Dictionary();
+ nameToNumber = new Dictionary();
+
+ for (var lump = firstFlat; lump <= lastFlat; lump++)
+ {
+ if (wad.GetLumpSize(lump) != 4096)
+ {
+ continue;
+ }
+
+ var number = lump - firstFlat;
+ var name = wad.LumpInfos[lump].Name;
+ var flat = name != "F_SKY1" ? Dummy.GetFlat() : Dummy.GetSkyFlat();
+
+ flats[number] = flat;
+ nameToFlat[name] = flat;
+ nameToNumber[name] = number;
+ }
+
+ skyFlatNumber = nameToNumber["F_SKY1"];
+ skyFlat = nameToFlat["F_SKY1"];
+ }
+
+ public int GetNumber(string name)
+ {
+ if (nameToNumber.ContainsKey(name))
+ {
+ return nameToNumber[name];
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ return ((IEnumerable)flats).GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return flats.GetEnumerator();
+ }
+
+ private static int CountLump(Wad wad, string name)
+ {
+ var count = 0;
+ foreach (var lump in wad.LumpInfos)
+ {
+ if (lump.Name == name)
+ {
+ count++;
+ }
+ }
+ return count;
+ }
+
+ public int Count => flats.Length;
+ public Flat this[int num] => flats[num];
+ public Flat this[string name] => nameToFlat[name];
+ public int SkyFlatNumber => skyFlatNumber;
+ public Flat SkyFlat => skyFlat;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Palette.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Palette.cs
new file mode 100644
index 00000000..399131b3
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Palette.cs
@@ -0,0 +1,96 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Runtime.ExceptionServices;
+
+namespace ManagedDoom
+{
+ public sealed class Palette
+ {
+ public static readonly int DamageStart = 1;
+ public static readonly int DamageCount = 8;
+
+ public static readonly int BonusStart = 9;
+ public static readonly int BonusCount = 4;
+
+ public static readonly int IronFeet = 13;
+
+ private byte[] data;
+
+ private uint[][] palettes;
+
+ public Palette(Wad wad)
+ {
+ try
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.Write("Load palette: ");
+
+ data = wad.ReadLump("PLAYPAL");
+
+ var count = data.Length / (3 * 256);
+ palettes = new uint[count][];
+ for (var i = 0; i < palettes.Length; i++)
+ {
+ palettes[i] = new uint[256];
+ }
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("OK");
+ }
+ catch (Exception e)
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("Failed");
+ ExceptionDispatchInfo.Throw(e);
+ }
+ }
+
+ public void ResetColors(double p)
+ {
+ for (var i = 0; i < palettes.Length; i++)
+ {
+ var paletteOffset = (3 * 256) * i;
+ for (var j = 0; j < 256; j++)
+ {
+ var colorOffset = paletteOffset + 3 * j;
+
+ var r = data[colorOffset];
+ var g = data[colorOffset + 1];
+ var b = data[colorOffset + 2];
+
+ r = (byte)Math.Round(255 * CorrectionCurve(r / 255.0, p));
+ g = (byte)Math.Round(255 * CorrectionCurve(g / 255.0, p));
+ b = (byte)Math.Round(255 * CorrectionCurve(b / 255.0, p));
+
+ palettes[i][j] = (uint)((r << 0) | (g << 8) | (b << 16) | (255 << 24));
+ }
+ }
+ }
+
+ private static double CorrectionCurve(double x, double p)
+ {
+ return Math.Pow(x, p);
+ }
+
+ public uint[] this[int paletteNumber]
+ {
+ get
+ {
+ return palettes[paletteNumber];
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Patch.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Patch.cs
new file mode 100644
index 00000000..fbe9f942
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Patch.cs
@@ -0,0 +1,129 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public sealed class Patch
+ {
+ private string name;
+ private int width;
+ private int height;
+ private int leftOffset;
+ private int topOffset;
+ private Column[][] columns;
+
+ public Patch(
+ string name,
+ int width,
+ int height,
+ int leftOffset,
+ int topOffset,
+ Column[][] columns)
+ {
+ this.name = name;
+ this.width = width;
+ this.height = height;
+ this.leftOffset = leftOffset;
+ this.topOffset = topOffset;
+ this.columns = columns;
+ }
+
+ public static Patch FromData(string name, byte[] data)
+ {
+ var width = BitConverter.ToInt16(data, 0);
+ var height = BitConverter.ToInt16(data, 2);
+ var leftOffset = BitConverter.ToInt16(data, 4);
+ var topOffset = BitConverter.ToInt16(data, 6);
+
+ PadData(ref data, width);
+
+ var columns = new Column[width][];
+ for (var x = 0; x < width; x++)
+ {
+ var cs = new List();
+ var p = BitConverter.ToInt32(data, 8 + 4 * x);
+ while (true)
+ {
+ var topDelta = data[p];
+ if (topDelta == Column.Last)
+ {
+ break;
+ }
+ var length = data[p + 1];
+ var offset = p + 3;
+ cs.Add(new Column(topDelta, data, offset, length));
+ p += length + 4;
+ }
+ columns[x] = cs.ToArray();
+ }
+
+ return new Patch(
+ name,
+ width,
+ height,
+ leftOffset,
+ topOffset,
+ columns);
+ }
+
+ public static Patch FromWad(Wad wad, string name)
+ {
+ return FromData(name, wad.ReadLump(name));
+ }
+
+ private static void PadData(ref byte[] data, int width)
+ {
+ var need = 0;
+ for (var x = 0; x < width; x++)
+ {
+ var p = BitConverter.ToInt32(data, 8 + 4 * x);
+ while (true)
+ {
+ var topDelta = data[p];
+ if (topDelta == Column.Last)
+ {
+ break;
+ }
+ var length = data[p + 1];
+ var offset = p + 3;
+ need = Math.Max(offset + 128, need);
+ p += length + 4;
+ }
+ }
+
+ if (data.Length < need)
+ {
+ Array.Resize(ref data, need);
+ }
+ }
+
+ public override string ToString()
+ {
+ return name;
+ }
+
+ public string Name => name;
+ public int Width => width;
+ public int Height => height;
+ public int LeftOffset => leftOffset;
+ public int TopOffset => topOffset;
+ public Column[][] Columns => columns;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/PatchCache.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/PatchCache.cs
new file mode 100644
index 00000000..76695bea
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/PatchCache.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public sealed class PatchCache
+ {
+ private Wad wad;
+ private Dictionary cache;
+
+ public PatchCache(Wad wad)
+ {
+ this.wad = wad;
+
+ cache = new Dictionary();
+ }
+
+ public Patch this[string name]
+ {
+ get
+ {
+ Patch patch;
+ if (!cache.TryGetValue(name, out patch))
+ {
+ patch = Patch.FromWad(wad, name);
+ cache.Add(name, patch);
+ }
+ return patch;
+ }
+ }
+
+ public int GetWidth(string name)
+ {
+ return this[name].Width;
+ }
+
+ public int GetHeight(string name)
+ {
+ return this[name].Height;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Sprite.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Sprite.cs
new file mode 100644
index 00000000..e0ccb3f0
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Sprite.cs
@@ -0,0 +1,164 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum Sprite
+ {
+ TROO,
+ SHTG,
+ PUNG,
+ PISG,
+ PISF,
+ SHTF,
+ SHT2,
+ CHGG,
+ CHGF,
+ MISG,
+ MISF,
+ SAWG,
+ PLSG,
+ PLSF,
+ BFGG,
+ BFGF,
+ BLUD,
+ PUFF,
+ BAL1,
+ BAL2,
+ PLSS,
+ PLSE,
+ MISL,
+ BFS1,
+ BFE1,
+ BFE2,
+ TFOG,
+ IFOG,
+ PLAY,
+ POSS,
+ SPOS,
+ VILE,
+ FIRE,
+ FATB,
+ FBXP,
+ SKEL,
+ MANF,
+ FATT,
+ CPOS,
+ SARG,
+ HEAD,
+ BAL7,
+ BOSS,
+ BOS2,
+ SKUL,
+ SPID,
+ BSPI,
+ APLS,
+ APBX,
+ CYBR,
+ PAIN,
+ SSWV,
+ KEEN,
+ BBRN,
+ BOSF,
+ ARM1,
+ ARM2,
+ BAR1,
+ BEXP,
+ FCAN,
+ BON1,
+ BON2,
+ BKEY,
+ RKEY,
+ YKEY,
+ BSKU,
+ RSKU,
+ YSKU,
+ STIM,
+ MEDI,
+ SOUL,
+ PINV,
+ PSTR,
+ PINS,
+ MEGA,
+ SUIT,
+ PMAP,
+ PVIS,
+ CLIP,
+ AMMO,
+ ROCK,
+ BROK,
+ CELL,
+ CELP,
+ SHEL,
+ SBOX,
+ BPAK,
+ BFUG,
+ MGUN,
+ CSAW,
+ LAUN,
+ PLAS,
+ SHOT,
+ SGN2,
+ COLU,
+ SMT2,
+ GOR1,
+ POL2,
+ POL5,
+ POL4,
+ POL3,
+ POL1,
+ POL6,
+ GOR2,
+ GOR3,
+ GOR4,
+ GOR5,
+ SMIT,
+ COL1,
+ COL2,
+ COL3,
+ COL4,
+ CAND,
+ CBRA,
+ COL6,
+ TRE1,
+ TRE2,
+ ELEC,
+ CEYE,
+ FSKU,
+ COL5,
+ TBLU,
+ TGRN,
+ TRED,
+ SMBT,
+ SMGT,
+ SMRT,
+ HDB1,
+ HDB2,
+ HDB3,
+ HDB4,
+ HDB5,
+ HDB6,
+ POB1,
+ POB2,
+ BRS1,
+ TLMP,
+ TLP2,
+ Count
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/SpriteDef.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/SpriteDef.cs
new file mode 100644
index 00000000..c32c66af
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/SpriteDef.cs
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class SpriteDef
+ {
+ private SpriteFrame[] frames;
+
+ public SpriteDef(SpriteFrame[] frames)
+ {
+ this.frames = frames;
+ }
+
+ public SpriteFrame[] Frames => frames;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/SpriteFrame.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/SpriteFrame.cs
new file mode 100644
index 00000000..18e93624
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/SpriteFrame.cs
@@ -0,0 +1,39 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class SpriteFrame
+ {
+ private bool rotate;
+ private Patch[] patches;
+ private bool[] flip;
+
+ public SpriteFrame(bool rotate, Patch[] patches, bool[] flip)
+ {
+ this.rotate = rotate;
+ this.patches = patches;
+ this.flip = flip;
+ }
+
+ public bool Rotate => rotate;
+ public Patch[] Patches => patches;
+ public bool[] Flip => flip;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/SpriteLookup.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/SpriteLookup.cs
new file mode 100644
index 00000000..dc3ef91b
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/SpriteLookup.cs
@@ -0,0 +1,238 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.ExceptionServices;
+
+namespace ManagedDoom
+{
+ public sealed class SpriteLookup
+ {
+ private SpriteDef[] spriteDefs;
+
+ public SpriteLookup(Wad wad) : this(wad, false)
+ {
+ }
+
+ public SpriteLookup(Wad wad, bool useDummy)
+ {
+ try
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.Write("Load sprites: ");
+
+ var temp = new Dictionary>();
+ for (var i = 0; i < (int)Sprite.Count; i++)
+ {
+ temp.Add(DoomInfo.SpriteNames[i], new List());
+ }
+
+ var cache = new Dictionary();
+
+ foreach (var lump in EnumerateSprites(wad))
+ {
+ var name = wad.LumpInfos[lump].Name.Substring(0, 4);
+
+ if (!temp.ContainsKey(name))
+ {
+ continue;
+ }
+
+ var list = temp[name];
+
+ {
+ var frame = wad.LumpInfos[lump].Name[4] - 'A';
+ var rotation = wad.LumpInfos[lump].Name[5] - '0';
+
+ while (list.Count < frame + 1)
+ {
+ list.Add(new SpriteInfo());
+ }
+
+ if (rotation == 0)
+ {
+ for (var i = 0; i < 8; i++)
+ {
+ if (list[frame].Patches[i] == null)
+ {
+ list[frame].Patches[i] = CachedRead(lump, wad, cache, useDummy);
+ list[frame].Flip[i] = false;
+ }
+ }
+ }
+ else
+ {
+ if (list[frame].Patches[rotation - 1] == null)
+ {
+ list[frame].Patches[rotation - 1] = CachedRead(lump, wad, cache, useDummy);
+ list[frame].Flip[rotation - 1] = false;
+ }
+ }
+ }
+
+ if (wad.LumpInfos[lump].Name.Length == 8)
+ {
+ var frame = wad.LumpInfos[lump].Name[6] - 'A';
+ var rotation = wad.LumpInfos[lump].Name[7] - '0';
+
+ while (list.Count < frame + 1)
+ {
+ list.Add(new SpriteInfo());
+ }
+
+ if (rotation == 0)
+ {
+ for (var i = 0; i < 8; i++)
+ {
+ if (list[frame].Patches[i] == null)
+ {
+ list[frame].Patches[i] = CachedRead(lump, wad, cache, useDummy);
+ list[frame].Flip[i] = true;
+ }
+ }
+ }
+ else
+ {
+ if (list[frame].Patches[rotation - 1] == null)
+ {
+ list[frame].Patches[rotation - 1] = CachedRead(lump, wad, cache, useDummy);
+ list[frame].Flip[rotation - 1] = true;
+ }
+ }
+ }
+ }
+
+ spriteDefs = new SpriteDef[(int)Sprite.Count];
+ for (var i = 0; i < spriteDefs.Length; i++)
+ {
+ var list = temp[DoomInfo.SpriteNames[i]];
+
+ var frames = new SpriteFrame[list.Count];
+ for (var j = 0; j < frames.Length; j++)
+ {
+ list[j].CheckCompletion();
+
+ var frame = new SpriteFrame(list[j].HasRotation(), list[j].Patches, list[j].Flip);
+ frames[j] = frame;
+ }
+
+ spriteDefs[i] = new SpriteDef(frames);
+ }
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("OK (" + cache.Count + " sprites)");
+ }
+ catch (Exception e)
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("Failed");
+ ExceptionDispatchInfo.Throw(e);
+ }
+ }
+
+ private static IEnumerable EnumerateSprites(Wad wad)
+ {
+ var spriteSection = false;
+
+ for (var lump = wad.LumpInfos.Count - 1; lump >= 0; lump--)
+ {
+ var name = wad.LumpInfos[lump].Name;
+
+ if (name.StartsWith("S"))
+ {
+ if (name.EndsWith("_END"))
+ {
+ spriteSection = true;
+ continue;
+ }
+ else if (name.EndsWith("_START"))
+ {
+ spriteSection = false;
+ continue;
+ }
+ }
+
+ if (spriteSection)
+ {
+ if (wad.LumpInfos[lump].Size > 0)
+ {
+ yield return lump;
+ }
+ }
+ }
+ }
+
+ private static Patch CachedRead(int lump, Wad wad, Dictionary cache, bool useDummy)
+ {
+ if (useDummy)
+ {
+ return Dummy.GetPatch();
+ }
+
+ if (!cache.ContainsKey(lump))
+ {
+ var name = wad.LumpInfos[lump].Name;
+ cache.Add(lump, Patch.FromData(name, wad.ReadLump(lump)));
+ }
+
+ return cache[lump];
+ }
+
+
+ private class SpriteInfo
+ {
+ public Patch[] Patches;
+ public bool[] Flip;
+
+ public SpriteInfo()
+ {
+ Patches = new Patch[8];
+ Flip = new bool[8];
+ }
+
+ public void CheckCompletion()
+ {
+ for (var i = 0; i < Patches.Length; i++)
+ {
+ if (Patches[i] == null)
+ {
+ throw new Exception("Missing sprite!");
+ }
+ }
+ }
+
+ public bool HasRotation()
+ {
+ for (var i = 1; i < Patches.Length; i++)
+ {
+ if (Patches[i] != Patches[0])
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ }
+
+ public SpriteDef this[Sprite sprite]
+ {
+ get
+ {
+ return spriteDefs[(int)sprite];
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Texture.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Texture.cs
new file mode 100644
index 00000000..33af45e2
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/Texture.cs
@@ -0,0 +1,194 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public sealed class Texture
+ {
+ private string name;
+ private bool masked;
+ private int width;
+ private int height;
+ private TexturePatch[] patches;
+ private Patch composite;
+
+ public Texture(
+ string name,
+ bool masked,
+ int width,
+ int height,
+ TexturePatch[] patches)
+ {
+ this.name = name;
+ this.masked = masked;
+ this.width = width;
+ this.height = height;
+ this.patches = patches;
+ composite = GenerateComposite(name, width, height, patches);
+ }
+
+ public static Texture FromData(byte[] data, int offset, Patch[] patchLookup)
+ {
+ var name = DoomInterop.ToString(data, offset, 8);
+ var masked = BitConverter.ToInt32(data, offset + 8);
+ var width = BitConverter.ToInt16(data, offset + 12);
+ var height = BitConverter.ToInt16(data, offset + 14);
+ var patchCount = BitConverter.ToInt16(data, offset + 20);
+ var patches = new TexturePatch[patchCount];
+ for (var i = 0; i < patchCount; i++)
+ {
+ var patchOffset = offset + 22 + TexturePatch.DataSize * i;
+ patches[i] = TexturePatch.FromData(data, patchOffset, patchLookup);
+ }
+
+ return new Texture(
+ name,
+ masked != 0,
+ width,
+ height,
+ patches);
+ }
+
+ public static string GetName(byte[] data, int offset)
+ {
+ return DoomInterop.ToString(data, offset, 8);
+ }
+
+ public static int GetHeight(byte[] data, int offset)
+ {
+ return BitConverter.ToInt16(data, offset + 14);
+ }
+
+ private static Patch GenerateComposite(string name, int width, int height, TexturePatch[] patches)
+ {
+ var patchCount = new int[width];
+ var columns = new Column[width][];
+ var compositeColumnCount = 0;
+
+ foreach (var patch in patches)
+ {
+ var left = patch.OriginX;
+ var right = left + patch.Width;
+
+ var start = Math.Max(left, 0);
+ var end = Math.Min(right, width);
+
+ for (var x = start; x < end; x++)
+ {
+ patchCount[x]++;
+ if (patchCount[x] == 2)
+ {
+ compositeColumnCount++;
+ }
+ columns[x] = patch.Columns[x - patch.OriginX];
+ }
+ }
+
+ var padding = Math.Max(128 - height, 0);
+ var data = new byte[height * compositeColumnCount + padding];
+ var i = 0;
+ for (var x = 0; x < width; x++)
+ {
+ if (patchCount[x] == 0)
+ {
+ throw new Exception();
+ }
+
+ if (patchCount[x] >= 2)
+ {
+ var column = new Column(0, data, height * i, height);
+
+ foreach (var patch in patches)
+ {
+ var px = x - patch.OriginX;
+ if (px < 0 || px >= patch.Width)
+ {
+ continue;
+ }
+ var patchColumn = patch.Columns[px];
+ DrawColumnInCache(
+ patchColumn,
+ column.Data,
+ column.Offset,
+ patch.OriginY,
+ height);
+ }
+
+ columns[x] = new[] { column };
+
+ i++;
+ }
+ }
+
+ return new Patch(name, width, height, 0, 0, columns);
+ }
+
+ private static void DrawColumnInCache(
+ Column[] source,
+ byte[] destination,
+ int destinationOffset,
+ int destinationY,
+ int destinationHeight)
+ {
+ foreach (var column in source)
+ {
+ var sourceIndex = column.Offset;
+ var destinationIndex = destinationOffset + destinationY + column.TopDelta;
+ var length = column.Length;
+
+ var topExceedance = -(destinationY + column.TopDelta);
+ if (topExceedance > 0)
+ {
+ sourceIndex += topExceedance;
+ destinationIndex += topExceedance;
+ length -= topExceedance;
+ }
+
+ var bottomExceedance = destinationY + column.TopDelta + column.Length - destinationHeight;
+ if (bottomExceedance > 0)
+ {
+ length -= bottomExceedance;
+ }
+
+ if (length > 0)
+ {
+ Array.Copy(
+ column.Data,
+ sourceIndex,
+ destination,
+ destinationIndex,
+ length);
+ }
+ }
+ }
+
+ public override string ToString()
+ {
+ return name;
+ }
+
+ public string Name => name;
+ public bool Masked => masked;
+ public int Width => width;
+ public int Height => height;
+ public IReadOnlyList Patches => patches;
+ public Patch Composite => composite;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TextureAnimation.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TextureAnimation.cs
new file mode 100644
index 00000000..258e2abf
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TextureAnimation.cs
@@ -0,0 +1,89 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.ExceptionServices;
+
+namespace ManagedDoom
+{
+ public sealed class TextureAnimation
+ {
+ private TextureAnimationInfo[] animations;
+
+ public TextureAnimation(TextureLookup textures, FlatLookup flats)
+ {
+ try
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.Write("Load texture animation info: ");
+
+ var list = new List();
+
+ foreach (var animDef in DoomInfo.TextureAnimation)
+ {
+ int picNum;
+ int basePic;
+ if (animDef.IsTexture)
+ {
+ if (textures.GetNumber(animDef.StartName) == -1)
+ {
+ continue;
+ }
+
+ picNum = textures.GetNumber(animDef.EndName);
+ basePic = textures.GetNumber(animDef.StartName);
+ }
+ else
+ {
+ if (flats.GetNumber(animDef.StartName) == -1)
+ {
+ continue;
+ }
+
+ picNum = flats.GetNumber(animDef.EndName);
+ basePic = flats.GetNumber(animDef.StartName);
+ }
+
+ var anim = new TextureAnimationInfo(
+ animDef.IsTexture,
+ picNum,
+ basePic,
+ picNum - basePic + 1,
+ animDef.Speed);
+
+ if (anim.NumPics < 2)
+ {
+ throw new Exception("Bad animation cycle from " + animDef.StartName + " to " + animDef.EndName + "!");
+ }
+
+ list.Add(anim);
+ }
+
+ animations = list.ToArray();
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("OK");
+ }
+ catch (Exception e)
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("Failed");
+ ExceptionDispatchInfo.Throw(e);
+ }
+ }
+
+ public TextureAnimationInfo[] Animations => animations;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TextureAnimationInfo.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TextureAnimationInfo.cs
new file mode 100644
index 00000000..dc35939a
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TextureAnimationInfo.cs
@@ -0,0 +1,45 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class TextureAnimationInfo
+ {
+ private bool isTexture;
+ private int picNum;
+ private int basePic;
+ private int numPics;
+ private int speed;
+
+ public TextureAnimationInfo(bool isTexture, int picNum, int basePic, int numPics, int speed)
+ {
+ this.isTexture = isTexture;
+ this.picNum = picNum;
+ this.basePic = basePic;
+ this.numPics = numPics;
+ this.speed = speed;
+ }
+
+ public bool IsTexture => isTexture;
+ public int PicNum => picNum;
+ public int BasePic => basePic;
+ public int NumPics => numPics;
+ public int Speed => speed;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TextureLookup.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TextureLookup.cs
new file mode 100644
index 00000000..efb18be2
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TextureLookup.cs
@@ -0,0 +1,202 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.ExceptionServices;
+
+namespace ManagedDoom
+{
+ public sealed class TextureLookup : IReadOnlyList
+ {
+ private List textures;
+ private Dictionary nameToTexture;
+ private Dictionary nameToNumber;
+
+ private int[] switchList;
+
+ public TextureLookup(Wad wad) : this(wad, false)
+ {
+ }
+
+ public TextureLookup(Wad wad, bool useDummy)
+ {
+ if (!useDummy)
+ {
+ Init(wad);
+ }
+ else
+ {
+ InitDummy(wad);
+ }
+
+ InitSwitchList();
+ }
+
+ private void Init(Wad wad)
+ {
+ try
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.Write("Load textures: ");
+
+ textures = new List();
+ nameToTexture = new Dictionary();
+ nameToNumber = new Dictionary();
+
+ var patches = LoadPatches(wad);
+
+ for (var n = 1; n <= 2; n++)
+ {
+ var lumpNumber = wad.GetLumpNumber("TEXTURE" + n);
+ if (lumpNumber == -1)
+ {
+ break;
+ }
+
+ var data = wad.ReadLump(lumpNumber);
+ var count = BitConverter.ToInt32(data, 0);
+ for (var i = 0; i < count; i++)
+ {
+ var offset = BitConverter.ToInt32(data, 4 + 4 * i);
+ var texture = Texture.FromData(data, offset, patches);
+ nameToNumber.Add(texture.Name, textures.Count);
+ textures.Add(texture);
+ nameToTexture.Add(texture.Name, texture);
+ }
+ }
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("OK (" + nameToTexture.Count + " textures)");
+ }
+ catch (Exception e)
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("Failed");
+ ExceptionDispatchInfo.Throw(e);
+ }
+ }
+
+ private void InitDummy(Wad wad)
+ {
+ textures = new List();
+ nameToTexture = new Dictionary();
+ nameToNumber = new Dictionary();
+
+ for (var n = 1; n <= 2; n++)
+ {
+ var lumpNumber = wad.GetLumpNumber("TEXTURE" + n);
+ if (lumpNumber == -1)
+ {
+ break;
+ }
+
+ var data = wad.ReadLump(lumpNumber);
+ var count = BitConverter.ToInt32(data, 0);
+ for (var i = 0; i < count; i++)
+ {
+ var offset = BitConverter.ToInt32(data, 4 + 4 * i);
+ var name = Texture.GetName(data, offset);
+ var height = Texture.GetHeight(data, offset);
+ var texture = Dummy.GetTexture(height);
+ nameToNumber.Add(name, textures.Count);
+ textures.Add(texture);
+ nameToTexture.Add(name, texture);
+ }
+ }
+ }
+
+ private void InitSwitchList()
+ {
+ var list = new List();
+ foreach (var tuple in DoomInfo.SwitchNames)
+ {
+ var texNum1 = GetNumber(tuple.Item1);
+ var texNum2 = GetNumber(tuple.Item2);
+ if (texNum1 != -1 && texNum2 != -1)
+ {
+ list.Add(texNum1);
+ list.Add(texNum2);
+ }
+ }
+ switchList = list.ToArray();
+ }
+
+ public int GetNumber(string name)
+ {
+ if (name[0] == '-')
+ {
+ return 0;
+ }
+
+ int number;
+ if (nameToNumber.TryGetValue(name, out number))
+ {
+ return number;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ private static Patch[] LoadPatches(Wad wad)
+ {
+ var patchNames = LoadPatchNames(wad);
+ var patches = new Patch[patchNames.Length];
+ for (var i = 0; i < patches.Length; i++)
+ {
+ var name = patchNames[i];
+
+ // This check is necessary to avoid crash in DOOM1.WAD.
+ if (wad.GetLumpNumber(name) == -1)
+ {
+ continue;
+ }
+
+ var data = wad.ReadLump(name);
+ patches[i] = Patch.FromData(name, data);
+ }
+ return patches;
+ }
+
+ private static string[] LoadPatchNames(Wad wad)
+ {
+ var data = wad.ReadLump("PNAMES");
+ var count = BitConverter.ToInt32(data, 0);
+ var names = new string[count];
+ for (var i = 0; i < names.Length; i++)
+ {
+ names[i] = DoomInterop.ToString(data, 4 + 8 * i, 8);
+ }
+ return names;
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ return textures.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return textures.GetEnumerator();
+ }
+
+ public int Count => textures.Count;
+ public Texture this[int num] => textures[num];
+ public Texture this[string name] => nameToTexture[name];
+ public int[] SwitchList => switchList;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TexturePatch.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TexturePatch.cs
new file mode 100644
index 00000000..31749341
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Graphics/TexturePatch.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class TexturePatch
+ {
+ public const int DataSize = 10;
+
+ private int originX;
+ private int originY;
+ private Patch patch;
+
+ public TexturePatch(
+ int originX,
+ int originY,
+ Patch patch)
+ {
+ this.originX = originX;
+ this.originY = originY;
+ this.patch = patch;
+ }
+
+ public static TexturePatch FromData(byte[] data, int offset, Patch[] patches)
+ {
+ var originX = BitConverter.ToInt16(data, offset);
+ var originY = BitConverter.ToInt16(data, offset + 2);
+ var patchNum = BitConverter.ToInt16(data, offset + 4);
+
+ return new TexturePatch(
+ originX,
+ originY,
+ patches[patchNum]);
+ }
+
+ public string Name => patch.Name;
+ public int OriginX => originX;
+ public int OriginY => originY;
+ public int Width => patch.Width;
+ public int Height => patch.Height;
+ public Column[][] Columns => patch.Columns;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.AmmoInfos.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.AmmoInfos.cs
new file mode 100644
index 00000000..7ba8f696
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.AmmoInfos.cs
@@ -0,0 +1,43 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static class AmmoInfos
+ {
+ public static readonly int[] Max = new int[]
+ {
+ 200,
+ 50,
+ 300,
+ 50
+ };
+
+ public static readonly int[] Clip = new int[]
+ {
+ 10,
+ 4,
+ 20,
+ 1
+ };
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.BgmNames.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.BgmNames.cs
new file mode 100644
index 00000000..1bc92d96
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.BgmNames.cs
@@ -0,0 +1,96 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static readonly DoomString[] BgmNames = new DoomString[]
+ {
+ new DoomString("NONE"),
+ new DoomString("E1M1"),
+ new DoomString("E1M2"),
+ new DoomString("E1M3"),
+ new DoomString("E1M4"),
+ new DoomString("E1M5"),
+ new DoomString("E1M6"),
+ new DoomString("E1M7"),
+ new DoomString("E1M8"),
+ new DoomString("E1M9"),
+ new DoomString("E2M1"),
+ new DoomString("E2M2"),
+ new DoomString("E2M3"),
+ new DoomString("E2M4"),
+ new DoomString("E2M5"),
+ new DoomString("E2M6"),
+ new DoomString("E2M7"),
+ new DoomString("E2M8"),
+ new DoomString("E2M9"),
+ new DoomString("E3M1"),
+ new DoomString("E3M2"),
+ new DoomString("E3M3"),
+ new DoomString("E3M4"),
+ new DoomString("E3M5"),
+ new DoomString("E3M6"),
+ new DoomString("E3M7"),
+ new DoomString("E3M8"),
+ new DoomString("E3M9"),
+ new DoomString("INTER"),
+ new DoomString("INTRO"),
+ new DoomString("BUNNY"),
+ new DoomString("VICTOR"),
+ new DoomString("INTROA"),
+ new DoomString("RUNNIN"),
+ new DoomString("STALKS"),
+ new DoomString("COUNTD"),
+ new DoomString("BETWEE"),
+ new DoomString("DOOM"),
+ new DoomString("THE_DA"),
+ new DoomString("SHAWN"),
+ new DoomString("DDTBLU"),
+ new DoomString("IN_CIT"),
+ new DoomString("DEAD"),
+ new DoomString("STLKS2"),
+ new DoomString("THEDA2"),
+ new DoomString("DOOM2"),
+ new DoomString("DDTBL2"),
+ new DoomString("RUNNI2"),
+ new DoomString("DEAD2"),
+ new DoomString("STLKS3"),
+ new DoomString("ROMERO"),
+ new DoomString("SHAWN2"),
+ new DoomString("MESSAG"),
+ new DoomString("COUNT2"),
+ new DoomString("DDTBL3"),
+ new DoomString("AMPIE"),
+ new DoomString("THEDA3"),
+ new DoomString("ADRIAN"),
+ new DoomString("MESSG2"),
+ new DoomString("ROMER2"),
+ new DoomString("TENSE"),
+ new DoomString("SHAWN3"),
+ new DoomString("OPENIN"),
+ new DoomString("EVIL"),
+ new DoomString("ULTIMA"),
+ new DoomString("READ_M"),
+ new DoomString("DM2TTL"),
+ new DoomString("DM2INT")
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.DeHackEdConst.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.DeHackEdConst.cs
new file mode 100644
index 00000000..e02923b2
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.DeHackEdConst.cs
@@ -0,0 +1,44 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static class DeHackEdConst
+ {
+ public static int InitialHealth { get; set; } = 100;
+ public static int InitialBullets { get; set; } = 50;
+ public static int MaxHealth { get; set; } = 200;
+ public static int MaxArmor { get; set; } = 200;
+ public static int GreenArmorClass { get; set; } = 1;
+ public static int BlueArmorClass { get; set; } = 2;
+ public static int MaxSoulsphere { get; set; } = 200;
+ public static int SoulsphereHealth { get; set; } = 100;
+ public static int MegasphereHealth { get; set; } = 200;
+ public static int GodModeHealth { get; set; } = 100;
+ public static int IdfaArmor { get; set; } = 200;
+ public static int IdfaArmorClass { get; set; } = 2;
+ public static int IdkfaArmor { get; set; } = 200;
+ public static int IdkfaArmorClass { get; set; } = 2;
+ public static int BfgCellsPerShot { get; set; } = 40;
+ public static bool MonstersInfight { get; set; } = false;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.MapTitles.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.MapTitles.cs
new file mode 100644
index 00000000..8b4236c7
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.MapTitles.cs
@@ -0,0 +1,191 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static class MapTitles
+ {
+ public static IReadOnlyList> Doom = new DoomString[][]
+ {
+ new DoomString[]
+ {
+ Strings.HUSTR_E1M1,
+ Strings.HUSTR_E1M2,
+ Strings.HUSTR_E1M3,
+ Strings.HUSTR_E1M4,
+ Strings.HUSTR_E1M5,
+ Strings.HUSTR_E1M6,
+ Strings.HUSTR_E1M7,
+ Strings.HUSTR_E1M8,
+ Strings.HUSTR_E1M9
+ },
+
+ new DoomString[]
+ {
+ Strings.HUSTR_E2M1,
+ Strings.HUSTR_E2M2,
+ Strings.HUSTR_E2M3,
+ Strings.HUSTR_E2M4,
+ Strings.HUSTR_E2M5,
+ Strings.HUSTR_E2M6,
+ Strings.HUSTR_E2M7,
+ Strings.HUSTR_E2M8,
+ Strings.HUSTR_E2M9
+ },
+
+ new DoomString[]
+ {
+ Strings.HUSTR_E3M1,
+ Strings.HUSTR_E3M2,
+ Strings.HUSTR_E3M3,
+ Strings.HUSTR_E3M4,
+ Strings.HUSTR_E3M5,
+ Strings.HUSTR_E3M6,
+ Strings.HUSTR_E3M7,
+ Strings.HUSTR_E3M8,
+ Strings.HUSTR_E3M9
+ },
+
+ new DoomString[]
+ {
+ Strings.HUSTR_E4M1,
+ Strings.HUSTR_E4M2,
+ Strings.HUSTR_E4M3,
+ Strings.HUSTR_E4M4,
+ Strings.HUSTR_E4M5,
+ Strings.HUSTR_E4M6,
+ Strings.HUSTR_E4M7,
+ Strings.HUSTR_E4M8,
+ Strings.HUSTR_E4M9
+ }
+ };
+
+ public static IReadOnlyList Doom2 = new DoomString[]
+ {
+ Strings.HUSTR_1,
+ Strings.HUSTR_2,
+ Strings.HUSTR_3,
+ Strings.HUSTR_4,
+ Strings.HUSTR_5,
+ Strings.HUSTR_6,
+ Strings.HUSTR_7,
+ Strings.HUSTR_8,
+ Strings.HUSTR_9,
+ Strings.HUSTR_10,
+ Strings.HUSTR_11,
+ Strings.HUSTR_12,
+ Strings.HUSTR_13,
+ Strings.HUSTR_14,
+ Strings.HUSTR_15,
+ Strings.HUSTR_16,
+ Strings.HUSTR_17,
+ Strings.HUSTR_18,
+ Strings.HUSTR_19,
+ Strings.HUSTR_20,
+ Strings.HUSTR_21,
+ Strings.HUSTR_22,
+ Strings.HUSTR_23,
+ Strings.HUSTR_24,
+ Strings.HUSTR_25,
+ Strings.HUSTR_26,
+ Strings.HUSTR_27,
+ Strings.HUSTR_28,
+ Strings.HUSTR_29,
+ Strings.HUSTR_30,
+ Strings.HUSTR_31,
+ Strings.HUSTR_32
+ };
+
+ public static IReadOnlyList Plutonia = new DoomString[]
+ {
+ Strings.PHUSTR_1,
+ Strings.PHUSTR_2,
+ Strings.PHUSTR_3,
+ Strings.PHUSTR_4,
+ Strings.PHUSTR_5,
+ Strings.PHUSTR_6,
+ Strings.PHUSTR_7,
+ Strings.PHUSTR_8,
+ Strings.PHUSTR_9,
+ Strings.PHUSTR_10,
+ Strings.PHUSTR_11,
+ Strings.PHUSTR_12,
+ Strings.PHUSTR_13,
+ Strings.PHUSTR_14,
+ Strings.PHUSTR_15,
+ Strings.PHUSTR_16,
+ Strings.PHUSTR_17,
+ Strings.PHUSTR_18,
+ Strings.PHUSTR_19,
+ Strings.PHUSTR_20,
+ Strings.PHUSTR_21,
+ Strings.PHUSTR_22,
+ Strings.PHUSTR_23,
+ Strings.PHUSTR_24,
+ Strings.PHUSTR_25,
+ Strings.PHUSTR_26,
+ Strings.PHUSTR_27,
+ Strings.PHUSTR_28,
+ Strings.PHUSTR_29,
+ Strings.PHUSTR_30,
+ Strings.PHUSTR_31,
+ Strings.PHUSTR_32
+ };
+
+ public static IReadOnlyList Tnt = new DoomString[]
+ {
+ Strings.THUSTR_1,
+ Strings.THUSTR_2,
+ Strings.THUSTR_3,
+ Strings.THUSTR_4,
+ Strings.THUSTR_5,
+ Strings.THUSTR_6,
+ Strings.THUSTR_7,
+ Strings.THUSTR_8,
+ Strings.THUSTR_9,
+ Strings.THUSTR_10,
+ Strings.THUSTR_11,
+ Strings.THUSTR_12,
+ Strings.THUSTR_13,
+ Strings.THUSTR_14,
+ Strings.THUSTR_15,
+ Strings.THUSTR_16,
+ Strings.THUSTR_17,
+ Strings.THUSTR_18,
+ Strings.THUSTR_19,
+ Strings.THUSTR_20,
+ Strings.THUSTR_21,
+ Strings.THUSTR_22,
+ Strings.THUSTR_23,
+ Strings.THUSTR_24,
+ Strings.THUSTR_25,
+ Strings.THUSTR_26,
+ Strings.THUSTR_27,
+ Strings.THUSTR_28,
+ Strings.THUSTR_29,
+ Strings.THUSTR_30,
+ Strings.THUSTR_31,
+ Strings.THUSTR_32
+ };
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.MobjActions.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.MobjActions.cs
new file mode 100644
index 00000000..e4027ef6
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.MobjActions.cs
@@ -0,0 +1,287 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ private class MobjActions
+ {
+ public void BFGSpray(World world, Mobj actor)
+ {
+ world.WeaponBehavior.BFGSpray(actor);
+ }
+
+ public void Explode(World world, Mobj actor)
+ {
+ world.MonsterBehavior.Explode(actor);
+ }
+
+ public void Pain(World world, Mobj actor)
+ {
+ world.MonsterBehavior.Pain(actor);
+ }
+
+ public void PlayerScream(World world, Mobj actor)
+ {
+ world.PlayerBehavior.PlayerScream(actor);
+ }
+
+ public void Fall(World world, Mobj actor)
+ {
+ world.MonsterBehavior.Fall(actor);
+ }
+
+ public void XScream(World world, Mobj actor)
+ {
+ world.MonsterBehavior.XScream(actor);
+ }
+
+ public void Look(World world, Mobj actor)
+ {
+ world.MonsterBehavior.Look(actor);
+ }
+
+ public void Chase(World world, Mobj actor)
+ {
+ world.MonsterBehavior.Chase(actor);
+ }
+
+ public void FaceTarget(World world, Mobj actor)
+ {
+ world.MonsterBehavior.FaceTarget(actor);
+ }
+
+ public void PosAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.PosAttack(actor);
+ }
+
+ public void Scream(World world, Mobj actor)
+ {
+ world.MonsterBehavior.Scream(actor);
+ }
+
+ public void SPosAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.SPosAttack(actor);
+ }
+
+ public void VileChase(World world, Mobj actor)
+ {
+ world.MonsterBehavior.VileChase(actor);
+ }
+
+ public void VileStart(World world, Mobj actor)
+ {
+ world.MonsterBehavior.VileStart(actor);
+ }
+
+ public void VileTarget(World world, Mobj actor)
+ {
+ world.MonsterBehavior.VileTarget(actor);
+ }
+
+ public void VileAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.VileAttack(actor);
+ }
+
+ public void StartFire(World world, Mobj actor)
+ {
+ world.MonsterBehavior.StartFire(actor);
+ }
+
+ public void Fire(World world, Mobj actor)
+ {
+ world.MonsterBehavior.Fire(actor);
+ }
+
+ public void FireCrackle(World world, Mobj actor)
+ {
+ world.MonsterBehavior.FireCrackle(actor);
+ }
+
+ public void Tracer(World world, Mobj actor)
+ {
+ world.MonsterBehavior.Tracer(actor);
+ }
+
+ public void SkelWhoosh(World world, Mobj actor)
+ {
+ world.MonsterBehavior.SkelWhoosh(actor);
+ }
+
+ public void SkelFist(World world, Mobj actor)
+ {
+ world.MonsterBehavior.SkelFist(actor);
+ }
+
+ public void SkelMissile(World world, Mobj actor)
+ {
+ world.MonsterBehavior.SkelMissile(actor);
+ }
+
+ public void FatRaise(World world, Mobj actor)
+ {
+ world.MonsterBehavior.FatRaise(actor);
+ }
+
+ public void FatAttack1(World world, Mobj actor)
+ {
+ world.MonsterBehavior.FatAttack1(actor);
+ }
+
+ public void FatAttack2(World world, Mobj actor)
+ {
+ world.MonsterBehavior.FatAttack2(actor);
+ }
+
+ public void FatAttack3(World world, Mobj actor)
+ {
+ world.MonsterBehavior.FatAttack3(actor);
+ }
+
+ public void BossDeath(World world, Mobj actor)
+ {
+ world.MonsterBehavior.BossDeath(actor);
+ }
+
+ public void CPosAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.CPosAttack(actor);
+ }
+
+ public void CPosRefire(World world, Mobj actor)
+ {
+ world.MonsterBehavior.CPosRefire(actor);
+ }
+
+ public void TroopAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.TroopAttack(actor);
+ }
+
+ public void SargAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.SargAttack(actor);
+ }
+
+ public void HeadAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.HeadAttack(actor);
+ }
+
+ public void BruisAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.BruisAttack(actor);
+ }
+
+ public void SkullAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.SkullAttack(actor);
+ }
+
+ public void Metal(World world, Mobj actor)
+ {
+ world.MonsterBehavior.Metal(actor);
+ }
+
+ public void SpidRefire(World world, Mobj actor)
+ {
+ world.MonsterBehavior.SpidRefire(actor);
+ }
+
+ public void BabyMetal(World world, Mobj actor)
+ {
+ world.MonsterBehavior.BabyMetal(actor);
+ }
+
+ public void BspiAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.BspiAttack(actor);
+ }
+
+ public void Hoof(World world, Mobj actor)
+ {
+ world.MonsterBehavior.Hoof(actor);
+ }
+
+ public void CyberAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.CyberAttack(actor);
+ }
+
+ public void PainAttack(World world, Mobj actor)
+ {
+ world.MonsterBehavior.PainAttack(actor);
+ }
+
+ public void PainDie(World world, Mobj actor)
+ {
+ world.MonsterBehavior.PainDie(actor);
+ }
+
+ public void KeenDie(World world, Mobj actor)
+ {
+ world.MonsterBehavior.KeenDie(actor);
+ }
+
+ public void BrainPain(World world, Mobj actor)
+ {
+ world.MonsterBehavior.BrainPain(actor);
+ }
+
+ public void BrainScream(World world, Mobj actor)
+ {
+ world.MonsterBehavior.BrainScream(actor);
+ }
+
+ public void BrainDie(World world, Mobj actor)
+ {
+ world.MonsterBehavior.BrainDie(actor);
+ }
+
+ public void BrainAwake(World world, Mobj actor)
+ {
+ world.MonsterBehavior.BrainAwake(actor);
+ }
+
+ public void BrainSpit(World world, Mobj actor)
+ {
+ world.MonsterBehavior.BrainSpit(actor);
+ }
+
+ public void SpawnSound(World world, Mobj actor)
+ {
+ world.MonsterBehavior.SpawnSound(actor);
+ }
+
+ public void SpawnFly(World world, Mobj actor)
+ {
+ world.MonsterBehavior.SpawnFly(actor);
+ }
+
+ public void BrainExplode(World world, Mobj actor)
+ {
+ world.MonsterBehavior.BrainExplode(actor);
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.MobjInfos.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.MobjInfos.cs
new file mode 100644
index 00000000..afca030f
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.MobjInfos.cs
@@ -0,0 +1,3590 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static readonly MobjInfo[] MobjInfos = new MobjInfo[]
+ {
+ new MobjInfo( // MobjType.Player
+ -1, // doomEdNum
+ MobjState.Play, // spawnState
+ 100, // spawnHealth
+ MobjState.PlayRun1, // seeState
+ Sfx.NONE, // seeSound
+ 0, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.PlayPain, // painState
+ 255, // painChance
+ Sfx.PLPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.PlayAtk1, // missileState
+ MobjState.PlayDie1, // deathState
+ MobjState.PlayXdie1, // xdeathState
+ Sfx.PLDETH, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(56), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.DropOff | MobjFlags.PickUp | MobjFlags.NotDeathmatch, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Possessed
+ 3004, // doomEdNum
+ MobjState.PossStnd, // spawnState
+ 20, // spawnHealth
+ MobjState.PossRun1, // seeState
+ Sfx.POSIT1, // seeSound
+ 8, // reactionTime
+ Sfx.PISTOL, // attackSound
+ MobjState.PossPain, // painState
+ 200, // painChance
+ Sfx.POPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.PossAtk1, // missileState
+ MobjState.PossDie1, // deathState
+ MobjState.PossXdie1, // xdeathState
+ Sfx.PODTH1, // deathSound
+ 8, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(56), // height
+ 100, // mass
+ 0, // damage
+ Sfx.POSACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.PossRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Shotguy
+ 9, // doomEdNum
+ MobjState.SposStnd, // spawnState
+ 30, // spawnHealth
+ MobjState.SposRun1, // seeState
+ Sfx.POSIT2, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.SposPain, // painState
+ 170, // painChance
+ Sfx.POPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.SposAtk1, // missileState
+ MobjState.SposDie1, // deathState
+ MobjState.SposXdie1, // xdeathState
+ Sfx.PODTH2, // deathSound
+ 8, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(56), // height
+ 100, // mass
+ 0, // damage
+ Sfx.POSACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.SposRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Vile
+ 64, // doomEdNum
+ MobjState.VileStnd, // spawnState
+ 700, // spawnHealth
+ MobjState.VileRun1, // seeState
+ Sfx.VILSIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.VilePain, // painState
+ 10, // painChance
+ Sfx.VIPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.VileAtk1, // missileState
+ MobjState.VileDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.VILDTH, // deathSound
+ 15, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(56), // height
+ 500, // mass
+ 0, // damage
+ Sfx.VILACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Fire
+ -1, // doomEdNum
+ MobjState.Fire1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Undead
+ 66, // doomEdNum
+ MobjState.SkelStnd, // spawnState
+ 300, // spawnHealth
+ MobjState.SkelRun1, // seeState
+ Sfx.SKESIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.SkelPain, // painState
+ 100, // painChance
+ Sfx.POPAIN, // painSound
+ MobjState.SkelFist1, // meleeState
+ MobjState.SkelMiss1, // missileState
+ MobjState.SkelDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.SKEDTH, // deathSound
+ 10, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(56), // height
+ 500, // mass
+ 0, // damage
+ Sfx.SKEACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.SkelRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Tracer
+ -1, // doomEdNum
+ MobjState.Tracer, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.SKEATK, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Traceexp1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.BAREXP, // deathSound
+ 10 * Fixed.FracUnit, // speed
+ Fixed.FromInt(11), // radius
+ Fixed.FromInt(8), // height
+ 100, // mass
+ 10, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.Missile | MobjFlags.DropOff | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Smoke
+ -1, // doomEdNum
+ MobjState.Smoke1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Fatso
+ 67, // doomEdNum
+ MobjState.FattStnd, // spawnState
+ 600, // spawnHealth
+ MobjState.FattRun1, // seeState
+ Sfx.MANSIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.FattPain, // painState
+ 80, // painChance
+ Sfx.MNPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.FattAtk1, // missileState
+ MobjState.FattDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.MANDTH, // deathSound
+ 8, // speed
+ Fixed.FromInt(48), // radius
+ Fixed.FromInt(64), // height
+ 1000, // mass
+ 0, // damage
+ Sfx.POSACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.FattRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Fatshot
+ -1, // doomEdNum
+ MobjState.Fatshot1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.FIRSHT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Fatshotx1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.FIRXPL, // deathSound
+ 20 * Fixed.FracUnit, // speed
+ Fixed.FromInt(6), // radius
+ Fixed.FromInt(8), // height
+ 100, // mass
+ 8, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.Missile | MobjFlags.DropOff | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Chainguy
+ 65, // doomEdNum
+ MobjState.CposStnd, // spawnState
+ 70, // spawnHealth
+ MobjState.CposRun1, // seeState
+ Sfx.POSIT2, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.CposPain, // painState
+ 170, // painChance
+ Sfx.POPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.CposAtk1, // missileState
+ MobjState.CposDie1, // deathState
+ MobjState.CposXdie1, // xdeathState
+ Sfx.PODTH2, // deathSound
+ 8, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(56), // height
+ 100, // mass
+ 0, // damage
+ Sfx.POSACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.CposRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Troop
+ 3001, // doomEdNum
+ MobjState.TrooStnd, // spawnState
+ 60, // spawnHealth
+ MobjState.TrooRun1, // seeState
+ Sfx.BGSIT1, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.TrooPain, // painState
+ 200, // painChance
+ Sfx.POPAIN, // painSound
+ MobjState.TrooAtk1, // meleeState
+ MobjState.TrooAtk1, // missileState
+ MobjState.TrooDie1, // deathState
+ MobjState.TrooXdie1, // xdeathState
+ Sfx.BGDTH1, // deathSound
+ 8, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(56), // height
+ 100, // mass
+ 0, // damage
+ Sfx.BGACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.TrooRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Sergeant
+ 3002, // doomEdNum
+ MobjState.SargStnd, // spawnState
+ 150, // spawnHealth
+ MobjState.SargRun1, // seeState
+ Sfx.SGTSIT, // seeSound
+ 8, // reactionTime
+ Sfx.SGTATK, // attackSound
+ MobjState.SargPain, // painState
+ 180, // painChance
+ Sfx.DMPAIN, // painSound
+ MobjState.SargAtk1, // meleeState
+ MobjState.Null, // missileState
+ MobjState.SargDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.SGTDTH, // deathSound
+ 10, // speed
+ Fixed.FromInt(30), // radius
+ Fixed.FromInt(56), // height
+ 400, // mass
+ 0, // damage
+ Sfx.DMACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.SargRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Shadows
+ 58, // doomEdNum
+ MobjState.SargStnd, // spawnState
+ 150, // spawnHealth
+ MobjState.SargRun1, // seeState
+ Sfx.SGTSIT, // seeSound
+ 8, // reactionTime
+ Sfx.SGTATK, // attackSound
+ MobjState.SargPain, // painState
+ 180, // painChance
+ Sfx.DMPAIN, // painSound
+ MobjState.SargAtk1, // meleeState
+ MobjState.Null, // missileState
+ MobjState.SargDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.SGTDTH, // deathSound
+ 10, // speed
+ Fixed.FromInt(30), // radius
+ Fixed.FromInt(56), // height
+ 400, // mass
+ 0, // damage
+ Sfx.DMACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.Shadow | MobjFlags.CountKill, // flags
+ MobjState.SargRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Head
+ 3005, // doomEdNum
+ MobjState.HeadStnd, // spawnState
+ 400, // spawnHealth
+ MobjState.HeadRun1, // seeState
+ Sfx.CACSIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.HeadPain, // painState
+ 128, // painChance
+ Sfx.DMPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.HeadAtk1, // missileState
+ MobjState.HeadDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.CACDTH, // deathSound
+ 8, // speed
+ Fixed.FromInt(31), // radius
+ Fixed.FromInt(56), // height
+ 400, // mass
+ 0, // damage
+ Sfx.DMACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.Float | MobjFlags.NoGravity | MobjFlags.CountKill, // flags
+ MobjState.HeadRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Bruiser
+ 3003, // doomEdNum
+ MobjState.BossStnd, // spawnState
+ 1000, // spawnHealth
+ MobjState.BossRun1, // seeState
+ Sfx.BRSSIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.BossPain, // painState
+ 50, // painChance
+ Sfx.DMPAIN, // painSound
+ MobjState.BossAtk1, // meleeState
+ MobjState.BossAtk1, // missileState
+ MobjState.BossDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.BRSDTH, // deathSound
+ 8, // speed
+ Fixed.FromInt(24), // radius
+ Fixed.FromInt(64), // height
+ 1000, // mass
+ 0, // damage
+ Sfx.DMACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.BossRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Bruisershot
+ -1, // doomEdNum
+ MobjState.Brball1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.FIRSHT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Brballx1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.FIRXPL, // deathSound
+ 15 * Fixed.FracUnit, // speed
+ Fixed.FromInt(6), // radius
+ Fixed.FromInt(8), // height
+ 100, // mass
+ 8, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.Missile | MobjFlags.DropOff | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Knight
+ 69, // doomEdNum
+ MobjState.Bos2Stnd, // spawnState
+ 500, // spawnHealth
+ MobjState.Bos2Run1, // seeState
+ Sfx.KNTSIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Bos2Pain, // painState
+ 50, // painChance
+ Sfx.DMPAIN, // painSound
+ MobjState.Bos2Atk1, // meleeState
+ MobjState.Bos2Atk1, // missileState
+ MobjState.Bos2Die1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.KNTDTH, // deathSound
+ 8, // speed
+ Fixed.FromInt(24), // radius
+ Fixed.FromInt(64), // height
+ 1000, // mass
+ 0, // damage
+ Sfx.DMACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.Bos2Raise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Skull
+ 3006, // doomEdNum
+ MobjState.SkullStnd, // spawnState
+ 100, // spawnHealth
+ MobjState.SkullRun1, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.SKLATK, // attackSound
+ MobjState.SkullPain, // painState
+ 256, // painChance
+ Sfx.DMPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.SkullAtk1, // missileState
+ MobjState.SkullDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.FIRXPL, // deathSound
+ 8, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(56), // height
+ 50, // mass
+ 3, // damage
+ Sfx.DMACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.Float | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Spider
+ 7, // doomEdNum
+ MobjState.SpidStnd, // spawnState
+ 3000, // spawnHealth
+ MobjState.SpidRun1, // seeState
+ Sfx.SPISIT, // seeSound
+ 8, // reactionTime
+ Sfx.SHOTGN, // attackSound
+ MobjState.SpidPain, // painState
+ 40, // painChance
+ Sfx.DMPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.SpidAtk1, // missileState
+ MobjState.SpidDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.SPIDTH, // deathSound
+ 12, // speed
+ Fixed.FromInt(128), // radius
+ Fixed.FromInt(100), // height
+ 1000, // mass
+ 0, // damage
+ Sfx.DMACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Baby
+ 68, // doomEdNum
+ MobjState.BspiStnd, // spawnState
+ 500, // spawnHealth
+ MobjState.BspiSight, // seeState
+ Sfx.BSPSIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.BspiPain, // painState
+ 128, // painChance
+ Sfx.DMPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.BspiAtk1, // missileState
+ MobjState.BspiDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.BSPDTH, // deathSound
+ 12, // speed
+ Fixed.FromInt(64), // radius
+ Fixed.FromInt(64), // height
+ 600, // mass
+ 0, // damage
+ Sfx.BSPACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.BspiRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Cyborg
+ 16, // doomEdNum
+ MobjState.CyberStnd, // spawnState
+ 4000, // spawnHealth
+ MobjState.CyberRun1, // seeState
+ Sfx.CYBSIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.CyberPain, // painState
+ 20, // painChance
+ Sfx.DMPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.CyberAtk1, // missileState
+ MobjState.CyberDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.CYBDTH, // deathSound
+ 16, // speed
+ Fixed.FromInt(40), // radius
+ Fixed.FromInt(110), // height
+ 1000, // mass
+ 0, // damage
+ Sfx.DMACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Pain
+ 71, // doomEdNum
+ MobjState.PainStnd, // spawnState
+ 400, // spawnHealth
+ MobjState.PainRun1, // seeState
+ Sfx.PESIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.PainPain, // painState
+ 128, // painChance
+ Sfx.PEPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.PainAtk1, // missileState
+ MobjState.PainDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.PEDTH, // deathSound
+ 8, // speed
+ Fixed.FromInt(31), // radius
+ Fixed.FromInt(56), // height
+ 400, // mass
+ 0, // damage
+ Sfx.DMACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.Float | MobjFlags.NoGravity | MobjFlags.CountKill, // flags
+ MobjState.PainRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Wolfss
+ 84, // doomEdNum
+ MobjState.SswvStnd, // spawnState
+ 50, // spawnHealth
+ MobjState.SswvRun1, // seeState
+ Sfx.SSSIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.SswvPain, // painState
+ 170, // painChance
+ Sfx.POPAIN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.SswvAtk1, // missileState
+ MobjState.SswvDie1, // deathState
+ MobjState.SswvXdie1, // xdeathState
+ Sfx.SSDTH, // deathSound
+ 8, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(56), // height
+ 100, // mass
+ 0, // damage
+ Sfx.POSACT, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.SswvRaise1 // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Keen
+ 72, // doomEdNum
+ MobjState.Keenstnd, // spawnState
+ 100, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Keenpain, // painState
+ 256, // painChance
+ Sfx.KEENPN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Commkeen, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.KEENDT, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(72), // height
+ 10000000, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity | MobjFlags.Shootable | MobjFlags.CountKill, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Bossbrain
+ 88, // doomEdNum
+ MobjState.Brain, // spawnState
+ 250, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.BrainPain, // painState
+ 255, // painChance
+ Sfx.BOSPN, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.BrainDie1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.BOSDTH, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 10000000, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Bossspit
+ 89, // doomEdNum
+ MobjState.Braineye, // spawnState
+ 1000, // spawnHealth
+ MobjState.Braineyesee, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(32), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.NoSector, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Bosstarget
+ 87, // doomEdNum
+ MobjState.Null, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(32), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.NoSector, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Spawnshot
+ -1, // doomEdNum
+ MobjState.Spawn1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.BOSPIT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.FIRXPL, // deathSound
+ 10 * Fixed.FracUnit, // speed
+ Fixed.FromInt(6), // radius
+ Fixed.FromInt(32), // height
+ 100, // mass
+ 3, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.Missile | MobjFlags.DropOff | MobjFlags.NoGravity | MobjFlags.NoClip, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Spawnfire
+ -1, // doomEdNum
+ MobjState.Spawnfire1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Barrel
+ 2035, // doomEdNum
+ MobjState.Bar1, // spawnState
+ 20, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Bexp, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.BAREXP, // deathSound
+ 0, // speed
+ Fixed.FromInt(10), // radius
+ Fixed.FromInt(42), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.Shootable | MobjFlags.NoBlood, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Troopshot
+ -1, // doomEdNum
+ MobjState.Tball1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.FIRSHT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Tballx1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.FIRXPL, // deathSound
+ 10 * Fixed.FracUnit, // speed
+ Fixed.FromInt(6), // radius
+ Fixed.FromInt(8), // height
+ 100, // mass
+ 3, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.Missile | MobjFlags.DropOff | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Headshot
+ -1, // doomEdNum
+ MobjState.Rball1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.FIRSHT, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Rballx1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.FIRXPL, // deathSound
+ 10 * Fixed.FracUnit, // speed
+ Fixed.FromInt(6), // radius
+ Fixed.FromInt(8), // height
+ 100, // mass
+ 5, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.Missile | MobjFlags.DropOff | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Rocket
+ -1, // doomEdNum
+ MobjState.Rocket, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.RLAUNC, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Explode1, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.BAREXP, // deathSound
+ 20 * Fixed.FracUnit, // speed
+ Fixed.FromInt(11), // radius
+ Fixed.FromInt(8), // height
+ 100, // mass
+ 20, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.Missile | MobjFlags.DropOff | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Plasma
+ -1, // doomEdNum
+ MobjState.Plasball, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.PLASMA, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Plasexp, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.FIRXPL, // deathSound
+ 25 * Fixed.FracUnit, // speed
+ Fixed.FromInt(13), // radius
+ Fixed.FromInt(8), // height
+ 100, // mass
+ 5, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.Missile | MobjFlags.DropOff | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Bfg
+ -1, // doomEdNum
+ MobjState.Bfgshot, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Bfgland, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.RXPLOD, // deathSound
+ 25 * Fixed.FracUnit, // speed
+ Fixed.FromInt(13), // radius
+ Fixed.FromInt(8), // height
+ 100, // mass
+ 100, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.Missile | MobjFlags.DropOff | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Arachplaz
+ -1, // doomEdNum
+ MobjState.ArachPlaz, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.PLASMA, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.ArachPlex, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.FIRXPL, // deathSound
+ 25 * Fixed.FracUnit, // speed
+ Fixed.FromInt(13), // radius
+ Fixed.FromInt(8), // height
+ 100, // mass
+ 5, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.Missile | MobjFlags.DropOff | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Puff
+ -1, // doomEdNum
+ MobjState.Puff1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Blood
+ -1, // doomEdNum
+ MobjState.Blood1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Tfog
+ -1, // doomEdNum
+ MobjState.Tfog, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Ifog
+ -1, // doomEdNum
+ MobjState.Ifog, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Teleportman
+ 14, // doomEdNum
+ MobjState.Null, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.NoSector, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Extrabfg
+ -1, // doomEdNum
+ MobjState.Bfgexp, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc0
+ 2018, // doomEdNum
+ MobjState.Arm1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc1
+ 2019, // doomEdNum
+ MobjState.Arm2, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc2
+ 2014, // doomEdNum
+ MobjState.Bon1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.CountItem, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc3
+ 2015, // doomEdNum
+ MobjState.Bon2, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.CountItem, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc4
+ 5, // doomEdNum
+ MobjState.Bkey, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.NotDeathmatch, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc5
+ 13, // doomEdNum
+ MobjState.Rkey, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.NotDeathmatch, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc6
+ 6, // doomEdNum
+ MobjState.Ykey, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.NotDeathmatch, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc7
+ 39, // doomEdNum
+ MobjState.Yskull, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.NotDeathmatch, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc8
+ 38, // doomEdNum
+ MobjState.Rskull, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.NotDeathmatch, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc9
+ 40, // doomEdNum
+ MobjState.Bskull, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.NotDeathmatch, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc10
+ 2011, // doomEdNum
+ MobjState.Stim, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc11
+ 2012, // doomEdNum
+ MobjState.Medi, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc12
+ 2013, // doomEdNum
+ MobjState.Soul, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.CountItem, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Inv
+ 2022, // doomEdNum
+ MobjState.Pinv, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.CountItem, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc13
+ 2023, // doomEdNum
+ MobjState.Pstr, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.CountItem, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Ins
+ 2024, // doomEdNum
+ MobjState.Pins, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.CountItem, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc14
+ 2025, // doomEdNum
+ MobjState.Suit, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc15
+ 2026, // doomEdNum
+ MobjState.Pmap, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.CountItem, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc16
+ 2045, // doomEdNum
+ MobjState.Pvis, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.CountItem, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Mega
+ 83, // doomEdNum
+ MobjState.Mega, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special | MobjFlags.CountItem, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Clip
+ 2007, // doomEdNum
+ MobjState.Clip, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc17
+ 2048, // doomEdNum
+ MobjState.Ammo, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc18
+ 2010, // doomEdNum
+ MobjState.Rock, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc19
+ 2046, // doomEdNum
+ MobjState.Brok, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc20
+ 2047, // doomEdNum
+ MobjState.Cell, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc21
+ 17, // doomEdNum
+ MobjState.Celp, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc22
+ 2008, // doomEdNum
+ MobjState.Shel, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc23
+ 2049, // doomEdNum
+ MobjState.Sbox, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc24
+ 8, // doomEdNum
+ MobjState.Bpak, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc25
+ 2006, // doomEdNum
+ MobjState.Bfug, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Chaingun
+ 2002, // doomEdNum
+ MobjState.Mgun, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc26
+ 2005, // doomEdNum
+ MobjState.Csaw, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc27
+ 2003, // doomEdNum
+ MobjState.Laun, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc28
+ 2004, // doomEdNum
+ MobjState.Plas, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Shotgun
+ 2001, // doomEdNum
+ MobjState.Shot, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Supershotgun
+ 82, // doomEdNum
+ MobjState.Shot2, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Special, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc29
+ 85, // doomEdNum
+ MobjState.Techlamp, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc30
+ 86, // doomEdNum
+ MobjState.Tech2Lamp, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc31
+ 2028, // doomEdNum
+ MobjState.Colu, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc32
+ 30, // doomEdNum
+ MobjState.Tallgrncol, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc33
+ 31, // doomEdNum
+ MobjState.Shrtgrncol, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc34
+ 32, // doomEdNum
+ MobjState.Tallredcol, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc35
+ 33, // doomEdNum
+ MobjState.Shrtredcol, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc36
+ 37, // doomEdNum
+ MobjState.Skullcol, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc37
+ 36, // doomEdNum
+ MobjState.Heartcol, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc38
+ 41, // doomEdNum
+ MobjState.Evileye, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc39
+ 42, // doomEdNum
+ MobjState.Floatskull, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc40
+ 43, // doomEdNum
+ MobjState.Torchtree, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc41
+ 44, // doomEdNum
+ MobjState.Bluetorch, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc42
+ 45, // doomEdNum
+ MobjState.Greentorch, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc43
+ 46, // doomEdNum
+ MobjState.Redtorch, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc44
+ 55, // doomEdNum
+ MobjState.Btorchshrt, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc45
+ 56, // doomEdNum
+ MobjState.Gtorchshrt, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc46
+ 57, // doomEdNum
+ MobjState.Rtorchshrt, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc47
+ 47, // doomEdNum
+ MobjState.Stalagtite, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc48
+ 48, // doomEdNum
+ MobjState.Techpillar, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc49
+ 34, // doomEdNum
+ MobjState.Candlestik, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc50
+ 35, // doomEdNum
+ MobjState.Candelabra, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc51
+ 49, // doomEdNum
+ MobjState.Bloodytwitch, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(68), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc52
+ 50, // doomEdNum
+ MobjState.Meat2, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(84), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc53
+ 51, // doomEdNum
+ MobjState.Meat3, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(84), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc54
+ 52, // doomEdNum
+ MobjState.Meat4, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(68), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc55
+ 53, // doomEdNum
+ MobjState.Meat5, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(52), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc56
+ 59, // doomEdNum
+ MobjState.Meat2, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(84), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc57
+ 60, // doomEdNum
+ MobjState.Meat4, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(68), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc58
+ 61, // doomEdNum
+ MobjState.Meat3, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(52), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc59
+ 62, // doomEdNum
+ MobjState.Meat5, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(52), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc60
+ 63, // doomEdNum
+ MobjState.Bloodytwitch, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(68), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc61
+ 22, // doomEdNum
+ MobjState.HeadDie6, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc62
+ 15, // doomEdNum
+ MobjState.PlayDie7, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc63
+ 18, // doomEdNum
+ MobjState.PossDie5, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc64
+ 21, // doomEdNum
+ MobjState.SargDie6, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc65
+ 23, // doomEdNum
+ MobjState.SkullDie6, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc66
+ 20, // doomEdNum
+ MobjState.TrooDie5, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc67
+ 19, // doomEdNum
+ MobjState.SposDie5, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc68
+ 10, // doomEdNum
+ MobjState.PlayXdie9, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc69
+ 12, // doomEdNum
+ MobjState.PlayXdie9, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc70
+ 28, // doomEdNum
+ MobjState.Headsonstick, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc71
+ 24, // doomEdNum
+ MobjState.Gibs, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ 0, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc72
+ 27, // doomEdNum
+ MobjState.Headonastick, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc73
+ 29, // doomEdNum
+ MobjState.Headcandles, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc74
+ 25, // doomEdNum
+ MobjState.Deadstick, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc75
+ 26, // doomEdNum
+ MobjState.Livestick, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc76
+ 54, // doomEdNum
+ MobjState.Bigtree, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(32), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc77
+ 70, // doomEdNum
+ MobjState.Bbar1, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc78
+ 73, // doomEdNum
+ MobjState.Hangnoguts, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(88), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc79
+ 74, // doomEdNum
+ MobjState.Hangbnobrain, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(88), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc80
+ 75, // doomEdNum
+ MobjState.Hangtlookdn, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(64), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc81
+ 76, // doomEdNum
+ MobjState.Hangtskull, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(64), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc82
+ 77, // doomEdNum
+ MobjState.Hangtlookup, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(64), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc83
+ 78, // doomEdNum
+ MobjState.Hangtnobrain, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(16), // radius
+ Fixed.FromInt(64), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.Solid | MobjFlags.SpawnCeiling | MobjFlags.NoGravity, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc84
+ 79, // doomEdNum
+ MobjState.Colongibs, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc85
+ 80, // doomEdNum
+ MobjState.Smallpool, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap, // flags
+ MobjState.Null // raiseState
+ ),
+
+ new MobjInfo( // MobjType.Misc86
+ 81, // doomEdNum
+ MobjState.Brainstem, // spawnState
+ 1000, // spawnHealth
+ MobjState.Null, // seeState
+ Sfx.NONE, // seeSound
+ 8, // reactionTime
+ Sfx.NONE, // attackSound
+ MobjState.Null, // painState
+ 0, // painChance
+ Sfx.NONE, // painSound
+ MobjState.Null, // meleeState
+ MobjState.Null, // missileState
+ MobjState.Null, // deathState
+ MobjState.Null, // xdeathState
+ Sfx.NONE, // deathSound
+ 0, // speed
+ Fixed.FromInt(20), // radius
+ Fixed.FromInt(16), // height
+ 100, // mass
+ 0, // damage
+ Sfx.NONE, // activeSound
+ MobjFlags.NoBlockMap, // flags
+ MobjState.Null // raiseState
+ )
+
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.ParTimes.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.ParTimes.cs
new file mode 100644
index 00000000..65143f14
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.ParTimes.cs
@@ -0,0 +1,44 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static class ParTimes
+ {
+ public static readonly IReadOnlyList> Doom1 = new int[][]
+ {
+ new int[] { 30, 75, 120, 90, 165, 180, 180, 30, 165 },
+ new int[] { 90, 90, 90, 120, 90, 360, 240, 30, 170 },
+ new int[] { 90, 45, 90, 150, 90, 90, 165, 30, 135 },
+ new int[] { 165, 255, 135, 150, 180, 390, 135, 360, 180 }
+ };
+
+ public static readonly IReadOnlyList Doom2 = new int[]
+ {
+ 30, 90, 120, 120, 90, 150, 120, 120, 270, 90,
+ 210, 150, 150, 150, 210, 150, 420, 150, 210, 150,
+ 240, 150, 180, 150, 150, 300, 330, 420, 300, 180,
+ 120, 30
+ };
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.PlayerActions.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.PlayerActions.cs
new file mode 100644
index 00000000..3d525ea5
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.PlayerActions.cs
@@ -0,0 +1,137 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ private class PlayerActions
+ {
+ public void Light0(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.Light0(player);
+ }
+
+ public void WeaponReady(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.WeaponReady(player, psp);
+ }
+
+ public void Lower(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.Lower(player, psp);
+ }
+
+ public void Raise(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.Raise(player, psp);
+ }
+
+ public void Punch(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.Punch(player);
+ }
+
+ public void ReFire(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.ReFire(player);
+ }
+
+ public void FirePistol(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.FirePistol(player);
+ }
+
+ public void Light1(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.Light1(player);
+ }
+
+ public void FireShotgun(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.FireShotgun(player);
+ }
+
+ public void Light2(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.Light2(player);
+ }
+
+ public void FireShotgun2(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.FireShotgun2(player);
+ }
+
+ public void CheckReload(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.CheckReload(player);
+ }
+
+ public void OpenShotgun2(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.OpenShotgun2(player);
+ }
+
+ public void LoadShotgun2(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.LoadShotgun2(player);
+ }
+
+ public void CloseShotgun2(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.CloseShotgun2(player);
+ }
+
+ public void FireCGun(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.FireCGun(player, psp);
+ }
+
+ public void GunFlash(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.GunFlash(player);
+ }
+
+ public void FireMissile(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.FireMissile(player);
+ }
+
+ public void Saw(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.Saw(player);
+ }
+
+ public void FirePlasma(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.FirePlasma(player);
+ }
+
+ public void BFGsound(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.A_BFGsound(player);
+ }
+
+ public void FireBFG(World world, Player player, PlayerSpriteDef psp)
+ {
+ world.WeaponBehavior.FireBFG(player);
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.PowerDuration.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.PowerDuration.cs
new file mode 100644
index 00000000..110de7e9
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.PowerDuration.cs
@@ -0,0 +1,32 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static class PowerDuration
+ {
+ public static readonly int Invulnerability = 30 * GameConst.TicRate;
+ public static readonly int Invisibility = 60 * GameConst.TicRate;
+ public static readonly int Infrared = 120 * GameConst.TicRate;
+ public static readonly int IronFeet = 60 * GameConst.TicRate;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.QuitMessages.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.QuitMessages.cs
new file mode 100644
index 00000000..805273ad
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.QuitMessages.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static class QuitMessages
+ {
+ public static readonly IReadOnlyList Doom = new DoomString[]
+ {
+ Strings.QUITMSG,
+ new DoomString("please don't leave, there's more\ndemons to toast!"),
+ new DoomString("let's beat it -- this is turning\ninto a bloodbath!"),
+ new DoomString("i wouldn't leave if i were you.\ndos is much worse."),
+ new DoomString("you're trying to say you like dos\nbetter than me, right?"),
+ new DoomString("don't leave yet -- there's a\ndemon around that corner!"),
+ new DoomString("ya know, next time you come in here\ni'm gonna toast ya."),
+ new DoomString("go ahead and leave. see if i care.")
+ };
+
+ public static readonly IReadOnlyList Doom2 = new DoomString[]
+ {
+ new DoomString("you want to quit?\nthen, thou hast lost an eighth!"),
+ new DoomString("don't go now, there's a \ndimensional shambler waiting\nat the dos prompt!"),
+ new DoomString("get outta here and go back\nto your boring programs."),
+ new DoomString("if i were your boss, i'd \n deathmatch ya in a minute!"),
+ new DoomString("look, bud. you leave now\nand you forfeit your body count!"),
+ new DoomString("just leave. when you come\nback, i'll be waiting with a bat."),
+ new DoomString("you're lucky i don't smack\nyou for thinking about leaving.")
+ };
+
+ public static readonly IReadOnlyList FinalDoom = new DoomString[]
+ {
+ new DoomString("fuck you, pussy!\nget the fuck out!"),
+ new DoomString("you quit and i'll jizz\nin your cystholes!"),
+ new DoomString("if you leave, i'll make\nthe lord drink my jizz."),
+ new DoomString("hey, ron! can we say\n'fuck' in the game?"),
+ new DoomString("i'd leave: this is just\nmore monsters and levels.\nwhat a load."),
+ new DoomString("suck it down, asshole!\nyou're a fucking wimp!"),
+ new DoomString("don't quit now! we're \nstill spending your money!")
+ };
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.SfxNames.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.SfxNames.cs
new file mode 100644
index 00000000..c1e285bf
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.SfxNames.cs
@@ -0,0 +1,137 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static readonly DoomString[] SfxNames = new DoomString[]
+ {
+ new DoomString("NONE"),
+ new DoomString("PISTOL"),
+ new DoomString("SHOTGN"),
+ new DoomString("SGCOCK"),
+ new DoomString("DSHTGN"),
+ new DoomString("DBOPN"),
+ new DoomString("DBCLS"),
+ new DoomString("DBLOAD"),
+ new DoomString("PLASMA"),
+ new DoomString("BFG"),
+ new DoomString("SAWUP"),
+ new DoomString("SAWIDL"),
+ new DoomString("SAWFUL"),
+ new DoomString("SAWHIT"),
+ new DoomString("RLAUNC"),
+ new DoomString("RXPLOD"),
+ new DoomString("FIRSHT"),
+ new DoomString("FIRXPL"),
+ new DoomString("PSTART"),
+ new DoomString("PSTOP"),
+ new DoomString("DOROPN"),
+ new DoomString("DORCLS"),
+ new DoomString("STNMOV"),
+ new DoomString("SWTCHN"),
+ new DoomString("SWTCHX"),
+ new DoomString("PLPAIN"),
+ new DoomString("DMPAIN"),
+ new DoomString("POPAIN"),
+ new DoomString("VIPAIN"),
+ new DoomString("MNPAIN"),
+ new DoomString("PEPAIN"),
+ new DoomString("SLOP"),
+ new DoomString("ITEMUP"),
+ new DoomString("WPNUP"),
+ new DoomString("OOF"),
+ new DoomString("TELEPT"),
+ new DoomString("POSIT1"),
+ new DoomString("POSIT2"),
+ new DoomString("POSIT3"),
+ new DoomString("BGSIT1"),
+ new DoomString("BGSIT2"),
+ new DoomString("SGTSIT"),
+ new DoomString("CACSIT"),
+ new DoomString("BRSSIT"),
+ new DoomString("CYBSIT"),
+ new DoomString("SPISIT"),
+ new DoomString("BSPSIT"),
+ new DoomString("KNTSIT"),
+ new DoomString("VILSIT"),
+ new DoomString("MANSIT"),
+ new DoomString("PESIT"),
+ new DoomString("SKLATK"),
+ new DoomString("SGTATK"),
+ new DoomString("SKEPCH"),
+ new DoomString("VILATK"),
+ new DoomString("CLAW"),
+ new DoomString("SKESWG"),
+ new DoomString("PLDETH"),
+ new DoomString("PDIEHI"),
+ new DoomString("PODTH1"),
+ new DoomString("PODTH2"),
+ new DoomString("PODTH3"),
+ new DoomString("BGDTH1"),
+ new DoomString("BGDTH2"),
+ new DoomString("SGTDTH"),
+ new DoomString("CACDTH"),
+ new DoomString("SKLDTH"),
+ new DoomString("BRSDTH"),
+ new DoomString("CYBDTH"),
+ new DoomString("SPIDTH"),
+ new DoomString("BSPDTH"),
+ new DoomString("VILDTH"),
+ new DoomString("KNTDTH"),
+ new DoomString("PEDTH"),
+ new DoomString("SKEDTH"),
+ new DoomString("POSACT"),
+ new DoomString("BGACT"),
+ new DoomString("DMACT"),
+ new DoomString("BSPACT"),
+ new DoomString("BSPWLK"),
+ new DoomString("VILACT"),
+ new DoomString("NOWAY"),
+ new DoomString("BAREXP"),
+ new DoomString("PUNCH"),
+ new DoomString("HOOF"),
+ new DoomString("METAL"),
+ new DoomString("CHGUN"),
+ new DoomString("TINK"),
+ new DoomString("BDOPN"),
+ new DoomString("BDCLS"),
+ new DoomString("ITMBK"),
+ new DoomString("FLAME"),
+ new DoomString("FLAMST"),
+ new DoomString("GETPOW"),
+ new DoomString("BOSPIT"),
+ new DoomString("BOSCUB"),
+ new DoomString("BOSSIT"),
+ new DoomString("BOSPN"),
+ new DoomString("BOSDTH"),
+ new DoomString("MANATK"),
+ new DoomString("MANDTH"),
+ new DoomString("SSSIT"),
+ new DoomString("SSDTH"),
+ new DoomString("KEENPN"),
+ new DoomString("KEENDT"),
+ new DoomString("SKEACT"),
+ new DoomString("SKESIT"),
+ new DoomString("SKEATK"),
+ new DoomString("RADIO")
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.SpriteNames.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.SpriteNames.cs
new file mode 100644
index 00000000..856be0f6
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.SpriteNames.cs
@@ -0,0 +1,166 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static readonly DoomString[] SpriteNames = new DoomString[]
+ {
+ new DoomString("TROO"),
+ new DoomString("SHTG"),
+ new DoomString("PUNG"),
+ new DoomString("PISG"),
+ new DoomString("PISF"),
+ new DoomString("SHTF"),
+ new DoomString("SHT2"),
+ new DoomString("CHGG"),
+ new DoomString("CHGF"),
+ new DoomString("MISG"),
+ new DoomString("MISF"),
+ new DoomString("SAWG"),
+ new DoomString("PLSG"),
+ new DoomString("PLSF"),
+ new DoomString("BFGG"),
+ new DoomString("BFGF"),
+ new DoomString("BLUD"),
+ new DoomString("PUFF"),
+ new DoomString("BAL1"),
+ new DoomString("BAL2"),
+ new DoomString("PLSS"),
+ new DoomString("PLSE"),
+ new DoomString("MISL"),
+ new DoomString("BFS1"),
+ new DoomString("BFE1"),
+ new DoomString("BFE2"),
+ new DoomString("TFOG"),
+ new DoomString("IFOG"),
+ new DoomString("PLAY"),
+ new DoomString("POSS"),
+ new DoomString("SPOS"),
+ new DoomString("VILE"),
+ new DoomString("FIRE"),
+ new DoomString("FATB"),
+ new DoomString("FBXP"),
+ new DoomString("SKEL"),
+ new DoomString("MANF"),
+ new DoomString("FATT"),
+ new DoomString("CPOS"),
+ new DoomString("SARG"),
+ new DoomString("HEAD"),
+ new DoomString("BAL7"),
+ new DoomString("BOSS"),
+ new DoomString("BOS2"),
+ new DoomString("SKUL"),
+ new DoomString("SPID"),
+ new DoomString("BSPI"),
+ new DoomString("APLS"),
+ new DoomString("APBX"),
+ new DoomString("CYBR"),
+ new DoomString("PAIN"),
+ new DoomString("SSWV"),
+ new DoomString("KEEN"),
+ new DoomString("BBRN"),
+ new DoomString("BOSF"),
+ new DoomString("ARM1"),
+ new DoomString("ARM2"),
+ new DoomString("BAR1"),
+ new DoomString("BEXP"),
+ new DoomString("FCAN"),
+ new DoomString("BON1"),
+ new DoomString("BON2"),
+ new DoomString("BKEY"),
+ new DoomString("RKEY"),
+ new DoomString("YKEY"),
+ new DoomString("BSKU"),
+ new DoomString("RSKU"),
+ new DoomString("YSKU"),
+ new DoomString("STIM"),
+ new DoomString("MEDI"),
+ new DoomString("SOUL"),
+ new DoomString("PINV"),
+ new DoomString("PSTR"),
+ new DoomString("PINS"),
+ new DoomString("MEGA"),
+ new DoomString("SUIT"),
+ new DoomString("PMAP"),
+ new DoomString("PVIS"),
+ new DoomString("CLIP"),
+ new DoomString("AMMO"),
+ new DoomString("ROCK"),
+ new DoomString("BROK"),
+ new DoomString("CELL"),
+ new DoomString("CELP"),
+ new DoomString("SHEL"),
+ new DoomString("SBOX"),
+ new DoomString("BPAK"),
+ new DoomString("BFUG"),
+ new DoomString("MGUN"),
+ new DoomString("CSAW"),
+ new DoomString("LAUN"),
+ new DoomString("PLAS"),
+ new DoomString("SHOT"),
+ new DoomString("SGN2"),
+ new DoomString("COLU"),
+ new DoomString("SMT2"),
+ new DoomString("GOR1"),
+ new DoomString("POL2"),
+ new DoomString("POL5"),
+ new DoomString("POL4"),
+ new DoomString("POL3"),
+ new DoomString("POL1"),
+ new DoomString("POL6"),
+ new DoomString("GOR2"),
+ new DoomString("GOR3"),
+ new DoomString("GOR4"),
+ new DoomString("GOR5"),
+ new DoomString("SMIT"),
+ new DoomString("COL1"),
+ new DoomString("COL2"),
+ new DoomString("COL3"),
+ new DoomString("COL4"),
+ new DoomString("CAND"),
+ new DoomString("CBRA"),
+ new DoomString("COL6"),
+ new DoomString("TRE1"),
+ new DoomString("TRE2"),
+ new DoomString("ELEC"),
+ new DoomString("CEYE"),
+ new DoomString("FSKU"),
+ new DoomString("COL5"),
+ new DoomString("TBLU"),
+ new DoomString("TGRN"),
+ new DoomString("TRED"),
+ new DoomString("SMBT"),
+ new DoomString("SMGT"),
+ new DoomString("SMRT"),
+ new DoomString("HDB1"),
+ new DoomString("HDB2"),
+ new DoomString("HDB3"),
+ new DoomString("HDB4"),
+ new DoomString("HDB5"),
+ new DoomString("HDB6"),
+ new DoomString("POB1"),
+ new DoomString("POB2"),
+ new DoomString("BRS1"),
+ new DoomString("TLMP"),
+ new DoomString("TLP2")
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.States.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.States.cs
new file mode 100644
index 00000000..328f993d
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.States.cs
@@ -0,0 +1,998 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ private static PlayerActions pa = new PlayerActions();
+ private static MobjActions ma = new MobjActions();
+
+ public static readonly MobjStateDef[] States = new MobjStateDef[]
+ {
+ new MobjStateDef(0, Sprite.TROO, 0, -1, null, null, MobjState.Null, 0, 0), // State.Null
+ new MobjStateDef(1, Sprite.SHTG, 4, 0, pa.Light0, null, MobjState.Null, 0, 0), // State.Lightdone
+ new MobjStateDef(2, Sprite.PUNG, 0, 1, pa.WeaponReady, null, MobjState.Punch, 0, 0), // State.Punch
+ new MobjStateDef(3, Sprite.PUNG, 0, 1, pa.Lower, null, MobjState.Punchdown, 0, 0), // State.Punchdown
+ new MobjStateDef(4, Sprite.PUNG, 0, 1, pa.Raise, null, MobjState.Punchup, 0, 0), // State.Punchup
+ new MobjStateDef(5, Sprite.PUNG, 1, 4, null, null, MobjState.Punch2, 0, 0), // State.Punch1
+ new MobjStateDef(6, Sprite.PUNG, 2, 4, pa.Punch, null, MobjState.Punch3, 0, 0), // State.Punch2
+ new MobjStateDef(7, Sprite.PUNG, 3, 5, null, null, MobjState.Punch4, 0, 0), // State.Punch3
+ new MobjStateDef(8, Sprite.PUNG, 2, 4, null, null, MobjState.Punch5, 0, 0), // State.Punch4
+ new MobjStateDef(9, Sprite.PUNG, 1, 5, pa.ReFire, null, MobjState.Punch, 0, 0), // State.Punch5
+ new MobjStateDef(10, Sprite.PISG, 0, 1, pa.WeaponReady, null, MobjState.Pistol, 0, 0), // State.Pistol
+ new MobjStateDef(11, Sprite.PISG, 0, 1, pa.Lower, null, MobjState.Pistoldown, 0, 0), // State.Pistoldown
+ new MobjStateDef(12, Sprite.PISG, 0, 1, pa.Raise, null, MobjState.Pistolup, 0, 0), // State.Pistolup
+ new MobjStateDef(13, Sprite.PISG, 0, 4, null, null, MobjState.Pistol2, 0, 0), // State.Pistol1
+ new MobjStateDef(14, Sprite.PISG, 1, 6, pa.FirePistol, null, MobjState.Pistol3, 0, 0), // State.Pistol2
+ new MobjStateDef(15, Sprite.PISG, 2, 4, null, null, MobjState.Pistol4, 0, 0), // State.Pistol3
+ new MobjStateDef(16, Sprite.PISG, 1, 5, pa.ReFire, null, MobjState.Pistol, 0, 0), // State.Pistol4
+ new MobjStateDef(17, Sprite.PISF, 32768, 7, pa.Light1, null, MobjState.Lightdone, 0, 0), // State.Pistolflash
+ new MobjStateDef(18, Sprite.SHTG, 0, 1, pa.WeaponReady, null, MobjState.Sgun, 0, 0), // State.Sgun
+ new MobjStateDef(19, Sprite.SHTG, 0, 1, pa.Lower, null, MobjState.Sgundown, 0, 0), // State.Sgundown
+ new MobjStateDef(20, Sprite.SHTG, 0, 1, pa.Raise, null, MobjState.Sgunup, 0, 0), // State.Sgunup
+ new MobjStateDef(21, Sprite.SHTG, 0, 3, null, null, MobjState.Sgun2, 0, 0), // State.Sgun1
+ new MobjStateDef(22, Sprite.SHTG, 0, 7, pa.FireShotgun, null, MobjState.Sgun3, 0, 0), // State.Sgun2
+ new MobjStateDef(23, Sprite.SHTG, 1, 5, null, null, MobjState.Sgun4, 0, 0), // State.Sgun3
+ new MobjStateDef(24, Sprite.SHTG, 2, 5, null, null, MobjState.Sgun5, 0, 0), // State.Sgun4
+ new MobjStateDef(25, Sprite.SHTG, 3, 4, null, null, MobjState.Sgun6, 0, 0), // State.Sgun5
+ new MobjStateDef(26, Sprite.SHTG, 2, 5, null, null, MobjState.Sgun7, 0, 0), // State.Sgun6
+ new MobjStateDef(27, Sprite.SHTG, 1, 5, null, null, MobjState.Sgun8, 0, 0), // State.Sgun7
+ new MobjStateDef(28, Sprite.SHTG, 0, 3, null, null, MobjState.Sgun9, 0, 0), // State.Sgun8
+ new MobjStateDef(29, Sprite.SHTG, 0, 7, pa.ReFire, null, MobjState.Sgun, 0, 0), // State.Sgun9
+ new MobjStateDef(30, Sprite.SHTF, 32768, 4, pa.Light1, null, MobjState.Sgunflash2, 0, 0), // State.Sgunflash1
+ new MobjStateDef(31, Sprite.SHTF, 32769, 3, pa.Light2, null, MobjState.Lightdone, 0, 0), // State.Sgunflash2
+ new MobjStateDef(32, Sprite.SHT2, 0, 1, pa.WeaponReady, null, MobjState.Dsgun, 0, 0), // State.Dsgun
+ new MobjStateDef(33, Sprite.SHT2, 0, 1, pa.Lower, null, MobjState.Dsgundown, 0, 0), // State.Dsgundown
+ new MobjStateDef(34, Sprite.SHT2, 0, 1, pa.Raise, null, MobjState.Dsgunup, 0, 0), // State.Dsgunup
+ new MobjStateDef(35, Sprite.SHT2, 0, 3, null, null, MobjState.Dsgun2, 0, 0), // State.Dsgun1
+ new MobjStateDef(36, Sprite.SHT2, 0, 7, pa.FireShotgun2, null, MobjState.Dsgun3, 0, 0), // State.Dsgun2
+ new MobjStateDef(37, Sprite.SHT2, 1, 7, null, null, MobjState.Dsgun4, 0, 0), // State.Dsgun3
+ new MobjStateDef(38, Sprite.SHT2, 2, 7, pa.CheckReload, null, MobjState.Dsgun5, 0, 0), // State.Dsgun4
+ new MobjStateDef(39, Sprite.SHT2, 3, 7, pa.OpenShotgun2, null, MobjState.Dsgun6, 0, 0), // State.Dsgun5
+ new MobjStateDef(40, Sprite.SHT2, 4, 7, null, null, MobjState.Dsgun7, 0, 0), // State.Dsgun6
+ new MobjStateDef(41, Sprite.SHT2, 5, 7, pa.LoadShotgun2, null, MobjState.Dsgun8, 0, 0), // State.Dsgun7
+ new MobjStateDef(42, Sprite.SHT2, 6, 6, null, null, MobjState.Dsgun9, 0, 0), // State.Dsgun8
+ new MobjStateDef(43, Sprite.SHT2, 7, 6, pa.CloseShotgun2, null, MobjState.Dsgun10, 0, 0), // State.Dsgun9
+ new MobjStateDef(44, Sprite.SHT2, 0, 5, pa.ReFire, null, MobjState.Dsgun, 0, 0), // State.Dsgun10
+ new MobjStateDef(45, Sprite.SHT2, 1, 7, null, null, MobjState.Dsnr2, 0, 0), // State.Dsnr1
+ new MobjStateDef(46, Sprite.SHT2, 0, 3, null, null, MobjState.Dsgundown, 0, 0), // State.Dsnr2
+ new MobjStateDef(47, Sprite.SHT2, 32776, 5, pa.Light1, null, MobjState.Dsgunflash2, 0, 0), // State.Dsgunflash1
+ new MobjStateDef(48, Sprite.SHT2, 32777, 4, pa.Light2, null, MobjState.Lightdone, 0, 0), // State.Dsgunflash2
+ new MobjStateDef(49, Sprite.CHGG, 0, 1, pa.WeaponReady, null, MobjState.Chain, 0, 0), // State.Chain
+ new MobjStateDef(50, Sprite.CHGG, 0, 1, pa.Lower, null, MobjState.Chaindown, 0, 0), // State.Chaindown
+ new MobjStateDef(51, Sprite.CHGG, 0, 1, pa.Raise, null, MobjState.Chainup, 0, 0), // State.Chainup
+ new MobjStateDef(52, Sprite.CHGG, 0, 4, pa.FireCGun, null, MobjState.Chain2, 0, 0), // State.Chain1
+ new MobjStateDef(53, Sprite.CHGG, 1, 4, pa.FireCGun, null, MobjState.Chain3, 0, 0), // State.Chain2
+ new MobjStateDef(54, Sprite.CHGG, 1, 0, pa.ReFire, null, MobjState.Chain, 0, 0), // State.Chain3
+ new MobjStateDef(55, Sprite.CHGF, 32768, 5, pa.Light1, null, MobjState.Lightdone, 0, 0), // State.Chainflash1
+ new MobjStateDef(56, Sprite.CHGF, 32769, 5, pa.Light2, null, MobjState.Lightdone, 0, 0), // State.Chainflash2
+ new MobjStateDef(57, Sprite.MISG, 0, 1, pa.WeaponReady, null, MobjState.Missile, 0, 0), // State.Missile
+ new MobjStateDef(58, Sprite.MISG, 0, 1, pa.Lower, null, MobjState.Missiledown, 0, 0), // State.Missiledown
+ new MobjStateDef(59, Sprite.MISG, 0, 1, pa.Raise, null, MobjState.Missileup, 0, 0), // State.Missileup
+ new MobjStateDef(60, Sprite.MISG, 1, 8, pa.GunFlash, null, MobjState.Missile2, 0, 0), // State.Missile1
+ new MobjStateDef(61, Sprite.MISG, 1, 12, pa.FireMissile, null, MobjState.Missile3, 0, 0), // State.Missile2
+ new MobjStateDef(62, Sprite.MISG, 1, 0, pa.ReFire, null, MobjState.Missile, 0, 0), // State.Missile3
+ new MobjStateDef(63, Sprite.MISF, 32768, 3, pa.Light1, null, MobjState.Missileflash2, 0, 0), // State.Missileflash1
+ new MobjStateDef(64, Sprite.MISF, 32769, 4, null, null, MobjState.Missileflash3, 0, 0), // State.Missileflash2
+ new MobjStateDef(65, Sprite.MISF, 32770, 4, pa.Light2, null, MobjState.Missileflash4, 0, 0), // State.Missileflash3
+ new MobjStateDef(66, Sprite.MISF, 32771, 4, pa.Light2, null, MobjState.Lightdone, 0, 0), // State.Missileflash4
+ new MobjStateDef(67, Sprite.SAWG, 2, 4, pa.WeaponReady, null, MobjState.Sawb, 0, 0), // State.Saw
+ new MobjStateDef(68, Sprite.SAWG, 3, 4, pa.WeaponReady, null, MobjState.Saw, 0, 0), // State.Sawb
+ new MobjStateDef(69, Sprite.SAWG, 2, 1, pa.Lower, null, MobjState.Sawdown, 0, 0), // State.Sawdown
+ new MobjStateDef(70, Sprite.SAWG, 2, 1, pa.Raise, null, MobjState.Sawup, 0, 0), // State.Sawup
+ new MobjStateDef(71, Sprite.SAWG, 0, 4, pa.Saw, null, MobjState.Saw2, 0, 0), // State.Saw1
+ new MobjStateDef(72, Sprite.SAWG, 1, 4, pa.Saw, null, MobjState.Saw3, 0, 0), // State.Saw2
+ new MobjStateDef(73, Sprite.SAWG, 1, 0, pa.ReFire, null, MobjState.Saw, 0, 0), // State.Saw3
+ new MobjStateDef(74, Sprite.PLSG, 0, 1, pa.WeaponReady, null, MobjState.Plasma, 0, 0), // State.Plasma
+ new MobjStateDef(75, Sprite.PLSG, 0, 1, pa.Lower, null, MobjState.Plasmadown, 0, 0), // State.Plasmadown
+ new MobjStateDef(76, Sprite.PLSG, 0, 1, pa.Raise, null, MobjState.Plasmaup, 0, 0), // State.Plasmaup
+ new MobjStateDef(77, Sprite.PLSG, 0, 3, pa.FirePlasma, null, MobjState.Plasma2, 0, 0), // State.Plasma1
+ new MobjStateDef(78, Sprite.PLSG, 1, 20, pa.ReFire, null, MobjState.Plasma, 0, 0), // State.Plasma2
+ new MobjStateDef(79, Sprite.PLSF, 32768, 4, pa.Light1, null, MobjState.Lightdone, 0, 0), // State.Plasmaflash1
+ new MobjStateDef(80, Sprite.PLSF, 32769, 4, pa.Light1, null, MobjState.Lightdone, 0, 0), // State.Plasmaflash2
+ new MobjStateDef(81, Sprite.BFGG, 0, 1, pa.WeaponReady, null, MobjState.Bfg, 0, 0), // State.Bfg
+ new MobjStateDef(82, Sprite.BFGG, 0, 1, pa.Lower, null, MobjState.Bfgdown, 0, 0), // State.Bfgdown
+ new MobjStateDef(83, Sprite.BFGG, 0, 1, pa.Raise, null, MobjState.Bfgup, 0, 0), // State.Bfgup
+ new MobjStateDef(84, Sprite.BFGG, 0, 20, pa.BFGsound, null, MobjState.Bfg2, 0, 0), // State.Bfg1
+ new MobjStateDef(85, Sprite.BFGG, 1, 10, pa.GunFlash, null, MobjState.Bfg3, 0, 0), // State.Bfg2
+ new MobjStateDef(86, Sprite.BFGG, 1, 10, pa.FireBFG, null, MobjState.Bfg4, 0, 0), // State.Bfg3
+ new MobjStateDef(87, Sprite.BFGG, 1, 20, pa.ReFire, null, MobjState.Bfg, 0, 0), // State.Bfg4
+ new MobjStateDef(88, Sprite.BFGF, 32768, 11, pa.Light1, null, MobjState.Bfgflash2, 0, 0), // State.Bfgflash1
+ new MobjStateDef(89, Sprite.BFGF, 32769, 6, pa.Light2, null, MobjState.Lightdone, 0, 0), // State.Bfgflash2
+ new MobjStateDef(90, Sprite.BLUD, 2, 8, null, null, MobjState.Blood2, 0, 0), // State.Blood1
+ new MobjStateDef(91, Sprite.BLUD, 1, 8, null, null, MobjState.Blood3, 0, 0), // State.Blood2
+ new MobjStateDef(92, Sprite.BLUD, 0, 8, null, null, MobjState.Null, 0, 0), // State.Blood3
+ new MobjStateDef(93, Sprite.PUFF, 32768, 4, null, null, MobjState.Puff2, 0, 0), // State.Puff1
+ new MobjStateDef(94, Sprite.PUFF, 1, 4, null, null, MobjState.Puff3, 0, 0), // State.Puff2
+ new MobjStateDef(95, Sprite.PUFF, 2, 4, null, null, MobjState.Puff4, 0, 0), // State.Puff3
+ new MobjStateDef(96, Sprite.PUFF, 3, 4, null, null, MobjState.Null, 0, 0), // State.Puff4
+ new MobjStateDef(97, Sprite.BAL1, 32768, 4, null, null, MobjState.Tball2, 0, 0), // State.Tball1
+ new MobjStateDef(98, Sprite.BAL1, 32769, 4, null, null, MobjState.Tball1, 0, 0), // State.Tball2
+ new MobjStateDef(99, Sprite.BAL1, 32770, 6, null, null, MobjState.Tballx2, 0, 0), // State.Tballx1
+ new MobjStateDef(100, Sprite.BAL1, 32771, 6, null, null, MobjState.Tballx3, 0, 0), // State.Tballx2
+ new MobjStateDef(101, Sprite.BAL1, 32772, 6, null, null, MobjState.Null, 0, 0), // State.Tballx3
+ new MobjStateDef(102, Sprite.BAL2, 32768, 4, null, null, MobjState.Rball2, 0, 0), // State.Rball1
+ new MobjStateDef(103, Sprite.BAL2, 32769, 4, null, null, MobjState.Rball1, 0, 0), // State.Rball2
+ new MobjStateDef(104, Sprite.BAL2, 32770, 6, null, null, MobjState.Rballx2, 0, 0), // State.Rballx1
+ new MobjStateDef(105, Sprite.BAL2, 32771, 6, null, null, MobjState.Rballx3, 0, 0), // State.Rballx2
+ new MobjStateDef(106, Sprite.BAL2, 32772, 6, null, null, MobjState.Null, 0, 0), // State.Rballx3
+ new MobjStateDef(107, Sprite.PLSS, 32768, 6, null, null, MobjState.Plasball2, 0, 0), // State.Plasball
+ new MobjStateDef(108, Sprite.PLSS, 32769, 6, null, null, MobjState.Plasball, 0, 0), // State.Plasball2
+ new MobjStateDef(109, Sprite.PLSE, 32768, 4, null, null, MobjState.Plasexp2, 0, 0), // State.Plasexp
+ new MobjStateDef(110, Sprite.PLSE, 32769, 4, null, null, MobjState.Plasexp3, 0, 0), // State.Plasexp2
+ new MobjStateDef(111, Sprite.PLSE, 32770, 4, null, null, MobjState.Plasexp4, 0, 0), // State.Plasexp3
+ new MobjStateDef(112, Sprite.PLSE, 32771, 4, null, null, MobjState.Plasexp5, 0, 0), // State.Plasexp4
+ new MobjStateDef(113, Sprite.PLSE, 32772, 4, null, null, MobjState.Null, 0, 0), // State.Plasexp5
+ new MobjStateDef(114, Sprite.MISL, 32768, 1, null, null, MobjState.Rocket, 0, 0), // State.Rocket
+ new MobjStateDef(115, Sprite.BFS1, 32768, 4, null, null, MobjState.Bfgshot2, 0, 0), // State.Bfgshot
+ new MobjStateDef(116, Sprite.BFS1, 32769, 4, null, null, MobjState.Bfgshot, 0, 0), // State.Bfgshot2
+ new MobjStateDef(117, Sprite.BFE1, 32768, 8, null, null, MobjState.Bfgland2, 0, 0), // State.Bfgland
+ new MobjStateDef(118, Sprite.BFE1, 32769, 8, null, null, MobjState.Bfgland3, 0, 0), // State.Bfgland2
+ new MobjStateDef(119, Sprite.BFE1, 32770, 8, null, ma.BFGSpray, MobjState.Bfgland4, 0, 0), // State.Bfgland3
+ new MobjStateDef(120, Sprite.BFE1, 32771, 8, null, null, MobjState.Bfgland5, 0, 0), // State.Bfgland4
+ new MobjStateDef(121, Sprite.BFE1, 32772, 8, null, null, MobjState.Bfgland6, 0, 0), // State.Bfgland5
+ new MobjStateDef(122, Sprite.BFE1, 32773, 8, null, null, MobjState.Null, 0, 0), // State.Bfgland6
+ new MobjStateDef(123, Sprite.BFE2, 32768, 8, null, null, MobjState.Bfgexp2, 0, 0), // State.Bfgexp
+ new MobjStateDef(124, Sprite.BFE2, 32769, 8, null, null, MobjState.Bfgexp3, 0, 0), // State.Bfgexp2
+ new MobjStateDef(125, Sprite.BFE2, 32770, 8, null, null, MobjState.Bfgexp4, 0, 0), // State.Bfgexp3
+ new MobjStateDef(126, Sprite.BFE2, 32771, 8, null, null, MobjState.Null, 0, 0), // State.Bfgexp4
+ new MobjStateDef(127, Sprite.MISL, 32769, 8, null, ma.Explode, MobjState.Explode2, 0, 0), // State.Explode1
+ new MobjStateDef(128, Sprite.MISL, 32770, 6, null, null, MobjState.Explode3, 0, 0), // State.Explode2
+ new MobjStateDef(129, Sprite.MISL, 32771, 4, null, null, MobjState.Null, 0, 0), // State.Explode3
+ new MobjStateDef(130, Sprite.TFOG, 32768, 6, null, null, MobjState.Tfog01, 0, 0), // State.Tfog
+ new MobjStateDef(131, Sprite.TFOG, 32769, 6, null, null, MobjState.Tfog02, 0, 0), // State.Tfog01
+ new MobjStateDef(132, Sprite.TFOG, 32768, 6, null, null, MobjState.Tfog2, 0, 0), // State.Tfog02
+ new MobjStateDef(133, Sprite.TFOG, 32769, 6, null, null, MobjState.Tfog3, 0, 0), // State.Tfog2
+ new MobjStateDef(134, Sprite.TFOG, 32770, 6, null, null, MobjState.Tfog4, 0, 0), // State.Tfog3
+ new MobjStateDef(135, Sprite.TFOG, 32771, 6, null, null, MobjState.Tfog5, 0, 0), // State.Tfog4
+ new MobjStateDef(136, Sprite.TFOG, 32772, 6, null, null, MobjState.Tfog6, 0, 0), // State.Tfog5
+ new MobjStateDef(137, Sprite.TFOG, 32773, 6, null, null, MobjState.Tfog7, 0, 0), // State.Tfog6
+ new MobjStateDef(138, Sprite.TFOG, 32774, 6, null, null, MobjState.Tfog8, 0, 0), // State.Tfog7
+ new MobjStateDef(139, Sprite.TFOG, 32775, 6, null, null, MobjState.Tfog9, 0, 0), // State.Tfog8
+ new MobjStateDef(140, Sprite.TFOG, 32776, 6, null, null, MobjState.Tfog10, 0, 0), // State.Tfog9
+ new MobjStateDef(141, Sprite.TFOG, 32777, 6, null, null, MobjState.Null, 0, 0), // State.Tfog10
+ new MobjStateDef(142, Sprite.IFOG, 32768, 6, null, null, MobjState.Ifog01, 0, 0), // State.Ifog
+ new MobjStateDef(143, Sprite.IFOG, 32769, 6, null, null, MobjState.Ifog02, 0, 0), // State.Ifog01
+ new MobjStateDef(144, Sprite.IFOG, 32768, 6, null, null, MobjState.Ifog2, 0, 0), // State.Ifog02
+ new MobjStateDef(145, Sprite.IFOG, 32769, 6, null, null, MobjState.Ifog3, 0, 0), // State.Ifog2
+ new MobjStateDef(146, Sprite.IFOG, 32770, 6, null, null, MobjState.Ifog4, 0, 0), // State.Ifog3
+ new MobjStateDef(147, Sprite.IFOG, 32771, 6, null, null, MobjState.Ifog5, 0, 0), // State.Ifog4
+ new MobjStateDef(148, Sprite.IFOG, 32772, 6, null, null, MobjState.Null, 0, 0), // State.Ifog5
+ new MobjStateDef(149, Sprite.PLAY, 0, -1, null, null, MobjState.Null, 0, 0), // State.Play
+ new MobjStateDef(150, Sprite.PLAY, 0, 4, null, null, MobjState.PlayRun2, 0, 0), // State.PlayRun1
+ new MobjStateDef(151, Sprite.PLAY, 1, 4, null, null, MobjState.PlayRun3, 0, 0), // State.PlayRun2
+ new MobjStateDef(152, Sprite.PLAY, 2, 4, null, null, MobjState.PlayRun4, 0, 0), // State.PlayRun3
+ new MobjStateDef(153, Sprite.PLAY, 3, 4, null, null, MobjState.PlayRun1, 0, 0), // State.PlayRun4
+ new MobjStateDef(154, Sprite.PLAY, 4, 12, null, null, MobjState.Play, 0, 0), // State.PlayAtk1
+ new MobjStateDef(155, Sprite.PLAY, 32773, 6, null, null, MobjState.PlayAtk1, 0, 0), // State.PlayAtk2
+ new MobjStateDef(156, Sprite.PLAY, 6, 4, null, null, MobjState.PlayPain2, 0, 0), // State.PlayPain
+ new MobjStateDef(157, Sprite.PLAY, 6, 4, null, ma.Pain, MobjState.Play, 0, 0), // State.PlayPain2
+ new MobjStateDef(158, Sprite.PLAY, 7, 10, null, null, MobjState.PlayDie2, 0, 0), // State.PlayDie1
+ new MobjStateDef(159, Sprite.PLAY, 8, 10, null, ma.PlayerScream, MobjState.PlayDie3, 0, 0), // State.PlayDie2
+ new MobjStateDef(160, Sprite.PLAY, 9, 10, null, ma.Fall, MobjState.PlayDie4, 0, 0), // State.PlayDie3
+ new MobjStateDef(161, Sprite.PLAY, 10, 10, null, null, MobjState.PlayDie5, 0, 0), // State.PlayDie4
+ new MobjStateDef(162, Sprite.PLAY, 11, 10, null, null, MobjState.PlayDie6, 0, 0), // State.PlayDie5
+ new MobjStateDef(163, Sprite.PLAY, 12, 10, null, null, MobjState.PlayDie7, 0, 0), // State.PlayDie6
+ new MobjStateDef(164, Sprite.PLAY, 13, -1, null, null, MobjState.Null, 0, 0), // State.PlayDie7
+ new MobjStateDef(165, Sprite.PLAY, 14, 5, null, null, MobjState.PlayXdie2, 0, 0), // State.PlayXdie1
+ new MobjStateDef(166, Sprite.PLAY, 15, 5, null, ma.XScream, MobjState.PlayXdie3, 0, 0), // State.PlayXdie2
+ new MobjStateDef(167, Sprite.PLAY, 16, 5, null, ma.Fall, MobjState.PlayXdie4, 0, 0), // State.PlayXdie3
+ new MobjStateDef(168, Sprite.PLAY, 17, 5, null, null, MobjState.PlayXdie5, 0, 0), // State.PlayXdie4
+ new MobjStateDef(169, Sprite.PLAY, 18, 5, null, null, MobjState.PlayXdie6, 0, 0), // State.PlayXdie5
+ new MobjStateDef(170, Sprite.PLAY, 19, 5, null, null, MobjState.PlayXdie7, 0, 0), // State.PlayXdie6
+ new MobjStateDef(171, Sprite.PLAY, 20, 5, null, null, MobjState.PlayXdie8, 0, 0), // State.PlayXdie7
+ new MobjStateDef(172, Sprite.PLAY, 21, 5, null, null, MobjState.PlayXdie9, 0, 0), // State.PlayXdie8
+ new MobjStateDef(173, Sprite.PLAY, 22, -1, null, null, MobjState.Null, 0, 0), // State.PlayXdie9
+ new MobjStateDef(174, Sprite.POSS, 0, 10, null, ma.Look, MobjState.PossStnd2, 0, 0), // State.PossStnd
+ new MobjStateDef(175, Sprite.POSS, 1, 10, null, ma.Look, MobjState.PossStnd, 0, 0), // State.PossStnd2
+ new MobjStateDef(176, Sprite.POSS, 0, 4, null, ma.Chase, MobjState.PossRun2, 0, 0), // State.PossRun1
+ new MobjStateDef(177, Sprite.POSS, 0, 4, null, ma.Chase, MobjState.PossRun3, 0, 0), // State.PossRun2
+ new MobjStateDef(178, Sprite.POSS, 1, 4, null, ma.Chase, MobjState.PossRun4, 0, 0), // State.PossRun3
+ new MobjStateDef(179, Sprite.POSS, 1, 4, null, ma.Chase, MobjState.PossRun5, 0, 0), // State.PossRun4
+ new MobjStateDef(180, Sprite.POSS, 2, 4, null, ma.Chase, MobjState.PossRun6, 0, 0), // State.PossRun5
+ new MobjStateDef(181, Sprite.POSS, 2, 4, null, ma.Chase, MobjState.PossRun7, 0, 0), // State.PossRun6
+ new MobjStateDef(182, Sprite.POSS, 3, 4, null, ma.Chase, MobjState.PossRun8, 0, 0), // State.PossRun7
+ new MobjStateDef(183, Sprite.POSS, 3, 4, null, ma.Chase, MobjState.PossRun1, 0, 0), // State.PossRun8
+ new MobjStateDef(184, Sprite.POSS, 4, 10, null, ma.FaceTarget, MobjState.PossAtk2, 0, 0), // State.PossAtk1
+ new MobjStateDef(185, Sprite.POSS, 5, 8, null, ma.PosAttack, MobjState.PossAtk3, 0, 0), // State.PossAtk2
+ new MobjStateDef(186, Sprite.POSS, 4, 8, null, null, MobjState.PossRun1, 0, 0), // State.PossAtk3
+ new MobjStateDef(187, Sprite.POSS, 6, 3, null, null, MobjState.PossPain2, 0, 0), // State.PossPain
+ new MobjStateDef(188, Sprite.POSS, 6, 3, null, ma.Pain, MobjState.PossRun1, 0, 0), // State.PossPain2
+ new MobjStateDef(189, Sprite.POSS, 7, 5, null, null, MobjState.PossDie2, 0, 0), // State.PossDie1
+ new MobjStateDef(190, Sprite.POSS, 8, 5, null, ma.Scream, MobjState.PossDie3, 0, 0), // State.PossDie2
+ new MobjStateDef(191, Sprite.POSS, 9, 5, null, ma.Fall, MobjState.PossDie4, 0, 0), // State.PossDie3
+ new MobjStateDef(192, Sprite.POSS, 10, 5, null, null, MobjState.PossDie5, 0, 0), // State.PossDie4
+ new MobjStateDef(193, Sprite.POSS, 11, -1, null, null, MobjState.Null, 0, 0), // State.PossDie5
+ new MobjStateDef(194, Sprite.POSS, 12, 5, null, null, MobjState.PossXdie2, 0, 0), // State.PossXdie1
+ new MobjStateDef(195, Sprite.POSS, 13, 5, null, ma.XScream, MobjState.PossXdie3, 0, 0), // State.PossXdie2
+ new MobjStateDef(196, Sprite.POSS, 14, 5, null, ma.Fall, MobjState.PossXdie4, 0, 0), // State.PossXdie3
+ new MobjStateDef(197, Sprite.POSS, 15, 5, null, null, MobjState.PossXdie5, 0, 0), // State.PossXdie4
+ new MobjStateDef(198, Sprite.POSS, 16, 5, null, null, MobjState.PossXdie6, 0, 0), // State.PossXdie5
+ new MobjStateDef(199, Sprite.POSS, 17, 5, null, null, MobjState.PossXdie7, 0, 0), // State.PossXdie6
+ new MobjStateDef(200, Sprite.POSS, 18, 5, null, null, MobjState.PossXdie8, 0, 0), // State.PossXdie7
+ new MobjStateDef(201, Sprite.POSS, 19, 5, null, null, MobjState.PossXdie9, 0, 0), // State.PossXdie8
+ new MobjStateDef(202, Sprite.POSS, 20, -1, null, null, MobjState.Null, 0, 0), // State.PossXdie9
+ new MobjStateDef(203, Sprite.POSS, 10, 5, null, null, MobjState.PossRaise2, 0, 0), // State.PossRaise1
+ new MobjStateDef(204, Sprite.POSS, 9, 5, null, null, MobjState.PossRaise3, 0, 0), // State.PossRaise2
+ new MobjStateDef(205, Sprite.POSS, 8, 5, null, null, MobjState.PossRaise4, 0, 0), // State.PossRaise3
+ new MobjStateDef(206, Sprite.POSS, 7, 5, null, null, MobjState.PossRun1, 0, 0), // State.PossRaise4
+ new MobjStateDef(207, Sprite.SPOS, 0, 10, null, ma.Look, MobjState.SposStnd2, 0, 0), // State.SposStnd
+ new MobjStateDef(208, Sprite.SPOS, 1, 10, null, ma.Look, MobjState.SposStnd, 0, 0), // State.SposStnd2
+ new MobjStateDef(209, Sprite.SPOS, 0, 3, null, ma.Chase, MobjState.SposRun2, 0, 0), // State.SposRun1
+ new MobjStateDef(210, Sprite.SPOS, 0, 3, null, ma.Chase, MobjState.SposRun3, 0, 0), // State.SposRun2
+ new MobjStateDef(211, Sprite.SPOS, 1, 3, null, ma.Chase, MobjState.SposRun4, 0, 0), // State.SposRun3
+ new MobjStateDef(212, Sprite.SPOS, 1, 3, null, ma.Chase, MobjState.SposRun5, 0, 0), // State.SposRun4
+ new MobjStateDef(213, Sprite.SPOS, 2, 3, null, ma.Chase, MobjState.SposRun6, 0, 0), // State.SposRun5
+ new MobjStateDef(214, Sprite.SPOS, 2, 3, null, ma.Chase, MobjState.SposRun7, 0, 0), // State.SposRun6
+ new MobjStateDef(215, Sprite.SPOS, 3, 3, null, ma.Chase, MobjState.SposRun8, 0, 0), // State.SposRun7
+ new MobjStateDef(216, Sprite.SPOS, 3, 3, null, ma.Chase, MobjState.SposRun1, 0, 0), // State.SposRun8
+ new MobjStateDef(217, Sprite.SPOS, 4, 10, null, ma.FaceTarget, MobjState.SposAtk2, 0, 0), // State.SposAtk1
+ new MobjStateDef(218, Sprite.SPOS, 32773, 10, null, ma.SPosAttack, MobjState.SposAtk3, 0, 0), // State.SposAtk2
+ new MobjStateDef(219, Sprite.SPOS, 4, 10, null, null, MobjState.SposRun1, 0, 0), // State.SposAtk3
+ new MobjStateDef(220, Sprite.SPOS, 6, 3, null, null, MobjState.SposPain2, 0, 0), // State.SposPain
+ new MobjStateDef(221, Sprite.SPOS, 6, 3, null, ma.Pain, MobjState.SposRun1, 0, 0), // State.SposPain2
+ new MobjStateDef(222, Sprite.SPOS, 7, 5, null, null, MobjState.SposDie2, 0, 0), // State.SposDie1
+ new MobjStateDef(223, Sprite.SPOS, 8, 5, null, ma.Scream, MobjState.SposDie3, 0, 0), // State.SposDie2
+ new MobjStateDef(224, Sprite.SPOS, 9, 5, null, ma.Fall, MobjState.SposDie4, 0, 0), // State.SposDie3
+ new MobjStateDef(225, Sprite.SPOS, 10, 5, null, null, MobjState.SposDie5, 0, 0), // State.SposDie4
+ new MobjStateDef(226, Sprite.SPOS, 11, -1, null, null, MobjState.Null, 0, 0), // State.SposDie5
+ new MobjStateDef(227, Sprite.SPOS, 12, 5, null, null, MobjState.SposXdie2, 0, 0), // State.SposXdie1
+ new MobjStateDef(228, Sprite.SPOS, 13, 5, null, ma.XScream, MobjState.SposXdie3, 0, 0), // State.SposXdie2
+ new MobjStateDef(229, Sprite.SPOS, 14, 5, null, ma.Fall, MobjState.SposXdie4, 0, 0), // State.SposXdie3
+ new MobjStateDef(230, Sprite.SPOS, 15, 5, null, null, MobjState.SposXdie5, 0, 0), // State.SposXdie4
+ new MobjStateDef(231, Sprite.SPOS, 16, 5, null, null, MobjState.SposXdie6, 0, 0), // State.SposXdie5
+ new MobjStateDef(232, Sprite.SPOS, 17, 5, null, null, MobjState.SposXdie7, 0, 0), // State.SposXdie6
+ new MobjStateDef(233, Sprite.SPOS, 18, 5, null, null, MobjState.SposXdie8, 0, 0), // State.SposXdie7
+ new MobjStateDef(234, Sprite.SPOS, 19, 5, null, null, MobjState.SposXdie9, 0, 0), // State.SposXdie8
+ new MobjStateDef(235, Sprite.SPOS, 20, -1, null, null, MobjState.Null, 0, 0), // State.SposXdie9
+ new MobjStateDef(236, Sprite.SPOS, 11, 5, null, null, MobjState.SposRaise2, 0, 0), // State.SposRaise1
+ new MobjStateDef(237, Sprite.SPOS, 10, 5, null, null, MobjState.SposRaise3, 0, 0), // State.SposRaise2
+ new MobjStateDef(238, Sprite.SPOS, 9, 5, null, null, MobjState.SposRaise4, 0, 0), // State.SposRaise3
+ new MobjStateDef(239, Sprite.SPOS, 8, 5, null, null, MobjState.SposRaise5, 0, 0), // State.SposRaise4
+ new MobjStateDef(240, Sprite.SPOS, 7, 5, null, null, MobjState.SposRun1, 0, 0), // State.SposRaise5
+ new MobjStateDef(241, Sprite.VILE, 0, 10, null, ma.Look, MobjState.VileStnd2, 0, 0), // State.VileStnd
+ new MobjStateDef(242, Sprite.VILE, 1, 10, null, ma.Look, MobjState.VileStnd, 0, 0), // State.VileStnd2
+ new MobjStateDef(243, Sprite.VILE, 0, 2, null, ma.VileChase, MobjState.VileRun2, 0, 0), // State.VileRun1
+ new MobjStateDef(244, Sprite.VILE, 0, 2, null, ma.VileChase, MobjState.VileRun3, 0, 0), // State.VileRun2
+ new MobjStateDef(245, Sprite.VILE, 1, 2, null, ma.VileChase, MobjState.VileRun4, 0, 0), // State.VileRun3
+ new MobjStateDef(246, Sprite.VILE, 1, 2, null, ma.VileChase, MobjState.VileRun5, 0, 0), // State.VileRun4
+ new MobjStateDef(247, Sprite.VILE, 2, 2, null, ma.VileChase, MobjState.VileRun6, 0, 0), // State.VileRun5
+ new MobjStateDef(248, Sprite.VILE, 2, 2, null, ma.VileChase, MobjState.VileRun7, 0, 0), // State.VileRun6
+ new MobjStateDef(249, Sprite.VILE, 3, 2, null, ma.VileChase, MobjState.VileRun8, 0, 0), // State.VileRun7
+ new MobjStateDef(250, Sprite.VILE, 3, 2, null, ma.VileChase, MobjState.VileRun9, 0, 0), // State.VileRun8
+ new MobjStateDef(251, Sprite.VILE, 4, 2, null, ma.VileChase, MobjState.VileRun10, 0, 0), // State.VileRun9
+ new MobjStateDef(252, Sprite.VILE, 4, 2, null, ma.VileChase, MobjState.VileRun11, 0, 0), // State.VileRun10
+ new MobjStateDef(253, Sprite.VILE, 5, 2, null, ma.VileChase, MobjState.VileRun12, 0, 0), // State.VileRun11
+ new MobjStateDef(254, Sprite.VILE, 5, 2, null, ma.VileChase, MobjState.VileRun1, 0, 0), // State.VileRun12
+ new MobjStateDef(255, Sprite.VILE, 32774, 0, null, ma.VileStart, MobjState.VileAtk2, 0, 0), // State.VileAtk1
+ new MobjStateDef(256, Sprite.VILE, 32774, 10, null, ma.FaceTarget, MobjState.VileAtk3, 0, 0), // State.VileAtk2
+ new MobjStateDef(257, Sprite.VILE, 32775, 8, null, ma.VileTarget, MobjState.VileAtk4, 0, 0), // State.VileAtk3
+ new MobjStateDef(258, Sprite.VILE, 32776, 8, null, ma.FaceTarget, MobjState.VileAtk5, 0, 0), // State.VileAtk4
+ new MobjStateDef(259, Sprite.VILE, 32777, 8, null, ma.FaceTarget, MobjState.VileAtk6, 0, 0), // State.VileAtk5
+ new MobjStateDef(260, Sprite.VILE, 32778, 8, null, ma.FaceTarget, MobjState.VileAtk7, 0, 0), // State.VileAtk6
+ new MobjStateDef(261, Sprite.VILE, 32779, 8, null, ma.FaceTarget, MobjState.VileAtk8, 0, 0), // State.VileAtk7
+ new MobjStateDef(262, Sprite.VILE, 32780, 8, null, ma.FaceTarget, MobjState.VileAtk9, 0, 0), // State.VileAtk8
+ new MobjStateDef(263, Sprite.VILE, 32781, 8, null, ma.FaceTarget, MobjState.VileAtk10, 0, 0), // State.VileAtk9
+ new MobjStateDef(264, Sprite.VILE, 32782, 8, null, ma.VileAttack, MobjState.VileAtk11, 0, 0), // State.VileAtk10
+ new MobjStateDef(265, Sprite.VILE, 32783, 20, null, null, MobjState.VileRun1, 0, 0), // State.VileAtk11
+ new MobjStateDef(266, Sprite.VILE, 32794, 10, null, null, MobjState.VileHeal2, 0, 0), // State.VileHeal1
+ new MobjStateDef(267, Sprite.VILE, 32795, 10, null, null, MobjState.VileHeal3, 0, 0), // State.VileHeal2
+ new MobjStateDef(268, Sprite.VILE, 32796, 10, null, null, MobjState.VileRun1, 0, 0), // State.VileHeal3
+ new MobjStateDef(269, Sprite.VILE, 16, 5, null, null, MobjState.VilePain2, 0, 0), // State.VilePain
+ new MobjStateDef(270, Sprite.VILE, 16, 5, null, ma.Pain, MobjState.VileRun1, 0, 0), // State.VilePain2
+ new MobjStateDef(271, Sprite.VILE, 16, 7, null, null, MobjState.VileDie2, 0, 0), // State.VileDie1
+ new MobjStateDef(272, Sprite.VILE, 17, 7, null, ma.Scream, MobjState.VileDie3, 0, 0), // State.VileDie2
+ new MobjStateDef(273, Sprite.VILE, 18, 7, null, ma.Fall, MobjState.VileDie4, 0, 0), // State.VileDie3
+ new MobjStateDef(274, Sprite.VILE, 19, 7, null, null, MobjState.VileDie5, 0, 0), // State.VileDie4
+ new MobjStateDef(275, Sprite.VILE, 20, 7, null, null, MobjState.VileDie6, 0, 0), // State.VileDie5
+ new MobjStateDef(276, Sprite.VILE, 21, 7, null, null, MobjState.VileDie7, 0, 0), // State.VileDie6
+ new MobjStateDef(277, Sprite.VILE, 22, 7, null, null, MobjState.VileDie8, 0, 0), // State.VileDie7
+ new MobjStateDef(278, Sprite.VILE, 23, 5, null, null, MobjState.VileDie9, 0, 0), // State.VileDie8
+ new MobjStateDef(279, Sprite.VILE, 24, 5, null, null, MobjState.VileDie10, 0, 0), // State.VileDie9
+ new MobjStateDef(280, Sprite.VILE, 25, -1, null, null, MobjState.Null, 0, 0), // State.VileDie10
+ new MobjStateDef(281, Sprite.FIRE, 32768, 2, null, ma.StartFire, MobjState.Fire2, 0, 0), // State.Fire1
+ new MobjStateDef(282, Sprite.FIRE, 32769, 2, null, ma.Fire, MobjState.Fire3, 0, 0), // State.Fire2
+ new MobjStateDef(283, Sprite.FIRE, 32768, 2, null, ma.Fire, MobjState.Fire4, 0, 0), // State.Fire3
+ new MobjStateDef(284, Sprite.FIRE, 32769, 2, null, ma.Fire, MobjState.Fire5, 0, 0), // State.Fire4
+ new MobjStateDef(285, Sprite.FIRE, 32770, 2, null, ma.FireCrackle, MobjState.Fire6, 0, 0), // State.Fire5
+ new MobjStateDef(286, Sprite.FIRE, 32769, 2, null, ma.Fire, MobjState.Fire7, 0, 0), // State.Fire6
+ new MobjStateDef(287, Sprite.FIRE, 32770, 2, null, ma.Fire, MobjState.Fire8, 0, 0), // State.Fire7
+ new MobjStateDef(288, Sprite.FIRE, 32769, 2, null, ma.Fire, MobjState.Fire9, 0, 0), // State.Fire8
+ new MobjStateDef(289, Sprite.FIRE, 32770, 2, null, ma.Fire, MobjState.Fire10, 0, 0), // State.Fire9
+ new MobjStateDef(290, Sprite.FIRE, 32771, 2, null, ma.Fire, MobjState.Fire11, 0, 0), // State.Fire10
+ new MobjStateDef(291, Sprite.FIRE, 32770, 2, null, ma.Fire, MobjState.Fire12, 0, 0), // State.Fire11
+ new MobjStateDef(292, Sprite.FIRE, 32771, 2, null, ma.Fire, MobjState.Fire13, 0, 0), // State.Fire12
+ new MobjStateDef(293, Sprite.FIRE, 32770, 2, null, ma.Fire, MobjState.Fire14, 0, 0), // State.Fire13
+ new MobjStateDef(294, Sprite.FIRE, 32771, 2, null, ma.Fire, MobjState.Fire15, 0, 0), // State.Fire14
+ new MobjStateDef(295, Sprite.FIRE, 32772, 2, null, ma.Fire, MobjState.Fire16, 0, 0), // State.Fire15
+ new MobjStateDef(296, Sprite.FIRE, 32771, 2, null, ma.Fire, MobjState.Fire17, 0, 0), // State.Fire16
+ new MobjStateDef(297, Sprite.FIRE, 32772, 2, null, ma.Fire, MobjState.Fire18, 0, 0), // State.Fire17
+ new MobjStateDef(298, Sprite.FIRE, 32771, 2, null, ma.Fire, MobjState.Fire19, 0, 0), // State.Fire18
+ new MobjStateDef(299, Sprite.FIRE, 32772, 2, null, ma.FireCrackle, MobjState.Fire20, 0, 0), // State.Fire19
+ new MobjStateDef(300, Sprite.FIRE, 32773, 2, null, ma.Fire, MobjState.Fire21, 0, 0), // State.Fire20
+ new MobjStateDef(301, Sprite.FIRE, 32772, 2, null, ma.Fire, MobjState.Fire22, 0, 0), // State.Fire21
+ new MobjStateDef(302, Sprite.FIRE, 32773, 2, null, ma.Fire, MobjState.Fire23, 0, 0), // State.Fire22
+ new MobjStateDef(303, Sprite.FIRE, 32772, 2, null, ma.Fire, MobjState.Fire24, 0, 0), // State.Fire23
+ new MobjStateDef(304, Sprite.FIRE, 32773, 2, null, ma.Fire, MobjState.Fire25, 0, 0), // State.Fire24
+ new MobjStateDef(305, Sprite.FIRE, 32774, 2, null, ma.Fire, MobjState.Fire26, 0, 0), // State.Fire25
+ new MobjStateDef(306, Sprite.FIRE, 32775, 2, null, ma.Fire, MobjState.Fire27, 0, 0), // State.Fire26
+ new MobjStateDef(307, Sprite.FIRE, 32774, 2, null, ma.Fire, MobjState.Fire28, 0, 0), // State.Fire27
+ new MobjStateDef(308, Sprite.FIRE, 32775, 2, null, ma.Fire, MobjState.Fire29, 0, 0), // State.Fire28
+ new MobjStateDef(309, Sprite.FIRE, 32774, 2, null, ma.Fire, MobjState.Fire30, 0, 0), // State.Fire29
+ new MobjStateDef(310, Sprite.FIRE, 32775, 2, null, ma.Fire, MobjState.Null, 0, 0), // State.Fire30
+ new MobjStateDef(311, Sprite.PUFF, 1, 4, null, null, MobjState.Smoke2, 0, 0), // State.Smoke1
+ new MobjStateDef(312, Sprite.PUFF, 2, 4, null, null, MobjState.Smoke3, 0, 0), // State.Smoke2
+ new MobjStateDef(313, Sprite.PUFF, 1, 4, null, null, MobjState.Smoke4, 0, 0), // State.Smoke3
+ new MobjStateDef(314, Sprite.PUFF, 2, 4, null, null, MobjState.Smoke5, 0, 0), // State.Smoke4
+ new MobjStateDef(315, Sprite.PUFF, 3, 4, null, null, MobjState.Null, 0, 0), // State.Smoke5
+ new MobjStateDef(316, Sprite.FATB, 32768, 2, null, ma.Tracer, MobjState.Tracer2, 0, 0), // State.Tracer
+ new MobjStateDef(317, Sprite.FATB, 32769, 2, null, ma.Tracer, MobjState.Tracer, 0, 0), // State.Tracer2
+ new MobjStateDef(318, Sprite.FBXP, 32768, 8, null, null, MobjState.Traceexp2, 0, 0), // State.Traceexp1
+ new MobjStateDef(319, Sprite.FBXP, 32769, 6, null, null, MobjState.Traceexp3, 0, 0), // State.Traceexp2
+ new MobjStateDef(320, Sprite.FBXP, 32770, 4, null, null, MobjState.Null, 0, 0), // State.Traceexp3
+ new MobjStateDef(321, Sprite.SKEL, 0, 10, null, ma.Look, MobjState.SkelStnd2, 0, 0), // State.SkelStnd
+ new MobjStateDef(322, Sprite.SKEL, 1, 10, null, ma.Look, MobjState.SkelStnd, 0, 0), // State.SkelStnd2
+ new MobjStateDef(323, Sprite.SKEL, 0, 2, null, ma.Chase, MobjState.SkelRun2, 0, 0), // State.SkelRun1
+ new MobjStateDef(324, Sprite.SKEL, 0, 2, null, ma.Chase, MobjState.SkelRun3, 0, 0), // State.SkelRun2
+ new MobjStateDef(325, Sprite.SKEL, 1, 2, null, ma.Chase, MobjState.SkelRun4, 0, 0), // State.SkelRun3
+ new MobjStateDef(326, Sprite.SKEL, 1, 2, null, ma.Chase, MobjState.SkelRun5, 0, 0), // State.SkelRun4
+ new MobjStateDef(327, Sprite.SKEL, 2, 2, null, ma.Chase, MobjState.SkelRun6, 0, 0), // State.SkelRun5
+ new MobjStateDef(328, Sprite.SKEL, 2, 2, null, ma.Chase, MobjState.SkelRun7, 0, 0), // State.SkelRun6
+ new MobjStateDef(329, Sprite.SKEL, 3, 2, null, ma.Chase, MobjState.SkelRun8, 0, 0), // State.SkelRun7
+ new MobjStateDef(330, Sprite.SKEL, 3, 2, null, ma.Chase, MobjState.SkelRun9, 0, 0), // State.SkelRun8
+ new MobjStateDef(331, Sprite.SKEL, 4, 2, null, ma.Chase, MobjState.SkelRun10, 0, 0), // State.SkelRun9
+ new MobjStateDef(332, Sprite.SKEL, 4, 2, null, ma.Chase, MobjState.SkelRun11, 0, 0), // State.SkelRun10
+ new MobjStateDef(333, Sprite.SKEL, 5, 2, null, ma.Chase, MobjState.SkelRun12, 0, 0), // State.SkelRun11
+ new MobjStateDef(334, Sprite.SKEL, 5, 2, null, ma.Chase, MobjState.SkelRun1, 0, 0), // State.SkelRun12
+ new MobjStateDef(335, Sprite.SKEL, 6, 0, null, ma.FaceTarget, MobjState.SkelFist2, 0, 0), // State.SkelFist1
+ new MobjStateDef(336, Sprite.SKEL, 6, 6, null, ma.SkelWhoosh, MobjState.SkelFist3, 0, 0), // State.SkelFist2
+ new MobjStateDef(337, Sprite.SKEL, 7, 6, null, ma.FaceTarget, MobjState.SkelFist4, 0, 0), // State.SkelFist3
+ new MobjStateDef(338, Sprite.SKEL, 8, 6, null, ma.SkelFist, MobjState.SkelRun1, 0, 0), // State.SkelFist4
+ new MobjStateDef(339, Sprite.SKEL, 32777, 0, null, ma.FaceTarget, MobjState.SkelMiss2, 0, 0), // State.SkelMiss1
+ new MobjStateDef(340, Sprite.SKEL, 32777, 10, null, ma.FaceTarget, MobjState.SkelMiss3, 0, 0), // State.SkelMiss2
+ new MobjStateDef(341, Sprite.SKEL, 10, 10, null, ma.SkelMissile, MobjState.SkelMiss4, 0, 0), // State.SkelMiss3
+ new MobjStateDef(342, Sprite.SKEL, 10, 10, null, ma.FaceTarget, MobjState.SkelRun1, 0, 0), // State.SkelMiss4
+ new MobjStateDef(343, Sprite.SKEL, 11, 5, null, null, MobjState.SkelPain2, 0, 0), // State.SkelPain
+ new MobjStateDef(344, Sprite.SKEL, 11, 5, null, ma.Pain, MobjState.SkelRun1, 0, 0), // State.SkelPain2
+ new MobjStateDef(345, Sprite.SKEL, 11, 7, null, null, MobjState.SkelDie2, 0, 0), // State.SkelDie1
+ new MobjStateDef(346, Sprite.SKEL, 12, 7, null, null, MobjState.SkelDie3, 0, 0), // State.SkelDie2
+ new MobjStateDef(347, Sprite.SKEL, 13, 7, null, ma.Scream, MobjState.SkelDie4, 0, 0), // State.SkelDie3
+ new MobjStateDef(348, Sprite.SKEL, 14, 7, null, ma.Fall, MobjState.SkelDie5, 0, 0), // State.SkelDie4
+ new MobjStateDef(349, Sprite.SKEL, 15, 7, null, null, MobjState.SkelDie6, 0, 0), // State.SkelDie5
+ new MobjStateDef(350, Sprite.SKEL, 16, -1, null, null, MobjState.Null, 0, 0), // State.SkelDie6
+ new MobjStateDef(351, Sprite.SKEL, 16, 5, null, null, MobjState.SkelRaise2, 0, 0), // State.SkelRaise1
+ new MobjStateDef(352, Sprite.SKEL, 15, 5, null, null, MobjState.SkelRaise3, 0, 0), // State.SkelRaise2
+ new MobjStateDef(353, Sprite.SKEL, 14, 5, null, null, MobjState.SkelRaise4, 0, 0), // State.SkelRaise3
+ new MobjStateDef(354, Sprite.SKEL, 13, 5, null, null, MobjState.SkelRaise5, 0, 0), // State.SkelRaise4
+ new MobjStateDef(355, Sprite.SKEL, 12, 5, null, null, MobjState.SkelRaise6, 0, 0), // State.SkelRaise5
+ new MobjStateDef(356, Sprite.SKEL, 11, 5, null, null, MobjState.SkelRun1, 0, 0), // State.SkelRaise6
+ new MobjStateDef(357, Sprite.MANF, 32768, 4, null, null, MobjState.Fatshot2, 0, 0), // State.Fatshot1
+ new MobjStateDef(358, Sprite.MANF, 32769, 4, null, null, MobjState.Fatshot1, 0, 0), // State.Fatshot2
+ new MobjStateDef(359, Sprite.MISL, 32769, 8, null, null, MobjState.Fatshotx2, 0, 0), // State.Fatshotx1
+ new MobjStateDef(360, Sprite.MISL, 32770, 6, null, null, MobjState.Fatshotx3, 0, 0), // State.Fatshotx2
+ new MobjStateDef(361, Sprite.MISL, 32771, 4, null, null, MobjState.Null, 0, 0), // State.Fatshotx3
+ new MobjStateDef(362, Sprite.FATT, 0, 15, null, ma.Look, MobjState.FattStnd2, 0, 0), // State.FattStnd
+ new MobjStateDef(363, Sprite.FATT, 1, 15, null, ma.Look, MobjState.FattStnd, 0, 0), // State.FattStnd2
+ new MobjStateDef(364, Sprite.FATT, 0, 4, null, ma.Chase, MobjState.FattRun2, 0, 0), // State.FattRun1
+ new MobjStateDef(365, Sprite.FATT, 0, 4, null, ma.Chase, MobjState.FattRun3, 0, 0), // State.FattRun2
+ new MobjStateDef(366, Sprite.FATT, 1, 4, null, ma.Chase, MobjState.FattRun4, 0, 0), // State.FattRun3
+ new MobjStateDef(367, Sprite.FATT, 1, 4, null, ma.Chase, MobjState.FattRun5, 0, 0), // State.FattRun4
+ new MobjStateDef(368, Sprite.FATT, 2, 4, null, ma.Chase, MobjState.FattRun6, 0, 0), // State.FattRun5
+ new MobjStateDef(369, Sprite.FATT, 2, 4, null, ma.Chase, MobjState.FattRun7, 0, 0), // State.FattRun6
+ new MobjStateDef(370, Sprite.FATT, 3, 4, null, ma.Chase, MobjState.FattRun8, 0, 0), // State.FattRun7
+ new MobjStateDef(371, Sprite.FATT, 3, 4, null, ma.Chase, MobjState.FattRun9, 0, 0), // State.FattRun8
+ new MobjStateDef(372, Sprite.FATT, 4, 4, null, ma.Chase, MobjState.FattRun10, 0, 0), // State.FattRun9
+ new MobjStateDef(373, Sprite.FATT, 4, 4, null, ma.Chase, MobjState.FattRun11, 0, 0), // State.FattRun10
+ new MobjStateDef(374, Sprite.FATT, 5, 4, null, ma.Chase, MobjState.FattRun12, 0, 0), // State.FattRun11
+ new MobjStateDef(375, Sprite.FATT, 5, 4, null, ma.Chase, MobjState.FattRun1, 0, 0), // State.FattRun12
+ new MobjStateDef(376, Sprite.FATT, 6, 20, null, ma.FatRaise, MobjState.FattAtk2, 0, 0), // State.FattAtk1
+ new MobjStateDef(377, Sprite.FATT, 32775, 10, null, ma.FatAttack1, MobjState.FattAtk3, 0, 0), // State.FattAtk2
+ new MobjStateDef(378, Sprite.FATT, 8, 5, null, ma.FaceTarget, MobjState.FattAtk4, 0, 0), // State.FattAtk3
+ new MobjStateDef(379, Sprite.FATT, 6, 5, null, ma.FaceTarget, MobjState.FattAtk5, 0, 0), // State.FattAtk4
+ new MobjStateDef(380, Sprite.FATT, 32775, 10, null, ma.FatAttack2, MobjState.FattAtk6, 0, 0), // State.FattAtk5
+ new MobjStateDef(381, Sprite.FATT, 8, 5, null, ma.FaceTarget, MobjState.FattAtk7, 0, 0), // State.FattAtk6
+ new MobjStateDef(382, Sprite.FATT, 6, 5, null, ma.FaceTarget, MobjState.FattAtk8, 0, 0), // State.FattAtk7
+ new MobjStateDef(383, Sprite.FATT, 32775, 10, null, ma.FatAttack3, MobjState.FattAtk9, 0, 0), // State.FattAtk8
+ new MobjStateDef(384, Sprite.FATT, 8, 5, null, ma.FaceTarget, MobjState.FattAtk10, 0, 0), // State.FattAtk9
+ new MobjStateDef(385, Sprite.FATT, 6, 5, null, ma.FaceTarget, MobjState.FattRun1, 0, 0), // State.FattAtk10
+ new MobjStateDef(386, Sprite.FATT, 9, 3, null, null, MobjState.FattPain2, 0, 0), // State.FattPain
+ new MobjStateDef(387, Sprite.FATT, 9, 3, null, ma.Pain, MobjState.FattRun1, 0, 0), // State.FattPain2
+ new MobjStateDef(388, Sprite.FATT, 10, 6, null, null, MobjState.FattDie2, 0, 0), // State.FattDie1
+ new MobjStateDef(389, Sprite.FATT, 11, 6, null, ma.Scream, MobjState.FattDie3, 0, 0), // State.FattDie2
+ new MobjStateDef(390, Sprite.FATT, 12, 6, null, ma.Fall, MobjState.FattDie4, 0, 0), // State.FattDie3
+ new MobjStateDef(391, Sprite.FATT, 13, 6, null, null, MobjState.FattDie5, 0, 0), // State.FattDie4
+ new MobjStateDef(392, Sprite.FATT, 14, 6, null, null, MobjState.FattDie6, 0, 0), // State.FattDie5
+ new MobjStateDef(393, Sprite.FATT, 15, 6, null, null, MobjState.FattDie7, 0, 0), // State.FattDie6
+ new MobjStateDef(394, Sprite.FATT, 16, 6, null, null, MobjState.FattDie8, 0, 0), // State.FattDie7
+ new MobjStateDef(395, Sprite.FATT, 17, 6, null, null, MobjState.FattDie9, 0, 0), // State.FattDie8
+ new MobjStateDef(396, Sprite.FATT, 18, 6, null, null, MobjState.FattDie10, 0, 0), // State.FattDie9
+ new MobjStateDef(397, Sprite.FATT, 19, -1, null, ma.BossDeath, MobjState.Null, 0, 0), // State.FattDie10
+ new MobjStateDef(398, Sprite.FATT, 17, 5, null, null, MobjState.FattRaise2, 0, 0), // State.FattRaise1
+ new MobjStateDef(399, Sprite.FATT, 16, 5, null, null, MobjState.FattRaise3, 0, 0), // State.FattRaise2
+ new MobjStateDef(400, Sprite.FATT, 15, 5, null, null, MobjState.FattRaise4, 0, 0), // State.FattRaise3
+ new MobjStateDef(401, Sprite.FATT, 14, 5, null, null, MobjState.FattRaise5, 0, 0), // State.FattRaise4
+ new MobjStateDef(402, Sprite.FATT, 13, 5, null, null, MobjState.FattRaise6, 0, 0), // State.FattRaise5
+ new MobjStateDef(403, Sprite.FATT, 12, 5, null, null, MobjState.FattRaise7, 0, 0), // State.FattRaise6
+ new MobjStateDef(404, Sprite.FATT, 11, 5, null, null, MobjState.FattRaise8, 0, 0), // State.FattRaise7
+ new MobjStateDef(405, Sprite.FATT, 10, 5, null, null, MobjState.FattRun1, 0, 0), // State.FattRaise8
+ new MobjStateDef(406, Sprite.CPOS, 0, 10, null, ma.Look, MobjState.CposStnd2, 0, 0), // State.CposStnd
+ new MobjStateDef(407, Sprite.CPOS, 1, 10, null, ma.Look, MobjState.CposStnd, 0, 0), // State.CposStnd2
+ new MobjStateDef(408, Sprite.CPOS, 0, 3, null, ma.Chase, MobjState.CposRun2, 0, 0), // State.CposRun1
+ new MobjStateDef(409, Sprite.CPOS, 0, 3, null, ma.Chase, MobjState.CposRun3, 0, 0), // State.CposRun2
+ new MobjStateDef(410, Sprite.CPOS, 1, 3, null, ma.Chase, MobjState.CposRun4, 0, 0), // State.CposRun3
+ new MobjStateDef(411, Sprite.CPOS, 1, 3, null, ma.Chase, MobjState.CposRun5, 0, 0), // State.CposRun4
+ new MobjStateDef(412, Sprite.CPOS, 2, 3, null, ma.Chase, MobjState.CposRun6, 0, 0), // State.CposRun5
+ new MobjStateDef(413, Sprite.CPOS, 2, 3, null, ma.Chase, MobjState.CposRun7, 0, 0), // State.CposRun6
+ new MobjStateDef(414, Sprite.CPOS, 3, 3, null, ma.Chase, MobjState.CposRun8, 0, 0), // State.CposRun7
+ new MobjStateDef(415, Sprite.CPOS, 3, 3, null, ma.Chase, MobjState.CposRun1, 0, 0), // State.CposRun8
+ new MobjStateDef(416, Sprite.CPOS, 4, 10, null, ma.FaceTarget, MobjState.CposAtk2, 0, 0), // State.CposAtk1
+ new MobjStateDef(417, Sprite.CPOS, 32773, 4, null, ma.CPosAttack, MobjState.CposAtk3, 0, 0), // State.CposAtk2
+ new MobjStateDef(418, Sprite.CPOS, 32772, 4, null, ma.CPosAttack, MobjState.CposAtk4, 0, 0), // State.CposAtk3
+ new MobjStateDef(419, Sprite.CPOS, 5, 1, null, ma.CPosRefire, MobjState.CposAtk2, 0, 0), // State.CposAtk4
+ new MobjStateDef(420, Sprite.CPOS, 6, 3, null, null, MobjState.CposPain2, 0, 0), // State.CposPain
+ new MobjStateDef(421, Sprite.CPOS, 6, 3, null, ma.Pain, MobjState.CposRun1, 0, 0), // State.CposPain2
+ new MobjStateDef(422, Sprite.CPOS, 7, 5, null, null, MobjState.CposDie2, 0, 0), // State.CposDie1
+ new MobjStateDef(423, Sprite.CPOS, 8, 5, null, ma.Scream, MobjState.CposDie3, 0, 0), // State.CposDie2
+ new MobjStateDef(424, Sprite.CPOS, 9, 5, null, ma.Fall, MobjState.CposDie4, 0, 0), // State.CposDie3
+ new MobjStateDef(425, Sprite.CPOS, 10, 5, null, null, MobjState.CposDie5, 0, 0), // State.CposDie4
+ new MobjStateDef(426, Sprite.CPOS, 11, 5, null, null, MobjState.CposDie6, 0, 0), // State.CposDie5
+ new MobjStateDef(427, Sprite.CPOS, 12, 5, null, null, MobjState.CposDie7, 0, 0), // State.CposDie6
+ new MobjStateDef(428, Sprite.CPOS, 13, -1, null, null, MobjState.Null, 0, 0), // State.CposDie7
+ new MobjStateDef(429, Sprite.CPOS, 14, 5, null, null, MobjState.CposXdie2, 0, 0), // State.CposXdie1
+ new MobjStateDef(430, Sprite.CPOS, 15, 5, null, ma.XScream, MobjState.CposXdie3, 0, 0), // State.CposXdie2
+ new MobjStateDef(431, Sprite.CPOS, 16, 5, null, ma.Fall, MobjState.CposXdie4, 0, 0), // State.CposXdie3
+ new MobjStateDef(432, Sprite.CPOS, 17, 5, null, null, MobjState.CposXdie5, 0, 0), // State.CposXdie4
+ new MobjStateDef(433, Sprite.CPOS, 18, 5, null, null, MobjState.CposXdie6, 0, 0), // State.CposXdie5
+ new MobjStateDef(434, Sprite.CPOS, 19, -1, null, null, MobjState.Null, 0, 0), // State.CposXdie6
+ new MobjStateDef(435, Sprite.CPOS, 13, 5, null, null, MobjState.CposRaise2, 0, 0), // State.CposRaise1
+ new MobjStateDef(436, Sprite.CPOS, 12, 5, null, null, MobjState.CposRaise3, 0, 0), // State.CposRaise2
+ new MobjStateDef(437, Sprite.CPOS, 11, 5, null, null, MobjState.CposRaise4, 0, 0), // State.CposRaise3
+ new MobjStateDef(438, Sprite.CPOS, 10, 5, null, null, MobjState.CposRaise5, 0, 0), // State.CposRaise4
+ new MobjStateDef(439, Sprite.CPOS, 9, 5, null, null, MobjState.CposRaise6, 0, 0), // State.CposRaise5
+ new MobjStateDef(440, Sprite.CPOS, 8, 5, null, null, MobjState.CposRaise7, 0, 0), // State.CposRaise6
+ new MobjStateDef(441, Sprite.CPOS, 7, 5, null, null, MobjState.CposRun1, 0, 0), // State.CposRaise7
+ new MobjStateDef(442, Sprite.TROO, 0, 10, null, ma.Look, MobjState.TrooStnd2, 0, 0), // State.TrooStnd
+ new MobjStateDef(443, Sprite.TROO, 1, 10, null, ma.Look, MobjState.TrooStnd, 0, 0), // State.TrooStnd2
+ new MobjStateDef(444, Sprite.TROO, 0, 3, null, ma.Chase, MobjState.TrooRun2, 0, 0), // State.TrooRun1
+ new MobjStateDef(445, Sprite.TROO, 0, 3, null, ma.Chase, MobjState.TrooRun3, 0, 0), // State.TrooRun2
+ new MobjStateDef(446, Sprite.TROO, 1, 3, null, ma.Chase, MobjState.TrooRun4, 0, 0), // State.TrooRun3
+ new MobjStateDef(447, Sprite.TROO, 1, 3, null, ma.Chase, MobjState.TrooRun5, 0, 0), // State.TrooRun4
+ new MobjStateDef(448, Sprite.TROO, 2, 3, null, ma.Chase, MobjState.TrooRun6, 0, 0), // State.TrooRun5
+ new MobjStateDef(449, Sprite.TROO, 2, 3, null, ma.Chase, MobjState.TrooRun7, 0, 0), // State.TrooRun6
+ new MobjStateDef(450, Sprite.TROO, 3, 3, null, ma.Chase, MobjState.TrooRun8, 0, 0), // State.TrooRun7
+ new MobjStateDef(451, Sprite.TROO, 3, 3, null, ma.Chase, MobjState.TrooRun1, 0, 0), // State.TrooRun8
+ new MobjStateDef(452, Sprite.TROO, 4, 8, null, ma.FaceTarget, MobjState.TrooAtk2, 0, 0), // State.TrooAtk1
+ new MobjStateDef(453, Sprite.TROO, 5, 8, null, ma.FaceTarget, MobjState.TrooAtk3, 0, 0), // State.TrooAtk2
+ new MobjStateDef(454, Sprite.TROO, 6, 6, null, ma.TroopAttack, MobjState.TrooRun1, 0, 0), // State.TrooAtk3
+ new MobjStateDef(455, Sprite.TROO, 7, 2, null, null, MobjState.TrooPain2, 0, 0), // State.TrooPain
+ new MobjStateDef(456, Sprite.TROO, 7, 2, null, ma.Pain, MobjState.TrooRun1, 0, 0), // State.TrooPain2
+ new MobjStateDef(457, Sprite.TROO, 8, 8, null, null, MobjState.TrooDie2, 0, 0), // State.TrooDie1
+ new MobjStateDef(458, Sprite.TROO, 9, 8, null, ma.Scream, MobjState.TrooDie3, 0, 0), // State.TrooDie2
+ new MobjStateDef(459, Sprite.TROO, 10, 6, null, null, MobjState.TrooDie4, 0, 0), // State.TrooDie3
+ new MobjStateDef(460, Sprite.TROO, 11, 6, null, ma.Fall, MobjState.TrooDie5, 0, 0), // State.TrooDie4
+ new MobjStateDef(461, Sprite.TROO, 12, -1, null, null, MobjState.Null, 0, 0), // State.TrooDie5
+ new MobjStateDef(462, Sprite.TROO, 13, 5, null, null, MobjState.TrooXdie2, 0, 0), // State.TrooXdie1
+ new MobjStateDef(463, Sprite.TROO, 14, 5, null, ma.XScream, MobjState.TrooXdie3, 0, 0), // State.TrooXdie2
+ new MobjStateDef(464, Sprite.TROO, 15, 5, null, null, MobjState.TrooXdie4, 0, 0), // State.TrooXdie3
+ new MobjStateDef(465, Sprite.TROO, 16, 5, null, ma.Fall, MobjState.TrooXdie5, 0, 0), // State.TrooXdie4
+ new MobjStateDef(466, Sprite.TROO, 17, 5, null, null, MobjState.TrooXdie6, 0, 0), // State.TrooXdie5
+ new MobjStateDef(467, Sprite.TROO, 18, 5, null, null, MobjState.TrooXdie7, 0, 0), // State.TrooXdie6
+ new MobjStateDef(468, Sprite.TROO, 19, 5, null, null, MobjState.TrooXdie8, 0, 0), // State.TrooXdie7
+ new MobjStateDef(469, Sprite.TROO, 20, -1, null, null, MobjState.Null, 0, 0), // State.TrooXdie8
+ new MobjStateDef(470, Sprite.TROO, 12, 8, null, null, MobjState.TrooRaise2, 0, 0), // State.TrooRaise1
+ new MobjStateDef(471, Sprite.TROO, 11, 8, null, null, MobjState.TrooRaise3, 0, 0), // State.TrooRaise2
+ new MobjStateDef(472, Sprite.TROO, 10, 6, null, null, MobjState.TrooRaise4, 0, 0), // State.TrooRaise3
+ new MobjStateDef(473, Sprite.TROO, 9, 6, null, null, MobjState.TrooRaise5, 0, 0), // State.TrooRaise4
+ new MobjStateDef(474, Sprite.TROO, 8, 6, null, null, MobjState.TrooRun1, 0, 0), // State.TrooRaise5
+ new MobjStateDef(475, Sprite.SARG, 0, 10, null, ma.Look, MobjState.SargStnd2, 0, 0), // State.SargStnd
+ new MobjStateDef(476, Sprite.SARG, 1, 10, null, ma.Look, MobjState.SargStnd, 0, 0), // State.SargStnd2
+ new MobjStateDef(477, Sprite.SARG, 0, 2, null, ma.Chase, MobjState.SargRun2, 0, 0), // State.SargRun1
+ new MobjStateDef(478, Sprite.SARG, 0, 2, null, ma.Chase, MobjState.SargRun3, 0, 0), // State.SargRun2
+ new MobjStateDef(479, Sprite.SARG, 1, 2, null, ma.Chase, MobjState.SargRun4, 0, 0), // State.SargRun3
+ new MobjStateDef(480, Sprite.SARG, 1, 2, null, ma.Chase, MobjState.SargRun5, 0, 0), // State.SargRun4
+ new MobjStateDef(481, Sprite.SARG, 2, 2, null, ma.Chase, MobjState.SargRun6, 0, 0), // State.SargRun5
+ new MobjStateDef(482, Sprite.SARG, 2, 2, null, ma.Chase, MobjState.SargRun7, 0, 0), // State.SargRun6
+ new MobjStateDef(483, Sprite.SARG, 3, 2, null, ma.Chase, MobjState.SargRun8, 0, 0), // State.SargRun7
+ new MobjStateDef(484, Sprite.SARG, 3, 2, null, ma.Chase, MobjState.SargRun1, 0, 0), // State.SargRun8
+ new MobjStateDef(485, Sprite.SARG, 4, 8, null, ma.FaceTarget, MobjState.SargAtk2, 0, 0), // State.SargAtk1
+ new MobjStateDef(486, Sprite.SARG, 5, 8, null, ma.FaceTarget, MobjState.SargAtk3, 0, 0), // State.SargAtk2
+ new MobjStateDef(487, Sprite.SARG, 6, 8, null, ma.SargAttack, MobjState.SargRun1, 0, 0), // State.SargAtk3
+ new MobjStateDef(488, Sprite.SARG, 7, 2, null, null, MobjState.SargPain2, 0, 0), // State.SargPain
+ new MobjStateDef(489, Sprite.SARG, 7, 2, null, ma.Pain, MobjState.SargRun1, 0, 0), // State.SargPain2
+ new MobjStateDef(490, Sprite.SARG, 8, 8, null, null, MobjState.SargDie2, 0, 0), // State.SargDie1
+ new MobjStateDef(491, Sprite.SARG, 9, 8, null, ma.Scream, MobjState.SargDie3, 0, 0), // State.SargDie2
+ new MobjStateDef(492, Sprite.SARG, 10, 4, null, null, MobjState.SargDie4, 0, 0), // State.SargDie3
+ new MobjStateDef(493, Sprite.SARG, 11, 4, null, ma.Fall, MobjState.SargDie5, 0, 0), // State.SargDie4
+ new MobjStateDef(494, Sprite.SARG, 12, 4, null, null, MobjState.SargDie6, 0, 0), // State.SargDie5
+ new MobjStateDef(495, Sprite.SARG, 13, -1, null, null, MobjState.Null, 0, 0), // State.SargDie6
+ new MobjStateDef(496, Sprite.SARG, 13, 5, null, null, MobjState.SargRaise2, 0, 0), // State.SargRaise1
+ new MobjStateDef(497, Sprite.SARG, 12, 5, null, null, MobjState.SargRaise3, 0, 0), // State.SargRaise2
+ new MobjStateDef(498, Sprite.SARG, 11, 5, null, null, MobjState.SargRaise4, 0, 0), // State.SargRaise3
+ new MobjStateDef(499, Sprite.SARG, 10, 5, null, null, MobjState.SargRaise5, 0, 0), // State.SargRaise4
+ new MobjStateDef(500, Sprite.SARG, 9, 5, null, null, MobjState.SargRaise6, 0, 0), // State.SargRaise5
+ new MobjStateDef(501, Sprite.SARG, 8, 5, null, null, MobjState.SargRun1, 0, 0), // State.SargRaise6
+ new MobjStateDef(502, Sprite.HEAD, 0, 10, null, ma.Look, MobjState.HeadStnd, 0, 0), // State.HeadStnd
+ new MobjStateDef(503, Sprite.HEAD, 0, 3, null, ma.Chase, MobjState.HeadRun1, 0, 0), // State.HeadRun1
+ new MobjStateDef(504, Sprite.HEAD, 1, 5, null, ma.FaceTarget, MobjState.HeadAtk2, 0, 0), // State.HeadAtk1
+ new MobjStateDef(505, Sprite.HEAD, 2, 5, null, ma.FaceTarget, MobjState.HeadAtk3, 0, 0), // State.HeadAtk2
+ new MobjStateDef(506, Sprite.HEAD, 32771, 5, null, ma.HeadAttack, MobjState.HeadRun1, 0, 0), // State.HeadAtk3
+ new MobjStateDef(507, Sprite.HEAD, 4, 3, null, null, MobjState.HeadPain2, 0, 0), // State.HeadPain
+ new MobjStateDef(508, Sprite.HEAD, 4, 3, null, ma.Pain, MobjState.HeadPain3, 0, 0), // State.HeadPain2
+ new MobjStateDef(509, Sprite.HEAD, 5, 6, null, null, MobjState.HeadRun1, 0, 0), // State.HeadPain3
+ new MobjStateDef(510, Sprite.HEAD, 6, 8, null, null, MobjState.HeadDie2, 0, 0), // State.HeadDie1
+ new MobjStateDef(511, Sprite.HEAD, 7, 8, null, ma.Scream, MobjState.HeadDie3, 0, 0), // State.HeadDie2
+ new MobjStateDef(512, Sprite.HEAD, 8, 8, null, null, MobjState.HeadDie4, 0, 0), // State.HeadDie3
+ new MobjStateDef(513, Sprite.HEAD, 9, 8, null, null, MobjState.HeadDie5, 0, 0), // State.HeadDie4
+ new MobjStateDef(514, Sprite.HEAD, 10, 8, null, ma.Fall, MobjState.HeadDie6, 0, 0), // State.HeadDie5
+ new MobjStateDef(515, Sprite.HEAD, 11, -1, null, null, MobjState.Null, 0, 0), // State.HeadDie6
+ new MobjStateDef(516, Sprite.HEAD, 11, 8, null, null, MobjState.HeadRaise2, 0, 0), // State.HeadRaise1
+ new MobjStateDef(517, Sprite.HEAD, 10, 8, null, null, MobjState.HeadRaise3, 0, 0), // State.HeadRaise2
+ new MobjStateDef(518, Sprite.HEAD, 9, 8, null, null, MobjState.HeadRaise4, 0, 0), // State.HeadRaise3
+ new MobjStateDef(519, Sprite.HEAD, 8, 8, null, null, MobjState.HeadRaise5, 0, 0), // State.HeadRaise4
+ new MobjStateDef(520, Sprite.HEAD, 7, 8, null, null, MobjState.HeadRaise6, 0, 0), // State.HeadRaise5
+ new MobjStateDef(521, Sprite.HEAD, 6, 8, null, null, MobjState.HeadRun1, 0, 0), // State.HeadRaise6
+ new MobjStateDef(522, Sprite.BAL7, 32768, 4, null, null, MobjState.Brball2, 0, 0), // State.Brball1
+ new MobjStateDef(523, Sprite.BAL7, 32769, 4, null, null, MobjState.Brball1, 0, 0), // State.Brball2
+ new MobjStateDef(524, Sprite.BAL7, 32770, 6, null, null, MobjState.Brballx2, 0, 0), // State.Brballx1
+ new MobjStateDef(525, Sprite.BAL7, 32771, 6, null, null, MobjState.Brballx3, 0, 0), // State.Brballx2
+ new MobjStateDef(526, Sprite.BAL7, 32772, 6, null, null, MobjState.Null, 0, 0), // State.Brballx3
+ new MobjStateDef(527, Sprite.BOSS, 0, 10, null, ma.Look, MobjState.BossStnd2, 0, 0), // State.BossStnd
+ new MobjStateDef(528, Sprite.BOSS, 1, 10, null, ma.Look, MobjState.BossStnd, 0, 0), // State.BossStnd2
+ new MobjStateDef(529, Sprite.BOSS, 0, 3, null, ma.Chase, MobjState.BossRun2, 0, 0), // State.BossRun1
+ new MobjStateDef(530, Sprite.BOSS, 0, 3, null, ma.Chase, MobjState.BossRun3, 0, 0), // State.BossRun2
+ new MobjStateDef(531, Sprite.BOSS, 1, 3, null, ma.Chase, MobjState.BossRun4, 0, 0), // State.BossRun3
+ new MobjStateDef(532, Sprite.BOSS, 1, 3, null, ma.Chase, MobjState.BossRun5, 0, 0), // State.BossRun4
+ new MobjStateDef(533, Sprite.BOSS, 2, 3, null, ma.Chase, MobjState.BossRun6, 0, 0), // State.BossRun5
+ new MobjStateDef(534, Sprite.BOSS, 2, 3, null, ma.Chase, MobjState.BossRun7, 0, 0), // State.BossRun6
+ new MobjStateDef(535, Sprite.BOSS, 3, 3, null, ma.Chase, MobjState.BossRun8, 0, 0), // State.BossRun7
+ new MobjStateDef(536, Sprite.BOSS, 3, 3, null, ma.Chase, MobjState.BossRun1, 0, 0), // State.BossRun8
+ new MobjStateDef(537, Sprite.BOSS, 4, 8, null, ma.FaceTarget, MobjState.BossAtk2, 0, 0), // State.BossAtk1
+ new MobjStateDef(538, Sprite.BOSS, 5, 8, null, ma.FaceTarget, MobjState.BossAtk3, 0, 0), // State.BossAtk2
+ new MobjStateDef(539, Sprite.BOSS, 6, 8, null, ma.BruisAttack, MobjState.BossRun1, 0, 0), // State.BossAtk3
+ new MobjStateDef(540, Sprite.BOSS, 7, 2, null, null, MobjState.BossPain2, 0, 0), // State.BossPain
+ new MobjStateDef(541, Sprite.BOSS, 7, 2, null, ma.Pain, MobjState.BossRun1, 0, 0), // State.BossPain2
+ new MobjStateDef(542, Sprite.BOSS, 8, 8, null, null, MobjState.BossDie2, 0, 0), // State.BossDie1
+ new MobjStateDef(543, Sprite.BOSS, 9, 8, null, ma.Scream, MobjState.BossDie3, 0, 0), // State.BossDie2
+ new MobjStateDef(544, Sprite.BOSS, 10, 8, null, null, MobjState.BossDie4, 0, 0), // State.BossDie3
+ new MobjStateDef(545, Sprite.BOSS, 11, 8, null, ma.Fall, MobjState.BossDie5, 0, 0), // State.BossDie4
+ new MobjStateDef(546, Sprite.BOSS, 12, 8, null, null, MobjState.BossDie6, 0, 0), // State.BossDie5
+ new MobjStateDef(547, Sprite.BOSS, 13, 8, null, null, MobjState.BossDie7, 0, 0), // State.BossDie6
+ new MobjStateDef(548, Sprite.BOSS, 14, -1, null, ma.BossDeath, MobjState.Null, 0, 0), // State.BossDie7
+ new MobjStateDef(549, Sprite.BOSS, 14, 8, null, null, MobjState.BossRaise2, 0, 0), // State.BossRaise1
+ new MobjStateDef(550, Sprite.BOSS, 13, 8, null, null, MobjState.BossRaise3, 0, 0), // State.BossRaise2
+ new MobjStateDef(551, Sprite.BOSS, 12, 8, null, null, MobjState.BossRaise4, 0, 0), // State.BossRaise3
+ new MobjStateDef(552, Sprite.BOSS, 11, 8, null, null, MobjState.BossRaise5, 0, 0), // State.BossRaise4
+ new MobjStateDef(553, Sprite.BOSS, 10, 8, null, null, MobjState.BossRaise6, 0, 0), // State.BossRaise5
+ new MobjStateDef(554, Sprite.BOSS, 9, 8, null, null, MobjState.BossRaise7, 0, 0), // State.BossRaise6
+ new MobjStateDef(555, Sprite.BOSS, 8, 8, null, null, MobjState.BossRun1, 0, 0), // State.BossRaise7
+ new MobjStateDef(556, Sprite.BOS2, 0, 10, null, ma.Look, MobjState.Bos2Stnd2, 0, 0), // State.Bos2Stnd
+ new MobjStateDef(557, Sprite.BOS2, 1, 10, null, ma.Look, MobjState.Bos2Stnd, 0, 0), // State.Bos2Stnd2
+ new MobjStateDef(558, Sprite.BOS2, 0, 3, null, ma.Chase, MobjState.Bos2Run2, 0, 0), // State.Bos2Run1
+ new MobjStateDef(559, Sprite.BOS2, 0, 3, null, ma.Chase, MobjState.Bos2Run3, 0, 0), // State.Bos2Run2
+ new MobjStateDef(560, Sprite.BOS2, 1, 3, null, ma.Chase, MobjState.Bos2Run4, 0, 0), // State.Bos2Run3
+ new MobjStateDef(561, Sprite.BOS2, 1, 3, null, ma.Chase, MobjState.Bos2Run5, 0, 0), // State.Bos2Run4
+ new MobjStateDef(562, Sprite.BOS2, 2, 3, null, ma.Chase, MobjState.Bos2Run6, 0, 0), // State.Bos2Run5
+ new MobjStateDef(563, Sprite.BOS2, 2, 3, null, ma.Chase, MobjState.Bos2Run7, 0, 0), // State.Bos2Run6
+ new MobjStateDef(564, Sprite.BOS2, 3, 3, null, ma.Chase, MobjState.Bos2Run8, 0, 0), // State.Bos2Run7
+ new MobjStateDef(565, Sprite.BOS2, 3, 3, null, ma.Chase, MobjState.Bos2Run1, 0, 0), // State.Bos2Run8
+ new MobjStateDef(566, Sprite.BOS2, 4, 8, null, ma.FaceTarget, MobjState.Bos2Atk2, 0, 0), // State.Bos2Atk1
+ new MobjStateDef(567, Sprite.BOS2, 5, 8, null, ma.FaceTarget, MobjState.Bos2Atk3, 0, 0), // State.Bos2Atk2
+ new MobjStateDef(568, Sprite.BOS2, 6, 8, null, ma.BruisAttack, MobjState.Bos2Run1, 0, 0), // State.Bos2Atk3
+ new MobjStateDef(569, Sprite.BOS2, 7, 2, null, null, MobjState.Bos2Pain2, 0, 0), // State.Bos2Pain
+ new MobjStateDef(570, Sprite.BOS2, 7, 2, null, ma.Pain, MobjState.Bos2Run1, 0, 0), // State.Bos2Pain2
+ new MobjStateDef(571, Sprite.BOS2, 8, 8, null, null, MobjState.Bos2Die2, 0, 0), // State.Bos2Die1
+ new MobjStateDef(572, Sprite.BOS2, 9, 8, null, ma.Scream, MobjState.Bos2Die3, 0, 0), // State.Bos2Die2
+ new MobjStateDef(573, Sprite.BOS2, 10, 8, null, null, MobjState.Bos2Die4, 0, 0), // State.Bos2Die3
+ new MobjStateDef(574, Sprite.BOS2, 11, 8, null, ma.Fall, MobjState.Bos2Die5, 0, 0), // State.Bos2Die4
+ new MobjStateDef(575, Sprite.BOS2, 12, 8, null, null, MobjState.Bos2Die6, 0, 0), // State.Bos2Die5
+ new MobjStateDef(576, Sprite.BOS2, 13, 8, null, null, MobjState.Bos2Die7, 0, 0), // State.Bos2Die6
+ new MobjStateDef(577, Sprite.BOS2, 14, -1, null, null, MobjState.Null, 0, 0), // State.Bos2Die7
+ new MobjStateDef(578, Sprite.BOS2, 14, 8, null, null, MobjState.Bos2Raise2, 0, 0), // State.Bos2Raise1
+ new MobjStateDef(579, Sprite.BOS2, 13, 8, null, null, MobjState.Bos2Raise3, 0, 0), // State.Bos2Raise2
+ new MobjStateDef(580, Sprite.BOS2, 12, 8, null, null, MobjState.Bos2Raise4, 0, 0), // State.Bos2Raise3
+ new MobjStateDef(581, Sprite.BOS2, 11, 8, null, null, MobjState.Bos2Raise5, 0, 0), // State.Bos2Raise4
+ new MobjStateDef(582, Sprite.BOS2, 10, 8, null, null, MobjState.Bos2Raise6, 0, 0), // State.Bos2Raise5
+ new MobjStateDef(583, Sprite.BOS2, 9, 8, null, null, MobjState.Bos2Raise7, 0, 0), // State.Bos2Raise6
+ new MobjStateDef(584, Sprite.BOS2, 8, 8, null, null, MobjState.Bos2Run1, 0, 0), // State.Bos2Raise7
+ new MobjStateDef(585, Sprite.SKUL, 32768, 10, null, ma.Look, MobjState.SkullStnd2, 0, 0), // State.SkullStnd
+ new MobjStateDef(586, Sprite.SKUL, 32769, 10, null, ma.Look, MobjState.SkullStnd, 0, 0), // State.SkullStnd2
+ new MobjStateDef(587, Sprite.SKUL, 32768, 6, null, ma.Chase, MobjState.SkullRun2, 0, 0), // State.SkullRun1
+ new MobjStateDef(588, Sprite.SKUL, 32769, 6, null, ma.Chase, MobjState.SkullRun1, 0, 0), // State.SkullRun2
+ new MobjStateDef(589, Sprite.SKUL, 32770, 10, null, ma.FaceTarget, MobjState.SkullAtk2, 0, 0), // State.SkullAtk1
+ new MobjStateDef(590, Sprite.SKUL, 32771, 4, null, ma.SkullAttack, MobjState.SkullAtk3, 0, 0), // State.SkullAtk2
+ new MobjStateDef(591, Sprite.SKUL, 32770, 4, null, null, MobjState.SkullAtk4, 0, 0), // State.SkullAtk3
+ new MobjStateDef(592, Sprite.SKUL, 32771, 4, null, null, MobjState.SkullAtk3, 0, 0), // State.SkullAtk4
+ new MobjStateDef(593, Sprite.SKUL, 32772, 3, null, null, MobjState.SkullPain2, 0, 0), // State.SkullPain
+ new MobjStateDef(594, Sprite.SKUL, 32772, 3, null, ma.Pain, MobjState.SkullRun1, 0, 0), // State.SkullPain2
+ new MobjStateDef(595, Sprite.SKUL, 32773, 6, null, null, MobjState.SkullDie2, 0, 0), // State.SkullDie1
+ new MobjStateDef(596, Sprite.SKUL, 32774, 6, null, ma.Scream, MobjState.SkullDie3, 0, 0), // State.SkullDie2
+ new MobjStateDef(597, Sprite.SKUL, 32775, 6, null, null, MobjState.SkullDie4, 0, 0), // State.SkullDie3
+ new MobjStateDef(598, Sprite.SKUL, 32776, 6, null, ma.Fall, MobjState.SkullDie5, 0, 0), // State.SkullDie4
+ new MobjStateDef(599, Sprite.SKUL, 9, 6, null, null, MobjState.SkullDie6, 0, 0), // State.SkullDie5
+ new MobjStateDef(600, Sprite.SKUL, 10, 6, null, null, MobjState.Null, 0, 0), // State.SkullDie6
+ new MobjStateDef(601, Sprite.SPID, 0, 10, null, ma.Look, MobjState.SpidStnd2, 0, 0), // State.SpidStnd
+ new MobjStateDef(602, Sprite.SPID, 1, 10, null, ma.Look, MobjState.SpidStnd, 0, 0), // State.SpidStnd2
+ new MobjStateDef(603, Sprite.SPID, 0, 3, null, ma.Metal, MobjState.SpidRun2, 0, 0), // State.SpidRun1
+ new MobjStateDef(604, Sprite.SPID, 0, 3, null, ma.Chase, MobjState.SpidRun3, 0, 0), // State.SpidRun2
+ new MobjStateDef(605, Sprite.SPID, 1, 3, null, ma.Chase, MobjState.SpidRun4, 0, 0), // State.SpidRun3
+ new MobjStateDef(606, Sprite.SPID, 1, 3, null, ma.Chase, MobjState.SpidRun5, 0, 0), // State.SpidRun4
+ new MobjStateDef(607, Sprite.SPID, 2, 3, null, ma.Metal, MobjState.SpidRun6, 0, 0), // State.SpidRun5
+ new MobjStateDef(608, Sprite.SPID, 2, 3, null, ma.Chase, MobjState.SpidRun7, 0, 0), // State.SpidRun6
+ new MobjStateDef(609, Sprite.SPID, 3, 3, null, ma.Chase, MobjState.SpidRun8, 0, 0), // State.SpidRun7
+ new MobjStateDef(610, Sprite.SPID, 3, 3, null, ma.Chase, MobjState.SpidRun9, 0, 0), // State.SpidRun8
+ new MobjStateDef(611, Sprite.SPID, 4, 3, null, ma.Metal, MobjState.SpidRun10, 0, 0), // State.SpidRun9
+ new MobjStateDef(612, Sprite.SPID, 4, 3, null, ma.Chase, MobjState.SpidRun11, 0, 0), // State.SpidRun10
+ new MobjStateDef(613, Sprite.SPID, 5, 3, null, ma.Chase, MobjState.SpidRun12, 0, 0), // State.SpidRun11
+ new MobjStateDef(614, Sprite.SPID, 5, 3, null, ma.Chase, MobjState.SpidRun1, 0, 0), // State.SpidRun12
+ new MobjStateDef(615, Sprite.SPID, 32768, 20, null, ma.FaceTarget, MobjState.SpidAtk2, 0, 0), // State.SpidAtk1
+ new MobjStateDef(616, Sprite.SPID, 32774, 4, null, ma.SPosAttack, MobjState.SpidAtk3, 0, 0), // State.SpidAtk2
+ new MobjStateDef(617, Sprite.SPID, 32775, 4, null, ma.SPosAttack, MobjState.SpidAtk4, 0, 0), // State.SpidAtk3
+ new MobjStateDef(618, Sprite.SPID, 32775, 1, null, ma.SpidRefire, MobjState.SpidAtk2, 0, 0), // State.SpidAtk4
+ new MobjStateDef(619, Sprite.SPID, 8, 3, null, null, MobjState.SpidPain2, 0, 0), // State.SpidPain
+ new MobjStateDef(620, Sprite.SPID, 8, 3, null, ma.Pain, MobjState.SpidRun1, 0, 0), // State.SpidPain2
+ new MobjStateDef(621, Sprite.SPID, 9, 20, null, ma.Scream, MobjState.SpidDie2, 0, 0), // State.SpidDie1
+ new MobjStateDef(622, Sprite.SPID, 10, 10, null, ma.Fall, MobjState.SpidDie3, 0, 0), // State.SpidDie2
+ new MobjStateDef(623, Sprite.SPID, 11, 10, null, null, MobjState.SpidDie4, 0, 0), // State.SpidDie3
+ new MobjStateDef(624, Sprite.SPID, 12, 10, null, null, MobjState.SpidDie5, 0, 0), // State.SpidDie4
+ new MobjStateDef(625, Sprite.SPID, 13, 10, null, null, MobjState.SpidDie6, 0, 0), // State.SpidDie5
+ new MobjStateDef(626, Sprite.SPID, 14, 10, null, null, MobjState.SpidDie7, 0, 0), // State.SpidDie6
+ new MobjStateDef(627, Sprite.SPID, 15, 10, null, null, MobjState.SpidDie8, 0, 0), // State.SpidDie7
+ new MobjStateDef(628, Sprite.SPID, 16, 10, null, null, MobjState.SpidDie9, 0, 0), // State.SpidDie8
+ new MobjStateDef(629, Sprite.SPID, 17, 10, null, null, MobjState.SpidDie10, 0, 0), // State.SpidDie9
+ new MobjStateDef(630, Sprite.SPID, 18, 30, null, null, MobjState.SpidDie11, 0, 0), // State.SpidDie10
+ new MobjStateDef(631, Sprite.SPID, 18, -1, null, ma.BossDeath, MobjState.Null, 0, 0), // State.SpidDie11
+ new MobjStateDef(632, Sprite.BSPI, 0, 10, null, ma.Look, MobjState.BspiStnd2, 0, 0), // State.BspiStnd
+ new MobjStateDef(633, Sprite.BSPI, 1, 10, null, ma.Look, MobjState.BspiStnd, 0, 0), // State.BspiStnd2
+ new MobjStateDef(634, Sprite.BSPI, 0, 20, null, null, MobjState.BspiRun1, 0, 0), // State.BspiSight
+ new MobjStateDef(635, Sprite.BSPI, 0, 3, null, ma.BabyMetal, MobjState.BspiRun2, 0, 0), // State.BspiRun1
+ new MobjStateDef(636, Sprite.BSPI, 0, 3, null, ma.Chase, MobjState.BspiRun3, 0, 0), // State.BspiRun2
+ new MobjStateDef(637, Sprite.BSPI, 1, 3, null, ma.Chase, MobjState.BspiRun4, 0, 0), // State.BspiRun3
+ new MobjStateDef(638, Sprite.BSPI, 1, 3, null, ma.Chase, MobjState.BspiRun5, 0, 0), // State.BspiRun4
+ new MobjStateDef(639, Sprite.BSPI, 2, 3, null, ma.Chase, MobjState.BspiRun6, 0, 0), // State.BspiRun5
+ new MobjStateDef(640, Sprite.BSPI, 2, 3, null, ma.Chase, MobjState.BspiRun7, 0, 0), // State.BspiRun6
+ new MobjStateDef(641, Sprite.BSPI, 3, 3, null, ma.BabyMetal, MobjState.BspiRun8, 0, 0), // State.BspiRun7
+ new MobjStateDef(642, Sprite.BSPI, 3, 3, null, ma.Chase, MobjState.BspiRun9, 0, 0), // State.BspiRun8
+ new MobjStateDef(643, Sprite.BSPI, 4, 3, null, ma.Chase, MobjState.BspiRun10, 0, 0), // State.BspiRun9
+ new MobjStateDef(644, Sprite.BSPI, 4, 3, null, ma.Chase, MobjState.BspiRun11, 0, 0), // State.BspiRun10
+ new MobjStateDef(645, Sprite.BSPI, 5, 3, null, ma.Chase, MobjState.BspiRun12, 0, 0), // State.BspiRun11
+ new MobjStateDef(646, Sprite.BSPI, 5, 3, null, ma.Chase, MobjState.BspiRun1, 0, 0), // State.BspiRun12
+ new MobjStateDef(647, Sprite.BSPI, 32768, 20, null, ma.FaceTarget, MobjState.BspiAtk2, 0, 0), // State.BspiAtk1
+ new MobjStateDef(648, Sprite.BSPI, 32774, 4, null, ma.BspiAttack, MobjState.BspiAtk3, 0, 0), // State.BspiAtk2
+ new MobjStateDef(649, Sprite.BSPI, 32775, 4, null, null, MobjState.BspiAtk4, 0, 0), // State.BspiAtk3
+ new MobjStateDef(650, Sprite.BSPI, 32775, 1, null, ma.SpidRefire, MobjState.BspiAtk2, 0, 0), // State.BspiAtk4
+ new MobjStateDef(651, Sprite.BSPI, 8, 3, null, null, MobjState.BspiPain2, 0, 0), // State.BspiPain
+ new MobjStateDef(652, Sprite.BSPI, 8, 3, null, ma.Pain, MobjState.BspiRun1, 0, 0), // State.BspiPain2
+ new MobjStateDef(653, Sprite.BSPI, 9, 20, null, ma.Scream, MobjState.BspiDie2, 0, 0), // State.BspiDie1
+ new MobjStateDef(654, Sprite.BSPI, 10, 7, null, ma.Fall, MobjState.BspiDie3, 0, 0), // State.BspiDie2
+ new MobjStateDef(655, Sprite.BSPI, 11, 7, null, null, MobjState.BspiDie4, 0, 0), // State.BspiDie3
+ new MobjStateDef(656, Sprite.BSPI, 12, 7, null, null, MobjState.BspiDie5, 0, 0), // State.BspiDie4
+ new MobjStateDef(657, Sprite.BSPI, 13, 7, null, null, MobjState.BspiDie6, 0, 0), // State.BspiDie5
+ new MobjStateDef(658, Sprite.BSPI, 14, 7, null, null, MobjState.BspiDie7, 0, 0), // State.BspiDie6
+ new MobjStateDef(659, Sprite.BSPI, 15, -1, null, ma.BossDeath, MobjState.Null, 0, 0), // State.BspiDie7
+ new MobjStateDef(660, Sprite.BSPI, 15, 5, null, null, MobjState.BspiRaise2, 0, 0), // State.BspiRaise1
+ new MobjStateDef(661, Sprite.BSPI, 14, 5, null, null, MobjState.BspiRaise3, 0, 0), // State.BspiRaise2
+ new MobjStateDef(662, Sprite.BSPI, 13, 5, null, null, MobjState.BspiRaise4, 0, 0), // State.BspiRaise3
+ new MobjStateDef(663, Sprite.BSPI, 12, 5, null, null, MobjState.BspiRaise5, 0, 0), // State.BspiRaise4
+ new MobjStateDef(664, Sprite.BSPI, 11, 5, null, null, MobjState.BspiRaise6, 0, 0), // State.BspiRaise5
+ new MobjStateDef(665, Sprite.BSPI, 10, 5, null, null, MobjState.BspiRaise7, 0, 0), // State.BspiRaise6
+ new MobjStateDef(666, Sprite.BSPI, 9, 5, null, null, MobjState.BspiRun1, 0, 0), // State.BspiRaise7
+ new MobjStateDef(667, Sprite.APLS, 32768, 5, null, null, MobjState.ArachPlaz2, 0, 0), // State.ArachPlaz
+ new MobjStateDef(668, Sprite.APLS, 32769, 5, null, null, MobjState.ArachPlaz, 0, 0), // State.ArachPlaz2
+ new MobjStateDef(669, Sprite.APBX, 32768, 5, null, null, MobjState.ArachPlex2, 0, 0), // State.ArachPlex
+ new MobjStateDef(670, Sprite.APBX, 32769, 5, null, null, MobjState.ArachPlex3, 0, 0), // State.ArachPlex2
+ new MobjStateDef(671, Sprite.APBX, 32770, 5, null, null, MobjState.ArachPlex4, 0, 0), // State.ArachPlex3
+ new MobjStateDef(672, Sprite.APBX, 32771, 5, null, null, MobjState.ArachPlex5, 0, 0), // State.ArachPlex4
+ new MobjStateDef(673, Sprite.APBX, 32772, 5, null, null, MobjState.Null, 0, 0), // State.ArachPlex5
+ new MobjStateDef(674, Sprite.CYBR, 0, 10, null, ma.Look, MobjState.CyberStnd2, 0, 0), // State.CyberStnd
+ new MobjStateDef(675, Sprite.CYBR, 1, 10, null, ma.Look, MobjState.CyberStnd, 0, 0), // State.CyberStnd2
+ new MobjStateDef(676, Sprite.CYBR, 0, 3, null, ma.Hoof, MobjState.CyberRun2, 0, 0), // State.CyberRun1
+ new MobjStateDef(677, Sprite.CYBR, 0, 3, null, ma.Chase, MobjState.CyberRun3, 0, 0), // State.CyberRun2
+ new MobjStateDef(678, Sprite.CYBR, 1, 3, null, ma.Chase, MobjState.CyberRun4, 0, 0), // State.CyberRun3
+ new MobjStateDef(679, Sprite.CYBR, 1, 3, null, ma.Chase, MobjState.CyberRun5, 0, 0), // State.CyberRun4
+ new MobjStateDef(680, Sprite.CYBR, 2, 3, null, ma.Chase, MobjState.CyberRun6, 0, 0), // State.CyberRun5
+ new MobjStateDef(681, Sprite.CYBR, 2, 3, null, ma.Chase, MobjState.CyberRun7, 0, 0), // State.CyberRun6
+ new MobjStateDef(682, Sprite.CYBR, 3, 3, null, ma.Metal, MobjState.CyberRun8, 0, 0), // State.CyberRun7
+ new MobjStateDef(683, Sprite.CYBR, 3, 3, null, ma.Chase, MobjState.CyberRun1, 0, 0), // State.CyberRun8
+ new MobjStateDef(684, Sprite.CYBR, 4, 6, null, ma.FaceTarget, MobjState.CyberAtk2, 0, 0), // State.CyberAtk1
+ new MobjStateDef(685, Sprite.CYBR, 5, 12, null, ma.CyberAttack, MobjState.CyberAtk3, 0, 0), // State.CyberAtk2
+ new MobjStateDef(686, Sprite.CYBR, 4, 12, null, ma.FaceTarget, MobjState.CyberAtk4, 0, 0), // State.CyberAtk3
+ new MobjStateDef(687, Sprite.CYBR, 5, 12, null, ma.CyberAttack, MobjState.CyberAtk5, 0, 0), // State.CyberAtk4
+ new MobjStateDef(688, Sprite.CYBR, 4, 12, null, ma.FaceTarget, MobjState.CyberAtk6, 0, 0), // State.CyberAtk5
+ new MobjStateDef(689, Sprite.CYBR, 5, 12, null, ma.CyberAttack, MobjState.CyberRun1, 0, 0), // State.CyberAtk6
+ new MobjStateDef(690, Sprite.CYBR, 6, 10, null, ma.Pain, MobjState.CyberRun1, 0, 0), // State.CyberPain
+ new MobjStateDef(691, Sprite.CYBR, 7, 10, null, null, MobjState.CyberDie2, 0, 0), // State.CyberDie1
+ new MobjStateDef(692, Sprite.CYBR, 8, 10, null, ma.Scream, MobjState.CyberDie3, 0, 0), // State.CyberDie2
+ new MobjStateDef(693, Sprite.CYBR, 9, 10, null, null, MobjState.CyberDie4, 0, 0), // State.CyberDie3
+ new MobjStateDef(694, Sprite.CYBR, 10, 10, null, null, MobjState.CyberDie5, 0, 0), // State.CyberDie4
+ new MobjStateDef(695, Sprite.CYBR, 11, 10, null, null, MobjState.CyberDie6, 0, 0), // State.CyberDie5
+ new MobjStateDef(696, Sprite.CYBR, 12, 10, null, ma.Fall, MobjState.CyberDie7, 0, 0), // State.CyberDie6
+ new MobjStateDef(697, Sprite.CYBR, 13, 10, null, null, MobjState.CyberDie8, 0, 0), // State.CyberDie7
+ new MobjStateDef(698, Sprite.CYBR, 14, 10, null, null, MobjState.CyberDie9, 0, 0), // State.CyberDie8
+ new MobjStateDef(699, Sprite.CYBR, 15, 30, null, null, MobjState.CyberDie10, 0, 0), // State.CyberDie9
+ new MobjStateDef(700, Sprite.CYBR, 15, -1, null, ma.BossDeath, MobjState.Null, 0, 0), // State.CyberDie10
+ new MobjStateDef(701, Sprite.PAIN, 0, 10, null, ma.Look, MobjState.PainStnd, 0, 0), // State.PainStnd
+ new MobjStateDef(702, Sprite.PAIN, 0, 3, null, ma.Chase, MobjState.PainRun2, 0, 0), // State.PainRun1
+ new MobjStateDef(703, Sprite.PAIN, 0, 3, null, ma.Chase, MobjState.PainRun3, 0, 0), // State.PainRun2
+ new MobjStateDef(704, Sprite.PAIN, 1, 3, null, ma.Chase, MobjState.PainRun4, 0, 0), // State.PainRun3
+ new MobjStateDef(705, Sprite.PAIN, 1, 3, null, ma.Chase, MobjState.PainRun5, 0, 0), // State.PainRun4
+ new MobjStateDef(706, Sprite.PAIN, 2, 3, null, ma.Chase, MobjState.PainRun6, 0, 0), // State.PainRun5
+ new MobjStateDef(707, Sprite.PAIN, 2, 3, null, ma.Chase, MobjState.PainRun1, 0, 0), // State.PainRun6
+ new MobjStateDef(708, Sprite.PAIN, 3, 5, null, ma.FaceTarget, MobjState.PainAtk2, 0, 0), // State.PainAtk1
+ new MobjStateDef(709, Sprite.PAIN, 4, 5, null, ma.FaceTarget, MobjState.PainAtk3, 0, 0), // State.PainAtk2
+ new MobjStateDef(710, Sprite.PAIN, 32773, 5, null, ma.FaceTarget, MobjState.PainAtk4, 0, 0), // State.PainAtk3
+ new MobjStateDef(711, Sprite.PAIN, 32773, 0, null, ma.PainAttack, MobjState.PainRun1, 0, 0), // State.PainAtk4
+ new MobjStateDef(712, Sprite.PAIN, 6, 6, null, null, MobjState.PainPain2, 0, 0), // State.PainPain
+ new MobjStateDef(713, Sprite.PAIN, 6, 6, null, ma.Pain, MobjState.PainRun1, 0, 0), // State.PainPain2
+ new MobjStateDef(714, Sprite.PAIN, 32775, 8, null, null, MobjState.PainDie2, 0, 0), // State.PainDie1
+ new MobjStateDef(715, Sprite.PAIN, 32776, 8, null, ma.Scream, MobjState.PainDie3, 0, 0), // State.PainDie2
+ new MobjStateDef(716, Sprite.PAIN, 32777, 8, null, null, MobjState.PainDie4, 0, 0), // State.PainDie3
+ new MobjStateDef(717, Sprite.PAIN, 32778, 8, null, null, MobjState.PainDie5, 0, 0), // State.PainDie4
+ new MobjStateDef(718, Sprite.PAIN, 32779, 8, null, ma.PainDie, MobjState.PainDie6, 0, 0), // State.PainDie5
+ new MobjStateDef(719, Sprite.PAIN, 32780, 8, null, null, MobjState.Null, 0, 0), // State.PainDie6
+ new MobjStateDef(720, Sprite.PAIN, 12, 8, null, null, MobjState.PainRaise2, 0, 0), // State.PainRaise1
+ new MobjStateDef(721, Sprite.PAIN, 11, 8, null, null, MobjState.PainRaise3, 0, 0), // State.PainRaise2
+ new MobjStateDef(722, Sprite.PAIN, 10, 8, null, null, MobjState.PainRaise4, 0, 0), // State.PainRaise3
+ new MobjStateDef(723, Sprite.PAIN, 9, 8, null, null, MobjState.PainRaise5, 0, 0), // State.PainRaise4
+ new MobjStateDef(724, Sprite.PAIN, 8, 8, null, null, MobjState.PainRaise6, 0, 0), // State.PainRaise5
+ new MobjStateDef(725, Sprite.PAIN, 7, 8, null, null, MobjState.PainRun1, 0, 0), // State.PainRaise6
+ new MobjStateDef(726, Sprite.SSWV, 0, 10, null, ma.Look, MobjState.SswvStnd2, 0, 0), // State.SswvStnd
+ new MobjStateDef(727, Sprite.SSWV, 1, 10, null, ma.Look, MobjState.SswvStnd, 0, 0), // State.SswvStnd2
+ new MobjStateDef(728, Sprite.SSWV, 0, 3, null, ma.Chase, MobjState.SswvRun2, 0, 0), // State.SswvRun1
+ new MobjStateDef(729, Sprite.SSWV, 0, 3, null, ma.Chase, MobjState.SswvRun3, 0, 0), // State.SswvRun2
+ new MobjStateDef(730, Sprite.SSWV, 1, 3, null, ma.Chase, MobjState.SswvRun4, 0, 0), // State.SswvRun3
+ new MobjStateDef(731, Sprite.SSWV, 1, 3, null, ma.Chase, MobjState.SswvRun5, 0, 0), // State.SswvRun4
+ new MobjStateDef(732, Sprite.SSWV, 2, 3, null, ma.Chase, MobjState.SswvRun6, 0, 0), // State.SswvRun5
+ new MobjStateDef(733, Sprite.SSWV, 2, 3, null, ma.Chase, MobjState.SswvRun7, 0, 0), // State.SswvRun6
+ new MobjStateDef(734, Sprite.SSWV, 3, 3, null, ma.Chase, MobjState.SswvRun8, 0, 0), // State.SswvRun7
+ new MobjStateDef(735, Sprite.SSWV, 3, 3, null, ma.Chase, MobjState.SswvRun1, 0, 0), // State.SswvRun8
+ new MobjStateDef(736, Sprite.SSWV, 4, 10, null, ma.FaceTarget, MobjState.SswvAtk2, 0, 0), // State.SswvAtk1
+ new MobjStateDef(737, Sprite.SSWV, 5, 10, null, ma.FaceTarget, MobjState.SswvAtk3, 0, 0), // State.SswvAtk2
+ new MobjStateDef(738, Sprite.SSWV, 32774, 4, null, ma.CPosAttack, MobjState.SswvAtk4, 0, 0), // State.SswvAtk3
+ new MobjStateDef(739, Sprite.SSWV, 5, 6, null, ma.FaceTarget, MobjState.SswvAtk5, 0, 0), // State.SswvAtk4
+ new MobjStateDef(740, Sprite.SSWV, 32774, 4, null, ma.CPosAttack, MobjState.SswvAtk6, 0, 0), // State.SswvAtk5
+ new MobjStateDef(741, Sprite.SSWV, 5, 1, null, ma.CPosRefire, MobjState.SswvAtk2, 0, 0), // State.SswvAtk6
+ new MobjStateDef(742, Sprite.SSWV, 7, 3, null, null, MobjState.SswvPain2, 0, 0), // State.SswvPain
+ new MobjStateDef(743, Sprite.SSWV, 7, 3, null, ma.Pain, MobjState.SswvRun1, 0, 0), // State.SswvPain2
+ new MobjStateDef(744, Sprite.SSWV, 8, 5, null, null, MobjState.SswvDie2, 0, 0), // State.SswvDie1
+ new MobjStateDef(745, Sprite.SSWV, 9, 5, null, ma.Scream, MobjState.SswvDie3, 0, 0), // State.SswvDie2
+ new MobjStateDef(746, Sprite.SSWV, 10, 5, null, ma.Fall, MobjState.SswvDie4, 0, 0), // State.SswvDie3
+ new MobjStateDef(747, Sprite.SSWV, 11, 5, null, null, MobjState.SswvDie5, 0, 0), // State.SswvDie4
+ new MobjStateDef(748, Sprite.SSWV, 12, -1, null, null, MobjState.Null, 0, 0), // State.SswvDie5
+ new MobjStateDef(749, Sprite.SSWV, 13, 5, null, null, MobjState.SswvXdie2, 0, 0), // State.SswvXdie1
+ new MobjStateDef(750, Sprite.SSWV, 14, 5, null, ma.XScream, MobjState.SswvXdie3, 0, 0), // State.SswvXdie2
+ new MobjStateDef(751, Sprite.SSWV, 15, 5, null, ma.Fall, MobjState.SswvXdie4, 0, 0), // State.SswvXdie3
+ new MobjStateDef(752, Sprite.SSWV, 16, 5, null, null, MobjState.SswvXdie5, 0, 0), // State.SswvXdie4
+ new MobjStateDef(753, Sprite.SSWV, 17, 5, null, null, MobjState.SswvXdie6, 0, 0), // State.SswvXdie5
+ new MobjStateDef(754, Sprite.SSWV, 18, 5, null, null, MobjState.SswvXdie7, 0, 0), // State.SswvXdie6
+ new MobjStateDef(755, Sprite.SSWV, 19, 5, null, null, MobjState.SswvXdie8, 0, 0), // State.SswvXdie7
+ new MobjStateDef(756, Sprite.SSWV, 20, 5, null, null, MobjState.SswvXdie9, 0, 0), // State.SswvXdie8
+ new MobjStateDef(757, Sprite.SSWV, 21, -1, null, null, MobjState.Null, 0, 0), // State.SswvXdie9
+ new MobjStateDef(758, Sprite.SSWV, 12, 5, null, null, MobjState.SswvRaise2, 0, 0), // State.SswvRaise1
+ new MobjStateDef(759, Sprite.SSWV, 11, 5, null, null, MobjState.SswvRaise3, 0, 0), // State.SswvRaise2
+ new MobjStateDef(760, Sprite.SSWV, 10, 5, null, null, MobjState.SswvRaise4, 0, 0), // State.SswvRaise3
+ new MobjStateDef(761, Sprite.SSWV, 9, 5, null, null, MobjState.SswvRaise5, 0, 0), // State.SswvRaise4
+ new MobjStateDef(762, Sprite.SSWV, 8, 5, null, null, MobjState.SswvRun1, 0, 0), // State.SswvRaise5
+ new MobjStateDef(763, Sprite.KEEN, 0, -1, null, null, MobjState.Keenstnd, 0, 0), // State.Keenstnd
+ new MobjStateDef(764, Sprite.KEEN, 0, 6, null, null, MobjState.Commkeen2, 0, 0), // State.Commkeen
+ new MobjStateDef(765, Sprite.KEEN, 1, 6, null, null, MobjState.Commkeen3, 0, 0), // State.Commkeen2
+ new MobjStateDef(766, Sprite.KEEN, 2, 6, null, ma.Scream, MobjState.Commkeen4, 0, 0), // State.Commkeen3
+ new MobjStateDef(767, Sprite.KEEN, 3, 6, null, null, MobjState.Commkeen5, 0, 0), // State.Commkeen4
+ new MobjStateDef(768, Sprite.KEEN, 4, 6, null, null, MobjState.Commkeen6, 0, 0), // State.Commkeen5
+ new MobjStateDef(769, Sprite.KEEN, 5, 6, null, null, MobjState.Commkeen7, 0, 0), // State.Commkeen6
+ new MobjStateDef(770, Sprite.KEEN, 6, 6, null, null, MobjState.Commkeen8, 0, 0), // State.Commkeen7
+ new MobjStateDef(771, Sprite.KEEN, 7, 6, null, null, MobjState.Commkeen9, 0, 0), // State.Commkeen8
+ new MobjStateDef(772, Sprite.KEEN, 8, 6, null, null, MobjState.Commkeen10, 0, 0), // State.Commkeen9
+ new MobjStateDef(773, Sprite.KEEN, 9, 6, null, null, MobjState.Commkeen11, 0, 0), // State.Commkeen10
+ new MobjStateDef(774, Sprite.KEEN, 10, 6, null, ma.KeenDie, MobjState.Commkeen12, 0, 0), // State.Commkeen11
+ new MobjStateDef(775, Sprite.KEEN, 11, -1, null, null, MobjState.Null, 0, 0), // State.Commkeen12
+ new MobjStateDef(776, Sprite.KEEN, 12, 4, null, null, MobjState.Keenpain2, 0, 0), // State.Keenpain
+ new MobjStateDef(777, Sprite.KEEN, 12, 8, null, ma.Pain, MobjState.Keenstnd, 0, 0), // State.Keenpain2
+ new MobjStateDef(778, Sprite.BBRN, 0, -1, null, null, MobjState.Null, 0, 0), // State.Brain
+ new MobjStateDef(779, Sprite.BBRN, 1, 36, null, ma.BrainPain, MobjState.Brain, 0, 0), // State.BrainPain
+ new MobjStateDef(780, Sprite.BBRN, 0, 100, null, ma.BrainScream, MobjState.BrainDie2, 0, 0), // State.BrainDie1
+ new MobjStateDef(781, Sprite.BBRN, 0, 10, null, null, MobjState.BrainDie3, 0, 0), // State.BrainDie2
+ new MobjStateDef(782, Sprite.BBRN, 0, 10, null, null, MobjState.BrainDie4, 0, 0), // State.BrainDie3
+ new MobjStateDef(783, Sprite.BBRN, 0, -1, null, ma.BrainDie, MobjState.Null, 0, 0), // State.BrainDie4
+ new MobjStateDef(784, Sprite.SSWV, 0, 10, null, ma.Look, MobjState.Braineye, 0, 0), // State.Braineye
+ new MobjStateDef(785, Sprite.SSWV, 0, 181, null, ma.BrainAwake, MobjState.Braineye1, 0, 0), // State.Braineyesee
+ new MobjStateDef(786, Sprite.SSWV, 0, 150, null, ma.BrainSpit, MobjState.Braineye1, 0, 0), // State.Braineye1
+ new MobjStateDef(787, Sprite.BOSF, 32768, 3, null, ma.SpawnSound, MobjState.Spawn2, 0, 0), // State.Spawn1
+ new MobjStateDef(788, Sprite.BOSF, 32769, 3, null, ma.SpawnFly, MobjState.Spawn3, 0, 0), // State.Spawn2
+ new MobjStateDef(789, Sprite.BOSF, 32770, 3, null, ma.SpawnFly, MobjState.Spawn4, 0, 0), // State.Spawn3
+ new MobjStateDef(790, Sprite.BOSF, 32771, 3, null, ma.SpawnFly, MobjState.Spawn1, 0, 0), // State.Spawn4
+ new MobjStateDef(791, Sprite.FIRE, 32768, 4, null, ma.Fire, MobjState.Spawnfire2, 0, 0), // State.Spawnfire1
+ new MobjStateDef(792, Sprite.FIRE, 32769, 4, null, ma.Fire, MobjState.Spawnfire3, 0, 0), // State.Spawnfire2
+ new MobjStateDef(793, Sprite.FIRE, 32770, 4, null, ma.Fire, MobjState.Spawnfire4, 0, 0), // State.Spawnfire3
+ new MobjStateDef(794, Sprite.FIRE, 32771, 4, null, ma.Fire, MobjState.Spawnfire5, 0, 0), // State.Spawnfire4
+ new MobjStateDef(795, Sprite.FIRE, 32772, 4, null, ma.Fire, MobjState.Spawnfire6, 0, 0), // State.Spawnfire5
+ new MobjStateDef(796, Sprite.FIRE, 32773, 4, null, ma.Fire, MobjState.Spawnfire7, 0, 0), // State.Spawnfire6
+ new MobjStateDef(797, Sprite.FIRE, 32774, 4, null, ma.Fire, MobjState.Spawnfire8, 0, 0), // State.Spawnfire7
+ new MobjStateDef(798, Sprite.FIRE, 32775, 4, null, ma.Fire, MobjState.Null, 0, 0), // State.Spawnfire8
+ new MobjStateDef(799, Sprite.MISL, 32769, 10, null, null, MobjState.Brainexplode2, 0, 0), // State.Brainexplode1
+ new MobjStateDef(800, Sprite.MISL, 32770, 10, null, null, MobjState.Brainexplode3, 0, 0), // State.Brainexplode2
+ new MobjStateDef(801, Sprite.MISL, 32771, 10, null, ma.BrainExplode, MobjState.Null, 0, 0), // State.Brainexplode3
+ new MobjStateDef(802, Sprite.ARM1, 0, 6, null, null, MobjState.Arm1A, 0, 0), // State.Arm1
+ new MobjStateDef(803, Sprite.ARM1, 32769, 7, null, null, MobjState.Arm1, 0, 0), // State.Arm1A
+ new MobjStateDef(804, Sprite.ARM2, 0, 6, null, null, MobjState.Arm2A, 0, 0), // State.Arm2
+ new MobjStateDef(805, Sprite.ARM2, 32769, 6, null, null, MobjState.Arm2, 0, 0), // State.Arm2A
+ new MobjStateDef(806, Sprite.BAR1, 0, 6, null, null, MobjState.Bar2, 0, 0), // State.Bar1
+ new MobjStateDef(807, Sprite.BAR1, 1, 6, null, null, MobjState.Bar1, 0, 0), // State.Bar2
+ new MobjStateDef(808, Sprite.BEXP, 32768, 5, null, null, MobjState.Bexp2, 0, 0), // State.Bexp
+ new MobjStateDef(809, Sprite.BEXP, 32769, 5, null, ma.Scream, MobjState.Bexp3, 0, 0), // State.Bexp2
+ new MobjStateDef(810, Sprite.BEXP, 32770, 5, null, null, MobjState.Bexp4, 0, 0), // State.Bexp3
+ new MobjStateDef(811, Sprite.BEXP, 32771, 10, null, ma.Explode, MobjState.Bexp5, 0, 0), // State.Bexp4
+ new MobjStateDef(812, Sprite.BEXP, 32772, 10, null, null, MobjState.Null, 0, 0), // State.Bexp5
+ new MobjStateDef(813, Sprite.FCAN, 32768, 4, null, null, MobjState.Bbar2, 0, 0), // State.Bbar1
+ new MobjStateDef(814, Sprite.FCAN, 32769, 4, null, null, MobjState.Bbar3, 0, 0), // State.Bbar2
+ new MobjStateDef(815, Sprite.FCAN, 32770, 4, null, null, MobjState.Bbar1, 0, 0), // State.Bbar3
+ new MobjStateDef(816, Sprite.BON1, 0, 6, null, null, MobjState.Bon1A, 0, 0), // State.Bon1
+ new MobjStateDef(817, Sprite.BON1, 1, 6, null, null, MobjState.Bon1B, 0, 0), // State.Bon1A
+ new MobjStateDef(818, Sprite.BON1, 2, 6, null, null, MobjState.Bon1C, 0, 0), // State.Bon1B
+ new MobjStateDef(819, Sprite.BON1, 3, 6, null, null, MobjState.Bon1D, 0, 0), // State.Bon1C
+ new MobjStateDef(820, Sprite.BON1, 2, 6, null, null, MobjState.Bon1E, 0, 0), // State.Bon1D
+ new MobjStateDef(821, Sprite.BON1, 1, 6, null, null, MobjState.Bon1, 0, 0), // State.Bon1E
+ new MobjStateDef(822, Sprite.BON2, 0, 6, null, null, MobjState.Bon2A, 0, 0), // State.Bon2
+ new MobjStateDef(823, Sprite.BON2, 1, 6, null, null, MobjState.Bon2B, 0, 0), // State.Bon2A
+ new MobjStateDef(824, Sprite.BON2, 2, 6, null, null, MobjState.Bon2C, 0, 0), // State.Bon2B
+ new MobjStateDef(825, Sprite.BON2, 3, 6, null, null, MobjState.Bon2D, 0, 0), // State.Bon2C
+ new MobjStateDef(826, Sprite.BON2, 2, 6, null, null, MobjState.Bon2E, 0, 0), // State.Bon2D
+ new MobjStateDef(827, Sprite.BON2, 1, 6, null, null, MobjState.Bon2, 0, 0), // State.Bon2E
+ new MobjStateDef(828, Sprite.BKEY, 0, 10, null, null, MobjState.Bkey2, 0, 0), // State.Bkey
+ new MobjStateDef(829, Sprite.BKEY, 32769, 10, null, null, MobjState.Bkey, 0, 0), // State.Bkey2
+ new MobjStateDef(830, Sprite.RKEY, 0, 10, null, null, MobjState.Rkey2, 0, 0), // State.Rkey
+ new MobjStateDef(831, Sprite.RKEY, 32769, 10, null, null, MobjState.Rkey, 0, 0), // State.Rkey2
+ new MobjStateDef(832, Sprite.YKEY, 0, 10, null, null, MobjState.Ykey2, 0, 0), // State.Ykey
+ new MobjStateDef(833, Sprite.YKEY, 32769, 10, null, null, MobjState.Ykey, 0, 0), // State.Ykey2
+ new MobjStateDef(834, Sprite.BSKU, 0, 10, null, null, MobjState.Bskull2, 0, 0), // State.Bskull
+ new MobjStateDef(835, Sprite.BSKU, 32769, 10, null, null, MobjState.Bskull, 0, 0), // State.Bskull2
+ new MobjStateDef(836, Sprite.RSKU, 0, 10, null, null, MobjState.Rskull2, 0, 0), // State.Rskull
+ new MobjStateDef(837, Sprite.RSKU, 32769, 10, null, null, MobjState.Rskull, 0, 0), // State.Rskull2
+ new MobjStateDef(838, Sprite.YSKU, 0, 10, null, null, MobjState.Yskull2, 0, 0), // State.Yskull
+ new MobjStateDef(839, Sprite.YSKU, 32769, 10, null, null, MobjState.Yskull, 0, 0), // State.Yskull2
+ new MobjStateDef(840, Sprite.STIM, 0, -1, null, null, MobjState.Null, 0, 0), // State.Stim
+ new MobjStateDef(841, Sprite.MEDI, 0, -1, null, null, MobjState.Null, 0, 0), // State.Medi
+ new MobjStateDef(842, Sprite.SOUL, 32768, 6, null, null, MobjState.Soul2, 0, 0), // State.Soul
+ new MobjStateDef(843, Sprite.SOUL, 32769, 6, null, null, MobjState.Soul3, 0, 0), // State.Soul2
+ new MobjStateDef(844, Sprite.SOUL, 32770, 6, null, null, MobjState.Soul4, 0, 0), // State.Soul3
+ new MobjStateDef(845, Sprite.SOUL, 32771, 6, null, null, MobjState.Soul5, 0, 0), // State.Soul4
+ new MobjStateDef(846, Sprite.SOUL, 32770, 6, null, null, MobjState.Soul6, 0, 0), // State.Soul5
+ new MobjStateDef(847, Sprite.SOUL, 32769, 6, null, null, MobjState.Soul, 0, 0), // State.Soul6
+ new MobjStateDef(848, Sprite.PINV, 32768, 6, null, null, MobjState.Pinv2, 0, 0), // State.Pinv
+ new MobjStateDef(849, Sprite.PINV, 32769, 6, null, null, MobjState.Pinv3, 0, 0), // State.Pinv2
+ new MobjStateDef(850, Sprite.PINV, 32770, 6, null, null, MobjState.Pinv4, 0, 0), // State.Pinv3
+ new MobjStateDef(851, Sprite.PINV, 32771, 6, null, null, MobjState.Pinv, 0, 0), // State.Pinv4
+ new MobjStateDef(852, Sprite.PSTR, 32768, -1, null, null, MobjState.Null, 0, 0), // State.Pstr
+ new MobjStateDef(853, Sprite.PINS, 32768, 6, null, null, MobjState.Pins2, 0, 0), // State.Pins
+ new MobjStateDef(854, Sprite.PINS, 32769, 6, null, null, MobjState.Pins3, 0, 0), // State.Pins2
+ new MobjStateDef(855, Sprite.PINS, 32770, 6, null, null, MobjState.Pins4, 0, 0), // State.Pins3
+ new MobjStateDef(856, Sprite.PINS, 32771, 6, null, null, MobjState.Pins, 0, 0), // State.Pins4
+ new MobjStateDef(857, Sprite.MEGA, 32768, 6, null, null, MobjState.Mega2, 0, 0), // State.Mega
+ new MobjStateDef(858, Sprite.MEGA, 32769, 6, null, null, MobjState.Mega3, 0, 0), // State.Mega2
+ new MobjStateDef(859, Sprite.MEGA, 32770, 6, null, null, MobjState.Mega4, 0, 0), // State.Mega3
+ new MobjStateDef(860, Sprite.MEGA, 32771, 6, null, null, MobjState.Mega, 0, 0), // State.Mega4
+ new MobjStateDef(861, Sprite.SUIT, 32768, -1, null, null, MobjState.Null, 0, 0), // State.Suit
+ new MobjStateDef(862, Sprite.PMAP, 32768, 6, null, null, MobjState.Pmap2, 0, 0), // State.Pmap
+ new MobjStateDef(863, Sprite.PMAP, 32769, 6, null, null, MobjState.Pmap3, 0, 0), // State.Pmap2
+ new MobjStateDef(864, Sprite.PMAP, 32770, 6, null, null, MobjState.Pmap4, 0, 0), // State.Pmap3
+ new MobjStateDef(865, Sprite.PMAP, 32771, 6, null, null, MobjState.Pmap5, 0, 0), // State.Pmap4
+ new MobjStateDef(866, Sprite.PMAP, 32770, 6, null, null, MobjState.Pmap6, 0, 0), // State.Pmap5
+ new MobjStateDef(867, Sprite.PMAP, 32769, 6, null, null, MobjState.Pmap, 0, 0), // State.Pmap6
+ new MobjStateDef(868, Sprite.PVIS, 32768, 6, null, null, MobjState.Pvis2, 0, 0), // State.Pvis
+ new MobjStateDef(869, Sprite.PVIS, 1, 6, null, null, MobjState.Pvis, 0, 0), // State.Pvis2
+ new MobjStateDef(870, Sprite.CLIP, 0, -1, null, null, MobjState.Null, 0, 0), // State.Clip
+ new MobjStateDef(871, Sprite.AMMO, 0, -1, null, null, MobjState.Null, 0, 0), // State.Ammo
+ new MobjStateDef(872, Sprite.ROCK, 0, -1, null, null, MobjState.Null, 0, 0), // State.Rock
+ new MobjStateDef(873, Sprite.BROK, 0, -1, null, null, MobjState.Null, 0, 0), // State.Brok
+ new MobjStateDef(874, Sprite.CELL, 0, -1, null, null, MobjState.Null, 0, 0), // State.Cell
+ new MobjStateDef(875, Sprite.CELP, 0, -1, null, null, MobjState.Null, 0, 0), // State.Celp
+ new MobjStateDef(876, Sprite.SHEL, 0, -1, null, null, MobjState.Null, 0, 0), // State.Shel
+ new MobjStateDef(877, Sprite.SBOX, 0, -1, null, null, MobjState.Null, 0, 0), // State.Sbox
+ new MobjStateDef(878, Sprite.BPAK, 0, -1, null, null, MobjState.Null, 0, 0), // State.Bpak
+ new MobjStateDef(879, Sprite.BFUG, 0, -1, null, null, MobjState.Null, 0, 0), // State.Bfug
+ new MobjStateDef(880, Sprite.MGUN, 0, -1, null, null, MobjState.Null, 0, 0), // State.Mgun
+ new MobjStateDef(881, Sprite.CSAW, 0, -1, null, null, MobjState.Null, 0, 0), // State.Csaw
+ new MobjStateDef(882, Sprite.LAUN, 0, -1, null, null, MobjState.Null, 0, 0), // State.Laun
+ new MobjStateDef(883, Sprite.PLAS, 0, -1, null, null, MobjState.Null, 0, 0), // State.Plas
+ new MobjStateDef(884, Sprite.SHOT, 0, -1, null, null, MobjState.Null, 0, 0), // State.Shot
+ new MobjStateDef(885, Sprite.SGN2, 0, -1, null, null, MobjState.Null, 0, 0), // State.Shot2
+ new MobjStateDef(886, Sprite.COLU, 32768, -1, null, null, MobjState.Null, 0, 0), // State.Colu
+ new MobjStateDef(887, Sprite.SMT2, 0, -1, null, null, MobjState.Null, 0, 0), // State.Stalag
+ new MobjStateDef(888, Sprite.GOR1, 0, 10, null, null, MobjState.Bloodytwitch2, 0, 0), // State.Bloodytwitch
+ new MobjStateDef(889, Sprite.GOR1, 1, 15, null, null, MobjState.Bloodytwitch3, 0, 0), // State.Bloodytwitch2
+ new MobjStateDef(890, Sprite.GOR1, 2, 8, null, null, MobjState.Bloodytwitch4, 0, 0), // State.Bloodytwitch3
+ new MobjStateDef(891, Sprite.GOR1, 1, 6, null, null, MobjState.Bloodytwitch, 0, 0), // State.Bloodytwitch4
+ new MobjStateDef(892, Sprite.PLAY, 13, -1, null, null, MobjState.Null, 0, 0), // State.Deadtorso
+ new MobjStateDef(893, Sprite.PLAY, 18, -1, null, null, MobjState.Null, 0, 0), // State.Deadbottom
+ new MobjStateDef(894, Sprite.POL2, 0, -1, null, null, MobjState.Null, 0, 0), // State.Headsonstick
+ new MobjStateDef(895, Sprite.POL5, 0, -1, null, null, MobjState.Null, 0, 0), // State.Gibs
+ new MobjStateDef(896, Sprite.POL4, 0, -1, null, null, MobjState.Null, 0, 0), // State.Headonastick
+ new MobjStateDef(897, Sprite.POL3, 32768, 6, null, null, MobjState.Headcandles2, 0, 0), // State.Headcandles
+ new MobjStateDef(898, Sprite.POL3, 32769, 6, null, null, MobjState.Headcandles, 0, 0), // State.Headcandles2
+ new MobjStateDef(899, Sprite.POL1, 0, -1, null, null, MobjState.Null, 0, 0), // State.Deadstick
+ new MobjStateDef(900, Sprite.POL6, 0, 6, null, null, MobjState.Livestick2, 0, 0), // State.Livestick
+ new MobjStateDef(901, Sprite.POL6, 1, 8, null, null, MobjState.Livestick, 0, 0), // State.Livestick2
+ new MobjStateDef(902, Sprite.GOR2, 0, -1, null, null, MobjState.Null, 0, 0), // State.Meat2
+ new MobjStateDef(903, Sprite.GOR3, 0, -1, null, null, MobjState.Null, 0, 0), // State.Meat3
+ new MobjStateDef(904, Sprite.GOR4, 0, -1, null, null, MobjState.Null, 0, 0), // State.Meat4
+ new MobjStateDef(905, Sprite.GOR5, 0, -1, null, null, MobjState.Null, 0, 0), // State.Meat5
+ new MobjStateDef(906, Sprite.SMIT, 0, -1, null, null, MobjState.Null, 0, 0), // State.Stalagtite
+ new MobjStateDef(907, Sprite.COL1, 0, -1, null, null, MobjState.Null, 0, 0), // State.Tallgrncol
+ new MobjStateDef(908, Sprite.COL2, 0, -1, null, null, MobjState.Null, 0, 0), // State.Shrtgrncol
+ new MobjStateDef(909, Sprite.COL3, 0, -1, null, null, MobjState.Null, 0, 0), // State.Tallredcol
+ new MobjStateDef(910, Sprite.COL4, 0, -1, null, null, MobjState.Null, 0, 0), // State.Shrtredcol
+ new MobjStateDef(911, Sprite.CAND, 32768, -1, null, null, MobjState.Null, 0, 0), // State.Candlestik
+ new MobjStateDef(912, Sprite.CBRA, 32768, -1, null, null, MobjState.Null, 0, 0), // State.Candelabra
+ new MobjStateDef(913, Sprite.COL6, 0, -1, null, null, MobjState.Null, 0, 0), // State.Skullcol
+ new MobjStateDef(914, Sprite.TRE1, 0, -1, null, null, MobjState.Null, 0, 0), // State.Torchtree
+ new MobjStateDef(915, Sprite.TRE2, 0, -1, null, null, MobjState.Null, 0, 0), // State.Bigtree
+ new MobjStateDef(916, Sprite.ELEC, 0, -1, null, null, MobjState.Null, 0, 0), // State.Techpillar
+ new MobjStateDef(917, Sprite.CEYE, 32768, 6, null, null, MobjState.Evileye2, 0, 0), // State.Evileye
+ new MobjStateDef(918, Sprite.CEYE, 32769, 6, null, null, MobjState.Evileye3, 0, 0), // State.Evileye2
+ new MobjStateDef(919, Sprite.CEYE, 32770, 6, null, null, MobjState.Evileye4, 0, 0), // State.Evileye3
+ new MobjStateDef(920, Sprite.CEYE, 32769, 6, null, null, MobjState.Evileye, 0, 0), // State.Evileye4
+ new MobjStateDef(921, Sprite.FSKU, 32768, 6, null, null, MobjState.Floatskull2, 0, 0), // State.Floatskull
+ new MobjStateDef(922, Sprite.FSKU, 32769, 6, null, null, MobjState.Floatskull3, 0, 0), // State.Floatskull2
+ new MobjStateDef(923, Sprite.FSKU, 32770, 6, null, null, MobjState.Floatskull, 0, 0), // State.Floatskull3
+ new MobjStateDef(924, Sprite.COL5, 0, 14, null, null, MobjState.Heartcol2, 0, 0), // State.Heartcol
+ new MobjStateDef(925, Sprite.COL5, 1, 14, null, null, MobjState.Heartcol, 0, 0), // State.Heartcol2
+ new MobjStateDef(926, Sprite.TBLU, 32768, 4, null, null, MobjState.Bluetorch2, 0, 0), // State.Bluetorch
+ new MobjStateDef(927, Sprite.TBLU, 32769, 4, null, null, MobjState.Bluetorch3, 0, 0), // State.Bluetorch2
+ new MobjStateDef(928, Sprite.TBLU, 32770, 4, null, null, MobjState.Bluetorch4, 0, 0), // State.Bluetorch3
+ new MobjStateDef(929, Sprite.TBLU, 32771, 4, null, null, MobjState.Bluetorch, 0, 0), // State.Bluetorch4
+ new MobjStateDef(930, Sprite.TGRN, 32768, 4, null, null, MobjState.Greentorch2, 0, 0), // State.Greentorch
+ new MobjStateDef(931, Sprite.TGRN, 32769, 4, null, null, MobjState.Greentorch3, 0, 0), // State.Greentorch2
+ new MobjStateDef(932, Sprite.TGRN, 32770, 4, null, null, MobjState.Greentorch4, 0, 0), // State.Greentorch3
+ new MobjStateDef(933, Sprite.TGRN, 32771, 4, null, null, MobjState.Greentorch, 0, 0), // State.Greentorch4
+ new MobjStateDef(934, Sprite.TRED, 32768, 4, null, null, MobjState.Redtorch2, 0, 0), // State.Redtorch
+ new MobjStateDef(935, Sprite.TRED, 32769, 4, null, null, MobjState.Redtorch3, 0, 0), // State.Redtorch2
+ new MobjStateDef(936, Sprite.TRED, 32770, 4, null, null, MobjState.Redtorch4, 0, 0), // State.Redtorch3
+ new MobjStateDef(937, Sprite.TRED, 32771, 4, null, null, MobjState.Redtorch, 0, 0), // State.Redtorch4
+ new MobjStateDef(938, Sprite.SMBT, 32768, 4, null, null, MobjState.Btorchshrt2, 0, 0), // State.Btorchshrt
+ new MobjStateDef(939, Sprite.SMBT, 32769, 4, null, null, MobjState.Btorchshrt3, 0, 0), // State.Btorchshrt2
+ new MobjStateDef(940, Sprite.SMBT, 32770, 4, null, null, MobjState.Btorchshrt4, 0, 0), // State.Btorchshrt3
+ new MobjStateDef(941, Sprite.SMBT, 32771, 4, null, null, MobjState.Btorchshrt, 0, 0), // State.Btorchshrt4
+ new MobjStateDef(942, Sprite.SMGT, 32768, 4, null, null, MobjState.Gtorchshrt2, 0, 0), // State.Gtorchshrt
+ new MobjStateDef(943, Sprite.SMGT, 32769, 4, null, null, MobjState.Gtorchshrt3, 0, 0), // State.Gtorchshrt2
+ new MobjStateDef(944, Sprite.SMGT, 32770, 4, null, null, MobjState.Gtorchshrt4, 0, 0), // State.Gtorchshrt3
+ new MobjStateDef(945, Sprite.SMGT, 32771, 4, null, null, MobjState.Gtorchshrt, 0, 0), // State.Gtorchshrt4
+ new MobjStateDef(946, Sprite.SMRT, 32768, 4, null, null, MobjState.Rtorchshrt2, 0, 0), // State.Rtorchshrt
+ new MobjStateDef(947, Sprite.SMRT, 32769, 4, null, null, MobjState.Rtorchshrt3, 0, 0), // State.Rtorchshrt2
+ new MobjStateDef(948, Sprite.SMRT, 32770, 4, null, null, MobjState.Rtorchshrt4, 0, 0), // State.Rtorchshrt3
+ new MobjStateDef(949, Sprite.SMRT, 32771, 4, null, null, MobjState.Rtorchshrt, 0, 0), // State.Rtorchshrt4
+ new MobjStateDef(950, Sprite.HDB1, 0, -1, null, null, MobjState.Null, 0, 0), // State.Hangnoguts
+ new MobjStateDef(951, Sprite.HDB2, 0, -1, null, null, MobjState.Null, 0, 0), // State.Hangbnobrain
+ new MobjStateDef(952, Sprite.HDB3, 0, -1, null, null, MobjState.Null, 0, 0), // State.Hangtlookdn
+ new MobjStateDef(953, Sprite.HDB4, 0, -1, null, null, MobjState.Null, 0, 0), // State.Hangtskull
+ new MobjStateDef(954, Sprite.HDB5, 0, -1, null, null, MobjState.Null, 0, 0), // State.Hangtlookup
+ new MobjStateDef(955, Sprite.HDB6, 0, -1, null, null, MobjState.Null, 0, 0), // State.Hangtnobrain
+ new MobjStateDef(956, Sprite.POB1, 0, -1, null, null, MobjState.Null, 0, 0), // State.Colongibs
+ new MobjStateDef(957, Sprite.POB2, 0, -1, null, null, MobjState.Null, 0, 0), // State.Smallpool
+ new MobjStateDef(958, Sprite.BRS1, 0, -1, null, null, MobjState.Null, 0, 0), // State.Brainstem
+ new MobjStateDef(959, Sprite.TLMP, 32768, 4, null, null, MobjState.Techlamp2, 0, 0), // State.Techlamp
+ new MobjStateDef(960, Sprite.TLMP, 32769, 4, null, null, MobjState.Techlamp3, 0, 0), // State.Techlamp2
+ new MobjStateDef(961, Sprite.TLMP, 32770, 4, null, null, MobjState.Techlamp4, 0, 0), // State.Techlamp3
+ new MobjStateDef(962, Sprite.TLMP, 32771, 4, null, null, MobjState.Techlamp, 0, 0), // State.Techlamp4
+ new MobjStateDef(963, Sprite.TLP2, 32768, 4, null, null, MobjState.Tech2Lamp2, 0, 0), // State.Tech2Lamp
+ new MobjStateDef(964, Sprite.TLP2, 32769, 4, null, null, MobjState.Tech2Lamp3, 0, 0), // State.Tech2Lamp2
+ new MobjStateDef(965, Sprite.TLP2, 32770, 4, null, null, MobjState.Tech2Lamp4, 0, 0), // State.Tech2Lamp3
+ new MobjStateDef(966, Sprite.TLP2, 32771, 4, null, null, MobjState.Tech2Lamp, 0, 0) // State.Tech2Lamp4
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.Strings.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.Strings.cs
new file mode 100644
index 00000000..a709e2c8
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.Strings.cs
@@ -0,0 +1,545 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static class Strings
+ {
+ public static readonly DoomString PRESSKEY = new DoomString("press a key.");
+ public static readonly DoomString PRESSYN = new DoomString("press y or n.");
+ public static readonly DoomString QUITMSG = new DoomString("are you sure you want to\nquit this great game?");
+ public static readonly DoomString LOADNET = new DoomString("you can't do load while in a net game!\n\n" + PRESSKEY);
+ public static readonly DoomString QLOADNET = new DoomString("you can't quickload during a netgame!\n\n" + PRESSKEY);
+ public static readonly DoomString QSAVESPOT = new DoomString("you haven't picked a quicksave slot yet!\n\n" + PRESSKEY);
+ public static readonly DoomString SAVEDEAD = new DoomString("you can't save if you aren't playing!\n\n" + PRESSKEY);
+ public static readonly DoomString QSPROMPT = new DoomString("quicksave over your game named\n\n'%s'?\n\n" + PRESSYN);
+ public static readonly DoomString QLPROMPT = new DoomString("do you want to quickload the game named\n\n'%s'?\n\n" + PRESSYN);
+
+ public static readonly DoomString NEWGAME = new DoomString(
+ "you can't start a new game\n" +
+ "while in a network game.\n\n" + PRESSKEY);
+
+ public static readonly DoomString NIGHTMARE = new DoomString(
+ "are you sure? this skill level\n" +
+ "isn't even remotely fair.\n\n" + PRESSYN);
+
+ public static readonly DoomString SWSTRING = new DoomString(
+ "this is the shareware version of doom.\n\n" +
+ "you need to order the entire trilogy.\n\n" + PRESSKEY);
+
+ public static readonly DoomString MSGOFF = new DoomString("Messages OFF");
+ public static readonly DoomString MSGON = new DoomString("Messages ON");
+ public static readonly DoomString NETEND = new DoomString("you can't end a netgame!\n\n" + PRESSKEY);
+ public static readonly DoomString ENDGAME = new DoomString("are you sure you want to end the game?\n\n" + PRESSYN);
+ public static readonly DoomString DOSY = new DoomString("(press y to quit)");
+ public static readonly DoomString GAMMALVL0 = new DoomString("Gamma correction OFF");
+ public static readonly DoomString GAMMALVL1 = new DoomString("Gamma correction level 1");
+ public static readonly DoomString GAMMALVL2 = new DoomString("Gamma correction level 2");
+ public static readonly DoomString GAMMALVL3 = new DoomString("Gamma correction level 3");
+ public static readonly DoomString GAMMALVL4 = new DoomString("Gamma correction level 4");
+ public static readonly DoomString EMPTYSTRING = new DoomString("empty slot");
+ public static readonly DoomString GOTARMOR = new DoomString("Picked up the armor.");
+ public static readonly DoomString GOTMEGA = new DoomString("Picked up the MegaArmor!");
+ public static readonly DoomString GOTHTHBONUS = new DoomString("Picked up a health bonus.");
+ public static readonly DoomString GOTARMBONUS = new DoomString("Picked up an armor bonus.");
+ public static readonly DoomString GOTSTIM = new DoomString("Picked up a stimpack.");
+ public static readonly DoomString GOTMEDINEED = new DoomString("Picked up a medikit that you REALLY need!");
+ public static readonly DoomString GOTMEDIKIT = new DoomString("Picked up a medikit.");
+ public static readonly DoomString GOTSUPER = new DoomString("Supercharge!");
+ public static readonly DoomString GOTBLUECARD = new DoomString("Picked up a blue keycard.");
+ public static readonly DoomString GOTYELWCARD = new DoomString("Picked up a yellow keycard.");
+ public static readonly DoomString GOTREDCARD = new DoomString("Picked up a red keycard.");
+ public static readonly DoomString GOTBLUESKUL = new DoomString("Picked up a blue skull key.");
+ public static readonly DoomString GOTYELWSKUL = new DoomString("Picked up a yellow skull key.");
+ public static readonly DoomString GOTREDSKULL = new DoomString("Picked up a red skull key.");
+ public static readonly DoomString GOTINVUL = new DoomString("Invulnerability!");
+ public static readonly DoomString GOTBERSERK = new DoomString("Berserk!");
+ public static readonly DoomString GOTINVIS = new DoomString("Partial Invisibility");
+ public static readonly DoomString GOTSUIT = new DoomString("Radiation Shielding Suit");
+ public static readonly DoomString GOTMAP = new DoomString("Computer Area Map");
+ public static readonly DoomString GOTVISOR = new DoomString("Light Amplification Visor");
+ public static readonly DoomString GOTMSPHERE = new DoomString("MegaSphere!");
+ public static readonly DoomString GOTCLIP = new DoomString("Picked up a clip.");
+ public static readonly DoomString GOTCLIPBOX = new DoomString("Picked up a box of bullets.");
+ public static readonly DoomString GOTROCKET = new DoomString("Picked up a rocket.");
+ public static readonly DoomString GOTROCKBOX = new DoomString("Picked up a box of rockets.");
+ public static readonly DoomString GOTCELL = new DoomString("Picked up an energy cell.");
+ public static readonly DoomString GOTCELLBOX = new DoomString("Picked up an energy cell pack.");
+ public static readonly DoomString GOTSHELLS = new DoomString("Picked up 4 shotgun shells.");
+ public static readonly DoomString GOTSHELLBOX = new DoomString("Picked up a box of shotgun shells.");
+ public static readonly DoomString GOTBACKPACK = new DoomString("Picked up a backpack full of ammo!");
+ public static readonly DoomString GOTBFG9000 = new DoomString("You got the BFG9000! Oh, yes.");
+ public static readonly DoomString GOTCHAINGUN = new DoomString("You got the chaingun!");
+ public static readonly DoomString GOTCHAINSAW = new DoomString("A chainsaw! Find some meat!");
+ public static readonly DoomString GOTLAUNCHER = new DoomString("You got the rocket launcher!");
+ public static readonly DoomString GOTPLASMA = new DoomString("You got the plasma gun!");
+ public static readonly DoomString GOTSHOTGUN = new DoomString("You got the shotgun!");
+ public static readonly DoomString GOTSHOTGUN2 = new DoomString("You got the super shotgun!");
+ public static readonly DoomString PD_BLUEO = new DoomString("You need a blue key to activate this object");
+ public static readonly DoomString PD_REDO = new DoomString("You need a red key to activate this object");
+ public static readonly DoomString PD_YELLOWO = new DoomString("You need a yellow key to activate this object");
+ public static readonly DoomString PD_BLUEK = new DoomString("You need a blue key to open this door");
+ public static readonly DoomString PD_REDK = new DoomString("You need a red key to open this door");
+ public static readonly DoomString PD_YELLOWK = new DoomString("You need a yellow key to open this door");
+ public static readonly DoomString GGSAVED = new DoomString("game saved.");
+ public static readonly DoomString HUSTR_E1M1 = new DoomString("E1M1: Hangar");
+ public static readonly DoomString HUSTR_E1M2 = new DoomString("E1M2: Nuclear Plant");
+ public static readonly DoomString HUSTR_E1M3 = new DoomString("E1M3: Toxin Refinery");
+ public static readonly DoomString HUSTR_E1M4 = new DoomString("E1M4: Command Control");
+ public static readonly DoomString HUSTR_E1M5 = new DoomString("E1M5: Phobos Lab");
+ public static readonly DoomString HUSTR_E1M6 = new DoomString("E1M6: Central Processing");
+ public static readonly DoomString HUSTR_E1M7 = new DoomString("E1M7: Computer Station");
+ public static readonly DoomString HUSTR_E1M8 = new DoomString("E1M8: Phobos Anomaly");
+ public static readonly DoomString HUSTR_E1M9 = new DoomString("E1M9: Military Base");
+ public static readonly DoomString HUSTR_E2M1 = new DoomString("E2M1: Deimos Anomaly");
+ public static readonly DoomString HUSTR_E2M2 = new DoomString("E2M2: Containment Area");
+ public static readonly DoomString HUSTR_E2M3 = new DoomString("E2M3: Refinery");
+ public static readonly DoomString HUSTR_E2M4 = new DoomString("E2M4: Deimos Lab");
+ public static readonly DoomString HUSTR_E2M5 = new DoomString("E2M5: Command Center");
+ public static readonly DoomString HUSTR_E2M6 = new DoomString("E2M6: Halls of the Damned");
+ public static readonly DoomString HUSTR_E2M7 = new DoomString("E2M7: Spawning Vats");
+ public static readonly DoomString HUSTR_E2M8 = new DoomString("E2M8: Tower of Babel");
+ public static readonly DoomString HUSTR_E2M9 = new DoomString("E2M9: Fortress of Mystery");
+ public static readonly DoomString HUSTR_E3M1 = new DoomString("E3M1: Hell Keep");
+ public static readonly DoomString HUSTR_E3M2 = new DoomString("E3M2: Slough of Despair");
+ public static readonly DoomString HUSTR_E3M3 = new DoomString("E3M3: Pandemonium");
+ public static readonly DoomString HUSTR_E3M4 = new DoomString("E3M4: House of Pain");
+ public static readonly DoomString HUSTR_E3M5 = new DoomString("E3M5: Unholy Cathedral");
+ public static readonly DoomString HUSTR_E3M6 = new DoomString("E3M6: Mt. Erebus");
+ public static readonly DoomString HUSTR_E3M7 = new DoomString("E3M7: Limbo");
+ public static readonly DoomString HUSTR_E3M8 = new DoomString("E3M8: Dis");
+ public static readonly DoomString HUSTR_E3M9 = new DoomString("E3M9: Warrens");
+ public static readonly DoomString HUSTR_E4M1 = new DoomString("E4M1: Hell Beneath");
+ public static readonly DoomString HUSTR_E4M2 = new DoomString("E4M2: Perfect Hatred");
+ public static readonly DoomString HUSTR_E4M3 = new DoomString("E4M3: Sever The Wicked");
+ public static readonly DoomString HUSTR_E4M4 = new DoomString("E4M4: Unruly Evil");
+ public static readonly DoomString HUSTR_E4M5 = new DoomString("E4M5: They Will Repent");
+ public static readonly DoomString HUSTR_E4M6 = new DoomString("E4M6: Against Thee Wickedly");
+ public static readonly DoomString HUSTR_E4M7 = new DoomString("E4M7: And Hell Followed");
+ public static readonly DoomString HUSTR_E4M8 = new DoomString("E4M8: Unto The Cruel");
+ public static readonly DoomString HUSTR_E4M9 = new DoomString("E4M9: Fear");
+ public static readonly DoomString HUSTR_1 = new DoomString("level 1: entryway");
+ public static readonly DoomString HUSTR_2 = new DoomString("level 2: underhalls");
+ public static readonly DoomString HUSTR_3 = new DoomString("level 3: the gantlet");
+ public static readonly DoomString HUSTR_4 = new DoomString("level 4: the focus");
+ public static readonly DoomString HUSTR_5 = new DoomString("level 5: the waste tunnels");
+ public static readonly DoomString HUSTR_6 = new DoomString("level 6: the crusher");
+ public static readonly DoomString HUSTR_7 = new DoomString("level 7: dead simple");
+ public static readonly DoomString HUSTR_8 = new DoomString("level 8: tricks and traps");
+ public static readonly DoomString HUSTR_9 = new DoomString("level 9: the pit");
+ public static readonly DoomString HUSTR_10 = new DoomString("level 10: refueling base");
+ public static readonly DoomString HUSTR_11 = new DoomString("level 11: 'o' of destruction!");
+ public static readonly DoomString HUSTR_12 = new DoomString("level 12: the factory");
+ public static readonly DoomString HUSTR_13 = new DoomString("level 13: downtown");
+ public static readonly DoomString HUSTR_14 = new DoomString("level 14: the inmost dens");
+ public static readonly DoomString HUSTR_15 = new DoomString("level 15: industrial zone");
+ public static readonly DoomString HUSTR_16 = new DoomString("level 16: suburbs");
+ public static readonly DoomString HUSTR_17 = new DoomString("level 17: tenements");
+ public static readonly DoomString HUSTR_18 = new DoomString("level 18: the courtyard");
+ public static readonly DoomString HUSTR_19 = new DoomString("level 19: the citadel");
+ public static readonly DoomString HUSTR_20 = new DoomString("level 20: gotcha!");
+ public static readonly DoomString HUSTR_21 = new DoomString("level 21: nirvana");
+ public static readonly DoomString HUSTR_22 = new DoomString("level 22: the catacombs");
+ public static readonly DoomString HUSTR_23 = new DoomString("level 23: barrels o' fun");
+ public static readonly DoomString HUSTR_24 = new DoomString("level 24: the chasm");
+ public static readonly DoomString HUSTR_25 = new DoomString("level 25: bloodfalls");
+ public static readonly DoomString HUSTR_26 = new DoomString("level 26: the abandoned mines");
+ public static readonly DoomString HUSTR_27 = new DoomString("level 27: monster condo");
+ public static readonly DoomString HUSTR_28 = new DoomString("level 28: the spirit world");
+ public static readonly DoomString HUSTR_29 = new DoomString("level 29: the living end");
+ public static readonly DoomString HUSTR_30 = new DoomString("level 30: icon of sin");
+ public static readonly DoomString HUSTR_31 = new DoomString("level 31: wolfenstein");
+ public static readonly DoomString HUSTR_32 = new DoomString("level 32: grosse");
+ public static readonly DoomString PHUSTR_1 = new DoomString("level 1: congo");
+ public static readonly DoomString PHUSTR_2 = new DoomString("level 2: well of souls");
+ public static readonly DoomString PHUSTR_3 = new DoomString("level 3: aztec");
+ public static readonly DoomString PHUSTR_4 = new DoomString("level 4: caged");
+ public static readonly DoomString PHUSTR_5 = new DoomString("level 5: ghost town");
+ public static readonly DoomString PHUSTR_6 = new DoomString("level 6: baron's lair");
+ public static readonly DoomString PHUSTR_7 = new DoomString("level 7: caughtyard");
+ public static readonly DoomString PHUSTR_8 = new DoomString("level 8: realm");
+ public static readonly DoomString PHUSTR_9 = new DoomString("level 9: abattoire");
+ public static readonly DoomString PHUSTR_10 = new DoomString("level 10: onslaught");
+ public static readonly DoomString PHUSTR_11 = new DoomString("level 11: hunted");
+ public static readonly DoomString PHUSTR_12 = new DoomString("level 12: speed");
+ public static readonly DoomString PHUSTR_13 = new DoomString("level 13: the crypt");
+ public static readonly DoomString PHUSTR_14 = new DoomString("level 14: genesis");
+ public static readonly DoomString PHUSTR_15 = new DoomString("level 15: the twilight");
+ public static readonly DoomString PHUSTR_16 = new DoomString("level 16: the omen");
+ public static readonly DoomString PHUSTR_17 = new DoomString("level 17: compound");
+ public static readonly DoomString PHUSTR_18 = new DoomString("level 18: neurosphere");
+ public static readonly DoomString PHUSTR_19 = new DoomString("level 19: nme");
+ public static readonly DoomString PHUSTR_20 = new DoomString("level 20: the death domain");
+ public static readonly DoomString PHUSTR_21 = new DoomString("level 21: slayer");
+ public static readonly DoomString PHUSTR_22 = new DoomString("level 22: impossible mission");
+ public static readonly DoomString PHUSTR_23 = new DoomString("level 23: tombstone");
+ public static readonly DoomString PHUSTR_24 = new DoomString("level 24: the final frontier");
+ public static readonly DoomString PHUSTR_25 = new DoomString("level 25: the temple of darkness");
+ public static readonly DoomString PHUSTR_26 = new DoomString("level 26: bunker");
+ public static readonly DoomString PHUSTR_27 = new DoomString("level 27: anti-christ");
+ public static readonly DoomString PHUSTR_28 = new DoomString("level 28: the sewers");
+ public static readonly DoomString PHUSTR_29 = new DoomString("level 29: odyssey of noises");
+ public static readonly DoomString PHUSTR_30 = new DoomString("level 30: the gateway of hell");
+ public static readonly DoomString PHUSTR_31 = new DoomString("level 31: cyberden");
+ public static readonly DoomString PHUSTR_32 = new DoomString("level 32: go 2 it");
+ public static readonly DoomString THUSTR_1 = new DoomString("level 1: system control");
+ public static readonly DoomString THUSTR_2 = new DoomString("level 2: human bbq");
+ public static readonly DoomString THUSTR_3 = new DoomString("level 3: power control");
+ public static readonly DoomString THUSTR_4 = new DoomString("level 4: wormhole");
+ public static readonly DoomString THUSTR_5 = new DoomString("level 5: hanger");
+ public static readonly DoomString THUSTR_6 = new DoomString("level 6: open season");
+ public static readonly DoomString THUSTR_7 = new DoomString("level 7: prison");
+ public static readonly DoomString THUSTR_8 = new DoomString("level 8: metal");
+ public static readonly DoomString THUSTR_9 = new DoomString("level 9: stronghold");
+ public static readonly DoomString THUSTR_10 = new DoomString("level 10: redemption");
+ public static readonly DoomString THUSTR_11 = new DoomString("level 11: storage facility");
+ public static readonly DoomString THUSTR_12 = new DoomString("level 12: crater");
+ public static readonly DoomString THUSTR_13 = new DoomString("level 13: nukage processing");
+ public static readonly DoomString THUSTR_14 = new DoomString("level 14: steel works");
+ public static readonly DoomString THUSTR_15 = new DoomString("level 15: dead zone");
+ public static readonly DoomString THUSTR_16 = new DoomString("level 16: deepest reaches");
+ public static readonly DoomString THUSTR_17 = new DoomString("level 17: processing area");
+ public static readonly DoomString THUSTR_18 = new DoomString("level 18: mill");
+ public static readonly DoomString THUSTR_19 = new DoomString("level 19: shipping/respawning");
+ public static readonly DoomString THUSTR_20 = new DoomString("level 20: central processing");
+ public static readonly DoomString THUSTR_21 = new DoomString("level 21: administration center");
+ public static readonly DoomString THUSTR_22 = new DoomString("level 22: habitat");
+ public static readonly DoomString THUSTR_23 = new DoomString("level 23: lunar mining project");
+ public static readonly DoomString THUSTR_24 = new DoomString("level 24: quarry");
+ public static readonly DoomString THUSTR_25 = new DoomString("level 25: baron's den");
+ public static readonly DoomString THUSTR_26 = new DoomString("level 26: ballistyx");
+ public static readonly DoomString THUSTR_27 = new DoomString("level 27: mount pain");
+ public static readonly DoomString THUSTR_28 = new DoomString("level 28: heck");
+ public static readonly DoomString THUSTR_29 = new DoomString("level 29: river styx");
+ public static readonly DoomString THUSTR_30 = new DoomString("level 30: last call");
+ public static readonly DoomString THUSTR_31 = new DoomString("level 31: pharaoh");
+ public static readonly DoomString THUSTR_32 = new DoomString("level 32: caribbean");
+ public static readonly DoomString AMSTR_FOLLOWON = new DoomString("Follow Mode ON");
+ public static readonly DoomString AMSTR_FOLLOWOFF = new DoomString("Follow Mode OFF");
+ public static readonly DoomString AMSTR_GRIDON = new DoomString("Grid ON");
+ public static readonly DoomString AMSTR_GRIDOFF = new DoomString("Grid OFF");
+ public static readonly DoomString AMSTR_MARKEDSPOT = new DoomString("Marked Spot");
+ public static readonly DoomString AMSTR_MARKSCLEARED = new DoomString("All Marks Cleared");
+ public static readonly DoomString STSTR_MUS = new DoomString("Music Change");
+ public static readonly DoomString STSTR_NOMUS = new DoomString("IMPOSSIBLE SELECTION");
+ public static readonly DoomString STSTR_DQDON = new DoomString("Degreelessness Mode On");
+ public static readonly DoomString STSTR_DQDOFF = new DoomString("Degreelessness Mode Off");
+ public static readonly DoomString STSTR_KFAADDED = new DoomString("Very Happy Ammo Added");
+ public static readonly DoomString STSTR_FAADDED = new DoomString("Ammo (no keys) Added");
+ public static readonly DoomString STSTR_NCON = new DoomString("No Clipping Mode ON");
+ public static readonly DoomString STSTR_NCOFF = new DoomString("No Clipping Mode OFF");
+ public static readonly DoomString STSTR_BEHOLD = new DoomString("inVuln, Str, Inviso, Rad, Allmap, or Lite-amp");
+ public static readonly DoomString STSTR_BEHOLDX = new DoomString("Power-up Toggled");
+ public static readonly DoomString STSTR_CHOPPERS = new DoomString("... doesn't suck - GM");
+ public static readonly DoomString STSTR_CLEV = new DoomString("Changing Level...");
+
+ public static readonly DoomString E1TEXT = new DoomString(
+ "Once you beat the big badasses and\n" +
+ "clean out the moon base you're supposed\n" +
+ "to win, aren't you? Aren't you? Where's\n" +
+ "your fat reward and ticket home? What\n" +
+ "the hell is this? It's not supposed to\n" +
+ "end this way!\n" +
+ "\n" +
+ "It stinks like rotten meat, but looks\n" +
+ "like the lost Deimos base. Looks like\n" +
+ "you're stuck on The Shores of Hell.\n" +
+ "The only way out is through.\n" +
+ "\n" +
+ "To continue the DOOM experience, play\n" +
+ "The Shores of Hell and its amazing\n" +
+ "sequel, Inferno!\n");
+
+ public static readonly DoomString E2TEXT = new DoomString(
+ "You've done it! The hideous cyber-\n" +
+ "demon lord that ruled the lost Deimos\n" +
+ "moon base has been slain and you\n" +
+ "are triumphant! But ... where are\n" +
+ "you? You clamber to the edge of the\n" +
+ "moon and look down to see the awful\n" +
+ "truth.\n" +
+ "\n" +
+ "Deimos floats above Hell itself!\n" +
+ "You've never heard of anyone escaping\n" +
+ "from Hell, but you'll make the bastards\n" +
+ "sorry they ever heard of you! Quickly,\n" +
+ "you rappel down to the surface of\n" +
+ "Hell.\n" +
+ "\n" +
+ "Now, it's on to the final chapter of\n" +
+ "DOOM! -- Inferno.");
+
+ public static readonly DoomString E3TEXT = new DoomString(
+ "The loathsome spiderdemon that\n" +
+ "masterminded the invasion of the moon\n" +
+ "bases and caused so much death has had\n" +
+ "its ass kicked for all time.\n" +
+ "\n" +
+ "A hidden doorway opens and you enter.\n" +
+ "You've proven too tough for Hell to\n" +
+ "contain, and now Hell at last plays\n" +
+ "fair -- for you emerge from the door\n" +
+ "to see the green fields of Earth!\n" +
+ "Home at last.\n" +
+ "\n" +
+ "You wonder what's been happening on\n" +
+ "Earth while you were battling evil\n" +
+ "unleashed. It's good that no Hell-\n" +
+ "spawn could have come through that\n" +
+ "door with you ...");
+
+ public static readonly DoomString E4TEXT = new DoomString(
+ "the spider mastermind must have sent forth\n" +
+ "its legions of hellspawn before your\n" +
+ "final confrontation with that terrible\n" +
+ "beast from hell. but you stepped forward\n" +
+ "and brought forth eternal damnation and\n" +
+ "suffering upon the horde as a true hero\n" +
+ "would in the face of something so evil.\n" +
+ "\n" +
+ "besides, someone was gonna pay for what\n" +
+ "happened to daisy, your pet rabbit.\n" +
+ "\n" +
+ "but now, you see spread before you more\n" +
+ "potential pain and gibbitude as a nation\n" +
+ "of demons run amok among our cities.\n" +
+ "\n" +
+ "next stop, hell on earth!");
+
+ public static readonly DoomString C1TEXT = new DoomString(
+ "YOU HAVE ENTERED DEEPLY INTO THE INFESTED\n" +
+ "STARPORT. BUT SOMETHING IS WRONG. THE\n" +
+ "MONSTERS HAVE BROUGHT THEIR OWN REALITY\n" +
+ "WITH THEM, AND THE STARPORT'S TECHNOLOGY\n" +
+ "IS BEING SUBVERTED BY THEIR PRESENCE.\n" +
+ "\n" +
+ "AHEAD, YOU SEE AN OUTPOST OF HELL, A\n" +
+ "FORTIFIED ZONE. IF YOU CAN GET PAST IT,\n" +
+ "YOU CAN PENETRATE INTO THE HAUNTED HEART\n" +
+ "OF THE STARBASE AND FIND THE CONTROLLING\n" +
+ "SWITCH WHICH HOLDS EARTH'S POPULATION\n" +
+ "HOSTAGE.");
+
+ public static readonly DoomString C2TEXT = new DoomString(
+ "YOU HAVE WON! YOUR VICTORY HAS ENABLED\n" +
+ "HUMANKIND TO EVACUATE EARTH AND ESCAPE\n" +
+ "THE NIGHTMARE. NOW YOU ARE THE ONLY\n" +
+ "HUMAN LEFT ON THE FACE OF THE PLANET.\n" +
+ "CANNIBAL MUTATIONS, CARNIVOROUS ALIENS,\n" +
+ "AND EVIL SPIRITS ARE YOUR ONLY NEIGHBORS.\n" +
+ "YOU SIT BACK AND WAIT FOR DEATH, CONTENT\n" +
+ "THAT YOU HAVE SAVED YOUR SPECIES.\n" +
+ "\n" +
+ "BUT THEN, EARTH CONTROL BEAMS DOWN A\n" +
+ "MESSAGE FROM SPACE: \"SENSORS HAVE LOCATED\n" +
+ "THE SOURCE OF THE ALIEN INVASION. IF YOU\n" +
+ "GO THERE, YOU MAY BE ABLE TO BLOCK THEIR\n" +
+ "ENTRY. THE ALIEN BASE IS IN THE HEART OF\n" +
+ "YOUR OWN HOME CITY, NOT FAR FROM THE\n" +
+ "STARPORT.\" SLOWLY AND PAINFULLY YOU GET\n" +
+ "UP AND RETURN TO THE FRAY.");
+
+ public static readonly DoomString C3TEXT = new DoomString(
+ "YOU ARE AT THE CORRUPT HEART OF THE CITY,\n" +
+ "SURROUNDED BY THE CORPSES OF YOUR ENEMIES.\n" +
+ "YOU SEE NO WAY TO DESTROY THE CREATURES'\n" +
+ "ENTRYWAY ON THIS SIDE, SO YOU CLENCH YOUR\n" +
+ "TEETH AND PLUNGE THROUGH IT.\n" +
+ "\n" +
+ "THERE MUST BE A WAY TO CLOSE IT ON THE\n" +
+ "OTHER SIDE. WHAT DO YOU CARE IF YOU'VE\n" +
+ "GOT TO GO THROUGH HELL TO GET TO IT?");
+
+ public static readonly DoomString C4TEXT = new DoomString(
+ "THE HORRENDOUS VISAGE OF THE BIGGEST\n" +
+ "DEMON YOU'VE EVER SEEN CRUMBLES BEFORE\n" +
+ "YOU, AFTER YOU PUMP YOUR ROCKETS INTO\n" +
+ "HIS EXPOSED BRAIN. THE MONSTER SHRIVELS\n" +
+ "UP AND DIES, ITS THRASHING LIMBS\n" +
+ "DEVASTATING UNTOLD MILES OF HELL'S\n" +
+ "SURFACE.\n" +
+ "\n" +
+ "YOU'VE DONE IT. THE INVASION IS OVER.\n" +
+ "EARTH IS SAVED. HELL IS A WRECK. YOU\n" +
+ "WONDER WHERE BAD FOLKS WILL GO WHEN THEY\n" +
+ "DIE, NOW. WIPING THE SWEAT FROM YOUR\n" +
+ "FOREHEAD YOU BEGIN THE LONG TREK BACK\n" +
+ "HOME. REBUILDING EARTH OUGHT TO BE A\n" +
+ "LOT MORE FUN THAN RUINING IT WAS.\n");
+
+ public static readonly DoomString C5TEXT = new DoomString(
+ "CONGRATULATIONS, YOU'VE FOUND THE SECRET\n" +
+ "LEVEL! LOOKS LIKE IT'S BEEN BUILT BY\n" +
+ "HUMANS, RATHER THAN DEMONS. YOU WONDER\n" +
+ "WHO THE INMATES OF THIS CORNER OF HELL\n" +
+ "WILL BE.");
+
+ public static readonly DoomString C6TEXT = new DoomString(
+ "CONGRATULATIONS, YOU'VE FOUND THE\n" +
+ "SUPER SECRET LEVEL! YOU'D BETTER\n" +
+ "BLAZE THROUGH THIS ONE!\n");
+
+ public static readonly DoomString P1TEXT = new DoomString(
+ "You gloat over the steaming carcass of the\n" +
+ "Guardian. With its death, you've wrested\n" +
+ "the Accelerator from the stinking claws\n" +
+ "of Hell. You relax and glance around the\n" +
+ "room. Damn! There was supposed to be at\n" +
+ "least one working prototype, but you can't\n" +
+ "see it. The demons must have taken it.\n" +
+ "\n" +
+ "You must find the prototype, or all your\n" +
+ "struggles will have been wasted. Keep\n" +
+ "moving, keep fighting, keep killing.\n" +
+ "Oh yes, keep living, too.");
+
+ public static readonly DoomString P2TEXT = new DoomString(
+ "Even the deadly Arch-Vile labyrinth could\n" +
+ "not stop you, and you've gotten to the\n" +
+ "prototype Accelerator which is soon\n" +
+ "efficiently and permanently deactivated.\n" +
+ "\n" +
+ "You're good at that kind of thing.");
+
+ public static readonly DoomString P3TEXT = new DoomString(
+ "You've bashed and battered your way into\n" +
+ "the heart of the devil-hive. Time for a\n" +
+ "Search-and-Destroy mission, aimed at the\n" +
+ "Gatekeeper, whose foul offspring is\n" +
+ "cascading to Earth. Yeah, he's bad. But\n" +
+ "you know who's worse!\n" +
+ "\n" +
+ "Grinning evilly, you check your gear, and\n" +
+ "get ready to give the bastard a little Hell\n" +
+ "of your own making!");
+
+ public static readonly DoomString P4TEXT = new DoomString(
+ "The Gatekeeper's evil face is splattered\n" +
+ "all over the place. As its tattered corpse\n" +
+ "collapses, an inverted Gate forms and\n" +
+ "sucks down the shards of the last\n" +
+ "prototype Accelerator, not to mention the\n" +
+ "few remaining demons. You're done. Hell\n" +
+ "has gone back to pounding bad dead folks \n" +
+ "instead of good live ones. Remember to\n" +
+ "tell your grandkids to put a rocket\n" +
+ "launcher in your coffin. If you go to Hell\n" +
+ "when you die, you'll need it for some\n" +
+ "final cleaning-up ...");
+
+ public static readonly DoomString P5TEXT = new DoomString(
+ "You've found the second-hardest level we\n" +
+ "got. Hope you have a saved game a level or\n" +
+ "two previous. If not, be prepared to die\n" +
+ "aplenty. For master marines only.");
+
+ public static readonly DoomString P6TEXT = new DoomString(
+ "Betcha wondered just what WAS the hardest\n" +
+ "level we had ready for ya? Now you know.\n" +
+ "No one gets out alive.");
+
+ public static readonly DoomString T1TEXT = new DoomString(
+ "You've fought your way out of the infested\n" +
+ "experimental labs. It seems that UAC has\n" +
+ "once again gulped it down. With their\n" +
+ "high turnover, it must be hard for poor\n" +
+ "old UAC to buy corporate health insurance\n" +
+ "nowadays..\n" +
+ "\n" +
+ "Ahead lies the military complex, now\n" +
+ "swarming with diseased horrors hot to get\n" +
+ "their teeth into you. With luck, the\n" +
+ "complex still has some warlike ordnance\n" +
+ "laying around.");
+
+ public static readonly DoomString T2TEXT = new DoomString(
+ "You hear the grinding of heavy machinery\n" +
+ "ahead. You sure hope they're not stamping\n" +
+ "out new hellspawn, but you're ready to\n" +
+ "ream out a whole herd if you have to.\n" +
+ "They might be planning a blood feast, but\n" +
+ "you feel about as mean as two thousand\n" +
+ "maniacs packed into one mad killer.\n" +
+ "\n" +
+ "You don't plan to go down easy.");
+
+ public static readonly DoomString T3TEXT = new DoomString(
+ "The vista opening ahead looks real damn\n" +
+ "familiar. Smells familiar, too -- like\n" +
+ "fried excrement. You didn't like this\n" +
+ "place before, and you sure as hell ain't\n" +
+ "planning to like it now. The more you\n" +
+ "brood on it, the madder you get.\n" +
+ "Hefting your gun, an evil grin trickles\n" +
+ "onto your face. Time to take some names.");
+
+ public static readonly DoomString T4TEXT = new DoomString(
+ "Suddenly, all is silent, from one horizon\n" +
+ "to the other. The agonizing echo of Hell\n" +
+ "fades away, the nightmare sky turns to\n" +
+ "blue, the heaps of monster corpses start \n" +
+ "to evaporate along with the evil stench \n" +
+ "that filled the air. Jeeze, maybe you've\n" +
+ "done it. Have you really won?\n" +
+ "\n" +
+ "Something rumbles in the distance.\n" +
+ "A blue light begins to glow inside the\n" +
+ "ruined skull of the demon-spitter.");
+
+ public static readonly DoomString T5TEXT = new DoomString(
+ "What now? Looks totally different. Kind\n" +
+ "of like King Tut's condo. Well,\n" +
+ "whatever's here can't be any worse\n" +
+ "than usual. Can it? Or maybe it's best\n" +
+ "to let sleeping gods lie..");
+
+ public static readonly DoomString T6TEXT = new DoomString(
+ "Time for a vacation. You've burst the\n" +
+ "bowels of hell and by golly you're ready\n" +
+ "for a break. You mutter to yourself,\n" +
+ "Maybe someone else can kick Hell's ass\n" +
+ "next time around. Ahead lies a quiet town,\n" +
+ "with peaceful flowing water, quaint\n" +
+ "buildings, and presumably no Hellspawn.\n" +
+ "\n" +
+ "As you step off the transport, you hear\n" +
+ "the stomp of a cyberdemon's iron shoe.");
+
+ public static readonly DoomString CC_ZOMBIE = new DoomString("ZOMBIEMAN");
+ public static readonly DoomString CC_SHOTGUN = new DoomString("SHOTGUN GUY");
+ public static readonly DoomString CC_HEAVY = new DoomString("HEAVY WEAPON DUDE");
+ public static readonly DoomString CC_IMP = new DoomString("IMP");
+ public static readonly DoomString CC_DEMON = new DoomString("DEMON");
+ public static readonly DoomString CC_LOST = new DoomString("LOST SOUL");
+ public static readonly DoomString CC_CACO = new DoomString("CACODEMON");
+ public static readonly DoomString CC_HELL = new DoomString("HELL KNIGHT");
+ public static readonly DoomString CC_BARON = new DoomString("BARON OF HELL");
+ public static readonly DoomString CC_ARACH = new DoomString("ARACHNOTRON");
+ public static readonly DoomString CC_PAIN = new DoomString("PAIN ELEMENTAL");
+ public static readonly DoomString CC_REVEN = new DoomString("REVENANT");
+ public static readonly DoomString CC_MANCU = new DoomString("MANCUBUS");
+ public static readonly DoomString CC_ARCH = new DoomString("ARCH-VILE");
+ public static readonly DoomString CC_SPIDER = new DoomString("THE SPIDER MASTERMIND");
+ public static readonly DoomString CC_CYBER = new DoomString("THE CYBERDEMON");
+ public static readonly DoomString CC_HERO = new DoomString("OUR HERO");
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.SwitchNames.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.SwitchNames.cs
new file mode 100644
index 00000000..a30d12a1
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.SwitchNames.cs
@@ -0,0 +1,68 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static readonly Tuple[] SwitchNames = new Tuple[]
+ {
+ Tuple.Create(new DoomString("SW1BRCOM"), new DoomString("SW2BRCOM")),
+ Tuple.Create(new DoomString("SW1BRN1"), new DoomString("SW2BRN1")),
+ Tuple.Create(new DoomString("SW1BRN2"), new DoomString("SW2BRN2")),
+ Tuple.Create(new DoomString("SW1BRNGN"), new DoomString("SW2BRNGN")),
+ Tuple.Create(new DoomString("SW1BROWN"), new DoomString("SW2BROWN")),
+ Tuple.Create(new DoomString("SW1COMM"), new DoomString("SW2COMM")),
+ Tuple.Create(new DoomString("SW1COMP"), new DoomString("SW2COMP")),
+ Tuple.Create(new DoomString("SW1DIRT"), new DoomString("SW2DIRT")),
+ Tuple.Create(new DoomString("SW1EXIT"), new DoomString("SW2EXIT")),
+ Tuple.Create(new DoomString("SW1GRAY"), new DoomString("SW2GRAY")),
+ Tuple.Create(new DoomString("SW1GRAY1"), new DoomString("SW2GRAY1")),
+ Tuple.Create(new DoomString("SW1METAL"), new DoomString("SW2METAL")),
+ Tuple.Create(new DoomString("SW1PIPE"), new DoomString("SW2PIPE")),
+ Tuple.Create(new DoomString("SW1SLAD"), new DoomString("SW2SLAD")),
+ Tuple.Create(new DoomString("SW1STARG"), new DoomString("SW2STARG")),
+ Tuple.Create(new DoomString("SW1STON1"), new DoomString("SW2STON1")),
+ Tuple.Create(new DoomString("SW1STON2"), new DoomString("SW2STON2")),
+ Tuple.Create(new DoomString("SW1STONE"), new DoomString("SW2STONE")),
+ Tuple.Create(new DoomString("SW1STRTN"), new DoomString("SW2STRTN")),
+ Tuple.Create(new DoomString("SW1BLUE"), new DoomString("SW2BLUE")),
+ Tuple.Create(new DoomString("SW1CMT"), new DoomString("SW2CMT")),
+ Tuple.Create(new DoomString("SW1GARG"), new DoomString("SW2GARG")),
+ Tuple.Create(new DoomString("SW1GSTON"), new DoomString("SW2GSTON")),
+ Tuple.Create(new DoomString("SW1HOT"), new DoomString("SW2HOT")),
+ Tuple.Create(new DoomString("SW1LION"), new DoomString("SW2LION")),
+ Tuple.Create(new DoomString("SW1SATYR"), new DoomString("SW2SATYR")),
+ Tuple.Create(new DoomString("SW1SKIN"), new DoomString("SW2SKIN")),
+ Tuple.Create(new DoomString("SW1VINE"), new DoomString("SW2VINE")),
+ Tuple.Create(new DoomString("SW1WOOD"), new DoomString("SW2WOOD")),
+ Tuple.Create(new DoomString("SW1PANEL"), new DoomString("SW2PANEL")),
+ Tuple.Create(new DoomString("SW1ROCK"), new DoomString("SW2ROCK")),
+ Tuple.Create(new DoomString("SW1MET2"), new DoomString("SW2MET2")),
+ Tuple.Create(new DoomString("SW1WDMET"), new DoomString("SW2WDMET")),
+ Tuple.Create(new DoomString("SW1BRIK"), new DoomString("SW2BRIK")),
+ Tuple.Create(new DoomString("SW1MOD1"), new DoomString("SW2MOD1")),
+ Tuple.Create(new DoomString("SW1ZIM"), new DoomString("SW2ZIM")),
+ Tuple.Create(new DoomString("SW1STON6"), new DoomString("SW2STON6")),
+ Tuple.Create(new DoomString("SW1TEK"), new DoomString("SW2TEK")),
+ Tuple.Create(new DoomString("SW1MARB"), new DoomString("SW2MARB")),
+ Tuple.Create(new DoomString("SW1SKULL"), new DoomString("SW2SKULL"))
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.TextureAnimation.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.TextureAnimation.cs
new file mode 100644
index 00000000..06dee610
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.TextureAnimation.cs
@@ -0,0 +1,55 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static readonly AnimationDef[] TextureAnimation = new AnimationDef[]
+ {
+ new AnimationDef(false, "NUKAGE3", "NUKAGE1", 8),
+ new AnimationDef(false, "FWATER4", "FWATER1", 8),
+ new AnimationDef(false, "SWATER4", "SWATER1", 8),
+ new AnimationDef(false, "LAVA4", "LAVA1", 8),
+ new AnimationDef(false, "BLOOD3", "BLOOD1", 8),
+
+ // DOOM II flat animations.
+ new AnimationDef(false, "RROCK08", "RROCK05", 8),
+ new AnimationDef(false, "SLIME04", "SLIME01", 8),
+ new AnimationDef(false, "SLIME08", "SLIME05", 8),
+ new AnimationDef(false, "SLIME12", "SLIME09", 8),
+
+ new AnimationDef(true, "BLODGR4", "BLODGR1", 8),
+ new AnimationDef(true, "SLADRIP3", "SLADRIP1", 8),
+
+ new AnimationDef(true, "BLODRIP4", "BLODRIP1", 8),
+ new AnimationDef(true, "FIREWALL", "FIREWALA", 8),
+ new AnimationDef(true, "GSTFONT3", "GSTFONT1", 8),
+ new AnimationDef(true, "FIRELAVA", "FIRELAV3", 8),
+ new AnimationDef(true, "FIREMAG3", "FIREMAG1", 8),
+ new AnimationDef(true, "FIREBLU2", "FIREBLU1", 8),
+ new AnimationDef(true, "ROCKRED3", "ROCKRED1", 8),
+
+ new AnimationDef(true, "BFALL4", "BFALL1", 8),
+ new AnimationDef(true, "SFALL4", "SFALL1", 8),
+ new AnimationDef(true, "WFALL4", "WFALL1", 8),
+ new AnimationDef(true, "DBRAIN4", "DBRAIN1", 8)
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.WeaponInfos.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.WeaponInfos.cs
new file mode 100644
index 00000000..b5faf0e0
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.WeaponInfos.cs
@@ -0,0 +1,117 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ public static readonly WeaponInfo[] WeaponInfos = new WeaponInfo[]
+ {
+ // fist
+ new WeaponInfo(
+ AmmoType.NoAmmo,
+ MobjState.Punchup,
+ MobjState.Punchdown,
+ MobjState.Punch,
+ MobjState.Punch1,
+ MobjState.Null
+ ),
+
+ // pistol
+ new WeaponInfo(
+ AmmoType.Clip,
+ MobjState.Pistolup,
+ MobjState.Pistoldown,
+ MobjState.Pistol,
+ MobjState.Pistol1,
+ MobjState.Pistolflash
+ ),
+
+ // shotgun
+ new WeaponInfo(
+ AmmoType.Shell,
+ MobjState.Sgunup,
+ MobjState.Sgundown,
+ MobjState.Sgun,
+ MobjState.Sgun1,
+ MobjState.Sgunflash1
+ ),
+
+ // chaingun
+ new WeaponInfo(
+ AmmoType.Clip,
+ MobjState.Chainup,
+ MobjState.Chaindown,
+ MobjState.Chain,
+ MobjState.Chain1,
+ MobjState.Chainflash1
+ ),
+
+ // missile launcher
+ new WeaponInfo(
+ AmmoType.Missile,
+ MobjState.Missileup,
+ MobjState.Missiledown,
+ MobjState.Missile,
+ MobjState.Missile1,
+ MobjState.Missileflash1
+ ),
+
+ // plasma rifle
+ new WeaponInfo(
+ AmmoType.Cell,
+ MobjState.Plasmaup,
+ MobjState.Plasmadown,
+ MobjState.Plasma,
+ MobjState.Plasma1,
+ MobjState.Plasmaflash1
+ ),
+
+ // bfg 9000
+ new WeaponInfo(
+ AmmoType.Cell,
+ MobjState.Bfgup,
+ MobjState.Bfgdown,
+ MobjState.Bfg,
+ MobjState.Bfg1,
+ MobjState.Bfgflash1
+ ),
+
+ // chainsaw
+ new WeaponInfo(
+ AmmoType.NoAmmo,
+ MobjState.Sawup,
+ MobjState.Sawdown,
+ MobjState.Saw,
+ MobjState.Saw1,
+ MobjState.Null
+ ),
+
+ // // super shotgun
+ new WeaponInfo(
+ AmmoType.Shell,
+ MobjState.Dsgunup,
+ MobjState.Dsgundown,
+ MobjState.Dsgun,
+ MobjState.Dsgun1,
+ MobjState.Dsgunflash1
+ )
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.cs
new file mode 100644
index 00000000..c7357429
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Info/DoomInfo.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class DoomInfo
+ {
+ // This is to ensure the static members initialized.
+ public static void Initialize()
+ {
+ SpriteNames[0].Equals(null);
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/Animation.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/Animation.cs
new file mode 100644
index 00000000..7ebd4406
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/Animation.cs
@@ -0,0 +1,135 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace ManagedDoom
+{
+ public sealed class Animation
+ {
+ private Intermission im;
+ private int number;
+
+ private AnimationType type;
+ private int period;
+ private int frameCount;
+ private int locationX;
+ private int locationY;
+ private int data;
+ private string[] patches;
+ private int patchNumber;
+ private int nextTic;
+
+ public Animation(Intermission intermission, AnimationInfo info, int number)
+ {
+ im = intermission;
+ this.number = number;
+
+ type = info.Type;
+ period = info.Period;
+ frameCount = info.Count;
+ locationX = info.X;
+ locationY = info.Y;
+ data = info.Data;
+
+ patches = new string[frameCount];
+ for (var i = 0; i < frameCount; i++)
+ {
+ // MONDO HACK!
+ if (im.Info.Episode != 1 || number != 8)
+ {
+ patches[i] = "WIA" + im.Info.Episode + number.ToString("00") + i.ToString("00");
+ }
+ else
+ {
+ // HACK ALERT!
+ patches[i] = "WIA104" + i.ToString("00");
+ }
+ }
+ }
+
+ public void Reset(int bgCount)
+ {
+ patchNumber = -1;
+
+ // Specify the next time to draw it.
+ if (type == AnimationType.Always)
+ {
+ nextTic = bgCount + 1 + (im.Random.Next() % period);
+ }
+ else if (type == AnimationType.Random)
+ {
+ nextTic = bgCount + 1 + (im.Random.Next() % data);
+ }
+ else if (type == AnimationType.Level)
+ {
+ nextTic = bgCount + 1;
+ }
+ }
+
+ public void Update(int bgCount)
+ {
+ if (bgCount == nextTic)
+ {
+ switch (type)
+ {
+ case AnimationType.Always:
+ if (++patchNumber >= frameCount)
+ {
+ patchNumber = 0;
+ }
+ nextTic = bgCount + period;
+ break;
+
+ case AnimationType.Random:
+ patchNumber++;
+ if (patchNumber == frameCount)
+ {
+ patchNumber = -1;
+ nextTic = bgCount + (im.Random.Next() % data);
+ }
+ else
+ {
+ nextTic = bgCount + period;
+ }
+ break;
+
+ case AnimationType.Level:
+ // Gawd-awful hack for level anims.
+ if (!(im.State == IntermissionState.StatCount && number == 7) && im.Info.NextLevel == Data)
+ {
+ patchNumber++;
+ if (patchNumber == frameCount)
+ {
+ patchNumber--;
+ }
+ nextTic = bgCount + period;
+ }
+ break;
+ }
+ }
+ }
+
+ public int LocationX => locationX;
+ public int LocationY => locationY;
+ public int Data => data;
+ public IReadOnlyList Patches => patches;
+ public int PatchNumber => patchNumber;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/AnimationInfo.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/AnimationInfo.cs
new file mode 100644
index 00000000..c2d402e1
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/AnimationInfo.cs
@@ -0,0 +1,98 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public sealed class AnimationInfo
+ {
+ private AnimationType type;
+ private int period;
+ private int count;
+ private int x;
+ private int y;
+ private int data;
+
+ public AnimationInfo(AnimationType type, int period, int count, int x, int y)
+ {
+ this.type = type;
+ this.period = period;
+ this.count = count;
+ this.x = x;
+ this.y = y;
+ }
+
+ public AnimationInfo(AnimationType type, int period, int count, int x, int y, int data)
+ {
+ this.type = type;
+ this.period = period;
+ this.count = count;
+ this.x = x;
+ this.y = y;
+ this.data = data;
+ }
+
+ public AnimationType Type => type;
+ public int Period => period;
+ public int Count => count;
+ public int X => x;
+ public int Y => y;
+ public int Data => data;
+
+ public static readonly IReadOnlyList> Episodes = new AnimationInfo[][]
+ {
+ new AnimationInfo[]
+ {
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 224, 104),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 184, 160),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 112, 136),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 72, 112),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 88, 96),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 64, 48),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 192, 40),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 136, 16),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 80, 16),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 64, 24)
+ },
+
+ new AnimationInfo[]
+ {
+ new AnimationInfo(AnimationType.Level, GameConst.TicRate / 3, 1, 128, 136, 1),
+ new AnimationInfo(AnimationType.Level, GameConst.TicRate / 3, 1, 128, 136, 2),
+ new AnimationInfo(AnimationType.Level, GameConst.TicRate / 3, 1, 128, 136, 3),
+ new AnimationInfo(AnimationType.Level, GameConst.TicRate / 3, 1, 128, 136, 4),
+ new AnimationInfo(AnimationType.Level, GameConst.TicRate / 3, 1, 128, 136, 5),
+ new AnimationInfo(AnimationType.Level, GameConst.TicRate / 3, 1, 128, 136, 6),
+ new AnimationInfo(AnimationType.Level, GameConst.TicRate / 3, 1, 128, 136, 7),
+ new AnimationInfo(AnimationType.Level, GameConst.TicRate / 3, 3, 192, 144, 8),
+ new AnimationInfo(AnimationType.Level, GameConst.TicRate / 3, 1, 128, 136, 8)
+ },
+
+ new AnimationInfo[]
+ {
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 104, 168),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 40, 136),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 160, 96),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 104, 80),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 3, 3, 120, 32),
+ new AnimationInfo(AnimationType.Always, GameConst.TicRate / 4, 3, 40, 0)
+ }
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/AnimationType.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/AnimationType.cs
new file mode 100644
index 00000000..d9b89dfb
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/AnimationType.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum AnimationType
+ {
+ Always,
+ Random,
+ Level
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/Finale.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/Finale.cs
new file mode 100644
index 00000000..8fd4a5f3
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/Finale.cs
@@ -0,0 +1,566 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class Finale
+ {
+ public static readonly int TextSpeed = 3;
+ public static readonly int TextWait = 250;
+
+ private GameOptions options;
+
+ // Stage of animation:
+ // 0 = text, 1 = art screen, 2 = character cast.
+ private int stage;
+ private int count;
+
+ private string flat;
+ private string text;
+
+ // For bunny scroll.
+ private int scrolled;
+ private bool showTheEnd;
+ private int theEndIndex;
+
+ private UpdateResult updateResult;
+
+ public Finale(GameOptions options)
+ {
+ this.options = options;
+
+ string c1Text;
+ string c2Text;
+ string c3Text;
+ string c4Text;
+ string c5Text;
+ string c6Text;
+ switch (options.MissionPack)
+ {
+ case MissionPack.Plutonia:
+ c1Text = DoomInfo.Strings.P1TEXT;
+ c2Text = DoomInfo.Strings.P2TEXT;
+ c3Text = DoomInfo.Strings.P3TEXT;
+ c4Text = DoomInfo.Strings.P4TEXT;
+ c5Text = DoomInfo.Strings.P5TEXT;
+ c6Text = DoomInfo.Strings.P6TEXT;
+ break;
+
+ case MissionPack.Tnt:
+ c1Text = DoomInfo.Strings.T1TEXT;
+ c2Text = DoomInfo.Strings.T2TEXT;
+ c3Text = DoomInfo.Strings.T3TEXT;
+ c4Text = DoomInfo.Strings.T4TEXT;
+ c5Text = DoomInfo.Strings.T5TEXT;
+ c6Text = DoomInfo.Strings.T6TEXT;
+ break;
+
+ default:
+ c1Text = DoomInfo.Strings.C1TEXT;
+ c2Text = DoomInfo.Strings.C2TEXT;
+ c3Text = DoomInfo.Strings.C3TEXT;
+ c4Text = DoomInfo.Strings.C4TEXT;
+ c5Text = DoomInfo.Strings.C5TEXT;
+ c6Text = DoomInfo.Strings.C6TEXT;
+ break;
+ }
+
+ switch (options.GameMode)
+ {
+ case GameMode.Shareware:
+ case GameMode.Registered:
+ case GameMode.Retail:
+ options.Music.StartMusic(Bgm.VICTOR, true);
+ switch (options.Episode)
+ {
+ case 1:
+ flat = "FLOOR4_8";
+ text = DoomInfo.Strings.E1TEXT;
+ break;
+
+ case 2:
+ flat = "SFLR6_1";
+ text = DoomInfo.Strings.E2TEXT;
+ break;
+
+ case 3:
+ flat = "MFLR8_4";
+ text = DoomInfo.Strings.E3TEXT;
+ break;
+
+ case 4:
+ flat = "MFLR8_3";
+ text = DoomInfo.Strings.E4TEXT;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case GameMode.Commercial:
+ options.Music.StartMusic(Bgm.READ_M, true);
+ switch (options.Map)
+ {
+ case 6:
+ flat = "SLIME16";
+ text = c1Text;
+ break;
+
+ case 11:
+ flat = "RROCK14";
+ text = c2Text;
+ break;
+
+ case 20:
+ flat = "RROCK07";
+ text = c3Text;
+ break;
+
+ case 30:
+ flat = "RROCK17";
+ text = c4Text;
+ break;
+
+ case 15:
+ flat = "RROCK13";
+ text = c5Text;
+ break;
+
+ case 31:
+ flat = "RROCK19";
+ text = c6Text;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ options.Music.StartMusic(Bgm.READ_M, true);
+ flat = "F_SKY1";
+ text = DoomInfo.Strings.C1TEXT;
+ break;
+ }
+
+ stage = 0;
+ count = 0;
+
+ scrolled = 0;
+ showTheEnd = false;
+ theEndIndex = 0;
+ }
+
+ public UpdateResult Update()
+ {
+ updateResult = UpdateResult.None;
+
+ // Check for skipping.
+ if (options.GameMode == GameMode.Commercial && count > 50)
+ {
+ int i;
+
+ // Go on to the next level.
+ for (i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (options.Players[i].Cmd.Buttons != 0)
+ {
+ break;
+ }
+ }
+
+ if (i < Player.MaxPlayerCount && stage != 2)
+ {
+ if (options.Map == 30)
+ {
+ StartCast();
+ }
+ else
+ {
+ return UpdateResult.Completed;
+ }
+ }
+ }
+
+ // Advance animation.
+ count++;
+
+ if (stage == 2)
+ {
+ UpdateCast();
+ return updateResult;
+ }
+
+ if (options.GameMode == GameMode.Commercial)
+ {
+ return updateResult;
+ }
+
+ if (stage == 0 && count > text.Length * TextSpeed + TextWait)
+ {
+ count = 0;
+ stage = 1;
+ updateResult = UpdateResult.NeedWipe;
+ if (options.Episode == 3)
+ {
+ options.Music.StartMusic(Bgm.BUNNY, true);
+ }
+ }
+
+ if (stage == 1 && options.Episode == 3)
+ {
+ BunnyScroll();
+ }
+
+ return updateResult;
+ }
+
+ private void BunnyScroll()
+ {
+ scrolled = 320 - (count - 230) / 2;
+ if (scrolled > 320)
+ {
+ scrolled = 320;
+ }
+ if (scrolled < 0)
+ {
+ scrolled = 0;
+ }
+
+ if (count < 1130)
+ {
+ return;
+ }
+
+ showTheEnd = true;
+
+ if (count < 1180)
+ {
+ theEndIndex = 0;
+ return;
+ }
+
+ var stage = (count - 1180) / 5;
+ if (stage > 6)
+ {
+ stage = 6;
+ }
+ if (stage > theEndIndex)
+ {
+ StartSound(Sfx.PISTOL);
+ theEndIndex = stage;
+ }
+ }
+
+
+
+ private static readonly CastInfo[] castorder = new CastInfo[]
+ {
+ new CastInfo(DoomInfo.Strings.CC_ZOMBIE, MobjType.Possessed),
+ new CastInfo(DoomInfo.Strings.CC_SHOTGUN, MobjType.Shotguy),
+ new CastInfo(DoomInfo.Strings.CC_HEAVY, MobjType.Chainguy),
+ new CastInfo(DoomInfo.Strings.CC_IMP, MobjType.Troop),
+ new CastInfo(DoomInfo.Strings.CC_DEMON, MobjType.Sergeant),
+ new CastInfo(DoomInfo.Strings.CC_LOST, MobjType.Skull),
+ new CastInfo(DoomInfo.Strings.CC_CACO, MobjType.Head),
+ new CastInfo(DoomInfo.Strings.CC_HELL, MobjType.Knight),
+ new CastInfo(DoomInfo.Strings.CC_BARON, MobjType.Bruiser),
+ new CastInfo(DoomInfo.Strings.CC_ARACH, MobjType.Baby),
+ new CastInfo(DoomInfo.Strings.CC_PAIN, MobjType.Pain),
+ new CastInfo(DoomInfo.Strings.CC_REVEN, MobjType.Undead),
+ new CastInfo(DoomInfo.Strings.CC_MANCU, MobjType.Fatso),
+ new CastInfo(DoomInfo.Strings.CC_ARCH, MobjType.Vile),
+ new CastInfo(DoomInfo.Strings.CC_SPIDER, MobjType.Spider),
+ new CastInfo(DoomInfo.Strings.CC_CYBER, MobjType.Cyborg),
+ new CastInfo(DoomInfo.Strings.CC_HERO, MobjType.Player)
+ };
+
+ private int castNumber;
+ private MobjStateDef castState;
+ private int castTics;
+ private int castFrames;
+ private bool castDeath;
+ private bool castOnMelee;
+ private bool castAttacking;
+
+ private void StartCast()
+ {
+ stage = 2;
+
+ castNumber = 0;
+ castState = DoomInfo.States[(int)DoomInfo.MobjInfos[(int)castorder[castNumber].Type].SeeState];
+ castTics = castState.Tics;
+ castFrames = 0;
+ castDeath = false;
+ castOnMelee = false;
+ castAttacking = false;
+
+ updateResult = UpdateResult.NeedWipe;
+
+ options.Music.StartMusic(Bgm.EVIL, true);
+ }
+
+ private void UpdateCast()
+ {
+ if (--castTics > 0)
+ {
+ // Not time to change state yet.
+ return;
+ }
+
+ if (castState.Tics == -1 || castState.Next == MobjState.Null)
+ {
+ // Switch from deathstate to next monster.
+ castNumber++;
+ castDeath = false;
+ if (castNumber == castorder.Length)
+ {
+ castNumber = 0;
+ }
+ if (DoomInfo.MobjInfos[(int)castorder[castNumber].Type].SeeSound != 0)
+ {
+ StartSound(DoomInfo.MobjInfos[(int)castorder[castNumber].Type].SeeSound);
+ }
+ castState = DoomInfo.States[(int)DoomInfo.MobjInfos[(int)castorder[castNumber].Type].SeeState];
+ castFrames = 0;
+ }
+ else
+ {
+ // Just advance to next state in animation.
+ if (castState == DoomInfo.States[(int)MobjState.PlayAtk1])
+ {
+ // Oh, gross hack!
+ castAttacking = false;
+ castState = DoomInfo.States[(int)DoomInfo.MobjInfos[(int)castorder[castNumber].Type].SeeState];
+ castFrames = 0;
+ goto stopAttack;
+ }
+ var st = castState.Next;
+ castState = DoomInfo.States[(int)st];
+ castFrames++;
+
+ // Sound hacks....
+ Sfx sfx;
+ switch (st)
+ {
+ case MobjState.PlayAtk1:
+ sfx = Sfx.DSHTGN;
+ break;
+
+ case MobjState.PossAtk2:
+ sfx = Sfx.PISTOL;
+ break;
+
+ case MobjState.SposAtk2:
+ sfx = Sfx.SHOTGN;
+ break;
+
+ case MobjState.VileAtk2:
+ sfx = Sfx.VILATK;
+ break;
+
+ case MobjState.SkelFist2:
+ sfx = Sfx.SKESWG;
+ break;
+
+ case MobjState.SkelFist4:
+ sfx = Sfx.SKEPCH;
+ break;
+
+ case MobjState.SkelMiss2:
+ sfx = Sfx.SKEATK;
+ break;
+
+ case MobjState.FattAtk8:
+ case MobjState.FattAtk5:
+ case MobjState.FattAtk2:
+ sfx = Sfx.FIRSHT;
+ break;
+
+ case MobjState.CposAtk2:
+ case MobjState.CposAtk3:
+ case MobjState.CposAtk4:
+ sfx = Sfx.SHOTGN;
+ break;
+
+ case MobjState.TrooAtk3:
+ sfx = Sfx.CLAW;
+ break;
+
+ case MobjState.SargAtk2:
+ sfx = Sfx.SGTATK;
+ break;
+
+ case MobjState.BossAtk2:
+ case MobjState.Bos2Atk2:
+ case MobjState.HeadAtk2:
+ sfx = Sfx.FIRSHT;
+ break;
+
+ case MobjState.SkullAtk2:
+ sfx = Sfx.SKLATK;
+ break;
+
+ case MobjState.SpidAtk2:
+ case MobjState.SpidAtk3:
+ sfx = Sfx.SHOTGN;
+ break;
+
+ case MobjState.BspiAtk2:
+ sfx = Sfx.PLASMA;
+ break;
+
+ case MobjState.CyberAtk2:
+ case MobjState.CyberAtk4:
+ case MobjState.CyberAtk6:
+ sfx = Sfx.RLAUNC;
+ break;
+
+ case MobjState.PainAtk3:
+ sfx = Sfx.SKLATK;
+ break;
+
+ default:
+ sfx = 0;
+ break;
+ }
+
+ if (sfx != 0)
+ {
+ StartSound(sfx);
+ }
+ }
+
+ if (castFrames == 12)
+ {
+ // Go into attack frame.
+ castAttacking = true;
+ if (castOnMelee)
+ {
+ castState = DoomInfo.States[(int)DoomInfo.MobjInfos[(int)castorder[castNumber].Type].MeleeState];
+ }
+ else
+ {
+ castState = DoomInfo.States[(int)DoomInfo.MobjInfos[(int)castorder[castNumber].Type].MissileState];
+ }
+
+ castOnMelee = !castOnMelee;
+ if (castState == DoomInfo.States[(int)MobjState.Null])
+ {
+ if (castOnMelee)
+ {
+ castState = DoomInfo.States[(int)DoomInfo.MobjInfos[(int)castorder[castNumber].Type].MeleeState];
+ }
+ else
+ {
+ castState = DoomInfo.States[(int)DoomInfo.MobjInfos[(int)castorder[castNumber].Type].MissileState];
+ }
+ }
+ }
+
+ if (castAttacking)
+ {
+ if (castFrames == 24 ||
+ castState == DoomInfo.States[(int)DoomInfo.MobjInfos[(int)castorder[castNumber].Type].SeeState])
+ {
+ castAttacking = false;
+ castState = DoomInfo.States[(int)DoomInfo.MobjInfos[(int)castorder[castNumber].Type].SeeState];
+ castFrames = 0;
+ }
+ }
+
+ stopAttack:
+
+ castTics = castState.Tics;
+ if (castTics == -1)
+ {
+ castTics = 15;
+ }
+ }
+
+ public bool DoEvent(DoomEvent e)
+ {
+ if (stage != 2)
+ {
+ return false;
+ }
+
+ if (e.Type == EventType.KeyDown)
+ {
+ if (castDeath)
+ {
+ // Already in dying frames.
+ return true;
+ }
+
+ // Go into death frame.
+ castDeath = true;
+ castState = DoomInfo.States[(int)DoomInfo.MobjInfos[(int)castorder[castNumber].Type].DeathState];
+ castTics = castState.Tics;
+ castFrames = 0;
+ castAttacking = false;
+ if (DoomInfo.MobjInfos[(int)castorder[castNumber].Type].DeathSound != 0)
+ {
+ StartSound(DoomInfo.MobjInfos[(int)castorder[castNumber].Type].DeathSound);
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ private void StartSound(Sfx sfx)
+ {
+ options.Sound.StartSound(sfx);
+ }
+
+
+
+ public GameOptions Options => options;
+ public string Flat => flat;
+ public string Text => text;
+ public int Count => count;
+ public int Stage => stage;
+
+ // For cast.
+ public string CastName => castorder[castNumber].Name;
+ public MobjStateDef CastState => castState;
+
+ // For bunny scroll.
+ public int Scrolled => scrolled;
+ public int TheEndIndex => theEndIndex;
+ public bool ShowTheEnd => showTheEnd;
+
+
+
+ private class CastInfo
+ {
+ public string Name;
+ public MobjType Type;
+
+ public CastInfo(string name, MobjType type)
+ {
+ Name = name;
+ Type = type;
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/Intermission.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/Intermission.cs
new file mode 100644
index 00000000..af9bb5aa
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/Intermission.cs
@@ -0,0 +1,858 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public sealed class Intermission
+ {
+ private GameOptions options;
+
+ // Contains information passed into intermission.
+ private IntermissionInfo info;
+ private PlayerScores[] scores;
+
+ // Used to accelerate or skip a stage.
+ private bool accelerateStage;
+
+ // Specifies current state.
+ private IntermissionState state;
+
+ private int[] killCount;
+ private int[] itemCount;
+ private int[] secretCount;
+ private int[] fragCount;
+ private int timeCount;
+ private int parCount;
+ private int pauseCount;
+
+ private int spState;
+
+ private int ngState;
+ private bool doFrags;
+
+ private int dmState;
+ private int[][] dmFragCount;
+ private int[] dmTotalCount;
+
+ private DoomRandom random;
+ private Animation[] animations;
+ private bool showYouAreHere;
+
+ // Used for general timing.
+ private int count;
+
+ // Used for timing of background animation.
+ private int bgCount;
+
+ private bool completed;
+
+ public Intermission(GameOptions options, IntermissionInfo info)
+ {
+ this.options = options;
+ this.info = info;
+
+ scores = info.Players;
+
+ killCount = new int[Player.MaxPlayerCount];
+ itemCount = new int[Player.MaxPlayerCount];
+ secretCount = new int[Player.MaxPlayerCount];
+ fragCount = new int[Player.MaxPlayerCount];
+
+ dmFragCount = new int[Player.MaxPlayerCount][];
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ dmFragCount[i] = new int[Player.MaxPlayerCount];
+ }
+ dmTotalCount = new int[Player.MaxPlayerCount];
+
+ if (options.Deathmatch != 0)
+ {
+ InitDeathmatchStats();
+ }
+ else if (options.NetGame)
+ {
+ InitNetGameStats();
+ }
+ else
+ {
+ InitSinglePLayerStats();
+ }
+
+ completed = false;
+ }
+
+
+
+ ////////////////////////////////////////////////////////////
+ // Initialization
+ ////////////////////////////////////////////////////////////
+
+ private void InitSinglePLayerStats()
+ {
+ state = IntermissionState.StatCount;
+ accelerateStage = false;
+ spState = 1;
+ killCount[0] = itemCount[0] = secretCount[0] = -1;
+ timeCount = parCount = -1;
+ pauseCount = GameConst.TicRate;
+
+ InitAnimatedBack();
+ }
+
+
+ private void InitNetGameStats()
+ {
+ state = IntermissionState.StatCount;
+ accelerateStage = false;
+ ngState = 1;
+ pauseCount = GameConst.TicRate;
+
+ var frags = 0;
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (!options.Players[i].InGame)
+ {
+ continue;
+ }
+
+ killCount[i] = itemCount[i] = secretCount[i] = fragCount[i] = 0;
+
+ frags += GetFragSum(i);
+ }
+ doFrags = frags > 0;
+
+ InitAnimatedBack();
+ }
+
+
+ private void InitDeathmatchStats()
+ {
+ state = IntermissionState.StatCount;
+ accelerateStage = false;
+ dmState = 1;
+ pauseCount = GameConst.TicRate;
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (options.Players[i].InGame)
+ {
+ for (var j = 0; j < Player.MaxPlayerCount; j++)
+ {
+ if (options.Players[j].InGame)
+ {
+ dmFragCount[i][j] = 0;
+ }
+ }
+ dmTotalCount[i] = 0;
+ }
+ }
+
+ InitAnimatedBack();
+ }
+
+
+ private void InitNoState()
+ {
+ state = IntermissionState.NoState;
+ accelerateStage = false;
+ count = 10;
+ }
+
+
+ private static readonly int showNextLocDelay = 4;
+
+ private void InitShowNextLoc()
+ {
+ state = IntermissionState.ShowNextLoc;
+ accelerateStage = false;
+ count = showNextLocDelay * GameConst.TicRate;
+
+ InitAnimatedBack();
+ }
+
+
+ private void InitAnimatedBack()
+ {
+ if (options.GameMode == GameMode.Commercial)
+ {
+ return;
+ }
+
+ if (info.Episode > 2)
+ {
+ return;
+ }
+
+ if (animations == null)
+ {
+ animations = new Animation[AnimationInfo.Episodes[info.Episode].Count];
+ for (var i = 0; i < animations.Length; i++)
+ {
+ animations[i] = new Animation(this, AnimationInfo.Episodes[info.Episode][i], i);
+ }
+
+ random = new DoomRandom();
+ }
+
+ foreach (var animation in animations)
+ {
+ animation.Reset(bgCount);
+ }
+ }
+
+
+
+ ////////////////////////////////////////////////////////////
+ // Update
+ ////////////////////////////////////////////////////////////
+
+ public UpdateResult Update()
+ {
+ // Counter for general background animation.
+ bgCount++;
+
+ CheckForAccelerate();
+
+ if (bgCount == 1)
+ {
+ // intermission music
+ if (options.GameMode == GameMode.Commercial)
+ {
+ options.Music.StartMusic(Bgm.DM2INT, true);
+ }
+ else
+ {
+ options.Music.StartMusic(Bgm.INTER, true);
+ }
+ }
+
+ switch (state)
+ {
+ case IntermissionState.StatCount:
+ if (options.Deathmatch != 0)
+ {
+ UpdateDeathmatchStats();
+ }
+ else if (options.NetGame)
+ {
+ UpdateNetGameStats();
+ }
+ else
+ {
+ UpdateSinglePlayerStats();
+ }
+ break;
+
+ case IntermissionState.ShowNextLoc:
+ UpdateShowNextLoc();
+ break;
+
+ case IntermissionState.NoState:
+ UpdateNoState();
+ break;
+ }
+
+ if (completed)
+ {
+ return UpdateResult.Completed;
+ }
+ else
+ {
+ if (bgCount == 1)
+ {
+ return UpdateResult.NeedWipe;
+ }
+ else
+ {
+ return UpdateResult.None;
+ }
+ }
+ }
+
+
+ private void UpdateSinglePlayerStats()
+ {
+ UpdateAnimatedBack();
+
+ if (accelerateStage && spState != 10)
+ {
+ accelerateStage = false;
+ killCount[0] = (scores[0].KillCount * 100) / info.MaxKillCount;
+ itemCount[0] = (scores[0].ItemCount * 100) / info.MaxItemCount;
+ secretCount[0] = (scores[0].SecretCount * 100) / info.MaxSecretCount;
+ timeCount = scores[0].Time / GameConst.TicRate;
+ parCount = info.ParTime / GameConst.TicRate;
+ StartSound(Sfx.BAREXP);
+ spState = 10;
+ }
+
+ if (spState == 2)
+ {
+ killCount[0] += 2;
+
+ if ((bgCount & 3) == 0)
+ {
+ StartSound(Sfx.PISTOL);
+ }
+
+ if (killCount[0] >= (scores[0].KillCount * 100) / info.MaxKillCount)
+ {
+ killCount[0] = (scores[0].KillCount * 100) / info.MaxKillCount;
+ StartSound(Sfx.BAREXP);
+ spState++;
+ }
+ }
+ else if (spState == 4)
+ {
+ itemCount[0] += 2;
+
+ if ((bgCount & 3) == 0)
+ {
+ StartSound(Sfx.PISTOL);
+ }
+
+ if (itemCount[0] >= (scores[0].ItemCount * 100) / info.MaxItemCount)
+ {
+ itemCount[0] = (scores[0].ItemCount * 100) / info.MaxItemCount;
+ StartSound(Sfx.BAREXP);
+ spState++;
+ }
+ }
+ else if (spState == 6)
+ {
+ secretCount[0] += 2;
+
+ if ((bgCount & 3) == 0)
+ {
+ StartSound(Sfx.PISTOL);
+ }
+
+ if (secretCount[0] >= (scores[0].SecretCount * 100) / info.MaxSecretCount)
+ {
+ secretCount[0] = (scores[0].SecretCount * 100) / info.MaxSecretCount;
+ StartSound(Sfx.BAREXP);
+ spState++;
+ }
+ }
+
+ else if (spState == 8)
+ {
+ if ((bgCount & 3) == 0)
+ {
+ StartSound(Sfx.PISTOL);
+ }
+
+ timeCount += 3;
+
+ if (timeCount >= scores[0].Time / GameConst.TicRate)
+ {
+ timeCount = scores[0].Time / GameConst.TicRate;
+ }
+
+ parCount += 3;
+
+ if (parCount >= info.ParTime / GameConst.TicRate)
+ {
+ parCount = info.ParTime / GameConst.TicRate;
+
+ if (timeCount >= scores[0].Time / GameConst.TicRate)
+ {
+ StartSound(Sfx.BAREXP);
+ spState++;
+ }
+ }
+ }
+ else if (spState == 10)
+ {
+ if (accelerateStage)
+ {
+ StartSound(Sfx.SGCOCK);
+
+ if (options.GameMode == GameMode.Commercial)
+ {
+ InitNoState();
+ }
+ else
+ {
+ InitShowNextLoc();
+ }
+ }
+ }
+ else if ((spState & 1) != 0)
+ {
+ if (--pauseCount == 0)
+ {
+ spState++;
+ pauseCount = GameConst.TicRate;
+ }
+ }
+ }
+
+
+ private void UpdateNetGameStats()
+ {
+ UpdateAnimatedBack();
+
+ bool stillTicking;
+
+ if (accelerateStage && ngState != 10)
+ {
+ accelerateStage = false;
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (!options.Players[i].InGame)
+ {
+ continue;
+ }
+
+ killCount[i] = (scores[i].KillCount * 100) / info.MaxKillCount;
+ itemCount[i] = (scores[i].ItemCount * 100) / info.MaxItemCount;
+ secretCount[i] = (scores[i].SecretCount * 100) / info.MaxSecretCount;
+ }
+
+ StartSound(Sfx.BAREXP);
+
+ ngState = 10;
+ }
+
+ if (ngState == 2)
+ {
+ if ((bgCount & 3) == 0)
+ {
+ StartSound(Sfx.PISTOL);
+ }
+
+ stillTicking = false;
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (!options.Players[i].InGame)
+ {
+ continue;
+ }
+
+ killCount[i] += 2;
+ if (killCount[i] >= (scores[i].KillCount * 100) / info.MaxKillCount)
+ {
+ killCount[i] = (scores[i].KillCount * 100) / info.MaxKillCount;
+ }
+ else
+ {
+ stillTicking = true;
+ }
+ }
+
+ if (!stillTicking)
+ {
+ StartSound(Sfx.BAREXP);
+ ngState++;
+ }
+ }
+ else if (ngState == 4)
+ {
+ if ((bgCount & 3) == 0)
+ {
+ StartSound(Sfx.PISTOL);
+ }
+
+ stillTicking = false;
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (!options.Players[i].InGame)
+ {
+ continue;
+ }
+
+ itemCount[i] += 2;
+ if (itemCount[i] >= (scores[i].ItemCount * 100) / info.MaxItemCount)
+ {
+ itemCount[i] = (scores[i].ItemCount * 100) / info.MaxItemCount;
+ }
+ else
+ {
+ stillTicking = true;
+ }
+ }
+
+ if (!stillTicking)
+ {
+ StartSound(Sfx.BAREXP);
+ ngState++;
+ }
+ }
+ else if (ngState == 6)
+ {
+ if ((bgCount & 3) == 0)
+ {
+ StartSound(Sfx.PISTOL);
+ }
+
+ stillTicking = false;
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (!options.Players[i].InGame)
+ {
+ continue;
+ }
+
+ secretCount[i] += 2;
+ if (secretCount[i] >= (scores[i].SecretCount * 100) / info.MaxSecretCount)
+ {
+ secretCount[i] = (scores[i].SecretCount * 100) / info.MaxSecretCount;
+ }
+ else
+ {
+ stillTicking = true;
+ }
+ }
+
+ if (!stillTicking)
+ {
+ StartSound(Sfx.BAREXP);
+ if (doFrags)
+ {
+ ngState++;
+ }
+ else
+ {
+ ngState += 3;
+ }
+ }
+ }
+ else if (ngState == 8)
+ {
+ if ((bgCount & 3) == 0)
+ {
+ StartSound(Sfx.PISTOL);
+ }
+
+ stillTicking = false;
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (!options.Players[i].InGame)
+ {
+ continue;
+ }
+
+ fragCount[i] += 1;
+ var sum = GetFragSum(i);
+ if (fragCount[i] >= sum)
+ {
+ fragCount[i] = sum;
+ }
+ else
+ {
+ stillTicking = true;
+ }
+ }
+
+ if (!stillTicking)
+ {
+ StartSound(Sfx.PLDETH);
+ ngState++;
+ }
+ }
+ else if (ngState == 10)
+ {
+ if (accelerateStage)
+ {
+ StartSound(Sfx.SGCOCK);
+
+ if (options.GameMode == GameMode.Commercial)
+ {
+ InitNoState();
+ }
+ else
+ {
+ InitShowNextLoc();
+ }
+ }
+ }
+ else if ((ngState & 1) != 0)
+ {
+ if (--pauseCount == 0)
+ {
+ ngState++;
+ pauseCount = GameConst.TicRate;
+ }
+ }
+ }
+
+
+ private void UpdateDeathmatchStats()
+ {
+ UpdateAnimatedBack();
+
+ bool stillticking;
+
+ if (accelerateStage && dmState != 4)
+ {
+ accelerateStage = false;
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (options.Players[i].InGame)
+ {
+ for (var j = 0; j < Player.MaxPlayerCount; j++)
+ {
+ if (options.Players[j].InGame)
+ {
+ dmFragCount[i][j] = scores[i].Frags[j];
+ }
+ }
+
+ dmTotalCount[i] = GetFragSum(i);
+ }
+ }
+
+ StartSound(Sfx.BAREXP);
+
+ dmState = 4;
+ }
+
+ if (dmState == 2)
+ {
+ if ((bgCount & 3) == 0)
+ {
+ StartSound(Sfx.PISTOL);
+ }
+
+ stillticking = false;
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (options.Players[i].InGame)
+ {
+ for (var j = 0; j < Player.MaxPlayerCount; j++)
+ {
+ if (options.Players[j].InGame && dmFragCount[i][j] != scores[i].Frags[j])
+ {
+ if (scores[i].Frags[j] < 0)
+ {
+ dmFragCount[i][j]--;
+ }
+ else
+ {
+ dmFragCount[i][j]++;
+ }
+
+ if (dmFragCount[i][j] > 99)
+ {
+ dmFragCount[i][j] = 99;
+ }
+
+ if (dmFragCount[i][j] < -99)
+ {
+ dmFragCount[i][j] = -99;
+ }
+
+ stillticking = true;
+ }
+ }
+
+ dmTotalCount[i] = GetFragSum(i);
+
+ if (dmTotalCount[i] > 99)
+ {
+ dmTotalCount[i] = 99;
+ }
+
+ if (dmTotalCount[i] < -99)
+ {
+ dmTotalCount[i] = -99;
+ }
+ }
+
+ }
+
+ if (!stillticking)
+ {
+ StartSound(Sfx.BAREXP);
+ dmState++;
+ }
+
+ }
+ else if (dmState == 4)
+ {
+ if (accelerateStage)
+ {
+ StartSound(Sfx.SLOP);
+
+ if (options.GameMode == GameMode.Commercial)
+ {
+ InitNoState();
+ }
+ else
+ {
+ InitShowNextLoc();
+ }
+ }
+ }
+ else if ((dmState & 1) != 0)
+ {
+ if (--pauseCount == 0)
+ {
+ dmState++;
+ pauseCount = GameConst.TicRate;
+ }
+ }
+ }
+
+
+ private void UpdateShowNextLoc()
+ {
+ UpdateAnimatedBack();
+
+ if (--count == 0 || accelerateStage)
+ {
+ InitNoState();
+ }
+ else
+ {
+ showYouAreHere = (count & 31) < 20;
+ }
+ }
+
+
+ private void UpdateNoState()
+ {
+
+ UpdateAnimatedBack();
+
+ if (--count == 0)
+ {
+ completed = true;
+ }
+ }
+
+
+ private void UpdateAnimatedBack()
+ {
+ if (options.GameMode == GameMode.Commercial)
+ {
+ return;
+ }
+
+ if (info.Episode > 2)
+ {
+ return;
+ }
+
+ foreach (var a in animations)
+ {
+ a.Update(bgCount);
+ }
+ }
+
+
+
+ ////////////////////////////////////////////////////////////
+ // Check for button press
+ ////////////////////////////////////////////////////////////
+
+ private void CheckForAccelerate()
+ {
+ // Check for button presses to skip delays.
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ var player = options.Players[i];
+ if (player.InGame)
+ {
+ if ((player.Cmd.Buttons & TicCmdButtons.Attack) != 0)
+ {
+ if (!player.AttackDown)
+ {
+ accelerateStage = true;
+ }
+ player.AttackDown = true;
+ }
+ else
+ {
+ player.AttackDown = false;
+ }
+
+ if ((player.Cmd.Buttons & TicCmdButtons.Use) != 0)
+ {
+ if (!player.UseDown)
+ {
+ accelerateStage = true;
+ }
+ player.UseDown = true;
+ }
+ else
+ {
+ player.UseDown = false;
+ }
+ }
+ }
+ }
+
+
+
+ ////////////////////////////////////////////////////////////
+ // Miscellaneous functions
+ ////////////////////////////////////////////////////////////
+
+ private int GetFragSum(int playerNumber)
+ {
+ var frags = 0;
+
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ if (options.Players[i].InGame && i != playerNumber)
+ {
+ frags += scores[playerNumber].Frags[i];
+ }
+ }
+
+ frags -= scores[playerNumber].Frags[playerNumber];
+
+ return frags;
+ }
+
+
+ private void StartSound(Sfx sfx)
+ {
+ options.Sound.StartSound(sfx);
+ }
+
+
+
+ public GameOptions Options => options;
+ public IntermissionInfo Info => info;
+ public IntermissionState State => state;
+ public IReadOnlyList KillCount => killCount;
+ public IReadOnlyList ItemCount => itemCount;
+ public IReadOnlyList SecretCount => secretCount;
+ public IReadOnlyList FragCount => fragCount;
+ public int TimeCount => timeCount;
+ public int ParCount => parCount;
+ public int[][] DeathmatchFrags => dmFragCount;
+ public int[] DeathmatchTotals => dmTotalCount;
+ public bool DoFrags => doFrags;
+ public DoomRandom Random => random;
+ public Animation[] Animations => animations;
+ public bool ShowYouAreHere => showYouAreHere;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/IntermissionInfo.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/IntermissionInfo.cs
new file mode 100644
index 00000000..9be3a218
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/IntermissionInfo.cs
@@ -0,0 +1,112 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public class IntermissionInfo
+ {
+ // Episode number (0-2).
+ private int episode;
+
+ // If true, splash the secret level.
+ private bool didSecret;
+
+ // Previous and next levels, origin 0.
+ private int lastLevel;
+ private int nextLevel;
+
+ private int maxKillCount;
+ private int maxItemCount;
+ private int maxSecretCount;
+ private int totalFrags;
+
+ // The par time.
+ private int parTime;
+
+ private PlayerScores[] players;
+
+ public IntermissionInfo()
+ {
+ players = new PlayerScores[Player.MaxPlayerCount];
+ for (var i = 0; i < Player.MaxPlayerCount; i++)
+ {
+ players[i] = new PlayerScores();
+ }
+ }
+
+ public int Episode
+ {
+ get => episode;
+ set => episode = value;
+ }
+
+ public bool DidSecret
+ {
+ get => didSecret;
+ set => didSecret = value;
+ }
+
+ public int LastLevel
+ {
+ get => lastLevel;
+ set => lastLevel = value;
+ }
+
+ public int NextLevel
+ {
+ get => nextLevel;
+ set => nextLevel = value;
+ }
+
+ public int MaxKillCount
+ {
+ get => Math.Max(maxKillCount, 1);
+ set => maxKillCount = value;
+ }
+
+ public int MaxItemCount
+ {
+ get => Math.Max(maxItemCount, 1);
+ set => maxItemCount = value;
+ }
+
+ public int MaxSecretCount
+ {
+ get => Math.Max(maxSecretCount, 1);
+ set => maxSecretCount = value;
+ }
+
+ public int TotalFrags
+ {
+ get => Math.Max(totalFrags, 1);
+ set => totalFrags = value;
+ }
+
+ public int ParTime
+ {
+ get => parTime;
+ set => parTime = value;
+ }
+
+ public PlayerScores[] Players
+ {
+ get => players;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/IntermissionState.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/IntermissionState.cs
new file mode 100644
index 00000000..8d3370ab
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/IntermissionState.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum IntermissionState
+ {
+ NoState = -1,
+ StatCount,
+ ShowNextLoc
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/PlayerScores.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/PlayerScores.cs
new file mode 100644
index 00000000..6fb9d081
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/PlayerScores.cs
@@ -0,0 +1,75 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public class PlayerScores
+ {
+ // Whether the player is in game.
+ private bool inGame;
+
+ // Player stats, kills, collected items etc.
+ private int killCount;
+ private int itemCount;
+ private int secretCount;
+ private int time;
+ private int[] frags;
+
+ public PlayerScores()
+ {
+ frags = new int[Player.MaxPlayerCount];
+ }
+
+ public bool InGame
+ {
+ get => inGame;
+ set => inGame = value;
+ }
+
+ public int KillCount
+ {
+ get => killCount;
+ set => killCount = value;
+ }
+
+ public int ItemCount
+ {
+ get => itemCount;
+ set => itemCount = value;
+ }
+
+ public int SecretCount
+ {
+ get => secretCount;
+ set => secretCount = value;
+ }
+
+ public int Time
+ {
+ get => time;
+ set => time = value;
+ }
+
+ public int[] Frags
+ {
+ get => frags;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/WorldMap.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/WorldMap.cs
new file mode 100644
index 00000000..7875be61
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Intermission/WorldMap.cs
@@ -0,0 +1,87 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public static class WorldMap
+ {
+ public static readonly IReadOnlyList> Locations = new Point[][]
+ {
+ // Episode 0 world map.
+ new Point[]
+ {
+ new Point(185, 164), // location of level 0 (CJ)
+ new Point(148, 143), // location of level 1 (CJ)
+ new Point(69, 122), // location of level 2 (CJ)
+ new Point(209, 102), // location of level 3 (CJ)
+ new Point(116, 89), // location of level 4 (CJ)
+ new Point(166, 55), // location of level 5 (CJ)
+ new Point(71, 56), // location of level 6 (CJ)
+ new Point(135, 29), // location of level 7 (CJ)
+ new Point(71, 24) // location of level 8 (CJ)
+ },
+
+ // Episode 1 world map should go here.
+ new Point[]
+ {
+ new Point(254, 25), // location of level 0 (CJ)
+ new Point(97, 50), // location of level 1 (CJ)
+ new Point(188, 64), // location of level 2 (CJ)
+ new Point(128, 78), // location of level 3 (CJ)
+ new Point(214, 92), // location of level 4 (CJ)
+ new Point(133, 130), // location of level 5 (CJ)
+ new Point(208, 136), // location of level 6 (CJ)
+ new Point(148, 140), // location of level 7 (CJ)
+ new Point(235, 158) // location of level 8 (CJ)
+ },
+
+ // Episode 2 world map should go here.
+ new Point[]
+ {
+ new Point(156, 168), // location of level 0 (CJ)
+ new Point(48, 154), // location of level 1 (CJ)
+ new Point(174, 95), // location of level 2 (CJ)
+ new Point(265, 75), // location of level 3 (CJ)
+ new Point(130, 48), // location of level 4 (CJ)
+ new Point(279, 23), // location of level 5 (CJ)
+ new Point(198, 48), // location of level 6 (CJ)
+ new Point(140, 25), // location of level 7 (CJ)
+ new Point(281, 136) // location of level 8 (CJ)
+ }
+ };
+
+
+
+ public class Point
+ {
+ private int x;
+ private int y;
+
+ public Point(int x, int y)
+ {
+ this.x = x;
+ this.y = y;
+ }
+
+ public int X => x;
+ public int Y => y;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/BlockMap.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/BlockMap.cs
new file mode 100644
index 00000000..d58ecf74
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/BlockMap.cs
@@ -0,0 +1,169 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class BlockMap
+ {
+ public static readonly int IntBlockSize = 128;
+ public static readonly Fixed BlockSize = Fixed.FromInt(IntBlockSize);
+ public static readonly int BlockMask = BlockSize.Data - 1;
+ public static readonly int FracToBlockShift = Fixed.FracBits + 7;
+ public static readonly int BlockToFracShift = FracToBlockShift - Fixed.FracBits;
+
+ private Fixed originX;
+ private Fixed originY;
+
+ private int width;
+ private int height;
+
+ private short[] table;
+
+ private LineDef[] lines;
+
+ private Mobj[] thingLists;
+
+ private BlockMap(
+ Fixed originX,
+ Fixed originY,
+ int width,
+ int height,
+ short[] table,
+ LineDef[] lines)
+ {
+ this.originX = originX;
+ this.originY = originY;
+ this.width = width;
+ this.height = height;
+ this.table = table;
+ this.lines = lines;
+
+ thingLists = new Mobj[width * height];
+ }
+
+ public static BlockMap FromWad(Wad wad, int lump, LineDef[] lines)
+ {
+ var data = wad.ReadLump(lump);
+
+ var table = new short[data.Length / 2];
+ for (var i = 0; i < table.Length; i++)
+ {
+ var offset = 2 * i;
+ table[i] = BitConverter.ToInt16(data, offset);
+ }
+
+ var originX = Fixed.FromInt(table[0]);
+ var originY = Fixed.FromInt(table[1]);
+ var width = table[2];
+ var height = table[3];
+
+ return new BlockMap(
+ originX,
+ originY,
+ width,
+ height,
+ table,
+ lines);
+ }
+
+ public int GetBlockX(Fixed x)
+ {
+ return (x - originX).Data >> FracToBlockShift;
+ }
+
+ public int GetBlockY(Fixed y)
+ {
+ return (y - originY).Data >> FracToBlockShift;
+ }
+
+ public int GetIndex(int blockX, int blockY)
+ {
+ if (0 <= blockX && blockX < width && 0 <= blockY && blockY < height)
+ {
+ return width * blockY + blockX;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ public int GetIndex(Fixed x, Fixed y)
+ {
+ var blockX = GetBlockX(x);
+ var blockY = GetBlockY(y);
+ return GetIndex(blockX, blockY);
+ }
+
+ public bool IterateLines(int blockX, int blockY, Func func, int validCount)
+ {
+ var index = GetIndex(blockX, blockY);
+
+ if (index == -1)
+ {
+ return true;
+ }
+
+ for (var offset = table[4 + index]; table[offset] != -1; offset++)
+ {
+ var line = lines[table[offset]];
+
+ if (line.ValidCount == validCount)
+ {
+ continue;
+ }
+
+ line.ValidCount = validCount;
+
+ if (!func(line))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public bool IterateThings(int blockX, int blockY, Func func)
+ {
+ var index = GetIndex(blockX, blockY);
+
+ if (index == -1)
+ {
+ return true;
+ }
+
+ for (var mobj = thingLists[index]; mobj != null; mobj = mobj.BlockNext)
+ {
+ if (!func(mobj))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public Fixed OriginX => originX;
+ public Fixed OriginY => originY;
+ public int Width => width;
+ public int Height => height;
+ public Mobj[] ThingLists => thingLists;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/LineDef.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/LineDef.cs
new file mode 100644
index 00000000..771edb7d
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/LineDef.cs
@@ -0,0 +1,195 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class LineDef
+ {
+ private static readonly int dataSize = 14;
+
+ private Vertex vertex1;
+ private Vertex vertex2;
+
+ private Fixed dx;
+ private Fixed dy;
+
+ private LineFlags flags;
+ private LineSpecial special;
+ private short tag;
+
+ private SideDef frontSide;
+ private SideDef backSide;
+
+ private Fixed[] boundingBox;
+
+ private SlopeType slopeType;
+
+ private Sector frontSector;
+ private Sector backSector;
+
+ private int validCount;
+
+ private Thinker specialData;
+
+ private Mobj soundOrigin;
+
+ public LineDef(
+ Vertex vertex1,
+ Vertex vertex2,
+ LineFlags flags,
+ LineSpecial special,
+ short tag,
+ SideDef frontSide,
+ SideDef backSide)
+ {
+ this.vertex1 = vertex1;
+ this.vertex2 = vertex2;
+ this.flags = flags;
+ this.special = special;
+ this.tag = tag;
+ this.frontSide = frontSide;
+ this.backSide = backSide;
+
+ dx = vertex2.X - vertex1.X;
+ dy = vertex2.Y - vertex1.Y;
+
+ if (dx == Fixed.Zero)
+ {
+ slopeType = SlopeType.Vertical;
+ }
+ else if (dy == Fixed.Zero)
+ {
+ slopeType = SlopeType.Horizontal;
+ }
+ else
+ {
+ if (dy / dx > Fixed.Zero)
+ {
+ slopeType = SlopeType.Positive;
+ }
+ else
+ {
+ slopeType = SlopeType.Negative;
+ }
+ }
+
+ boundingBox = new Fixed[4];
+ boundingBox[Box.Top] = Fixed.Max(vertex1.Y, vertex2.Y);
+ boundingBox[Box.Bottom] = Fixed.Min(vertex1.Y, vertex2.Y);
+ boundingBox[Box.Left] = Fixed.Min(vertex1.X, vertex2.X);
+ boundingBox[Box.Right] = Fixed.Max(vertex1.X, vertex2.X);
+
+ frontSector = frontSide?.Sector;
+ backSector = backSide?.Sector;
+ }
+
+ public static LineDef FromData(byte[] data, int offset, Vertex[] vertices, SideDef[] sides)
+ {
+ var vertex1Number = BitConverter.ToInt16(data, offset);
+ var vertex2Number = BitConverter.ToInt16(data, offset + 2);
+ var flags = BitConverter.ToInt16(data, offset + 4);
+ var special = BitConverter.ToInt16(data, offset + 6);
+ var tag = BitConverter.ToInt16(data, offset + 8);
+ var side0Number = BitConverter.ToInt16(data, offset + 10);
+ var side1Number = BitConverter.ToInt16(data, offset + 12);
+
+ return new LineDef(
+ vertices[vertex1Number],
+ vertices[vertex2Number],
+ (LineFlags)flags,
+ (LineSpecial)special,
+ tag,
+ sides[side0Number],
+ side1Number != -1 ? sides[side1Number] : null);
+ }
+
+ public static LineDef[] FromWad(Wad wad, int lump, Vertex[] vertices, SideDef[] sides)
+ {
+ var length = wad.GetLumpSize(lump);
+ if (length % dataSize != 0)
+ {
+ throw new Exception();
+ }
+
+ var data = wad.ReadLump(lump);
+ var count = length / dataSize;
+ var lines = new LineDef[count]; ;
+
+ for (var i = 0; i < count; i++)
+ {
+ var offset = 14 * i;
+ lines[i] = FromData(data, offset, vertices, sides);
+ }
+
+ return lines;
+ }
+
+ public Vertex Vertex1 => vertex1;
+ public Vertex Vertex2 => vertex2;
+
+ public Fixed Dx => dx;
+ public Fixed Dy => dy;
+
+ public LineFlags Flags
+ {
+ get => flags;
+ set => flags = value;
+ }
+
+ public LineSpecial Special
+ {
+ get => special;
+ set => special = value;
+ }
+
+ public short Tag
+ {
+ get => tag;
+ set => tag = value;
+ }
+
+ public SideDef FrontSide => frontSide;
+ public SideDef BackSide => backSide;
+
+ public Fixed[] BoundingBox => boundingBox;
+
+ public SlopeType SlopeType => slopeType;
+
+ public Sector FrontSector => frontSector;
+ public Sector BackSector => backSector;
+
+ public int ValidCount
+ {
+ get => validCount;
+ set => validCount = value;
+ }
+
+ public Thinker SpecialData
+ {
+ get => specialData;
+ set => specialData = value;
+ }
+
+ public Mobj SoundOrigin
+ {
+ get => soundOrigin;
+ set => soundOrigin = value;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/LineFlags.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/LineFlags.cs
new file mode 100644
index 00000000..a1015f41
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/LineFlags.cs
@@ -0,0 +1,35 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ [Flags]
+ public enum LineFlags
+ {
+ Blocking = 1,
+ BlockMonsters = 2,
+ TwoSided = 4,
+ DontPegTop = 8,
+ DontPegBottom = 16,
+ Secret = 32,
+ SoundBlock = 64,
+ DontDraw = 128,
+ Mapped = 256
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/LineSpecial.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/LineSpecial.cs
new file mode 100644
index 00000000..db48842f
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/LineSpecial.cs
@@ -0,0 +1,26 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum LineSpecial
+ {
+ Normal = 0
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Map.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Map.cs
new file mode 100644
index 00000000..7ac8b141
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Map.cs
@@ -0,0 +1,275 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.ExceptionServices;
+
+namespace ManagedDoom
+{
+ public sealed class Map
+ {
+ private TextureLookup textures;
+ private FlatLookup flats;
+ private TextureAnimation animation;
+
+ private World world;
+
+ private Vertex[] vertices;
+ private Sector[] sectors;
+ private SideDef[] sides;
+ private LineDef[] lines;
+ private Seg[] segs;
+ private Subsector[] subsectors;
+ private Node[] nodes;
+ private MapThing[] things;
+ private BlockMap blockMap;
+ private Reject reject;
+
+ private Texture skyTexture;
+
+ private string title;
+
+ public Map(CommonResource resorces, World world)
+ : this(resorces.Wad, resorces.Textures, resorces.Flats, resorces.Animation, world)
+ {
+ }
+
+ public Map(Wad wad, TextureLookup textures, FlatLookup flats, TextureAnimation animation, World world)
+ {
+ try
+ {
+ this.textures = textures;
+ this.flats = flats;
+ this.animation = animation;
+ this.world = world;
+
+ var options = world.Options;
+
+ string name;
+ if (wad.GameMode == GameMode.Commercial)
+ {
+ name = "MAP" + options.Map.ToString("00");
+ }
+ else
+ {
+ name = "E" + options.Episode + "M" + options.Map;
+ }
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.Write("Load map '" + name + "': ");
+
+ var map = wad.GetLumpNumber(name);
+
+ if (map == -1)
+ {
+ throw new Exception("Map '" + name + "' was not found!");
+ }
+
+ vertices = Vertex.FromWad(wad, map + 4);
+ sectors = Sector.FromWad(wad, map + 8, flats);
+ sides = SideDef.FromWad(wad, map + 3, textures, sectors);
+ lines = LineDef.FromWad(wad, map + 2, vertices, sides);
+ segs = Seg.FromWad(wad, map + 5, vertices, lines);
+ subsectors = Subsector.FromWad(wad, map + 6, segs);
+ nodes = Node.FromWad(wad, map + 7, subsectors);
+ things = MapThing.FromWad(wad, map + 1);
+ blockMap = BlockMap.FromWad(wad, map + 10, lines);
+ reject = Reject.FromWad(wad, map + 9, sectors);
+
+ GroupLines();
+
+ skyTexture = GetSkyTextureByMapName(name);
+
+ if (options.GameMode == GameMode.Commercial)
+ {
+ switch (options.MissionPack)
+ {
+ case MissionPack.Plutonia:
+ title = DoomInfo.MapTitles.Plutonia[options.Map - 1];
+ break;
+ case MissionPack.Tnt:
+ title = DoomInfo.MapTitles.Tnt[options.Map - 1];
+ break;
+ default:
+ title = DoomInfo.MapTitles.Doom2[options.Map - 1];
+ break;
+ }
+ }
+ else
+ {
+ title = DoomInfo.MapTitles.Doom[options.Episode - 1][options.Map - 1];
+ }
+
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("OK");
+ }
+ catch (Exception e)
+ {
+ Aura_OS.System.Processing.Application.DoomApp.debugger.WriteLine("Failed");
+ ExceptionDispatchInfo.Throw(e);
+ }
+ }
+
+ private void GroupLines()
+ {
+ var sectorLines = new List();
+ var boundingBox = new Fixed[4];
+
+ foreach (var line in lines)
+ {
+ if (line.Special != 0)
+ {
+ var so = new Mobj(world);
+ so.X = (line.Vertex1.X + line.Vertex2.X) / 2;
+ so.Y = (line.Vertex1.Y + line.Vertex2.Y) / 2;
+ line.SoundOrigin = so;
+ }
+ }
+
+ foreach (var sector in sectors)
+ {
+ sectorLines.Clear();
+ Box.Clear(boundingBox);
+
+ foreach (var line in lines)
+ {
+ if (line.FrontSector == sector || line.BackSector == sector)
+ {
+ sectorLines.Add(line);
+ Box.AddPoint(boundingBox, line.Vertex1.X, line.Vertex1.Y);
+ Box.AddPoint(boundingBox, line.Vertex2.X, line.Vertex2.Y);
+ }
+ }
+
+ sector.Lines = sectorLines.ToArray();
+
+ // Set the degenmobj_t to the middle of the bounding box.
+ sector.SoundOrigin = new Mobj(world);
+ sector.SoundOrigin.X = (boundingBox[Box.Right] + boundingBox[Box.Left]) / 2;
+ sector.SoundOrigin.Y = (boundingBox[Box.Top] + boundingBox[Box.Bottom]) / 2;
+
+ sector.BlockBox = new int[4];
+ int block;
+
+ // Adjust bounding box to map blocks.
+ block = (boundingBox[Box.Top] - blockMap.OriginY + GameConst.MaxThingRadius).Data >> BlockMap.FracToBlockShift;
+ block = block >= blockMap.Height ? blockMap.Height - 1 : block;
+ sector.BlockBox[Box.Top] = block;
+
+ block = (boundingBox[Box.Bottom] - blockMap.OriginY - GameConst.MaxThingRadius).Data >> BlockMap.FracToBlockShift;
+ block = block < 0 ? 0 : block;
+ sector.BlockBox[Box.Bottom] = block;
+
+ block = (boundingBox[Box.Right] - blockMap.OriginX + GameConst.MaxThingRadius).Data >> BlockMap.FracToBlockShift;
+ block = block >= blockMap.Width ? blockMap.Width - 1 : block;
+ sector.BlockBox[Box.Right] = block;
+
+ block = (boundingBox[Box.Left] - blockMap.OriginX - GameConst.MaxThingRadius).Data >> BlockMap.FracToBlockShift;
+ block = block < 0 ? 0 : block;
+ sector.BlockBox[Box.Left] = block;
+ }
+ }
+
+ private Texture GetSkyTextureByMapName(string name)
+ {
+ if (name.Length == 4)
+ {
+ switch (name[1])
+ {
+ case '1':
+ return textures["SKY1"];
+ case '2':
+ return textures["SKY2"];
+ case '3':
+ return textures["SKY3"];
+ default:
+ return textures["SKY4"];
+ }
+ }
+ else
+ {
+ var number = int.Parse(name.Substring(3));
+ if (number <= 11)
+ {
+ return textures["SKY1"];
+ }
+ else if (number <= 21)
+ {
+ return textures["SKY2"];
+ }
+ else
+ {
+ return textures["SKY3"];
+ }
+ }
+ }
+
+ public TextureLookup Textures => textures;
+ public FlatLookup Flats => flats;
+ public TextureAnimation Animation => animation;
+
+ public Vertex[] Vertices => vertices;
+ public Sector[] Sectors => sectors;
+ public SideDef[] Sides => sides;
+ public LineDef[] Lines => lines;
+ public Seg[] Segs => segs;
+ public Subsector[] Subsectors => subsectors;
+ public Node[] Nodes => nodes;
+ public MapThing[] Things => things;
+ public BlockMap BlockMap => blockMap;
+ public Reject Reject => reject;
+ public Texture SkyTexture => skyTexture;
+ public int SkyFlatNumber => flats.SkyFlatNumber;
+ public string Title => title;
+
+
+
+ private static readonly Bgm[] e4BgmList = new Bgm[]
+ {
+ Bgm.E3M4, // American e4m1
+ Bgm.E3M2, // Romero e4m2
+ Bgm.E3M3, // Shawn e4m3
+ Bgm.E1M5, // American e4m4
+ Bgm.E2M7, // Tim e4m5
+ Bgm.E2M4, // Romero e4m6
+ Bgm.E2M6, // J.Anderson e4m7 CHIRON.WAD
+ Bgm.E2M5, // Shawn e4m8
+ Bgm.E1M9 // Tim e4m9
+ };
+
+ public static Bgm GetMapBgm(GameOptions options)
+ {
+ Bgm bgm;
+ if (options.GameMode == GameMode.Commercial)
+ {
+ bgm = Bgm.RUNNIN + options.Map - 1;
+ }
+ else
+ {
+ if (options.Episode < 4)
+ {
+ bgm = Bgm.E1M1 + (options.Episode - 1) * 9 + options.Map - 1;
+ }
+ else
+ {
+ bgm = e4BgmList[options.Map - 1];
+ }
+ }
+
+ return bgm;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/MapThing.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/MapThing.cs
new file mode 100644
index 00000000..f0bb5003
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/MapThing.cs
@@ -0,0 +1,102 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class MapThing
+ {
+ private static readonly int dataSize = 10;
+
+ public static MapThing Empty = new MapThing(
+ Fixed.Zero,
+ Fixed.Zero,
+ Angle.Ang0,
+ 0,
+ 0);
+
+ private Fixed x;
+ private Fixed y;
+ private Angle angle;
+ private int type;
+ private ThingFlags flags;
+
+ public MapThing(
+ Fixed x,
+ Fixed y,
+ Angle angle,
+ int type,
+ ThingFlags flags)
+ {
+ this.x = x;
+ this.y = y;
+ this.angle = angle;
+ this.type = type;
+ this.flags = flags;
+ }
+
+ public static MapThing FromData(byte[] data, int offset)
+ {
+ var x = BitConverter.ToInt16(data, offset);
+ var y = BitConverter.ToInt16(data, offset + 2);
+ var angle = BitConverter.ToInt16(data, offset + 4);
+ var type = BitConverter.ToInt16(data, offset + 6);
+ var flags = BitConverter.ToInt16(data, offset + 8);
+
+ return new MapThing(
+ Fixed.FromInt(x),
+ Fixed.FromInt(y),
+ new Angle(ManagedDoom.Angle.Ang45.Data * (uint)(angle / 45)),
+ type,
+ (ThingFlags)flags);
+ }
+
+ public static MapThing[] FromWad(Wad wad, int lump)
+ {
+ var length = wad.GetLumpSize(lump);
+ if (length % dataSize != 0)
+ {
+ throw new Exception();
+ }
+
+ var data = wad.ReadLump(lump);
+ var count = length / dataSize;
+ var things = new MapThing[count];
+
+ for (var i = 0; i < count; i++)
+ {
+ var offset = dataSize * i;
+ things[i] = FromData(data, offset);
+ }
+
+ return things;
+ }
+
+ public Fixed X => x;
+ public Fixed Y => y;
+ public Angle Angle => angle;
+
+ public int Type
+ {
+ get => type;
+ set => type = value;
+ }
+
+ public ThingFlags Flags => flags;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Node.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Node.cs
new file mode 100644
index 00000000..36d4c027
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Node.cs
@@ -0,0 +1,157 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class Node
+ {
+ private static readonly int dataSize = 28;
+
+ private Fixed x;
+ private Fixed y;
+ private Fixed dx;
+ private Fixed dy;
+
+ private Fixed[][] boundingBox;
+
+ private int[] children;
+
+ public Node(
+ Fixed x,
+ Fixed y,
+ Fixed dx,
+ Fixed dy,
+ Fixed frontBoundingBoxTop,
+ Fixed frontBoundingBoxBottom,
+ Fixed frontBoundingBoxLeft,
+ Fixed frontBoundingBoxRight,
+ Fixed backBoundingBoxTop,
+ Fixed backBoundingBoxBottom,
+ Fixed backBoundingBoxLeft,
+ Fixed backBoundingBoxRight,
+ int frontChild,
+ int backChild)
+ {
+ this.x = x;
+ this.y = y;
+ this.dx = dx;
+ this.dy = dy;
+
+ var frontBoundingBox = new Fixed[4]
+ {
+ frontBoundingBoxTop,
+ frontBoundingBoxBottom,
+ frontBoundingBoxLeft,
+ frontBoundingBoxRight
+ };
+
+ var backBoundingBox = new Fixed[4]
+ {
+ backBoundingBoxTop,
+ backBoundingBoxBottom,
+ backBoundingBoxLeft,
+ backBoundingBoxRight
+ };
+
+ boundingBox = new Fixed[][]
+ {
+ frontBoundingBox,
+ backBoundingBox
+ };
+
+ children = new int[]
+ {
+ frontChild,
+ backChild
+ };
+ }
+
+ public static Node FromData(byte[] data, int offset)
+ {
+ var x = BitConverter.ToInt16(data, offset);
+ var y = BitConverter.ToInt16(data, offset + 2);
+ var dx = BitConverter.ToInt16(data, offset + 4);
+ var dy = BitConverter.ToInt16(data, offset + 6);
+ var frontBoundingBoxTop = BitConverter.ToInt16(data, offset + 8);
+ var frontBoundingBoxBottom = BitConverter.ToInt16(data, offset + 10);
+ var frontBoundingBoxLeft = BitConverter.ToInt16(data, offset + 12);
+ var frontBoundingBoxRight = BitConverter.ToInt16(data, offset + 14);
+ var backBoundingBoxTop = BitConverter.ToInt16(data, offset + 16);
+ var backBoundingBoxBottom = BitConverter.ToInt16(data, offset + 18);
+ var backBoundingBoxLeft = BitConverter.ToInt16(data, offset + 20);
+ var backBoundingBoxRight = BitConverter.ToInt16(data, offset + 22);
+ var frontChild = BitConverter.ToInt16(data, offset + 24);
+ var backChild = BitConverter.ToInt16(data, offset + 26);
+
+ return new Node(
+ Fixed.FromInt(x),
+ Fixed.FromInt(y),
+ Fixed.FromInt(dx),
+ Fixed.FromInt(dy),
+ Fixed.FromInt(frontBoundingBoxTop),
+ Fixed.FromInt(frontBoundingBoxBottom),
+ Fixed.FromInt(frontBoundingBoxLeft),
+ Fixed.FromInt(frontBoundingBoxRight),
+ Fixed.FromInt(backBoundingBoxTop),
+ Fixed.FromInt(backBoundingBoxBottom),
+ Fixed.FromInt(backBoundingBoxLeft),
+ Fixed.FromInt(backBoundingBoxRight),
+ frontChild,
+ backChild);
+ }
+
+ public static Node[] FromWad(Wad wad, int lump, Subsector[] subsectors)
+ {
+ var length = wad.GetLumpSize(lump);
+ if (length % Node.dataSize != 0)
+ {
+ throw new Exception();
+ }
+
+ var data = wad.ReadLump(lump);
+ var count = length / Node.dataSize;
+ var nodes = new Node[count];
+
+ for (var i = 0; i < count; i++)
+ {
+ var offset = Node.dataSize * i;
+ nodes[i] = Node.FromData(data, offset);
+ }
+
+ return nodes;
+ }
+
+ public static bool IsSubsector(int node)
+ {
+ return (node & unchecked((int)0xFFFF8000)) != 0;
+ }
+
+ public static int GetSubsector(int node)
+ {
+ return node ^ unchecked((int)0xFFFF8000);
+ }
+
+ public Fixed X => x;
+ public Fixed Y => y;
+ public Fixed Dx => dx;
+ public Fixed Dy => dy;
+ public Fixed[][] BoundingBox => boundingBox;
+ public int[] Children => children;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Reject.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Reject.cs
new file mode 100644
index 00000000..3a3de856
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Reject.cs
@@ -0,0 +1,58 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class Reject
+ {
+ private byte[] data;
+ private int sectorCount;
+
+ private Reject(byte[] data, int sectorCount)
+ {
+ // If the reject table is too small, expand it to avoid crash.
+ // https://doomwiki.org/wiki/Reject#Reject_Overflow
+ var expectedLength = (sectorCount * sectorCount + 7) / 8;
+ if (data.Length < expectedLength)
+ {
+ Array.Resize(ref data, expectedLength);
+ }
+
+ this.data = data;
+ this.sectorCount = sectorCount;
+ }
+
+ public static Reject FromWad(Wad wad, int lump, Sector[] sectors)
+ {
+ return new Reject(wad.ReadLump(lump), sectors.Length);
+ }
+
+ public bool Check(Sector sector1, Sector sector2)
+ {
+ var s1 = sector1.Number;
+ var s2 = sector2.Number;
+
+ var p = s1 * sectorCount + s2;
+ var byteIndex = p >> 3;
+ var bitIndex = 1 << (p & 7);
+
+ return (data[byteIndex] & bitIndex) != 0;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Sector.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Sector.cs
new file mode 100644
index 00000000..e2e59405
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Sector.cs
@@ -0,0 +1,264 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public sealed class Sector
+ {
+ private static readonly int dataSize = 26;
+
+ private int number;
+ private Fixed floorHeight;
+ private Fixed ceilingHeight;
+ private int floorFlat;
+ private int ceilingFlat;
+ private int lightLevel;
+ private SectorSpecial special;
+ private int tag;
+
+ // 0 = untraversed, 1, 2 = sndlines - 1.
+ private int soundTraversed;
+
+ // Thing that made a sound (or null).
+ private Mobj soundTarget;
+
+ // Mapblock bounding box for height changes.
+ private int[] blockBox;
+
+ // Origin for any sounds played by the sector.
+ private Mobj soundOrigin;
+
+ // If == validcount, already checked.
+ private int validCount;
+
+ // List of mobjs in sector.
+ private Mobj thingList;
+
+ // Thinker for reversable actions.
+ private Thinker specialData;
+
+ private LineDef[] lines;
+
+ public Sector(
+ int number,
+ Fixed floorHeight,
+ Fixed ceilingHeight,
+ int floorFlat,
+ int ceilingFlat,
+ int lightLevel,
+ SectorSpecial special,
+ int tag)
+ {
+ this.number = number;
+ this.floorHeight = floorHeight;
+ this.ceilingHeight = ceilingHeight;
+ this.floorFlat = floorFlat;
+ this.ceilingFlat = ceilingFlat;
+ this.lightLevel = lightLevel;
+ this.special = special;
+ this.tag = tag;
+ }
+
+ public static Sector FromData(byte[] data, int offset, int number, FlatLookup flats)
+ {
+ var floorHeight = BitConverter.ToInt16(data, offset);
+ var ceilingHeight = BitConverter.ToInt16(data, offset + 2);
+ var floorFlatName = DoomInterop.ToString(data, offset + 4, 8);
+ var ceilingFlatName = DoomInterop.ToString(data, offset + 12, 8);
+ var lightLevel = BitConverter.ToInt16(data, offset + 20);
+ var special = BitConverter.ToInt16(data, offset + 22);
+ var tag = BitConverter.ToInt16(data, offset + 24);
+
+ return new Sector(
+ number,
+ Fixed.FromInt(floorHeight),
+ Fixed.FromInt(ceilingHeight),
+ flats.GetNumber(floorFlatName),
+ flats.GetNumber(ceilingFlatName),
+ lightLevel,
+ (SectorSpecial)special,
+ tag);
+ }
+
+ public static Sector[] FromWad(Wad wad, int lump, FlatLookup flats)
+ {
+ var length = wad.GetLumpSize(lump);
+ if (length % dataSize != 0)
+ {
+ throw new Exception();
+ }
+
+ var data = wad.ReadLump(lump);
+ var count = length / dataSize;
+ var sectors = new Sector[count]; ;
+
+ for (var i = 0; i < count; i++)
+ {
+ var offset = dataSize * i;
+ sectors[i] = FromData(data, offset, i, flats);
+ }
+
+ return sectors;
+ }
+
+ public ThingEnumerator GetEnumerator()
+ {
+ return new ThingEnumerator(this);
+ }
+
+
+
+ public struct ThingEnumerator : IEnumerator
+ {
+ private Sector sector;
+ private Mobj thing;
+ private Mobj current;
+
+ public ThingEnumerator(Sector sector)
+ {
+ this.sector = sector;
+ thing = sector.thingList;
+ current = null;
+ }
+
+ public bool MoveNext()
+ {
+ if (thing != null)
+ {
+ current = thing;
+ thing = thing.SectorNext;
+ return true;
+ }
+ else
+ {
+ current = null;
+ return false;
+ }
+ }
+
+ public void Reset()
+ {
+ thing = sector.thingList;
+ current = null;
+ }
+
+ public void Dispose()
+ {
+ }
+
+ public Mobj Current => current;
+
+ object IEnumerator.Current => throw new NotImplementedException();
+ }
+
+ public int Number => number;
+
+ public Fixed FloorHeight
+ {
+ get => floorHeight;
+ set => floorHeight = value;
+ }
+
+ public Fixed CeilingHeight
+ {
+ get => ceilingHeight;
+ set => ceilingHeight = value;
+ }
+
+ public int FloorFlat
+ {
+ get => floorFlat;
+ set => floorFlat = value;
+ }
+
+ public int CeilingFlat
+ {
+ get => ceilingFlat;
+ set => ceilingFlat = value;
+ }
+
+ public int LightLevel
+ {
+ get => lightLevel;
+ set => lightLevel = value;
+ }
+
+ public SectorSpecial Special
+ {
+ get => special;
+ set => special = value;
+ }
+
+ public int Tag
+ {
+ get => tag;
+ set => tag = value;
+ }
+
+ public int SoundTraversed
+ {
+ get => soundTraversed;
+ set => soundTraversed = value;
+ }
+
+ public Mobj SoundTarget
+ {
+ get => soundTarget;
+ set => soundTarget = value;
+ }
+
+ public int[] BlockBox
+ {
+ get => blockBox;
+ set => blockBox = value;
+ }
+
+ public Mobj SoundOrigin
+ {
+ get => soundOrigin;
+ set => soundOrigin = value;
+ }
+
+ public int ValidCount
+ {
+ get => validCount;
+ set => validCount = value;
+ }
+
+ public Mobj ThingList
+ {
+ get => thingList;
+ set => thingList = value;
+ }
+
+ public Thinker SpecialData
+ {
+ get => specialData;
+ set => specialData = value;
+ }
+
+ public LineDef[] Lines
+ {
+ get => lines;
+ set => lines = value;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/SectorSpecial.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/SectorSpecial.cs
new file mode 100644
index 00000000..3b2c8e25
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/SectorSpecial.cs
@@ -0,0 +1,26 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum SectorSpecial
+ {
+ Normal = 0
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Seg.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Seg.cs
new file mode 100644
index 00000000..f560d727
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Seg.cs
@@ -0,0 +1,109 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class Seg
+ {
+ private static readonly int dataSize = 12;
+
+ private Vertex vertex1;
+ private Vertex vertex2;
+ private Fixed offset;
+ private Angle angle;
+ private SideDef sideDef;
+ private LineDef lineDef;
+ private Sector frontSector;
+ private Sector backSector;
+
+ public Seg(
+ Vertex vertex1,
+ Vertex vertex2,
+ Fixed offset,
+ Angle angle,
+ SideDef sideDef,
+ LineDef lineDef,
+ Sector frontSector,
+ Sector backSector)
+ {
+ this.vertex1 = vertex1;
+ this.vertex2 = vertex2;
+ this.offset = offset;
+ this.angle = angle;
+ this.sideDef = sideDef;
+ this.lineDef = lineDef;
+ this.frontSector = frontSector;
+ this.backSector = backSector;
+ }
+
+ public static Seg FromData(byte[] data, int offset, Vertex[] vertices, LineDef[] lines)
+ {
+ var vertex1Number = BitConverter.ToInt16(data, offset);
+ var vertex2Number = BitConverter.ToInt16(data, offset + 2);
+ var angle = BitConverter.ToInt16(data, offset + 4);
+ var lineNumber = BitConverter.ToInt16(data, offset + 6);
+ var side = BitConverter.ToInt16(data, offset + 8);
+ var segOffset = BitConverter.ToInt16(data, offset + 10);
+
+ var lineDef = lines[lineNumber];
+ var frontSide = side == 0 ? lineDef.FrontSide : lineDef.BackSide;
+ var backSide = side == 0 ? lineDef.BackSide : lineDef.FrontSide;
+
+ return new Seg(
+ vertices[vertex1Number],
+ vertices[vertex2Number],
+ Fixed.FromInt(segOffset),
+ new Angle((uint)angle << 16),
+ frontSide,
+ lineDef,
+ frontSide.Sector,
+ (lineDef.Flags & LineFlags.TwoSided) != 0 ? backSide?.Sector : null);
+ }
+
+ public static Seg[] FromWad(Wad wad, int lump, Vertex[] vertices, LineDef[] lines)
+ {
+ var length = wad.GetLumpSize(lump);
+ if (length % Seg.dataSize != 0)
+ {
+ throw new Exception();
+ }
+
+ var data = wad.ReadLump(lump);
+ var count = length / Seg.dataSize;
+ var segs = new Seg[count]; ;
+
+ for (var i = 0; i < count; i++)
+ {
+ var offset = Seg.dataSize * i;
+ segs[i] = Seg.FromData(data, offset, vertices, lines);
+ }
+
+ return segs;
+ }
+
+ public Vertex Vertex1 => vertex1;
+ public Vertex Vertex2 => vertex2;
+ public Fixed Offset => offset;
+ public Angle Angle => angle;
+ public SideDef SideDef => sideDef;
+ public LineDef LineDef => lineDef;
+ public Sector FrontSector => frontSector;
+ public Sector BackSector => backSector;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/SideDef.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/SideDef.cs
new file mode 100644
index 00000000..ec39d842
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/SideDef.cs
@@ -0,0 +1,120 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class SideDef
+ {
+ private static readonly int dataSize = 30;
+
+ private Fixed textureOffset;
+ private Fixed rowOffset;
+ private int topTexture;
+ private int bottomTexture;
+ private int middleTexture;
+ private Sector sector;
+
+ public SideDef(
+ Fixed textureOffset,
+ Fixed rowOffset,
+ int topTexture,
+ int bottomTexture,
+ int middleTexture,
+ Sector sector)
+ {
+ this.textureOffset = textureOffset;
+ this.rowOffset = rowOffset;
+ this.topTexture = topTexture;
+ this.bottomTexture = bottomTexture;
+ this.middleTexture = middleTexture;
+ this.sector = sector;
+ }
+
+ public static SideDef FromData(byte[] data, int offset, TextureLookup textures, Sector[] sectors)
+ {
+ var textureOffset = BitConverter.ToInt16(data, offset);
+ var rowOffset = BitConverter.ToInt16(data, offset + 2);
+ var topTextureName = DoomInterop.ToString(data, offset + 4, 8);
+ var bottomTextureName = DoomInterop.ToString(data, offset + 12, 8);
+ var middleTextureName = DoomInterop.ToString(data, offset + 20, 8);
+ var sectorNum = BitConverter.ToInt16(data, offset + 28);
+
+ return new SideDef(
+ Fixed.FromInt(textureOffset),
+ Fixed.FromInt(rowOffset),
+ textures.GetNumber(topTextureName),
+ textures.GetNumber(bottomTextureName),
+ textures.GetNumber(middleTextureName),
+ sectorNum != -1 ? sectors[sectorNum] : null);
+ }
+
+ public static SideDef[] FromWad(Wad wad, int lump, TextureLookup textures, Sector[] sectors)
+ {
+ var length = wad.GetLumpSize(lump);
+ if (length % dataSize != 0)
+ {
+ throw new Exception();
+ }
+
+ var data = wad.ReadLump(lump);
+ var count = length / dataSize;
+ var sides = new SideDef[count]; ;
+
+ for (var i = 0; i < count; i++)
+ {
+ var offset = dataSize * i;
+ sides[i] = FromData(data, offset, textures, sectors);
+ }
+
+ return sides;
+ }
+
+ public Fixed TextureOffset
+ {
+ get => textureOffset;
+ set => textureOffset = value;
+ }
+
+ public Fixed RowOffset
+ {
+ get => rowOffset;
+ set => rowOffset = value;
+ }
+
+ public int TopTexture
+ {
+ get => topTexture;
+ set => topTexture = value;
+ }
+
+ public int BottomTexture
+ {
+ get => bottomTexture;
+ set => bottomTexture = value;
+ }
+
+ public int MiddleTexture
+ {
+ get => middleTexture;
+ set => middleTexture = value;
+ }
+
+ public Sector Sector => sector;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/SlopeType.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/SlopeType.cs
new file mode 100644
index 00000000..a05de526
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/SlopeType.cs
@@ -0,0 +1,29 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public enum SlopeType
+ {
+ Horizontal,
+ Vertical,
+ Positive,
+ Negative
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Subsector.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Subsector.cs
new file mode 100644
index 00000000..6656df69
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Subsector.cs
@@ -0,0 +1,73 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class Subsector
+ {
+ private static readonly int dataSize = 4;
+
+ private Sector sector;
+ private int segCount;
+ private int firstSeg;
+
+ public Subsector(Sector sector, int segCount, int firstSeg)
+ {
+ this.sector = sector;
+ this.segCount = segCount;
+ this.firstSeg = firstSeg;
+ }
+
+ public static Subsector FromData(byte[] data, int offset, Seg[] segs)
+ {
+ var segCount = BitConverter.ToInt16(data, offset);
+ var firstSegNumber = BitConverter.ToInt16(data, offset + 2);
+
+ return new Subsector(
+ segs[firstSegNumber].SideDef.Sector,
+ segCount,
+ firstSegNumber);
+ }
+
+ public static Subsector[] FromWad(Wad wad, int lump, Seg[] segs)
+ {
+ var length = wad.GetLumpSize(lump);
+ if (length % Subsector.dataSize != 0)
+ {
+ throw new Exception();
+ }
+
+ var data = wad.ReadLump(lump);
+ var count = length / Subsector.dataSize;
+ var subsectors = new Subsector[count];
+
+ for (var i = 0; i < count; i++)
+ {
+ var offset = Subsector.dataSize * i;
+ subsectors[i] = Subsector.FromData(data, offset, segs);
+ }
+
+ return subsectors;
+ }
+
+ public Sector Sector => sector;
+ public int SegCount => segCount;
+ public int FirstSeg => firstSeg;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/ThingFlags.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/ThingFlags.cs
new file mode 100644
index 00000000..8daeb346
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/ThingFlags.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ [Flags]
+ public enum ThingFlags
+ {
+ Easy = 1,
+ Normal = 2,
+ Hard = 4,
+ Ambush = 8
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Vertex.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Vertex.cs
new file mode 100644
index 00000000..4929e800
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Map/Vertex.cs
@@ -0,0 +1,67 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class Vertex
+ {
+ private static readonly int dataSize = 4;
+
+ private Fixed x;
+ private Fixed y;
+
+ public Vertex(Fixed x, Fixed y)
+ {
+ this.x = x;
+ this.y = y;
+ }
+
+ public static Vertex FromData(byte[] data, int offset)
+ {
+ var x = BitConverter.ToInt16(data, offset);
+ var y = BitConverter.ToInt16(data, offset + 2);
+
+ return new Vertex(Fixed.FromInt(x), Fixed.FromInt(y));
+ }
+
+ public static Vertex[] FromWad(Wad wad, int lump)
+ {
+ var length = wad.GetLumpSize(lump);
+ if (length % dataSize != 0)
+ {
+ throw new Exception();
+ }
+
+ var data = wad.ReadLump(lump);
+ var count = length / dataSize;
+ var vertices = new Vertex[count]; ;
+
+ for (var i = 0; i < count; i++)
+ {
+ var offset = dataSize * i;
+ vertices[i] = FromData(data, offset);
+ }
+
+ return vertices;
+ }
+
+ public Fixed X => x;
+ public Fixed Y => y;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Angle.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Angle.cs
new file mode 100644
index 00000000..f16c4d43
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Angle.cs
@@ -0,0 +1,180 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Runtime.CompilerServices;
+
+namespace ManagedDoom
+{
+ public struct Angle
+ {
+ public static readonly Angle Ang0 = new Angle(0x00000000);
+ public static readonly Angle Ang45 = new Angle(0x20000000);
+ public static readonly Angle Ang90 = new Angle(0x40000000);
+ public static readonly Angle Ang180 = new Angle(0x80000000);
+ public static readonly Angle Ang270 = new Angle(0xC0000000);
+
+ private uint data;
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public Angle(uint data)
+ {
+ this.data = data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public Angle(int data)
+ {
+ this.data = (uint)data;
+ }
+
+ public static Angle FromRadian(double radian)
+ {
+ var data = Math.Round(0x100000000 * (radian / (2 * Math.PI)));
+ return new Angle((uint)data);
+ }
+
+ public static Angle FromDegree(double degree)
+ {
+ var data = Math.Round(0x100000000 * (degree / 360));
+ return new Angle((uint)data);
+ }
+
+ public double ToRadian()
+ {
+ return 2 * Math.PI * ((double)data / 0x100000000);
+ }
+
+ public double ToDegree()
+ {
+ return 360 * ((double)data / 0x100000000);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Angle Abs(Angle angle)
+ {
+ var data = (int)angle.data;
+ if (data < 0)
+ {
+ return new Angle((uint)-data);
+ }
+ else
+ {
+ return angle;
+ }
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Angle operator +(Angle a)
+ {
+ return a;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Angle operator -(Angle a)
+ {
+ return new Angle((uint)-(int)a.data);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Angle operator +(Angle a, Angle b)
+ {
+ return new Angle(a.data + b.data);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Angle operator -(Angle a, Angle b)
+ {
+ return new Angle(a.data - b.data);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Angle operator *(uint a, Angle b)
+ {
+ return new Angle(a * b.data);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Angle operator *(Angle a, uint b)
+ {
+ return new Angle(a.data * b);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Angle operator /(Angle a, uint b)
+ {
+ return new Angle(a.data / b);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator ==(Angle a, Angle b)
+ {
+ return a.data == b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator !=(Angle a, Angle b)
+ {
+ return a.data != b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator <(Angle a, Angle b)
+ {
+ return a.data < b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator >(Angle a, Angle b)
+ {
+ return a.data > b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator <=(Angle a, Angle b)
+ {
+ return a.data <= b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator >=(Angle a, Angle b)
+ {
+ return a.data >= b.data;
+ }
+
+ public override bool Equals(object obj)
+ {
+ throw new NotSupportedException();
+ }
+
+ public override int GetHashCode()
+ {
+ return data.GetHashCode();
+ }
+
+ public override string ToString()
+ {
+ return ToDegree().ToString();
+ }
+
+ public uint Data
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => data;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Fixed.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Fixed.cs
new file mode 100644
index 00000000..87ac9006
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Fixed.cs
@@ -0,0 +1,272 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Runtime.CompilerServices;
+
+namespace ManagedDoom
+{
+ public struct Fixed
+ {
+ public const int FracBits = 16;
+ public const int FracUnit = 1 << FracBits;
+
+ public static readonly Fixed Zero = new Fixed(0);
+ public static readonly Fixed One = new Fixed(FracUnit);
+
+ public static readonly Fixed MaxValue = new Fixed(int.MaxValue);
+ public static readonly Fixed MinValue = new Fixed(int.MinValue);
+
+ public static readonly Fixed Epsilon = new Fixed(1);
+ public static readonly Fixed OnePlusEpsilon = new Fixed(FracUnit + 1);
+ public static readonly Fixed OneMinusEpsilon = new Fixed(FracUnit - 1);
+
+ private int data;
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public Fixed(int data)
+ {
+ this.data = data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed FromInt(int value)
+ {
+ return new Fixed(value << FracBits);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed FromFloat(float value)
+ {
+ return new Fixed((int)(FracUnit * value));
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed FromDouble(double value)
+ {
+ return new Fixed((int)(FracUnit * value));
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public float ToFloat()
+ {
+ return (float)data / FracUnit;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public double ToDouble()
+ {
+ return (double)data / FracUnit;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed Abs(Fixed a)
+ {
+ if (a.data < 0)
+ {
+ return new Fixed(-a.data);
+ }
+ else
+ {
+ return a;
+ }
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator +(Fixed a)
+ {
+ return a;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator -(Fixed a)
+ {
+ return new Fixed(-a.data);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator +(Fixed a, Fixed b)
+ {
+ return new Fixed(a.data + b.data);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator -(Fixed a, Fixed b)
+ {
+ return new Fixed(a.data - b.data);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator *(Fixed a, Fixed b)
+ {
+ return new Fixed((int)(((long)a.data * (long)b.data) >> FracBits));
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator *(int a, Fixed b)
+ {
+ return new Fixed(a * b.data);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator *(Fixed a, int b)
+ {
+ return new Fixed(a.data * b);
+ }
+
+ public static Fixed operator /(Fixed a, Fixed b)
+ {
+ if ((Math.Abs(a.data) >> 14) >= Math.Abs(b.data))
+ {
+ return new Fixed((a.data ^ b.data) < 0 ? int.MinValue : int.MaxValue);
+ }
+
+ return FixedDiv2(a, b);
+ }
+
+ private static Fixed FixedDiv2(Fixed a, Fixed b)
+ {
+ var c = ((double)a.data) / ((double)b.data) * FracUnit;
+
+ if (c >= 2147483648.0 || c < -2147483648.0)
+ {
+ throw new DivideByZeroException();
+ }
+
+ return new Fixed((int)c);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator /(int a, Fixed b)
+ {
+ return Fixed.FromInt(a) / b;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator /(Fixed a, int b)
+ {
+ return new Fixed(a.data / b);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator <<(Fixed a, int b)
+ {
+ return new Fixed(a.data << b);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed operator >>(Fixed a, int b)
+ {
+ return new Fixed(a.data >> b);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator ==(Fixed a, Fixed b)
+ {
+ return a.data == b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator !=(Fixed a, Fixed b)
+ {
+ return a.data != b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator <(Fixed a, Fixed b)
+ {
+ return a.data < b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator >(Fixed a, Fixed b)
+ {
+ return a.data > b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator <=(Fixed a, Fixed b)
+ {
+ return a.data <= b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator >=(Fixed a, Fixed b)
+ {
+ return a.data >= b.data;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed Min(Fixed a, Fixed b)
+ {
+ if (a < b)
+ {
+ return a;
+ }
+ else
+ {
+ return b;
+ }
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed Max(Fixed a, Fixed b)
+ {
+ if (a < b)
+ {
+ return b;
+ }
+ else
+ {
+ return a;
+ }
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public int ToIntFloor()
+ {
+ return data >> FracBits;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public int ToIntCeiling()
+ {
+ return (data + FracUnit - 1) >> FracBits;
+ }
+
+ public override bool Equals(object obj)
+ {
+ throw new NotSupportedException();
+ }
+
+ public override int GetHashCode()
+ {
+ return data.GetHashCode();
+ }
+
+ public override string ToString()
+ {
+ return ((double)data / FracUnit).ToString();
+ }
+
+ public int Data
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => data;
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Geometry.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Geometry.cs
new file mode 100644
index 00000000..1ada7d7c
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Geometry.cs
@@ -0,0 +1,625 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static class Geometry
+ {
+ private const int slopeRange = 2048;
+ private const int slopeBits = 11;
+ private const int fracToSlopeShift = Fixed.FracBits - slopeBits;
+
+ private static uint SlopeDiv(Fixed num, Fixed den)
+ {
+ if ((uint)den.Data < 512)
+ {
+ return slopeRange;
+ }
+
+ var ans = ((uint)num.Data << 3) / ((uint)den.Data >> 8);
+
+ return ans <= slopeRange ? ans : slopeRange;
+ }
+
+ ///
+ /// Calculate the distance between the two points.
+ ///
+ public static Fixed PointToDist(Fixed fromX, Fixed fromY, Fixed toX, Fixed toY)
+ {
+ var dx = Fixed.Abs(toX - fromX);
+ var dy = Fixed.Abs(toY - fromY);
+
+ if (dy > dx)
+ {
+ var temp = dx;
+ dx = dy;
+ dy = temp;
+ }
+
+ // The code below to avoid division by zero is based on Chocolate Doom's implementation.
+ Fixed frac;
+ if (dx != Fixed.Zero)
+ {
+ frac = dy / dx;
+ }
+ else
+ {
+ frac = Fixed.Zero;
+ }
+
+ var angle = (Trig.TanToAngle((uint)frac.Data >> fracToSlopeShift) + Angle.Ang90);
+
+ // Use as cosine.
+ var dist = dx / Trig.Sin(angle);
+
+ return dist;
+ }
+
+ ///
+ /// Calculate on which side of the node the point is.
+ ///
+ ///
+ /// 0 (front) or 1 (back).
+ ///
+ public static int PointOnSide(Fixed x, Fixed y, Node node)
+ {
+ if (node.Dx == Fixed.Zero)
+ {
+ if (x <= node.X)
+ {
+ return node.Dy > Fixed.Zero ? 1 : 0;
+ }
+ else
+ {
+ return node.Dy < Fixed.Zero ? 1 : 0;
+ }
+ }
+
+ if (node.Dy == Fixed.Zero)
+ {
+ if (y <= node.Y)
+ {
+ return node.Dx < Fixed.Zero ? 1 : 0;
+ }
+ else
+ {
+ return node.Dx > Fixed.Zero ? 1 : 0;
+ }
+ }
+
+ var dx = (x - node.X);
+ var dy = (y - node.Y);
+
+ // Try to quickly decide by looking at sign bits.
+ if (((node.Dy.Data ^ node.Dx.Data ^ dx.Data ^ dy.Data) & 0x80000000) != 0)
+ {
+ if (((node.Dy.Data ^ dx.Data) & 0x80000000) != 0)
+ {
+ // Left is negative.
+ return 1;
+ }
+
+ return 0;
+ }
+
+ var left = new Fixed(node.Dy.Data >> Fixed.FracBits) * dx;
+ var right = dy * new Fixed(node.Dx.Data >> Fixed.FracBits);
+
+ if (right < left)
+ {
+ // Front side.
+ return 0;
+ }
+ else
+ {
+ // Back side.
+ return 1;
+ }
+ }
+
+ ///
+ /// Calculate the angle of the line passing through the two points.
+ ///
+ public static Angle PointToAngle(Fixed fromX, Fixed fromY, Fixed toX, Fixed toY)
+ {
+ var x = toX - fromX;
+ var y = toY - fromY;
+
+ if (x == Fixed.Zero && y == Fixed.Zero)
+ {
+ return Angle.Ang0;
+ }
+
+ if (x >= Fixed.Zero)
+ {
+ // x >= 0
+ if (y >= Fixed.Zero)
+ {
+ // y >= 0
+ if (x > y)
+ {
+ // octant 0
+ return Trig.TanToAngle(SlopeDiv(y, x));
+ }
+ else
+ {
+ // octant 1
+ return new Angle(Angle.Ang90.Data - 1) - Trig.TanToAngle(SlopeDiv(x, y));
+ }
+ }
+ else
+ {
+ // y < 0
+ y = -y;
+
+ if (x > y)
+ {
+ // octant 8
+ return -Trig.TanToAngle(SlopeDiv(y, x));
+ }
+ else
+ {
+ // octant 7
+ return Angle.Ang270 + Trig.TanToAngle(SlopeDiv(x, y));
+ }
+ }
+ }
+ else
+ {
+ // x < 0
+ x = -x;
+
+ if (y >= Fixed.Zero)
+ {
+ // y >= 0
+ if (x > y)
+ {
+ // octant 3
+ return new Angle(Angle.Ang180.Data - 1) - Trig.TanToAngle(SlopeDiv(y, x));
+ }
+ else
+ {
+ // octant 2
+ return Angle.Ang90 + Trig.TanToAngle(SlopeDiv(x, y));
+ }
+ }
+ else
+ {
+ // y < 0
+ y = -y;
+
+ if (x > y)
+ {
+ // octant 4
+ return Angle.Ang180 + Trig.TanToAngle(SlopeDiv(y, x));
+ }
+ else
+ {
+ // octant 5
+ return new Angle(Angle.Ang270.Data - 1) - Trig.TanToAngle(SlopeDiv(x, y));
+ }
+ }
+ }
+ }
+
+ ///
+ /// Get the subsector which contains the point.
+ ///
+ public static Subsector PointInSubsector(Fixed x, Fixed y, Map map)
+ {
+ // Single subsector is a special case.
+ if (map.Nodes.Length == 0)
+ {
+ return map.Subsectors[0];
+ }
+
+ var nodeNumber = map.Nodes.Length - 1;
+
+ while (!Node.IsSubsector(nodeNumber))
+ {
+ var node = map.Nodes[nodeNumber];
+ var side = PointOnSide(x, y, node);
+ nodeNumber = node.Children[side];
+ }
+
+ return map.Subsectors[Node.GetSubsector(nodeNumber)];
+ }
+
+ ///
+ /// Calculate on which side of the line the point is.
+ ///
+ ///
+ /// 0 (front) or 1 (back).
+ ///
+ public static int PointOnSegSide(Fixed x, Fixed y, Seg line)
+ {
+ var lx = line.Vertex1.X;
+ var ly = line.Vertex1.Y;
+
+ var ldx = line.Vertex2.X - lx;
+ var ldy = line.Vertex2.Y - ly;
+
+ if (ldx == Fixed.Zero)
+ {
+ if (x <= lx)
+ {
+ return ldy > Fixed.Zero ? 1 : 0;
+ }
+ else
+ {
+ return ldy < Fixed.Zero ? 1 : 0;
+ }
+ }
+
+ if (ldy == Fixed.Zero)
+ {
+ if (y <= ly)
+ {
+ return ldx < Fixed.Zero ? 1 : 0;
+ }
+ else
+ {
+ return ldx > Fixed.Zero ? 1 : 0;
+ }
+ }
+
+ var dx = (x - lx);
+ var dy = (y - ly);
+
+ // Try to quickly decide by looking at sign bits.
+ if (((ldy.Data ^ ldx.Data ^ dx.Data ^ dy.Data) & 0x80000000) != 0)
+ {
+ if (((ldy.Data ^ dx.Data) & 0x80000000) != 0)
+ {
+ // Left is negative.
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ var left = new Fixed(ldy.Data >> Fixed.FracBits) * dx;
+ var right = dy * new Fixed(ldx.Data >> Fixed.FracBits);
+
+ if (right < left)
+ {
+ // Front side.
+ return 0;
+ }
+ else
+ {
+ // Back side.
+ return 1;
+ }
+ }
+
+ ///
+ /// Calculate on which side of the line the point is.
+ ///
+ ///
+ /// 0 (front) or 1 (back).
+ ///
+ public static int PointOnLineSide(Fixed x, Fixed y, LineDef line)
+ {
+ if (line.Dx == Fixed.Zero)
+ {
+ if (x <= line.Vertex1.X)
+ {
+ return line.Dy > Fixed.Zero ? 1 : 0;
+ }
+ else
+ {
+ return line.Dy < Fixed.Zero ? 1 : 0;
+ }
+ }
+
+ if (line.Dy == Fixed.Zero)
+ {
+ if (y <= line.Vertex1.Y)
+ {
+ return line.Dx < Fixed.Zero ? 1 : 0;
+ }
+ else
+ {
+ return line.Dx > Fixed.Zero ? 1 : 0;
+ }
+ }
+
+ var dx = (x - line.Vertex1.X);
+ var dy = (y - line.Vertex1.Y);
+
+ var left = new Fixed(line.Dy.Data >> Fixed.FracBits) * dx;
+ var right = dy * new Fixed(line.Dx.Data >> Fixed.FracBits);
+
+ if (right < left)
+ {
+ // Front side.
+ return 0;
+ }
+ else
+ {
+ // Back side.
+ return 1;
+ }
+ }
+
+ ///
+ /// Calculate on which side of the line the box is.
+ ///
+ ///
+ /// 0 (front), 1 (back), or -1 if the box crosses the line.
+ ///
+ public static int BoxOnLineSide(Fixed[] box, LineDef line)
+ {
+ int p1;
+ int p2;
+
+ switch (line.SlopeType)
+ {
+ case SlopeType.Horizontal:
+ p1 = box[Box.Top] > line.Vertex1.Y ? 1 : 0;
+ p2 = box[Box.Bottom] > line.Vertex1.Y ? 1 : 0;
+ if (line.Dx < Fixed.Zero)
+ {
+ p1 ^= 1;
+ p2 ^= 1;
+ }
+ break;
+
+ case SlopeType.Vertical:
+ p1 = box[Box.Right] < line.Vertex1.X ? 1 : 0;
+ p2 = box[Box.Left] < line.Vertex1.X ? 1 : 0;
+ if (line.Dy < Fixed.Zero)
+ {
+ p1 ^= 1;
+ p2 ^= 1;
+ }
+ break;
+
+ case SlopeType.Positive:
+ p1 = PointOnLineSide(box[Box.Left], box[Box.Top], line);
+ p2 = PointOnLineSide(box[Box.Right], box[Box.Bottom], line);
+ break;
+
+ case SlopeType.Negative:
+ p1 = PointOnLineSide(box[Box.Right], box[Box.Top], line);
+ p2 = PointOnLineSide(box[Box.Left], box[Box.Bottom], line);
+ break;
+
+ default:
+ throw new Exception("Invalid SlopeType.");
+ }
+
+ if (p1 == p2)
+ {
+ return p1;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ ///
+ /// Calculate on which side of the line the point is.
+ ///
+ ///
+ /// 0 (front) or 1 (back).
+ ///
+ public static int PointOnDivLineSide(Fixed x, Fixed y, DivLine line)
+ {
+ if (line.Dx == Fixed.Zero)
+ {
+ if (x <= line.X)
+ {
+ return line.Dy > Fixed.Zero ? 1 : 0;
+ }
+ else
+ {
+ return line.Dy < Fixed.Zero ? 1 : 0;
+ }
+ }
+
+ if (line.Dy == Fixed.Zero)
+ {
+ if (y <= line.Y)
+ {
+ return line.Dx < Fixed.Zero ? 1 : 0;
+ }
+ else
+ {
+ return line.Dx > Fixed.Zero ? 1 : 0;
+ }
+ }
+
+ var dx = (x - line.X);
+ var dy = (y - line.Y);
+
+ // Try to quickly decide by looking at sign bits.
+ if (((line.Dy.Data ^ line.Dx.Data ^ dx.Data ^ dy.Data) & 0x80000000) != 0)
+ {
+ if (((line.Dy.Data ^ dx.Data) & 0x80000000) != 0)
+ {
+ // Left is negative.
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ var left = new Fixed(line.Dy.Data >> 8) * new Fixed(dx.Data >> 8);
+ var right = new Fixed(dy.Data >> 8) * new Fixed(line.Dx.Data >> 8);
+
+ if (right < left)
+ {
+ // Front side.
+ return 0;
+ }
+ else
+ {
+ // Back side.
+ return 1;
+ }
+ }
+
+ ///
+ /// Gives an estimation of distance (not exact).
+ ///
+ public static Fixed AproxDistance(Fixed dx, Fixed dy)
+ {
+ dx = Fixed.Abs(dx);
+ dy = Fixed.Abs(dy);
+
+ if (dx < dy)
+ {
+ return dx + dy - (dx >> 1);
+ }
+ else
+ {
+ return dx + dy - (dy >> 1);
+ }
+ }
+
+ ///
+ /// Calculate on which side of the line the point is.
+ ///
+ ///
+ /// 0 (front) or 1 (back), or 2 if the box crosses the line.
+ ///
+ public static int DivLineSide(Fixed x, Fixed y, DivLine line)
+ {
+ if (line.Dx == Fixed.Zero)
+ {
+ if (x == line.X)
+ {
+ return 2;
+ }
+
+ if (x <= line.X)
+ {
+ return line.Dy > Fixed.Zero ? 1 : 0;
+ }
+
+ return line.Dy < Fixed.Zero ? 1 : 0;
+ }
+
+ if (line.Dy == Fixed.Zero)
+ {
+ if (x == line.Y)
+ {
+ return 2;
+ }
+
+ if (y <= line.Y)
+ {
+ return line.Dx < Fixed.Zero ? 1 : 0;
+ }
+
+ return line.Dx > Fixed.Zero ? 1 : 0;
+ }
+
+ var dx = (x - line.X);
+ var dy = (y - line.Y);
+
+ var left = new Fixed((line.Dy.Data >> Fixed.FracBits) * (dx.Data >> Fixed.FracBits));
+ var right = new Fixed((dy.Data >> Fixed.FracBits) * (line.Dx.Data >> Fixed.FracBits));
+
+ if (right < left)
+ {
+ // Front side.
+ return 0;
+ }
+
+ if (left == right)
+ {
+ return 2;
+ }
+ else
+ {
+ // Back side.
+ return 1;
+ }
+ }
+
+ ///
+ /// Calculate on which side of the line the point is.
+ ///
+ ///
+ /// 0 (front) or 1 (back), or 2 if the box crosses the line.
+ ///
+ public static int DivLineSide(Fixed x, Fixed y, Node node)
+ {
+ if (node.Dx == Fixed.Zero)
+ {
+ if (x == node.X)
+ {
+ return 2;
+ }
+
+ if (x <= node.X)
+ {
+ return node.Dy > Fixed.Zero ? 1 : 0;
+ }
+
+ return node.Dy < Fixed.Zero ? 1 : 0;
+ }
+
+ if (node.Dy == Fixed.Zero)
+ {
+ if (x == node.Y)
+ {
+ return 2;
+ }
+
+ if (y <= node.Y)
+ {
+ return node.Dx < Fixed.Zero ? 1 : 0;
+ }
+
+ return node.Dx > Fixed.Zero ? 1 : 0;
+ }
+
+ var dx = (x - node.X);
+ var dy = (y - node.Y);
+
+ var left = new Fixed((node.Dy.Data >> Fixed.FracBits) * (dx.Data >> Fixed.FracBits));
+ var right = new Fixed((dy.Data >> Fixed.FracBits) * (node.Dx.Data >> Fixed.FracBits));
+
+ if (right < left)
+ {
+ // Front side.
+ return 0;
+ }
+
+ if (left == right)
+ {
+ return 2;
+ }
+ else
+ {
+ // Back side.
+ return 1;
+ }
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Trig.Tables.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Trig.Tables.cs
new file mode 100644
index 00000000..0ea91974
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Trig.Tables.cs
@@ -0,0 +1,2085 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public static partial class Trig
+ {
+ private static readonly int[] fineTangent =
+ {
+ -170910304, -56965752, -34178904, -24413316, -18988036, -15535599, -13145455, -11392683,
+ -10052327, -8994149, -8137527, -7429880, -6835455, -6329090, -5892567, -5512368,
+ -5178251, -4882318, -4618375, -4381502, -4167737, -3973855, -3797206, -3635590,
+ -3487165, -3350381, -3223918, -3106651, -2997613, -2895966, -2800983, -2712030,
+ -2628549, -2550052, -2476104, -2406322, -2340362, -2277919, -2218719, -2162516,
+ -2109087, -2058233, -2009771, -1963536, -1919378, -1877161, -1836758, -1798063,
+ -1760956, -1725348, -1691149, -1658278, -1626658, -1596220, -1566898, -1538632,
+ -1511367, -1485049, -1459630, -1435065, -1411312, -1388330, -1366084, -1344537,
+ -1323658, -1303416, -1283783, -1264730, -1246234, -1228269, -1210813, -1193846,
+ -1177345, -1161294, -1145673, -1130465, -1115654, -1101225, -1087164, -1073455,
+ -1060087, -1047046, -1034322, -1021901, -1009774, -997931, -986361, -975054,
+ -964003, -953199, -942633, -932298, -922186, -912289, -902602, -893117,
+ -883829, -874730, -865817, -857081, -848520, -840127, -831898, -823827,
+ -815910, -808143, -800521, -793041, -785699, -778490, -771411, -764460,
+ -757631, -750922, -744331, -737853, -731486, -725227, -719074, -713023,
+ -707072, -701219, -695462, -689797, -684223, -678737, -673338, -668024,
+ -662792, -657640, -652568, -647572, -642651, -637803, -633028, -628323,
+ -623686, -619117, -614613, -610174, -605798, -601483, -597229, -593033,
+ -588896, -584815, -580789, -576818, -572901, -569035, -565221, -561456,
+ -557741, -554074, -550455, -546881, -543354, -539870, -536431, -533034,
+ -529680, -526366, -523094, -519861, -516667, -513512, -510394, -507313,
+ -504269, -501261, -498287, -495348, -492443, -489571, -486732, -483925,
+ -481150, -478406, -475692, -473009, -470355, -467730, -465133, -462565,
+ -460024, -457511, -455024, -452564, -450129, -447720, -445337, -442978,
+ -440643, -438332, -436045, -433781, -431540, -429321, -427125, -424951,
+ -422798, -420666, -418555, -416465, -414395, -412344, -410314, -408303,
+ -406311, -404338, -402384, -400448, -398530, -396630, -394747, -392882,
+ -391034, -389202, -387387, -385589, -383807, -382040, -380290, -378555,
+ -376835, -375130, -373440, -371765, -370105, -368459, -366826, -365208,
+ -363604, -362013, -360436, -358872, -357321, -355783, -354257, -352744,
+ -351244, -349756, -348280, -346816, -345364, -343924, -342495, -341078,
+ -339671, -338276, -336892, -335519, -334157, -332805, -331464, -330133,
+ -328812, -327502, -326201, -324910, -323629, -322358, -321097, -319844,
+ -318601, -317368, -316143, -314928, -313721, -312524, -311335, -310154,
+ -308983, -307819, -306664, -305517, -304379, -303248, -302126, -301011,
+ -299904, -298805, -297714, -296630, -295554, -294485, -293423, -292369,
+ -291322, -290282, -289249, -288223, -287204, -286192, -285186, -284188,
+ -283195, -282210, -281231, -280258, -279292, -278332, -277378, -276430,
+ -275489, -274553, -273624, -272700, -271782, -270871, -269965, -269064,
+ -268169, -267280, -266397, -265519, -264646, -263779, -262917, -262060,
+ -261209, -260363, -259522, -258686, -257855, -257029, -256208, -255392,
+ -254581, -253774, -252973, -252176, -251384, -250596, -249813, -249035,
+ -248261, -247492, -246727, -245966, -245210, -244458, -243711, -242967,
+ -242228, -241493, -240763, -240036, -239314, -238595, -237881, -237170,
+ -236463, -235761, -235062, -234367, -233676, -232988, -232304, -231624,
+ -230948, -230275, -229606, -228941, -228279, -227621, -226966, -226314,
+ -225666, -225022, -224381, -223743, -223108, -222477, -221849, -221225,
+ -220603, -219985, -219370, -218758, -218149, -217544, -216941, -216341,
+ -215745, -215151, -214561, -213973, -213389, -212807, -212228, -211652,
+ -211079, -210509, -209941, -209376, -208815, -208255, -207699, -207145,
+ -206594, -206045, -205500, -204956, -204416, -203878, -203342, -202809,
+ -202279, -201751, -201226, -200703, -200182, -199664, -199149, -198636,
+ -198125, -197616, -197110, -196606, -196105, -195606, -195109, -194614,
+ -194122, -193631, -193143, -192658, -192174, -191693, -191213, -190736,
+ -190261, -189789, -189318, -188849, -188382, -187918, -187455, -186995,
+ -186536, -186080, -185625, -185173, -184722, -184274, -183827, -183382,
+ -182939, -182498, -182059, -181622, -181186, -180753, -180321, -179891,
+ -179463, -179037, -178612, -178190, -177769, -177349, -176932, -176516,
+ -176102, -175690, -175279, -174870, -174463, -174057, -173653, -173251,
+ -172850, -172451, -172053, -171657, -171263, -170870, -170479, -170089,
+ -169701, -169315, -168930, -168546, -168164, -167784, -167405, -167027,
+ -166651, -166277, -165904, -165532, -165162, -164793, -164426, -164060,
+ -163695, -163332, -162970, -162610, -162251, -161893, -161537, -161182,
+ -160828, -160476, -160125, -159775, -159427, -159079, -158734, -158389,
+ -158046, -157704, -157363, -157024, -156686, -156349, -156013, -155678,
+ -155345, -155013, -154682, -154352, -154024, -153697, -153370, -153045,
+ -152722, -152399, -152077, -151757, -151438, -151120, -150803, -150487,
+ -150172, -149859, -149546, -149235, -148924, -148615, -148307, -148000,
+ -147693, -147388, -147084, -146782, -146480, -146179, -145879, -145580,
+ -145282, -144986, -144690, -144395, -144101, -143808, -143517, -143226,
+ -142936, -142647, -142359, -142072, -141786, -141501, -141217, -140934,
+ -140651, -140370, -140090, -139810, -139532, -139254, -138977, -138701,
+ -138426, -138152, -137879, -137607, -137335, -137065, -136795, -136526,
+ -136258, -135991, -135725, -135459, -135195, -134931, -134668, -134406,
+ -134145, -133884, -133625, -133366, -133108, -132851, -132594, -132339,
+ -132084, -131830, -131576, -131324, -131072, -130821, -130571, -130322,
+ -130073, -129825, -129578, -129332, -129086, -128841, -128597, -128353,
+ -128111, -127869, -127627, -127387, -127147, -126908, -126669, -126432,
+ -126195, -125959, -125723, -125488, -125254, -125020, -124787, -124555,
+ -124324, -124093, -123863, -123633, -123404, -123176, -122949, -122722,
+ -122496, -122270, -122045, -121821, -121597, -121374, -121152, -120930,
+ -120709, -120489, -120269, -120050, -119831, -119613, -119396, -119179,
+ -118963, -118747, -118532, -118318, -118104, -117891, -117678, -117466,
+ -117254, -117044, -116833, -116623, -116414, -116206, -115998, -115790,
+ -115583, -115377, -115171, -114966, -114761, -114557, -114354, -114151,
+ -113948, -113746, -113545, -113344, -113143, -112944, -112744, -112546,
+ -112347, -112150, -111952, -111756, -111560, -111364, -111169, -110974,
+ -110780, -110586, -110393, -110200, -110008, -109817, -109626, -109435,
+ -109245, -109055, -108866, -108677, -108489, -108301, -108114, -107927,
+ -107741, -107555, -107369, -107184, -107000, -106816, -106632, -106449,
+ -106266, -106084, -105902, -105721, -105540, -105360, -105180, -105000,
+ -104821, -104643, -104465, -104287, -104109, -103933, -103756, -103580,
+ -103404, -103229, -103054, -102880, -102706, -102533, -102360, -102187,
+ -102015, -101843, -101671, -101500, -101330, -101159, -100990, -100820,
+ -100651, -100482, -100314, -100146, -99979, -99812, -99645, -99479,
+ -99313, -99148, -98982, -98818, -98653, -98489, -98326, -98163,
+ -98000, -97837, -97675, -97513, -97352, -97191, -97030, -96870,
+ -96710, -96551, -96391, -96233, -96074, -95916, -95758, -95601,
+ -95444, -95287, -95131, -94975, -94819, -94664, -94509, -94354,
+ -94200, -94046, -93892, -93739, -93586, -93434, -93281, -93129,
+ -92978, -92826, -92675, -92525, -92375, -92225, -92075, -91926,
+ -91777, -91628, -91480, -91332, -91184, -91036, -90889, -90742,
+ -90596, -90450, -90304, -90158, -90013, -89868, -89724, -89579,
+ -89435, -89292, -89148, -89005, -88862, -88720, -88577, -88435,
+ -88294, -88152, -88011, -87871, -87730, -87590, -87450, -87310,
+ -87171, -87032, -86893, -86755, -86616, -86479, -86341, -86204,
+ -86066, -85930, -85793, -85657, -85521, -85385, -85250, -85114,
+ -84980, -84845, -84710, -84576, -84443, -84309, -84176, -84043,
+ -83910, -83777, -83645, -83513, -83381, -83250, -83118, -82987,
+ -82857, -82726, -82596, -82466, -82336, -82207, -82078, -81949,
+ -81820, -81691, -81563, -81435, -81307, -81180, -81053, -80925,
+ -80799, -80672, -80546, -80420, -80294, -80168, -80043, -79918,
+ -79793, -79668, -79544, -79420, -79296, -79172, -79048, -78925,
+ -78802, -78679, -78557, -78434, -78312, -78190, -78068, -77947,
+ -77826, -77705, -77584, -77463, -77343, -77223, -77103, -76983,
+ -76864, -76744, -76625, -76506, -76388, -76269, -76151, -76033,
+ -75915, -75797, -75680, -75563, -75446, -75329, -75213, -75096,
+ -74980, -74864, -74748, -74633, -74517, -74402, -74287, -74172,
+ -74058, -73944, -73829, -73715, -73602, -73488, -73375, -73262,
+ -73149, -73036, -72923, -72811, -72699, -72587, -72475, -72363,
+ -72252, -72140, -72029, -71918, -71808, -71697, -71587, -71477,
+ -71367, -71257, -71147, -71038, -70929, -70820, -70711, -70602,
+ -70494, -70385, -70277, -70169, -70061, -69954, -69846, -69739,
+ -69632, -69525, -69418, -69312, -69205, -69099, -68993, -68887,
+ -68781, -68676, -68570, -68465, -68360, -68255, -68151, -68046,
+ -67942, -67837, -67733, -67629, -67526, -67422, -67319, -67216,
+ -67113, -67010, -66907, -66804, -66702, -66600, -66498, -66396,
+ -66294, -66192, -66091, -65989, -65888, -65787, -65686, -65586,
+ -65485, -65385, -65285, -65185, -65085, -64985, -64885, -64786,
+ -64687, -64587, -64488, -64389, -64291, -64192, -64094, -63996,
+ -63897, -63799, -63702, -63604, -63506, -63409, -63312, -63215,
+ -63118, -63021, -62924, -62828, -62731, -62635, -62539, -62443,
+ -62347, -62251, -62156, -62060, -61965, -61870, -61775, -61680,
+ -61585, -61491, -61396, -61302, -61208, -61114, -61020, -60926,
+ -60833, -60739, -60646, -60552, -60459, -60366, -60273, -60181,
+ -60088, -59996, -59903, -59811, -59719, -59627, -59535, -59444,
+ -59352, -59261, -59169, -59078, -58987, -58896, -58805, -58715,
+ -58624, -58534, -58443, -58353, -58263, -58173, -58083, -57994,
+ -57904, -57815, -57725, -57636, -57547, -57458, -57369, -57281,
+ -57192, -57104, -57015, -56927, -56839, -56751, -56663, -56575,
+ -56487, -56400, -56312, -56225, -56138, -56051, -55964, -55877,
+ -55790, -55704, -55617, -55531, -55444, -55358, -55272, -55186,
+ -55100, -55015, -54929, -54843, -54758, -54673, -54587, -54502,
+ -54417, -54333, -54248, -54163, -54079, -53994, -53910, -53826,
+ -53741, -53657, -53574, -53490, -53406, -53322, -53239, -53156,
+ -53072, -52989, -52906, -52823, -52740, -52657, -52575, -52492,
+ -52410, -52327, -52245, -52163, -52081, -51999, -51917, -51835,
+ -51754, -51672, -51591, -51509, -51428, -51347, -51266, -51185,
+ -51104, -51023, -50942, -50862, -50781, -50701, -50621, -50540,
+ -50460, -50380, -50300, -50221, -50141, -50061, -49982, -49902,
+ -49823, -49744, -49664, -49585, -49506, -49427, -49349, -49270,
+ -49191, -49113, -49034, -48956, -48878, -48799, -48721, -48643,
+ -48565, -48488, -48410, -48332, -48255, -48177, -48100, -48022,
+ -47945, -47868, -47791, -47714, -47637, -47560, -47484, -47407,
+ -47331, -47254, -47178, -47102, -47025, -46949, -46873, -46797,
+ -46721, -46646, -46570, -46494, -46419, -46343, -46268, -46193,
+ -46118, -46042, -45967, -45892, -45818, -45743, -45668, -45593,
+ -45519, -45444, -45370, -45296, -45221, -45147, -45073, -44999,
+ -44925, -44851, -44778, -44704, -44630, -44557, -44483, -44410,
+ -44337, -44263, -44190, -44117, -44044, -43971, -43898, -43826,
+ -43753, -43680, -43608, -43535, -43463, -43390, -43318, -43246,
+ -43174, -43102, -43030, -42958, -42886, -42814, -42743, -42671,
+ -42600, -42528, -42457, -42385, -42314, -42243, -42172, -42101,
+ -42030, -41959, -41888, -41817, -41747, -41676, -41605, -41535,
+ -41465, -41394, -41324, -41254, -41184, -41113, -41043, -40973,
+ -40904, -40834, -40764, -40694, -40625, -40555, -40486, -40416,
+ -40347, -40278, -40208, -40139, -40070, -40001, -39932, -39863,
+ -39794, -39726, -39657, -39588, -39520, -39451, -39383, -39314,
+ -39246, -39178, -39110, -39042, -38973, -38905, -38837, -38770,
+ -38702, -38634, -38566, -38499, -38431, -38364, -38296, -38229,
+ -38161, -38094, -38027, -37960, -37893, -37826, -37759, -37692,
+ -37625, -37558, -37491, -37425, -37358, -37291, -37225, -37158,
+ -37092, -37026, -36959, -36893, -36827, -36761, -36695, -36629,
+ -36563, -36497, -36431, -36365, -36300, -36234, -36168, -36103,
+ -36037, -35972, -35907, -35841, -35776, -35711, -35646, -35580,
+ -35515, -35450, -35385, -35321, -35256, -35191, -35126, -35062,
+ -34997, -34932, -34868, -34803, -34739, -34675, -34610, -34546,
+ -34482, -34418, -34354, -34289, -34225, -34162, -34098, -34034,
+ -33970, -33906, -33843, -33779, -33715, -33652, -33588, -33525,
+ -33461, -33398, -33335, -33272, -33208, -33145, -33082, -33019,
+ -32956, -32893, -32830, -32767, -32705, -32642, -32579, -32516,
+ -32454, -32391, -32329, -32266, -32204, -32141, -32079, -32017,
+ -31955, -31892, -31830, -31768, -31706, -31644, -31582, -31520,
+ -31458, -31396, -31335, -31273, -31211, -31150, -31088, -31026,
+ -30965, -30904, -30842, -30781, -30719, -30658, -30597, -30536,
+ -30474, -30413, -30352, -30291, -30230, -30169, -30108, -30048,
+ -29987, -29926, -29865, -29805, -29744, -29683, -29623, -29562,
+ -29502, -29441, -29381, -29321, -29260, -29200, -29140, -29080,
+ -29020, -28959, -28899, -28839, -28779, -28719, -28660, -28600,
+ -28540, -28480, -28420, -28361, -28301, -28241, -28182, -28122,
+ -28063, -28003, -27944, -27884, -27825, -27766, -27707, -27647,
+ -27588, -27529, -27470, -27411, -27352, -27293, -27234, -27175,
+ -27116, -27057, -26998, -26940, -26881, -26822, -26763, -26705,
+ -26646, -26588, -26529, -26471, -26412, -26354, -26295, -26237,
+ -26179, -26120, -26062, -26004, -25946, -25888, -25830, -25772,
+ -25714, -25656, -25598, -25540, -25482, -25424, -25366, -25308,
+ -25251, -25193, -25135, -25078, -25020, -24962, -24905, -24847,
+ -24790, -24732, -24675, -24618, -24560, -24503, -24446, -24389,
+ -24331, -24274, -24217, -24160, -24103, -24046, -23989, -23932,
+ -23875, -23818, -23761, -23704, -23647, -23591, -23534, -23477,
+ -23420, -23364, -23307, -23250, -23194, -23137, -23081, -23024,
+ -22968, -22911, -22855, -22799, -22742, -22686, -22630, -22573,
+ -22517, -22461, -22405, -22349, -22293, -22237, -22181, -22125,
+ -22069, -22013, -21957, -21901, -21845, -21789, -21733, -21678,
+ -21622, -21566, -21510, -21455, -21399, -21343, -21288, -21232,
+ -21177, -21121, -21066, -21010, -20955, -20900, -20844, -20789,
+ -20734, -20678, -20623, -20568, -20513, -20457, -20402, -20347,
+ -20292, -20237, -20182, -20127, -20072, -20017, -19962, -19907,
+ -19852, -19797, -19742, -19688, -19633, -19578, -19523, -19469,
+ -19414, -19359, -19305, -19250, -19195, -19141, -19086, -19032,
+ -18977, -18923, -18868, -18814, -18760, -18705, -18651, -18597,
+ -18542, -18488, -18434, -18380, -18325, -18271, -18217, -18163,
+ -18109, -18055, -18001, -17946, -17892, -17838, -17784, -17731,
+ -17677, -17623, -17569, -17515, -17461, -17407, -17353, -17300,
+ -17246, -17192, -17138, -17085, -17031, -16977, -16924, -16870,
+ -16817, -16763, -16710, -16656, -16603, -16549, -16496, -16442,
+ -16389, -16335, -16282, -16229, -16175, -16122, -16069, -16015,
+ -15962, -15909, -15856, -15802, -15749, -15696, -15643, -15590,
+ -15537, -15484, -15431, -15378, -15325, -15272, -15219, -15166,
+ -15113, -15060, -15007, -14954, -14901, -14848, -14795, -14743,
+ -14690, -14637, -14584, -14531, -14479, -14426, -14373, -14321,
+ -14268, -14215, -14163, -14110, -14057, -14005, -13952, -13900,
+ -13847, -13795, -13742, -13690, -13637, -13585, -13533, -13480,
+ -13428, -13375, -13323, -13271, -13218, -13166, -13114, -13062,
+ -13009, -12957, -12905, -12853, -12800, -12748, -12696, -12644,
+ -12592, -12540, -12488, -12436, -12383, -12331, -12279, -12227,
+ -12175, -12123, -12071, -12019, -11967, -11916, -11864, -11812,
+ -11760, -11708, -11656, -11604, -11552, -11501, -11449, -11397,
+ -11345, -11293, -11242, -11190, -11138, -11086, -11035, -10983,
+ -10931, -10880, -10828, -10777, -10725, -10673, -10622, -10570,
+ -10519, -10467, -10415, -10364, -10312, -10261, -10209, -10158,
+ -10106, -10055, -10004, -9952, -9901, -9849, -9798, -9747,
+ -9695, -9644, -9592, -9541, -9490, -9438, -9387, -9336,
+ -9285, -9233, -9182, -9131, -9080, -9028, -8977, -8926,
+ -8875, -8824, -8772, -8721, -8670, -8619, -8568, -8517,
+ -8466, -8414, -8363, -8312, -8261, -8210, -8159, -8108,
+ -8057, -8006, -7955, -7904, -7853, -7802, -7751, -7700,
+ -7649, -7598, -7547, -7496, -7445, -7395, -7344, -7293,
+ -7242, -7191, -7140, -7089, -7038, -6988, -6937, -6886,
+ -6835, -6784, -6733, -6683, -6632, -6581, -6530, -6480,
+ -6429, -6378, -6327, -6277, -6226, -6175, -6124, -6074,
+ -6023, -5972, -5922, -5871, -5820, -5770, -5719, -5668,
+ -5618, -5567, -5517, -5466, -5415, -5365, -5314, -5264,
+ -5213, -5162, -5112, -5061, -5011, -4960, -4910, -4859,
+ -4808, -4758, -4707, -4657, -4606, -4556, -4505, -4455,
+ -4404, -4354, -4303, -4253, -4202, -4152, -4101, -4051,
+ -4001, -3950, -3900, -3849, -3799, -3748, -3698, -3648,
+ -3597, -3547, -3496, -3446, -3395, -3345, -3295, -3244,
+ -3194, -3144, -3093, -3043, -2992, -2942, -2892, -2841,
+ -2791, -2741, -2690, -2640, -2590, -2539, -2489, -2439,
+ -2388, -2338, -2288, -2237, -2187, -2137, -2086, -2036,
+ -1986, -1935, -1885, -1835, -1784, -1734, -1684, -1633,
+ -1583, -1533, -1483, -1432, -1382, -1332, -1281, -1231,
+ -1181, -1131, -1080, -1030, -980, -929, -879, -829,
+ -779, -728, -678, -628, -578, -527, -477, -427,
+ -376, -326, -276, -226, -175, -125, -75, -25,
+ 25, 75, 125, 175, 226, 276, 326, 376,
+ 427, 477, 527, 578, 628, 678, 728, 779,
+ 829, 879, 929, 980, 1030, 1080, 1131, 1181,
+ 1231, 1281, 1332, 1382, 1432, 1483, 1533, 1583,
+ 1633, 1684, 1734, 1784, 1835, 1885, 1935, 1986,
+ 2036, 2086, 2137, 2187, 2237, 2288, 2338, 2388,
+ 2439, 2489, 2539, 2590, 2640, 2690, 2741, 2791,
+ 2841, 2892, 2942, 2992, 3043, 3093, 3144, 3194,
+ 3244, 3295, 3345, 3395, 3446, 3496, 3547, 3597,
+ 3648, 3698, 3748, 3799, 3849, 3900, 3950, 4001,
+ 4051, 4101, 4152, 4202, 4253, 4303, 4354, 4404,
+ 4455, 4505, 4556, 4606, 4657, 4707, 4758, 4808,
+ 4859, 4910, 4960, 5011, 5061, 5112, 5162, 5213,
+ 5264, 5314, 5365, 5415, 5466, 5517, 5567, 5618,
+ 5668, 5719, 5770, 5820, 5871, 5922, 5972, 6023,
+ 6074, 6124, 6175, 6226, 6277, 6327, 6378, 6429,
+ 6480, 6530, 6581, 6632, 6683, 6733, 6784, 6835,
+ 6886, 6937, 6988, 7038, 7089, 7140, 7191, 7242,
+ 7293, 7344, 7395, 7445, 7496, 7547, 7598, 7649,
+ 7700, 7751, 7802, 7853, 7904, 7955, 8006, 8057,
+ 8108, 8159, 8210, 8261, 8312, 8363, 8414, 8466,
+ 8517, 8568, 8619, 8670, 8721, 8772, 8824, 8875,
+ 8926, 8977, 9028, 9080, 9131, 9182, 9233, 9285,
+ 9336, 9387, 9438, 9490, 9541, 9592, 9644, 9695,
+ 9747, 9798, 9849, 9901, 9952, 10004, 10055, 10106,
+ 10158, 10209, 10261, 10312, 10364, 10415, 10467, 10519,
+ 10570, 10622, 10673, 10725, 10777, 10828, 10880, 10931,
+ 10983, 11035, 11086, 11138, 11190, 11242, 11293, 11345,
+ 11397, 11449, 11501, 11552, 11604, 11656, 11708, 11760,
+ 11812, 11864, 11916, 11967, 12019, 12071, 12123, 12175,
+ 12227, 12279, 12331, 12383, 12436, 12488, 12540, 12592,
+ 12644, 12696, 12748, 12800, 12853, 12905, 12957, 13009,
+ 13062, 13114, 13166, 13218, 13271, 13323, 13375, 13428,
+ 13480, 13533, 13585, 13637, 13690, 13742, 13795, 13847,
+ 13900, 13952, 14005, 14057, 14110, 14163, 14215, 14268,
+ 14321, 14373, 14426, 14479, 14531, 14584, 14637, 14690,
+ 14743, 14795, 14848, 14901, 14954, 15007, 15060, 15113,
+ 15166, 15219, 15272, 15325, 15378, 15431, 15484, 15537,
+ 15590, 15643, 15696, 15749, 15802, 15856, 15909, 15962,
+ 16015, 16069, 16122, 16175, 16229, 16282, 16335, 16389,
+ 16442, 16496, 16549, 16603, 16656, 16710, 16763, 16817,
+ 16870, 16924, 16977, 17031, 17085, 17138, 17192, 17246,
+ 17300, 17353, 17407, 17461, 17515, 17569, 17623, 17677,
+ 17731, 17784, 17838, 17892, 17946, 18001, 18055, 18109,
+ 18163, 18217, 18271, 18325, 18380, 18434, 18488, 18542,
+ 18597, 18651, 18705, 18760, 18814, 18868, 18923, 18977,
+ 19032, 19086, 19141, 19195, 19250, 19305, 19359, 19414,
+ 19469, 19523, 19578, 19633, 19688, 19742, 19797, 19852,
+ 19907, 19962, 20017, 20072, 20127, 20182, 20237, 20292,
+ 20347, 20402, 20457, 20513, 20568, 20623, 20678, 20734,
+ 20789, 20844, 20900, 20955, 21010, 21066, 21121, 21177,
+ 21232, 21288, 21343, 21399, 21455, 21510, 21566, 21622,
+ 21678, 21733, 21789, 21845, 21901, 21957, 22013, 22069,
+ 22125, 22181, 22237, 22293, 22349, 22405, 22461, 22517,
+ 22573, 22630, 22686, 22742, 22799, 22855, 22911, 22968,
+ 23024, 23081, 23137, 23194, 23250, 23307, 23364, 23420,
+ 23477, 23534, 23591, 23647, 23704, 23761, 23818, 23875,
+ 23932, 23989, 24046, 24103, 24160, 24217, 24274, 24331,
+ 24389, 24446, 24503, 24560, 24618, 24675, 24732, 24790,
+ 24847, 24905, 24962, 25020, 25078, 25135, 25193, 25251,
+ 25308, 25366, 25424, 25482, 25540, 25598, 25656, 25714,
+ 25772, 25830, 25888, 25946, 26004, 26062, 26120, 26179,
+ 26237, 26295, 26354, 26412, 26471, 26529, 26588, 26646,
+ 26705, 26763, 26822, 26881, 26940, 26998, 27057, 27116,
+ 27175, 27234, 27293, 27352, 27411, 27470, 27529, 27588,
+ 27647, 27707, 27766, 27825, 27884, 27944, 28003, 28063,
+ 28122, 28182, 28241, 28301, 28361, 28420, 28480, 28540,
+ 28600, 28660, 28719, 28779, 28839, 28899, 28959, 29020,
+ 29080, 29140, 29200, 29260, 29321, 29381, 29441, 29502,
+ 29562, 29623, 29683, 29744, 29805, 29865, 29926, 29987,
+ 30048, 30108, 30169, 30230, 30291, 30352, 30413, 30474,
+ 30536, 30597, 30658, 30719, 30781, 30842, 30904, 30965,
+ 31026, 31088, 31150, 31211, 31273, 31335, 31396, 31458,
+ 31520, 31582, 31644, 31706, 31768, 31830, 31892, 31955,
+ 32017, 32079, 32141, 32204, 32266, 32329, 32391, 32454,
+ 32516, 32579, 32642, 32705, 32767, 32830, 32893, 32956,
+ 33019, 33082, 33145, 33208, 33272, 33335, 33398, 33461,
+ 33525, 33588, 33652, 33715, 33779, 33843, 33906, 33970,
+ 34034, 34098, 34162, 34225, 34289, 34354, 34418, 34482,
+ 34546, 34610, 34675, 34739, 34803, 34868, 34932, 34997,
+ 35062, 35126, 35191, 35256, 35321, 35385, 35450, 35515,
+ 35580, 35646, 35711, 35776, 35841, 35907, 35972, 36037,
+ 36103, 36168, 36234, 36300, 36365, 36431, 36497, 36563,
+ 36629, 36695, 36761, 36827, 36893, 36959, 37026, 37092,
+ 37158, 37225, 37291, 37358, 37425, 37491, 37558, 37625,
+ 37692, 37759, 37826, 37893, 37960, 38027, 38094, 38161,
+ 38229, 38296, 38364, 38431, 38499, 38566, 38634, 38702,
+ 38770, 38837, 38905, 38973, 39042, 39110, 39178, 39246,
+ 39314, 39383, 39451, 39520, 39588, 39657, 39726, 39794,
+ 39863, 39932, 40001, 40070, 40139, 40208, 40278, 40347,
+ 40416, 40486, 40555, 40625, 40694, 40764, 40834, 40904,
+ 40973, 41043, 41113, 41184, 41254, 41324, 41394, 41465,
+ 41535, 41605, 41676, 41747, 41817, 41888, 41959, 42030,
+ 42101, 42172, 42243, 42314, 42385, 42457, 42528, 42600,
+ 42671, 42743, 42814, 42886, 42958, 43030, 43102, 43174,
+ 43246, 43318, 43390, 43463, 43535, 43608, 43680, 43753,
+ 43826, 43898, 43971, 44044, 44117, 44190, 44263, 44337,
+ 44410, 44483, 44557, 44630, 44704, 44778, 44851, 44925,
+ 44999, 45073, 45147, 45221, 45296, 45370, 45444, 45519,
+ 45593, 45668, 45743, 45818, 45892, 45967, 46042, 46118,
+ 46193, 46268, 46343, 46419, 46494, 46570, 46646, 46721,
+ 46797, 46873, 46949, 47025, 47102, 47178, 47254, 47331,
+ 47407, 47484, 47560, 47637, 47714, 47791, 47868, 47945,
+ 48022, 48100, 48177, 48255, 48332, 48410, 48488, 48565,
+ 48643, 48721, 48799, 48878, 48956, 49034, 49113, 49191,
+ 49270, 49349, 49427, 49506, 49585, 49664, 49744, 49823,
+ 49902, 49982, 50061, 50141, 50221, 50300, 50380, 50460,
+ 50540, 50621, 50701, 50781, 50862, 50942, 51023, 51104,
+ 51185, 51266, 51347, 51428, 51509, 51591, 51672, 51754,
+ 51835, 51917, 51999, 52081, 52163, 52245, 52327, 52410,
+ 52492, 52575, 52657, 52740, 52823, 52906, 52989, 53072,
+ 53156, 53239, 53322, 53406, 53490, 53574, 53657, 53741,
+ 53826, 53910, 53994, 54079, 54163, 54248, 54333, 54417,
+ 54502, 54587, 54673, 54758, 54843, 54929, 55015, 55100,
+ 55186, 55272, 55358, 55444, 55531, 55617, 55704, 55790,
+ 55877, 55964, 56051, 56138, 56225, 56312, 56400, 56487,
+ 56575, 56663, 56751, 56839, 56927, 57015, 57104, 57192,
+ 57281, 57369, 57458, 57547, 57636, 57725, 57815, 57904,
+ 57994, 58083, 58173, 58263, 58353, 58443, 58534, 58624,
+ 58715, 58805, 58896, 58987, 59078, 59169, 59261, 59352,
+ 59444, 59535, 59627, 59719, 59811, 59903, 59996, 60088,
+ 60181, 60273, 60366, 60459, 60552, 60646, 60739, 60833,
+ 60926, 61020, 61114, 61208, 61302, 61396, 61491, 61585,
+ 61680, 61775, 61870, 61965, 62060, 62156, 62251, 62347,
+ 62443, 62539, 62635, 62731, 62828, 62924, 63021, 63118,
+ 63215, 63312, 63409, 63506, 63604, 63702, 63799, 63897,
+ 63996, 64094, 64192, 64291, 64389, 64488, 64587, 64687,
+ 64786, 64885, 64985, 65085, 65185, 65285, 65385, 65485,
+ 65586, 65686, 65787, 65888, 65989, 66091, 66192, 66294,
+ 66396, 66498, 66600, 66702, 66804, 66907, 67010, 67113,
+ 67216, 67319, 67422, 67526, 67629, 67733, 67837, 67942,
+ 68046, 68151, 68255, 68360, 68465, 68570, 68676, 68781,
+ 68887, 68993, 69099, 69205, 69312, 69418, 69525, 69632,
+ 69739, 69846, 69954, 70061, 70169, 70277, 70385, 70494,
+ 70602, 70711, 70820, 70929, 71038, 71147, 71257, 71367,
+ 71477, 71587, 71697, 71808, 71918, 72029, 72140, 72252,
+ 72363, 72475, 72587, 72699, 72811, 72923, 73036, 73149,
+ 73262, 73375, 73488, 73602, 73715, 73829, 73944, 74058,
+ 74172, 74287, 74402, 74517, 74633, 74748, 74864, 74980,
+ 75096, 75213, 75329, 75446, 75563, 75680, 75797, 75915,
+ 76033, 76151, 76269, 76388, 76506, 76625, 76744, 76864,
+ 76983, 77103, 77223, 77343, 77463, 77584, 77705, 77826,
+ 77947, 78068, 78190, 78312, 78434, 78557, 78679, 78802,
+ 78925, 79048, 79172, 79296, 79420, 79544, 79668, 79793,
+ 79918, 80043, 80168, 80294, 80420, 80546, 80672, 80799,
+ 80925, 81053, 81180, 81307, 81435, 81563, 81691, 81820,
+ 81949, 82078, 82207, 82336, 82466, 82596, 82726, 82857,
+ 82987, 83118, 83250, 83381, 83513, 83645, 83777, 83910,
+ 84043, 84176, 84309, 84443, 84576, 84710, 84845, 84980,
+ 85114, 85250, 85385, 85521, 85657, 85793, 85930, 86066,
+ 86204, 86341, 86479, 86616, 86755, 86893, 87032, 87171,
+ 87310, 87450, 87590, 87730, 87871, 88011, 88152, 88294,
+ 88435, 88577, 88720, 88862, 89005, 89148, 89292, 89435,
+ 89579, 89724, 89868, 90013, 90158, 90304, 90450, 90596,
+ 90742, 90889, 91036, 91184, 91332, 91480, 91628, 91777,
+ 91926, 92075, 92225, 92375, 92525, 92675, 92826, 92978,
+ 93129, 93281, 93434, 93586, 93739, 93892, 94046, 94200,
+ 94354, 94509, 94664, 94819, 94975, 95131, 95287, 95444,
+ 95601, 95758, 95916, 96074, 96233, 96391, 96551, 96710,
+ 96870, 97030, 97191, 97352, 97513, 97675, 97837, 98000,
+ 98163, 98326, 98489, 98653, 98818, 98982, 99148, 99313,
+ 99479, 99645, 99812, 99979, 100146, 100314, 100482, 100651,
+ 100820, 100990, 101159, 101330, 101500, 101671, 101843, 102015,
+ 102187, 102360, 102533, 102706, 102880, 103054, 103229, 103404,
+ 103580, 103756, 103933, 104109, 104287, 104465, 104643, 104821,
+ 105000, 105180, 105360, 105540, 105721, 105902, 106084, 106266,
+ 106449, 106632, 106816, 107000, 107184, 107369, 107555, 107741,
+ 107927, 108114, 108301, 108489, 108677, 108866, 109055, 109245,
+ 109435, 109626, 109817, 110008, 110200, 110393, 110586, 110780,
+ 110974, 111169, 111364, 111560, 111756, 111952, 112150, 112347,
+ 112546, 112744, 112944, 113143, 113344, 113545, 113746, 113948,
+ 114151, 114354, 114557, 114761, 114966, 115171, 115377, 115583,
+ 115790, 115998, 116206, 116414, 116623, 116833, 117044, 117254,
+ 117466, 117678, 117891, 118104, 118318, 118532, 118747, 118963,
+ 119179, 119396, 119613, 119831, 120050, 120269, 120489, 120709,
+ 120930, 121152, 121374, 121597, 121821, 122045, 122270, 122496,
+ 122722, 122949, 123176, 123404, 123633, 123863, 124093, 124324,
+ 124555, 124787, 125020, 125254, 125488, 125723, 125959, 126195,
+ 126432, 126669, 126908, 127147, 127387, 127627, 127869, 128111,
+ 128353, 128597, 128841, 129086, 129332, 129578, 129825, 130073,
+ 130322, 130571, 130821, 131072, 131324, 131576, 131830, 132084,
+ 132339, 132594, 132851, 133108, 133366, 133625, 133884, 134145,
+ 134406, 134668, 134931, 135195, 135459, 135725, 135991, 136258,
+ 136526, 136795, 137065, 137335, 137607, 137879, 138152, 138426,
+ 138701, 138977, 139254, 139532, 139810, 140090, 140370, 140651,
+ 140934, 141217, 141501, 141786, 142072, 142359, 142647, 142936,
+ 143226, 143517, 143808, 144101, 144395, 144690, 144986, 145282,
+ 145580, 145879, 146179, 146480, 146782, 147084, 147388, 147693,
+ 148000, 148307, 148615, 148924, 149235, 149546, 149859, 150172,
+ 150487, 150803, 151120, 151438, 151757, 152077, 152399, 152722,
+ 153045, 153370, 153697, 154024, 154352, 154682, 155013, 155345,
+ 155678, 156013, 156349, 156686, 157024, 157363, 157704, 158046,
+ 158389, 158734, 159079, 159427, 159775, 160125, 160476, 160828,
+ 161182, 161537, 161893, 162251, 162610, 162970, 163332, 163695,
+ 164060, 164426, 164793, 165162, 165532, 165904, 166277, 166651,
+ 167027, 167405, 167784, 168164, 168546, 168930, 169315, 169701,
+ 170089, 170479, 170870, 171263, 171657, 172053, 172451, 172850,
+ 173251, 173653, 174057, 174463, 174870, 175279, 175690, 176102,
+ 176516, 176932, 177349, 177769, 178190, 178612, 179037, 179463,
+ 179891, 180321, 180753, 181186, 181622, 182059, 182498, 182939,
+ 183382, 183827, 184274, 184722, 185173, 185625, 186080, 186536,
+ 186995, 187455, 187918, 188382, 188849, 189318, 189789, 190261,
+ 190736, 191213, 191693, 192174, 192658, 193143, 193631, 194122,
+ 194614, 195109, 195606, 196105, 196606, 197110, 197616, 198125,
+ 198636, 199149, 199664, 200182, 200703, 201226, 201751, 202279,
+ 202809, 203342, 203878, 204416, 204956, 205500, 206045, 206594,
+ 207145, 207699, 208255, 208815, 209376, 209941, 210509, 211079,
+ 211652, 212228, 212807, 213389, 213973, 214561, 215151, 215745,
+ 216341, 216941, 217544, 218149, 218758, 219370, 219985, 220603,
+ 221225, 221849, 222477, 223108, 223743, 224381, 225022, 225666,
+ 226314, 226966, 227621, 228279, 228941, 229606, 230275, 230948,
+ 231624, 232304, 232988, 233676, 234367, 235062, 235761, 236463,
+ 237170, 237881, 238595, 239314, 240036, 240763, 241493, 242228,
+ 242967, 243711, 244458, 245210, 245966, 246727, 247492, 248261,
+ 249035, 249813, 250596, 251384, 252176, 252973, 253774, 254581,
+ 255392, 256208, 257029, 257855, 258686, 259522, 260363, 261209,
+ 262060, 262917, 263779, 264646, 265519, 266397, 267280, 268169,
+ 269064, 269965, 270871, 271782, 272700, 273624, 274553, 275489,
+ 276430, 277378, 278332, 279292, 280258, 281231, 282210, 283195,
+ 284188, 285186, 286192, 287204, 288223, 289249, 290282, 291322,
+ 292369, 293423, 294485, 295554, 296630, 297714, 298805, 299904,
+ 301011, 302126, 303248, 304379, 305517, 306664, 307819, 308983,
+ 310154, 311335, 312524, 313721, 314928, 316143, 317368, 318601,
+ 319844, 321097, 322358, 323629, 324910, 326201, 327502, 328812,
+ 330133, 331464, 332805, 334157, 335519, 336892, 338276, 339671,
+ 341078, 342495, 343924, 345364, 346816, 348280, 349756, 351244,
+ 352744, 354257, 355783, 357321, 358872, 360436, 362013, 363604,
+ 365208, 366826, 368459, 370105, 371765, 373440, 375130, 376835,
+ 378555, 380290, 382040, 383807, 385589, 387387, 389202, 391034,
+ 392882, 394747, 396630, 398530, 400448, 402384, 404338, 406311,
+ 408303, 410314, 412344, 414395, 416465, 418555, 420666, 422798,
+ 424951, 427125, 429321, 431540, 433781, 436045, 438332, 440643,
+ 442978, 445337, 447720, 450129, 452564, 455024, 457511, 460024,
+ 462565, 465133, 467730, 470355, 473009, 475692, 478406, 481150,
+ 483925, 486732, 489571, 492443, 495348, 498287, 501261, 504269,
+ 507313, 510394, 513512, 516667, 519861, 523094, 526366, 529680,
+ 533034, 536431, 539870, 543354, 546881, 550455, 554074, 557741,
+ 561456, 565221, 569035, 572901, 576818, 580789, 584815, 588896,
+ 593033, 597229, 601483, 605798, 610174, 614613, 619117, 623686,
+ 628323, 633028, 637803, 642651, 647572, 652568, 657640, 662792,
+ 668024, 673338, 678737, 684223, 689797, 695462, 701219, 707072,
+ 713023, 719074, 725227, 731486, 737853, 744331, 750922, 757631,
+ 764460, 771411, 778490, 785699, 793041, 800521, 808143, 815910,
+ 823827, 831898, 840127, 848520, 857081, 865817, 874730, 883829,
+ 893117, 902602, 912289, 922186, 932298, 942633, 953199, 964003,
+ 975054, 986361, 997931, 1009774, 1021901, 1034322, 1047046, 1060087,
+ 1073455, 1087164, 1101225, 1115654, 1130465, 1145673, 1161294, 1177345,
+ 1193846, 1210813, 1228269, 1246234, 1264730, 1283783, 1303416, 1323658,
+ 1344537, 1366084, 1388330, 1411312, 1435065, 1459630, 1485049, 1511367,
+ 1538632, 1566898, 1596220, 1626658, 1658278, 1691149, 1725348, 1760956,
+ 1798063, 1836758, 1877161, 1919378, 1963536, 2009771, 2058233, 2109087,
+ 2162516, 2218719, 2277919, 2340362, 2406322, 2476104, 2550052, 2628549,
+ 2712030, 2800983, 2895966, 2997613, 3106651, 3223918, 3350381, 3487165,
+ 3635590, 3797206, 3973855, 4167737, 4381502, 4618375, 4882318, 5178251,
+ 5512368, 5892567, 6329090, 6835455, 7429880, 8137527, 8994149, 10052327,
+ 11392683, 13145455, 15535599, 18988036, 24413316, 34178904, 56965752, 170910304
+ };
+
+ private static readonly int[] fineSine =
+ {
+ 25, 75, 125, 175, 226, 276, 326, 376,
+ 427, 477, 527, 578, 628, 678, 728, 779,
+ 829, 879, 929, 980, 1030, 1080, 1130, 1181,
+ 1231, 1281, 1331, 1382, 1432, 1482, 1532, 1583,
+ 1633, 1683, 1733, 1784, 1834, 1884, 1934, 1985,
+ 2035, 2085, 2135, 2186, 2236, 2286, 2336, 2387,
+ 2437, 2487, 2537, 2587, 2638, 2688, 2738, 2788,
+ 2839, 2889, 2939, 2989, 3039, 3090, 3140, 3190,
+ 3240, 3291, 3341, 3391, 3441, 3491, 3541, 3592,
+ 3642, 3692, 3742, 3792, 3843, 3893, 3943, 3993,
+ 4043, 4093, 4144, 4194, 4244, 4294, 4344, 4394,
+ 4445, 4495, 4545, 4595, 4645, 4695, 4745, 4796,
+ 4846, 4896, 4946, 4996, 5046, 5096, 5146, 5197,
+ 5247, 5297, 5347, 5397, 5447, 5497, 5547, 5597,
+ 5647, 5697, 5748, 5798, 5848, 5898, 5948, 5998,
+ 6048, 6098, 6148, 6198, 6248, 6298, 6348, 6398,
+ 6448, 6498, 6548, 6598, 6648, 6698, 6748, 6798,
+ 6848, 6898, 6948, 6998, 7048, 7098, 7148, 7198,
+ 7248, 7298, 7348, 7398, 7448, 7498, 7548, 7598,
+ 7648, 7697, 7747, 7797, 7847, 7897, 7947, 7997,
+ 8047, 8097, 8147, 8196, 8246, 8296, 8346, 8396,
+ 8446, 8496, 8545, 8595, 8645, 8695, 8745, 8794,
+ 8844, 8894, 8944, 8994, 9043, 9093, 9143, 9193,
+ 9243, 9292, 9342, 9392, 9442, 9491, 9541, 9591,
+ 9640, 9690, 9740, 9790, 9839, 9889, 9939, 9988,
+ 10038, 10088, 10137, 10187, 10237, 10286, 10336, 10386,
+ 10435, 10485, 10534, 10584, 10634, 10683, 10733, 10782,
+ 10832, 10882, 10931, 10981, 11030, 11080, 11129, 11179,
+ 11228, 11278, 11327, 11377, 11426, 11476, 11525, 11575,
+ 11624, 11674, 11723, 11773, 11822, 11872, 11921, 11970,
+ 12020, 12069, 12119, 12168, 12218, 12267, 12316, 12366,
+ 12415, 12464, 12514, 12563, 12612, 12662, 12711, 12760,
+ 12810, 12859, 12908, 12957, 13007, 13056, 13105, 13154,
+ 13204, 13253, 13302, 13351, 13401, 13450, 13499, 13548,
+ 13597, 13647, 13696, 13745, 13794, 13843, 13892, 13941,
+ 13990, 14040, 14089, 14138, 14187, 14236, 14285, 14334,
+ 14383, 14432, 14481, 14530, 14579, 14628, 14677, 14726,
+ 14775, 14824, 14873, 14922, 14971, 15020, 15069, 15118,
+ 15167, 15215, 15264, 15313, 15362, 15411, 15460, 15509,
+ 15557, 15606, 15655, 15704, 15753, 15802, 15850, 15899,
+ 15948, 15997, 16045, 16094, 16143, 16191, 16240, 16289,
+ 16338, 16386, 16435, 16484, 16532, 16581, 16629, 16678,
+ 16727, 16775, 16824, 16872, 16921, 16970, 17018, 17067,
+ 17115, 17164, 17212, 17261, 17309, 17358, 17406, 17455,
+ 17503, 17551, 17600, 17648, 17697, 17745, 17793, 17842,
+ 17890, 17939, 17987, 18035, 18084, 18132, 18180, 18228,
+ 18277, 18325, 18373, 18421, 18470, 18518, 18566, 18614,
+ 18663, 18711, 18759, 18807, 18855, 18903, 18951, 19000,
+ 19048, 19096, 19144, 19192, 19240, 19288, 19336, 19384,
+ 19432, 19480, 19528, 19576, 19624, 19672, 19720, 19768,
+ 19816, 19864, 19912, 19959, 20007, 20055, 20103, 20151,
+ 20199, 20246, 20294, 20342, 20390, 20438, 20485, 20533,
+ 20581, 20629, 20676, 20724, 20772, 20819, 20867, 20915,
+ 20962, 21010, 21057, 21105, 21153, 21200, 21248, 21295,
+ 21343, 21390, 21438, 21485, 21533, 21580, 21628, 21675,
+ 21723, 21770, 21817, 21865, 21912, 21960, 22007, 22054,
+ 22102, 22149, 22196, 22243, 22291, 22338, 22385, 22433,
+ 22480, 22527, 22574, 22621, 22668, 22716, 22763, 22810,
+ 22857, 22904, 22951, 22998, 23045, 23092, 23139, 23186,
+ 23233, 23280, 23327, 23374, 23421, 23468, 23515, 23562,
+ 23609, 23656, 23703, 23750, 23796, 23843, 23890, 23937,
+ 23984, 24030, 24077, 24124, 24171, 24217, 24264, 24311,
+ 24357, 24404, 24451, 24497, 24544, 24591, 24637, 24684,
+ 24730, 24777, 24823, 24870, 24916, 24963, 25009, 25056,
+ 25102, 25149, 25195, 25241, 25288, 25334, 25381, 25427,
+ 25473, 25520, 25566, 25612, 25658, 25705, 25751, 25797,
+ 25843, 25889, 25936, 25982, 26028, 26074, 26120, 26166,
+ 26212, 26258, 26304, 26350, 26396, 26442, 26488, 26534,
+ 26580, 26626, 26672, 26718, 26764, 26810, 26856, 26902,
+ 26947, 26993, 27039, 27085, 27131, 27176, 27222, 27268,
+ 27313, 27359, 27405, 27450, 27496, 27542, 27587, 27633,
+ 27678, 27724, 27770, 27815, 27861, 27906, 27952, 27997,
+ 28042, 28088, 28133, 28179, 28224, 28269, 28315, 28360,
+ 28405, 28451, 28496, 28541, 28586, 28632, 28677, 28722,
+ 28767, 28812, 28858, 28903, 28948, 28993, 29038, 29083,
+ 29128, 29173, 29218, 29263, 29308, 29353, 29398, 29443,
+ 29488, 29533, 29577, 29622, 29667, 29712, 29757, 29801,
+ 29846, 29891, 29936, 29980, 30025, 30070, 30114, 30159,
+ 30204, 30248, 30293, 30337, 30382, 30426, 30471, 30515,
+ 30560, 30604, 30649, 30693, 30738, 30782, 30826, 30871,
+ 30915, 30959, 31004, 31048, 31092, 31136, 31181, 31225,
+ 31269, 31313, 31357, 31402, 31446, 31490, 31534, 31578,
+ 31622, 31666, 31710, 31754, 31798, 31842, 31886, 31930,
+ 31974, 32017, 32061, 32105, 32149, 32193, 32236, 32280,
+ 32324, 32368, 32411, 32455, 32499, 32542, 32586, 32630,
+ 32673, 32717, 32760, 32804, 32847, 32891, 32934, 32978,
+ 33021, 33065, 33108, 33151, 33195, 33238, 33281, 33325,
+ 33368, 33411, 33454, 33498, 33541, 33584, 33627, 33670,
+ 33713, 33756, 33799, 33843, 33886, 33929, 33972, 34015,
+ 34057, 34100, 34143, 34186, 34229, 34272, 34315, 34358,
+ 34400, 34443, 34486, 34529, 34571, 34614, 34657, 34699,
+ 34742, 34785, 34827, 34870, 34912, 34955, 34997, 35040,
+ 35082, 35125, 35167, 35210, 35252, 35294, 35337, 35379,
+ 35421, 35464, 35506, 35548, 35590, 35633, 35675, 35717,
+ 35759, 35801, 35843, 35885, 35927, 35969, 36011, 36053,
+ 36095, 36137, 36179, 36221, 36263, 36305, 36347, 36388,
+ 36430, 36472, 36514, 36555, 36597, 36639, 36681, 36722,
+ 36764, 36805, 36847, 36889, 36930, 36972, 37013, 37055,
+ 37096, 37137, 37179, 37220, 37262, 37303, 37344, 37386,
+ 37427, 37468, 37509, 37551, 37592, 37633, 37674, 37715,
+ 37756, 37797, 37838, 37879, 37920, 37961, 38002, 38043,
+ 38084, 38125, 38166, 38207, 38248, 38288, 38329, 38370,
+ 38411, 38451, 38492, 38533, 38573, 38614, 38655, 38695,
+ 38736, 38776, 38817, 38857, 38898, 38938, 38979, 39019,
+ 39059, 39100, 39140, 39180, 39221, 39261, 39301, 39341,
+ 39382, 39422, 39462, 39502, 39542, 39582, 39622, 39662,
+ 39702, 39742, 39782, 39822, 39862, 39902, 39942, 39982,
+ 40021, 40061, 40101, 40141, 40180, 40220, 40260, 40300,
+ 40339, 40379, 40418, 40458, 40497, 40537, 40576, 40616,
+ 40655, 40695, 40734, 40773, 40813, 40852, 40891, 40931,
+ 40970, 41009, 41048, 41087, 41127, 41166, 41205, 41244,
+ 41283, 41322, 41361, 41400, 41439, 41478, 41517, 41556,
+ 41595, 41633, 41672, 41711, 41750, 41788, 41827, 41866,
+ 41904, 41943, 41982, 42020, 42059, 42097, 42136, 42174,
+ 42213, 42251, 42290, 42328, 42366, 42405, 42443, 42481,
+ 42520, 42558, 42596, 42634, 42672, 42711, 42749, 42787,
+ 42825, 42863, 42901, 42939, 42977, 43015, 43053, 43091,
+ 43128, 43166, 43204, 43242, 43280, 43317, 43355, 43393,
+ 43430, 43468, 43506, 43543, 43581, 43618, 43656, 43693,
+ 43731, 43768, 43806, 43843, 43880, 43918, 43955, 43992,
+ 44029, 44067, 44104, 44141, 44178, 44215, 44252, 44289,
+ 44326, 44363, 44400, 44437, 44474, 44511, 44548, 44585,
+ 44622, 44659, 44695, 44732, 44769, 44806, 44842, 44879,
+ 44915, 44952, 44989, 45025, 45062, 45098, 45135, 45171,
+ 45207, 45244, 45280, 45316, 45353, 45389, 45425, 45462,
+ 45498, 45534, 45570, 45606, 45642, 45678, 45714, 45750,
+ 45786, 45822, 45858, 45894, 45930, 45966, 46002, 46037,
+ 46073, 46109, 46145, 46180, 46216, 46252, 46287, 46323,
+ 46358, 46394, 46429, 46465, 46500, 46536, 46571, 46606,
+ 46642, 46677, 46712, 46747, 46783, 46818, 46853, 46888,
+ 46923, 46958, 46993, 47028, 47063, 47098, 47133, 47168,
+ 47203, 47238, 47273, 47308, 47342, 47377, 47412, 47446,
+ 47481, 47516, 47550, 47585, 47619, 47654, 47688, 47723,
+ 47757, 47792, 47826, 47860, 47895, 47929, 47963, 47998,
+ 48032, 48066, 48100, 48134, 48168, 48202, 48237, 48271,
+ 48305, 48338, 48372, 48406, 48440, 48474, 48508, 48542,
+ 48575, 48609, 48643, 48676, 48710, 48744, 48777, 48811,
+ 48844, 48878, 48911, 48945, 48978, 49012, 49045, 49078,
+ 49112, 49145, 49178, 49211, 49244, 49278, 49311, 49344,
+ 49377, 49410, 49443, 49476, 49509, 49542, 49575, 49608,
+ 49640, 49673, 49706, 49739, 49771, 49804, 49837, 49869,
+ 49902, 49935, 49967, 50000, 50032, 50065, 50097, 50129,
+ 50162, 50194, 50226, 50259, 50291, 50323, 50355, 50387,
+ 50420, 50452, 50484, 50516, 50548, 50580, 50612, 50644,
+ 50675, 50707, 50739, 50771, 50803, 50834, 50866, 50898,
+ 50929, 50961, 50993, 51024, 51056, 51087, 51119, 51150,
+ 51182, 51213, 51244, 51276, 51307, 51338, 51369, 51401,
+ 51432, 51463, 51494, 51525, 51556, 51587, 51618, 51649,
+ 51680, 51711, 51742, 51773, 51803, 51834, 51865, 51896,
+ 51926, 51957, 51988, 52018, 52049, 52079, 52110, 52140,
+ 52171, 52201, 52231, 52262, 52292, 52322, 52353, 52383,
+ 52413, 52443, 52473, 52503, 52534, 52564, 52594, 52624,
+ 52653, 52683, 52713, 52743, 52773, 52803, 52832, 52862,
+ 52892, 52922, 52951, 52981, 53010, 53040, 53069, 53099,
+ 53128, 53158, 53187, 53216, 53246, 53275, 53304, 53334,
+ 53363, 53392, 53421, 53450, 53479, 53508, 53537, 53566,
+ 53595, 53624, 53653, 53682, 53711, 53739, 53768, 53797,
+ 53826, 53854, 53883, 53911, 53940, 53969, 53997, 54026,
+ 54054, 54082, 54111, 54139, 54167, 54196, 54224, 54252,
+ 54280, 54308, 54337, 54365, 54393, 54421, 54449, 54477,
+ 54505, 54533, 54560, 54588, 54616, 54644, 54672, 54699,
+ 54727, 54755, 54782, 54810, 54837, 54865, 54892, 54920,
+ 54947, 54974, 55002, 55029, 55056, 55084, 55111, 55138,
+ 55165, 55192, 55219, 55246, 55274, 55300, 55327, 55354,
+ 55381, 55408, 55435, 55462, 55489, 55515, 55542, 55569,
+ 55595, 55622, 55648, 55675, 55701, 55728, 55754, 55781,
+ 55807, 55833, 55860, 55886, 55912, 55938, 55965, 55991,
+ 56017, 56043, 56069, 56095, 56121, 56147, 56173, 56199,
+ 56225, 56250, 56276, 56302, 56328, 56353, 56379, 56404,
+ 56430, 56456, 56481, 56507, 56532, 56557, 56583, 56608,
+ 56633, 56659, 56684, 56709, 56734, 56760, 56785, 56810,
+ 56835, 56860, 56885, 56910, 56935, 56959, 56984, 57009,
+ 57034, 57059, 57083, 57108, 57133, 57157, 57182, 57206,
+ 57231, 57255, 57280, 57304, 57329, 57353, 57377, 57402,
+ 57426, 57450, 57474, 57498, 57522, 57546, 57570, 57594,
+ 57618, 57642, 57666, 57690, 57714, 57738, 57762, 57785,
+ 57809, 57833, 57856, 57880, 57903, 57927, 57950, 57974,
+ 57997, 58021, 58044, 58067, 58091, 58114, 58137, 58160,
+ 58183, 58207, 58230, 58253, 58276, 58299, 58322, 58345,
+ 58367, 58390, 58413, 58436, 58459, 58481, 58504, 58527,
+ 58549, 58572, 58594, 58617, 58639, 58662, 58684, 58706,
+ 58729, 58751, 58773, 58795, 58818, 58840, 58862, 58884,
+ 58906, 58928, 58950, 58972, 58994, 59016, 59038, 59059,
+ 59081, 59103, 59125, 59146, 59168, 59190, 59211, 59233,
+ 59254, 59276, 59297, 59318, 59340, 59361, 59382, 59404,
+ 59425, 59446, 59467, 59488, 59509, 59530, 59551, 59572,
+ 59593, 59614, 59635, 59656, 59677, 59697, 59718, 59739,
+ 59759, 59780, 59801, 59821, 59842, 59862, 59883, 59903,
+ 59923, 59944, 59964, 59984, 60004, 60025, 60045, 60065,
+ 60085, 60105, 60125, 60145, 60165, 60185, 60205, 60225,
+ 60244, 60264, 60284, 60304, 60323, 60343, 60363, 60382,
+ 60402, 60421, 60441, 60460, 60479, 60499, 60518, 60537,
+ 60556, 60576, 60595, 60614, 60633, 60652, 60671, 60690,
+ 60709, 60728, 60747, 60766, 60785, 60803, 60822, 60841,
+ 60859, 60878, 60897, 60915, 60934, 60952, 60971, 60989,
+ 61007, 61026, 61044, 61062, 61081, 61099, 61117, 61135,
+ 61153, 61171, 61189, 61207, 61225, 61243, 61261, 61279,
+ 61297, 61314, 61332, 61350, 61367, 61385, 61403, 61420,
+ 61438, 61455, 61473, 61490, 61507, 61525, 61542, 61559,
+ 61577, 61594, 61611, 61628, 61645, 61662, 61679, 61696,
+ 61713, 61730, 61747, 61764, 61780, 61797, 61814, 61831,
+ 61847, 61864, 61880, 61897, 61913, 61930, 61946, 61963,
+ 61979, 61995, 62012, 62028, 62044, 62060, 62076, 62092,
+ 62108, 62125, 62141, 62156, 62172, 62188, 62204, 62220,
+ 62236, 62251, 62267, 62283, 62298, 62314, 62329, 62345,
+ 62360, 62376, 62391, 62407, 62422, 62437, 62453, 62468,
+ 62483, 62498, 62513, 62528, 62543, 62558, 62573, 62588,
+ 62603, 62618, 62633, 62648, 62662, 62677, 62692, 62706,
+ 62721, 62735, 62750, 62764, 62779, 62793, 62808, 62822,
+ 62836, 62850, 62865, 62879, 62893, 62907, 62921, 62935,
+ 62949, 62963, 62977, 62991, 63005, 63019, 63032, 63046,
+ 63060, 63074, 63087, 63101, 63114, 63128, 63141, 63155,
+ 63168, 63182, 63195, 63208, 63221, 63235, 63248, 63261,
+ 63274, 63287, 63300, 63313, 63326, 63339, 63352, 63365,
+ 63378, 63390, 63403, 63416, 63429, 63441, 63454, 63466,
+ 63479, 63491, 63504, 63516, 63528, 63541, 63553, 63565,
+ 63578, 63590, 63602, 63614, 63626, 63638, 63650, 63662,
+ 63674, 63686, 63698, 63709, 63721, 63733, 63745, 63756,
+ 63768, 63779, 63791, 63803, 63814, 63825, 63837, 63848,
+ 63859, 63871, 63882, 63893, 63904, 63915, 63927, 63938,
+ 63949, 63960, 63971, 63981, 63992, 64003, 64014, 64025,
+ 64035, 64046, 64057, 64067, 64078, 64088, 64099, 64109,
+ 64120, 64130, 64140, 64151, 64161, 64171, 64181, 64192,
+ 64202, 64212, 64222, 64232, 64242, 64252, 64261, 64271,
+ 64281, 64291, 64301, 64310, 64320, 64330, 64339, 64349,
+ 64358, 64368, 64377, 64387, 64396, 64405, 64414, 64424,
+ 64433, 64442, 64451, 64460, 64469, 64478, 64487, 64496,
+ 64505, 64514, 64523, 64532, 64540, 64549, 64558, 64566,
+ 64575, 64584, 64592, 64601, 64609, 64617, 64626, 64634,
+ 64642, 64651, 64659, 64667, 64675, 64683, 64691, 64699,
+ 64707, 64715, 64723, 64731, 64739, 64747, 64754, 64762,
+ 64770, 64777, 64785, 64793, 64800, 64808, 64815, 64822,
+ 64830, 64837, 64844, 64852, 64859, 64866, 64873, 64880,
+ 64887, 64895, 64902, 64908, 64915, 64922, 64929, 64936,
+ 64943, 64949, 64956, 64963, 64969, 64976, 64982, 64989,
+ 64995, 65002, 65008, 65015, 65021, 65027, 65033, 65040,
+ 65046, 65052, 65058, 65064, 65070, 65076, 65082, 65088,
+ 65094, 65099, 65105, 65111, 65117, 65122, 65128, 65133,
+ 65139, 65144, 65150, 65155, 65161, 65166, 65171, 65177,
+ 65182, 65187, 65192, 65197, 65202, 65207, 65212, 65217,
+ 65222, 65227, 65232, 65237, 65242, 65246, 65251, 65256,
+ 65260, 65265, 65270, 65274, 65279, 65283, 65287, 65292,
+ 65296, 65300, 65305, 65309, 65313, 65317, 65321, 65325,
+ 65329, 65333, 65337, 65341, 65345, 65349, 65352, 65356,
+ 65360, 65363, 65367, 65371, 65374, 65378, 65381, 65385,
+ 65388, 65391, 65395, 65398, 65401, 65404, 65408, 65411,
+ 65414, 65417, 65420, 65423, 65426, 65429, 65431, 65434,
+ 65437, 65440, 65442, 65445, 65448, 65450, 65453, 65455,
+ 65458, 65460, 65463, 65465, 65467, 65470, 65472, 65474,
+ 65476, 65478, 65480, 65482, 65484, 65486, 65488, 65490,
+ 65492, 65494, 65496, 65497, 65499, 65501, 65502, 65504,
+ 65505, 65507, 65508, 65510, 65511, 65513, 65514, 65515,
+ 65516, 65518, 65519, 65520, 65521, 65522, 65523, 65524,
+ 65525, 65526, 65527, 65527, 65528, 65529, 65530, 65530,
+ 65531, 65531, 65532, 65532, 65533, 65533, 65534, 65534,
+ 65534, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534,
+ 65534, 65534, 65533, 65533, 65532, 65532, 65531, 65531,
+ 65530, 65530, 65529, 65528, 65527, 65527, 65526, 65525,
+ 65524, 65523, 65522, 65521, 65520, 65519, 65518, 65516,
+ 65515, 65514, 65513, 65511, 65510, 65508, 65507, 65505,
+ 65504, 65502, 65501, 65499, 65497, 65496, 65494, 65492,
+ 65490, 65488, 65486, 65484, 65482, 65480, 65478, 65476,
+ 65474, 65472, 65470, 65467, 65465, 65463, 65460, 65458,
+ 65455, 65453, 65450, 65448, 65445, 65442, 65440, 65437,
+ 65434, 65431, 65429, 65426, 65423, 65420, 65417, 65414,
+ 65411, 65408, 65404, 65401, 65398, 65395, 65391, 65388,
+ 65385, 65381, 65378, 65374, 65371, 65367, 65363, 65360,
+ 65356, 65352, 65349, 65345, 65341, 65337, 65333, 65329,
+ 65325, 65321, 65317, 65313, 65309, 65305, 65300, 65296,
+ 65292, 65287, 65283, 65279, 65274, 65270, 65265, 65260,
+ 65256, 65251, 65246, 65242, 65237, 65232, 65227, 65222,
+ 65217, 65212, 65207, 65202, 65197, 65192, 65187, 65182,
+ 65177, 65171, 65166, 65161, 65155, 65150, 65144, 65139,
+ 65133, 65128, 65122, 65117, 65111, 65105, 65099, 65094,
+ 65088, 65082, 65076, 65070, 65064, 65058, 65052, 65046,
+ 65040, 65033, 65027, 65021, 65015, 65008, 65002, 64995,
+ 64989, 64982, 64976, 64969, 64963, 64956, 64949, 64943,
+ 64936, 64929, 64922, 64915, 64908, 64902, 64895, 64887,
+ 64880, 64873, 64866, 64859, 64852, 64844, 64837, 64830,
+ 64822, 64815, 64808, 64800, 64793, 64785, 64777, 64770,
+ 64762, 64754, 64747, 64739, 64731, 64723, 64715, 64707,
+ 64699, 64691, 64683, 64675, 64667, 64659, 64651, 64642,
+ 64634, 64626, 64617, 64609, 64600, 64592, 64584, 64575,
+ 64566, 64558, 64549, 64540, 64532, 64523, 64514, 64505,
+ 64496, 64487, 64478, 64469, 64460, 64451, 64442, 64433,
+ 64424, 64414, 64405, 64396, 64387, 64377, 64368, 64358,
+ 64349, 64339, 64330, 64320, 64310, 64301, 64291, 64281,
+ 64271, 64261, 64252, 64242, 64232, 64222, 64212, 64202,
+ 64192, 64181, 64171, 64161, 64151, 64140, 64130, 64120,
+ 64109, 64099, 64088, 64078, 64067, 64057, 64046, 64035,
+ 64025, 64014, 64003, 63992, 63981, 63971, 63960, 63949,
+ 63938, 63927, 63915, 63904, 63893, 63882, 63871, 63859,
+ 63848, 63837, 63825, 63814, 63803, 63791, 63779, 63768,
+ 63756, 63745, 63733, 63721, 63709, 63698, 63686, 63674,
+ 63662, 63650, 63638, 63626, 63614, 63602, 63590, 63578,
+ 63565, 63553, 63541, 63528, 63516, 63504, 63491, 63479,
+ 63466, 63454, 63441, 63429, 63416, 63403, 63390, 63378,
+ 63365, 63352, 63339, 63326, 63313, 63300, 63287, 63274,
+ 63261, 63248, 63235, 63221, 63208, 63195, 63182, 63168,
+ 63155, 63141, 63128, 63114, 63101, 63087, 63074, 63060,
+ 63046, 63032, 63019, 63005, 62991, 62977, 62963, 62949,
+ 62935, 62921, 62907, 62893, 62879, 62865, 62850, 62836,
+ 62822, 62808, 62793, 62779, 62764, 62750, 62735, 62721,
+ 62706, 62692, 62677, 62662, 62648, 62633, 62618, 62603,
+ 62588, 62573, 62558, 62543, 62528, 62513, 62498, 62483,
+ 62468, 62453, 62437, 62422, 62407, 62391, 62376, 62360,
+ 62345, 62329, 62314, 62298, 62283, 62267, 62251, 62236,
+ 62220, 62204, 62188, 62172, 62156, 62141, 62125, 62108,
+ 62092, 62076, 62060, 62044, 62028, 62012, 61995, 61979,
+ 61963, 61946, 61930, 61913, 61897, 61880, 61864, 61847,
+ 61831, 61814, 61797, 61780, 61764, 61747, 61730, 61713,
+ 61696, 61679, 61662, 61645, 61628, 61611, 61594, 61577,
+ 61559, 61542, 61525, 61507, 61490, 61473, 61455, 61438,
+ 61420, 61403, 61385, 61367, 61350, 61332, 61314, 61297,
+ 61279, 61261, 61243, 61225, 61207, 61189, 61171, 61153,
+ 61135, 61117, 61099, 61081, 61062, 61044, 61026, 61007,
+ 60989, 60971, 60952, 60934, 60915, 60897, 60878, 60859,
+ 60841, 60822, 60803, 60785, 60766, 60747, 60728, 60709,
+ 60690, 60671, 60652, 60633, 60614, 60595, 60576, 60556,
+ 60537, 60518, 60499, 60479, 60460, 60441, 60421, 60402,
+ 60382, 60363, 60343, 60323, 60304, 60284, 60264, 60244,
+ 60225, 60205, 60185, 60165, 60145, 60125, 60105, 60085,
+ 60065, 60045, 60025, 60004, 59984, 59964, 59944, 59923,
+ 59903, 59883, 59862, 59842, 59821, 59801, 59780, 59759,
+ 59739, 59718, 59697, 59677, 59656, 59635, 59614, 59593,
+ 59572, 59551, 59530, 59509, 59488, 59467, 59446, 59425,
+ 59404, 59382, 59361, 59340, 59318, 59297, 59276, 59254,
+ 59233, 59211, 59190, 59168, 59146, 59125, 59103, 59081,
+ 59059, 59038, 59016, 58994, 58972, 58950, 58928, 58906,
+ 58884, 58862, 58840, 58818, 58795, 58773, 58751, 58729,
+ 58706, 58684, 58662, 58639, 58617, 58594, 58572, 58549,
+ 58527, 58504, 58481, 58459, 58436, 58413, 58390, 58367,
+ 58345, 58322, 58299, 58276, 58253, 58230, 58207, 58183,
+ 58160, 58137, 58114, 58091, 58067, 58044, 58021, 57997,
+ 57974, 57950, 57927, 57903, 57880, 57856, 57833, 57809,
+ 57785, 57762, 57738, 57714, 57690, 57666, 57642, 57618,
+ 57594, 57570, 57546, 57522, 57498, 57474, 57450, 57426,
+ 57402, 57377, 57353, 57329, 57304, 57280, 57255, 57231,
+ 57206, 57182, 57157, 57133, 57108, 57083, 57059, 57034,
+ 57009, 56984, 56959, 56935, 56910, 56885, 56860, 56835,
+ 56810, 56785, 56760, 56734, 56709, 56684, 56659, 56633,
+ 56608, 56583, 56557, 56532, 56507, 56481, 56456, 56430,
+ 56404, 56379, 56353, 56328, 56302, 56276, 56250, 56225,
+ 56199, 56173, 56147, 56121, 56095, 56069, 56043, 56017,
+ 55991, 55965, 55938, 55912, 55886, 55860, 55833, 55807,
+ 55781, 55754, 55728, 55701, 55675, 55648, 55622, 55595,
+ 55569, 55542, 55515, 55489, 55462, 55435, 55408, 55381,
+ 55354, 55327, 55300, 55274, 55246, 55219, 55192, 55165,
+ 55138, 55111, 55084, 55056, 55029, 55002, 54974, 54947,
+ 54920, 54892, 54865, 54837, 54810, 54782, 54755, 54727,
+ 54699, 54672, 54644, 54616, 54588, 54560, 54533, 54505,
+ 54477, 54449, 54421, 54393, 54365, 54337, 54308, 54280,
+ 54252, 54224, 54196, 54167, 54139, 54111, 54082, 54054,
+ 54026, 53997, 53969, 53940, 53911, 53883, 53854, 53826,
+ 53797, 53768, 53739, 53711, 53682, 53653, 53624, 53595,
+ 53566, 53537, 53508, 53479, 53450, 53421, 53392, 53363,
+ 53334, 53304, 53275, 53246, 53216, 53187, 53158, 53128,
+ 53099, 53069, 53040, 53010, 52981, 52951, 52922, 52892,
+ 52862, 52832, 52803, 52773, 52743, 52713, 52683, 52653,
+ 52624, 52594, 52564, 52534, 52503, 52473, 52443, 52413,
+ 52383, 52353, 52322, 52292, 52262, 52231, 52201, 52171,
+ 52140, 52110, 52079, 52049, 52018, 51988, 51957, 51926,
+ 51896, 51865, 51834, 51803, 51773, 51742, 51711, 51680,
+ 51649, 51618, 51587, 51556, 51525, 51494, 51463, 51432,
+ 51401, 51369, 51338, 51307, 51276, 51244, 51213, 51182,
+ 51150, 51119, 51087, 51056, 51024, 50993, 50961, 50929,
+ 50898, 50866, 50834, 50803, 50771, 50739, 50707, 50675,
+ 50644, 50612, 50580, 50548, 50516, 50484, 50452, 50420,
+ 50387, 50355, 50323, 50291, 50259, 50226, 50194, 50162,
+ 50129, 50097, 50065, 50032, 50000, 49967, 49935, 49902,
+ 49869, 49837, 49804, 49771, 49739, 49706, 49673, 49640,
+ 49608, 49575, 49542, 49509, 49476, 49443, 49410, 49377,
+ 49344, 49311, 49278, 49244, 49211, 49178, 49145, 49112,
+ 49078, 49045, 49012, 48978, 48945, 48911, 48878, 48844,
+ 48811, 48777, 48744, 48710, 48676, 48643, 48609, 48575,
+ 48542, 48508, 48474, 48440, 48406, 48372, 48338, 48304,
+ 48271, 48237, 48202, 48168, 48134, 48100, 48066, 48032,
+ 47998, 47963, 47929, 47895, 47860, 47826, 47792, 47757,
+ 47723, 47688, 47654, 47619, 47585, 47550, 47516, 47481,
+ 47446, 47412, 47377, 47342, 47308, 47273, 47238, 47203,
+ 47168, 47133, 47098, 47063, 47028, 46993, 46958, 46923,
+ 46888, 46853, 46818, 46783, 46747, 46712, 46677, 46642,
+ 46606, 46571, 46536, 46500, 46465, 46429, 46394, 46358,
+ 46323, 46287, 46252, 46216, 46180, 46145, 46109, 46073,
+ 46037, 46002, 45966, 45930, 45894, 45858, 45822, 45786,
+ 45750, 45714, 45678, 45642, 45606, 45570, 45534, 45498,
+ 45462, 45425, 45389, 45353, 45316, 45280, 45244, 45207,
+ 45171, 45135, 45098, 45062, 45025, 44989, 44952, 44915,
+ 44879, 44842, 44806, 44769, 44732, 44695, 44659, 44622,
+ 44585, 44548, 44511, 44474, 44437, 44400, 44363, 44326,
+ 44289, 44252, 44215, 44178, 44141, 44104, 44067, 44029,
+ 43992, 43955, 43918, 43880, 43843, 43806, 43768, 43731,
+ 43693, 43656, 43618, 43581, 43543, 43506, 43468, 43430,
+ 43393, 43355, 43317, 43280, 43242, 43204, 43166, 43128,
+ 43091, 43053, 43015, 42977, 42939, 42901, 42863, 42825,
+ 42787, 42749, 42711, 42672, 42634, 42596, 42558, 42520,
+ 42481, 42443, 42405, 42366, 42328, 42290, 42251, 42213,
+ 42174, 42136, 42097, 42059, 42020, 41982, 41943, 41904,
+ 41866, 41827, 41788, 41750, 41711, 41672, 41633, 41595,
+ 41556, 41517, 41478, 41439, 41400, 41361, 41322, 41283,
+ 41244, 41205, 41166, 41127, 41088, 41048, 41009, 40970,
+ 40931, 40891, 40852, 40813, 40773, 40734, 40695, 40655,
+ 40616, 40576, 40537, 40497, 40458, 40418, 40379, 40339,
+ 40300, 40260, 40220, 40180, 40141, 40101, 40061, 40021,
+ 39982, 39942, 39902, 39862, 39822, 39782, 39742, 39702,
+ 39662, 39622, 39582, 39542, 39502, 39462, 39422, 39382,
+ 39341, 39301, 39261, 39221, 39180, 39140, 39100, 39059,
+ 39019, 38979, 38938, 38898, 38857, 38817, 38776, 38736,
+ 38695, 38655, 38614, 38573, 38533, 38492, 38451, 38411,
+ 38370, 38329, 38288, 38248, 38207, 38166, 38125, 38084,
+ 38043, 38002, 37961, 37920, 37879, 37838, 37797, 37756,
+ 37715, 37674, 37633, 37592, 37551, 37509, 37468, 37427,
+ 37386, 37344, 37303, 37262, 37220, 37179, 37137, 37096,
+ 37055, 37013, 36972, 36930, 36889, 36847, 36805, 36764,
+ 36722, 36681, 36639, 36597, 36556, 36514, 36472, 36430,
+ 36388, 36347, 36305, 36263, 36221, 36179, 36137, 36095,
+ 36053, 36011, 35969, 35927, 35885, 35843, 35801, 35759,
+ 35717, 35675, 35633, 35590, 35548, 35506, 35464, 35421,
+ 35379, 35337, 35294, 35252, 35210, 35167, 35125, 35082,
+ 35040, 34997, 34955, 34912, 34870, 34827, 34785, 34742,
+ 34699, 34657, 34614, 34571, 34529, 34486, 34443, 34400,
+ 34358, 34315, 34272, 34229, 34186, 34143, 34100, 34057,
+ 34015, 33972, 33929, 33886, 33843, 33799, 33756, 33713,
+ 33670, 33627, 33584, 33541, 33498, 33454, 33411, 33368,
+ 33325, 33281, 33238, 33195, 33151, 33108, 33065, 33021,
+ 32978, 32934, 32891, 32847, 32804, 32760, 32717, 32673,
+ 32630, 32586, 32542, 32499, 32455, 32411, 32368, 32324,
+ 32280, 32236, 32193, 32149, 32105, 32061, 32017, 31974,
+ 31930, 31886, 31842, 31798, 31754, 31710, 31666, 31622,
+ 31578, 31534, 31490, 31446, 31402, 31357, 31313, 31269,
+ 31225, 31181, 31136, 31092, 31048, 31004, 30959, 30915,
+ 30871, 30826, 30782, 30738, 30693, 30649, 30604, 30560,
+ 30515, 30471, 30426, 30382, 30337, 30293, 30248, 30204,
+ 30159, 30114, 30070, 30025, 29980, 29936, 29891, 29846,
+ 29801, 29757, 29712, 29667, 29622, 29577, 29533, 29488,
+ 29443, 29398, 29353, 29308, 29263, 29218, 29173, 29128,
+ 29083, 29038, 28993, 28948, 28903, 28858, 28812, 28767,
+ 28722, 28677, 28632, 28586, 28541, 28496, 28451, 28405,
+ 28360, 28315, 28269, 28224, 28179, 28133, 28088, 28042,
+ 27997, 27952, 27906, 27861, 27815, 27770, 27724, 27678,
+ 27633, 27587, 27542, 27496, 27450, 27405, 27359, 27313,
+ 27268, 27222, 27176, 27131, 27085, 27039, 26993, 26947,
+ 26902, 26856, 26810, 26764, 26718, 26672, 26626, 26580,
+ 26534, 26488, 26442, 26396, 26350, 26304, 26258, 26212,
+ 26166, 26120, 26074, 26028, 25982, 25936, 25889, 25843,
+ 25797, 25751, 25705, 25658, 25612, 25566, 25520, 25473,
+ 25427, 25381, 25334, 25288, 25241, 25195, 25149, 25102,
+ 25056, 25009, 24963, 24916, 24870, 24823, 24777, 24730,
+ 24684, 24637, 24591, 24544, 24497, 24451, 24404, 24357,
+ 24311, 24264, 24217, 24171, 24124, 24077, 24030, 23984,
+ 23937, 23890, 23843, 23796, 23750, 23703, 23656, 23609,
+ 23562, 23515, 23468, 23421, 23374, 23327, 23280, 23233,
+ 23186, 23139, 23092, 23045, 22998, 22951, 22904, 22857,
+ 22810, 22763, 22716, 22668, 22621, 22574, 22527, 22480,
+ 22433, 22385, 22338, 22291, 22243, 22196, 22149, 22102,
+ 22054, 22007, 21960, 21912, 21865, 21817, 21770, 21723,
+ 21675, 21628, 21580, 21533, 21485, 21438, 21390, 21343,
+ 21295, 21248, 21200, 21153, 21105, 21057, 21010, 20962,
+ 20915, 20867, 20819, 20772, 20724, 20676, 20629, 20581,
+ 20533, 20485, 20438, 20390, 20342, 20294, 20246, 20199,
+ 20151, 20103, 20055, 20007, 19959, 19912, 19864, 19816,
+ 19768, 19720, 19672, 19624, 19576, 19528, 19480, 19432,
+ 19384, 19336, 19288, 19240, 19192, 19144, 19096, 19048,
+ 19000, 18951, 18903, 18855, 18807, 18759, 18711, 18663,
+ 18614, 18566, 18518, 18470, 18421, 18373, 18325, 18277,
+ 18228, 18180, 18132, 18084, 18035, 17987, 17939, 17890,
+ 17842, 17793, 17745, 17697, 17648, 17600, 17551, 17503,
+ 17455, 17406, 17358, 17309, 17261, 17212, 17164, 17115,
+ 17067, 17018, 16970, 16921, 16872, 16824, 16775, 16727,
+ 16678, 16629, 16581, 16532, 16484, 16435, 16386, 16338,
+ 16289, 16240, 16191, 16143, 16094, 16045, 15997, 15948,
+ 15899, 15850, 15802, 15753, 15704, 15655, 15606, 15557,
+ 15509, 15460, 15411, 15362, 15313, 15264, 15215, 15167,
+ 15118, 15069, 15020, 14971, 14922, 14873, 14824, 14775,
+ 14726, 14677, 14628, 14579, 14530, 14481, 14432, 14383,
+ 14334, 14285, 14236, 14187, 14138, 14089, 14040, 13990,
+ 13941, 13892, 13843, 13794, 13745, 13696, 13646, 13597,
+ 13548, 13499, 13450, 13401, 13351, 13302, 13253, 13204,
+ 13154, 13105, 13056, 13007, 12957, 12908, 12859, 12810,
+ 12760, 12711, 12662, 12612, 12563, 12514, 12464, 12415,
+ 12366, 12316, 12267, 12218, 12168, 12119, 12069, 12020,
+ 11970, 11921, 11872, 11822, 11773, 11723, 11674, 11624,
+ 11575, 11525, 11476, 11426, 11377, 11327, 11278, 11228,
+ 11179, 11129, 11080, 11030, 10981, 10931, 10882, 10832,
+ 10782, 10733, 10683, 10634, 10584, 10534, 10485, 10435,
+ 10386, 10336, 10286, 10237, 10187, 10137, 10088, 10038,
+ 9988, 9939, 9889, 9839, 9790, 9740, 9690, 9640,
+ 9591, 9541, 9491, 9442, 9392, 9342, 9292, 9243,
+ 9193, 9143, 9093, 9043, 8994, 8944, 8894, 8844,
+ 8794, 8745, 8695, 8645, 8595, 8545, 8496, 8446,
+ 8396, 8346, 8296, 8246, 8196, 8147, 8097, 8047,
+ 7997, 7947, 7897, 7847, 7797, 7747, 7697, 7648,
+ 7598, 7548, 7498, 7448, 7398, 7348, 7298, 7248,
+ 7198, 7148, 7098, 7048, 6998, 6948, 6898, 6848,
+ 6798, 6748, 6698, 6648, 6598, 6548, 6498, 6448,
+ 6398, 6348, 6298, 6248, 6198, 6148, 6098, 6048,
+ 5998, 5948, 5898, 5848, 5798, 5748, 5697, 5647,
+ 5597, 5547, 5497, 5447, 5397, 5347, 5297, 5247,
+ 5197, 5146, 5096, 5046, 4996, 4946, 4896, 4846,
+ 4796, 4745, 4695, 4645, 4595, 4545, 4495, 4445,
+ 4394, 4344, 4294, 4244, 4194, 4144, 4093, 4043,
+ 3993, 3943, 3893, 3843, 3792, 3742, 3692, 3642,
+ 3592, 3541, 3491, 3441, 3391, 3341, 3291, 3240,
+ 3190, 3140, 3090, 3039, 2989, 2939, 2889, 2839,
+ 2788, 2738, 2688, 2638, 2587, 2537, 2487, 2437,
+ 2387, 2336, 2286, 2236, 2186, 2135, 2085, 2035,
+ 1985, 1934, 1884, 1834, 1784, 1733, 1683, 1633,
+ 1583, 1532, 1482, 1432, 1382, 1331, 1281, 1231,
+ 1181, 1130, 1080, 1030, 980, 929, 879, 829,
+ 779, 728, 678, 628, 578, 527, 477, 427,
+ 376, 326, 276, 226, 175, 125, 75, 25,
+ -25, -75, -125, -175, -226, -276, -326, -376,
+ -427, -477, -527, -578, -628, -678, -728, -779,
+ -829, -879, -929, -980, -1030, -1080, -1130, -1181,
+ -1231, -1281, -1331, -1382, -1432, -1482, -1532, -1583,
+ -1633, -1683, -1733, -1784, -1834, -1884, -1934, -1985,
+ -2035, -2085, -2135, -2186, -2236, -2286, -2336, -2387,
+ -2437, -2487, -2537, -2588, -2638, -2688, -2738, -2788,
+ -2839, -2889, -2939, -2989, -3039, -3090, -3140, -3190,
+ -3240, -3291, -3341, -3391, -3441, -3491, -3541, -3592,
+ -3642, -3692, -3742, -3792, -3843, -3893, -3943, -3993,
+ -4043, -4093, -4144, -4194, -4244, -4294, -4344, -4394,
+ -4445, -4495, -4545, -4595, -4645, -4695, -4745, -4796,
+ -4846, -4896, -4946, -4996, -5046, -5096, -5146, -5197,
+ -5247, -5297, -5347, -5397, -5447, -5497, -5547, -5597,
+ -5647, -5697, -5748, -5798, -5848, -5898, -5948, -5998,
+ -6048, -6098, -6148, -6198, -6248, -6298, -6348, -6398,
+ -6448, -6498, -6548, -6598, -6648, -6698, -6748, -6798,
+ -6848, -6898, -6948, -6998, -7048, -7098, -7148, -7198,
+ -7248, -7298, -7348, -7398, -7448, -7498, -7548, -7598,
+ -7648, -7697, -7747, -7797, -7847, -7897, -7947, -7997,
+ -8047, -8097, -8147, -8196, -8246, -8296, -8346, -8396,
+ -8446, -8496, -8545, -8595, -8645, -8695, -8745, -8794,
+ -8844, -8894, -8944, -8994, -9043, -9093, -9143, -9193,
+ -9243, -9292, -9342, -9392, -9442, -9491, -9541, -9591,
+ -9640, -9690, -9740, -9790, -9839, -9889, -9939, -9988,
+ -10038, -10088, -10137, -10187, -10237, -10286, -10336, -10386,
+ -10435, -10485, -10534, -10584, -10634, -10683, -10733, -10782,
+ -10832, -10882, -10931, -10981, -11030, -11080, -11129, -11179,
+ -11228, -11278, -11327, -11377, -11426, -11476, -11525, -11575,
+ -11624, -11674, -11723, -11773, -11822, -11872, -11921, -11970,
+ -12020, -12069, -12119, -12168, -12218, -12267, -12316, -12366,
+ -12415, -12464, -12514, -12563, -12612, -12662, -12711, -12760,
+ -12810, -12859, -12908, -12957, -13007, -13056, -13105, -13154,
+ -13204, -13253, -13302, -13351, -13401, -13450, -13499, -13548,
+ -13597, -13647, -13696, -13745, -13794, -13843, -13892, -13941,
+ -13990, -14040, -14089, -14138, -14187, -14236, -14285, -14334,
+ -14383, -14432, -14481, -14530, -14579, -14628, -14677, -14726,
+ -14775, -14824, -14873, -14922, -14971, -15020, -15069, -15118,
+ -15167, -15215, -15264, -15313, -15362, -15411, -15460, -15509,
+ -15557, -15606, -15655, -15704, -15753, -15802, -15850, -15899,
+ -15948, -15997, -16045, -16094, -16143, -16191, -16240, -16289,
+ -16338, -16386, -16435, -16484, -16532, -16581, -16629, -16678,
+ -16727, -16775, -16824, -16872, -16921, -16970, -17018, -17067,
+ -17115, -17164, -17212, -17261, -17309, -17358, -17406, -17455,
+ -17503, -17551, -17600, -17648, -17697, -17745, -17793, -17842,
+ -17890, -17939, -17987, -18035, -18084, -18132, -18180, -18228,
+ -18277, -18325, -18373, -18421, -18470, -18518, -18566, -18614,
+ -18663, -18711, -18759, -18807, -18855, -18903, -18951, -19000,
+ -19048, -19096, -19144, -19192, -19240, -19288, -19336, -19384,
+ -19432, -19480, -19528, -19576, -19624, -19672, -19720, -19768,
+ -19816, -19864, -19912, -19959, -20007, -20055, -20103, -20151,
+ -20199, -20246, -20294, -20342, -20390, -20438, -20485, -20533,
+ -20581, -20629, -20676, -20724, -20772, -20819, -20867, -20915,
+ -20962, -21010, -21057, -21105, -21153, -21200, -21248, -21295,
+ -21343, -21390, -21438, -21485, -21533, -21580, -21628, -21675,
+ -21723, -21770, -21817, -21865, -21912, -21960, -22007, -22054,
+ -22102, -22149, -22196, -22243, -22291, -22338, -22385, -22433,
+ -22480, -22527, -22574, -22621, -22668, -22716, -22763, -22810,
+ -22857, -22904, -22951, -22998, -23045, -23092, -23139, -23186,
+ -23233, -23280, -23327, -23374, -23421, -23468, -23515, -23562,
+ -23609, -23656, -23703, -23750, -23796, -23843, -23890, -23937,
+ -23984, -24030, -24077, -24124, -24171, -24217, -24264, -24311,
+ -24357, -24404, -24451, -24497, -24544, -24591, -24637, -24684,
+ -24730, -24777, -24823, -24870, -24916, -24963, -25009, -25056,
+ -25102, -25149, -25195, -25241, -25288, -25334, -25381, -25427,
+ -25473, -25520, -25566, -25612, -25658, -25705, -25751, -25797,
+ -25843, -25889, -25936, -25982, -26028, -26074, -26120, -26166,
+ -26212, -26258, -26304, -26350, -26396, -26442, -26488, -26534,
+ -26580, -26626, -26672, -26718, -26764, -26810, -26856, -26902,
+ -26947, -26993, -27039, -27085, -27131, -27176, -27222, -27268,
+ -27313, -27359, -27405, -27450, -27496, -27542, -27587, -27633,
+ -27678, -27724, -27770, -27815, -27861, -27906, -27952, -27997,
+ -28042, -28088, -28133, -28179, -28224, -28269, -28315, -28360,
+ -28405, -28451, -28496, -28541, -28586, -28632, -28677, -28722,
+ -28767, -28812, -28858, -28903, -28948, -28993, -29038, -29083,
+ -29128, -29173, -29218, -29263, -29308, -29353, -29398, -29443,
+ -29488, -29533, -29577, -29622, -29667, -29712, -29757, -29801,
+ -29846, -29891, -29936, -29980, -30025, -30070, -30114, -30159,
+ -30204, -30248, -30293, -30337, -30382, -30426, -30471, -30515,
+ -30560, -30604, -30649, -30693, -30738, -30782, -30826, -30871,
+ -30915, -30959, -31004, -31048, -31092, -31136, -31181, -31225,
+ -31269, -31313, -31357, -31402, -31446, -31490, -31534, -31578,
+ -31622, -31666, -31710, -31754, -31798, -31842, -31886, -31930,
+ -31974, -32017, -32061, -32105, -32149, -32193, -32236, -32280,
+ -32324, -32368, -32411, -32455, -32499, -32542, -32586, -32630,
+ -32673, -32717, -32760, -32804, -32847, -32891, -32934, -32978,
+ -33021, -33065, -33108, -33151, -33195, -33238, -33281, -33325,
+ -33368, -33411, -33454, -33498, -33541, -33584, -33627, -33670,
+ -33713, -33756, -33799, -33843, -33886, -33929, -33972, -34015,
+ -34057, -34100, -34143, -34186, -34229, -34272, -34315, -34358,
+ -34400, -34443, -34486, -34529, -34571, -34614, -34657, -34699,
+ -34742, -34785, -34827, -34870, -34912, -34955, -34997, -35040,
+ -35082, -35125, -35167, -35210, -35252, -35294, -35337, -35379,
+ -35421, -35464, -35506, -35548, -35590, -35633, -35675, -35717,
+ -35759, -35801, -35843, -35885, -35927, -35969, -36011, -36053,
+ -36095, -36137, -36179, -36221, -36263, -36305, -36347, -36388,
+ -36430, -36472, -36514, -36555, -36597, -36639, -36681, -36722,
+ -36764, -36805, -36847, -36889, -36930, -36972, -37013, -37055,
+ -37096, -37137, -37179, -37220, -37262, -37303, -37344, -37386,
+ -37427, -37468, -37509, -37551, -37592, -37633, -37674, -37715,
+ -37756, -37797, -37838, -37879, -37920, -37961, -38002, -38043,
+ -38084, -38125, -38166, -38207, -38248, -38288, -38329, -38370,
+ -38411, -38451, -38492, -38533, -38573, -38614, -38655, -38695,
+ -38736, -38776, -38817, -38857, -38898, -38938, -38979, -39019,
+ -39059, -39100, -39140, -39180, -39221, -39261, -39301, -39341,
+ -39382, -39422, -39462, -39502, -39542, -39582, -39622, -39662,
+ -39702, -39742, -39782, -39822, -39862, -39902, -39942, -39982,
+ -40021, -40061, -40101, -40141, -40180, -40220, -40260, -40299,
+ -40339, -40379, -40418, -40458, -40497, -40537, -40576, -40616,
+ -40655, -40695, -40734, -40773, -40813, -40852, -40891, -40931,
+ -40970, -41009, -41048, -41087, -41127, -41166, -41205, -41244,
+ -41283, -41322, -41361, -41400, -41439, -41478, -41517, -41556,
+ -41595, -41633, -41672, -41711, -41750, -41788, -41827, -41866,
+ -41904, -41943, -41982, -42020, -42059, -42097, -42136, -42174,
+ -42213, -42251, -42290, -42328, -42366, -42405, -42443, -42481,
+ -42520, -42558, -42596, -42634, -42672, -42711, -42749, -42787,
+ -42825, -42863, -42901, -42939, -42977, -43015, -43053, -43091,
+ -43128, -43166, -43204, -43242, -43280, -43317, -43355, -43393,
+ -43430, -43468, -43506, -43543, -43581, -43618, -43656, -43693,
+ -43731, -43768, -43806, -43843, -43880, -43918, -43955, -43992,
+ -44029, -44067, -44104, -44141, -44178, -44215, -44252, -44289,
+ -44326, -44363, -44400, -44437, -44474, -44511, -44548, -44585,
+ -44622, -44659, -44695, -44732, -44769, -44806, -44842, -44879,
+ -44915, -44952, -44989, -45025, -45062, -45098, -45135, -45171,
+ -45207, -45244, -45280, -45316, -45353, -45389, -45425, -45462,
+ -45498, -45534, -45570, -45606, -45642, -45678, -45714, -45750,
+ -45786, -45822, -45858, -45894, -45930, -45966, -46002, -46037,
+ -46073, -46109, -46145, -46180, -46216, -46252, -46287, -46323,
+ -46358, -46394, -46429, -46465, -46500, -46536, -46571, -46606,
+ -46642, -46677, -46712, -46747, -46783, -46818, -46853, -46888,
+ -46923, -46958, -46993, -47028, -47063, -47098, -47133, -47168,
+ -47203, -47238, -47273, -47308, -47342, -47377, -47412, -47446,
+ -47481, -47516, -47550, -47585, -47619, -47654, -47688, -47723,
+ -47757, -47792, -47826, -47860, -47895, -47929, -47963, -47998,
+ -48032, -48066, -48100, -48134, -48168, -48202, -48236, -48271,
+ -48304, -48338, -48372, -48406, -48440, -48474, -48508, -48542,
+ -48575, -48609, -48643, -48676, -48710, -48744, -48777, -48811,
+ -48844, -48878, -48911, -48945, -48978, -49012, -49045, -49078,
+ -49112, -49145, -49178, -49211, -49244, -49278, -49311, -49344,
+ -49377, -49410, -49443, -49476, -49509, -49542, -49575, -49608,
+ -49640, -49673, -49706, -49739, -49771, -49804, -49837, -49869,
+ -49902, -49935, -49967, -50000, -50032, -50065, -50097, -50129,
+ -50162, -50194, -50226, -50259, -50291, -50323, -50355, -50387,
+ -50420, -50452, -50484, -50516, -50548, -50580, -50612, -50644,
+ -50675, -50707, -50739, -50771, -50803, -50834, -50866, -50898,
+ -50929, -50961, -50993, -51024, -51056, -51087, -51119, -51150,
+ -51182, -51213, -51244, -51276, -51307, -51338, -51369, -51401,
+ -51432, -51463, -51494, -51525, -51556, -51587, -51618, -51649,
+ -51680, -51711, -51742, -51773, -51803, -51834, -51865, -51896,
+ -51926, -51957, -51988, -52018, -52049, -52079, -52110, -52140,
+ -52171, -52201, -52231, -52262, -52292, -52322, -52353, -52383,
+ -52413, -52443, -52473, -52503, -52534, -52564, -52594, -52624,
+ -52653, -52683, -52713, -52743, -52773, -52803, -52832, -52862,
+ -52892, -52922, -52951, -52981, -53010, -53040, -53069, -53099,
+ -53128, -53158, -53187, -53216, -53246, -53275, -53304, -53334,
+ -53363, -53392, -53421, -53450, -53479, -53508, -53537, -53566,
+ -53595, -53624, -53653, -53682, -53711, -53739, -53768, -53797,
+ -53826, -53854, -53883, -53911, -53940, -53969, -53997, -54026,
+ -54054, -54082, -54111, -54139, -54167, -54196, -54224, -54252,
+ -54280, -54308, -54337, -54365, -54393, -54421, -54449, -54477,
+ -54505, -54533, -54560, -54588, -54616, -54644, -54672, -54699,
+ -54727, -54755, -54782, -54810, -54837, -54865, -54892, -54920,
+ -54947, -54974, -55002, -55029, -55056, -55084, -55111, -55138,
+ -55165, -55192, -55219, -55246, -55274, -55300, -55327, -55354,
+ -55381, -55408, -55435, -55462, -55489, -55515, -55542, -55569,
+ -55595, -55622, -55648, -55675, -55701, -55728, -55754, -55781,
+ -55807, -55833, -55860, -55886, -55912, -55938, -55965, -55991,
+ -56017, -56043, -56069, -56095, -56121, -56147, -56173, -56199,
+ -56225, -56250, -56276, -56302, -56328, -56353, -56379, -56404,
+ -56430, -56456, -56481, -56507, -56532, -56557, -56583, -56608,
+ -56633, -56659, -56684, -56709, -56734, -56760, -56785, -56810,
+ -56835, -56860, -56885, -56910, -56935, -56959, -56984, -57009,
+ -57034, -57059, -57083, -57108, -57133, -57157, -57182, -57206,
+ -57231, -57255, -57280, -57304, -57329, -57353, -57377, -57402,
+ -57426, -57450, -57474, -57498, -57522, -57546, -57570, -57594,
+ -57618, -57642, -57666, -57690, -57714, -57738, -57762, -57785,
+ -57809, -57833, -57856, -57880, -57903, -57927, -57950, -57974,
+ -57997, -58021, -58044, -58067, -58091, -58114, -58137, -58160,
+ -58183, -58207, -58230, -58253, -58276, -58299, -58322, -58345,
+ -58367, -58390, -58413, -58436, -58459, -58481, -58504, -58527,
+ -58549, -58572, -58594, -58617, -58639, -58662, -58684, -58706,
+ -58729, -58751, -58773, -58795, -58818, -58840, -58862, -58884,
+ -58906, -58928, -58950, -58972, -58994, -59016, -59038, -59059,
+ -59081, -59103, -59125, -59146, -59168, -59190, -59211, -59233,
+ -59254, -59276, -59297, -59318, -59340, -59361, -59382, -59404,
+ -59425, -59446, -59467, -59488, -59509, -59530, -59551, -59572,
+ -59593, -59614, -59635, -59656, -59677, -59697, -59718, -59739,
+ -59759, -59780, -59801, -59821, -59842, -59862, -59883, -59903,
+ -59923, -59944, -59964, -59984, -60004, -60025, -60045, -60065,
+ -60085, -60105, -60125, -60145, -60165, -60185, -60205, -60225,
+ -60244, -60264, -60284, -60304, -60323, -60343, -60363, -60382,
+ -60402, -60421, -60441, -60460, -60479, -60499, -60518, -60537,
+ -60556, -60576, -60595, -60614, -60633, -60652, -60671, -60690,
+ -60709, -60728, -60747, -60766, -60785, -60803, -60822, -60841,
+ -60859, -60878, -60897, -60915, -60934, -60952, -60971, -60989,
+ -61007, -61026, -61044, -61062, -61081, -61099, -61117, -61135,
+ -61153, -61171, -61189, -61207, -61225, -61243, -61261, -61279,
+ -61297, -61314, -61332, -61350, -61367, -61385, -61403, -61420,
+ -61438, -61455, -61473, -61490, -61507, -61525, -61542, -61559,
+ -61577, -61594, -61611, -61628, -61645, -61662, -61679, -61696,
+ -61713, -61730, -61747, -61764, -61780, -61797, -61814, -61831,
+ -61847, -61864, -61880, -61897, -61913, -61930, -61946, -61963,
+ -61979, -61995, -62012, -62028, -62044, -62060, -62076, -62092,
+ -62108, -62125, -62141, -62156, -62172, -62188, -62204, -62220,
+ -62236, -62251, -62267, -62283, -62298, -62314, -62329, -62345,
+ -62360, -62376, -62391, -62407, -62422, -62437, -62453, -62468,
+ -62483, -62498, -62513, -62528, -62543, -62558, -62573, -62588,
+ -62603, -62618, -62633, -62648, -62662, -62677, -62692, -62706,
+ -62721, -62735, -62750, -62764, -62779, -62793, -62808, -62822,
+ -62836, -62850, -62865, -62879, -62893, -62907, -62921, -62935,
+ -62949, -62963, -62977, -62991, -63005, -63019, -63032, -63046,
+ -63060, -63074, -63087, -63101, -63114, -63128, -63141, -63155,
+ -63168, -63182, -63195, -63208, -63221, -63235, -63248, -63261,
+ -63274, -63287, -63300, -63313, -63326, -63339, -63352, -63365,
+ -63378, -63390, -63403, -63416, -63429, -63441, -63454, -63466,
+ -63479, -63491, -63504, -63516, -63528, -63541, -63553, -63565,
+ -63578, -63590, -63602, -63614, -63626, -63638, -63650, -63662,
+ -63674, -63686, -63698, -63709, -63721, -63733, -63745, -63756,
+ -63768, -63779, -63791, -63803, -63814, -63825, -63837, -63848,
+ -63859, -63871, -63882, -63893, -63904, -63915, -63927, -63938,
+ -63949, -63960, -63971, -63981, -63992, -64003, -64014, -64025,
+ -64035, -64046, -64057, -64067, -64078, -64088, -64099, -64109,
+ -64120, -64130, -64140, -64151, -64161, -64171, -64181, -64192,
+ -64202, -64212, -64222, -64232, -64242, -64252, -64261, -64271,
+ -64281, -64291, -64301, -64310, -64320, -64330, -64339, -64349,
+ -64358, -64368, -64377, -64387, -64396, -64405, -64414, -64424,
+ -64433, -64442, -64451, -64460, -64469, -64478, -64487, -64496,
+ -64505, -64514, -64523, -64532, -64540, -64549, -64558, -64566,
+ -64575, -64584, -64592, -64601, -64609, -64617, -64626, -64634,
+ -64642, -64651, -64659, -64667, -64675, -64683, -64691, -64699,
+ -64707, -64715, -64723, -64731, -64739, -64747, -64754, -64762,
+ -64770, -64777, -64785, -64793, -64800, -64808, -64815, -64822,
+ -64830, -64837, -64844, -64852, -64859, -64866, -64873, -64880,
+ -64887, -64895, -64902, -64908, -64915, -64922, -64929, -64936,
+ -64943, -64949, -64956, -64963, -64969, -64976, -64982, -64989,
+ -64995, -65002, -65008, -65015, -65021, -65027, -65033, -65040,
+ -65046, -65052, -65058, -65064, -65070, -65076, -65082, -65088,
+ -65094, -65099, -65105, -65111, -65117, -65122, -65128, -65133,
+ -65139, -65144, -65150, -65155, -65161, -65166, -65171, -65177,
+ -65182, -65187, -65192, -65197, -65202, -65207, -65212, -65217,
+ -65222, -65227, -65232, -65237, -65242, -65246, -65251, -65256,
+ -65260, -65265, -65270, -65274, -65279, -65283, -65287, -65292,
+ -65296, -65300, -65305, -65309, -65313, -65317, -65321, -65325,
+ -65329, -65333, -65337, -65341, -65345, -65349, -65352, -65356,
+ -65360, -65363, -65367, -65371, -65374, -65378, -65381, -65385,
+ -65388, -65391, -65395, -65398, -65401, -65404, -65408, -65411,
+ -65414, -65417, -65420, -65423, -65426, -65429, -65431, -65434,
+ -65437, -65440, -65442, -65445, -65448, -65450, -65453, -65455,
+ -65458, -65460, -65463, -65465, -65467, -65470, -65472, -65474,
+ -65476, -65478, -65480, -65482, -65484, -65486, -65488, -65490,
+ -65492, -65494, -65496, -65497, -65499, -65501, -65502, -65504,
+ -65505, -65507, -65508, -65510, -65511, -65513, -65514, -65515,
+ -65516, -65518, -65519, -65520, -65521, -65522, -65523, -65524,
+ -65525, -65526, -65527, -65527, -65528, -65529, -65530, -65530,
+ -65531, -65531, -65532, -65532, -65533, -65533, -65534, -65534,
+ -65534, -65535, -65535, -65535, -65535, -65535, -65535, -65535,
+ -65535, -65535, -65535, -65535, -65535, -65535, -65535, -65534,
+ -65534, -65534, -65533, -65533, -65532, -65532, -65531, -65531,
+ -65530, -65530, -65529, -65528, -65527, -65527, -65526, -65525,
+ -65524, -65523, -65522, -65521, -65520, -65519, -65518, -65516,
+ -65515, -65514, -65513, -65511, -65510, -65508, -65507, -65505,
+ -65504, -65502, -65501, -65499, -65497, -65496, -65494, -65492,
+ -65490, -65488, -65486, -65484, -65482, -65480, -65478, -65476,
+ -65474, -65472, -65470, -65467, -65465, -65463, -65460, -65458,
+ -65455, -65453, -65450, -65448, -65445, -65442, -65440, -65437,
+ -65434, -65431, -65429, -65426, -65423, -65420, -65417, -65414,
+ -65411, -65408, -65404, -65401, -65398, -65395, -65391, -65388,
+ -65385, -65381, -65378, -65374, -65371, -65367, -65363, -65360,
+ -65356, -65352, -65349, -65345, -65341, -65337, -65333, -65329,
+ -65325, -65321, -65317, -65313, -65309, -65305, -65300, -65296,
+ -65292, -65287, -65283, -65279, -65274, -65270, -65265, -65260,
+ -65256, -65251, -65246, -65242, -65237, -65232, -65227, -65222,
+ -65217, -65212, -65207, -65202, -65197, -65192, -65187, -65182,
+ -65177, -65171, -65166, -65161, -65155, -65150, -65144, -65139,
+ -65133, -65128, -65122, -65117, -65111, -65105, -65099, -65094,
+ -65088, -65082, -65076, -65070, -65064, -65058, -65052, -65046,
+ -65040, -65033, -65027, -65021, -65015, -65008, -65002, -64995,
+ -64989, -64982, -64976, -64969, -64963, -64956, -64949, -64943,
+ -64936, -64929, -64922, -64915, -64908, -64902, -64895, -64887,
+ -64880, -64873, -64866, -64859, -64852, -64844, -64837, -64830,
+ -64822, -64815, -64808, -64800, -64793, -64785, -64777, -64770,
+ -64762, -64754, -64747, -64739, -64731, -64723, -64715, -64707,
+ -64699, -64691, -64683, -64675, -64667, -64659, -64651, -64642,
+ -64634, -64626, -64617, -64609, -64601, -64592, -64584, -64575,
+ -64566, -64558, -64549, -64540, -64532, -64523, -64514, -64505,
+ -64496, -64487, -64478, -64469, -64460, -64451, -64442, -64433,
+ -64424, -64414, -64405, -64396, -64387, -64377, -64368, -64358,
+ -64349, -64339, -64330, -64320, -64310, -64301, -64291, -64281,
+ -64271, -64261, -64252, -64242, -64232, -64222, -64212, -64202,
+ -64192, -64181, -64171, -64161, -64151, -64140, -64130, -64120,
+ -64109, -64099, -64088, -64078, -64067, -64057, -64046, -64035,
+ -64025, -64014, -64003, -63992, -63981, -63971, -63960, -63949,
+ -63938, -63927, -63915, -63904, -63893, -63882, -63871, -63859,
+ -63848, -63837, -63825, -63814, -63803, -63791, -63779, -63768,
+ -63756, -63745, -63733, -63721, -63709, -63698, -63686, -63674,
+ -63662, -63650, -63638, -63626, -63614, -63602, -63590, -63578,
+ -63565, -63553, -63541, -63528, -63516, -63504, -63491, -63479,
+ -63466, -63454, -63441, -63429, -63416, -63403, -63390, -63378,
+ -63365, -63352, -63339, -63326, -63313, -63300, -63287, -63274,
+ -63261, -63248, -63235, -63221, -63208, -63195, -63182, -63168,
+ -63155, -63141, -63128, -63114, -63101, -63087, -63074, -63060,
+ -63046, -63032, -63019, -63005, -62991, -62977, -62963, -62949,
+ -62935, -62921, -62907, -62893, -62879, -62865, -62850, -62836,
+ -62822, -62808, -62793, -62779, -62764, -62750, -62735, -62721,
+ -62706, -62692, -62677, -62662, -62648, -62633, -62618, -62603,
+ -62588, -62573, -62558, -62543, -62528, -62513, -62498, -62483,
+ -62468, -62453, -62437, -62422, -62407, -62391, -62376, -62360,
+ -62345, -62329, -62314, -62298, -62283, -62267, -62251, -62236,
+ -62220, -62204, -62188, -62172, -62156, -62141, -62125, -62108,
+ -62092, -62076, -62060, -62044, -62028, -62012, -61995, -61979,
+ -61963, -61946, -61930, -61913, -61897, -61880, -61864, -61847,
+ -61831, -61814, -61797, -61780, -61764, -61747, -61730, -61713,
+ -61696, -61679, -61662, -61645, -61628, -61611, -61594, -61577,
+ -61559, -61542, -61525, -61507, -61490, -61473, -61455, -61438,
+ -61420, -61403, -61385, -61367, -61350, -61332, -61314, -61297,
+ -61279, -61261, -61243, -61225, -61207, -61189, -61171, -61153,
+ -61135, -61117, -61099, -61081, -61062, -61044, -61026, -61007,
+ -60989, -60971, -60952, -60934, -60915, -60897, -60878, -60859,
+ -60841, -60822, -60803, -60785, -60766, -60747, -60728, -60709,
+ -60690, -60671, -60652, -60633, -60614, -60595, -60576, -60556,
+ -60537, -60518, -60499, -60479, -60460, -60441, -60421, -60402,
+ -60382, -60363, -60343, -60323, -60304, -60284, -60264, -60244,
+ -60225, -60205, -60185, -60165, -60145, -60125, -60105, -60085,
+ -60065, -60045, -60025, -60004, -59984, -59964, -59944, -59923,
+ -59903, -59883, -59862, -59842, -59821, -59801, -59780, -59759,
+ -59739, -59718, -59697, -59677, -59656, -59635, -59614, -59593,
+ -59572, -59551, -59530, -59509, -59488, -59467, -59446, -59425,
+ -59404, -59382, -59361, -59340, -59318, -59297, -59276, -59254,
+ -59233, -59211, -59189, -59168, -59146, -59125, -59103, -59081,
+ -59059, -59038, -59016, -58994, -58972, -58950, -58928, -58906,
+ -58884, -58862, -58840, -58818, -58795, -58773, -58751, -58729,
+ -58706, -58684, -58662, -58639, -58617, -58594, -58572, -58549,
+ -58527, -58504, -58481, -58459, -58436, -58413, -58390, -58367,
+ -58345, -58322, -58299, -58276, -58253, -58230, -58207, -58183,
+ -58160, -58137, -58114, -58091, -58067, -58044, -58021, -57997,
+ -57974, -57950, -57927, -57903, -57880, -57856, -57833, -57809,
+ -57785, -57762, -57738, -57714, -57690, -57666, -57642, -57618,
+ -57594, -57570, -57546, -57522, -57498, -57474, -57450, -57426,
+ -57402, -57377, -57353, -57329, -57304, -57280, -57255, -57231,
+ -57206, -57182, -57157, -57133, -57108, -57083, -57059, -57034,
+ -57009, -56984, -56959, -56935, -56910, -56885, -56860, -56835,
+ -56810, -56785, -56760, -56734, -56709, -56684, -56659, -56633,
+ -56608, -56583, -56557, -56532, -56507, -56481, -56456, -56430,
+ -56404, -56379, -56353, -56328, -56302, -56276, -56250, -56225,
+ -56199, -56173, -56147, -56121, -56095, -56069, -56043, -56017,
+ -55991, -55965, -55938, -55912, -55886, -55860, -55833, -55807,
+ -55781, -55754, -55728, -55701, -55675, -55648, -55622, -55595,
+ -55569, -55542, -55515, -55489, -55462, -55435, -55408, -55381,
+ -55354, -55327, -55300, -55274, -55246, -55219, -55192, -55165,
+ -55138, -55111, -55084, -55056, -55029, -55002, -54974, -54947,
+ -54920, -54892, -54865, -54837, -54810, -54782, -54755, -54727,
+ -54699, -54672, -54644, -54616, -54588, -54560, -54533, -54505,
+ -54477, -54449, -54421, -54393, -54365, -54337, -54308, -54280,
+ -54252, -54224, -54196, -54167, -54139, -54111, -54082, -54054,
+ -54026, -53997, -53969, -53940, -53911, -53883, -53854, -53826,
+ -53797, -53768, -53739, -53711, -53682, -53653, -53624, -53595,
+ -53566, -53537, -53508, -53479, -53450, -53421, -53392, -53363,
+ -53334, -53304, -53275, -53246, -53216, -53187, -53158, -53128,
+ -53099, -53069, -53040, -53010, -52981, -52951, -52922, -52892,
+ -52862, -52832, -52803, -52773, -52743, -52713, -52683, -52653,
+ -52624, -52594, -52564, -52534, -52503, -52473, -52443, -52413,
+ -52383, -52353, -52322, -52292, -52262, -52231, -52201, -52171,
+ -52140, -52110, -52079, -52049, -52018, -51988, -51957, -51926,
+ -51896, -51865, -51834, -51803, -51773, -51742, -51711, -51680,
+ -51649, -51618, -51587, -51556, -51525, -51494, -51463, -51432,
+ -51401, -51369, -51338, -51307, -51276, -51244, -51213, -51182,
+ -51150, -51119, -51087, -51056, -51024, -50993, -50961, -50929,
+ -50898, -50866, -50834, -50803, -50771, -50739, -50707, -50675,
+ -50644, -50612, -50580, -50548, -50516, -50484, -50452, -50420,
+ -50387, -50355, -50323, -50291, -50259, -50226, -50194, -50162,
+ -50129, -50097, -50065, -50032, -50000, -49967, -49935, -49902,
+ -49869, -49837, -49804, -49771, -49739, -49706, -49673, -49640,
+ -49608, -49575, -49542, -49509, -49476, -49443, -49410, -49377,
+ -49344, -49311, -49278, -49244, -49211, -49178, -49145, -49112,
+ -49078, -49045, -49012, -48978, -48945, -48911, -48878, -48844,
+ -48811, -48777, -48744, -48710, -48676, -48643, -48609, -48575,
+ -48542, -48508, -48474, -48440, -48406, -48372, -48338, -48305,
+ -48271, -48237, -48202, -48168, -48134, -48100, -48066, -48032,
+ -47998, -47963, -47929, -47895, -47860, -47826, -47792, -47757,
+ -47723, -47688, -47654, -47619, -47585, -47550, -47516, -47481,
+ -47446, -47412, -47377, -47342, -47307, -47273, -47238, -47203,
+ -47168, -47133, -47098, -47063, -47028, -46993, -46958, -46923,
+ -46888, -46853, -46818, -46783, -46747, -46712, -46677, -46642,
+ -46606, -46571, -46536, -46500, -46465, -46429, -46394, -46358,
+ -46323, -46287, -46251, -46216, -46180, -46145, -46109, -46073,
+ -46037, -46002, -45966, -45930, -45894, -45858, -45822, -45786,
+ -45750, -45714, -45678, -45642, -45606, -45570, -45534, -45498,
+ -45462, -45425, -45389, -45353, -45316, -45280, -45244, -45207,
+ -45171, -45135, -45098, -45062, -45025, -44989, -44952, -44915,
+ -44879, -44842, -44806, -44769, -44732, -44695, -44659, -44622,
+ -44585, -44548, -44511, -44474, -44437, -44400, -44363, -44326,
+ -44289, -44252, -44215, -44178, -44141, -44104, -44067, -44029,
+ -43992, -43955, -43918, -43880, -43843, -43806, -43768, -43731,
+ -43693, -43656, -43618, -43581, -43543, -43506, -43468, -43430,
+ -43393, -43355, -43317, -43280, -43242, -43204, -43166, -43128,
+ -43091, -43053, -43015, -42977, -42939, -42901, -42863, -42825,
+ -42787, -42749, -42711, -42672, -42634, -42596, -42558, -42520,
+ -42481, -42443, -42405, -42366, -42328, -42290, -42251, -42213,
+ -42174, -42136, -42097, -42059, -42020, -41982, -41943, -41904,
+ -41866, -41827, -41788, -41750, -41711, -41672, -41633, -41595,
+ -41556, -41517, -41478, -41439, -41400, -41361, -41322, -41283,
+ -41244, -41205, -41166, -41127, -41087, -41048, -41009, -40970,
+ -40931, -40891, -40852, -40813, -40773, -40734, -40695, -40655,
+ -40616, -40576, -40537, -40497, -40458, -40418, -40379, -40339,
+ -40299, -40260, -40220, -40180, -40141, -40101, -40061, -40021,
+ -39982, -39942, -39902, -39862, -39822, -39782, -39742, -39702,
+ -39662, -39622, -39582, -39542, -39502, -39462, -39422, -39382,
+ -39341, -39301, -39261, -39221, -39180, -39140, -39100, -39059,
+ -39019, -38979, -38938, -38898, -38857, -38817, -38776, -38736,
+ -38695, -38655, -38614, -38573, -38533, -38492, -38451, -38411,
+ -38370, -38329, -38288, -38248, -38207, -38166, -38125, -38084,
+ -38043, -38002, -37961, -37920, -37879, -37838, -37797, -37756,
+ -37715, -37674, -37633, -37592, -37550, -37509, -37468, -37427,
+ -37386, -37344, -37303, -37262, -37220, -37179, -37137, -37096,
+ -37055, -37013, -36972, -36930, -36889, -36847, -36805, -36764,
+ -36722, -36681, -36639, -36597, -36556, -36514, -36472, -36430,
+ -36388, -36347, -36305, -36263, -36221, -36179, -36137, -36095,
+ -36053, -36011, -35969, -35927, -35885, -35843, -35801, -35759,
+ -35717, -35675, -35633, -35590, -35548, -35506, -35464, -35421,
+ -35379, -35337, -35294, -35252, -35210, -35167, -35125, -35082,
+ -35040, -34997, -34955, -34912, -34870, -34827, -34785, -34742,
+ -34699, -34657, -34614, -34571, -34529, -34486, -34443, -34400,
+ -34358, -34315, -34272, -34229, -34186, -34143, -34100, -34057,
+ -34015, -33972, -33929, -33886, -33843, -33799, -33756, -33713,
+ -33670, -33627, -33584, -33541, -33498, -33454, -33411, -33368,
+ -33325, -33281, -33238, -33195, -33151, -33108, -33065, -33021,
+ -32978, -32934, -32891, -32847, -32804, -32760, -32717, -32673,
+ -32630, -32586, -32542, -32499, -32455, -32411, -32368, -32324,
+ -32280, -32236, -32193, -32149, -32105, -32061, -32017, -31974,
+ -31930, -31886, -31842, -31798, -31754, -31710, -31666, -31622,
+ -31578, -31534, -31490, -31446, -31402, -31357, -31313, -31269,
+ -31225, -31181, -31136, -31092, -31048, -31004, -30959, -30915,
+ -30871, -30826, -30782, -30738, -30693, -30649, -30604, -30560,
+ -30515, -30471, -30426, -30382, -30337, -30293, -30248, -30204,
+ -30159, -30114, -30070, -30025, -29980, -29936, -29891, -29846,
+ -29801, -29757, -29712, -29667, -29622, -29577, -29533, -29488,
+ -29443, -29398, -29353, -29308, -29263, -29218, -29173, -29128,
+ -29083, -29038, -28993, -28948, -28903, -28858, -28812, -28767,
+ -28722, -28677, -28632, -28586, -28541, -28496, -28451, -28405,
+ -28360, -28315, -28269, -28224, -28179, -28133, -28088, -28042,
+ -27997, -27952, -27906, -27861, -27815, -27770, -27724, -27678,
+ -27633, -27587, -27542, -27496, -27450, -27405, -27359, -27313,
+ -27268, -27222, -27176, -27131, -27085, -27039, -26993, -26947,
+ -26902, -26856, -26810, -26764, -26718, -26672, -26626, -26580,
+ -26534, -26488, -26442, -26396, -26350, -26304, -26258, -26212,
+ -26166, -26120, -26074, -26028, -25982, -25936, -25889, -25843,
+ -25797, -25751, -25705, -25658, -25612, -25566, -25520, -25473,
+ -25427, -25381, -25334, -25288, -25241, -25195, -25149, -25102,
+ -25056, -25009, -24963, -24916, -24870, -24823, -24777, -24730,
+ -24684, -24637, -24591, -24544, -24497, -24451, -24404, -24357,
+ -24311, -24264, -24217, -24171, -24124, -24077, -24030, -23984,
+ -23937, -23890, -23843, -23796, -23750, -23703, -23656, -23609,
+ -23562, -23515, -23468, -23421, -23374, -23327, -23280, -23233,
+ -23186, -23139, -23092, -23045, -22998, -22951, -22904, -22857,
+ -22810, -22763, -22716, -22668, -22621, -22574, -22527, -22480,
+ -22432, -22385, -22338, -22291, -22243, -22196, -22149, -22102,
+ -22054, -22007, -21960, -21912, -21865, -21817, -21770, -21723,
+ -21675, -21628, -21580, -21533, -21485, -21438, -21390, -21343,
+ -21295, -21248, -21200, -21153, -21105, -21057, -21010, -20962,
+ -20915, -20867, -20819, -20772, -20724, -20676, -20629, -20581,
+ -20533, -20485, -20438, -20390, -20342, -20294, -20246, -20199,
+ -20151, -20103, -20055, -20007, -19959, -19912, -19864, -19816,
+ -19768, -19720, -19672, -19624, -19576, -19528, -19480, -19432,
+ -19384, -19336, -19288, -19240, -19192, -19144, -19096, -19048,
+ -19000, -18951, -18903, -18855, -18807, -18759, -18711, -18663,
+ -18614, -18566, -18518, -18470, -18421, -18373, -18325, -18277,
+ -18228, -18180, -18132, -18084, -18035, -17987, -17939, -17890,
+ -17842, -17793, -17745, -17697, -17648, -17600, -17551, -17503,
+ -17455, -17406, -17358, -17309, -17261, -17212, -17164, -17115,
+ -17067, -17018, -16970, -16921, -16872, -16824, -16775, -16727,
+ -16678, -16629, -16581, -16532, -16484, -16435, -16386, -16338,
+ -16289, -16240, -16191, -16143, -16094, -16045, -15997, -15948,
+ -15899, -15850, -15802, -15753, -15704, -15655, -15606, -15557,
+ -15509, -15460, -15411, -15362, -15313, -15264, -15215, -15167,
+ -15118, -15069, -15020, -14971, -14922, -14873, -14824, -14775,
+ -14726, -14677, -14628, -14579, -14530, -14481, -14432, -14383,
+ -14334, -14285, -14236, -14187, -14138, -14089, -14040, -13990,
+ -13941, -13892, -13843, -13794, -13745, -13696, -13647, -13597,
+ -13548, -13499, -13450, -13401, -13351, -13302, -13253, -13204,
+ -13154, -13105, -13056, -13007, -12957, -12908, -12859, -12810,
+ -12760, -12711, -12662, -12612, -12563, -12514, -12464, -12415,
+ -12366, -12316, -12267, -12217, -12168, -12119, -12069, -12020,
+ -11970, -11921, -11872, -11822, -11773, -11723, -11674, -11624,
+ -11575, -11525, -11476, -11426, -11377, -11327, -11278, -11228,
+ -11179, -11129, -11080, -11030, -10981, -10931, -10882, -10832,
+ -10782, -10733, -10683, -10634, -10584, -10534, -10485, -10435,
+ -10386, -10336, -10286, -10237, -10187, -10137, -10088, -10038,
+ -9988, -9939, -9889, -9839, -9790, -9740, -9690, -9640,
+ -9591, -9541, -9491, -9442, -9392, -9342, -9292, -9243,
+ -9193, -9143, -9093, -9043, -8994, -8944, -8894, -8844,
+ -8794, -8745, -8695, -8645, -8595, -8545, -8496, -8446,
+ -8396, -8346, -8296, -8246, -8196, -8147, -8097, -8047,
+ -7997, -7947, -7897, -7847, -7797, -7747, -7697, -7648,
+ -7598, -7548, -7498, -7448, -7398, -7348, -7298, -7248,
+ -7198, -7148, -7098, -7048, -6998, -6948, -6898, -6848,
+ -6798, -6748, -6698, -6648, -6598, -6548, -6498, -6448,
+ -6398, -6348, -6298, -6248, -6198, -6148, -6098, -6048,
+ -5998, -5948, -5898, -5848, -5798, -5747, -5697, -5647,
+ -5597, -5547, -5497, -5447, -5397, -5347, -5297, -5247,
+ -5197, -5146, -5096, -5046, -4996, -4946, -4896, -4846,
+ -4796, -4745, -4695, -4645, -4595, -4545, -4495, -4445,
+ -4394, -4344, -4294, -4244, -4194, -4144, -4093, -4043,
+ -3993, -3943, -3893, -3843, -3792, -3742, -3692, -3642,
+ -3592, -3541, -3491, -3441, -3391, -3341, -3291, -3240,
+ -3190, -3140, -3090, -3039, -2989, -2939, -2889, -2839,
+ -2788, -2738, -2688, -2638, -2588, -2537, -2487, -2437,
+ -2387, -2336, -2286, -2236, -2186, -2135, -2085, -2035,
+ -1985, -1934, -1884, -1834, -1784, -1733, -1683, -1633,
+ -1583, -1532, -1482, -1432, -1382, -1331, -1281, -1231,
+ -1181, -1130, -1080, -1030, -980, -929, -879, -829,
+ -779, -728, -678, -628, -578, -527, -477, -427,
+ -376, -326, -276, -226, -175, -125, -75, -25,
+ 25, 75, 125, 175, 226, 276, 326, 376,
+ 427, 477, 527, 578, 628, 678, 728, 779,
+ 829, 879, 929, 980, 1030, 1080, 1130, 1181,
+ 1231, 1281, 1331, 1382, 1432, 1482, 1532, 1583,
+ 1633, 1683, 1733, 1784, 1834, 1884, 1934, 1985,
+ 2035, 2085, 2135, 2186, 2236, 2286, 2336, 2387,
+ 2437, 2487, 2537, 2587, 2638, 2688, 2738, 2788,
+ 2839, 2889, 2939, 2989, 3039, 3090, 3140, 3190,
+ 3240, 3291, 3341, 3391, 3441, 3491, 3542, 3592,
+ 3642, 3692, 3742, 3792, 3843, 3893, 3943, 3993,
+ 4043, 4093, 4144, 4194, 4244, 4294, 4344, 4394,
+ 4445, 4495, 4545, 4595, 4645, 4695, 4745, 4796,
+ 4846, 4896, 4946, 4996, 5046, 5096, 5146, 5197,
+ 5247, 5297, 5347, 5397, 5447, 5497, 5547, 5597,
+ 5647, 5697, 5747, 5798, 5848, 5898, 5948, 5998,
+ 6048, 6098, 6148, 6198, 6248, 6298, 6348, 6398,
+ 6448, 6498, 6548, 6598, 6648, 6698, 6748, 6798,
+ 6848, 6898, 6948, 6998, 7048, 7098, 7148, 7198,
+ 7248, 7298, 7348, 7398, 7448, 7498, 7548, 7598,
+ 7648, 7697, 7747, 7797, 7847, 7897, 7947, 7997,
+ 8047, 8097, 8147, 8196, 8246, 8296, 8346, 8396,
+ 8446, 8496, 8545, 8595, 8645, 8695, 8745, 8794,
+ 8844, 8894, 8944, 8994, 9043, 9093, 9143, 9193,
+ 9243, 9292, 9342, 9392, 9442, 9491, 9541, 9591,
+ 9640, 9690, 9740, 9790, 9839, 9889, 9939, 9988,
+ 10038, 10088, 10137, 10187, 10237, 10286, 10336, 10386,
+ 10435, 10485, 10534, 10584, 10634, 10683, 10733, 10782,
+ 10832, 10882, 10931, 10981, 11030, 11080, 11129, 11179,
+ 11228, 11278, 11327, 11377, 11426, 11476, 11525, 11575,
+ 11624, 11674, 11723, 11773, 11822, 11872, 11921, 11970,
+ 12020, 12069, 12119, 12168, 12218, 12267, 12316, 12366,
+ 12415, 12464, 12514, 12563, 12612, 12662, 12711, 12760,
+ 12810, 12859, 12908, 12957, 13007, 13056, 13105, 13154,
+ 13204, 13253, 13302, 13351, 13401, 13450, 13499, 13548,
+ 13597, 13647, 13696, 13745, 13794, 13843, 13892, 13941,
+ 13990, 14040, 14089, 14138, 14187, 14236, 14285, 14334,
+ 14383, 14432, 14481, 14530, 14579, 14628, 14677, 14726,
+ 14775, 14824, 14873, 14922, 14971, 15020, 15069, 15118,
+ 15167, 15215, 15264, 15313, 15362, 15411, 15460, 15509,
+ 15557, 15606, 15655, 15704, 15753, 15802, 15850, 15899,
+ 15948, 15997, 16045, 16094, 16143, 16191, 16240, 16289,
+ 16338, 16386, 16435, 16484, 16532, 16581, 16629, 16678,
+ 16727, 16775, 16824, 16872, 16921, 16970, 17018, 17067,
+ 17115, 17164, 17212, 17261, 17309, 17358, 17406, 17455,
+ 17503, 17551, 17600, 17648, 17697, 17745, 17793, 17842,
+ 17890, 17939, 17987, 18035, 18084, 18132, 18180, 18228,
+ 18277, 18325, 18373, 18421, 18470, 18518, 18566, 18614,
+ 18663, 18711, 18759, 18807, 18855, 18903, 18951, 19000,
+ 19048, 19096, 19144, 19192, 19240, 19288, 19336, 19384,
+ 19432, 19480, 19528, 19576, 19624, 19672, 19720, 19768,
+ 19816, 19864, 19912, 19959, 20007, 20055, 20103, 20151,
+ 20199, 20246, 20294, 20342, 20390, 20438, 20485, 20533,
+ 20581, 20629, 20676, 20724, 20772, 20819, 20867, 20915,
+ 20962, 21010, 21057, 21105, 21153, 21200, 21248, 21295,
+ 21343, 21390, 21438, 21485, 21533, 21580, 21628, 21675,
+ 21723, 21770, 21817, 21865, 21912, 21960, 22007, 22054,
+ 22102, 22149, 22196, 22243, 22291, 22338, 22385, 22432,
+ 22480, 22527, 22574, 22621, 22668, 22716, 22763, 22810,
+ 22857, 22904, 22951, 22998, 23045, 23092, 23139, 23186,
+ 23233, 23280, 23327, 23374, 23421, 23468, 23515, 23562,
+ 23609, 23656, 23703, 23750, 23796, 23843, 23890, 23937,
+ 23984, 24030, 24077, 24124, 24171, 24217, 24264, 24311,
+ 24357, 24404, 24451, 24497, 24544, 24591, 24637, 24684,
+ 24730, 24777, 24823, 24870, 24916, 24963, 25009, 25056,
+ 25102, 25149, 25195, 25241, 25288, 25334, 25381, 25427,
+ 25473, 25520, 25566, 25612, 25658, 25705, 25751, 25797,
+ 25843, 25889, 25936, 25982, 26028, 26074, 26120, 26166,
+ 26212, 26258, 26304, 26350, 26396, 26442, 26488, 26534,
+ 26580, 26626, 26672, 26718, 26764, 26810, 26856, 26902,
+ 26947, 26993, 27039, 27085, 27131, 27176, 27222, 27268,
+ 27313, 27359, 27405, 27450, 27496, 27542, 27587, 27633,
+ 27678, 27724, 27770, 27815, 27861, 27906, 27952, 27997,
+ 28042, 28088, 28133, 28179, 28224, 28269, 28315, 28360,
+ 28405, 28451, 28496, 28541, 28586, 28632, 28677, 28722,
+ 28767, 28812, 28858, 28903, 28948, 28993, 29038, 29083,
+ 29128, 29173, 29218, 29263, 29308, 29353, 29398, 29443,
+ 29488, 29533, 29577, 29622, 29667, 29712, 29757, 29801,
+ 29846, 29891, 29936, 29980, 30025, 30070, 30114, 30159,
+ 30204, 30248, 30293, 30337, 30382, 30427, 30471, 30516,
+ 30560, 30604, 30649, 30693, 30738, 30782, 30826, 30871,
+ 30915, 30959, 31004, 31048, 31092, 31136, 31181, 31225,
+ 31269, 31313, 31357, 31402, 31446, 31490, 31534, 31578,
+ 31622, 31666, 31710, 31754, 31798, 31842, 31886, 31930,
+ 31974, 32017, 32061, 32105, 32149, 32193, 32236, 32280,
+ 32324, 32368, 32411, 32455, 32499, 32542, 32586, 32630,
+ 32673, 32717, 32760, 32804, 32847, 32891, 32934, 32978,
+ 33021, 33065, 33108, 33151, 33195, 33238, 33281, 33325,
+ 33368, 33411, 33454, 33498, 33541, 33584, 33627, 33670,
+ 33713, 33756, 33799, 33843, 33886, 33929, 33972, 34015,
+ 34057, 34100, 34143, 34186, 34229, 34272, 34315, 34358,
+ 34400, 34443, 34486, 34529, 34571, 34614, 34657, 34699,
+ 34742, 34785, 34827, 34870, 34912, 34955, 34997, 35040,
+ 35082, 35125, 35167, 35210, 35252, 35294, 35337, 35379,
+ 35421, 35464, 35506, 35548, 35590, 35633, 35675, 35717,
+ 35759, 35801, 35843, 35885, 35927, 35969, 36011, 36053,
+ 36095, 36137, 36179, 36221, 36263, 36305, 36347, 36388,
+ 36430, 36472, 36514, 36556, 36597, 36639, 36681, 36722,
+ 36764, 36805, 36847, 36889, 36930, 36972, 37013, 37055,
+ 37096, 37137, 37179, 37220, 37262, 37303, 37344, 37386,
+ 37427, 37468, 37509, 37551, 37592, 37633, 37674, 37715,
+ 37756, 37797, 37838, 37879, 37920, 37961, 38002, 38043,
+ 38084, 38125, 38166, 38207, 38248, 38288, 38329, 38370,
+ 38411, 38451, 38492, 38533, 38573, 38614, 38655, 38695,
+ 38736, 38776, 38817, 38857, 38898, 38938, 38979, 39019,
+ 39059, 39100, 39140, 39180, 39221, 39261, 39301, 39341,
+ 39382, 39422, 39462, 39502, 39542, 39582, 39622, 39662,
+ 39702, 39742, 39782, 39822, 39862, 39902, 39942, 39982,
+ 40021, 40061, 40101, 40141, 40180, 40220, 40260, 40299,
+ 40339, 40379, 40418, 40458, 40497, 40537, 40576, 40616,
+ 40655, 40695, 40734, 40773, 40813, 40852, 40891, 40931,
+ 40970, 41009, 41048, 41087, 41127, 41166, 41205, 41244,
+ 41283, 41322, 41361, 41400, 41439, 41478, 41517, 41556,
+ 41595, 41633, 41672, 41711, 41750, 41788, 41827, 41866,
+ 41904, 41943, 41982, 42020, 42059, 42097, 42136, 42174,
+ 42213, 42251, 42290, 42328, 42366, 42405, 42443, 42481,
+ 42520, 42558, 42596, 42634, 42672, 42711, 42749, 42787,
+ 42825, 42863, 42901, 42939, 42977, 43015, 43053, 43091,
+ 43128, 43166, 43204, 43242, 43280, 43317, 43355, 43393,
+ 43430, 43468, 43506, 43543, 43581, 43618, 43656, 43693,
+ 43731, 43768, 43806, 43843, 43880, 43918, 43955, 43992,
+ 44029, 44067, 44104, 44141, 44178, 44215, 44252, 44289,
+ 44326, 44363, 44400, 44437, 44474, 44511, 44548, 44585,
+ 44622, 44659, 44695, 44732, 44769, 44806, 44842, 44879,
+ 44915, 44952, 44989, 45025, 45062, 45098, 45135, 45171,
+ 45207, 45244, 45280, 45316, 45353, 45389, 45425, 45462,
+ 45498, 45534, 45570, 45606, 45642, 45678, 45714, 45750,
+ 45786, 45822, 45858, 45894, 45930, 45966, 46002, 46037,
+ 46073, 46109, 46145, 46180, 46216, 46252, 46287, 46323,
+ 46358, 46394, 46429, 46465, 46500, 46536, 46571, 46606,
+ 46642, 46677, 46712, 46747, 46783, 46818, 46853, 46888,
+ 46923, 46958, 46993, 47028, 47063, 47098, 47133, 47168,
+ 47203, 47238, 47273, 47308, 47342, 47377, 47412, 47446,
+ 47481, 47516, 47550, 47585, 47619, 47654, 47688, 47723,
+ 47757, 47792, 47826, 47861, 47895, 47929, 47963, 47998,
+ 48032, 48066, 48100, 48134, 48168, 48202, 48237, 48271,
+ 48305, 48338, 48372, 48406, 48440, 48474, 48508, 48542,
+ 48575, 48609, 48643, 48676, 48710, 48744, 48777, 48811,
+ 48844, 48878, 48911, 48945, 48978, 49012, 49045, 49078,
+ 49112, 49145, 49178, 49211, 49244, 49278, 49311, 49344,
+ 49377, 49410, 49443, 49476, 49509, 49542, 49575, 49608,
+ 49640, 49673, 49706, 49739, 49771, 49804, 49837, 49869,
+ 49902, 49935, 49967, 50000, 50032, 50064, 50097, 50129,
+ 50162, 50194, 50226, 50259, 50291, 50323, 50355, 50387,
+ 50420, 50452, 50484, 50516, 50548, 50580, 50612, 50644,
+ 50675, 50707, 50739, 50771, 50803, 50834, 50866, 50898,
+ 50929, 50961, 50993, 51024, 51056, 51087, 51119, 51150,
+ 51182, 51213, 51244, 51276, 51307, 51338, 51369, 51401,
+ 51432, 51463, 51494, 51525, 51556, 51587, 51618, 51649,
+ 51680, 51711, 51742, 51773, 51803, 51834, 51865, 51896,
+ 51926, 51957, 51988, 52018, 52049, 52079, 52110, 52140,
+ 52171, 52201, 52231, 52262, 52292, 52322, 52353, 52383,
+ 52413, 52443, 52473, 52503, 52534, 52564, 52594, 52624,
+ 52653, 52683, 52713, 52743, 52773, 52803, 52832, 52862,
+ 52892, 52922, 52951, 52981, 53010, 53040, 53069, 53099,
+ 53128, 53158, 53187, 53216, 53246, 53275, 53304, 53334,
+ 53363, 53392, 53421, 53450, 53479, 53508, 53537, 53566,
+ 53595, 53624, 53653, 53682, 53711, 53739, 53768, 53797,
+ 53826, 53854, 53883, 53912, 53940, 53969, 53997, 54026,
+ 54054, 54082, 54111, 54139, 54167, 54196, 54224, 54252,
+ 54280, 54309, 54337, 54365, 54393, 54421, 54449, 54477,
+ 54505, 54533, 54560, 54588, 54616, 54644, 54672, 54699,
+ 54727, 54755, 54782, 54810, 54837, 54865, 54892, 54920,
+ 54947, 54974, 55002, 55029, 55056, 55084, 55111, 55138,
+ 55165, 55192, 55219, 55246, 55274, 55300, 55327, 55354,
+ 55381, 55408, 55435, 55462, 55489, 55515, 55542, 55569,
+ 55595, 55622, 55648, 55675, 55701, 55728, 55754, 55781,
+ 55807, 55833, 55860, 55886, 55912, 55938, 55965, 55991,
+ 56017, 56043, 56069, 56095, 56121, 56147, 56173, 56199,
+ 56225, 56250, 56276, 56302, 56328, 56353, 56379, 56404,
+ 56430, 56456, 56481, 56507, 56532, 56557, 56583, 56608,
+ 56633, 56659, 56684, 56709, 56734, 56760, 56785, 56810,
+ 56835, 56860, 56885, 56910, 56935, 56959, 56984, 57009,
+ 57034, 57059, 57083, 57108, 57133, 57157, 57182, 57206,
+ 57231, 57255, 57280, 57304, 57329, 57353, 57377, 57402,
+ 57426, 57450, 57474, 57498, 57522, 57546, 57570, 57594,
+ 57618, 57642, 57666, 57690, 57714, 57738, 57762, 57785,
+ 57809, 57833, 57856, 57880, 57903, 57927, 57950, 57974,
+ 57997, 58021, 58044, 58067, 58091, 58114, 58137, 58160,
+ 58183, 58207, 58230, 58253, 58276, 58299, 58322, 58345,
+ 58367, 58390, 58413, 58436, 58459, 58481, 58504, 58527,
+ 58549, 58572, 58594, 58617, 58639, 58662, 58684, 58706,
+ 58729, 58751, 58773, 58795, 58818, 58840, 58862, 58884,
+ 58906, 58928, 58950, 58972, 58994, 59016, 59038, 59059,
+ 59081, 59103, 59125, 59146, 59168, 59190, 59211, 59233,
+ 59254, 59276, 59297, 59318, 59340, 59361, 59382, 59404,
+ 59425, 59446, 59467, 59488, 59509, 59530, 59551, 59572,
+ 59593, 59614, 59635, 59656, 59677, 59697, 59718, 59739,
+ 59759, 59780, 59801, 59821, 59842, 59862, 59883, 59903,
+ 59923, 59944, 59964, 59984, 60004, 60025, 60045, 60065,
+ 60085, 60105, 60125, 60145, 60165, 60185, 60205, 60225,
+ 60244, 60264, 60284, 60304, 60323, 60343, 60363, 60382,
+ 60402, 60421, 60441, 60460, 60479, 60499, 60518, 60537,
+ 60556, 60576, 60595, 60614, 60633, 60652, 60671, 60690,
+ 60709, 60728, 60747, 60766, 60785, 60803, 60822, 60841,
+ 60859, 60878, 60897, 60915, 60934, 60952, 60971, 60989,
+ 61007, 61026, 61044, 61062, 61081, 61099, 61117, 61135,
+ 61153, 61171, 61189, 61207, 61225, 61243, 61261, 61279,
+ 61297, 61314, 61332, 61350, 61367, 61385, 61403, 61420,
+ 61438, 61455, 61473, 61490, 61507, 61525, 61542, 61559,
+ 61577, 61594, 61611, 61628, 61645, 61662, 61679, 61696,
+ 61713, 61730, 61747, 61764, 61780, 61797, 61814, 61831,
+ 61847, 61864, 61880, 61897, 61913, 61930, 61946, 61963,
+ 61979, 61995, 62012, 62028, 62044, 62060, 62076, 62092,
+ 62108, 62125, 62141, 62156, 62172, 62188, 62204, 62220,
+ 62236, 62251, 62267, 62283, 62298, 62314, 62329, 62345,
+ 62360, 62376, 62391, 62407, 62422, 62437, 62453, 62468,
+ 62483, 62498, 62513, 62528, 62543, 62558, 62573, 62588,
+ 62603, 62618, 62633, 62648, 62662, 62677, 62692, 62706,
+ 62721, 62735, 62750, 62764, 62779, 62793, 62808, 62822,
+ 62836, 62850, 62865, 62879, 62893, 62907, 62921, 62935,
+ 62949, 62963, 62977, 62991, 63005, 63019, 63032, 63046,
+ 63060, 63074, 63087, 63101, 63114, 63128, 63141, 63155,
+ 63168, 63182, 63195, 63208, 63221, 63235, 63248, 63261,
+ 63274, 63287, 63300, 63313, 63326, 63339, 63352, 63365,
+ 63378, 63390, 63403, 63416, 63429, 63441, 63454, 63466,
+ 63479, 63491, 63504, 63516, 63528, 63541, 63553, 63565,
+ 63578, 63590, 63602, 63614, 63626, 63638, 63650, 63662,
+ 63674, 63686, 63698, 63709, 63721, 63733, 63745, 63756,
+ 63768, 63779, 63791, 63803, 63814, 63825, 63837, 63848,
+ 63859, 63871, 63882, 63893, 63904, 63915, 63927, 63938,
+ 63949, 63960, 63971, 63981, 63992, 64003, 64014, 64025,
+ 64035, 64046, 64057, 64067, 64078, 64088, 64099, 64109,
+ 64120, 64130, 64140, 64151, 64161, 64171, 64181, 64192,
+ 64202, 64212, 64222, 64232, 64242, 64252, 64261, 64271,
+ 64281, 64291, 64301, 64310, 64320, 64330, 64339, 64349,
+ 64358, 64368, 64377, 64387, 64396, 64405, 64414, 64424,
+ 64433, 64442, 64451, 64460, 64469, 64478, 64487, 64496,
+ 64505, 64514, 64523, 64532, 64540, 64549, 64558, 64566,
+ 64575, 64584, 64592, 64600, 64609, 64617, 64626, 64634,
+ 64642, 64651, 64659, 64667, 64675, 64683, 64691, 64699,
+ 64707, 64715, 64723, 64731, 64739, 64747, 64754, 64762,
+ 64770, 64777, 64785, 64793, 64800, 64808, 64815, 64822,
+ 64830, 64837, 64844, 64852, 64859, 64866, 64873, 64880,
+ 64887, 64895, 64902, 64908, 64915, 64922, 64929, 64936,
+ 64943, 64949, 64956, 64963, 64969, 64976, 64982, 64989,
+ 64995, 65002, 65008, 65015, 65021, 65027, 65033, 65040,
+ 65046, 65052, 65058, 65064, 65070, 65076, 65082, 65088,
+ 65094, 65099, 65105, 65111, 65117, 65122, 65128, 65133,
+ 65139, 65144, 65150, 65155, 65161, 65166, 65171, 65177,
+ 65182, 65187, 65192, 65197, 65202, 65207, 65212, 65217,
+ 65222, 65227, 65232, 65237, 65242, 65246, 65251, 65256,
+ 65260, 65265, 65270, 65274, 65279, 65283, 65287, 65292,
+ 65296, 65300, 65305, 65309, 65313, 65317, 65321, 65325,
+ 65329, 65333, 65337, 65341, 65345, 65349, 65352, 65356,
+ 65360, 65363, 65367, 65371, 65374, 65378, 65381, 65385,
+ 65388, 65391, 65395, 65398, 65401, 65404, 65408, 65411,
+ 65414, 65417, 65420, 65423, 65426, 65429, 65431, 65434,
+ 65437, 65440, 65442, 65445, 65448, 65450, 65453, 65455,
+ 65458, 65460, 65463, 65465, 65467, 65470, 65472, 65474,
+ 65476, 65478, 65480, 65482, 65484, 65486, 65488, 65490,
+ 65492, 65494, 65496, 65497, 65499, 65501, 65502, 65504,
+ 65505, 65507, 65508, 65510, 65511, 65513, 65514, 65515,
+ 65516, 65518, 65519, 65520, 65521, 65522, 65523, 65524,
+ 65525, 65526, 65527, 65527, 65528, 65529, 65530, 65530,
+ 65531, 65531, 65532, 65532, 65533, 65533, 65534, 65534,
+ 65534, 65535, 65535, 65535, 65535, 65535, 65535, 65535
+ };
+
+ private static uint[] tanToAngle =
+ {
+ 0, 333772, 667544, 1001315, 1335086, 1668857, 2002626, 2336395,
+ 2670163, 3003929, 3337694, 3671457, 4005219, 4338979, 4672736, 5006492,
+ 5340245, 5673995, 6007743, 6341488, 6675230, 7008968, 7342704, 7676435,
+ 8010164, 8343888, 8677609, 9011325, 9345037, 9678744, 10012447, 10346145,
+ 10679838, 11013526, 11347209, 11680887, 12014558, 12348225, 12681885, 13015539,
+ 13349187, 13682829, 14016464, 14350092, 14683714, 15017328, 15350936, 15684536,
+ 16018129, 16351714, 16685291, 17018860, 17352422, 17685974, 18019518, 18353054,
+ 18686582, 19020100, 19353610, 19687110, 20020600, 20354080, 20687552, 21021014,
+ 21354466, 21687906, 22021338, 22354758, 22688168, 23021568, 23354956, 23688332,
+ 24021698, 24355052, 24688396, 25021726, 25355046, 25688352, 26021648, 26354930,
+ 26688200, 27021456, 27354702, 27687932, 28021150, 28354356, 28687548, 29020724,
+ 29353888, 29687038, 30020174, 30353296, 30686404, 31019496, 31352574, 31685636,
+ 32018684, 32351718, 32684734, 33017736, 33350722, 33683692, 34016648, 34349584,
+ 34682508, 35015412, 35348300, 35681172, 36014028, 36346868, 36679688, 37012492,
+ 37345276, 37678044, 38010792, 38343524, 38676240, 39008936, 39341612, 39674272,
+ 40006912, 40339532, 40672132, 41004716, 41337276, 41669820, 42002344, 42334848,
+ 42667332, 42999796, 43332236, 43664660, 43997060, 44329444, 44661800, 44994140,
+ 45326456, 45658752, 45991028, 46323280, 46655512, 46987720, 47319908, 47652072,
+ 47984212, 48316332, 48648428, 48980500, 49312548, 49644576, 49976580, 50308556,
+ 50640512, 50972444, 51304352, 51636236, 51968096, 52299928, 52631740, 52963524,
+ 53295284, 53627020, 53958728, 54290412, 54622068, 54953704, 55285308, 55616888,
+ 55948444, 56279972, 56611472, 56942948, 57274396, 57605816, 57937212, 58268576,
+ 58599916, 58931228, 59262512, 59593768, 59924992, 60256192, 60587364, 60918508,
+ 61249620, 61580704, 61911760, 62242788, 62573788, 62904756, 63235692, 63566604,
+ 63897480, 64228332, 64559148, 64889940, 65220696, 65551424, 65882120, 66212788,
+ 66543420, 66874024, 67204600, 67535136, 67865648, 68196120, 68526568, 68856984,
+ 69187360, 69517712, 69848024, 70178304, 70508560, 70838776, 71168960, 71499112,
+ 71829224, 72159312, 72489360, 72819376, 73149360, 73479304, 73809216, 74139096,
+ 74468936, 74798744, 75128520, 75458264, 75787968, 76117632, 76447264, 76776864,
+ 77106424, 77435952, 77765440, 78094888, 78424304, 78753688, 79083032, 79412336,
+ 79741608, 80070840, 80400032, 80729192, 81058312, 81387392, 81716432, 82045440,
+ 82374408, 82703336, 83032224, 83361080, 83689896, 84018664, 84347400, 84676096,
+ 85004760, 85333376, 85661952, 85990488, 86318984, 86647448, 86975864, 87304240,
+ 87632576, 87960872, 88289128, 88617344, 88945520, 89273648, 89601736, 89929792,
+ 90257792, 90585760, 90913688, 91241568, 91569408, 91897200, 92224960, 92552672,
+ 92880336, 93207968, 93535552, 93863088, 94190584, 94518040, 94845448, 95172816,
+ 95500136, 95827416, 96154648, 96481832, 96808976, 97136080, 97463136, 97790144,
+ 98117112, 98444032, 98770904, 99097736, 99424520, 99751256, 100077944, 100404592,
+ 100731192, 101057744, 101384248, 101710712, 102037128, 102363488, 102689808, 103016080,
+ 103342312, 103668488, 103994616, 104320696, 104646736, 104972720, 105298656, 105624552,
+ 105950392, 106276184, 106601928, 106927624, 107253272, 107578872, 107904416, 108229920,
+ 108555368, 108880768, 109206120, 109531416, 109856664, 110181872, 110507016, 110832120,
+ 111157168, 111482168, 111807112, 112132008, 112456856, 112781648, 113106392, 113431080,
+ 113755720, 114080312, 114404848, 114729328, 115053760, 115378136, 115702464, 116026744,
+ 116350960, 116675128, 116999248, 117323312, 117647320, 117971272, 118295176, 118619024,
+ 118942816, 119266560, 119590248, 119913880, 120237456, 120560984, 120884456, 121207864,
+ 121531224, 121854528, 122177784, 122500976, 122824112, 123147200, 123470224, 123793200,
+ 124116120, 124438976, 124761784, 125084528, 125407224, 125729856, 126052432, 126374960,
+ 126697424, 127019832, 127342184, 127664472, 127986712, 128308888, 128631008, 128953072,
+ 129275080, 129597024, 129918912, 130240744, 130562520, 130884232, 131205888, 131527480,
+ 131849016, 132170496, 132491912, 132813272, 133134576, 133455816, 133776992, 134098120,
+ 134419184, 134740176, 135061120, 135382000, 135702816, 136023584, 136344272, 136664912,
+ 136985488, 137306016, 137626464, 137946864, 138267184, 138587456, 138907664, 139227808,
+ 139547904, 139867920, 140187888, 140507776, 140827616, 141147392, 141467104, 141786752,
+ 142106336, 142425856, 142745312, 143064720, 143384048, 143703312, 144022512, 144341664,
+ 144660736, 144979744, 145298704, 145617584, 145936400, 146255168, 146573856, 146892480,
+ 147211040, 147529536, 147847968, 148166336, 148484640, 148802880, 149121056, 149439152,
+ 149757200, 150075168, 150393072, 150710912, 151028688, 151346400, 151664048, 151981616,
+ 152299136, 152616576, 152933952, 153251264, 153568496, 153885680, 154202784, 154519824,
+ 154836784, 155153696, 155470528, 155787296, 156104000, 156420624, 156737200, 157053696,
+ 157370112, 157686480, 158002768, 158318976, 158635136, 158951216, 159267232, 159583168,
+ 159899040, 160214848, 160530592, 160846256, 161161840, 161477376, 161792832, 162108208,
+ 162423520, 162738768, 163053952, 163369040, 163684080, 163999040, 164313936, 164628752,
+ 164943504, 165258176, 165572784, 165887312, 166201776, 166516160, 166830480, 167144736,
+ 167458912, 167773008, 168087040, 168400992, 168714880, 169028688, 169342432, 169656096,
+ 169969696, 170283216, 170596672, 170910032, 171223344, 171536576, 171849728, 172162800,
+ 172475808, 172788736, 173101600, 173414384, 173727104, 174039728, 174352288, 174664784,
+ 174977200, 175289536, 175601792, 175913984, 176226096, 176538144, 176850096, 177161984,
+ 177473792, 177785536, 178097200, 178408784, 178720288, 179031728, 179343088, 179654368,
+ 179965568, 180276704, 180587744, 180898720, 181209616, 181520448, 181831184, 182141856,
+ 182452448, 182762960, 183073408, 183383760, 183694048, 184004240, 184314368, 184624416,
+ 184934400, 185244288, 185554096, 185863840, 186173504, 186483072, 186792576, 187102000,
+ 187411344, 187720608, 188029808, 188338912, 188647936, 188956896, 189265760, 189574560,
+ 189883264, 190191904, 190500448, 190808928, 191117312, 191425632, 191733872, 192042016,
+ 192350096, 192658096, 192966000, 193273840, 193581584, 193889264, 194196848, 194504352,
+ 194811792, 195119136, 195426400, 195733584, 196040688, 196347712, 196654656, 196961520,
+ 197268304, 197574992, 197881616, 198188144, 198494592, 198800960, 199107248, 199413456,
+ 199719584, 200025616, 200331584, 200637456, 200943248, 201248960, 201554576, 201860128,
+ 202165584, 202470960, 202776256, 203081456, 203386592, 203691632, 203996592, 204301472,
+ 204606256, 204910976, 205215600, 205520144, 205824592, 206128960, 206433248, 206737456,
+ 207041584, 207345616, 207649568, 207953424, 208257216, 208560912, 208864512, 209168048,
+ 209471488, 209774832, 210078112, 210381296, 210684384, 210987408, 211290336, 211593184,
+ 211895936, 212198608, 212501184, 212803680, 213106096, 213408432, 213710672, 214012816,
+ 214314880, 214616864, 214918768, 215220576, 215522288, 215823920, 216125472, 216426928,
+ 216728304, 217029584, 217330784, 217631904, 217932928, 218233856, 218534704, 218835472,
+ 219136144, 219436720, 219737216, 220037632, 220337952, 220638192, 220938336, 221238384,
+ 221538352, 221838240, 222138032, 222437728, 222737344, 223036880, 223336304, 223635664,
+ 223934912, 224234096, 224533168, 224832160, 225131072, 225429872, 225728608, 226027232,
+ 226325776, 226624240, 226922608, 227220880, 227519056, 227817152, 228115168, 228413088,
+ 228710912, 229008640, 229306288, 229603840, 229901312, 230198688, 230495968, 230793152,
+ 231090256, 231387280, 231684192, 231981024, 232277760, 232574416, 232870960, 233167440,
+ 233463808, 233760096, 234056288, 234352384, 234648384, 234944304, 235240128, 235535872,
+ 235831504, 236127056, 236422512, 236717888, 237013152, 237308336, 237603424, 237898416,
+ 238193328, 238488144, 238782864, 239077488, 239372016, 239666464, 239960816, 240255072,
+ 240549232, 240843312, 241137280, 241431168, 241724960, 242018656, 242312256, 242605776,
+ 242899200, 243192512, 243485744, 243778896, 244071936, 244364880, 244657744, 244950496,
+ 245243168, 245535744, 245828224, 246120608, 246412912, 246705104, 246997216, 247289216,
+ 247581136, 247872960, 248164688, 248456320, 248747856, 249039296, 249330640, 249621904,
+ 249913056, 250204128, 250495088, 250785968, 251076736, 251367424, 251658016, 251948512,
+ 252238912, 252529200, 252819408, 253109520, 253399536, 253689456, 253979280, 254269008,
+ 254558640, 254848176, 255137632, 255426976, 255716224, 256005376, 256294432, 256583392,
+ 256872256, 257161024, 257449696, 257738272, 258026752, 258315136, 258603424, 258891600,
+ 259179696, 259467696, 259755600, 260043392, 260331104, 260618704, 260906224, 261193632,
+ 261480960, 261768176, 262055296, 262342320, 262629248, 262916080, 263202816, 263489456,
+ 263776000, 264062432, 264348784, 264635024, 264921168, 265207216, 265493168, 265779024,
+ 266064784, 266350448, 266636000, 266921472, 267206832, 267492096, 267777264, 268062336,
+ 268347312, 268632192, 268916960, 269201632, 269486208, 269770688, 270055072, 270339360,
+ 270623552, 270907616, 271191616, 271475488, 271759296, 272042976, 272326560, 272610048,
+ 272893440, 273176736, 273459936, 273743040, 274026048, 274308928, 274591744, 274874432,
+ 275157024, 275439520, 275721920, 276004224, 276286432, 276568512, 276850528, 277132416,
+ 277414240, 277695936, 277977536, 278259040, 278540448, 278821728, 279102944, 279384032,
+ 279665056, 279945952, 280226752, 280507456, 280788064, 281068544, 281348960, 281629248,
+ 281909472, 282189568, 282469568, 282749440, 283029248, 283308960, 283588544, 283868032,
+ 284147424, 284426720, 284705920, 284985024, 285264000, 285542912, 285821696, 286100384,
+ 286378976, 286657440, 286935840, 287214112, 287492320, 287770400, 288048384, 288326240,
+ 288604032, 288881696, 289159264, 289436768, 289714112, 289991392, 290268576, 290545632,
+ 290822592, 291099456, 291376224, 291652896, 291929440, 292205888, 292482272, 292758528,
+ 293034656, 293310720, 293586656, 293862496, 294138240, 294413888, 294689440, 294964864,
+ 295240192, 295515424, 295790560, 296065600, 296340512, 296615360, 296890080, 297164704,
+ 297439200, 297713632, 297987936, 298262144, 298536256, 298810240, 299084160, 299357952,
+ 299631648, 299905248, 300178720, 300452128, 300725408, 300998592, 301271680, 301544640,
+ 301817536, 302090304, 302362976, 302635520, 302908000, 303180352, 303452608, 303724768,
+ 303996800, 304268768, 304540608, 304812320, 305083968, 305355520, 305626944, 305898272,
+ 306169472, 306440608, 306711616, 306982528, 307253344, 307524064, 307794656, 308065152,
+ 308335552, 308605856, 308876032, 309146112, 309416096, 309685984, 309955744, 310225408,
+ 310494976, 310764448, 311033824, 311303072, 311572224, 311841280, 312110208, 312379040,
+ 312647776, 312916416, 313184960, 313453376, 313721696, 313989920, 314258016, 314526016,
+ 314793920, 315061728, 315329408, 315597024, 315864512, 316131872, 316399168, 316666336,
+ 316933408, 317200384, 317467232, 317733984, 318000640, 318267200, 318533632, 318799968,
+ 319066208, 319332352, 319598368, 319864288, 320130112, 320395808, 320661408, 320926912,
+ 321192320, 321457632, 321722816, 321987904, 322252864, 322517760, 322782528, 323047200,
+ 323311744, 323576192, 323840544, 324104800, 324368928, 324632992, 324896928, 325160736,
+ 325424448, 325688096, 325951584, 326215008, 326478304, 326741504, 327004608, 327267584,
+ 327530464, 327793248, 328055904, 328318496, 328580960, 328843296, 329105568, 329367712,
+ 329629760, 329891680, 330153536, 330415264, 330676864, 330938400, 331199808, 331461120,
+ 331722304, 331983392, 332244384, 332505280, 332766048, 333026752, 333287296, 333547776,
+ 333808128, 334068384, 334328544, 334588576, 334848512, 335108352, 335368064, 335627712,
+ 335887200, 336146624, 336405920, 336665120, 336924224, 337183200, 337442112, 337700864,
+ 337959552, 338218112, 338476576, 338734944, 338993184, 339251328, 339509376, 339767296,
+ 340025120, 340282848, 340540480, 340797984, 341055392, 341312704, 341569888, 341826976,
+ 342083968, 342340832, 342597600, 342854272, 343110848, 343367296, 343623648, 343879904,
+ 344136032, 344392064, 344648000, 344903808, 345159520, 345415136, 345670656, 345926048,
+ 346181344, 346436512, 346691616, 346946592, 347201440, 347456224, 347710880, 347965440,
+ 348219872, 348474208, 348728448, 348982592, 349236608, 349490528, 349744320, 349998048,
+ 350251648, 350505152, 350758528, 351011808, 351264992, 351518048, 351771040, 352023872,
+ 352276640, 352529280, 352781824, 353034272, 353286592, 353538816, 353790944, 354042944,
+ 354294880, 354546656, 354798368, 355049952, 355301440, 355552800, 355804096, 356055264,
+ 356306304, 356557280, 356808128, 357058848, 357309504, 357560032, 357810464, 358060768,
+ 358311008, 358561088, 358811104, 359060992, 359310784, 359560480, 359810048, 360059520,
+ 360308896, 360558144, 360807296, 361056352, 361305312, 361554144, 361802880, 362051488,
+ 362300032, 362548448, 362796736, 363044960, 363293056, 363541024, 363788928, 364036704,
+ 364284384, 364531936, 364779392, 365026752, 365274016, 365521152, 365768192, 366015136,
+ 366261952, 366508672, 366755296, 367001792, 367248192, 367494496, 367740704, 367986784,
+ 368232768, 368478656, 368724416, 368970080, 369215648, 369461088, 369706432, 369951680,
+ 370196800, 370441824, 370686752, 370931584, 371176288, 371420896, 371665408, 371909792,
+ 372154080, 372398272, 372642336, 372886304, 373130176, 373373952, 373617600, 373861152,
+ 374104608, 374347936, 374591168, 374834304, 375077312, 375320224, 375563040, 375805760,
+ 376048352, 376290848, 376533248, 376775520, 377017696, 377259776, 377501728, 377743584,
+ 377985344, 378227008, 378468544, 378709984, 378951328, 379192544, 379433664, 379674688,
+ 379915584, 380156416, 380397088, 380637696, 380878176, 381118560, 381358848, 381599040,
+ 381839104, 382079072, 382318912, 382558656, 382798304, 383037856, 383277280, 383516640,
+ 383755840, 383994976, 384233984, 384472896, 384711712, 384950400, 385188992, 385427488,
+ 385665888, 385904160, 386142336, 386380384, 386618368, 386856224, 387093984, 387331616,
+ 387569152, 387806592, 388043936, 388281152, 388518272, 388755296, 388992224, 389229024,
+ 389465728, 389702336, 389938816, 390175200, 390411488, 390647680, 390883744, 391119712,
+ 391355584, 391591328, 391826976, 392062528, 392297984, 392533312, 392768544, 393003680,
+ 393238720, 393473632, 393708448, 393943168, 394177760, 394412256, 394646656, 394880960,
+ 395115136, 395349216, 395583200, 395817088, 396050848, 396284512, 396518080, 396751520,
+ 396984864, 397218112, 397451264, 397684288, 397917248, 398150080, 398382784, 398615424,
+ 398847936, 399080320, 399312640, 399544832, 399776928, 400008928, 400240832, 400472608,
+ 400704288, 400935872, 401167328, 401398720, 401629984, 401861120, 402092192, 402323136,
+ 402553984, 402784736, 403015360, 403245888, 403476320, 403706656, 403936896, 404167008,
+ 404397024, 404626944, 404856736, 405086432, 405316032, 405545536, 405774912, 406004224,
+ 406233408, 406462464, 406691456, 406920320, 407149088, 407377760, 407606336, 407834784,
+ 408063136, 408291392, 408519520, 408747584, 408975520, 409203360, 409431072, 409658720,
+ 409886240, 410113664, 410340992, 410568192, 410795296, 411022304, 411249216, 411476032,
+ 411702720, 411929312, 412155808, 412382176, 412608480, 412834656, 413060736, 413286720,
+ 413512576, 413738336, 413964000, 414189568, 414415040, 414640384, 414865632, 415090784,
+ 415315840, 415540800, 415765632, 415990368, 416215008, 416439552, 416663968, 416888288,
+ 417112512, 417336640, 417560672, 417784576, 418008384, 418232096, 418455712, 418679200,
+ 418902624, 419125920, 419349120, 419572192, 419795200, 420018080, 420240864, 420463552,
+ 420686144, 420908608, 421130976, 421353280, 421575424, 421797504, 422019488, 422241344,
+ 422463104, 422684768, 422906336, 423127776, 423349120, 423570400, 423791520, 424012576,
+ 424233536, 424454368, 424675104, 424895744, 425116288, 425336736, 425557056, 425777280,
+ 425997408, 426217440, 426437376, 426657184, 426876928, 427096544, 427316064, 427535488,
+ 427754784, 427974016, 428193120, 428412128, 428631040, 428849856, 429068544, 429287168,
+ 429505664, 429724064, 429942368, 430160576, 430378656, 430596672, 430814560, 431032352,
+ 431250048, 431467616, 431685120, 431902496, 432119808, 432336992, 432554080, 432771040,
+ 432987936, 433204736, 433421408, 433637984, 433854464, 434070848, 434287104, 434503296,
+ 434719360, 434935360, 435151232, 435367008, 435582656, 435798240, 436013696, 436229088,
+ 436444352, 436659520, 436874592, 437089568, 437304416, 437519200, 437733856, 437948416,
+ 438162880, 438377248, 438591520, 438805696, 439019744, 439233728, 439447584, 439661344,
+ 439875008, 440088576, 440302048, 440515392, 440728672, 440941824, 441154880, 441367872,
+ 441580736, 441793472, 442006144, 442218720, 442431168, 442643552, 442855808, 443067968,
+ 443280032, 443492000, 443703872, 443915648, 444127296, 444338880, 444550336, 444761696,
+ 444972992, 445184160, 445395232, 445606176, 445817056, 446027840, 446238496, 446449088,
+ 446659552, 446869920, 447080192, 447290400, 447500448, 447710432, 447920320, 448130112,
+ 448339776, 448549376, 448758848, 448968224, 449177536, 449386720, 449595808, 449804800,
+ 450013664, 450222464, 450431168, 450639776, 450848256, 451056640, 451264960, 451473152,
+ 451681248, 451889248, 452097152, 452304960, 452512672, 452720288, 452927808, 453135232,
+ 453342528, 453549760, 453756864, 453963904, 454170816, 454377632, 454584384, 454791008,
+ 454997536, 455203968, 455410304, 455616544, 455822688, 456028704, 456234656, 456440512,
+ 456646240, 456851904, 457057472, 457262912, 457468256, 457673536, 457878688, 458083744,
+ 458288736, 458493600, 458698368, 458903040, 459107616, 459312096, 459516480, 459720768,
+ 459924960, 460129056, 460333056, 460536960, 460740736, 460944448, 461148064, 461351584,
+ 461554976, 461758304, 461961536, 462164640, 462367680, 462570592, 462773440, 462976160,
+ 463178816, 463381344, 463583776, 463786144, 463988384, 464190560, 464392608, 464594560,
+ 464796448, 464998208, 465199872, 465401472, 465602944, 465804320, 466005600, 466206816,
+ 466407904, 466608896, 466809824, 467010624, 467211328, 467411936, 467612480, 467812896,
+ 468013216, 468213440, 468413600, 468613632, 468813568, 469013440, 469213184, 469412832,
+ 469612416, 469811872, 470011232, 470210528, 470409696, 470608800, 470807776, 471006688,
+ 471205472, 471404192, 471602784, 471801312, 471999712, 472198048, 472396288, 472594400,
+ 472792448, 472990400, 473188256, 473385984, 473583648, 473781216, 473978688, 474176064,
+ 474373344, 474570528, 474767616, 474964608, 475161504, 475358336, 475555040, 475751648,
+ 475948192, 476144608, 476340928, 476537184, 476733312, 476929376, 477125344, 477321184,
+ 477516960, 477712640, 477908224, 478103712, 478299104, 478494400, 478689600, 478884704,
+ 479079744, 479274656, 479469504, 479664224, 479858880, 480053408, 480247872, 480442240,
+ 480636512, 480830656, 481024736, 481218752, 481412640, 481606432, 481800128, 481993760,
+ 482187264, 482380704, 482574016, 482767264, 482960416, 483153472, 483346432, 483539296,
+ 483732064, 483924768, 484117344, 484309856, 484502240, 484694560, 484886784, 485078912,
+ 485270944, 485462880, 485654720, 485846464, 486038144, 486229696, 486421184, 486612576,
+ 486803840, 486995040, 487186176, 487377184, 487568096, 487758912, 487949664, 488140320,
+ 488330880, 488521312, 488711712, 488901984, 489092160, 489282240, 489472256, 489662176,
+ 489851968, 490041696, 490231328, 490420896, 490610336, 490799712, 490988960, 491178144,
+ 491367232, 491556224, 491745120, 491933920, 492122656, 492311264, 492499808, 492688256,
+ 492876608, 493064864, 493253056, 493441120, 493629120, 493817024, 494004832, 494192544,
+ 494380160, 494567712, 494755136, 494942496, 495129760, 495316928, 495504000, 495691008,
+ 495877888, 496064704, 496251424, 496438048, 496624608, 496811040, 496997408, 497183680,
+ 497369856, 497555936, 497741920, 497927840, 498113632, 498299360, 498484992, 498670560,
+ 498856000, 499041376, 499226656, 499411840, 499596928, 499781920, 499966848, 500151680,
+ 500336416, 500521056, 500705600, 500890080, 501074464, 501258752, 501442944, 501627040,
+ 501811072, 501995008, 502178848, 502362592, 502546240, 502729824, 502913312, 503096704,
+ 503280000, 503463232, 503646368, 503829408, 504012352, 504195200, 504377984, 504560672,
+ 504743264, 504925760, 505108192, 505290496, 505472736, 505654912, 505836960, 506018944,
+ 506200832, 506382624, 506564320, 506745952, 506927488, 507108928, 507290272, 507471552,
+ 507652736, 507833824, 508014816, 508195744, 508376576, 508557312, 508737952, 508918528,
+ 509099008, 509279392, 509459680, 509639904, 509820032, 510000064, 510180000, 510359872,
+ 510539648, 510719328, 510898944, 511078432, 511257856, 511437216, 511616448, 511795616,
+ 511974688, 512153664, 512332576, 512511392, 512690112, 512868768, 513047296, 513225792,
+ 513404160, 513582432, 513760640, 513938784, 514116800, 514294752, 514472608, 514650368,
+ 514828064, 515005664, 515183168, 515360608, 515537952, 515715200, 515892352, 516069440,
+ 516246432, 516423328, 516600160, 516776896, 516953536, 517130112, 517306592, 517482976,
+ 517659264, 517835488, 518011616, 518187680, 518363648, 518539520, 518715296, 518891008,
+ 519066624, 519242144, 519417600, 519592960, 519768256, 519943424, 520118528, 520293568,
+ 520468480, 520643328, 520818112, 520992800, 521167392, 521341888, 521516320, 521690656,
+ 521864896, 522039072, 522213152, 522387168, 522561056, 522734912, 522908640, 523082304,
+ 523255872, 523429376, 523602784, 523776096, 523949312, 524122464, 524295552, 524468512,
+ 524641440, 524814240, 524986976, 525159616, 525332192, 525504640, 525677056, 525849344,
+ 526021568, 526193728, 526365792, 526537760, 526709632, 526881440, 527053152, 527224800,
+ 527396352, 527567840, 527739200, 527910528, 528081728, 528252864, 528423936, 528594880,
+ 528765760, 528936576, 529107296, 529277920, 529448480, 529618944, 529789344, 529959648,
+ 530129856, 530300000, 530470048, 530640000, 530809888, 530979712, 531149440, 531319072,
+ 531488608, 531658080, 531827488, 531996800, 532166016, 532335168, 532504224, 532673184,
+ 532842080, 533010912, 533179616, 533348288, 533516832, 533685312, 533853728, 534022048,
+ 534190272, 534358432, 534526496, 534694496, 534862400, 535030240, 535197984, 535365632,
+ 535533216, 535700704, 535868128, 536035456, 536202720, 536369888, 536536992, 536704000,
+ 536870912
+ };
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Trig.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Trig.cs
new file mode 100644
index 00000000..b0e8abc0
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Math/Trig.cs
@@ -0,0 +1,73 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Runtime.CompilerServices;
+
+namespace ManagedDoom
+{
+ public static partial class Trig
+ {
+ public const int FineAngleCount = 8192;
+ public const int FineMask = FineAngleCount - 1;
+ public const int AngleToFineShift = 19;
+
+ private const int fineCosineOffset = FineAngleCount / 4;
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed Tan(Angle anglePlus90)
+ {
+ return new Fixed(fineTangent[anglePlus90.Data >> AngleToFineShift]);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed Tan(int fineAnglePlus90)
+ {
+ return new Fixed(fineTangent[fineAnglePlus90]);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed Sin(Angle angle)
+ {
+ return new Fixed(fineSine[angle.Data >> AngleToFineShift]);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed Sin(int fineAngle)
+ {
+ return new Fixed(fineSine[fineAngle]);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed Cos(Angle angle)
+ {
+ return new Fixed(fineSine[(angle.Data >> AngleToFineShift) + fineCosineOffset]);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Fixed Cos(int fineAngle)
+ {
+ return new Fixed(fineSine[fineAngle + fineCosineOffset]);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Angle TanToAngle(uint tan)
+ {
+ return new Angle(tanToAngle[tan]);
+ }
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Menu/DoomMenu.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Menu/DoomMenu.cs
new file mode 100644
index 00000000..0dab24fd
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Menu/DoomMenu.cs
@@ -0,0 +1,486 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class DoomMenu
+ {
+ private DoomApplication app;
+ private GameOptions options;
+
+ private SelectableMenu main;
+ private SelectableMenu episodeMenu;
+ private SelectableMenu skillMenu;
+ private SelectableMenu optionMenu;
+ private SelectableMenu volume;
+ private LoadMenu load;
+ private SaveMenu save;
+ private HelpScreen help;
+
+ private PressAnyKey thisIsShareware;
+ private PressAnyKey saveFailed;
+ private YesNoConfirm nightmareConfirm;
+ private YesNoConfirm endGameConfirm;
+ private QuitConfirm quitConfirm;
+
+ private MenuDef current;
+
+ private bool active;
+
+ private int tics;
+
+ private int selectedEpisode;
+
+ private SaveSlots saveSlots;
+
+ public DoomMenu(DoomApplication app)
+ {
+ this.app = app;
+ options = app.Options;
+
+ thisIsShareware = new PressAnyKey(
+ this,
+ DoomInfo.Strings.SWSTRING,
+ null);
+
+ saveFailed = new PressAnyKey(
+ this,
+ DoomInfo.Strings.SAVEDEAD,
+ null);
+
+ nightmareConfirm = new YesNoConfirm(
+ this,
+ DoomInfo.Strings.NIGHTMARE,
+ () => app.NewGame(GameSkill.Nightmare, selectedEpisode, 1));
+
+ endGameConfirm = new YesNoConfirm(
+ this,
+ DoomInfo.Strings.ENDGAME,
+ () => app.EndGame());
+
+ quitConfirm = new QuitConfirm(
+ this,
+ app);
+
+ skillMenu = new SelectableMenu(
+ this,
+ "M_NEWG", 96, 14,
+ "M_SKILL", 54, 38,
+ 2,
+
+ new SimpleMenuItem(
+ "M_JKILL", 16, 58, 48, 63,
+ () => app.NewGame(GameSkill.Baby, selectedEpisode, 1),
+ null),
+
+ new SimpleMenuItem(
+ "M_ROUGH", 16, 74, 48, 79,
+ () => app.NewGame(GameSkill.Easy, selectedEpisode, 1),
+ null),
+
+ new SimpleMenuItem(
+ "M_HURT", 16, 90, 48, 95,
+ () => app.NewGame(GameSkill.Medium, selectedEpisode, 1),
+ null),
+
+ new SimpleMenuItem(
+ "M_ULTRA", 16, 106, 48, 111,
+ () => app.NewGame(GameSkill.Hard, selectedEpisode, 1),
+ null),
+
+ new SimpleMenuItem(
+ "M_NMARE", 16, 122, 48, 127,
+ null,
+ nightmareConfirm));
+
+ if (app.Options.GameMode == GameMode.Retail)
+ {
+ episodeMenu = new SelectableMenu(
+ this,
+ "M_EPISOD", 54, 38,
+ 0,
+
+ new SimpleMenuItem(
+ "M_EPI1", 16, 58, 48, 63,
+ () => selectedEpisode = 1,
+ skillMenu),
+
+ new SimpleMenuItem(
+ "M_EPI2", 16, 74, 48, 79,
+ () => selectedEpisode = 2,
+ skillMenu),
+
+ new SimpleMenuItem(
+ "M_EPI3", 16, 90, 48, 95,
+ () => selectedEpisode = 3,
+ skillMenu),
+
+ new SimpleMenuItem(
+ "M_EPI4", 16, 106, 48, 111,
+ () => selectedEpisode = 4,
+ skillMenu));
+ }
+ else
+ {
+ if (app.Options.GameMode == GameMode.Shareware)
+ {
+ episodeMenu = new SelectableMenu(
+ this,
+ "M_EPISOD", 54, 38,
+ 0,
+
+ new SimpleMenuItem(
+ "M_EPI1", 16, 58, 48, 63,
+ () => selectedEpisode = 1,
+ skillMenu),
+
+ new SimpleMenuItem(
+ "M_EPI2", 16, 74, 48, 79,
+ null,
+ thisIsShareware),
+
+ new SimpleMenuItem(
+ "M_EPI3", 16, 90, 48, 95,
+ null,
+ thisIsShareware));
+ }
+ else
+ {
+ episodeMenu = new SelectableMenu(
+ this,
+ "M_EPISOD", 54, 38,
+ 0,
+
+ new SimpleMenuItem(
+ "M_EPI1", 16, 58, 48, 63,
+ () => selectedEpisode = 1,
+ skillMenu),
+ new SimpleMenuItem(
+ "M_EPI2", 16, 74, 48, 79,
+ () => selectedEpisode = 2,
+ skillMenu),
+ new SimpleMenuItem(
+ "M_EPI3", 16, 90, 48, 95,
+ () => selectedEpisode = 3,
+ skillMenu));
+ }
+ }
+
+ var sound = options.Sound;
+ var music = options.Music;
+ volume = new SelectableMenu(
+ this,
+ "M_SVOL", 60, 38,
+ 0,
+
+ new SliderMenuItem(
+ "M_SFXVOL", 48, 59, 80, 64,
+ sound.MaxVolume + 1,
+ () => sound.Volume,
+ vol => sound.Volume = vol),
+
+ new SliderMenuItem("M_MUSVOL", 48, 91, 80, 96,
+ music.MaxVolume + 1,
+ () => music.Volume,
+ vol => music.Volume = vol));
+
+ var renderer = options.Renderer;
+ var userInput = options.UserInput;
+ optionMenu = new SelectableMenu(
+ this,
+ "M_OPTTTL", 108, 15,
+ 0,
+
+ new SimpleMenuItem(
+ "M_ENDGAM", 28, 32, 60, 37,
+ null,
+ endGameConfirm,
+ () => app.State == ApplicationState.Game),
+
+ new ToggleMenuItem(
+ "M_MESSG", 28, 48, 60, 53, "M_MSGON", "M_MSGOFF", 180,
+ () => renderer.DisplayMessage ? 0 : 1,
+ value => renderer.DisplayMessage = value == 0),
+
+ new SliderMenuItem(
+ "M_SCRNSZ", 28, 80 - 16, 60, 85 - 16,
+ renderer.MaxWindowSize + 1,
+ () => renderer.WindowSize,
+ size => renderer.WindowSize = size),
+
+ new SliderMenuItem(
+ "M_MSENS", 28, 112 - 16, 60, 117 - 16,
+ userInput.MaxMouseSensitivity + 1,
+ () => userInput.MouseSensitivity,
+ ms => userInput.MouseSensitivity = ms),
+
+ new SimpleMenuItem(
+ "M_SVOL", 28, 144 - 16, 60, 149 - 16,
+ null,
+ volume));
+
+ load = new LoadMenu(
+ this,
+ "M_LOADG", 72, 28,
+ 0,
+ new TextBoxMenuItem(48, 49, 72, 61),
+ new TextBoxMenuItem(48, 65, 72, 77),
+ new TextBoxMenuItem(48, 81, 72, 93),
+ new TextBoxMenuItem(48, 97, 72, 109),
+ new TextBoxMenuItem(48, 113, 72, 125),
+ new TextBoxMenuItem(48, 129, 72, 141));
+
+ save = new SaveMenu(
+ this,
+ "M_SAVEG", 72, 28,
+ 0,
+ new TextBoxMenuItem(48, 49, 72, 61),
+ new TextBoxMenuItem(48, 65, 72, 77),
+ new TextBoxMenuItem(48, 81, 72, 93),
+ new TextBoxMenuItem(48, 97, 72, 109),
+ new TextBoxMenuItem(48, 113, 72, 125),
+ new TextBoxMenuItem(48, 129, 72, 141));
+
+ help = new HelpScreen(this);
+
+ if (app.Options.GameMode == GameMode.Commercial)
+ {
+ main = new SelectableMenu(
+ this,
+ "M_DOOM", 94, 2,
+ 0,
+ new SimpleMenuItem("M_NGAME", 65, 67, 97, 72, null, skillMenu),
+ new SimpleMenuItem("M_OPTION", 65, 83, 97, 88, null, optionMenu),
+ new SimpleMenuItem("M_LOADG", 65, 99, 97, 104, null, load),
+ new SimpleMenuItem("M_SAVEG", 65, 115, 97, 120, null, save,
+ () => !(app.State == ApplicationState.Game &&
+ app.Game.State != GameState.Level)),
+ new SimpleMenuItem("M_QUITG", 65, 131, 97, 136, null, quitConfirm));
+ }
+ else
+ {
+ main = new SelectableMenu(
+ this,
+ "M_DOOM", 94, 2,
+ 0,
+ new SimpleMenuItem("M_NGAME", 65, 59, 97, 64, null, episodeMenu),
+ new SimpleMenuItem("M_OPTION", 65, 75, 97, 80, null, optionMenu),
+ new SimpleMenuItem("M_LOADG", 65, 91, 97, 96, null, load),
+ new SimpleMenuItem("M_SAVEG", 65, 107, 97, 112, null, save,
+ () => !(app.State == ApplicationState.Game &&
+ app.Game.State != GameState.Level)),
+ new SimpleMenuItem("M_RDTHIS", 65, 123, 97, 128, null, help),
+ new SimpleMenuItem("M_QUITG", 65, 139, 97, 144, null, quitConfirm));
+ }
+
+ current = main;
+ active = false;
+
+ tics = 0;
+
+ selectedEpisode = 1;
+
+ saveSlots = new SaveSlots();
+ }
+
+ public bool DoEvent(DoomEvent e)
+ {
+ if (active)
+ {
+ if (current.DoEvent(e))
+ {
+ return true;
+ }
+
+ if (e.Key == DoomKey.Escape && e.Type == EventType.KeyDown)
+ {
+ Close();
+ }
+
+ return true;
+ }
+ else
+ {
+ if (e.Key == DoomKey.Escape && e.Type == EventType.KeyDown)
+ {
+ SetCurrent(main);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ return true;
+ }
+
+ if (e.Type == EventType.KeyDown && app.State == ApplicationState.Opening)
+ {
+ if (e.Key == DoomKey.Enter ||
+ e.Key == DoomKey.Space ||
+ e.Key == DoomKey.LControl ||
+ e.Key == DoomKey.RControl ||
+ e.Key == DoomKey.Escape)
+ {
+ SetCurrent(main);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ return true;
+ }
+ }
+
+ return false;
+ }
+ }
+
+ public void Update()
+ {
+ tics++;
+
+ if (current != null)
+ {
+ current.Update();
+ }
+
+ if (active && !app.Options.NetGame)
+ {
+ app.PauseGame();
+ }
+ }
+
+ public void SetCurrent(MenuDef next)
+ {
+ current = next;
+ current.Open();
+ }
+
+ public void Open()
+ {
+ active = true;
+ }
+
+ public void Close()
+ {
+ active = false;
+
+ if (!app.Options.NetGame)
+ {
+ app.ResumeGame();
+ }
+ }
+
+ public void StartSound(Sfx sfx)
+ {
+ options.Sound.StartSound(sfx);
+ }
+
+ public void NotifySaveFailed()
+ {
+ SetCurrent(saveFailed);
+ }
+
+ public void ShowHelpScreen()
+ {
+ SetCurrent(help);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ }
+
+ public void ShowSaveScreen()
+ {
+ SetCurrent(save);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ }
+
+ public void ShowLoadScreen()
+ {
+ SetCurrent(load);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ }
+
+ public void ShowVolumeControl()
+ {
+ SetCurrent(volume);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ }
+
+ public void QuickSave()
+ {
+ if (save.LastSaveSlot == -1)
+ {
+ ShowSaveScreen();
+ }
+ else
+ {
+ var desc = saveSlots[save.LastSaveSlot];
+ var confirm = new YesNoConfirm(
+ this,
+ ((string)DoomInfo.Strings.QSPROMPT).Replace("%s", desc),
+ () => save.DoSave(save.LastSaveSlot));
+ SetCurrent(confirm);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ }
+ }
+
+ public void QuickLoad()
+ {
+ if (save.LastSaveSlot == -1)
+ {
+ var pak = new PressAnyKey(
+ this,
+ DoomInfo.Strings.QSAVESPOT,
+ null);
+ SetCurrent(pak);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ }
+ else
+ {
+ var desc = saveSlots[save.LastSaveSlot];
+ var confirm = new YesNoConfirm(
+ this,
+ ((string)DoomInfo.Strings.QLPROMPT).Replace("%s", desc),
+ () => load.DoLoad(save.LastSaveSlot));
+ SetCurrent(confirm);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ }
+ }
+
+ public void EndGame()
+ {
+ SetCurrent(endGameConfirm);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ }
+
+ public void Quit()
+ {
+ SetCurrent(quitConfirm);
+ Open();
+ StartSound(Sfx.SWTCHN);
+ }
+
+ public DoomApplication Application => app;
+ public GameOptions Options => app.Options;
+ public MenuDef Current => current;
+ public bool Active => active;
+ public int Tics => tics;
+ public SaveSlots SaveSlots => saveSlots;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Menu/HelpScreen.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Menu/HelpScreen.cs
new file mode 100644
index 00000000..5e17e7d9
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Menu/HelpScreen.cs
@@ -0,0 +1,76 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+
+namespace ManagedDoom
+{
+ public sealed class HelpScreen : MenuDef
+ {
+ private int pageCount;
+
+ private int page;
+
+ public HelpScreen(DoomMenu menu) : base(menu)
+ {
+ if (menu.Options.GameMode == GameMode.Shareware)
+ {
+ pageCount = 2;
+ }
+ else
+ {
+ pageCount = 1;
+ }
+ }
+
+ public override void Open()
+ {
+ page = pageCount - 1;
+ }
+
+ public override bool DoEvent(DoomEvent e)
+ {
+ if (e.Type != EventType.KeyDown)
+ {
+ return true;
+ }
+
+ if (e.Key == DoomKey.Enter ||
+ e.Key == DoomKey.Space ||
+ e.Key == DoomKey.LControl ||
+ e.Key == DoomKey.RControl)
+ {
+ page--;
+ if (page == -1)
+ {
+ Menu.Close();
+ }
+ Menu.StartSound(Sfx.PISTOL);
+ }
+
+ if (e.Key == DoomKey.Escape)
+ {
+ Menu.Close();
+ Menu.StartSound(Sfx.SWTCHX);
+ }
+
+ return true;
+ }
+
+ public int Page => page;
+ }
+}
diff --git a/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Menu/LoadMenu.cs b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Menu/LoadMenu.cs
new file mode 100644
index 00000000..c7e47753
--- /dev/null
+++ b/SRC/Aura_OS/System/Processing/Application/Doom/ManagedDoom/Doom/Menu/LoadMenu.cs
@@ -0,0 +1,134 @@
+//
+// Copyright (C) 1993-1996 Id Software, Inc.
+// Copyright (C) 2019-2020 Nobuaki Tanaka
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+
+
+
+using System;
+using System.Collections.Generic;
+
+namespace ManagedDoom
+{
+ public sealed class LoadMenu : MenuDef
+ {
+ private string[] name;
+ private int[] titleX;
+ private int[] titleY;
+ private TextBoxMenuItem[] items;
+
+ private int index;
+ private TextBoxMenuItem choice;
+
+ public LoadMenu(
+ DoomMenu menu,
+ string name, int titleX, int titleY,
+ int firstChoice,
+ params TextBoxMenuItem[] items) : base(menu)
+ {
+ this.name = new[] { name };
+ this.titleX = new[] { titleX };
+ this.titleY = new[] { titleY };
+ this.items = items;
+
+ index = firstChoice;
+ choice = items[index];
+ }
+
+ public override void Open()
+ {
+ for (var i = 0; i < items.Length; i++)
+ {
+ items[i].SetText(Menu.SaveSlots[i]);
+ }
+ }
+
+ private void Up()
+ {
+ index--;
+ if (index < 0)
+ {
+ index = items.Length - 1;
+ }
+
+ choice = items[index];
+ }
+
+ private void Down()
+ {
+ index++;
+ if (index >= items.Length)
+ {
+ index = 0;
+ }
+
+ choice = items[index];
+ }
+
+ public override bool DoEvent(DoomEvent e)
+ {
+ if (e.Type != EventType.KeyDown)
+ {
+ return true;
+ }
+
+ if (e.Key == DoomKey.Up)
+ {
+ Up();
+ Menu.StartSound(Sfx.PSTOP);
+ }
+
+ if (e.Key == DoomKey.Down)
+ {
+ Down();
+ Menu.StartSound(Sfx.PSTOP);
+ }
+
+ if (e.Key == DoomKey.Enter)
+ {
+ if (DoLoad(index))
+ {
+ Menu.Close();
+ }
+ Menu.StartSound(Sfx.PISTOL);
+ }
+
+ if (e.Key == DoomKey.Escape)
+ {
+ Menu.Close();
+ Menu.StartSound(Sfx.SWTCHX);
+ }
+
+ return true;
+ }
+
+ public bool DoLoad(int slotNumber)
+ {
+ if (Menu.SaveSlots[slotNumber] != null)
+ {
+ Menu.Application.LoadGame(slotNumber);
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ public IReadOnlyList Name => name;
+ public IReadOnlyList TitleX => titleX;
+ public IReadOnlyList TitleY => titleY;
+ public IReadOnlyList