Revision bdbbb4c5
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyHelicopter.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.objects; |
21 | 21 |
|
22 |
import static org.distorted.objects.Movement.TYPE_SPLIT_EDGE;
|
|
22 |
import static org.distorted.objectlb.Movement.TYPE_SPLIT_EDGE;
|
|
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 |
|
... | ... | |
71 | 75 |
|
72 | 76 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
73 | 77 |
|
74 |
TwistyHelicopter(int size, Static4D quat, DistortedTexture texture,
|
|
75 |
MeshSquare mesh, DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
|
|
78 |
public TwistyHelicopter(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
79 |
DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
|
|
76 | 80 |
{ |
77 | 81 |
super(size, size, quat, texture, mesh, effects, moves, ObjectList.HELI, res, scrWidth); |
78 | 82 |
} |
79 | 83 |
|
80 | 84 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
81 | 85 |
|
82 |
ScrambleState[] getScrambleStates() |
|
86 |
protected ScrambleState[] getScrambleStates()
|
|
83 | 87 |
{ |
84 | 88 |
if( mStates==null ) |
85 | 89 |
{ |
... | ... | |
141 | 145 |
|
142 | 146 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
143 | 147 |
|
144 |
int[] getSolvedQuats(int cubit, int numLayers) |
|
148 |
protected int[] getSolvedQuats(int cubit, int numLayers)
|
|
145 | 149 |
{ |
146 | 150 |
if( mQuats==null ) initializeQuats(); |
147 | 151 |
int status = retCubitSolvedStatus(cubit,numLayers); |
... | ... | |
150 | 154 |
|
151 | 155 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
152 | 156 |
|
153 |
Static4D[] getQuats() |
|
157 |
protected Static4D[] getQuats()
|
|
154 | 158 |
{ |
155 | 159 |
if( mQuats==null ) initializeQuats(); |
156 | 160 |
return mQuats; |
... | ... | |
158 | 162 |
|
159 | 163 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
160 | 164 |
|
161 |
int getSolvedFunctionIndex() |
|
165 |
protected int getSolvedFunctionIndex()
|
|
162 | 166 |
{ |
163 | 167 |
return 0; |
164 | 168 |
} |
165 | 169 |
|
166 | 170 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
167 | 171 |
|
168 |
int getNumStickerTypes(int numLayers) |
|
172 |
protected int getNumStickerTypes(int numLayers)
|
|
169 | 173 |
{ |
170 | 174 |
return 1; |
171 | 175 |
} |
172 | 176 |
|
173 | 177 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
174 | 178 |
|
175 |
float[][] getCuts(int size) |
|
179 |
protected float[][] getCuts(int size)
|
|
176 | 180 |
{ |
177 | 181 |
if( mCuts==null ) |
178 | 182 |
{ |
... | ... | |
198 | 202 |
|
199 | 203 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
200 | 204 |
|
201 |
int getNumCubitFaces() |
|
205 |
protected int getNumCubitFaces()
|
|
202 | 206 |
{ |
203 | 207 |
return 4; |
204 | 208 |
} |
205 | 209 |
|
206 | 210 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
207 | 211 |
|
208 |
float[][] getCubitPositions(int size) |
|
212 |
protected float[][] getCubitPositions(int size)
|
|
209 | 213 |
{ |
210 | 214 |
if( mCenters==null ) |
211 | 215 |
{ |
... | ... | |
261 | 265 |
|
262 | 266 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
263 | 267 |
|
264 |
ObjectShape getObjectShape(int cubit, int numLayers) |
|
268 |
protected ObjectShape getObjectShape(int cubit, int numLayers)
|
|
265 | 269 |
{ |
266 | 270 |
int variant = getCubitVariant(cubit,numLayers); |
267 | 271 |
|
... | ... | |
324 | 328 |
|
325 | 329 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
326 | 330 |
|
327 |
Static4D getQuat(int cubit, int numLayers) |
|
331 |
protected Static4D getQuat(int cubit, int numLayers)
|
|
328 | 332 |
{ |
329 | 333 |
if( mQuats==null ) initializeQuats(); |
330 | 334 |
if( mQuatIndices==null ) mQuatIndices = new int[] { 0,13,14,1,12,2,3,7,20,6,13,17,7,23,18,12,22,10,8,16,11,21,19,9,3,15,14,0,5,2,1,4 }; |
... | ... | |
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 |
{ |
... | ... | |
399 | 403 |
|
400 | 404 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
401 | 405 |
|
402 |
ObjectSticker retSticker(int face) |
|
406 |
protected ObjectSticker retSticker(int face)
|
|
403 | 407 |
{ |
404 | 408 |
if( mStickers==null ) |
405 | 409 |
{ |
Also available in: Unified diff
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.