Beispiel #1
0
        public void Remap(ref uint Pointer)
        {
            ModelCode.Remap(ref Pointer);
            CodeAddr = ModelCode.BlockStart;

            if (string.IsNullOrWhiteSpace(Name))
            {
                NameAddr = 0;
            }
            else
            {
                NameAddr = Pointer;
                Pointer += (uint)Name.Length;
                Pointer++;
            }

            STMProgram.Align32Bits(ref Pointer);

            if (Modes != null && Modes.Length != 0)
            {
                ModesAddr = Pointer;
                Pointer  += (uint)(4 * Modes.Length);

                foreach (var mode in Modes)
                {
                    mode.Remap(ref Pointer);
                }
            }
        }
Beispiel #2
0
 public void Remap(ref uint Pointer)
 {
     BlockStart = Pointer;
     Pointer   += (uint)Commands.Sum(cmd => cmd.Length) + 2;
     // +2 - last return command
     STMProgram.Align32Bits(ref Pointer);
 }
Beispiel #3
0
        public void Remap(ref uint Pointer)
        {
            if (string.IsNullOrWhiteSpace(Name))
            {
                NameAddr = 0;
            }
            else
            {
                NameAddr = Pointer;
                Pointer += (uint)Name.Length;
                Pointer++;
            }

            STMProgram.Align32Bits(ref Pointer);
        }
Beispiel #4
0
        public void Remap(ref uint Pointer)
        {
            if (string.IsNullOrWhiteSpace(Name))
            {
                NameAddr = 0;
            }
            else
            {
                NameAddr = Pointer;
                Pointer += (uint)Name.Length;
                Pointer++;
            }

            STMProgram.Align32Bits(ref Pointer);

            if (Links != null && Links.Length != 0)
            {
                LinksAddr = Pointer;
                Pointer  += (uint)(STMBlockInkInfo.LENGTH * Links.Length);

                foreach (var mode in Links)
                {
                    mode.Remap(ref Pointer);
                }
            }

            STMProgram.Align32Bits(ref Pointer);

            if (Variables != null && Variables.Length != 0)
            {
                VarsAddr = Pointer;
                Pointer += (uint)(4 * Variables.Length);
            }

            STMProgram.Align32Bits(ref Pointer);
        }