Ejemplo n.º 1
0
        private void DrawBackgroundAnimation(Intermission im)
        {
            if (DoomApplication.Instance.IWad == "doom2" ||
                DoomApplication.Instance.IWad == "freedoom2" ||
                DoomApplication.Instance.IWad == "plutonia" ||
                DoomApplication.Instance.IWad == "tnt")
            {
                return;
            }

            if (im.Info.Episode > 2)
            {
                return;
            }

            for (var i = 0; i < im.Animations.Length; i++)
            {
                var a = im.Animations[i];

                if (a.PatchNumber >= 0)
                {
                    this.DrawPatch(a.Patches[a.PatchNumber], a.LocationX, a.LocationY);
                }
            }
        }
Ejemplo n.º 2
0
        private void DrawStats(Intermission intermission)
        {
            DrawBackground(intermission);

            var im = intermission;

            // line height
            var lh = (3 * patches.Numbers[0].Height) / 2;

            // draw animated background
            //WI_drawAnimatedBack();

            WI_drawLF(im);

            DrawPatch(patches.Kills, SP_STATSX, SP_STATSY);
            WI_drawPercent(320 - SP_STATSX, SP_STATSY, im.cnt_kills[0]);

            DrawPatch(patches.Items, SP_STATSX, SP_STATSY + lh);
            WI_drawPercent(320 - SP_STATSX, SP_STATSY + lh, im.cnt_items[0]);

            DrawPatch(patches.SP_Secret, SP_STATSX, SP_STATSY + 2 * lh);
            WI_drawPercent(320 - SP_STATSX, SP_STATSY + 2 * lh, im.cnt_secret[0]);

            DrawPatch(patches.Time, SP_TIMEX, SP_TIMEY);
            WI_drawTime(320 / 2 - SP_TIMEX, SP_TIMEY, im.cnt_time);

            if (im.Wbs.Epsd < 3)
            {
                //V_DrawPatch(SCREENWIDTH / 2 + SP_TIMEX, SP_TIMEY, FB, par);
                //WI_drawTime(SCREENWIDTH - SP_TIMEX, SP_TIMEY, cnt_par);
            }
        }
Ejemplo n.º 3
0
        private void DrawEnteringLevelName(Intermission im)
        {
            var wbs = im.Info;
            int y   = titleY;

            string levelName;

            if (im.Options.GameMode != GameMode.Commercial)
            {
                var e = im.Options.Episode - 1;
                levelName = doomLevels[e][wbs.NextLevel];
            }
            else
            {
                levelName = doom2Levels[wbs.NextLevel];
            }

            // Draw "Entering".
            DrawPatch(
                "WIENTER",
                (320 - GetWidth("WIENTER")) / 2,
                y);

            // Draw level name.
            y += (5 * GetHeight(levelName)) / 4;

            DrawPatch(
                levelName,
                (320 - GetWidth(levelName)) / 2,
                y);
        }
Ejemplo n.º 4
0
        public void Render(Intermission im)
        {
            switch (im.State)
            {
            case IntermissionState.StatCount:
                if (im.Options.Deathmatch != 0)
                {
                    this.DrawDeathmatchStats(im);
                }
                else if (im.Options.NetGame)
                {
                    this.DrawNetGameStats(im);
                }
                else
                {
                    this.DrawSinglePlayerStats(im);
                }

                break;

            case IntermissionState.ShowNextLoc:
                this.DrawShowNextLoc(im);

                break;

            case IntermissionState.NoState:
                this.DrawNoState(im);

                break;
            }
        }
Ejemplo n.º 5
0
        private void DrawFinishedLevelName(Intermission intermission)
        {
            var wbs = intermission.Info;
            var y   = IntermissionRenderer.titleY;

            string levelName;

            if (DoomApplication.Instance.IWad != "doom2" &&
                DoomApplication.Instance.IWad != "freedoom2" &&
                DoomApplication.Instance.IWad != "plutonia" &&
                DoomApplication.Instance.IWad != "tnt")
            {
                var e = intermission.Options.Episode - 1;
                levelName = IntermissionRenderer.doomLevels[e][wbs.LastLevel];
            }
            else
            {
                levelName = IntermissionRenderer.doom2Levels[wbs.LastLevel];
            }

            // Draw level name.
            this.DrawPatch(levelName, (320 - this.GetWidth(levelName)) / 2, y);

            // Draw "Finished!".
            y += (5 * this.GetHeight(levelName)) / 4;

            this.DrawPatch("WIF", (320 - this.GetWidth("WIF")) / 2, y);
        }
