Revision 50e6c5d6
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/bandaged/BandagedCreatorRenderer.java | ||
---|---|---|
415 | 415 |
} |
416 | 416 |
|
417 | 417 |
InitData data = new InitData(mObjSize,pos); |
418 |
TwistyObject obj = new TwistyBandagedCuboid( data, TwistyObject.MESH_NICE, TwistyObject.MODE_NORM,
|
|
419 |
new Static4D(0,0,0,1), new Static3D(0,0,0), 1.0f, null ); |
|
418 |
TwistyObject obj = new TwistyBandagedCuboid( TwistyObject.MESH_NICE, TwistyObject.MODE_NORM, |
|
419 |
new Static4D(0,0,0,1), new Static3D(0,0,0), 1.0f, data, null );
|
|
420 | 420 |
String name = obj.getShortName(); |
421 | 421 |
BandagedCreatorActivity act = (BandagedCreatorActivity) mView.getContext(); |
422 | 422 |
|
... | ... | |
511 | 511 |
final int FBO_HEIGHT = (int)(R*1280); |
512 | 512 |
final float OBJECT_SIZE = R*0.35f; |
513 | 513 |
|
514 |
TwistyObject obj = new TwistyBandagedCuboid( data, TwistyObject.MESH_NICE, TwistyObject.MODE_ICON,
|
|
515 |
ShapeHexahedron.DEFAULT_ROT, new Static3D(0,0,0), OBJECT_SIZE, null ); |
|
514 |
TwistyObject obj = new TwistyBandagedCuboid( TwistyObject.MESH_NICE, TwistyObject.MODE_ICON, |
|
515 |
ShapeHexahedron.DEFAULT_ROT, new Static3D(0,0,0), OBJECT_SIZE, data, null );
|
|
516 | 516 |
|
517 | 517 |
DistortedEffects effects = obj.getObjectEffects(); |
518 | 518 |
DistortedNode node = obj.getNode(); |
src/main/java/org/distorted/bandaged/BandagedPlayActivity.java | ||
---|---|---|
26 | 26 |
import org.distorted.external.RubikFiles; |
27 | 27 |
import org.distorted.library.main.DistortedLibrary; |
28 | 28 |
import org.distorted.main.R; |
29 |
import org.distorted.objectlib.main.InitAssets; |
|
29 | 30 |
import org.distorted.objectlib.main.ObjectControl; |
30 | 31 |
import org.distorted.objectlib.main.TwistyObject; |
31 | 32 |
|
... | ... | |
242 | 243 |
InputStream jsonStream = files.openFile(this,name+"_object.json"); |
243 | 244 |
InputStream meshStream = null; |
244 | 245 |
int ordinal = 0; // if jsonStream!=null, this doesn't matter |
246 |
InitAssets asset = new InitAssets(jsonStream,meshStream); |
|
245 | 247 |
|
246 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,jsonStream,meshStream);
|
|
248 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,asset);
|
|
247 | 249 |
} |
248 | 250 |
|
249 | 251 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/config/ConfigActivity.java | ||
---|---|---|
21 | 21 |
import androidx.appcompat.app.AppCompatActivity; |
22 | 22 |
|
23 | 23 |
import org.distorted.library.main.DistortedLibrary; |
24 |
import org.distorted.objectlib.main.InitAssets; |
|
24 | 25 |
import org.distorted.objectlib.main.ObjectControl; |
25 | 26 |
import org.distorted.main.R; |
26 | 27 |
import org.distorted.dialogs.RubikDialogError; |
... | ... | |
194 | 195 |
InputStream jsonStream = object.getObjectStream(this); |
195 | 196 |
InputStream meshStream = object.getMeshStream(this); |
196 | 197 |
String name = object.getUpperName(); |
197 |
|
|
198 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,jsonStream,meshStream);
|
|
198 |
InitAssets asset = new InitAssets(jsonStream,meshStream); |
|
199 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,asset);
|
|
199 | 200 |
} |
200 | 201 |
} |
201 | 202 |
|
... | ... | |
225 | 226 |
int iconMode = TwistyObject.MODE_NORM; |
226 | 227 |
InputStream jsonStream = object.getObjectStream(this); |
227 | 228 |
InputStream meshStream = object.getMeshStream(this); |
229 |
InitAssets asset = new InitAssets(jsonStream,meshStream); |
|
228 | 230 |
|
229 |
control.changeObject(ordinal,meshState,iconMode,jsonStream,meshStream);
|
|
231 |
control.changeObject(ordinal,meshState,iconMode,asset);
|
|
230 | 232 |
} |
231 | 233 |
} |
232 | 234 |
|
src/main/java/org/distorted/main/RubikActivity.java | ||
---|---|---|
40 | 40 |
|
41 | 41 |
import org.distorted.library.main.DistortedScreen; |
42 | 42 |
import org.distorted.messaging.RubikInAppMessanging; |
43 |
import org.distorted.objectlib.main.InitAssets; |
|
43 | 44 |
import org.distorted.objectlib.main.ObjectControl; |
44 | 45 |
import org.distorted.objectlib.main.TwistyObject; |
45 | 46 |
import org.distorted.objectlib.effects.BaseEffect; |
... | ... | |
612 | 613 |
InputStream jsonStream = object==null ? null : object.getObjectStream(this); |
613 | 614 |
InputStream meshStream = object==null ? null : object.getMeshStream(this); |
614 | 615 |
String name = object==null ? "NULL" : object.getUpperName(); |
616 |
InitAssets asset = new InitAssets(jsonStream,meshStream); |
|
615 | 617 |
|
616 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,jsonStream,meshStream);
|
|
618 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,asset);
|
|
617 | 619 |
} |
618 | 620 |
|
619 | 621 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
734 | 736 |
int iconMode = TwistyObject.MODE_NORM; |
735 | 737 |
InputStream jsonStream = object.getObjectStream(this); |
736 | 738 |
InputStream meshStream = object.getMeshStream(this); |
739 |
InitAssets asset = new InitAssets(jsonStream,meshStream); |
|
737 | 740 |
ObjectControl control = getControl(); |
738 |
control.changeObject(-1,meshState,iconMode,jsonStream,meshStream);
|
|
741 |
control.changeObject(-1,meshState,iconMode,asset);
|
|
739 | 742 |
} |
740 | 743 |
} |
741 | 744 |
} |
src/main/java/org/distorted/purchase/PurchaseActivity.java | ||
---|---|---|
24 | 24 |
import org.distorted.external.RubikScores; |
25 | 25 |
import org.distorted.library.main.DistortedLibrary; |
26 | 26 |
import org.distorted.main.R; |
27 |
import org.distorted.objectlib.main.InitAssets; |
|
27 | 28 |
import org.distorted.objectlib.main.ObjectControl; |
28 | 29 |
import org.distorted.objectlib.main.TwistyObject; |
29 | 30 |
import org.distorted.objects.RubikObject; |
... | ... | |
232 | 233 |
InputStream jsonStream = object.getObjectStream(this); |
233 | 234 |
InputStream meshStream = object.getMeshStream(this); |
234 | 235 |
String name = object.getUpperName(); |
235 |
|
|
236 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,jsonStream,meshStream);
|
|
236 |
InitAssets asset = new InitAssets(jsonStream,meshStream); |
|
237 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,asset);
|
|
237 | 238 |
} |
238 | 239 |
} |
239 | 240 |
|
src/main/java/org/distorted/tutorials/TutorialActivity.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
import org.distorted.library.main.DistortedLibrary; |
27 | 27 |
|
28 |
import org.distorted.objectlib.main.InitAssets; |
|
28 | 29 |
import org.distorted.objectlib.main.ObjectControl; |
29 | 30 |
import org.distorted.objectlib.main.TwistyObject; |
30 | 31 |
|
... | ... | |
225 | 226 |
InputStream jsonStream = object==null ? null : object.getObjectStream(this); |
226 | 227 |
InputStream meshStream = object==null ? null : object.getMeshStream(this); |
227 | 228 |
String name = object==null ? "NULL" : object.getUpperName(); |
228 |
|
|
229 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,jsonStream,meshStream);
|
|
229 |
InitAssets asset = new InitAssets(jsonStream,meshStream); |
|
230 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,asset);
|
|
230 | 231 |
} |
231 | 232 |
|
232 | 233 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Introduce InitAssets. We'll use this later to pass on references to the tablebase file to the TwistyObject (so that it can use this for perfect scrambling)