Project

General

Profile

« Previous | Next » 

Revision abf36986

Added by Leszek Koltunski over 2 years ago

Add Mirror Cube 2x2 and 3x3.

View differences:

src/main/java/org/distorted/objects/TwistyKilominx.java
617 617

  
618 618
    part /=2;
619 619

  
620
    return (part==0 || cubitface==((part+1)%2)) ? mEdgeMap[variant][cubitface+2] + ((part+3)/2)*NUM_FACES : NUM_TEXTURES;
620
    return (part==0 || cubitface==((part+1)%2)) ? mEdgeMap[variant][cubitface+2] + ((part+3)/2)*NUM_FACE_COLORS : NUM_TEXTURES;
621 621
    }
622 622

  
623 623
///////////////////////////////////////////////////////////////////////////////////////////////////
......
632 632
      return cubitface>=0 && cubitface<3 ? mCornerFaceMap[center][cubitface] : NUM_TEXTURES;
633 633
      }
634 634

  
635
    return cubitface==mCenterFaceMap[center] ? center/5 + NUM_FACES*(numLayers-1)/2 : NUM_TEXTURES;
635
    return cubitface==mCenterFaceMap[center] ? center/5 + NUM_FACE_COLORS*(numLayers-1)/2 : NUM_TEXTURES;
636 636
    }
637 637

  
638 638
///////////////////////////////////////////////////////////////////////////////////////////////////
......
712 712

  
713 713
  private int getStickerIndex(int face)
714 714
    {
715
    int variant = face/NUM_FACES;
715
    int variant = face/NUM_FACE_COLORS;
716 716
    int numLayers = getNumLayers();
717 717

  
718 718
    if( variant == (numLayers-1)/2 || numLayers==3 ) return 0;

Also available in: Unified diff