Exemplo n.º 1
0
        public void AdjustCommandCountBlock()
        {
            CommandBlock commandCountBlock = this.blocks[0];

            if (commandCountBlock.Type != BlockType.CommandCount)
            {
                return;
            }
            else
            {
                short count = (short)(this.blocks.Count - 1); //we don't count the commandCountBlock
                                                              //since it's not technically a command block
                byte highByte = (byte)((count & 0xff00) >> 8);
                byte lowByte  = (byte)(count & 0x00ff);
                commandCountBlock.SetByte(0, highByte);
                commandCountBlock.SetByte(1, lowByte);
            }
        }
Exemplo n.º 2
0
 public void AdjustByte8In0x5dBlocks() //byte #8 refers to the number of 0x60 blocks
                                       //immediately preceeding each 0x5d block
 {
     for (int ii = 0; ii < CountOf0x5dBlocks(); ii++)
     {
         CommandBlock x5d      = GetNth0x5dBlock(ii);
         int          idx      = IndexOfNth0x5dBlock(ii);
         int          num0x60s = CountOf0x60sBelowThisIndex(idx);
         int          byte8    = 0xf7 - 9 * num0x60s;
         x5d.SetByte(7, (byte)byte8);
         x5d.Invalidate();
     }
 }