Exemplo n.º 1
0
        public void pokeRank(uint address)
        {
            uint rank = Convert.ToUInt32(rankBox.Value);

            Gecko.poke32(address, rank - 1);         // rank
            Gecko.poke32(address - 0x4, 0x00000000); // experience to 0

            // we need to set the rank cap progression bit appropriately
            uint progression = Gecko.peek(ProgressBitsForm.progressBitsAddress + diff);

            ProgressBitsForm.SetFlag(ref progression, 0x100000, rank >= 20); // remove if rank < 20, set if rank >= 20
            Gecko.poke32(ProgressBitsForm.progressBitsAddress, progression);
        }
Exemplo n.º 2
0
        public void pokeRank(uint expAddress)
        {
            uint level = ToUInt32(rankBox.Value);

            Gecko.poke32(expAddress + 0x4 + diff, level - 1); // rank
            Gecko.poke32(expAddress + diff, 0x00000000);      // experience to 0

            // we need to set the level cap progression bit appropriately
            uint progression = Gecko.peek(ProgressBitsForm.progressBitsAddress);

            ProgressBitsForm.SetFlag(ref progression, 0x100000, level >= 20); // remove if level < 20, set if level >= 20
            Gecko.poke32(ProgressBitsForm.progressBitsAddress, progression);
        }
Exemplo n.º 3
0
        public void pokeRank(uint address)
        {
            uint rank = Convert.ToUInt32(rankBox.Value);

            Gecko.poke32(address, rank - 1);         // rank
            Gecko.poke32(address - 0x4, 0x00000000); // experience to 0

            // set progression bits appropriately
            uint progression = Gecko.peek(ProgressBitsForm.progressBitsAddress + diff);

            ProgressBitsForm.SetFlag(ref progression, 0x100000, rank >= 20); // rank cap flag, remove if rank < 20, set if rank >= 20
            ProgressBitsForm.SetFlag(ref progression, 0x800, rank >= 10);    // gachi unlocked flag, remove if rank < 10, set if rank >= 10
            Gecko.poke32(ProgressBitsForm.progressBitsAddress, progression);
        }
Exemplo n.º 4
0
        private void resetAllButton_Click(object sender, EventArgs e)
        {
            String       dialogTitle  = Properties.Strings.SINGLE_PLAYER_RESET_TITLE;
            String       dialogString = Properties.Strings.SINGLE_PLAYER_RESET_TEXT;
            DialogResult result       = MessageBox.Show(dialogString, dialogTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);

            if (result == DialogResult.Yes)
            {
                // Reset environment flags
                this.clearEnvironmentButton_Click(null, null);

                // Reset levels
                levelSaveData = new List <LevelData>();
                ReloadListView();

                // reset power eggs
                powerEggsBox.Value = 0;

                // Reset upgrades
                heroShotBox.SelectedIndex  = 0;
                inkTankBox.SelectedIndex   = 0;
                splatBombBox.SelectedIndex = 0;
                burstBombBox.SelectedIndex = 0;
                seekerBox.SelectedIndex    = 0;

                // Apply levels, upgrades, and power eggs
                this.OKButton_Click(null, null);

                // Reset single player flags in the Inkopolis progress bits
                Form1 mainForm    = (Form1)this.Owner;
                uint  progression = mainForm.Gecko.peek(ProgressBitsForm.progressBitsAddress + mainForm.diff);

                ProgressBitsForm.SetFlag(ref progression, 0x10, false);  // octo valley intro
                ProgressBitsForm.SetFlag(ref progression, 0x80, false);  // great zapfish returned
                ProgressBitsForm.SetFlag(ref progression, 0x100, false); // credits block available

                mainForm.Gecko.poke32(ProgressBitsForm.progressBitsAddress + mainForm.diff, progression);
            }
        }
Exemplo n.º 5
0
        private void progressFlagsBox_Click(object sender, EventArgs e)
        {
            ProgressBitsForm progressBitsForm = new ProgressBitsForm();

            progressBitsForm.ShowDialog(this);
        }