Project

General

Profile

« Previous | Next » 

Revision bdbbb4c5

Added by Leszek Koltunski over 2 years ago

Refactoring: split the 'objects' package into two, 'objects' and 'objectlib'.
The point: we're going to need to move the 'objectlib' stuff into its own library module, and that's because we're going to create a new app module which needs access to it.

View differences:

src/main/java/org/distorted/objects/TwistyRedi.java
19 19

  
20 20
package org.distorted.objects;
21 21

  
22
import static org.distorted.objects.Movement.TYPE_SPLIT_CORNER;
22
import static org.distorted.objectlb.Movement.TYPE_SPLIT_CORNER;
23 23

  
24 24
import android.content.res.Resources;
25 25

  
26
import org.distorted.helpers.ObjectShape;
27
import org.distorted.helpers.ObjectSticker;
28
import org.distorted.helpers.ScrambleState;
26
import org.distorted.objectlb.ObjectShape;
27
import org.distorted.objectlb.ObjectSticker;
28
import org.distorted.objectlb.ScrambleState;
29 29
import org.distorted.library.main.DistortedEffects;
30 30
import org.distorted.library.main.DistortedTexture;
31 31
import org.distorted.library.mesh.MeshSquare;
32 32
import org.distorted.library.type.Static3D;
33 33
import org.distorted.library.type.Static4D;
34 34
import org.distorted.main.R;
35
import org.distorted.objectlb.Movement;
36
import org.distorted.objectlb.Movement6;
37
import org.distorted.objectlb.ObjectList;
38
import org.distorted.objectlb.Twisty6;
35 39

  
36 40
///////////////////////////////////////////////////////////////////////////////////////////////////
37 41

  
......
67 71

  
68 72
///////////////////////////////////////////////////////////////////////////////////////////////////
69 73

  
70
  TwistyRedi(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
71
             DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
74
  public TwistyRedi(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
75
                    DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
72 76
    {
73 77
    super(size, size, quat, texture, mesh, effects, moves, ObjectList.REDI, res, scrWidth);
74 78
    }
75 79

  
76 80
///////////////////////////////////////////////////////////////////////////////////////////////////
77 81

  
78
  ScrambleState[] getScrambleStates()
82
  protected ScrambleState[] getScrambleStates()
79 83
    {
80 84
    if( mStates==null )
81 85
      {
......
120 124

  
121 125
///////////////////////////////////////////////////////////////////////////////////////////////////
122 126

  
123
  int[] getSolvedQuats(int cubit, int numLayers)
127
  protected int[] getSolvedQuats(int cubit, int numLayers)
124 128
    {
125 129
    if( mQuats==null ) initializeQuats();
126 130
    int status = retCubitSolvedStatus(cubit,numLayers);
......
129 133

  
130 134
///////////////////////////////////////////////////////////////////////////////////////////////////
131 135

  
132
  Static4D[] getQuats()
136
  protected Static4D[] getQuats()
133 137
    {
134 138
    if( mQuats==null ) initializeQuats();
135 139
    return mQuats;
......
137 141

  
138 142
///////////////////////////////////////////////////////////////////////////////////////////////////
139 143

  
140
  int getSolvedFunctionIndex()
144
  protected int getSolvedFunctionIndex()
141 145
    {
142 146
    return 0;
143 147
    }
144 148

  
145 149
///////////////////////////////////////////////////////////////////////////////////////////////////
146 150

  
147
  int getNumStickerTypes(int numLayers)
151
  protected int getNumStickerTypes(int numLayers)
148 152
    {
149 153
    return 2;
150 154
    }
151 155

  
152 156
///////////////////////////////////////////////////////////////////////////////////////////////////
153 157

  
154
  float[][] getCuts(int size)
158
  protected float[][] getCuts(int size)
155 159
    {
156 160
    if( mCuts==null )
157 161
      {
......
178 182

  
179 183
///////////////////////////////////////////////////////////////////////////////////////////////////
180 184

  
181
  int getNumCubitFaces()
185
  protected int getNumCubitFaces()
182 186
    {
183 187
    return 9;
184 188
    }
185 189

  
186 190
///////////////////////////////////////////////////////////////////////////////////////////////////
187 191

  
188
  float[][] getCubitPositions(int size)
192
  protected float[][] getCubitPositions(int size)
189 193
    {
190 194
    if( mCenters==null )
191 195
      {
......
223 227

  
224 228
///////////////////////////////////////////////////////////////////////////////////////////////////
225 229

  
226
  ObjectShape getObjectShape(int cubit, int numLayers)
230
  protected ObjectShape getObjectShape(int cubit, int numLayers)
227 231
    {
228 232
    int variant = getCubitVariant(cubit,numLayers);
229 233

  
......
299 303

  
300 304
///////////////////////////////////////////////////////////////////////////////////////////////////
301 305

  
302
  Static4D getQuat(int cubit, int numLayers)
306
  protected Static4D getQuat(int cubit, int numLayers)
303 307
    {
304 308
    if( mQuats==null ) initializeQuats();
305 309

  
......
333 337

  
334 338
///////////////////////////////////////////////////////////////////////////////////////////////////
335 339

  
336
  int getNumCubitVariants(int numLayers)
340
  protected int getNumCubitVariants(int numLayers)
337 341
    {
338 342
    return 2;
339 343
    }
340 344

  
341 345
///////////////////////////////////////////////////////////////////////////////////////////////////
342 346

  
343
  int getCubitVariant(int cubit, int numLayers)
347
  protected int getCubitVariant(int cubit, int numLayers)
344 348
    {
345 349
    return cubit<8 ? 0:1;
346 350
    }
347 351

  
348 352
///////////////////////////////////////////////////////////////////////////////////////////////////
349 353

  
350
  int getFaceColor(int cubit, int cubitface, int size)
354
  protected int getFaceColor(int cubit, int cubitface, int size)
351 355
    {
352 356
    if( mFaceMap==null )
353 357
      {
......
385 389

  
386 390
///////////////////////////////////////////////////////////////////////////////////////////////////
387 391

  
388
  ObjectSticker retSticker(int face)
392
  protected ObjectSticker retSticker(int face)
389 393
    {
390 394
    if( mStickers==null )
391 395
      {

Also available in: Unified diff