Exemplo n.º 1
0
        public string get_wc_text_2(int index)
        {
            int size = 0x28;

            int[] offset = { 0, 40, 80, 120, 160, 200, 240, 280 };
            if (japanese)
            {
                offset[0] = 0; offset[1] = 18; offset[2] = 18 + 13; offset[3] = 18 + 13 + 20;
                offset[4] = 18 + 13 + 40; offset[5] = 18 + 13 + 60; offset[6] = 18 + 13 + 80; offset[7] = 18 + 13 + 100;
                switch (index)
                {
                case 0:
                    size = 18;
                    break;

                case 1:
                    size = 13;
                    break;

                default:
                    size = 20;
                    break;
                }
            }
            return(StringConverter.GetG3Str(Data.Skip(text_start + offset[index]).Take(size).ToArray(), japanese));
        }
Exemplo n.º 2
0
 void Jap_checkCheckedChanged(object sender, EventArgs e)
 {
     name.Text = StringConverter.GetG3Str(ectfile.getData(0x4, 8), jap_check.Checked);
     if (jap_check.Checked)
     {
         MessageBox.Show("Remember Japanese names have a maximum of 5 characters.");
     }
 }
Exemplo n.º 3
0
        public string get_wn_text_2(int index)
        {
            int size = 0x28;

            int[] offset = { 0, 40, 80, 120, 160, 200, 240, 280, 320, 360, 400 };
            if (japanese)
            {
                size = 0x14;
                int i;
                for (i = 0; i < 11; i++)
                {
                    offset[i] = 0x14 * i;
                }
            }
            return(StringConverter.GetG3Str(Data.Skip(text_start + offset[index]).Take(size).ToArray(), japanese));
        }
Exemplo n.º 4
0
        void populate()
        {
            item_box.SelectedIndex = BitConverter.ToUInt16(ECT_editor.ectfile.getData(pk + 0x2, 2), 0);
            namebox.Text           = StringConverter.GetG3Str(ECT_editor.ectfile.getData(pk + 0x20, 11), jap_check.Checked);

            move1.SelectedIndex = BitConverter.ToUInt16(ECT_editor.ectfile.getData(pk + 0x4, 2), 0);
            move2.SelectedIndex = BitConverter.ToUInt16(ECT_editor.ectfile.getData(pk + 0x6, 2), 0);
            move3.SelectedIndex = BitConverter.ToUInt16(ECT_editor.ectfile.getData(pk + 0x8, 2), 0);
            move4.SelectedIndex = BitConverter.ToUInt16(ECT_editor.ectfile.getData(pk + 0xA, 2), 0);

            pp1.Value = PPUP_1;
            pp2.Value = PPUP_2;
            pp3.Value = PPUP_3;
            pp4.Value = PPUP_4;

            level.Value      = ECT_editor.ectfile.Data[pk + 0x0C];
            friendship.Value = ECT_editor.ectfile.Data[pk + 0x2B];

            otid.Value  = BitConverter.ToUInt16(ECT_editor.ectfile.getData(pk + 0x14, 2), 0);
            otsid.Value = BitConverter.ToUInt16(ECT_editor.ectfile.getData(pk + 0x16, 2), 0);

            pid.Value = BitConverter.ToUInt32(ECT_editor.ectfile.getData(pk + 0x1c, 4), 0);

            ev1.Value = ECT_editor.ectfile.Data[pk + 0x0E];
            ev2.Value = ECT_editor.ectfile.Data[pk + 0x0F];
            ev3.Value = ECT_editor.ectfile.Data[pk + 0x10];
            ev4.Value = ECT_editor.ectfile.Data[pk + 0x11];
            ev5.Value = ECT_editor.ectfile.Data[pk + 0x12];
            ev6.Value = ECT_editor.ectfile.Data[pk + 0x13];

            iv1.Value = IV_HP;
            iv2.Value = IV_ATK;
            iv3.Value = IV_DEF;
            iv4.Value = IV_SPE;
            iv5.Value = IV_SPA;
            iv6.Value = IV_SPD;

            ability.Value = IV_Ability;
        }
Exemplo n.º 5
0
        void update_ectData()
        {
            //tower_appearance.SelectedIndex = ectfile.Data[0];
            tower_appearance_num.Value = ectfile.Data[0];
            trainer_class_value.Value  = ectfile.Data[0x1];
            tower_floor.Value          = ectfile.Data[0x2];

            name.Text = StringConverter.GetG3Str(ectfile.getData(0x4, 8), jap_check.Checked);
            TID.Value = BitConverter.ToUInt16(ectfile.getData(0xC, 2), 0);
            SID.Value = BitConverter.ToUInt16(ectfile.getData(0xE, 2), 0);

            textA1.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x10, 2), 0));
            textA2.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x12, 2), 0));
            textA3.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x14, 2), 0));
            textA4.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x16, 2), 0));
            textA5.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x18, 2), 0));
            textA6.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x1A, 2), 0));

            textB1.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x1C, 2), 0));
            textB2.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x1E, 2), 0));
            textB3.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x20, 2), 0));
            textB4.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x22, 2), 0));
            textB5.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x24, 2), 0));
            textB6.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x26, 2), 0));

            textC1.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x28, 2), 0));
            textC2.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x2A, 2), 0));
            textC3.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x2C, 2), 0));
            textC4.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x2E, 2), 0));
            textC5.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x30, 2), 0));
            textC6.SelectedIndex = get_chatword(BitConverter.ToUInt16(ectfile.getData(0x32, 2), 0));

            pkm1.SelectedIndex = BitConverter.ToUInt16(ectfile.getData(0x34, 2), 0);
            pkm2.SelectedIndex = BitConverter.ToUInt16(ectfile.getData(0x60, 2), 0);
            pkm3.SelectedIndex = BitConverter.ToUInt16(ectfile.getData(0x8C, 2), 0);
        }
Exemplo n.º 6
0
 void Jap_checkCheckedChanged(object sender, EventArgs e)
 {
     namebox.Text = StringConverter.GetG3Str(ECT_editor.ectfile.getData(pk + 0x20, 11), jap_check.Checked);
 }