Ejemplo n.º 6
0
        private void DrawFinishedLevelName(Intermission intermission)
        {
            var wbs = intermission.Info;
            var y   = titleY;

            string levelName;

            if (intermission.Options.GameMode != GameMode.Commercial)
            {
                var e = intermission.Options.Episode - 1;
                levelName = doomLevels[e][wbs.LastLevel];
            }
            else
            {
                levelName = doom2Levels[wbs.LastLevel];
            }

            // Draw level name.
            DrawPatch(
                levelName,
                (320 - GetWidth(levelName)) / 2,
                y);

            // Draw "Finished!".
            y += (5 * GetHeight(levelName)) / 4;

            DrawPatch(
                "WIF",
                (320 - GetWidth("WIF")) / 2,
                y);
        }
Ejemplo n.º 7
0
        public void Render(Intermission intermission)
        {
            var im = intermission;

            switch (im.state)
            {
            case IntermissionState.StatCount:
                if (im.Options.Deathmatch != 0)
                {
                    // WI_drawDeathmatchStats();
                }
                else if (im.Options.NetGame)
                {
                    // WI_drawNetgameStats();
                }
                else
                {
                    DrawStats(im);
                }
                break;

            case IntermissionState.ShowNextLoc:
                WI_drawShowNextLoc(im);
                break;

            case IntermissionState.NoState:
                WI_drawNoState(im);
                break;
            }
        }
Ejemplo n.º 8
0
        private void DrawEnteringLevelName(Intermission im)
        {
            var wbs = im.Info;
            int y   = IntermissionRenderer.titleY;

            string levelName;

            if (DoomApplication.Instance.IWad != "doom2" &&
                DoomApplication.Instance.IWad != "freedoom2" &&
                DoomApplication.Instance.IWad != "plutonia" &&
                DoomApplication.Instance.IWad != "tnt")
            {
                var e = im.Options.Episode - 1;
                levelName = IntermissionRenderer.doomLevels[e][wbs.NextLevel];
            }
            else
            {
                levelName = IntermissionRenderer.doom2Levels[wbs.NextLevel];
            }

            // Draw "Entering".
            this.DrawPatch("WIENTER", (320 - this.GetWidth("WIENTER")) / 2, y);

            // Draw level name.
            y += (5 * this.GetHeight(levelName)) / 4;

            this.DrawPatch(levelName, (320 - this.GetWidth(levelName)) / 2, y);
        }
Ejemplo n.º 9
0
    void Handle_ClickOnMenuScreen()
    {
        WorldState.currentLevel.ResetFinal();
        Camera cameraObj = Camera.main;

        if (cameraObj == null)
        {
            Debug.Log("Unable to access main Camera");
            return;
        }
        BuildMenu buildMenu = cameraObj.GetComponent <BuildMenu>();

        if (buildMenu == null)
        {
            Debug.Log("Unable to access BuildMenu");
            return;
        }
        Destroy(buildMenu.splashScreen_instance);
        Destroy(buildMenu.credits_instance);
        buildMenu.HideNavigationButtons();

        Intermission intermission = cameraObj.GetComponent <Intermission>();

        if (intermission == null)
        {
            Debug.Log("Unable to access Intermission");
            return;
        }
        intermission.SendMessage("PerformBuildIntermission");
        WorldState.gameState = WorldState.GameState.Intermission_FloraIn;
    }
Ejemplo n.º 10
0
        ////////////////////////////////////////////////////////////
        // 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()
        {
            this.gameAction = GameAction.Nothing;

            this.gameState = GameState.Level;

            var players = this.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);
            }

            this.intermission = null;

            this.options.Sound.Reset();

            this.world = new World(this.resource, this.options, this);

            this.options.UserInput.Reset();
        }
