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/TwistySquare1.java
21 21

  
22 22
import android.content.res.Resources;
23 23

  
24
import org.distorted.helpers.ObjectShape;
25
import org.distorted.helpers.ObjectSticker;
26
import org.distorted.helpers.ScrambleState;
24
import org.distorted.objectlb.ObjectShape;
25
import org.distorted.objectlb.ObjectSticker;
26
import org.distorted.objectlb.ScrambleState;
27 27
import org.distorted.library.main.DistortedEffects;
28 28
import org.distorted.library.main.DistortedTexture;
29 29
import org.distorted.library.mesh.MeshSquare;
30 30
import org.distorted.library.type.Static4D;
31 31
import org.distorted.main.R;
32
import org.distorted.objectlb.Movement6;
33
import org.distorted.objectlb.ObjectList;
32 34

  
33 35
///////////////////////////////////////////////////////////////////////////////////////////////////
34 36

  
35
class TwistySquare1 extends TwistySquare
37
public class TwistySquare1 extends TwistySquare
36 38
{
37 39
  private static final int NUM_STICKERS = 6;
38 40

  
......
44 46

  
45 47
///////////////////////////////////////////////////////////////////////////////////////////////////
46 48

  
47
  TwistySquare1(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
48
                DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
49
  public TwistySquare1(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
50
                       DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
49 51
    {
50 52
    super(size, quat, texture, mesh, effects, moves, ObjectList.SQU1, res, scrWidth);
51 53
    }
52 54

  
53 55
///////////////////////////////////////////////////////////////////////////////////////////////////
54 56

  
55
  ScrambleState[] getScrambleStates()
57
  protected ScrambleState[] getScrambleStates()
56 58
    {
57 59
    return null;
58 60
    }
......
66 68

  
67 69
///////////////////////////////////////////////////////////////////////////////////////////////////
68 70

  
69
  int[] getSolvedQuats(int cubit, int numLayers)
71
  protected int[] getSolvedQuats(int cubit, int numLayers)
70 72
    {
71 73
    if( mQuats==null ) initializeQuats();
72 74
    int status = retCubitSolvedStatus(cubit,numLayers);
......
75 77

  
76 78
///////////////////////////////////////////////////////////////////////////////////////////////////
77 79

  
78
  ObjectShape getObjectShape(int cubit, int numLayers)
80
  protected ObjectShape getObjectShape(int cubit, int numLayers)
79 81
    {
80 82
    int variant = getCubitVariant(cubit,numLayers);
81 83

  
......
178 180

  
179 181
///////////////////////////////////////////////////////////////////////////////////////////////////
180 182

  
181
  Static4D getQuat(int cubit, int numLayers)
183
  protected Static4D getQuat(int cubit, int numLayers)
182 184
    {
183 185
    if( mQuats==null ) initializeQuats();
184 186
    if( mQuatNumber ==null )
......
196 198

  
197 199
///////////////////////////////////////////////////////////////////////////////////////////////////
198 200

  
199
  int getNumCubitVariants(int numLayers)
201
  protected int getNumCubitVariants(int numLayers)
200 202
    {
201 203
    return 3;
202 204
    }
203 205

  
204 206
///////////////////////////////////////////////////////////////////////////////////////////////////
205 207

  
206
  int getCubitVariant(int cubit, int numLayers)
208
  protected int getCubitVariant(int cubit, int numLayers)
207 209
    {
208 210
    return cubit<2 ? 0 : (cubit<10 ? 1:2);
209 211
    }
210 212

  
211 213
///////////////////////////////////////////////////////////////////////////////////////////////////
212 214

  
213
  ObjectSticker retSticker(int face)
215
  protected ObjectSticker retSticker(int face)
214 216
    {
215 217
    if( mStickers==null )
216 218
      {
......
246 248

  
247 249
///////////////////////////////////////////////////////////////////////////////////////////////////
248 250

  
249
  float[][] getCubitPositions(int numLayers)
251
  protected float[][] getCubitPositions(int numLayers)
250 252
    {
251 253
    if( mCenters==null )
252 254
      {
......
279 281

  
280 282
///////////////////////////////////////////////////////////////////////////////////////////////////
281 283

  
282
  int getSolvedFunctionIndex()
284
  protected int getSolvedFunctionIndex()
283 285
    {
284 286
    return 0;
285 287
    }
286 288

  
287 289
///////////////////////////////////////////////////////////////////////////////////////////////////
288 290

  
289
  int getNumStickerTypes(int numLayers)
291
  protected int getNumStickerTypes(int numLayers)
290 292
    {
291 293
    return NUM_STICKERS;
292 294
    }
293 295

  
294 296
///////////////////////////////////////////////////////////////////////////////////////////////////
295 297

  
296
  int getFaceColor(int cubit, int cubitface, int numLayers)
298
  protected int getFaceColor(int cubit, int cubitface, int numLayers)
297 299
    {
298 300
    if( mStickerColor==null )
299 301
      {

Also available in: Unified diff