Esempio n. 1
0
        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();

            random = new DoomRandom();

            video     = NullVideo.GetInstance();
            sound     = NullSound.GetInstance();
            music     = NullMusic.GetInstance();
            userInput = NullUserInput.GetInstance();
        }
Esempio n. 2
0
        public GameOptions()
        {
            this.players = new Player[Player.MaxPlayerCount];

            for (var i = 0; i < Player.MaxPlayerCount; i++)
            {
                this.players[i] = new Player(i);
            }

            this.players[0].InGame = true;
            this.consolePlayer     = 0;

            this.episode = 1;
            this.map     = 1;
            this.skill   = GameSkill.Medium;

            this.netGame = false;

            this.deathmatch      = 0;
            this.fastMonsters    = false;
            this.respawnMonsters = false;
            this.noMonsters      = false;

            this.intermissionInfo = new IntermissionInfo();

            this.renderer  = null;
            this.sound     = NullSound.GetInstance();
            this.music     = NullMusic.GetInstance();
            this.userInput = NullUserInput.GetInstance();
        }
Esempio n. 3
0
        public GameOptions()
        {
            this.player = new Player();

            this.episode = 1;
            this.map     = 1;
            this.skill   = GameSkill.Medium;

            this.fastMonsters    = false;
            this.respawnMonsters = false;
            this.noMonsters      = false;

            this.intermissionInfo = new IntermissionInfo();

            this.renderer  = null;
            this.sound     = NullSound.GetInstance();
            this.music     = NullMusic.GetInstance();
            this.userInput = NullUserInput.GetInstance();
        }
Esempio n. 4
0
        public Doom(CommandLineArgs args, Config config, GameContent content, IVideo video, ISound sound, IMusic music, IUserInput userInput)
        {
            video     = video ?? NullVideo.GetInstance();
            sound     = sound ?? NullSound.GetInstance();
            music     = music ?? NullMusic.GetInstance();
            userInput = userInput ?? NullUserInput.GetInstance();

            this.args      = args;
            this.config    = config;
            this.content   = content;
            this.video     = video;
            this.sound     = sound;
            this.music     = music;
            this.userInput = userInput;

            if (args.deh.Present)
            {
                DeHackEd.ReadFiles(args.deh.Value);
            }

            if (!args.nodeh.Present)
            {
                DeHackEd.ReadDeHackEdLump(content.Wad);
            }

            events = new List <DoomEvent>();

            options             = new GameOptions();
            options.GameVersion = content.Wad.GameVersion;
            options.GameMode    = content.Wad.GameMode;
            options.MissionPack = content.Wad.MissionPack;
            options.Video       = video;
            options.Sound       = sound;
            options.Music       = music;
            options.UserInput   = userInput;

            menu = new DoomMenu(this);

            opening = new OpeningSequence(content, options);

            cmds = new TicCmd[Player.MaxPlayerCount];
            for (var i = 0; i < Player.MaxPlayerCount; i++)
            {
                cmds[i] = new TicCmd();
            }
            game = new DoomGame(content, options);

            wipeEffect = new WipeEffect(video.WipeBandCount, video.WipeHeight);
            wiping     = false;

            currentState = DoomState.None;
            nextState    = DoomState.Opening;
            needWipe     = false;

            sendPause = false;

            quit        = false;
            quitMessage = null;

            mouseGrabbed = false;

            CheckGameArgs();
        }