Ejemplo n.º 11
0
        private void DrawSinglePlayerStats(Intermission im)
        {
            this.DrawBackground(im);

            // Draw animated background.
            this.DrawBackgroundAnimation(im);

            // Draw level name.
            this.DrawFinishedLevelName(im);

            // Line height.
            var lineHeight = (3 * this.numbers[0].Height) / 2;

            this.DrawPatch(
                "WIOSTK",                 // KILLS
                IntermissionRenderer.spStatsX,
                IntermissionRenderer.spStatsY
                );

            this.DrawPercent(320 - IntermissionRenderer.spStatsX, IntermissionRenderer.spStatsY, im.KillCount[0]);

            this.DrawPatch(
                "WIOSTI",                 // ITEMS
                IntermissionRenderer.spStatsX,
                IntermissionRenderer.spStatsY + lineHeight
                );

            this.DrawPercent(320 - IntermissionRenderer.spStatsX, IntermissionRenderer.spStatsY + lineHeight, im.ItemCount[0]);

            this.DrawPatch(
                "WISCRT2",                 // SECRET
                IntermissionRenderer.spStatsX,
                IntermissionRenderer.spStatsY + 2 * lineHeight
                );

            this.DrawPercent(320 - IntermissionRenderer.spStatsX, IntermissionRenderer.spStatsY + 2 * lineHeight, im.SecretCount[0]);

            this.DrawPatch(
                "WITIME",                 // TIME
                IntermissionRenderer.spTimeX,
                IntermissionRenderer.spTimeY
                );

            this.DrawTime(320 / 2 - IntermissionRenderer.spTimeX, IntermissionRenderer.spTimeY, im.TimeCount);

            if (im.Info.Episode < 3)
            {
                this.DrawPatch(
                    "WIPAR",                     // PAR
                    320 / 2 + IntermissionRenderer.spTimeX,
                    IntermissionRenderer.spTimeY
                    );

                this.DrawTime(320 - IntermissionRenderer.spTimeX, IntermissionRenderer.spTimeY, im.ParCount);
            }
        }
Ejemplo n.º 12
0
        private void DrawShowNextLoc(Intermission im)
        {
            this.DrawBackground(im);

            // Draw animated background.
            this.DrawBackgroundAnimation(im);

            if (DoomApplication.Instance.IWad != "doom2" &&
                DoomApplication.Instance.IWad != "freedoom2" &&
                DoomApplication.Instance.IWad != "plutonia" &&
                DoomApplication.Instance.IWad != "tnt")
            {
                if (im.Info.Episode > 2)
                {
                    this.DrawEnteringLevelName(im);

                    return;
                }

                var last = (im.Info.LastLevel == 8) ? im.Info.NextLevel - 1 : im.Info.LastLevel;

                // Draw a splat on taken cities.
                for (var i = 0; i <= last; i++)
                {
                    var x = WorldMap.Locations[im.Info.Episode][i].X;
                    var y = WorldMap.Locations[im.Info.Episode][i].Y;
                    this.DrawPatch("WISPLAT", x, y);
                }

                // Splat the secret level?
                if (im.Info.DidSecret)
                {
                    var x = WorldMap.Locations[im.Info.Episode][8].X;
                    var y = WorldMap.Locations[im.Info.Episode][8].Y;
                    this.DrawPatch("WISPLAT", x, y);
                }

                // Draw "you are here".
                if (im.ShowYouAreHere)
                {
                    var x = WorldMap.Locations[im.Info.Episode][im.Info.NextLevel].X;
                    var y = WorldMap.Locations[im.Info.Episode][im.Info.NextLevel].Y;
                    this.DrawSuitablePatch(IntermissionRenderer.youAreHere, x, y);
                }
            }

            // Draw next level name.
            if ((DoomApplication.Instance.IWad != "doom2" &&
                 DoomApplication.Instance.IWad != "freedoom2" &&
                 DoomApplication.Instance.IWad != "plutonia" &&
                 DoomApplication.Instance.IWad != "tnt") ||
                im.Info.NextLevel != 30)
            {
                this.DrawEnteringLevelName(im);
            }
        }
