Project

General

Profile

« Previous | Next » 

Revision e17d01c2

Added by Leszek Koltunski 12 months ago

Fix the 'layer bitmaps in algorithms' feature.

View differences:

src/main/java/org/distorted/objectlib/scrambling/ScrambleState.java
43 43

  
44 44
  private int getScrambleValue(int[] alg, int[][] scrambleTable)
45 45
    {
46
    int l=0, layerBmp = alg[1];
46
    int layerBmp = alg[1];
47
    int[] table = scrambleTable[alg[0]];
47 48

  
48
    for(; l<32; l++)
49
    for(int i : table)
49 50
      {
50
      if( (layerBmp&0x1) !=0 ) break;
51
      if( (layerBmp&0x1) != 0) return i;
51 52
      layerBmp /= 2;
52 53
      }
53 54

  
54
    return scrambleTable[alg[0]][l];
55
    return 0;
55 56
    }
56 57

  
57 58
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff