Revision da57afae
Added by Leszek Koltunski about 1 year ago
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.helpers.OperatingSystemInterface; |
|
43 | 44 |
import org.distorted.objectlib.main.InitAssets; |
44 | 45 |
import org.distorted.objectlib.main.ObjectControl; |
45 | 46 |
import org.distorted.objectlib.main.TwistyObject; |
... | ... | |
51 | 52 |
import org.distorted.external.RubikNetwork; |
52 | 53 |
import org.distorted.objects.RubikObject; |
53 | 54 |
import org.distorted.objects.RubikObjectList; |
55 |
import org.distorted.os.OSInterface; |
|
54 | 56 |
import org.distorted.purchase.PurchaseActivity; |
55 | 57 |
import org.distorted.screens.RubikScreenSolving; |
56 | 58 |
import org.distorted.screens.ScreenList; |
... | ... | |
613 | 615 |
InputStream jsonStream = object==null ? null : object.getObjectStream(this); |
614 | 616 |
InputStream meshStream = object==null ? null : object.getMeshStream(this); |
615 | 617 |
String name = object==null ? "NULL" : object.getUpperName(); |
616 |
InitAssets asset = new InitAssets(jsonStream,meshStream,getResources()); |
|
618 |
RubikSurfaceView view = findViewById(R.id.rubikSurfaceView); |
|
619 |
OSInterface os = view.getInterface(); |
|
620 |
InitAssets asset = new InitAssets(jsonStream,meshStream,os); |
|
617 | 621 |
|
618 | 622 |
control.changeIfDifferent(ordinal,name,meshState,iconMode,asset); |
619 | 623 |
} |
... | ... | |
736 | 740 |
int iconMode = TwistyObject.MODE_NORM; |
737 | 741 |
InputStream jsonStream = object.getObjectStream(this); |
738 | 742 |
InputStream meshStream = object.getMeshStream(this); |
739 |
InitAssets asset = new InitAssets(jsonStream,meshStream,getResources()); |
|
740 |
ObjectControl control = getControl(); |
|
743 |
RubikSurfaceView view = findViewById(R.id.rubikSurfaceView); |
|
744 |
OSInterface os = view.getInterface(); |
|
745 |
InitAssets asset = new InitAssets(jsonStream,meshStream,os); |
|
746 |
ObjectControl control = getControl(); |
|
741 | 747 |
control.changeObject(-1,meshState,iconMode,asset); |
742 | 748 |
} |
743 | 749 |
} |
... | ... | |
757 | 763 |
return mSolverIndex; |
758 | 764 |
} |
759 | 765 |
|
766 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
767 |
|
|
768 |
public OperatingSystemInterface getInterface() |
|
769 |
{ |
|
770 |
RubikSurfaceView view = findViewById(R.id.rubikSurfaceView); |
|
771 |
return view.getInterface(); |
|
772 |
} |
|
760 | 773 |
} |
Also available in: Unified diff
Move opening local files to the OSInterface