Ejemplo n.º 13
0
        private void DrawShowNextLoc(Intermission im)
        {
            DrawBackground(im);

            // Draw animated background.
            DrawBackgroundAnimation(im);

            if (im.Options.GameMode != GameMode.Commercial)
            {
                if (im.Info.Episode > 2)
                {
                    DrawEnteringLevelName(im);
                    return;
                }

                var last = (im.Info.LastLevel == 8) ? im.Info.NextLevel - 1 : im.Info.LastLevel;

                // Draw a splat on taken cities.
                for (var i = 0; i <= last; i++)
                {
                    var x = WorldMap.Locations[im.Info.Episode][i].X;
                    var y = WorldMap.Locations[im.Info.Episode][i].Y;
                    DrawPatch("WISPLAT", x, y);
                }

                // Splat the secret level?
                if (im.Info.DidSecret)
                {
                    var x = WorldMap.Locations[im.Info.Episode][8].X;
                    var y = WorldMap.Locations[im.Info.Episode][8].Y;
                    DrawPatch("WISPLAT", x, y);
                }

                // Draw "you are here".
                if (im.ShowYouAreHere)
                {
                    var x = WorldMap.Locations[im.Info.Episode][im.Info.NextLevel].X;
                    var y = WorldMap.Locations[im.Info.Episode][im.Info.NextLevel].Y;
                    DrawSuitablePatch(youAreHere, x, y);
                }
            }

            // Draw next level name.
            if ((im.Options.GameMode != GameMode.Commercial) || im.Info.NextLevel != 30)
            {
                DrawEnteringLevelName(im);
            }
        }
Ejemplo n.º 14
0
    void Handle_ClickOnIntermissionScreen()
    {
        Counters.movementWarmupCounter = Consts.MOVEMENT_WARMUP;

        Camera cameraObj = Camera.main;

        if (cameraObj == null)
        {
            Debug.Log("Unable to access main Camera");
            return;
        }
        Intermission intermission = cameraObj.GetComponent <Intermission>();

        if (intermission == null)
        {
            Debug.Log("Unable to access Intermission");
            return;
        }
        intermission.SendMessage("PerformDestroyIntermission");

        if (WorldState.currentLevel.ReachedFinal())
        {
            WorldState.currentLevel.Set(1);
            BuildMenu buildMenu = cameraObj.GetComponent <BuildMenu>();
            if (buildMenu == null)
            {
                Debug.Log("Unable to access BuildMenu");
                return;
            }
            buildMenu.Start();
            WorldState.gameState = WorldState.GameState.SplashScreen;
        }
        else
        {
            WorldState.gameState = WorldState.GameState.Game;
            BuildLevel buildLevel = cameraObj.GetComponent <BuildLevel>();
            if (buildLevel == null)
            {
                Debug.Log("Unable to access BuildLevel");
                return;
            }
            buildLevel.PerformBuild();
            WorldState.DisableGravity();
            WorldState.build_virtual_level_representation();
            WorldState.debug_print_virtual_level();
        }
    }
Ejemplo n.º 15
0
        public void IntermissionRenderTest(Intermission im)
        {
            intermission.Render(im);

            var screenData = screen.Data;
            var p          = MemoryMarshal.Cast <byte, uint>(sfmlTextureData);

            for (var i = 0; i < p.Length; i++)
            {
                p[i] = colors[screenData[i]];
            }

            sfmlTexture.Update(sfmlTextureData, (uint)screen.Height, (uint)screen.Width, 0, 0);

            sfmlWindow.Draw(sfmlSprite, sfmlStates);

            sfmlWindow.Display();
        }
