public void Doom2Demo1() { using (var content = GameContent.CreateDummy(WadPath.Doom2)) { var demo = new Demo(content.Wad.ReadLump("DEMO1")); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x8541f2acu, (uint)lastMobjHash); Assert.AreEqual(0xe60b0af3u, (uint)aggMobjHash); Assert.AreEqual(0x3376327bu, (uint)lastSectorHash); Assert.AreEqual(0x4140c1c2u, (uint)aggSectorHash); } }
public void E1M8Boss() { using (var resource = CommonResource.CreateDummy(WadPath.Doom1)) { var demo = new Demo(@"demos\e1m8_boss_test.lmp"); demo.Options.GameMode = resource.Wad.GameMode; var players = DoomTest.GetDefaultPlayers(demo.Options); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(players, resource, demo.Options); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0xb01c44f9u, (uint)lastMobjHash); Assert.AreEqual(0x1a4918bbu, (uint)aggMobjHash); Assert.AreEqual(0xa7bac3ceu, (uint)lastSectorHash); Assert.AreEqual(0xda0067d0u, (uint)aggSectorHash); } }
public void Map07Boss() { using (var resource = CommonResource.CreateDummy(WadPath.Doom2)) { var demo = new Demo(@"demos\map07_boss_test.lmp"); var players = DoomTest.GetDefaultPlayers(demo.Options); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(players, resource, demo.Options); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x4c4e952fu, (uint)lastMobjHash); Assert.AreEqual(0x56d1d836u, (uint)aggMobjHash); Assert.AreEqual(0x44469690u, (uint)lastSectorHash); Assert.AreEqual(0x1b989de0u, (uint)aggSectorHash); } }
public void SilentCrusherTest() { using (var content = GameContent.CreateDummy(WadPath.Doom2, @"data\silent_crusher_test.wad")) { var demo = new Demo(@"data\silent_crusher_test.lmp"); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0xee31a164u, (uint)lastMobjHash); Assert.AreEqual(0x1f3fc7b4u, (uint)aggMobjHash); Assert.AreEqual(0x6d6a1f20u, (uint)lastSectorHash); Assert.AreEqual(0x34b4f740u, (uint)aggSectorHash); } }
public void LocalDoorTest() { using (var resource = CommonResource.CreateDummy(WadPath.Doom2, @"data\localdoor_test.wad")) { var demo = new Demo(@"data\localdoor_test.lmp"); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(resource, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x9d6c0abeu, (uint)lastMobjHash); Assert.AreEqual(0x7e1bb5f2u, (uint)aggMobjHash); Assert.AreEqual(0xfdf3e7a0u, (uint)lastSectorHash); Assert.AreEqual(0x0a0f1980u, (uint)aggSectorHash); } }
public void E1M1() { using (var content = GameContent.CreateDummy(WadPath.Doom1)) { var options = new GameOptions(); options.Skill = GameSkill.Hard; options.Episode = 1; options.Map = 1; options.Players[0].InGame = true; var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, options); game.DeferedInitNew(); var tics = 350; var aggMobjHash = 0; var aggSectorHash = 0; for (var i = 0; i < tics; i++) { game.Update(cmds); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, DoomDebug.GetMobjHash(game.World)); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, DoomDebug.GetSectorHash(game.World)); } Assert.AreEqual(0x66be313bu, (uint)DoomDebug.GetMobjHash(game.World)); Assert.AreEqual(0xbd67b2b2u, (uint)aggMobjHash); Assert.AreEqual(0x2cef7a1du, (uint)DoomDebug.GetSectorHash(game.World)); Assert.AreEqual(0x5b99ca23u, (uint)aggSectorHash); } }
public void Map11Nomonsters() { using (var content = GameContent.CreateDummy(WadPath.Doom2)) { var options = new GameOptions(); options.Skill = GameSkill.Medium; options.Map = 11; options.NoMonsters = true; options.Players[0].InGame = true; var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, options); game.DeferedInitNew(); var tics = 350; var aggMobjHash = 0; var aggSectorHash = 0; for (var i = 0; i < tics; i++) { game.Update(cmds); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, DoomDebug.GetMobjHash(game.World)); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, DoomDebug.GetSectorHash(game.World)); } Assert.AreEqual(0x21187a94u, (uint)DoomDebug.GetMobjHash(game.World)); Assert.AreEqual(0x55752988u, (uint)aggMobjHash); Assert.AreEqual(0xead9e45bu, (uint)DoomDebug.GetSectorHash(game.World)); Assert.AreEqual(0x1397c7cbu, (uint)aggSectorHash); } }
public void MementoMoriDemo3() { using (var resource = CommonResource.CreateDummy(WadPath.Doom2, WadPath.MementoMori)) { var demo = new Demo(resource.Wad.ReadLump("DEMO3")); var players = DoomTest.GetDefaultPlayers(demo.Options); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(players, resource, demo.Options); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x2c3bf1e3u, (uint)lastMobjHash); Assert.AreEqual(0x40d3fc5cu, (uint)aggMobjHash); Assert.AreEqual(0xdc871ca2u, (uint)lastSectorHash); Assert.AreEqual(0x388e5e4fu, (uint)aggSectorHash); } }
public void E1M2Donut() { using (var content = GameContent.CreateDummy(WadPath.Doom1)) { var demo = new Demo(@"demos\e1m2_donut_test.lmp"); demo.Options.GameMode = content.Wad.GameMode; var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0xcfa012d2u, (uint)lastMobjHash); Assert.AreEqual(0xdd1a0d72u, (uint)aggMobjHash); Assert.AreEqual(0x76aad5fbu, (uint)lastSectorHash); Assert.AreEqual(0xaa2757eau, (uint)aggSectorHash); } }
public void PlutoniaDemo1() { using (var content = GameContent.CreateDummy(WadPath.Plutonia)) { var demo = new Demo(content.Wad.ReadLump("DEMO1")); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x919a2c10u, (uint)lastMobjHash); Assert.AreEqual(0x50740a10u, (uint)aggMobjHash); Assert.AreEqual(0x67f448a4u, (uint)lastSectorHash); Assert.AreEqual(0x7cbaf2f8u, (uint)aggSectorHash); } }
public void TntBloodDemo3() { using (var resource = CommonResource.CreateDummy(WadPath.Doom2, WadPath.TntBlood)) { var demo = new Demo(resource.Wad.ReadLump("DEMO3")); var players = DoomTest.GetDefaultPlayers(demo.Options); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(players, resource, demo.Options); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x9d24c7d8u, (uint)lastMobjHash); Assert.AreEqual(0xd37240f4u, (uint)aggMobjHash); Assert.AreEqual(0xf3f4db97u, (uint)lastSectorHash); Assert.AreEqual(0xa0acc43eu, (uint)aggSectorHash); } }
public void Doom1SharewareDemo2() { using (var content = GameContent.CreateDummy(WadPath.Doom1Shareware)) { var demo = new Demo(content.Wad.ReadLump("DEMO2")); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0xf7f5daddu, (uint)lastMobjHash); Assert.AreEqual(0xb576525au, (uint)aggMobjHash); Assert.AreEqual(0xf2e936b0u, (uint)lastSectorHash); Assert.AreEqual(0xe62009fau, (uint)aggSectorHash); } }
public void TntDemo2() { using (var content = GameContent.CreateDummy(WadPath.Tnt)) { var demo = new Demo(content.Wad.ReadLump("DEMO2")); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x03b2fe31u, (uint)lastMobjHash); Assert.AreEqual(0xa67458d0u, (uint)aggMobjHash); Assert.AreEqual(0xee0bf323u, (uint)lastSectorHash); Assert.AreEqual(0xcb6929e1u, (uint)aggSectorHash); } }
public void Doom2Demo3_Final2() { using (var content = GameContent.CreateDummy(WadPath.Doom2)) { var demo = new Demo(content.Wad.ReadLump("DEMO3")); demo.Options.GameVersion = GameVersion.Final2; var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x6daadf6du, (uint)lastMobjHash); Assert.AreEqual(0xdfba83c6u, (uint)aggMobjHash); Assert.AreEqual(0xfe1f6052u, (uint)lastSectorHash); Assert.AreEqual(0x6f6e779eu, (uint)aggSectorHash); } }
public void Doom1SharewareDemo3() { using (var resource = CommonResource.CreateDummy(WadPath.Doom1Shareware)) { var demo = new Demo(resource.Wad.ReadLump("DEMO3")); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(resource, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x893f32d2u, (uint)lastMobjHash); Assert.AreEqual(0x22b21b86u, (uint)aggMobjHash); Assert.AreEqual(0xfef34aafu, (uint)lastSectorHash); Assert.AreEqual(0xa881ce6fu, (uint)aggSectorHash); } }
public void Map30Brain() { using (var content = GameContent.CreateDummy(WadPath.Doom2)) { var demo = new Demo(@"demos\map30_brain_test.lmp"); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0xfc44fcceu, (uint)lastMobjHash); Assert.AreEqual(0x72c0e74fu, (uint)aggMobjHash); Assert.AreEqual(0x0a37e32au, (uint)lastSectorHash); Assert.AreEqual(0xb640d706u, (uint)aggSectorHash); } }
public void PainElementalTest_Final2() { using (var resource = CommonResource.CreateDummy(WadPath.Doom2, @"data\painelemental_test.wad")) { var demo = new Demo(@"data\painelemental_test_final2.lmp"); demo.Options.GameVersion = GameVersion.Final2; var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(resource, demo.Options); game.DeferedInitNew(); var lastHash = 0; var aggHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastHash = DoomDebug.GetMobjHash(game.World); aggHash = DoomDebug.CombineHash(aggHash, lastHash); } Assert.AreEqual(0x6984f76fu, (uint)lastHash); Assert.AreEqual(0x50ba7933u, (uint)aggHash); } }
public void Map32Keen() { using (var content = GameContent.CreateDummy(WadPath.Doom2)) { var demo = new Demo(@"demos\map32_keen_test.lmp"); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0xd0b51d34u, (uint)lastMobjHash); Assert.AreEqual(0xec0bc144u, (uint)aggMobjHash); Assert.AreEqual(0xab146fa3u, (uint)lastSectorHash); Assert.AreEqual(0x3ede64ccu, (uint)aggSectorHash); } }
public void Map01() { using (var content = GameContent.CreateDummy(WadPath.Doom2)) { var options = new GameOptions(); options.Skill = GameSkill.Hard; options.Map = 1; options.Players[0].InGame = true; var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, options); game.DeferedInitNew(); var tics = 350; var aggMobjHash = 0; for (var i = 0; i < tics; i++) { game.Update(cmds); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, DoomDebug.GetMobjHash(game.World)); } Assert.AreEqual(0xc108ff16u, (uint)DoomDebug.GetMobjHash(game.World)); Assert.AreEqual(0x3bd5113cu, (uint)aggMobjHash); } }
public void Doom1Demo4() { using (var resource = CommonResource.CreateDummy(WadPath.Doom1)) { var demo = new Demo(resource.Wad.ReadLump("DEMO4")); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(resource, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x89d50ff6u, (uint)lastMobjHash); Assert.AreEqual(0xb1a634c8u, (uint)aggMobjHash); Assert.AreEqual(0x8a94e89au, (uint)lastSectorHash); Assert.AreEqual(0x2e1bf98du, (uint)aggSectorHash); } }
public void ShotgunTest() { using (var resource = CommonResource.CreateDummy(WadPath.Doom2, @"data\shotgun_test.wad")) { var demo = new Demo(@"data\shotgun_test.lmp"); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(resource, demo.Options); game.DeferedInitNew(); var lastHash = 0; var aggHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastHash = DoomDebug.GetMobjHash(game.World); aggHash = DoomDebug.CombineHash(aggHash, lastHash); } Assert.AreEqual(0x3dd50799u, (uint)lastHash); Assert.AreEqual(0x4ddd814fu, (uint)aggHash); } }
public void Doom2Demo2() { using (var resource = CommonResource.CreateDummy(WadPath.Doom2)) { var demo = new Demo(resource.Wad.ReadLump("DEMO2")); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(resource, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x45384a05u, (uint)lastMobjHash); Assert.AreEqual(0xde6d3531u, (uint)aggMobjHash); Assert.AreEqual(0x49c96600u, (uint)lastSectorHash); Assert.AreEqual(0x82f0e2d0u, (uint)aggSectorHash); } }
public void Altdeath() { using (var content = GameContent.CreateDummy(WadPath.Doom2)) { var demo = new Demo(@"data\altdeath_test.lmp"); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); } Assert.AreEqual(0xf598b1d9u, (uint)lastMobjHash); Assert.AreEqual(0x9f716cfau, (uint)aggMobjHash); } }
public void TntDemo3() { using (var resource = CommonResource.CreateDummy(WadPath.Tnt)) { var demo = new Demo(resource.Wad.ReadLump("DEMO3")); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(resource, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0xb289efaeu, (uint)lastMobjHash); Assert.AreEqual(0x08d04ef6u, (uint)aggMobjHash); Assert.AreEqual(0x8ab75d90u, (uint)lastSectorHash); Assert.AreEqual(0x08d5fbb0u, (uint)aggSectorHash); } }
public void PlatformTest() { using (var resource = CommonResource.CreateDummy(WadPath.Doom2, @"data\platform_test.wad")) { var demo = new Demo(@"data\platform_test.lmp"); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(resource, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x3da2f507u, (uint)lastMobjHash); Assert.AreEqual(0x3402f715u, (uint)aggMobjHash); Assert.AreEqual(0xc71b4d00u, (uint)lastSectorHash); Assert.AreEqual(0x2fb8dd00u, (uint)aggSectorHash); } }
public void PlutoniaDemo2() { using (var resource = CommonResource.CreateDummy(WadPath.Plutonia)) { var demo = new Demo(resource.Wad.ReadLump("DEMO2")); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(resource, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x5d8b0a25u, (uint)lastMobjHash); Assert.AreEqual(0x780eb548u, (uint)aggMobjHash); Assert.AreEqual(0x027a2765u, (uint)lastSectorHash); Assert.AreEqual(0xdc23992bu, (uint)aggSectorHash); } }
public void Map06Crusher() { using (var resource = CommonResource.CreateDummy(WadPath.Doom2)) { var demo = new Demo(@"demos\map06_crusher_test.lmp"); var players = DoomTest.GetDefaultPlayers(demo.Options); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(players, resource, demo.Options); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0x302bc4e3u, (uint)lastMobjHash); Assert.AreEqual(0xe4050462u, (uint)aggMobjHash); Assert.AreEqual(0x3ce914d8u, (uint)lastSectorHash); Assert.AreEqual(0x549ea480u, (uint)aggSectorHash); } }
public void PlutoniaDemo3_Final2() { using (var resource = CommonResource.CreateDummy(WadPath.Plutonia)) { var demo = new Demo(resource.Wad.ReadLump("DEMO3")); demo.Options.GameVersion = GameVersion.Final2; var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(resource, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0xa69f484fu, (uint)lastMobjHash); Assert.AreEqual(0xa62991cbu, (uint)aggMobjHash); Assert.AreEqual(0x796a4b06u, (uint)lastSectorHash); Assert.AreEqual(0xfa506444u, (uint)aggSectorHash); } }
public void SuperShotgunTest() { using (var content = GameContent.CreateDummy(WadPath.Doom2, @"data\supershotgun_test.wad")) { var demo = new Demo(@"data\supershotgun_test.lmp"); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastHash = 0; var aggHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastHash = DoomDebug.GetMobjHash(game.World); aggHash = DoomDebug.CombineHash(aggHash, lastHash); } Assert.AreEqual(0xe2f7936eu, (uint)lastHash); Assert.AreEqual(0x538061e4u, (uint)aggHash); } }
public void Doom1Demo3() { using (var content = GameContent.CreateDummy(WadPath.Doom1)) { var demo = new Demo(content.Wad.ReadLump("DEMO3")); var cmds = Enumerable.Range(0, Player.MaxPlayerCount).Select(i => new TicCmd()).ToArray(); var game = new DoomGame(content, demo.Options); game.DeferedInitNew(); var lastMobjHash = 0; var aggMobjHash = 0; var lastSectorHash = 0; var aggSectorHash = 0; while (true) { if (!demo.ReadCmd(cmds)) { break; } game.Update(cmds); lastMobjHash = DoomDebug.GetMobjHash(game.World); aggMobjHash = DoomDebug.CombineHash(aggMobjHash, lastMobjHash); lastSectorHash = DoomDebug.GetSectorHash(game.World); aggSectorHash = DoomDebug.CombineHash(aggSectorHash, lastSectorHash); } Assert.AreEqual(0xcdce0d85u, (uint)lastMobjHash); Assert.AreEqual(0x9e5f7780u, (uint)aggMobjHash); Assert.AreEqual(0x553d0ec9u, (uint)lastSectorHash); Assert.AreEqual(0x9991bb03u, (uint)aggSectorHash); } }