anchor.diff:      // todo next top?
   
       // child list
  -    ChildList := Pointer(NativeUInt(CHILD_ARRAYS_OFFSETS[NodeInfo and 127]));
  +    ChildList := Pointer(NativeUInt(CHILD_ARRAYS_OFFSETS[NodeInfo and 63]));
       Inc(NativeUInt(ChildList), NativeUInt(@CHILD_ARRAYS));
   
       // reinitialize NodeInfo (from parentflags, mask, parentmask, tile):
  
positive.code:   LookupLine(Format(FmtStr, Args));
  end;
  
  procedure GenerateLookups;
  begin
    LookupsText := TStringList.Create;
    try
      LookupsText.Add('const');
  
  
      LookupsText.SaveToFile('Lookup.txt');
  
negative.code:     {7 --> 3} (y:  0; x: +1)
    );
  
    CHILD_ARRAYS: array[0..11{4 diagonal + 4 clockwise optional}] of TChildArray = (
     ($0100, $8070, $0210, $4060, $0420, $2050, $0830, $1040),
     ($0210, $0100, $0420, $8070, $0830, $4060, $1040, $2050),
     ($0210, $0420, $0100, $0830, $8070, $1040, $4060, $2050),
     ($0420, $0830, $0210, $1040, $0100, $2050, $8070, $4060),
     ($0830, $0420, $1040, $0210, $2050, $0100, $4060, $8070),
     ($0830, $1040, $0420, $2050, $0210, $4060, $0100, $8070),
     ($1040, $2050, $0830, $4060, $0420, $8070, $0210, $0100),
     ($2050, $1040, $4060, $0830, $8070, $0420, $0100, $0210),
     ($2050, $4060, $1040, $8070, $0830, $0100, $0420, $0210),
     ($4060, $2050, $8070, $1040, $0100, $0830, $0210, $0420),
     ($8070, $4060, $0100, $2050, $0210, $1040, $0420, $0830),
     ($8070, $0100, $4060, $0210, $2050, $0420, $1040, $0830)
    );
  
    CHILD_ARRAYS_OFFSETS: array[0..63{parent:3,way:3}] of Byte = (
     $B0, $B0, $B0, $A0, $A0, $A0, $A0, $A0,
     $40, $40, $40, $40, $50, $50, $50, $40,
     $10, $10, $20, $20, $20, $10, $10, $10,
     $00, $00, $00, $00, $00, $00, $00, $00,
     $30, $30, $30, $30, $30, $30, $30, $30,
     $60, $60, $60, $60, $60, $60, $60, $60,
     $90, $90, $90, $90, $90, $90, $90, $90,
     $60, $60, $60, $60, $60, $60, $60, $60
    );
  
    PARENT_BITS: array[0..31{oddy:1;hexagonal:1;child:3}] of NativeUInt = (
     $00C70004, $00C70004, $00C70004, $00000004,
     $00070005, $00070005, $004F0005, $00970005,
     $001F0006, $001F0006, $00000006, $001F0006,
     $001C0007, $001C0007, $003E0007, $005D0007,
     $007C0000, $007C0000, $00000000, $007C0000,
     $00700001, $00700001, $00790001, $00F40001,
     $00F10002, $00F10002, $00F10002, $00000002,
     $00C10003, $00C10003, $00D50003, $00E30003
    );
  
  
  