Ejemplo n.º 16
0
 private void DrawBackground(Intermission intermission)
 {
     if (intermission.Options.GameMode == GameMode.Commercial)
     {
         DrawPatch(patches.Background, 0, 0);
     }
     else
     {
         var e = intermission.Options.Episode - 1;
         if (e < patches.MapPictures.Count)
         {
             DrawPatch(patches.MapPictures[e], 0, 0);
         }
         else
         {
             DrawPatch(patches.Background, 0, 0);
         }
     }
 }
Ejemplo n.º 17
0
 private void DrawBackground(Intermission im)
 {
     if (im.Options.GameMode == GameMode.Commercial)
     {
         DrawPatch("INTERPIC", 0, 0);
     }
     else
     {
         var e = im.Options.Episode - 1;
         if (e < mapPictures.Length)
         {
             DrawPatch(mapPictures[e], 0, 0);
         }
         else
         {
             DrawPatch("INTERPIC", 0, 0);
         }
     }
 }
Ejemplo n.º 18
0
        private void WI_drawShowNextLoc(Intermission im)
        {
            DrawBackground(im);

            // draw animated background
            //WI_drawAnimatedBack();

            if (im.Options.GameMode != GameMode.Commercial)
            {
                if (im.Wbs.Epsd > 2)
                {
                    //WI_drawEL();
                    return;
                }

                var last = (im.Wbs.Last == 8) ? im.Wbs.Next - 1 : im.Wbs.Last;

                // draw a splat on taken cities.
                for (var i = 0; i <= last; i++)
                {
                    //WI_drawOnLnode(i, &splat);
                }

                // splat the secret level?
                if (im.Wbs.DidSecret)
                {
                    //WI_drawOnLnode(8, &splat);
                }

                // draw flashing ptr
                //if (snl_pointeron)
                {
                    //WI_drawOnLnode(wbs->next, yah);
                }
            }

            // draws which level you are entering..
            if ((im.Options.GameMode != GameMode.Commercial) || im.Wbs.Next != 30)
            {
                WI_drawEL(im);
            }
        }
Ejemplo n.º 19
0
        public void Render(Intermission im)
        {
            switch (im.State)
            {
            case IntermissionState.StatCount:
                this.DrawSinglePlayerStats(im);

                break;

            case IntermissionState.ShowNextLoc:
                this.DrawShowNextLoc(im);

                break;

            case IntermissionState.NoState:
                this.DrawNoState(im);

                break;
            }
        }
Ejemplo n.º 20
0
        private void DrawBackgroundAnimation(Intermission im)
        {
            if (im.Options.GameMode == GameMode.Commercial)
            {
                return;
            }

            if (im.Info.Episode > 2)
            {
                return;
            }

            for (var i = 0; i < im.Animations.Length; i++)
            {
                var a = im.Animations[i];
                if (a.PatchNumber >= 0)
                {
                    DrawPatch(a.Patches[a.PatchNumber], a.LocationX, a.LocationY);
                }
            }
        }
Ejemplo n.º 21
0
        ////////////////////////////////////////////////////////////
        // 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()
        {
            this.gameAction = GameAction.Nothing;

            this.gameState = GameState.Level;

            var player = this.options.Player;

            if (player.PlayerState == PlayerState.Dead)
            {
                player.PlayerState = PlayerState.Reborn;
            }

            this.intermission = null;

            this.options.Sound.Reset();

            this.world = new World(this.resource, this.options, this);

            this.options.UserInput.Reset();
        }
Ejemplo n.º 22
0
        // Draws "Entering <LevelName>"
        private void WI_drawEL(Intermission im)
        {
            int y = WI_TITLEY;

            var e = 0;

            if (im.Options.GameMode != GameMode.Commercial)
            {
                e = im.Options.Episode - 1;
            }

            // draw "Entering"
            DrawPatch(
                patches.Entering,
                (320 - patches.Entering.Width) / 2, y);

            // draw level
            y += (5 * patches.LevelNames[e][im.Wbs.Next].Height) / 4;

            DrawPatch(
                patches.LevelNames[e][im.Wbs.Next],
                (320 - patches.LevelNames[e][im.Wbs.Next].Width) / 2, y);
        }
