Ejemplo n.º 1
0
        public void PutBlock(ref byte[] buffer)
        {
            EBMethods.PutString(name, ref buffer, 5, 0);

            buffer[5] = level;

            buffer[6] = (byte)(exp & 0xff);
            buffer[7] = (byte)((exp & 0xff00) >> 8);
            buffer[8] = (byte)((exp & 0xff0000) >> 16);
            buffer[9] = (byte)((exp & 0xff000000) >> 24);

            buffer[10] = (byte)(maxHP & 0xff);
            buffer[11] = (byte)((maxHP & 0xff00) >> 8);
            buffer[12] = (byte)(maxPP & 0xff);
            buffer[13] = (byte)((maxPP & 0xff00) >> 8);

            for (int i = 0; i < 7; i++)
            {
                buffer[21 + i] = statsAfter[i];
                buffer[28 + i] = statsBefore[i];
            }

            for (int i = 0; i < 14; i++)
            {
                buffer[i + 35] = items[i];
            }

            for (int i = 0; i < 4; i++)
            {
                buffer[i + 49] = equip[i];
            }

            buffer[69] = (byte)(currHP & 0xff);
            buffer[70] = (byte)((currHP & 0xff00) >> 8);
            buffer[71] = (byte)(rollHP & 0xff);
            buffer[72] = (byte)((rollHP & 0xff00) >> 8);

            buffer[75] = (byte)(currPP & 0xff);
            buffer[76] = (byte)((currPP & 0xff00) >> 8);
            buffer[77] = (byte)(rollPP & 0xff);
            buffer[78] = (byte)((rollPP & 0xff00) >> 8);
        }
Ejemplo n.º 2
0
        public void PutBlock(ref byte[] buffer)
        {
            EBMethods.PutString(playerName, ref buffer, 24, 0x2c);
            EBMethods.PutString(petName, ref buffer, 6, 0x44);
            EBMethods.PutString(favFood, ref buffer, 6, 0x4a);
            EBMethods.PutString(favThing, ref buffer, 7, 0x54);

            buffer[0x5c] = (byte)(moneyHand & 0xff);
            buffer[0x5d] = (byte)((moneyHand & 0xff00) >> 8);
            buffer[0x5e] = (byte)((moneyHand & 0xff0000) >> 16);
            buffer[0x5f] = (byte)((moneyHand & 0xff000000) >> 24);

            buffer[0x60] = (byte)(moneyATM & 0xff);
            buffer[0x61] = (byte)((moneyATM & 0xff00) >> 8);
            buffer[0x62] = (byte)((moneyATM & 0xff0000) >> 16);
            buffer[0x63] = (byte)((moneyATM & 0xff000000) >> 24);

            for (int i = 0; i < 36; i++)
            {
                buffer[i + 0x76] = escargoItems[i];
            }

            buffer[0xa2] = (byte)(locX & 0xff);
            buffer[0xa3] = (byte)((locX & 0xff00) >> 8);
            buffer[0xa6] = (byte)(locY & 0xff);
            buffer[0xa7] = (byte)((locY & 0xff00) >> 8);

            for (int i = 0; i < 6; i++)
            {
                buffer[i + 0xb6] = partyMembers[i];
            }

            for (int i = 0; i < 4; i++)
            {
                buffer[i + 0xbc] = controlledMembers[i];
            }

            buffer[0xce] = numPartyMembers;
            buffer[0xcf] = numControlledMembers;

            buffer[0xdd] = (byte)(exitMouseX & 0xff);
            buffer[0xde] = (byte)((exitMouseX & 0xff00) >> 8);
            buffer[0xdf] = (byte)(exitMouseY & 0xff);
            buffer[0xe0] = (byte)((exitMouseY & 0xff00) >> 8);

            buffer[0xe1] = textSpeed;
            buffer[0xe2] = soundSetting;

            buffer[0x1f4] = (byte)(inGameTimer & 0xff);
            buffer[0x1f5] = (byte)((inGameTimer & 0xff00) >> 8);
            buffer[0x1f6] = (byte)((inGameTimer & 0xff0000) >> 16);
            buffer[0x1f7] = (byte)((inGameTimer & 0xff000000) >> 24);

            buffer[0x1f8] = textPal;

            byte[] subbuffer;
            for (int i = 0; i < 4; i++)
            {
                subbuffer = new byte[0x5f];
                for (int j = 0; j < subbuffer.Length; j++)
                {
                    subbuffer[j] = buffer[j + 0x1f9 + (i * 0x5f)];
                }
                chars[i].PutBlock(ref subbuffer);
                for (int j = 0; j < subbuffer.Length; j++)
                {
                    buffer[j + 0x1f9 + (i * 0x5f)] = subbuffer[j];
                }
            }

            byte ch          = 0;
            int  flagCounter = 0;

            for (int i = 0; i < 205; i++)
            {
                ch = 0;
                for (int j = 0; j < 8; j++)
                {
                    ch += (byte)((flags[flagCounter++] ? 1 : 0) << j);
                }
                buffer[i + 0x433] = ch;
            }
        }