Beispiel #1
0
        private MOPPCode GetMOPPCode(MemoryStream stream)
        {
            // Read Instruction
            var position    = stream.Position;
            int instruction = stream.ReadByte();

            // Read MOPP Code
            MOPPCode mopp_code = mopp_codes[(int)Type][instruction];

            if (mopp_code == null)
            {
                return(null);
            }



            List <UInt32> arguemennts = new List <UInt32>();

            // Read Arguements
            for (var i = 0; i < mopp_code.ArgCount; i++)
            {
                arguemennts.Add((UInt32)stream.ReadByte());
            }

            var code_instance = mopp_code.Clone(position, arguemennts) as MOPPCode;

            return(code_instance);
        }
Beispiel #2
0
 private void SetMOPPCode(int src_code, int unused_target_code, params UInt32[] offsets)
 {
     mopp_codes[(int)Type][src_code] = new MOPPCode(Type, src_code, -1, offsets);
 }