Ejemplo n.º 23
0
        private void DrawBackground(Intermission im)
        {
            if (DoomApplication.Instance.IWad == "doom2" ||
                DoomApplication.Instance.IWad == "freedoom2" ||
                DoomApplication.Instance.IWad == "plutonia" ||
                DoomApplication.Instance.IWad == "tnt")
            {
                this.DrawPatch("INTERPIC", 0, 0);
            }
            else
            {
                var e = im.Options.Episode - 1;

                if (e < IntermissionRenderer.mapPictures.Length)
                {
                    this.DrawPatch(IntermissionRenderer.mapPictures[e], 0, 0);
                }
                else
                {
                    this.DrawPatch("INTERPIC", 0, 0);
                }
            }
        }
Ejemplo n.º 24
0
        // Draws "<Levelname> Finished!"
        private void WI_drawLF(Intermission intermission)
        {
            var wbs = intermission.Wbs;
            var y   = WI_TITLEY;

            var e = 0;

            if (intermission.Options.GameMode != GameMode.Commercial)
            {
                e = intermission.Options.Episode - 1;
            }

            // draw <LevelName>
            DrawPatch(
                patches.LevelNames[e][wbs.Last],
                (320 - patches.LevelNames[e][wbs.Last].Width) / 2, y);

            // draw "Finished!"
            y += (5 * patches.LevelNames[e][wbs.Last].Height) / 4;

            DrawPatch(
                patches.Finished,
                (320 - patches.Finished.Width) / 2, y);
        }
Ejemplo n.º 25
0
 private void DrawNoState(Intermission im)
 {
     this.DrawShowNextLoc(im);
 }
Ejemplo n.º 26
0
        private void DrawDeathmatchStats(Intermission im)
        {
            this.DrawBackground(im);

            // Draw animated background.
            this.DrawBackgroundAnimation(im);

            // Draw level name.
            this.DrawFinishedLevelName(im);

            // Draw stat titles (top line).
            this.DrawPatch(
                "WIMSTT",                 // TOTAL
                IntermissionRenderer.dmTotalsX - this.GetWidth("WIMSTT") / 2,
                IntermissionRenderer.dmMatrixY - IntermissionRenderer.spacingY + 10
                );

            this.DrawPatch(
                "WIKILRS",                 // KILLERS
                IntermissionRenderer.dmKillersX,
                IntermissionRenderer.dmKillersY
                );

            this.DrawPatch(
                "WIVCTMS",                 // VICTIMS
                IntermissionRenderer.dmVictimsX,
                IntermissionRenderer.dmVictimsY
                );

            // Draw player boxes.
            var x = IntermissionRenderer.dmMatrixX + IntermissionRenderer.dmSpacingX;
            var y = IntermissionRenderer.dmMatrixY;

            for (var i = 0; i < Player.MaxPlayerCount; i++)
            {
                if (im.Options.Players[i].InGame)
                {
                    this.DrawPatch(
                        IntermissionRenderer.playerBoxes[i],
                        x - this.GetWidth(IntermissionRenderer.playerBoxes[i]) / 2,
                        IntermissionRenderer.dmMatrixY - IntermissionRenderer.spacingY
                        );

                    this.DrawPatch(
                        IntermissionRenderer.playerBoxes[i],
                        IntermissionRenderer.dmMatrixX - this.GetWidth(IntermissionRenderer.playerBoxes[i]) / 2,
                        y
                        );

                    if (i == im.Options.ConsolePlayer)
                    {
                        this.DrawPatch(
                            "STFDEAD0",                             // Player face (dead)
                            x - this.GetWidth(IntermissionRenderer.playerBoxes[i]) / 2,
                            IntermissionRenderer.dmMatrixY - IntermissionRenderer.spacingY
                            );

                        this.DrawPatch(
                            "STFST01",                             // Player face
                            IntermissionRenderer.dmMatrixX - this.GetWidth(IntermissionRenderer.playerBoxes[i]) / 2,
                            y
                            );
                    }
                }
                else
                {
                    // V_DrawPatch(x-SHORT(bp[i]->width)/2,
                    //   DM_MATRIXY - WI_SPACINGY, FB, bp[i]);
                    // V_DrawPatch(DM_MATRIXX-SHORT(bp[i]->width)/2,
                    //   y, FB, bp[i]);
                }

                x += IntermissionRenderer.dmSpacingX;
                y += IntermissionRenderer.spacingY;
            }

            // Draw stats.
            y = IntermissionRenderer.dmMatrixY + 10;
            var w = this.numbers[0].Width;

            for (var i = 0; i < Player.MaxPlayerCount; i++)
            {
                x = IntermissionRenderer.dmMatrixX + IntermissionRenderer.dmSpacingX;

                if (im.Options.Players[i].InGame)
                {
                    for (var j = 0; j < Player.MaxPlayerCount; j++)
                    {
                        if (im.Options.Players[j].InGame)
                        {
                            this.DrawNumber(x + w, y, im.DeathmatchFrags[i][j], 2);
                        }

                        x += IntermissionRenderer.dmSpacingX;
                    }

                    this.DrawNumber(IntermissionRenderer.dmTotalsX + w, y, im.DeathmatchTotals[i], 2);
                }

                y += IntermissionRenderer.spacingY;
            }
        }
