Exemplo n.º 1
0
        public void Render(Finale finale)
        {
            if (finale.Stage == 2)
            {
                RenderCast(finale);
                return;
            }

            if (finale.Stage == 0)
            {
                RenderTextScreen(finale);
            }
            else
            {
                switch (finale.Options.Episode)
                {
                case 1:
                    DrawPatch("CREDIT", 0, 0);
                    break;

                case 2:
                    DrawPatch("VICTORY2", 0, 0);
                    break;

                case 3:
                    BunnyScroll(finale);
                    break;

                case 4:
                    DrawPatch("ENDPIC", 0, 0);
                    break;
                }
            }
        }
Exemplo n.º 2
0
        private void RenderCast(Finale finale)
        {
            DrawPatch("BOSSBACK", 0, 0);

            var frame = finale.CastState.Frame & 0x7fff;
            var patch = sprites[finale.CastState.Sprite].Frames[frame].Patches[0];

            if (sprites[finale.CastState.Sprite].Frames[frame].Flip[0])
            {
                screen.DrawPatchFlip(
                    patch,
                    screen.Width / 2,
                    screen.Height - scale * 30,
                    scale);
            }
            else
            {
                screen.DrawPatch(
                    patch,
                    screen.Width / 2,
                    screen.Height - scale * 30,
                    scale);
            }

            var width = screen.MeasureText(finale.CastName, scale);

            screen.DrawText(
                finale.CastName,
                (screen.Width - width) / 2,
                screen.Height - scale * 13,
                scale);
        }
Exemplo n.º 3
0
        private void btnPing_Click(object sender, EventArgs e)
        {
            Double Init;
            Double Finale;

            customer = new VO.CustomersVO();
            DialogResult dlg = MessageBox.Show("Do you wish to Ping this Account?\nThis will be Undone!", "Ping Interest", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            try
            {
                if (dlg == System.Windows.Forms.DialogResult.Yes)
                {
                    customer.Custcode = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
                    Init             = Convert.ToDouble(dataGridView1.SelectedRows[0].Cells[5].Value) * customer.getIR();
                    Finale           = Convert.ToDouble(dataGridView1.SelectedRows[0].Cells[5].Value) + Init;
                    customer.Balance = Finale;
                    customer.PingInterest();
                    dataGridView1.SelectedRows[0].Cells[5].Value = Finale.ToString("#,###,##0.00");
                    btnPing.Enabled = false;
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Ping Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 4
0
        private void DoFinale()
        {
            this.gameAction = GameAction.Nothing;

            this.gameState = GameState.Finale;
            this.finale    = new Finale(this.options);
        }
Exemplo n.º 5
0
        private void BunnyScroll(Finale finale)
        {
            var scroll = 320 - finale.Scrolled;

            this.DrawPatch("PFUB2", scroll - 320, 0);
            this.DrawPatch("PFUB1", scroll, 0);

            if (finale.ShowTheEnd)
            {
                string patch = "END0";

                switch (finale.TheEndIndex)
                {
                case 1:
                    patch = "END1";

                    break;

                case 2:
                    patch = "END2";

                    break;

                case 3:
                    patch = "END3";

                    break;

                case 4:
                    patch = "END4";

                    break;

                case 5:
                    patch = "END5";

                    break;

                case 6:
                    patch = "END6";

                    break;
                }

                this.DrawPatch(patch, (320 - 13 * 8) / 2, (240 - 8 * 8) / 2);
            }
        }
Exemplo n.º 6
0
        private void RenderTextScreen(Finale finale)
        {
            this.FillFlat(this.flats[finale.Flat]);

            // Draw some of the text onto the screen.
            var cx = 10 * this.scale;
            var cy = 17 * this.scale;
            var ch = 0;

            var count = (finale.Count - 10) / Finale.TextSpeed;

            if (count < 0)
            {
                count = 0;
            }

            for (; count > 0; count--)
            {
                if (ch == finale.Text.Length)
                {
                    break;
                }

                var c = finale.Text[ch++];

                if (c == '\n')
                {
                    cx  = 10 * this.scale;
                    cy += 11 * this.scale;

                    continue;
                }

                this.screen.DrawChar(c, cx, cy, this.scale);

                cx += this.screen.MeasureChar(c, this.scale);
            }
        }