コード例 #1
0
        void SetParty()
        {
            int tO = 0x38; // Team offset in section

            for (int i = 0; i < TEAM_SIZE * 100; i += 100)
            {
                PokeData newMon = new PokeData();
                newMon.persVal  = gs.GetUInt(tO + 0x00 + i);
                newMon.otId     = gs.GetUInt(tO + 0x04 + i);
                newMon.nickname = PkmString.GetString(gs.GetBytes(tO + 0x08 + i, NICK_LEN));
                newMon.lang     = gs.GetUShort(tO + 0x12 + i);
                newMon.otName   = PkmString.GetString(gs.GetBytes(tO + 0x14 + i, NAME_SIZE));
                newMon.checksum = gs.GetUShort(tO + 0x1C + i);
                newMon.data     = gs.GetBytes(tO + 0x20 + i, 48);
                newMon.status   = gs.GetUInt(tO + 0x50 + i);
                newMon.level    = gs.GetByte(tO + 0x54 + i);
                newMon.hp       = gs.GetUShort(tO + 0x56 + i);
                newMon.maxHp    = gs.GetUShort(tO + 0x58 + i);
                newMon.atk      = gs.GetUShort(tO + 0x5A + i);
                newMon.def      = gs.GetUShort(tO + 0x5C + i);
                newMon.spd      = gs.GetUShort(tO + 0x5E + i);
                newMon.sp_a     = gs.GetUShort(tO + 0x60 + i);
                newMon.sp_d     = gs.GetUShort(tO + 0x62 + i);
                newMon.Init();

                TeamInfo.pokeTeam[i / 100] = newMon;
            }
        }
コード例 #2
0
 void SetTrainerInfo()
 {
     TrainerInfo.playerName       = PkmString.GetString(gs.GetBytes(0x00, NAME_SIZE));
     TrainerInfo.playerGender     = (Gender)gs.GetByte(0x08);
     TrainerInfo.playerId.Public  = gs.GetUShort(0x0A);
     TrainerInfo.playerId.Secret  = gs.GetUShort(0x0C);
     TrainerInfo.playTime.hours   = gs.GetUShort(0x0E);
     TrainerInfo.playTime.minutes = gs.GetByte(0x10);
     TrainerInfo.playTime.seconds = gs.GetByte(0x11);
 }