Ejemplo n.º 27
0
        private void DrawNetGameStats(Intermission im)
        {
            this.DrawBackground(im);

            // Draw animated background.
            this.DrawBackgroundAnimation(im);

            // Draw level name.
            this.DrawFinishedLevelName(im);

            var ngStatsX = 32 + this.GetWidth("STFST01") / 2;

            if (!im.DoFrags)
            {
                ngStatsX += 32;
            }

            // Draw stat titles (top line).
            this.DrawPatch(
                "WIOSTK",                 // KILLS
                ngStatsX + IntermissionRenderer.ngSpacingX - this.GetWidth("WIOSTK"),
                IntermissionRenderer.ngStatsY
                );

            this.DrawPatch(
                "WIOSTI",                 // ITEMS
                ngStatsX + 2 * IntermissionRenderer.ngSpacingX - this.GetWidth("WIOSTI"),
                IntermissionRenderer.ngStatsY
                );

            this.DrawPatch(
                "WIOSTS",                 // SCRT
                ngStatsX + 3 * IntermissionRenderer.ngSpacingX - this.GetWidth("WIOSTS"),
                IntermissionRenderer.ngStatsY
                );

            if (im.DoFrags)
            {
                this.DrawPatch(
                    "WIFRGS",                     // FRAGS
                    ngStatsX + 4 * IntermissionRenderer.ngSpacingX - this.GetWidth("WIFRGS"),
                    IntermissionRenderer.ngStatsY
                    );
            }

            // Draw stats.
            var y = IntermissionRenderer.ngStatsY + this.GetHeight("WIOSTK");

            for (var i = 0; i < Player.MaxPlayerCount; i++)
            {
                if (!im.Options.Players[i].InGame)
                {
                    continue;
                }

                var x = ngStatsX;

                this.DrawPatch(IntermissionRenderer.playerBoxes[i], x - this.GetWidth(IntermissionRenderer.playerBoxes[i]), y);

                if (i == im.Options.ConsolePlayer)
                {
                    this.DrawPatch(
                        "STFST01",                         // Player face
                        x - this.GetWidth(IntermissionRenderer.playerBoxes[i]),
                        y
                        );
                }

                x += IntermissionRenderer.ngSpacingX;

                this.DrawPercent(x - this.percent.Width, y + 10, im.KillCount[i]);
                x += IntermissionRenderer.ngSpacingX;

                this.DrawPercent(x - this.percent.Width, y + 10, im.ItemCount[i]);
                x += IntermissionRenderer.ngSpacingX;

                this.DrawPercent(x - this.percent.Width, y + 10, im.SecretCount[i]);
                x += IntermissionRenderer.ngSpacingX;

                if (im.DoFrags)
                {
                    this.DrawNumber(x, y + 10, im.FragCount[i], -1);
                }

                y += IntermissionRenderer.spacingY;
            }
        }
