Exemplo n.º 1
0
        public Script(byte[] data)
        {
            Data     = data;
            Header   = data.ToClass <AmxHeader>();
            CellSize = Header.CellSize;

            if (Header.Flags.HasFlagFast(AmxFlags.OVERLAY))
            {
                throw new ArgumentException("Multi-environment script!?");
            }
        }
Exemplo n.º 2
0
        public Amx(byte[] data)
        {
            Data     = data;
            Header   = data.ToClass <AmxHeader>();
            CellSize = Header.CellSize;

            if (Header.Flags.HasFlagFast(AmxFlags.DEBUG))
            {
                return;
            }

            if (Header.Flags.HasFlagFast(AmxFlags.OVERLAY))
            {
                throw new ArgumentException("Multi-environment script!?");
            }

            Unpack();

            Assert(Header != null);
            Assert(Header.Magic != 0);
            Assert(Header.Natives <= Header.Libraries);
        }