Ejemplo n.º 28
0
        private void DoCompleted()
        {
            this.gameAction = GameAction.Nothing;

            // Take away cards and stuff.
            this.options.Player.FinishLevel();

            if (DoomApplication.Instance.IWad != "doom2" &&
                DoomApplication.Instance.IWad != "freedoom2" &&
                DoomApplication.Instance.IWad != "plutonia" &&
                DoomApplication.Instance.IWad != "tnt")
            {
                switch (this.options.Map)
                {
                case 8:
                    this.gameAction = GameAction.Victory;

                    return;

                case 9:
                    this.options.Player.DidSecret = true;

                    break;
                }
            }

            if ((this.options.Map == 8) &&
                (DoomApplication.Instance.IWad != "doom2" &&
                 DoomApplication.Instance.IWad != "freedoom2" &&
                 DoomApplication.Instance.IWad != "plutonia" &&
                 DoomApplication.Instance.IWad != "tnt"))
            {
                // Victory.
                this.gameAction = GameAction.Victory;

                return;
            }

            if ((this.options.Map == 9) &&
                (DoomApplication.Instance.IWad != "doom2" &&
                 DoomApplication.Instance.IWad != "freedoom2" &&
                 DoomApplication.Instance.IWad != "plutonia" &&
                 DoomApplication.Instance.IWad != "tnt"))

            {
                // Exit secret level.
                this.options.Player.DidSecret = true;
            }

            var imInfo = this.options.IntermissionInfo;

            imInfo.DidSecret = this.options.Player.DidSecret;
            imInfo.Episode   = this.options.Episode - 1;
            imInfo.LastLevel = this.options.Map - 1;

            // IntermissionInfo.Next is 0 biased, unlike GameOptions.Map.
            if (DoomApplication.Instance.IWad == "doom2" ||
                DoomApplication.Instance.IWad == "freedoom2" ||
                DoomApplication.Instance.IWad == "plutonia" ||
                DoomApplication.Instance.IWad == "tnt")
            {
                if (this.world.SecretExit)
                {
                    switch (this.options.Map)
                    {
                    case 15:
                        imInfo.NextLevel = 30;

                        break;

                    case 31:
                        imInfo.NextLevel = 31;

                        break;
                    }
                }
                else
                {
                    switch (this.options.Map)
                    {
                    case 31:
                    case 32:
                        imInfo.NextLevel = 15;

                        break;

                    default:
                        imInfo.NextLevel = this.options.Map;

                        break;
                    }
                }
            }
            else
            {
                if (this.world.SecretExit)
                {
                    // Go to secret level.
                    imInfo.NextLevel = 8;
                }
                else if (this.options.Map == 9)
                {
                    // Returning from secret level.
                    switch (this.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 = this.options.Map;
                }
            }

            imInfo.MaxKillCount   = this.world.TotalKills;
            imInfo.MaxItemCount   = this.world.TotalItems;
            imInfo.MaxSecretCount = this.world.TotalSecrets;

            if (DoomApplication.Instance.IWad == "doom2" ||
                DoomApplication.Instance.IWad == "freedoom2" ||
                DoomApplication.Instance.IWad == "plutonia" ||
                DoomApplication.Instance.IWad == "tnt")
            {
                imInfo.ParTime = 35 * DoomInfo.ParTimes.Doom2[this.options.Map - 1];
            }
            else
            {
                imInfo.ParTime = 35 * DoomInfo.ParTimes.Doom1[this.options.Episode - 1][this.options.Map - 1];
            }

            var player = this.options.Player;

            imInfo.Player.KillCount   = player.KillCount;
            imInfo.Player.ItemCount   = player.ItemCount;
            imInfo.Player.SecretCount = player.SecretCount;
            imInfo.Player.Time        = this.world.LevelTime;

            this.gameState    = GameState.Intermission;
            this.intermission = new Intermission(this.options, imInfo);
        }
Ejemplo n.º 29
0
 private void WI_drawNoState(Intermission im)
 {
     //snl_pointeron = true;
     WI_drawShowNextLoc(im);
 }