account ui & some fix & skin lib
This commit is contained in:
parent
e068805f0d
commit
d925a8adfb
|
@ -56,6 +56,7 @@
|
|||
tools:targetApi="32">
|
||||
<activity
|
||||
android:name=".activity.SplashActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|keyboard|navigation"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
|
@ -66,12 +67,15 @@
|
|||
</activity>
|
||||
<activity
|
||||
android:name=".activity.MainActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|keyboard|navigation"
|
||||
android:screenOrientation="sensorLandscape"/>
|
||||
<activity
|
||||
android:name="com.tungsten.fcllibrary.browser.FileBrowserActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|keyboard|navigation"
|
||||
android:screenOrientation="sensorLandscape"/>
|
||||
<activity
|
||||
android:name="com.tungsten.fcllibrary.crash.CrashReportActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|keyboard|navigation"
|
||||
android:screenOrientation="sensorLandscape"/>
|
||||
<service
|
||||
android:name="com.tungsten.fclcore.download.ProcessService"
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.tungsten.fclcore.util.Logging;
|
|||
import com.tungsten.fcllibrary.component.FCLActivity;
|
||||
import com.tungsten.fcllibrary.component.theme.ThemeEngine;
|
||||
import com.tungsten.fcllibrary.component.view.FCLDynamicIsland;
|
||||
import com.tungsten.fcllibrary.component.view.FCLTabLayout;
|
||||
import com.tungsten.fcllibrary.component.view.FCLUILayout;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -26,7 +27,7 @@ public class MainActivity extends FCLActivity implements TabLayout.OnTabSelected
|
|||
private UIManager uiManager;
|
||||
public FCLUILayout uiLayout;
|
||||
|
||||
private TabLayout tabLayout;
|
||||
private FCLTabLayout tabLayout;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -39,6 +40,7 @@ public class MainActivity extends FCLActivity implements TabLayout.OnTabSelected
|
|||
titleView = findViewById(R.id.title);
|
||||
|
||||
uiLayout = findViewById(R.id.ui_layout);
|
||||
uiLayout.post(() -> {
|
||||
uiManager = new UIManager(this, uiLayout);
|
||||
uiManager.init();
|
||||
|
||||
|
@ -48,6 +50,7 @@ public class MainActivity extends FCLActivity implements TabLayout.OnTabSelected
|
|||
ThemeEngine.getInstance().registerEvent(tabLayout, () -> {
|
||||
tabLayout.setBackgroundColor(ThemeEngine.getInstance().getTheme().getColor());
|
||||
});
|
||||
});
|
||||
|
||||
try {
|
||||
ConfigHolder.init();
|
||||
|
@ -112,4 +115,20 @@ public class MainActivity extends FCLActivity implements TabLayout.OnTabSelected
|
|||
tabLayout.selectTab(tabLayout.getTabAt(3));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
if (uiManager != null) {
|
||||
uiManager.onPause();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (uiManager != null) {
|
||||
uiManager.onResume();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -124,4 +124,16 @@ public class UIManager {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onPause() {
|
||||
for (FCLBaseUI baseUI : allUIs) {
|
||||
baseUI.onPause();
|
||||
}
|
||||
}
|
||||
|
||||
public void onResume() {
|
||||
for (FCLBaseUI baseUI : allUIs) {
|
||||
baseUI.onResume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/ui_bg_color"
|
||||
android:padding="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.tungsten.fcllibrary.skin.SkinGLSurfaceView
|
||||
android:id="@+id/skin_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="200dp"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintVertical_bias="0.5"
|
||||
app:layout_constraintWidth_percent="0.3"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -48,10 +48,10 @@ public class DynamicIslandAnim {
|
|||
if (shrinkAdjustAnimatorY != null && shrinkAdjustAnimatorY.isRunning()) {
|
||||
shrinkAdjustAnimatorY.cancel();
|
||||
}
|
||||
expandScaleAnimatorX = ObjectAnimator.ofFloat(view, "scaleX", scale, 0.95f).setDuration(300);
|
||||
shrinkScaleAnimatorX = ObjectAnimator.ofFloat(view, "scaleX", 0.95f, scale).setDuration(300);
|
||||
expandScaleAnimatorY = ObjectAnimator.ofFloat(view, "scaleY", 0.95f, 0.95f).setDuration(300);
|
||||
shrinkScaleAnimatorY = ObjectAnimator.ofFloat(view, "scaleY", 0.95f, 0.95f).setDuration(300);
|
||||
expandScaleAnimatorX = ObjectAnimator.ofFloat(view, "scaleX", scale / 2f, 0.95f).setDuration(300);
|
||||
shrinkScaleAnimatorX = ObjectAnimator.ofFloat(view, "scaleX", 0.95f, scale / 2f).setDuration(300);
|
||||
expandScaleAnimatorY = ObjectAnimator.ofFloat(view, "scaleY", 0.5f, 0.95f).setDuration(300);
|
||||
shrinkScaleAnimatorY = ObjectAnimator.ofFloat(view, "scaleY", 0.95f, 0.5f).setDuration(300);
|
||||
expandAdjustAnimatorX = ObjectAnimator.ofFloat(view, "scaleX", 0.95f, 1f).setDuration(200);
|
||||
shrinkAdjustAnimatorX = ObjectAnimator.ofFloat(view, "scaleX", 1f, 0.95f).setDuration(200);
|
||||
expandAdjustAnimatorY = ObjectAnimator.ofFloat(view, "scaleY", 0.95f, 1f).setDuration(200);
|
||||
|
|
|
@ -26,7 +26,7 @@ public class FCLTabLayout extends TabLayout {
|
|||
ThemeEngine.getInstance().getTheme().getDkColor(),
|
||||
Color.GRAY
|
||||
};
|
||||
setSelectedTabIndicatorColor(ThemeEngine.getInstance().getTheme().getColor());
|
||||
setSelectedTabIndicatorColor(ThemeEngine.getInstance().getTheme().getDkColor());
|
||||
setTabTextColors(new ColorStateList(state, color));
|
||||
setTabIconTint(new ColorStateList(state, color));
|
||||
};
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package com.tungsten.fcllibrary.skin;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
|
||||
public class BufferUtils {
|
||||
public static float d2r(final float n) {
|
||||
return 3.1415927f * n / 180.0f;
|
||||
}
|
||||
|
||||
static FloatBuffer toFloatBuffer(final float[] array) {
|
||||
final ByteBuffer allocateDirect = ByteBuffer.allocateDirect(array.length * 4);
|
||||
allocateDirect.order(ByteOrder.nativeOrder());
|
||||
final FloatBuffer floatBuffer = allocateDirect.asFloatBuffer();
|
||||
floatBuffer.put(array);
|
||||
floatBuffer.position(0);
|
||||
return floatBuffer;
|
||||
}
|
||||
|
||||
static ShortBuffer toShortBuffer(final short[] array) {
|
||||
final ByteBuffer allocateDirect = ByteBuffer.allocateDirect(array.length * 2);
|
||||
allocateDirect.order(ByteOrder.nativeOrder());
|
||||
final ShortBuffer shortBuffer = allocateDirect.asShortBuffer();
|
||||
shortBuffer.put(array);
|
||||
shortBuffer.position(0);
|
||||
return shortBuffer;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,472 @@
|
|||
package com.tungsten.fcllibrary.skin;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.BodyPart;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.Body;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.BodyOverlay;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.Hat;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.Head;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.LLeg;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.LLegOverlay;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.RLeg;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.RLegOverlay;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.alex.AlexLArm;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.alex.AlexLArmOverlay;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.alex.AlexRArm;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.alex.AlexRArmOverlay;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.steve.LArm;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.steve.LArmOverlay;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.steve.RArm;
|
||||
import com.tungsten.fcllibrary.skin.body.cube.steve.RArmOverlay;
|
||||
import com.tungsten.fcllibrary.skin.cape.CapePart;
|
||||
import com.tungsten.fcllibrary.skin.cape.cube.Cape;
|
||||
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
public class GameCharacter {
|
||||
public static int selected_resource;
|
||||
private boolean isAlexSkin;
|
||||
private boolean isRunning;
|
||||
private AlexLArm mAlexLArm;
|
||||
private AlexLArmOverlay mAlexLArmOverlay;
|
||||
private AlexRArm mAlexRArm;
|
||||
private AlexRArmOverlay mAlexRArmOverlay;
|
||||
private Body mBody;
|
||||
private BodyOverlay mBodyOverlay;
|
||||
private boolean mBodyOverlayVisible;
|
||||
private boolean mBodyVisible;
|
||||
private boolean mCheckAlexOrSteve;
|
||||
private Hat mHat;
|
||||
private boolean mHatVisible;
|
||||
private Head mHead;
|
||||
private boolean mHeadVisible;
|
||||
private LArm mLArm;
|
||||
private LArmOverlay mLArmOverlay;
|
||||
private boolean mLArmOverlayVisible;
|
||||
private boolean mLArmVisible;
|
||||
private LLeg mLLeg;
|
||||
private LLegOverlay mLLegOverlay;
|
||||
private boolean mLLegOverlayVisible;
|
||||
private boolean mLLegVisible;
|
||||
private RArm mRArm;
|
||||
private RArmOverlay mRArmOverlay;
|
||||
private boolean mRArmOverlayVisible;
|
||||
private boolean mRArmVisible;
|
||||
private RLeg mRLeg;
|
||||
private RLegOverlay mRLegOverlay;
|
||||
private boolean mRLegOverlayVisible;
|
||||
private boolean mRLegVisible;
|
||||
private Cape mCape;
|
||||
private boolean mCapeVisible;
|
||||
private float[] mRotate;
|
||||
private float[] rotate_step;
|
||||
|
||||
public float scale = 1f;
|
||||
|
||||
public GameCharacter() {
|
||||
this.isAlexSkin = false;
|
||||
this.isRunning = false;
|
||||
this.mBodyOverlayVisible = true;
|
||||
this.mBodyVisible = true;
|
||||
this.mHatVisible = true;
|
||||
this.mHeadVisible = true;
|
||||
this.mLArmOverlayVisible = true;
|
||||
this.mLArmVisible = true;
|
||||
this.mLLegOverlayVisible = true;
|
||||
this.mLLegVisible = true;
|
||||
this.mRArmOverlayVisible = true;
|
||||
this.mRArmVisible = true;
|
||||
this.mRLegOverlayVisible = true;
|
||||
this.mRLegVisible = true;
|
||||
this.mCapeVisible = true;
|
||||
this.mRotate = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.rotate_step = new float[] { 5.0f, 5.0f, 5.0f };
|
||||
this.mHead = new Head(scale);
|
||||
this.mHat = new Hat(scale);
|
||||
this.mBody = new Body(scale);
|
||||
this.mBodyOverlay = new BodyOverlay(scale);
|
||||
this.mLArm = new LArm(scale);
|
||||
this.mRArm = new RArm(scale);
|
||||
this.mLArmOverlay = new LArmOverlay(scale);
|
||||
this.mRArmOverlay = new RArmOverlay(scale);
|
||||
this.mLLeg = new LLeg(scale);
|
||||
this.mRLeg = new RLeg(scale);
|
||||
this.mLLegOverlay = new LLegOverlay(scale);
|
||||
this.mRLegOverlay = new RLegOverlay(scale);
|
||||
this.mCape = new Cape(scale);
|
||||
}
|
||||
|
||||
public GameCharacter(final int selected_resource) {
|
||||
this.isAlexSkin = false;
|
||||
this.isRunning = false;
|
||||
this.mBodyOverlayVisible = true;
|
||||
this.mBodyVisible = true;
|
||||
this.mHatVisible = true;
|
||||
this.mHeadVisible = true;
|
||||
this.mLArmOverlayVisible = true;
|
||||
this.mLArmVisible = true;
|
||||
this.mLLegOverlayVisible = true;
|
||||
this.mLLegVisible = true;
|
||||
this.mRArmOverlayVisible = true;
|
||||
this.mRArmVisible = true;
|
||||
this.mRLegOverlayVisible = true;
|
||||
this.mRLegVisible = true;
|
||||
this.mCapeVisible = true;
|
||||
this.mRotate = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.rotate_step = new float[] { 5.0f, 5.0f, 5.0f };
|
||||
GameCharacter.selected_resource = selected_resource;
|
||||
this.mHead = new Head(scale);
|
||||
this.mHat = new Hat(scale);
|
||||
this.mBody = new Body(scale);
|
||||
this.mBodyOverlay = new BodyOverlay(scale);
|
||||
this.mLArm = new LArm(scale);
|
||||
this.mRArm = new RArm(scale);
|
||||
this.mLArmOverlay = new LArmOverlay(scale);
|
||||
this.mRArmOverlay = new RArmOverlay(scale);
|
||||
this.mLLeg = new LLeg(scale);
|
||||
this.mRLeg = new RLeg(scale);
|
||||
this.mLLegOverlay = new LLegOverlay(scale);
|
||||
this.mRLegOverlay = new RLegOverlay(scale);
|
||||
this.mCape = new Cape(scale);
|
||||
}
|
||||
|
||||
public GameCharacter(final boolean mCheckAlexOrSteve) {
|
||||
this.isAlexSkin = false;
|
||||
this.isRunning = false;
|
||||
this.mBodyOverlayVisible = true;
|
||||
this.mBodyVisible = true;
|
||||
this.mHatVisible = true;
|
||||
this.mHeadVisible = true;
|
||||
this.mLArmOverlayVisible = true;
|
||||
this.mLArmVisible = true;
|
||||
this.mLLegOverlayVisible = true;
|
||||
this.mLLegVisible = true;
|
||||
this.mRArmOverlayVisible = true;
|
||||
this.mRArmVisible = true;
|
||||
this.mRLegOverlayVisible = true;
|
||||
this.mRLegVisible = true;
|
||||
this.mCapeVisible = true;
|
||||
this.mRotate = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.rotate_step = new float[] { 5.0f, 5.0f, 5.0f };
|
||||
if (!(this.mCheckAlexOrSteve = mCheckAlexOrSteve)) {
|
||||
this.mHead = new Head(scale);
|
||||
this.mHat = new Hat(scale);
|
||||
this.mBody = new Body(scale);
|
||||
this.mBodyOverlay = new BodyOverlay(scale);
|
||||
this.mLArm = new LArm(scale);
|
||||
this.mRArm = new RArm(scale);
|
||||
this.mLArmOverlay = new LArmOverlay(scale);
|
||||
this.mRArmOverlay = new RArmOverlay(scale);
|
||||
this.mLLeg = new LLeg(scale);
|
||||
this.mRLeg = new RLeg(scale);
|
||||
this.mLLegOverlay = new LLegOverlay(scale);
|
||||
this.mRLegOverlay = new RLegOverlay(scale);
|
||||
this.mCape = new Cape(scale);
|
||||
return;
|
||||
}
|
||||
this.mHead = new Head(scale);
|
||||
this.mHat = new Hat(scale);
|
||||
this.mBody = new Body(scale);
|
||||
this.mBodyOverlay = new BodyOverlay(scale);
|
||||
this.mAlexLArm = new AlexLArm(scale);
|
||||
this.mAlexRArm = new AlexRArm(scale);
|
||||
this.mAlexLArmOverlay = new AlexLArmOverlay(scale);
|
||||
this.mAlexRArmOverlay = new AlexRArmOverlay(scale);
|
||||
this.mLLeg = new LLeg(scale);
|
||||
this.mRLeg = new RLeg(scale);
|
||||
this.mLLegOverlay = new LLegOverlay(scale);
|
||||
this.mRLegOverlay = new RLegOverlay(scale);
|
||||
this.mCape = new Cape(scale);
|
||||
}
|
||||
|
||||
public GameCharacter(final boolean mCheckAlexOrSteve, final int selected_resource) {
|
||||
this.isAlexSkin = false;
|
||||
this.isRunning = false;
|
||||
this.mBodyOverlayVisible = true;
|
||||
this.mBodyVisible = true;
|
||||
this.mHatVisible = true;
|
||||
this.mHeadVisible = true;
|
||||
this.mLArmOverlayVisible = true;
|
||||
this.mLArmVisible = true;
|
||||
this.mLLegOverlayVisible = true;
|
||||
this.mLLegVisible = true;
|
||||
this.mRArmOverlayVisible = true;
|
||||
this.mRArmVisible = true;
|
||||
this.mRLegOverlayVisible = true;
|
||||
this.mRLegVisible = true;
|
||||
this.mCapeVisible = true;
|
||||
this.mRotate = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.rotate_step = new float[] { 5.0f, 5.0f, 5.0f };
|
||||
this.mCheckAlexOrSteve = mCheckAlexOrSteve;
|
||||
GameCharacter.selected_resource = selected_resource;
|
||||
if (!mCheckAlexOrSteve) {
|
||||
this.mHead = new Head(scale);
|
||||
this.mHat = new Hat(scale);
|
||||
this.mBody = new Body(scale);
|
||||
this.mBodyOverlay = new BodyOverlay(scale);
|
||||
this.mLArm = new LArm(scale);
|
||||
this.mRArm = new RArm(scale);
|
||||
this.mLArmOverlay = new LArmOverlay(scale);
|
||||
this.mRArmOverlay = new RArmOverlay(scale);
|
||||
this.mLLeg = new LLeg(scale);
|
||||
this.mRLeg = new RLeg(scale);
|
||||
this.mLLegOverlay = new LLegOverlay(scale);
|
||||
this.mRLegOverlay = new RLegOverlay(scale);
|
||||
this.mCape = new Cape(scale);
|
||||
return;
|
||||
}
|
||||
this.mHead = new Head(scale);
|
||||
this.mHat = new Hat(scale);
|
||||
this.mBody = new Body(scale);
|
||||
this.mBodyOverlay = new BodyOverlay(scale);
|
||||
this.mAlexLArm = new AlexLArm(scale);
|
||||
this.mAlexRArm = new AlexRArm(scale);
|
||||
this.mAlexLArmOverlay = new AlexLArmOverlay(scale);
|
||||
this.mAlexRArmOverlay = new AlexRArmOverlay(scale);
|
||||
this.mLLeg = new LLeg(scale);
|
||||
this.mRLeg = new RLeg(scale);
|
||||
this.mLLegOverlay = new LLegOverlay(scale);
|
||||
this.mRLegOverlay = new RLegOverlay(scale);
|
||||
this.mCape = new Cape(scale);
|
||||
}
|
||||
|
||||
public void ResetRunForBody() {
|
||||
if (!this.mCheckAlexOrSteve) {
|
||||
this.mHead = new Head(scale);
|
||||
this.mHat = new Hat(scale);
|
||||
this.mBody = new Body(scale);
|
||||
this.mBodyOverlay = new BodyOverlay(scale);
|
||||
this.mLArm = new LArm(scale);
|
||||
this.mRArm = new RArm(scale);
|
||||
this.mLArmOverlay = new LArmOverlay(scale);
|
||||
this.mRArmOverlay = new RArmOverlay(scale);
|
||||
this.mLLeg = new LLeg(scale);
|
||||
this.mRLeg = new RLeg(scale);
|
||||
this.mLLegOverlay = new LLegOverlay(scale);
|
||||
this.mRLegOverlay = new RLegOverlay(scale);
|
||||
return;
|
||||
}
|
||||
this.mHead = new Head(scale);
|
||||
this.mHat = new Hat(scale);
|
||||
this.mBody = new Body(scale);
|
||||
this.mBodyOverlay = new BodyOverlay(scale);
|
||||
this.mAlexLArm = new AlexLArm(scale);
|
||||
this.mAlexRArm = new AlexRArm(scale);
|
||||
this.mAlexLArmOverlay = new AlexLArmOverlay(scale);
|
||||
this.mAlexRArmOverlay = new AlexRArmOverlay(scale);
|
||||
this.mLLeg = new LLeg(scale);
|
||||
this.mRLeg = new RLeg(scale);
|
||||
this.mLLegOverlay = new LLegOverlay(scale);
|
||||
this.mRLegOverlay = new RLegOverlay(scale);
|
||||
}
|
||||
|
||||
public void setScale(float scale) {
|
||||
this.scale = scale;
|
||||
if (!mCheckAlexOrSteve) {
|
||||
this.mHead = new Head(scale);
|
||||
this.mHat = new Hat(scale);
|
||||
this.mBody = new Body(scale);
|
||||
this.mBodyOverlay = new BodyOverlay(scale);
|
||||
this.mLArm = new LArm(scale);
|
||||
this.mRArm = new RArm(scale);
|
||||
this.mLArmOverlay = new LArmOverlay(scale);
|
||||
this.mRArmOverlay = new RArmOverlay(scale);
|
||||
this.mLLeg = new LLeg(scale);
|
||||
this.mRLeg = new RLeg(scale);
|
||||
this.mLLegOverlay = new LLegOverlay(scale);
|
||||
this.mRLegOverlay = new RLegOverlay(scale);
|
||||
this.mCape = new Cape(scale);
|
||||
return;
|
||||
}
|
||||
this.mHead = new Head(scale);
|
||||
this.mHat = new Hat(scale);
|
||||
this.mBody = new Body(scale);
|
||||
this.mBodyOverlay = new BodyOverlay(scale);
|
||||
this.mAlexLArm = new AlexLArm(scale);
|
||||
this.mAlexRArm = new AlexRArm(scale);
|
||||
this.mAlexLArmOverlay = new AlexLArmOverlay(scale);
|
||||
this.mAlexRArmOverlay = new AlexRArmOverlay(scale);
|
||||
this.mLLeg = new LLeg(scale);
|
||||
this.mRLeg = new RLeg(scale);
|
||||
this.mLLegOverlay = new LLegOverlay(scale);
|
||||
this.mRLegOverlay = new RLegOverlay(scale);
|
||||
this.mCape = new Cape(scale);
|
||||
}
|
||||
|
||||
public void SetRotate(final float n, final float n2, final float n3) {
|
||||
this.mRotate[0] = n;
|
||||
this.mRotate[1] = n2;
|
||||
this.mRotate[2] = n3;
|
||||
}
|
||||
|
||||
public void SetRotateStep(final float n, final float n2) {
|
||||
if (Math.abs(n) >= 1.0f) {
|
||||
final float[] mRotate = this.mRotate;
|
||||
mRotate[1] += this.rotate_step[1] * Math.signum(n) * 2.0f;
|
||||
}
|
||||
if (Math.abs(n2) >= 1.0f) {
|
||||
final float[] mRotate2 = this.mRotate;
|
||||
mRotate2[0] += this.rotate_step[0] * Math.signum(n2) * 2.0f;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetRunning(final boolean isRunning) {
|
||||
this.isRunning = isRunning;
|
||||
}
|
||||
|
||||
public void drawBody(final GL10 gl10) {
|
||||
gl10.glMatrixMode(5888);
|
||||
gl10.glRotatef(this.mRotate[0], 1.0f, 0.0f, 0.0f);
|
||||
gl10.glRotatef(this.mRotate[1], 0.0f, 1.0f, 0.0f);
|
||||
gl10.glRotatef(this.mRotate[2], 0.0f, 0.0f, 1.0f);
|
||||
if (this.mBodyVisible) {
|
||||
this.mBody.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mHeadVisible) {
|
||||
this.mHead.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mLLegVisible) {
|
||||
this.mLLeg.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mRLegVisible) {
|
||||
this.mRLeg.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mRArm != null) {
|
||||
if (this.mLArmVisible) {
|
||||
this.mLArm.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mRArmVisible) {
|
||||
this.mRArm.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mHatVisible) {
|
||||
this.mHat.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mLArmOverlayVisible) {
|
||||
this.mLArmOverlay.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mRArmOverlayVisible) {
|
||||
this.mRArmOverlay.draw(gl10, this.isRunning);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (this.mLArmVisible) {
|
||||
this.mAlexLArm.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mRArmVisible) {
|
||||
this.mAlexRArm.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mHatVisible) {
|
||||
this.mHat.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mLArmOverlayVisible) {
|
||||
this.mAlexLArmOverlay.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mRArmOverlayVisible) {
|
||||
this.mAlexRArmOverlay.draw(gl10, this.isRunning);
|
||||
}
|
||||
}
|
||||
if (this.mLLegOverlayVisible) {
|
||||
this.mLLegOverlay.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mRLegOverlayVisible) {
|
||||
this.mRLegOverlay.draw(gl10, this.isRunning);
|
||||
}
|
||||
if (this.mBodyOverlayVisible) {
|
||||
this.mBodyOverlay.draw(gl10, this.isRunning);
|
||||
}
|
||||
}
|
||||
|
||||
public void drawCape(final GL10 gl10) {
|
||||
if (this.mCapeVisible) {
|
||||
this.mCape.draw(gl10, this.isRunning);
|
||||
}
|
||||
}
|
||||
|
||||
public Boolean getRunning() {
|
||||
return this.isRunning;
|
||||
}
|
||||
|
||||
public float getXRotation() {
|
||||
return this.mRotate[0];
|
||||
}
|
||||
|
||||
public float getYRotation() {
|
||||
return this.mRotate[1];
|
||||
}
|
||||
|
||||
public float getZRotation() {
|
||||
return this.mRotate[2];
|
||||
}
|
||||
|
||||
public void hideBodyPart(final BodyPart bodyPart, final boolean b) {
|
||||
if (bodyPart == BodyPart.BODY) {
|
||||
this.mBodyVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.HAT) {
|
||||
this.mHatVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.HEAD) {
|
||||
this.mHeadVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.JACKET) {
|
||||
this.mBodyOverlayVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.LEFT_ARM) {
|
||||
this.mLArmVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.RIGHT_ARM) {
|
||||
this.mRArmVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.LEFT_LEG) {
|
||||
this.mLLegVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.RIGHT_LEG) {
|
||||
this.mRLegVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.LEFT_SLEEVE) {
|
||||
this.mLArmOverlayVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.RIGHT_SLEEVE) {
|
||||
this.mRArmOverlayVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.LEFT_LEG_OVERLAY) {
|
||||
this.mLLegOverlayVisible = b;
|
||||
}
|
||||
if (bodyPart == BodyPart.RIGHT_LEG_OVERLAY) {
|
||||
this.mRLegOverlayVisible = b;
|
||||
}
|
||||
}
|
||||
|
||||
public void hideCapePart(final CapePart capePart, final boolean b) {
|
||||
if (capePart == CapePart.CAPE) {
|
||||
this.mCapeVisible = b;
|
||||
}
|
||||
}
|
||||
|
||||
public void setXRotation(final int n) {
|
||||
this.mRotate[0] = n;
|
||||
}
|
||||
|
||||
public void setYRotation(final int n) {
|
||||
this.mRotate[1] = n;
|
||||
}
|
||||
|
||||
public void setZRotation(final int n) {
|
||||
this.mRotate[2] = n;
|
||||
}
|
||||
|
||||
public void showAllBodyParts() {
|
||||
this.mHeadVisible = true;
|
||||
this.mHatVisible = true;
|
||||
this.mBodyVisible = true;
|
||||
this.mBodyOverlayVisible = true;
|
||||
this.mLArmVisible = true;
|
||||
this.mRArmVisible = true;
|
||||
this.mLArmOverlayVisible = true;
|
||||
this.mRArmOverlayVisible = true;
|
||||
this.mLLegVisible = true;
|
||||
this.mRLegVisible = true;
|
||||
this.mLLegOverlayVisible = true;
|
||||
this.mRLegOverlayVisible = true;
|
||||
this.mCapeVisible = true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
package com.tungsten.fcllibrary.skin;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.opengl.GLU;
|
||||
import android.os.SystemClock;
|
||||
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
public class MinecraftSkinRenderer implements GLSurfaceView.Renderer {
|
||||
public static float[] light0Position;
|
||||
public boolean changeSkinImage;
|
||||
public GameCharacter mCharacter;
|
||||
private int[] mCharacterTexData;
|
||||
private Context mContext;
|
||||
public String path;
|
||||
public float[] plane_texcoords;
|
||||
protected float[] plane_vertices;
|
||||
public Bitmap skin;
|
||||
public Bitmap cape;
|
||||
boolean superRun;
|
||||
boolean updateBitmapSkin;
|
||||
|
||||
static {
|
||||
MinecraftSkinRenderer.light0Position = new float[]{0.0f, 0.0f, 5100.0f, 0.0f};
|
||||
}
|
||||
|
||||
public MinecraftSkinRenderer(final Context mContext) {
|
||||
this.changeSkinImage = false;
|
||||
this.plane_texcoords = new float[] {0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f};
|
||||
this.plane_vertices = new float[] {-200.0f, -100.0f, -100.0f, -200.0f, 100.0f, -100.0f, 200.0f, 100.0f, -100.0f, 200.0f, -100.0f, -100.0f};
|
||||
this.updateBitmapSkin = false;
|
||||
this.superRun = false;
|
||||
this.mContext = mContext;
|
||||
this.mCharacter = new GameCharacter();
|
||||
}
|
||||
|
||||
public MinecraftSkinRenderer(final Context mContext, final int n) {
|
||||
this.changeSkinImage = false;
|
||||
this.plane_texcoords = new float[] {0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f};
|
||||
this.plane_vertices = new float[] {-200.0f, -100.0f, -100.0f, -200.0f, 100.0f, -100.0f, 200.0f, 100.0f, -100.0f, 200.0f, -100.0f, -100.0f};
|
||||
this.updateBitmapSkin = false;
|
||||
this.superRun = false;
|
||||
this.mContext = mContext;
|
||||
this.mCharacter = new GameCharacter(n);
|
||||
}
|
||||
|
||||
public MinecraftSkinRenderer(final Context mContext, final int n, final boolean b) {
|
||||
this.changeSkinImage = false;
|
||||
this.plane_texcoords = new float[] {0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f};
|
||||
this.plane_vertices = new float[] {-200.0f, -100.0f, -100.0f, -200.0f, 100.0f, -100.0f, 200.0f, 100.0f, -100.0f, 200.0f, -100.0f, -100.0f};
|
||||
this.updateBitmapSkin = false;
|
||||
this.superRun = false;
|
||||
this.mContext = mContext;
|
||||
this.mCharacter = new GameCharacter(b, n);
|
||||
}
|
||||
|
||||
public MinecraftSkinRenderer(final Context mContext, final boolean b) {
|
||||
this.changeSkinImage = false;
|
||||
this.plane_texcoords = new float[] {0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f};
|
||||
this.plane_vertices = new float[] {-200.0f, -100.0f, -100.0f, -200.0f, 100.0f, -100.0f, 200.0f, 100.0f, -100.0f, 200.0f, -100.0f, -100.0f};
|
||||
this.updateBitmapSkin = false;
|
||||
this.superRun = false;
|
||||
this.mContext = mContext;
|
||||
this.mCharacter = new GameCharacter(b);
|
||||
}
|
||||
|
||||
public void onDrawFrame(final GL10 gl10) {
|
||||
if (this.changeSkinImage) {
|
||||
this.changeSkinImage = false;
|
||||
}
|
||||
if (this.updateBitmapSkin) {
|
||||
mCharacterTexData = TextureHelper.loadGLTextureFromBitmap(this.skin, this.cape, gl10);
|
||||
this.updateBitmapSkin = false;
|
||||
}
|
||||
gl10.glClear(16640);
|
||||
gl10.glEnable(3553);
|
||||
gl10.glLoadIdentity();
|
||||
gl10.glColor4f(0.63671875f, 0.76953125f, 0.22265625f, 1.0f);
|
||||
gl10.glTranslatef(0.0f, 0.0f, -60.0f);
|
||||
gl10.glPushMatrix();
|
||||
gl10.glBindTexture(3553, mCharacterTexData[0]);
|
||||
this.mCharacter.drawBody(gl10);
|
||||
if (cape != null && cape.getWidth() == 64 && cape.getHeight() == 32) {
|
||||
gl10.glBindTexture(3553, mCharacterTexData[1]);
|
||||
this.mCharacter.drawCape(gl10);
|
||||
}
|
||||
gl10.glPopMatrix();
|
||||
gl10.glLoadIdentity();
|
||||
if (this.superRun) {
|
||||
GLU.gluLookAt(gl10, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f);
|
||||
gl10.glRotatef(0.09f * (int) (SystemClock.uptimeMillis() % 4000L), 0.0f, 0.0f, 1.0f);
|
||||
this.mCharacter.drawBody(gl10);
|
||||
}
|
||||
}
|
||||
|
||||
public void onSurfaceChanged(final GL10 gl10, final int n, final int n2) {
|
||||
gl10.glViewport(0, 0, n, n2);
|
||||
gl10.glMatrixMode(5889);
|
||||
gl10.glLoadIdentity();
|
||||
final float n3 = n2 / 2.0f / (float) Math.tan(BufferUtils.d2r(22.5f));
|
||||
GLU.gluPerspective(gl10, 45.0f, n / n2, 0.5f, Math.max(1500.0f, n3));
|
||||
gl10.glMatrixMode(5888);
|
||||
gl10.glLoadIdentity();
|
||||
GLU.gluLookAt(gl10, n / 2.0f, n2 / 2.0f, n3, n / 2.0f, n2 / 2.0f, 0.0f, 0.0f, 1.0f, 0.0f);
|
||||
gl10.glEnable(2896);
|
||||
gl10.glEnable(16384);
|
||||
gl10.glLightfv(16384, 4608, new float[] {3.5f, 3.5f, 3.5f, 1.0f}, 0);
|
||||
gl10.glLightfv(16384, 4611, MinecraftSkinRenderer.light0Position = new float[] {0.0f, 0.0f, n3, 0.0f}, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSurfaceCreated(GL10 gl10, EGLConfig eglConfig) {
|
||||
this.mCharacterTexData = TextureHelper.loadTexture(BitmapFactory.decodeStream(MinecraftSkinRenderer.class.getResourceAsStream("/assets/img/alex.png")));
|
||||
gl10.glEnable(3042);
|
||||
gl10.glCullFace(1028);
|
||||
gl10.glShadeModel(7425);
|
||||
gl10.glEnable(6408);
|
||||
gl10.glEnable(2929);
|
||||
gl10.glDepthFunc(515);
|
||||
gl10.glHint(3152, 4354);
|
||||
gl10.glClearDepthf(1.0f);
|
||||
}
|
||||
|
||||
public void setSuperRun(final boolean superRun) {
|
||||
this.superRun = superRun;
|
||||
}
|
||||
|
||||
public void updateTexture(final Bitmap skin, Bitmap cape) {
|
||||
this.skin = skin;
|
||||
this.cape = cape;
|
||||
this.updateBitmapSkin = true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.tungsten.fcllibrary.skin;
|
||||
|
||||
import android.content.Context;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
public class SkinGLSurfaceView extends GLSurfaceView {
|
||||
private float mDensity;
|
||||
private float mPreviousX;
|
||||
private float mPreviousY;
|
||||
private MinecraftSkinRenderer mRenderer;
|
||||
|
||||
public SkinGLSurfaceView(final Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public SkinGLSurfaceView(final Context context, final AttributeSet set) {
|
||||
super(context, set);
|
||||
}
|
||||
|
||||
public boolean onTouchEvent(final MotionEvent motionEvent) {
|
||||
if (motionEvent.getPointerCount() == 1) {
|
||||
final float x = motionEvent.getX();
|
||||
final float y = motionEvent.getY();
|
||||
if (motionEvent.getAction() == 2 && this.mRenderer != null) {
|
||||
this.mRenderer.mCharacter.SetRotateStep((x - this.mPreviousX) / (this.mDensity), (y - this.mPreviousY) / (this.mDensity * 3.0f));
|
||||
}
|
||||
this.mPreviousX = x;
|
||||
this.mPreviousY = y;
|
||||
}
|
||||
if (motionEvent.getPointerCount() == 2) {
|
||||
switch (motionEvent.getActionMasked()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
priId = motionEvent.getPointerId(motionEvent.getActionIndex());
|
||||
break;
|
||||
case MotionEvent.ACTION_POINTER_DOWN:
|
||||
secId = motionEvent.getPointerId(motionEvent.getActionIndex());
|
||||
float deltaX = motionEvent.getX(motionEvent.findPointerIndex(priId)) - motionEvent.getX(motionEvent.findPointerIndex(secId));
|
||||
float deltaY = motionEvent.getY(motionEvent.findPointerIndex(priId)) - motionEvent.getY(motionEvent.findPointerIndex(secId));
|
||||
initDist = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
||||
initScale = mRenderer.mCharacter.scale;
|
||||
break;
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
float dX = motionEvent.getX(motionEvent.findPointerIndex(priId)) - motionEvent.getX(motionEvent.findPointerIndex(secId));
|
||||
float dY = motionEvent.getY(motionEvent.findPointerIndex(priId)) - motionEvent.getY(motionEvent.findPointerIndex(secId));
|
||||
double dist = Math.sqrt(dX * dX + dY * dY);
|
||||
double delta = dist - initDist;
|
||||
if (initScale + (delta / (1 * Math.sqrt(getWidth() * getWidth() + getHeight() * getHeight()))) <= 2 && initScale + (delta / (1 * Math.sqrt(getWidth() * getWidth() + getHeight() * getHeight()))) >= 0.7) {
|
||||
float scale = (float) (initScale + (delta / (1 * Math.sqrt(getWidth() * getWidth() + getHeight() * getHeight()))));
|
||||
mRenderer.mCharacter.setScale(scale);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private int priId;
|
||||
private int secId;
|
||||
private double initDist;
|
||||
private float initScale;
|
||||
|
||||
public void setRenderer(final MinecraftSkinRenderer minecraftSkinRenderer, final float mDensity) {
|
||||
this.mRenderer = minecraftSkinRenderer;
|
||||
this.mDensity = mDensity;
|
||||
super.setRenderer((Renderer)minecraftSkinRenderer);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package com.tungsten.fcllibrary.skin;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.opengl.GLES20;
|
||||
import android.opengl.GLUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
public class TextureHelper {
|
||||
public static boolean isLoadingError;
|
||||
|
||||
static {
|
||||
TextureHelper.isLoadingError = false;
|
||||
}
|
||||
|
||||
public static int[] loadGLTextureFromBitmap(final Bitmap skin, final Bitmap cape, final GL10 gl10) {
|
||||
final int[] array = { 0 , 0 };
|
||||
gl10.glGenTextures(2, array, 0);
|
||||
gl10.glBindTexture(3553, array[0]);
|
||||
gl10.glTexParameterf(3553, 10241, 9728.0f);
|
||||
gl10.glTexParameterf(3553, 10240, 9728.0f);
|
||||
GLUtils.texImage2D(3553, 0, skin, 0);
|
||||
gl10.glBindTexture(3553, array[1]);
|
||||
gl10.glTexParameterf(3553, 10241, 9728.0f);
|
||||
gl10.glTexParameterf(3553, 10240, 9728.0f);
|
||||
if (cape != null) {
|
||||
GLUtils.texImage2D(3553, 0, cape, 0);
|
||||
}
|
||||
if (array[0] == 0 || (cape != null && array[1] == 0)) {
|
||||
throw new RuntimeException("Error loading texture.");
|
||||
}
|
||||
else {
|
||||
Log.e("loadTex","success");
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
public static int[] loadTexture(final Context context, final int n) {
|
||||
TextureHelper.isLoadingError = false;
|
||||
final int[] array = { 0 };
|
||||
GLES20.glGenTextures(1, array, 0);
|
||||
if (array[0] != 0) {
|
||||
final BitmapFactory.Options bitmapFactory = new BitmapFactory.Options();
|
||||
bitmapFactory.inScaled = false;
|
||||
final Bitmap decodeResource = BitmapFactory.decodeResource(context.getResources(), n, bitmapFactory);
|
||||
GLES20.glBindTexture(3553, array[0]);
|
||||
GLES20.glTexParameteri(3553, 10241, 9728);
|
||||
GLES20.glTexParameterf(3553, 10240, 9728.0f);
|
||||
GLUtils.texImage2D(3553, 0, decodeResource, 0);
|
||||
decodeResource.recycle();
|
||||
}
|
||||
if (array[0] == 0) {
|
||||
throw new RuntimeException("Error loading texture.");
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
public static int[] loadTexture(final Bitmap bitmap) {
|
||||
TextureHelper.isLoadingError = false;
|
||||
final int[] array = { 0 };
|
||||
GLES20.glGenTextures(1, array, 0);
|
||||
if (array[0] != 0) {
|
||||
new BitmapFactory.Options().inScaled = false;
|
||||
GLES20.glBindTexture(3553, array[0]);
|
||||
GLES20.glTexParameteri(3553, 10241, 9728);
|
||||
GLES20.glTexParameterf(3553, 10240, 9728.0f);
|
||||
GLUtils.texImage2D(3553, 0, bitmap, 0);
|
||||
bitmap.recycle();
|
||||
}
|
||||
if (array[0] == 0) {
|
||||
throw new RuntimeException("Error loading texture.");
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,886 @@
|
|||
package com.tungsten.fcllibrary.skin.body;
|
||||
|
||||
public enum BodyPart {
|
||||
BODY(2, "Body", new BodyPartSection[] { BodySkin.FRONT.getBodyPartSection(), BodySkin.RIGHT.getBodyPartSection(), BodySkin.BACK.getBodyPartSection(), BodySkin.LEFT.getBodyPartSection(), BodySkin.TOP.getBodyPartSection(), BodySkin.BOTTOM.getBodyPartSection() }),
|
||||
HAT(1, "Hat", new BodyPartSection[] { HatSkin.FRONT.getBodyPartSection(), HatSkin.RIGHT.getBodyPartSection(), HatSkin.BACK.getBodyPartSection(), HatSkin.LEFT.getBodyPartSection(), HatSkin.TOP.getBodyPartSection(), HatSkin.BOTTOM.getBodyPartSection() }),
|
||||
HEAD(0, "Head", new BodyPartSection[] { HeadSkin.FRONT.getBodyPartSection(), HeadSkin.RIGHT.getBodyPartSection(), HeadSkin.BACK.getBodyPartSection(), HeadSkin.LEFT.getBodyPartSection(), HeadSkin.TOP.getBodyPartSection(), HeadSkin.BOTTOM.getBodyPartSection() }),
|
||||
JACKET(3, "Body Overlay", new BodyPartSection[] { JacketSkin.FRONT.getBodyPartSection(), JacketSkin.RIGHT.getBodyPartSection(), JacketSkin.BACK.getBodyPartSection(), JacketSkin.LEFT.getBodyPartSection(), JacketSkin.TOP.getBodyPartSection(), JacketSkin.BOTTOM.getBodyPartSection() }),
|
||||
LEFT_ARM(4, "Left Arm", new BodyPartSection[] { LeftArmSkin.FRONT.getBodyPartSection(), LeftArmSkin.RIGHT.getBodyPartSection(), LeftArmSkin.BACK.getBodyPartSection(), LeftArmSkin.LEFT.getBodyPartSection(), LeftArmSkin.TOP.getBodyPartSection(), LeftArmSkin.BOTTOM.getBodyPartSection() }),
|
||||
LEFT_LEG(8, "Left Leg", new BodyPartSection[] { LeftLegSkin.FRONT.getBodyPartSection(), LeftLegSkin.RIGHT.getBodyPartSection(), LeftLegSkin.BACK.getBodyPartSection(), LeftLegSkin.LEFT.getBodyPartSection(), LeftLegSkin.TOP.getBodyPartSection(), LeftLegSkin.BOTTOM.getBodyPartSection() }),
|
||||
LEFT_LEG_OVERLAY(10, "Left Leg Overlay", new BodyPartSection[] { LeftLegOverlaySkin.FRONT.getBodyPartSection(), LeftLegOverlaySkin.RIGHT.getBodyPartSection(), LeftLegOverlaySkin.BACK.getBodyPartSection(), LeftLegOverlaySkin.LEFT.getBodyPartSection(), LeftLegOverlaySkin.TOP.getBodyPartSection(), LeftLegOverlaySkin.BOTTOM.getBodyPartSection() }),
|
||||
LEFT_SLEEVE(6, "Left Arm Overlay", new BodyPartSection[] { LeftSleeveSkin.FRONT.getBodyPartSection(), LeftSleeveSkin.RIGHT.getBodyPartSection(), LeftSleeveSkin.BACK.getBodyPartSection(), LeftSleeveSkin.LEFT.getBodyPartSection(), LeftSleeveSkin.TOP.getBodyPartSection(), LeftSleeveSkin.BOTTOM.getBodyPartSection() }),
|
||||
RIGHT_ARM(5, "Right Arm", new BodyPartSection[] { RightArmSkin.FRONT.getBodyPartSection(), RightArmSkin.RIGHT.getBodyPartSection(), RightArmSkin.BACK.getBodyPartSection(), RightArmSkin.LEFT.getBodyPartSection(), RightArmSkin.TOP.getBodyPartSection(), RightArmSkin.BOTTOM.getBodyPartSection() }),
|
||||
RIGHT_LEG(9, "Right Leg", new BodyPartSection[] { RightLegSkin.FRONT.getBodyPartSection(), RightLegSkin.RIGHT.getBodyPartSection(), RightLegSkin.BACK.getBodyPartSection(), RightLegSkin.LEFT.getBodyPartSection(), RightLegSkin.TOP.getBodyPartSection(), RightLegSkin.BOTTOM.getBodyPartSection() }),
|
||||
RIGHT_LEG_OVERLAY(11, "Right Leg Overlay", new BodyPartSection[] { RightLegOverlaySkin.FRONT.getBodyPartSection(), RightLegOverlaySkin.RIGHT.getBodyPartSection(), RightLegOverlaySkin.BACK.getBodyPartSection(), RightLegOverlaySkin.LEFT.getBodyPartSection(), RightLegOverlaySkin.TOP.getBodyPartSection(), RightLegOverlaySkin.BOTTOM.getBodyPartSection() }),
|
||||
RIGHT_SLEEVE(7, "Right Arm Overlay", new BodyPartSection[] { RightSleeveSkin.FRONT.getBodyPartSection(), RightSleeveSkin.RIGHT.getBodyPartSection(), RightSleeveSkin.BACK.getBodyPartSection(), RightSleeveSkin.LEFT.getBodyPartSection(), RightSleeveSkin.TOP.getBodyPartSection(), RightSleeveSkin.BOTTOM.getBodyPartSection() });
|
||||
|
||||
private BodyPartSection[] bodyParts;
|
||||
private String displayName;
|
||||
private int id;
|
||||
|
||||
private BodyPart(final int id, final String displayName, final BodyPartSection[] bodyParts) {
|
||||
this.id = id;
|
||||
this.displayName = displayName;
|
||||
this.bodyParts = bodyParts;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection(final int n) {
|
||||
return this.bodyParts[n];
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public enum AlexLeftArmSkin {
|
||||
BACK(2, "Back", 51, 20, 3, 12),
|
||||
BOTTOM(5, "Bottom", 47, 16, 3, 4),
|
||||
FRONT(0, "Front", 44, 20, 3, 12),
|
||||
LEFT(3, "Left", 47, 20, 4, 12),
|
||||
RIGHT(1, "Right", 40, 20, 4, 12),
|
||||
TOP(4, "Top", 44, 16, 3, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
AlexLeftArmSkin(final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Left Arm", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum AlexLeftSleeveSkin {
|
||||
BACK(2, "Back", 51, 36, 3, 12),
|
||||
BOTTOM(5, "Bottom", 47, 32, 3, 4),
|
||||
FRONT(0, "Front", 44, 36, 3, 12),
|
||||
LEFT(3, "Left", 47, 36, 4, 12),
|
||||
RIGHT(1, "Right", 40, 36, 4, 12),
|
||||
TOP(4, "Top", 44, 32, 3, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
AlexLeftSleeveSkin(final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Left Arm Overlay", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum AlexRightArmSkin {
|
||||
BACK(2, "Back", 43, 52, 3, 12),
|
||||
BOTTOM(5, "Bottom", 39, 48, 3, 4),
|
||||
FRONT(0, "Front", 36, 52, 3, 12),
|
||||
LEFT(3, "Left", 39, 52, 4, 12),
|
||||
RIGHT(1, "Right", 32, 52, 4, 12),
|
||||
TOP(4, "Top", 36, 48, 3, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
AlexRightArmSkin(final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Right Arm", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum AlexRightSleeveSkin {
|
||||
BACK(2, "Back", 59, 52, 3, 12),
|
||||
BOTTOM(5, "Bottom", 55, 48, 3, 4),
|
||||
FRONT(0, "Front", 52, 52, 3, 12),
|
||||
LEFT(3, "Left", 55, 52, 4, 12),
|
||||
RIGHT(1, "Right", 48, 52, 4, 12),
|
||||
TOP(4, "Top", 52, 48, 3, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
AlexRightSleeveSkin(final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Right Arm Overlay", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum BodySkin {
|
||||
BACK("BACK", 2, 2, "Back", 32, 20, 8, 12),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 28, 14, 8, 4),
|
||||
FRONT("FRONT", 0, 0, "Front", 20, 20, 8, 12),
|
||||
LEFT("LEFT", 3, 3, "Left", 28, 20, 4, 12),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 16, 20, 4, 12),
|
||||
TOP("TOP", 4, 4, "Top", 20, 14, 8, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
BodySkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Body", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum HatSkin {
|
||||
BACK("BACK", 2, 2, "Back", 56, 8, 8, 8),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 48, 0, 8, 8),
|
||||
FRONT("FRONT", 0, 0, "Front", 40, 8, 8, 8),
|
||||
LEFT("LEFT", 3, 3, "Left", 48, 8, 8, 8),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 32, 8, 8, 8),
|
||||
TOP("TOP", 4, 4, "Top", 40, 0, 8, 8);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
HatSkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Hat", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum HeadSkin {
|
||||
BACK("BACK", 2, 2, "Back", 24, 8, 8, 8),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 16, 0, 8, 8),
|
||||
FRONT("FRONT", 0, 0, "Front", 8, 8, 8, 8),
|
||||
LEFT("LEFT", 3, 3, "Left", 16, 8, 8, 8),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 0, 8, 8, 8),
|
||||
TOP("TOP", 4, 4, "Top", 8, 0, 8, 8);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
HeadSkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Head", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum JacketSkin {
|
||||
BACK("BACK", 2, 2, "Back", 32, 36, 8, 12),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 28, 32, 8, 4),
|
||||
FRONT("FRONT", 0, 0, "Front", 20, 36, 8, 12),
|
||||
LEFT("LEFT", 3, 3, "Left", 28, 36, 4, 12),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 16, 36, 4, 12),
|
||||
TOP("TOP", 4, 4, "Top", 20, 32, 8, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
JacketSkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Body Overlay", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum LeftArmSkin {
|
||||
BACK("BACK", 2, 2, "Back", 44, 52, 4, 12),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 40, 48, 4, 4),
|
||||
FRONT("FRONT", 0, 0, "Front", 36, 52, 4, 12),
|
||||
LEFT("LEFT", 3, 3, "Left", 40, 52, 4, 12),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 32, 52, 4, 12),
|
||||
TOP("TOP", 4, 4, "Top", 36, 48, 4, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
LeftArmSkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Left Arm", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum LeftLegOverlaySkin {
|
||||
BACK("BACK", 2, 2, "Back", 12, 52, 4, 12),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 8, 48, 4, 4),
|
||||
FRONT("FRONT", 0, 0, "Front", 4, 52, 4, 12),
|
||||
LEFT("LEFT", 3, 3, "Left", 8, 52, 4, 12),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 0, 52, 4, 12),
|
||||
TOP("TOP", 4, 4, "Top", 4, 48, 4, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
LeftLegOverlaySkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Left Leg Overlay", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum LeftLegSkin {
|
||||
BACK("BACK", 2, 2, "Back", 28, 52, 4, 12),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 24, 48, 4, 4),
|
||||
FRONT("FRONT", 0, 0, "Front", 20, 52, 4, 12),
|
||||
LEFT("LEFT", 3, 3, "Left", 24, 52, 4, 12),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 16, 52, 4, 12),
|
||||
TOP("TOP", 4, 4, "Top", 20, 48, 4, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
LeftLegSkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Left Leg", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum LeftSleeveSkin {
|
||||
BACK("BACK", 2, 2, "Back", 60, 52, 4, 12),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 56, 48, 4, 4),
|
||||
FRONT("FRONT", 0, 0, "Front", 52, 52, 4, 12),
|
||||
LEFT("LEFT", 3, 3, "Left", 56, 52, 4, 12),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 48, 52, 4, 12),
|
||||
TOP("TOP", 4, 4, "Top", 52, 48, 4, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
LeftSleeveSkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Left Arm Overlay", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum RightArmSkin {
|
||||
BACK("BACK", 2, 2, "Back", 52, 20, 4, 12),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 48, 16, 4, 4),
|
||||
FRONT("FRONT", 0, 0, "Front", 44, 20, 4, 12),
|
||||
LEFT("LEFT", 3, 3, "Left", 48, 20, 4, 12),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 40, 20, 4, 12),
|
||||
TOP("TOP", 4, 4, "Top", 44, 16, 4, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
RightArmSkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Right Arm", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum RightLegOverlaySkin {
|
||||
BACK("BACK", 2, 2, "Back", 12, 36, 4, 12),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 8, 32, 4, 4),
|
||||
FRONT("FRONT", 0, 0, "Front", 4, 36, 4, 12),
|
||||
LEFT("LEFT", 3, 3, "Left", 8, 36, 4, 12),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 0, 36, 4, 12),
|
||||
TOP("TOP", 4, 4, "Top", 4, 32, 4, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
RightLegOverlaySkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Right Leg Overlay", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum RightLegSkin {
|
||||
BACK("BACK", 2, 2, "Back", 12, 20, 4, 12),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 8, 16, 4, 4),
|
||||
FRONT("FRONT", 0, 0, "Front", 4, 20, 4, 12),
|
||||
LEFT("LEFT", 3, 3, "Left", 8, 20, 4, 12),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 0, 20, 4, 12),
|
||||
TOP("TOP", 4, 4, "Top", 4, 16, 4, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
RightLegSkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Right Leg", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
public enum RightSleeveSkin {
|
||||
BACK("BACK", 2, 2, "Back", 52, 36, 4, 12),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 48, 32, 4, 4),
|
||||
FRONT("FRONT", 0, 0, "Front", 44, 36, 4, 12),
|
||||
LEFT("LEFT", 3, 3, "Left", 48, 36, 4, 12),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 40, 36, 4, 12),
|
||||
TOP("TOP", 4, 4, "Top", 44, 32, 4, 4);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
RightSleeveSkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
BodyPartSection getBodyPartSection() {
|
||||
return new BodyPartSection("Right Arm Overlay", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.tungsten.fcllibrary.skin.body;
|
||||
|
||||
public class BodyPartSection {
|
||||
String bodyPartName;
|
||||
int height;
|
||||
String sideName;
|
||||
int startX;
|
||||
int startY;
|
||||
int width;
|
||||
|
||||
public BodyPartSection(final String bodyPartName, final String sideName, final int startX, final int startY, final int width, final int height) {
|
||||
this.bodyPartName = bodyPartName;
|
||||
this.sideName = sideName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public String getBodyPartName() {
|
||||
return this.bodyPartName;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
public String getSideName() {
|
||||
return this.sideName;
|
||||
}
|
||||
|
||||
public int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
public int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
package com.tungsten.fcllibrary.skin.body;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
public class LimbCube {
|
||||
protected int[] face_indecies;
|
||||
protected float[] face_vertices;
|
||||
protected float fixedDir;
|
||||
protected boolean isFixOneAxis;
|
||||
protected float mMainAngle;
|
||||
protected FloatBuffer mNormalVertexBuffer;
|
||||
protected float[] mOffset;
|
||||
protected float[] mScale;
|
||||
protected float mSubAngle;
|
||||
protected ArrayList<FloatBuffer> mTextureBuffers;
|
||||
protected FloatBuffer mVertexBuffer;
|
||||
protected float[] main_angle_axis;
|
||||
protected float main_max_angle;
|
||||
protected float main_min_angle;
|
||||
protected float main_step_value;
|
||||
protected float[] normal_vertices;
|
||||
protected float[] sub_angle_axis;
|
||||
protected float sub_max_angle;
|
||||
protected float sub_min_angle;
|
||||
protected float sub_step_value;
|
||||
private float[] vertices;
|
||||
|
||||
public LimbCube(final float n, final float n2, final float n3, final float n4, final float n5, final float n6) {
|
||||
this.mScale = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.mOffset = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.mMainAngle = 0.0f;
|
||||
this.main_step_value = -3.0f;
|
||||
this.main_max_angle = 3.0f;
|
||||
this.main_min_angle = -3.0f;
|
||||
this.main_angle_axis = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.mSubAngle = 0.0f;
|
||||
this.sub_step_value = -0.15f;
|
||||
this.sub_max_angle = 3.0f;
|
||||
this.sub_min_angle = -3.0f;
|
||||
this.sub_angle_axis = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.isFixOneAxis = true;
|
||||
this.fixedDir = 1.0f;
|
||||
this.vertices = new float[] { -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, -1.0f, 0.0f, -1.0f };
|
||||
this.face_indecies = new int[] { 0, 8, 9, 1, 8, 3, 2, 9, 3, 7, 6, 2, 1, 5, 4, 0, 1, 9, 10, 5, 9, 2, 6, 10, 4, 11, 8, 0, 11, 7, 3, 8, 5, 10, 11, 4, 10, 6, 7, 11 };
|
||||
this.face_vertices = new float[this.face_indecies.length * 3];
|
||||
this.normal_vertices = new float[] { 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f };
|
||||
this.mTextureBuffers = new ArrayList<FloatBuffer>();
|
||||
this.mScale[0] = n;
|
||||
this.mScale[1] = n2;
|
||||
this.mScale[2] = n3;
|
||||
this.mOffset[0] = n4;
|
||||
this.mOffset[1] = n5;
|
||||
this.mOffset[2] = n6;
|
||||
final ByteBuffer allocateDirect = ByteBuffer.allocateDirect(this.face_vertices.length * 4);
|
||||
allocateDirect.order(ByteOrder.nativeOrder());
|
||||
(this.mVertexBuffer = allocateDirect.asFloatBuffer()).put(this.face_vertices);
|
||||
this.mVertexBuffer.position(0);
|
||||
final ByteBuffer allocateDirect2 = ByteBuffer.allocateDirect(this.normal_vertices.length * 4);
|
||||
allocateDirect2.order(ByteOrder.nativeOrder());
|
||||
(this.mNormalVertexBuffer = allocateDirect2.asFloatBuffer()).put(this.normal_vertices);
|
||||
this.mNormalVertexBuffer.position(0);
|
||||
}
|
||||
|
||||
public LimbCube(final float n, final float n2, final float n3, final float n4, final float n5, final float n6, final float main_step_value, final float n7, final float n8, final float n9, final float main_max_angle, final float main_min_angle, final float sub_step_value, final float sub_max_angle, final float sub_min_angle, final boolean isFixOneAxis, final float fixedDir) {
|
||||
this(n, n2, n3, n4, n5, n6);
|
||||
this.main_step_value = main_step_value;
|
||||
this.main_angle_axis[0] = n7;
|
||||
this.main_angle_axis[1] = n8;
|
||||
this.main_angle_axis[2] = n9;
|
||||
this.main_max_angle = main_max_angle;
|
||||
this.main_min_angle = main_min_angle;
|
||||
this.sub_step_value = sub_step_value;
|
||||
this.sub_max_angle = sub_max_angle;
|
||||
this.sub_min_angle = sub_min_angle;
|
||||
this.isFixOneAxis = isFixOneAxis;
|
||||
this.fixedDir = fixedDir;
|
||||
}
|
||||
|
||||
public FloatBuffer AddTextures(final float[] array) {
|
||||
final ByteBuffer allocateDirect = ByteBuffer.allocateDirect(array.length * 4);
|
||||
allocateDirect.order(ByteOrder.nativeOrder());
|
||||
final FloatBuffer floatBuffer = allocateDirect.asFloatBuffer();
|
||||
floatBuffer.put(array);
|
||||
floatBuffer.position(0);
|
||||
this.mTextureBuffers.add(floatBuffer);
|
||||
return floatBuffer;
|
||||
}
|
||||
|
||||
public void ClearAllTextures() {
|
||||
this.mTextureBuffers.clear();
|
||||
}
|
||||
|
||||
public void draw(final GL10 gl10, final boolean b) {
|
||||
gl10.glEnable(3042);
|
||||
gl10.glBlendFunc(1, 771);
|
||||
gl10.glEnableClientState(32884);
|
||||
gl10.glEnableClientState(32885);
|
||||
gl10.glEnableClientState(32888);
|
||||
gl10.glNormalPointer(5126, 0, (Buffer)this.mNormalVertexBuffer);
|
||||
for (int i = 0; i < this.face_indecies.length; ++i) {
|
||||
final int n = this.face_indecies[i];
|
||||
final float n2 = this.vertices[n * 3 + 1] * this.mScale[1] / 2.0f;
|
||||
final float n3 = this.vertices[n * 3 + 2] * this.mScale[2] / 2.0f;
|
||||
float n4;
|
||||
float n5;
|
||||
n4 = n2;
|
||||
n5 = n3;
|
||||
this.mVertexBuffer.put(i * 3, this.vertices[n * 3] * this.mScale[0] / 2.0f);
|
||||
this.mVertexBuffer.put(i * 3 + 1, n4);
|
||||
this.mVertexBuffer.put(i * 3 + 2, n5);
|
||||
}
|
||||
gl10.glVertexPointer(3, 5126, 0, (Buffer)this.mVertexBuffer);
|
||||
gl10.glPushMatrix();
|
||||
gl10.glTranslatef(this.mOffset[0], this.mOffset[1], this.mOffset[2]);
|
||||
if (b) {
|
||||
gl10.glTranslatef(0.0f, this.mScale[1] / 4.0f * 3.0f, 0.0f);
|
||||
gl10.glRotatef(this.mMainAngle, this.main_angle_axis[0], this.main_angle_axis[1], this.main_angle_axis[2]);
|
||||
gl10.glTranslatef(0.0f, -this.mScale[1] / 4.0f * 3.0f, 0.0f);
|
||||
this.mMainAngle += this.main_step_value;
|
||||
if (this.mMainAngle >= this.main_max_angle) {
|
||||
this.main_step_value *= -1.0f;
|
||||
this.mMainAngle = this.main_max_angle;
|
||||
}
|
||||
else if (this.mMainAngle <= this.main_min_angle) {
|
||||
this.main_step_value *= -1.0f;
|
||||
this.mMainAngle = this.main_min_angle;
|
||||
}
|
||||
this.mSubAngle += this.sub_step_value;
|
||||
if (this.mSubAngle >= this.sub_max_angle) {
|
||||
this.sub_step_value *= -1.0f;
|
||||
this.mSubAngle = this.sub_max_angle;
|
||||
}
|
||||
else if (this.mSubAngle <= this.sub_min_angle) {
|
||||
this.sub_step_value *= -1.0f;
|
||||
this.mSubAngle = this.sub_min_angle;
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < this.mTextureBuffers.size(); ++j) {
|
||||
gl10.glTexCoordPointer(2, 5126, 0, (Buffer)this.mTextureBuffers.get(j));
|
||||
for (int k = 0; k < 10; ++k) {
|
||||
gl10.glDrawArrays(6, k * 4, 4);
|
||||
}
|
||||
}
|
||||
gl10.glPopMatrix();
|
||||
gl10.glDisable(3042);
|
||||
gl10.glDisableClientState(32888);
|
||||
gl10.glDisableClientState(32884);
|
||||
}
|
||||
|
||||
public void setZeroRun() {
|
||||
this.mMainAngle = 1.5f;
|
||||
this.main_step_value = 0.7f;
|
||||
this.mSubAngle = 0.5f;
|
||||
this.sub_step_value = -0.5f;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
package com.tungsten.fcllibrary.skin.body;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
public class MainCube {
|
||||
protected float[] angle_axis;
|
||||
protected float[] face_vertices;
|
||||
protected float mAngle;
|
||||
protected FloatBuffer mNormalVertexBuffer;
|
||||
protected float[] mOffset;
|
||||
protected float[] mScale;
|
||||
protected ArrayList<FloatBuffer> mTextureBuffers;
|
||||
protected FloatBuffer mVertexBuffer;
|
||||
protected float max_angle;
|
||||
protected float min_angle;
|
||||
protected float[] normal_vertices;
|
||||
protected float step_value;
|
||||
|
||||
public MainCube(final float n, final float n2, final float n3, final float n4, final float n5, final float n6) {
|
||||
this.mScale = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.mOffset = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.mAngle = 0.0f;
|
||||
this.step_value = -0.15f;
|
||||
this.max_angle = 3.0f;
|
||||
this.min_angle = -3.0f;
|
||||
this.angle_axis = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.face_vertices = new float[] { -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f };
|
||||
this.normal_vertices = new float[] { 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f };
|
||||
this.mTextureBuffers = new ArrayList<FloatBuffer>();
|
||||
this.mScale[0] = n;
|
||||
this.mScale[1] = n2;
|
||||
this.mScale[2] = n3;
|
||||
this.mOffset[0] = n4;
|
||||
this.mOffset[1] = n5;
|
||||
this.mOffset[2] = n6;
|
||||
for (int i = 0; i < 24; ++i) {
|
||||
this.face_vertices[i * 3] = this.face_vertices[i * 3] * this.mScale[0] / 2.0f;
|
||||
this.face_vertices[i * 3 + 1] = this.face_vertices[i * 3 + 1] * this.mScale[1] / 2.0f;
|
||||
this.face_vertices[i * 3 + 2] = this.face_vertices[i * 3 + 2] * this.mScale[2] / 2.0f;
|
||||
}
|
||||
final ByteBuffer allocateDirect = ByteBuffer.allocateDirect(this.face_vertices.length * 4);
|
||||
allocateDirect.order(ByteOrder.nativeOrder());
|
||||
(this.mVertexBuffer = allocateDirect.asFloatBuffer()).put(this.face_vertices);
|
||||
this.mVertexBuffer.position(0);
|
||||
final ByteBuffer allocateDirect2 = ByteBuffer.allocateDirect(this.normal_vertices.length * 4);
|
||||
allocateDirect2.order(ByteOrder.nativeOrder());
|
||||
(this.mNormalVertexBuffer = allocateDirect2.asFloatBuffer()).put(this.normal_vertices);
|
||||
this.mNormalVertexBuffer.position(0);
|
||||
}
|
||||
|
||||
public MainCube(final float n, final float n2, final float n3, final float n4, final float n5, final float n6, final float step_value, final float n7, final float n8, final float n9, final float max_angle, final float min_angle) {
|
||||
this(n, n2, n3, n4, n5, n6);
|
||||
this.step_value = step_value;
|
||||
this.max_angle = max_angle;
|
||||
this.min_angle = min_angle;
|
||||
this.angle_axis[0] = n7;
|
||||
this.angle_axis[1] = n8;
|
||||
this.angle_axis[2] = n9;
|
||||
}
|
||||
|
||||
public FloatBuffer AddTextures(final float[] array) {
|
||||
final ByteBuffer allocateDirect = ByteBuffer.allocateDirect(array.length * 4);
|
||||
allocateDirect.order(ByteOrder.nativeOrder());
|
||||
final FloatBuffer floatBuffer = allocateDirect.asFloatBuffer();
|
||||
floatBuffer.put(array);
|
||||
floatBuffer.position(0);
|
||||
this.mTextureBuffers.add(floatBuffer);
|
||||
return floatBuffer;
|
||||
}
|
||||
|
||||
public void ClearAllTextures() {
|
||||
this.mTextureBuffers.clear();
|
||||
}
|
||||
|
||||
public void draw(final GL10 gl10, final boolean b) {
|
||||
gl10.glEnable(3042);
|
||||
gl10.glBlendFunc(1, 771);
|
||||
gl10.glEnableClientState(32884);
|
||||
gl10.glEnableClientState(32885);
|
||||
gl10.glEnableClientState(32888);
|
||||
gl10.glVertexPointer(3, 5126, 0, (Buffer)this.mVertexBuffer);
|
||||
gl10.glNormalPointer(5126, 0, (Buffer)this.mNormalVertexBuffer);
|
||||
gl10.glPushMatrix();
|
||||
gl10.glTranslatef(this.mOffset[0], this.mOffset[1], this.mOffset[2]);
|
||||
for (int i = 0; i < this.mTextureBuffers.size(); ++i) {
|
||||
gl10.glTexCoordPointer(2, 5126, 0, (Buffer) this.mTextureBuffers.get(i));
|
||||
for (int j = 0; j < 6; ++j) {
|
||||
gl10.glDrawArrays(6, j * 4, 4);
|
||||
}
|
||||
}
|
||||
gl10.glPopMatrix();
|
||||
gl10.glDisable(3042);
|
||||
gl10.glDisableClientState(32888);
|
||||
gl10.glDisableClientState(32885);
|
||||
gl10.glDisableClientState(32884);
|
||||
}
|
||||
|
||||
public void setZeroRun() {
|
||||
this.mAngle = 0.0f;
|
||||
this.step_value = -0.15f;
|
||||
this.max_angle = 3.0f;
|
||||
this.min_angle = -3.0f;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.MainCube;
|
||||
|
||||
public class Body extends MainCube {
|
||||
|
||||
protected float[] body_texcoords;
|
||||
|
||||
public Body(float scale) {
|
||||
super(8.0f * scale, 12.0f * scale, 4.0f * scale, 0.0f * scale, 2.0f * scale, 0.0f * scale, -0.15f, 0.0f, 1.0f, 0.0f, 3.0f, -3.0f);
|
||||
this.body_texcoords = new float[] {
|
||||
0.3125f, 0.5f, 0.3125f, 0.3125f, 0.4375f, 0.3125f, 0.4375f, 0.5f,
|
||||
0.3125f, 0.3125f, 0.3125f, 0.25f, 0.4375f, 0.25f, 0.4375f, 0.3125f,
|
||||
0.4375f, 0.3125f, 0.4375f, 0.25f, 0.5625f, 0.25f, 0.5625f, 0.3125f,
|
||||
0.4375f, 0.5f, 0.4375f, 0.3125f, 0.5f, 0.3125f, 0.5f, 0.5f,
|
||||
0.25f, 0.5f, 0.25f, 0.3125f, 0.3125f, 0.3125f, 0.3125f, 0.5f,
|
||||
0.5f, 0.5f, 0.5f, 0.3125f, 0.625f, 0.3125f, 0.625f, 0.5f
|
||||
};
|
||||
this.AddTextures(this.body_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.MainCube;
|
||||
|
||||
public class BodyOverlay extends MainCube {
|
||||
|
||||
protected float[] jacket_texcoords;
|
||||
|
||||
public BodyOverlay(float scale) {
|
||||
super(8.470589f * scale, 12.705883f * scale, 4.2352943f * scale, 0.0f * scale, 2.0f * scale, 0.0f * scale, -0.15f, 0.0f, 1.0f, 0.0f, 3.0f, -3.0f);
|
||||
this.jacket_texcoords = new float[] {
|
||||
0.3125f, 0.75f, 0.3125f, 0.5625f, 0.4375f, 0.5625f, 0.4375f, 0.75f,
|
||||
0.3125f, 0.5625f, 0.3125f, 0.5f, 0.4375f, 0.5f, 0.4375f, 0.5625f,
|
||||
0.4375f, 0.5625f, 0.4375f, 0.5f, 0.5625f, 0.5f, 0.5625f, 0.5625f,
|
||||
0.4375f, 0.75f, 0.4375f, 0.5625f, 0.5f, 0.5625f, 0.5f, 0.75f,
|
||||
0.25f, 0.75f, 0.25f, 0.5625f, 0.3125f, 0.5625f, 0.3125f, 0.75f,
|
||||
0.5f, 0.75f, 0.5f, 0.5625f, 0.625f, 0.5625f, 0.625f, 0.75f
|
||||
};
|
||||
this.AddTextures(this.jacket_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.MainCube;
|
||||
|
||||
public class Hat extends MainCube {
|
||||
|
||||
protected float[] hat_texcoords;
|
||||
|
||||
public Hat(float scale) {
|
||||
super(9.0f * scale, 9.0f * scale, 9.0f * scale, 0.0f * scale, 12.0f * scale, 0.0f * scale, 0.25f, 0.0f, 1.0f, 0.0f, 5.0f, -5.0f);
|
||||
this.hat_texcoords = new float[] {
|
||||
0.625f, 0.25f, 0.625f, 0.125f, 0.75f, 0.125f, 0.75f, 0.25f,
|
||||
0.625f, 0.125f, 0.625f, 0.0f, 0.75f, 0.0f, 0.75f, 0.125f,
|
||||
0.75f, 0.125f, 0.75f, 0.0f, 0.875f, 0.0f, 0.875f, 0.125f,
|
||||
0.75f, 0.25f, 0.75f, 0.125f, 0.875f, 0.125f, 0.875f, 0.25f,
|
||||
0.5f, 0.25f, 0.5f, 0.125f, 0.625f, 0.125f, 0.625f, 0.25f,
|
||||
0.875f, 0.25f, 0.875f, 0.125f, 1.0f, 0.125f, 1.0f, 0.25f
|
||||
};
|
||||
this.AddTextures(this.hat_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.MainCube;
|
||||
|
||||
public class Head extends MainCube {
|
||||
|
||||
protected float[] head_texcoords;
|
||||
|
||||
public Head(float scale) {
|
||||
super(8.0f * scale, 8.0f * scale, 8.0f * scale, 0.0f * scale, 12.0f * scale, 0.0f * scale, 0.25f, 0.0f, 1.0f, 0.0f, 5.0f, -5.0f);
|
||||
this.AddTextures(this.head_texcoords = new float[] {
|
||||
0.125f, 0.25f, 0.125f, 0.125f, 0.25f, 0.125f, 0.25f, 0.25f,
|
||||
0.125f, 0.125f, 0.125f, 0.0f, 0.25f, 0.0f, 0.25f, 0.125f,
|
||||
0.25f, 0.125f, 0.25f, 0.0f, 0.375f, 0.0f, 0.375f, 0.125f,
|
||||
0.25f, 0.25f, 0.25f, 0.125f, 0.375f, 0.125f, 0.375f, 0.25f,
|
||||
0.0f, 0.25f, 0.0f, 0.125f, 0.125f, 0.125f, 0.125f, 0.25f,
|
||||
0.375f, 0.25f, 0.375f, 0.125f, 0.5f, 0.125f, 0.5f, 0.25f });
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class LLeg extends LimbCube {
|
||||
|
||||
protected float[] lleg_texcoords;
|
||||
|
||||
public LLeg(float scale) {
|
||||
super(4.0f * scale, 12.0f * scale, 4.0f * scale, 2.0f * scale, -10.0f * scale, 0.0f * scale, 4.5f, 1.0f, 0.0f, 0.0f, 30.0f, -30.0f, -1.5f, 30.0f, -30.0f, true, 1.0f);
|
||||
this.lleg_texcoords = new float[] {
|
||||
0.3125f, 1.0f, 0.3125f, 0.90625f, 0.375f, 0.90625f, 0.375f, 1.0f,
|
||||
0.3125f, 0.90625f, 0.3125f, 0.8125f, 0.375f, 0.8125f, 0.375f, 0.90625f,
|
||||
0.3125f, 0.8125f, 0.3125f, 0.75f, 0.375f, 0.75f, 0.375f, 0.8125f,
|
||||
0.375f, 0.8125f, 0.375f, 0.75f, 0.4375f, 0.75f, 0.4375f, 0.8125f,
|
||||
0.375f, 1.0f, 0.375f, 0.90625f, 0.4375f, 0.90625f, 0.4375f, 1.0f,
|
||||
0.375f, 0.90625f, 0.375f, 0.8125f, 0.4375f, 0.8125f, 0.4375f, 0.90625f,
|
||||
0.25f, 1.0f, 0.25f, 0.90625f, 0.3125f, 0.90625f, 0.3125f, 1.0f,
|
||||
0.25f, 0.90625f, 0.25f, 0.8125f, 0.3125f, 0.8125f, 0.3125f, 0.90625f,
|
||||
0.4375f, 1.0f, 0.4375f, 0.90625f, 0.5f, 0.90625f, 0.5f, 1.0f,
|
||||
0.4375f, 0.90625f, 0.4375f, 0.8125f, 0.5f, 0.8125f, 0.5f, 0.90625f
|
||||
};
|
||||
this.AddTextures(this.lleg_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class LLegOverlay extends LimbCube {
|
||||
|
||||
protected float[] lleg1_texcoords;
|
||||
|
||||
public LLegOverlay(float scale) {
|
||||
super(4.2352943f * scale, 12.705883f * scale, 4.2352943f * scale, 2.0f * scale, -10.0f * scale, 0.0f * scale, 4.5f, 1.0f, 0.0f, 0.0f, 30.0f, -30.0f, -1.5f, 30.0f, -30.0f, true, 1.0f);
|
||||
this.lleg1_texcoords = new float[] {
|
||||
0.0625f, 1.0f, 0.0625f, 0.90625f, 0.125f, 0.90625f, 0.125f, 1.0f,
|
||||
0.0625f, 0.90625f, 0.0625f, 0.8125f, 0.125f, 0.8125f, 0.125f, 0.90625f,
|
||||
0.0625f, 0.8125f, 0.0625f, 0.75f, 0.125f, 0.75f, 0.125f, 0.8125f,
|
||||
0.125f, 0.8125f, 0.125f, 0.75f, 0.1875f, 0.75f, 0.1875f, 0.8125f,
|
||||
0.125f, 1.0f, 0.125f, 0.90625f, 0.1875f, 0.90625f, 0.1875f, 1.0f,
|
||||
0.125f, 0.90625f, 0.125f, 0.8125f, 0.1875f, 0.8125f, 0.1875f, 0.90625f,
|
||||
0.0f, 1.0f, 0.0f, 0.90625f, 0.0625f, 0.90625f, 0.0625f, 1.0f,
|
||||
0.0f, 0.90625f, 0.0f, 0.8125f, 0.0625f, 0.8125f, 0.0625f, 0.90625f,
|
||||
0.1875f, 1.0f, 0.1875f, 0.90625f, 0.25f, 0.90625f, 0.25f, 1.0f,
|
||||
0.1875f, 0.90625f, 0.1875f, 0.8125f, 0.25f, 0.8125f, 0.25f, 0.90625f
|
||||
};
|
||||
this.AddTextures(this.lleg1_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class RLeg extends LimbCube {
|
||||
|
||||
protected float[] rleg_texcoords;
|
||||
|
||||
public RLeg(float scale) {
|
||||
super(4.0f * scale, 12.0f * scale, 4.0f * scale, -2.0f * scale, -10.0f * scale, 0.0f * scale, -4.5f, 1.0f, 0.0f, 0.0f, 30.0f, -30.0f, 1.5f, 30.0f, -30.0f, true, 1.0f);
|
||||
this.rleg_texcoords = new float[] {
|
||||
0.0625f, 0.5f, 0.0625f, 0.40625f, 0.125f, 0.40625f, 0.125f, 0.5f,
|
||||
0.0625f, 0.40625f, 0.0625f, 0.3125f, 0.125f, 0.3125f, 0.125f, 0.40625f,
|
||||
0.0625f, 0.3125f, 0.0625f, 0.25f, 0.125f, 0.25f, 0.125f, 0.3125f,
|
||||
0.125f, 0.3125f, 0.125f, 0.25f, 0.1875f, 0.25f, 0.1875f, 0.3125f,
|
||||
0.125f, 0.5f, 0.125f, 0.40625f, 0.1875f, 0.40625f, 0.1875f, 0.5f,
|
||||
0.125f, 0.40625f, 0.125f, 0.3125f, 0.1875f, 0.3125f, 0.1875f, 0.40625f,
|
||||
0.0f, 0.5f, 0.0f, 0.40625f, 0.0625f, 0.40625f, 0.0625f, 0.5f,
|
||||
0.0f, 0.40625f, 0.0f, 0.3125f, 0.0625f, 0.3125f, 0.0625f, 0.40625f,
|
||||
0.1875f, 0.5f, 0.1875f, 0.40625f, 0.25f, 0.40625f, 0.25f, 0.5f,
|
||||
0.1875f, 0.40625f, 0.1875f, 0.3125f, 0.25f, 0.3125f, 0.25f, 0.40625f
|
||||
};
|
||||
this.AddTextures(this.rleg_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class RLegOverlay extends LimbCube
|
||||
{
|
||||
protected float[] rleg1_texcoords;
|
||||
|
||||
public RLegOverlay(float scale) {
|
||||
super(4.2352943f * scale, 12.705883f * scale, 4.2352943f * scale, -2.0f * scale, -10.0f * scale, 0.0f * scale, -4.5f, 1.0f, 0.0f, 0.0f, 30.0f, -30.0f, 1.5f, 30.0f, -30.0f, true, 1.0f);
|
||||
this.rleg1_texcoords = new float[] {
|
||||
0.0625f, 0.75f, 0.0625f, 0.65625f, 0.125f, 0.65625f, 0.125f, 0.75f,
|
||||
0.0625f, 0.65625f, 0.0625f, 0.5625f, 0.125f, 0.5625f, 0.125f, 0.65625f,
|
||||
0.0625f, 0.5625f, 0.0625f, 0.5f, 0.125f, 0.5f, 0.125f, 0.5625f,
|
||||
0.125f, 0.5625f, 0.125f, 0.5f, 0.1875f, 0.5f, 0.1875f, 0.5625f,
|
||||
0.125f, 0.75f, 0.125f, 0.65625f, 0.1875f, 0.65625f, 0.1875f, 0.75f,
|
||||
0.125f, 0.65625f, 0.125f, 0.5625f, 0.1875f, 0.5625f, 0.1875f, 0.65625f,
|
||||
0.0f, 0.75f, 0.0f, 0.65625f, 0.0625f, 0.65625f, 0.0625f, 0.75f,
|
||||
0.0f, 0.65625f, 0.0f, 0.5625f, 0.0625f, 0.5625f, 0.0625f, 0.65625f,
|
||||
0.1875f, 0.75f, 0.1875f, 0.65625f, 0.25f, 0.65625f, 0.25f, 0.75f,
|
||||
0.1875f, 0.65625f, 0.1875f, 0.5625f, 0.25f, 0.5625f, 0.25f, 0.65625f
|
||||
};
|
||||
this.AddTextures(this.rleg1_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube.alex;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class AlexLArm extends LimbCube {
|
||||
|
||||
protected float[] larm_texcoords;
|
||||
|
||||
public AlexLArm(float scale) {
|
||||
super(3.0f * scale, 12.0f * scale, 4.0f * scale, 5.5f * scale, 2.0f * scale, 0.0f * scale, -1.5f, 1.0f, 0.0f, 0.0f, 10.0f, -10.0f, 1.0f, 20.0f, -20.0f, true, -1.0f);
|
||||
this.larm_texcoords = new float[] {
|
||||
0.5625f, 1.0f, 0.5625f, 0.90625f, 0.609375f, 0.90625f, 0.609375f, 1.0f,
|
||||
0.5625f, 0.90625f, 0.5625f, 0.8125f, 0.609375f, 0.8125f, 0.609375f, 0.90625f,
|
||||
0.5625f, 0.8125f, 0.5625f, 0.75f, 0.609375f, 0.75f, 0.609375f, 0.8125f,
|
||||
0.609375f, 0.8125f, 0.609375f, 0.75f, 0.65625f, 0.75f, 0.65625f, 0.8125f,
|
||||
0.609375f, 1.0f, 0.609375f, 0.90625f, 0.671875f, 0.90625f, 0.671875f, 1.0f,
|
||||
0.609375f, 0.90625f, 0.609375f, 0.8125f, 0.671875f, 0.8125f, 0.671875f, 0.90625f,
|
||||
0.5f, 1.0f, 0.5f, 0.90625f, 0.5625f, 0.90625f, 0.5625f, 1.0f,
|
||||
0.5f, 0.90625f, 0.5f, 0.8125f, 0.5625f, 0.8125f, 0.5625f, 0.90625f,
|
||||
0.671875f, 1.0f, 0.671875f, 0.90625f, 0.71875f, 0.90625f, 0.71875f, 1.0f,
|
||||
0.671875f, 0.90625f, 0.671875f, 0.8125f, 0.71875f, 0.8125f, 0.71875f, 0.90625f
|
||||
};
|
||||
this.AddTextures(this.larm_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube.alex;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class AlexLArmOverlay extends LimbCube {
|
||||
|
||||
protected float[] larm1_texcoords;
|
||||
|
||||
public AlexLArmOverlay(float scale) {
|
||||
super(3.1764708f * scale, 12.705883f * scale, 4.2352943f * scale, 5.5f * scale, 2.0f * scale, 0.0f * scale, -1.5f, 1.0f, 0.0f, 0.0f, 10.0f, -10.0f, 1.0f, 20.0f, -20.0f, true, -1.0f);
|
||||
this.larm1_texcoords = new float[] {
|
||||
0.8125f, 1.0f, 0.8125f, 0.90625f, 0.875f, 0.90625f, 0.875f, 1.0f,
|
||||
0.8125f, 0.90625f, 0.8125f, 0.8125f, 0.875f, 0.8125f, 0.875f, 0.90625f,
|
||||
0.8125f, 0.8125f, 0.8125f, 0.75f, 0.875f, 0.75f, 0.875f, 0.8125f,
|
||||
0.875f, 0.8125f, 0.875f, 0.75f, 0.9375f, 0.75f, 0.9375f, 0.8125f,
|
||||
0.875f, 1.0f, 0.875f, 0.90625f, 0.9375f, 0.90625f, 0.9375f, 1.0f,
|
||||
0.875f, 0.90625f, 0.875f, 0.8125f, 0.9375f, 0.8125f, 0.9375f, 0.90625f,
|
||||
0.75f, 1.0f, 0.75f, 0.90625f, 0.8125f, 0.90625f, 0.8125f, 1.0f,
|
||||
0.75f, 0.90625f, 0.75f, 0.8125f, 0.8125f, 0.8125f, 0.8125f, 0.90625f,
|
||||
0.9375f, 1.0f, 0.9375f, 0.90625f, 1.0f, 0.90625f, 1.0f, 1.0f,
|
||||
0.9375f, 0.90625f, 0.9375f, 0.8125f, 1.0f, 0.8125f, 1.0f, 0.90625f
|
||||
};
|
||||
this.AddTextures(this.larm1_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube.alex;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class AlexRArm extends LimbCube {
|
||||
|
||||
protected float[] rarm_texcoords;
|
||||
|
||||
public AlexRArm(float scale) {
|
||||
super(3.0f * scale, 12.0f * scale, 4.0f * scale, -5.5f * scale, 2.0f * scale, 0.0f * scale, 1.5f, 1.0f, 0.0f, 0.0f, 10.0f, -10.0f, -1.0f, 20.0f, -20.0f, true, -1.0f);
|
||||
this.rarm_texcoords = new float[] {
|
||||
0.6875f, 0.5f, 0.6875f, 0.40625f, 0.734375f, 0.40625f, 0.734375f, 0.5f,
|
||||
0.6875f, 0.40625f, 0.6875f, 0.3125f, 0.734375f, 0.3125f, 0.734375f, 0.40625f,
|
||||
0.6875f, 0.3125f, 0.6875f, 0.25f, 0.734375f, 0.25f, 0.734375f, 0.3125f,
|
||||
0.734375f, 0.3125f, 0.734375f, 0.25f, 0.78125f, 0.25f, 0.78125f, 0.3125f,
|
||||
0.734375f, 0.5f, 0.734375f, 0.40625f, 0.796875f, 0.40625f, 0.796875f, 0.5f,
|
||||
0.734375f, 0.40625f, 0.734375f, 0.3125f, 0.796875f, 0.3125f, 0.796875f, 0.40625f,
|
||||
0.625f, 0.5f, 0.625f, 0.40625f, 0.6875f, 0.40625f, 0.6875f, 0.5f,
|
||||
0.625f, 0.40625f, 0.625f, 0.3125f, 0.6875f, 0.3125f, 0.6875f, 0.40625f,
|
||||
0.796875f, 0.5f, 0.796875f, 0.40625f, 0.84375f, 0.40625f, 0.84375f, 0.5f,
|
||||
0.796875f, 0.40625f, 0.796875f, 0.3125f, 0.84375f, 0.3125f, 0.84375f, 0.40625f
|
||||
};
|
||||
this.AddTextures(this.rarm_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube.alex;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class AlexRArmOverlay extends LimbCube {
|
||||
|
||||
protected float[] rarm1_texcoords;
|
||||
|
||||
public AlexRArmOverlay(float scale) {
|
||||
super(3.1764708f * scale, 12.705883f * scale, 4.2352943f * scale, -5.5f * scale, 2.0f * scale, 0.0f * scale, 1.5f, 1.0f, 0.0f, 0.0f, 10.0f, -10.0f, -1.0f, 20.0f, -20.0f, true, -1.0f);
|
||||
this.rarm1_texcoords = new float[] {
|
||||
0.6875f, 0.75f, 0.6875f, 0.65625f, 0.734375f, 0.65625f, 0.734375f, 0.75f,
|
||||
0.6875f, 0.65625f, 0.6875f, 0.5625f, 0.734375f, 0.5625f, 0.734375f, 0.65625f,
|
||||
0.6875f, 0.5625f, 0.6875f, 0.5f, 0.734375f, 0.5f, 0.734375f, 0.5625f,
|
||||
0.734375f, 0.5625f, 0.734375f, 0.5f, 0.78125f, 0.5f, 0.78125f, 0.5625f,
|
||||
0.734375f, 0.75f, 0.734375f, 0.65625f, 0.796875f, 0.65625f, 0.796875f, 0.75f,
|
||||
0.734375f, 0.65625f, 0.734375f, 0.5625f, 0.796875f, 0.5625f, 0.796875f, 0.65625f,
|
||||
0.625f, 0.75f, 0.625f, 0.65625f, 0.6875f, 0.65625f, 0.6875f, 0.75f,
|
||||
0.625f, 0.65625f, 0.625f, 0.5625f, 0.6875f, 0.5625f, 0.6875f, 0.65625f,
|
||||
0.796875f, 1.0f, 0.796875f, 0.90625f, 0.84375f, 0.90625f, 0.84375f, 1.0f,
|
||||
0.796875f, 0.90625f, 0.796875f, 0.8125f, 0.84375f, 0.8125f, 0.84375f, 0.90625f
|
||||
};
|
||||
this.AddTextures(this.rarm1_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube.steve;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class LArm extends LimbCube {
|
||||
|
||||
protected float[] larm_texcoords;
|
||||
|
||||
public LArm(float scale) {
|
||||
super(4.0f * scale, 12.0f * scale, 4.0f * scale, 6.0f * scale, 2.0f * scale, 0.0f * scale, -1.5f, 1.0f, 0.0f, 0.0f, 10.0f, -10.0f, 1.0f, 20.0f, -20.0f, true, -1.0f);
|
||||
this.larm_texcoords = new float[] {
|
||||
0.5625f, 1.0f, 0.5625f, 0.90625f, 0.625f, 0.90625f, 0.625f, 1.0f,
|
||||
0.5625f, 0.90625f, 0.5625f, 0.8125f, 0.625f, 0.8125f, 0.625f, 0.90625f,
|
||||
0.5625f, 0.8125f, 0.5625f, 0.75f, 0.625f, 0.75f, 0.625f, 0.8125f,
|
||||
0.625f, 0.8125f, 0.625f, 0.75f, 0.6875f, 0.75f, 0.6875f, 0.8125f,
|
||||
0.625f, 1.0f, 0.625f, 0.90625f, 0.6875f, 0.90625f, 0.6875f, 1.0f,
|
||||
0.625f, 0.90625f, 0.625f, 0.8125f, 0.6875f, 0.8125f, 0.6875f, 0.90625f,
|
||||
0.5f, 1.0f, 0.5f, 0.90625f, 0.5625f, 0.90625f, 0.5625f, 1.0f,
|
||||
0.5f, 0.90625f, 0.5f, 0.8125f, 0.5625f, 0.8125f, 0.5625f, 0.90625f,
|
||||
0.6875f, 1.0f, 0.6875f, 0.90625f, 0.75f, 0.90625f, 0.75f, 1.0f,
|
||||
0.6875f, 0.90625f, 0.6875f, 0.8125f, 0.75f, 0.8125f, 0.75f, 0.90625f
|
||||
};
|
||||
this.AddTextures(this.larm_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube.steve;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class LArmOverlay extends LimbCube {
|
||||
|
||||
protected float[] larm1_texcoords;
|
||||
|
||||
public LArmOverlay(float scale) {
|
||||
super(4.2352943f * scale, 12.705883f * scale, 4.2352943f * scale, 6.0f * scale, 2.0f * scale, 0.0f * scale, -1.5f, 1.0f, 0.0f, 0.0f, 10.0f, -10.0f, 1.0f, 20.0f, -20.0f, true, -1.0f);
|
||||
this.larm1_texcoords = new float[] {
|
||||
0.8125f, 1.0f, 0.8125f, 0.90625f, 0.875f, 0.90625f, 0.875f, 1.0f,
|
||||
0.8125f, 0.90625f, 0.8125f, 0.8125f, 0.875f, 0.8125f, 0.875f, 0.90625f,
|
||||
0.8125f, 0.8125f, 0.8125f, 0.75f, 0.875f, 0.75f, 0.875f, 0.8125f,
|
||||
0.875f, 0.8125f, 0.875f, 0.75f, 0.9375f, 0.75f, 0.9375f, 0.8125f,
|
||||
0.875f, 1.0f, 0.875f, 0.90625f, 0.9375f, 0.90625f, 0.9375f, 1.0f,
|
||||
0.875f, 0.90625f, 0.875f, 0.8125f, 0.9375f, 0.8125f, 0.9375f, 0.90625f,
|
||||
0.75f, 1.0f, 0.75f, 0.90625f, 0.8125f, 0.90625f, 0.8125f, 1.0f,
|
||||
0.75f, 0.90625f, 0.75f, 0.8125f, 0.8125f, 0.8125f, 0.8125f, 0.90625f,
|
||||
0.9375f, 1.0f, 0.9375f, 0.90625f, 1.0f, 0.90625f, 1.0f, 1.0f,
|
||||
0.9375f, 0.90625f, 0.9375f, 0.8125f, 1.0f, 0.8125f, 1.0f, 0.90625f
|
||||
};
|
||||
this.AddTextures(this.larm1_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube.steve;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class RArm extends LimbCube {
|
||||
|
||||
protected float[] rarm_texcoords;
|
||||
|
||||
public RArm(float scale) {
|
||||
super(4.0f * scale, 12.0f * scale, 4.0f * scale, -6.0f * scale, 2.0f * scale, 0.0f * scale, 1.5f, 1.0f, 0.0f, 0.0f, 10.0f, -10.0f, -1.0f, 20.0f, -20.0f, true, -1.0f);
|
||||
this.rarm_texcoords = new float[] {
|
||||
0.6875f, 0.5f, 0.6875f, 0.40625f, 0.75f, 0.40625f, 0.75f, 0.5f,
|
||||
0.6875f, 0.40625f, 0.6875f, 0.3125f, 0.75f, 0.3125f, 0.75f, 0.40625f,
|
||||
0.6875f, 0.3125f, 0.6875f, 0.25f, 0.75f, 0.25f, 0.75f, 0.3125f,
|
||||
0.75f, 0.3125f, 0.75f, 0.25f, 0.8125f, 0.25f, 0.8125f, 0.3125f,
|
||||
0.75f, 0.5f, 0.75f, 0.40625f, 0.8125f, 0.40625f, 0.8125f, 0.5f,
|
||||
0.75f, 0.40625f, 0.75f, 0.3125f, 0.8125f, 0.3125f, 0.8125f, 0.40625f,
|
||||
0.625f, 0.5f, 0.625f, 0.40625f, 0.6875f, 0.40625f, 0.6875f, 0.5f,
|
||||
0.625f, 0.40625f, 0.625f, 0.3125f, 0.6875f, 0.3125f, 0.6875f, 0.40625f,
|
||||
0.8125f, 0.5f, 0.8125f, 0.40625f, 0.875f, 0.40625f, 0.875f, 0.5f,
|
||||
0.8125f, 0.40625f, 0.8125f, 0.3125f, 0.875f, 0.3125f, 0.875f, 0.40625f
|
||||
};
|
||||
this.AddTextures(this.rarm_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.tungsten.fcllibrary.skin.body.cube.steve;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.body.LimbCube;
|
||||
|
||||
public class RArmOverlay extends LimbCube {
|
||||
|
||||
protected float[] rarm1_texcoords;
|
||||
|
||||
public RArmOverlay(float scale) {
|
||||
super(4.2352943f * scale, 12.705883f * scale, 4.2352943f * scale, -6.0f * scale, 2.0f * scale, 0.0f * scale, 1.5f, 1.0f, 0.0f, 0.0f, 10.0f, -10.0f, -1.0f, 20.0f, -20.0f, true, -1.0f);
|
||||
this.rarm1_texcoords = new float[] {
|
||||
0.6875f, 0.75f, 0.6875f, 0.65625f, 0.75f, 0.65625f, 0.75f, 0.75f,
|
||||
0.6875f, 0.65625f, 0.6875f, 0.5625f, 0.75f, 0.5625f, 0.75f, 0.65625f,
|
||||
0.6875f, 0.5625f, 0.6875f, 0.5f, 0.75f, 0.5f, 0.75f, 0.5625f,
|
||||
0.75f, 0.5625f, 0.75f, 0.5f, 0.8125f, 0.5f, 0.8125f, 0.5625f,
|
||||
0.75f, 0.75f, 0.75f, 0.65625f, 0.8125f, 0.65625f, 0.8125f, 0.75f,
|
||||
0.75f, 0.65625f, 0.75f, 0.5625f, 0.8125f, 0.5625f, 0.8125f, 0.65625f,
|
||||
0.625f, 0.75f, 0.625f, 0.65625f, 0.6875f, 0.65625f, 0.6875f, 0.75f,
|
||||
0.625f, 0.65625f, 0.625f, 0.5625f, 0.6875f, 0.5625f, 0.6875f, 0.65625f,
|
||||
0.8125f, 0.75f, 0.8125f, 0.65625f, 0.875f, 0.65625f, 0.875f, 0.75f,
|
||||
0.8125f, 0.65625f, 0.8125f, 0.5625f, 0.875f, 0.5625f, 0.875f, 0.65625f
|
||||
};
|
||||
this.AddTextures(this.rarm1_texcoords);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package com.tungsten.fcllibrary.skin.cape;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
public class CapeCube {
|
||||
protected float[] angle_axis;
|
||||
protected float[] face_vertices;
|
||||
protected float mAngle;
|
||||
protected FloatBuffer mNormalVertexBuffer;
|
||||
protected float[] mOffset;
|
||||
protected float[] mScale;
|
||||
protected ArrayList<FloatBuffer> mTextureBuffers;
|
||||
protected FloatBuffer mVertexBuffer;
|
||||
protected float max_angle;
|
||||
protected float min_angle;
|
||||
protected float[] normal_vertices;
|
||||
protected float step_value;
|
||||
|
||||
public CapeCube(final float n, final float n2, final float n3, final float n4, final float n5, final float n6) {
|
||||
this.mScale = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.mOffset = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.mAngle = 0.0f;
|
||||
this.step_value = -0.15f;
|
||||
this.max_angle = 3.0f;
|
||||
this.min_angle = -3.0f;
|
||||
this.angle_axis = new float[] { 0.0f, 0.0f, 0.0f };
|
||||
this.face_vertices = new float[] { -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f };
|
||||
this.normal_vertices = new float[] { 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f };
|
||||
this.mTextureBuffers = new ArrayList<FloatBuffer>();
|
||||
this.mScale[0] = n;
|
||||
this.mScale[1] = n2;
|
||||
this.mScale[2] = n3;
|
||||
this.mOffset[0] = n4;
|
||||
this.mOffset[1] = n5;
|
||||
this.mOffset[2] = n6;
|
||||
for (int i = 0; i < 24; ++i) {
|
||||
this.face_vertices[i * 3] = this.face_vertices[i * 3] * this.mScale[0] / 2.0f;
|
||||
this.face_vertices[i * 3 + 1] = this.face_vertices[i * 3 + 1] * this.mScale[1] / 2.0f;
|
||||
this.face_vertices[i * 3 + 2] = this.face_vertices[i * 3 + 2] * this.mScale[2] / 2.0f;
|
||||
}
|
||||
final ByteBuffer allocateDirect = ByteBuffer.allocateDirect(this.face_vertices.length * 4);
|
||||
allocateDirect.order(ByteOrder.nativeOrder());
|
||||
(this.mVertexBuffer = allocateDirect.asFloatBuffer()).put(this.face_vertices);
|
||||
this.mVertexBuffer.position(0);
|
||||
final ByteBuffer allocateDirect2 = ByteBuffer.allocateDirect(this.normal_vertices.length * 4);
|
||||
allocateDirect2.order(ByteOrder.nativeOrder());
|
||||
(this.mNormalVertexBuffer = allocateDirect2.asFloatBuffer()).put(this.normal_vertices);
|
||||
this.mNormalVertexBuffer.position(0);
|
||||
}
|
||||
|
||||
public CapeCube(final float n, final float n2, final float n3, final float n4, final float n5, final float n6, final float step_value, final float n7, final float n8, final float n9, final float max_angle, final float min_angle) {
|
||||
this(n, n2, n3, n4, n5, n6);
|
||||
this.step_value = step_value;
|
||||
this.max_angle = max_angle;
|
||||
this.min_angle = min_angle;
|
||||
this.angle_axis[0] = n7;
|
||||
this.angle_axis[1] = n8;
|
||||
this.angle_axis[2] = n9;
|
||||
}
|
||||
|
||||
public FloatBuffer AddTextures(final float[] array) {
|
||||
final ByteBuffer allocateDirect = ByteBuffer.allocateDirect(array.length * 4);
|
||||
allocateDirect.order(ByteOrder.nativeOrder());
|
||||
final FloatBuffer floatBuffer = allocateDirect.asFloatBuffer();
|
||||
floatBuffer.put(array);
|
||||
floatBuffer.position(0);
|
||||
this.mTextureBuffers.add(floatBuffer);
|
||||
return floatBuffer;
|
||||
}
|
||||
|
||||
public void ClearAllTextures() {
|
||||
this.mTextureBuffers.clear();
|
||||
}
|
||||
|
||||
public void draw(final GL10 gl10, final boolean b) {
|
||||
gl10.glEnable(3042);
|
||||
gl10.glBlendFunc(1, 771);
|
||||
gl10.glEnableClientState(32884);
|
||||
gl10.glEnableClientState(32885);
|
||||
gl10.glEnableClientState(32888);
|
||||
gl10.glVertexPointer(3, 5126, 0, (Buffer)this.mVertexBuffer);
|
||||
gl10.glNormalPointer(5126, 0, (Buffer)this.mNormalVertexBuffer);
|
||||
gl10.glPushMatrix();
|
||||
gl10.glTranslatef(this.mOffset[0], this.mOffset[1], this.mOffset[2]);
|
||||
gl10.glTranslatef(0.0f, this.mScale[1] / 4.0f * 3.0f, 0.0f);
|
||||
gl10.glRotatef(12f, 1f, 0f, 0f);
|
||||
gl10.glTranslatef(0.0f, -this.mScale[1] / 4.0f * 3.0f, 0.0f);
|
||||
for (int i = 0; i < this.mTextureBuffers.size(); ++i) {
|
||||
gl10.glTexCoordPointer(2, 5126, 0, (Buffer)this.mTextureBuffers.get(i));
|
||||
for (int j = 0; j < 6; ++j) {
|
||||
gl10.glDrawArrays(6, j * 4, 4);
|
||||
}
|
||||
}
|
||||
gl10.glPopMatrix();
|
||||
gl10.glDisable(3042);
|
||||
gl10.glDisableClientState(32888);
|
||||
gl10.glDisableClientState(32884);
|
||||
}
|
||||
|
||||
public void setZeroRun() {
|
||||
this.mAngle = 0.0f;
|
||||
this.step_value = -0.15f;
|
||||
this.max_angle = 3.0f;
|
||||
this.min_angle = -3.0f;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.tungsten.fcllibrary.skin.cape;
|
||||
|
||||
public enum CapePart {
|
||||
|
||||
CAPE(0, "Cape", new CapePartSection[] { CapeSkin.FRONT.getCapePartSection(), CapeSkin.RIGHT.getCapePartSection(), CapeSkin.BACK.getCapePartSection(), CapeSkin.LEFT.getCapePartSection(), CapeSkin.TOP.getCapePartSection(), CapeSkin.BOTTOM.getCapePartSection() });
|
||||
|
||||
private CapePartSection[] capeParts;
|
||||
private String displayName;
|
||||
private int id;
|
||||
|
||||
private CapePart(final int id, final String displayName, final CapePartSection[] capeParts) {
|
||||
this.id = id;
|
||||
this.displayName = displayName;
|
||||
this.capeParts = capeParts;
|
||||
}
|
||||
|
||||
CapePartSection getCapePartSection(final int n) {
|
||||
return this.capeParts[n];
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public enum CapeSkin
|
||||
{
|
||||
BACK("BACK", 2, 2, "Back", 1, 1, 10, 16),
|
||||
BOTTOM("BOTTOM", 5, 5, "Bottom", 11, 0, 10, 1),
|
||||
FRONT("FRONT", 0, 0, "Front", 12, 1, 10, 16),
|
||||
LEFT("LEFT", 3, 3, "Left", 0, 1, 1, 16),
|
||||
RIGHT("RIGHT", 1, 1, "Right", 11, 1, 1, 16),
|
||||
TOP("TOP", 4, 4, "Top", 1, 0, 10, 1);
|
||||
|
||||
private String displayName;
|
||||
private int height;
|
||||
private int id;
|
||||
private int startX;
|
||||
private int startY;
|
||||
private int width;
|
||||
|
||||
private CapeSkin(final String s2, final int n2, final int id, final String displayName, final int startX, final int startY, final int width, final int height) {
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.displayName = displayName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
CapePartSection getCapePartSection() {
|
||||
return new CapePartSection("Cape", this.displayName, this.startX, this.startY, this.width, this.height);
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
int getPartId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.tungsten.fcllibrary.skin.cape;
|
||||
|
||||
public class CapePartSection {
|
||||
|
||||
String capePartName;
|
||||
int height;
|
||||
String sideName;
|
||||
int startX;
|
||||
int startY;
|
||||
int width;
|
||||
|
||||
public CapePartSection(final String capePartName, final String sideName, final int startX, final int startY, final int width, final int height) {
|
||||
this.capePartName = capePartName;
|
||||
this.sideName = sideName;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public String getCapePartName() {
|
||||
return this.capePartName;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return this.height;
|
||||
}
|
||||
|
||||
public String getSideName() {
|
||||
return this.sideName;
|
||||
}
|
||||
|
||||
public int getStartX() {
|
||||
return this.startX;
|
||||
}
|
||||
|
||||
public int getStartY() {
|
||||
return this.startY;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return this.width;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.tungsten.fcllibrary.skin.cape.cube;
|
||||
|
||||
import com.tungsten.fcllibrary.skin.cape.CapeCube;
|
||||
|
||||
public class Cape extends CapeCube {
|
||||
|
||||
protected float[] cape_texcoords;
|
||||
|
||||
public Cape(float scale) {
|
||||
super(10.0f * scale, 16.0f * scale, scale, 0.0f * scale, 0.0f * scale, -1.75f * scale, -0.15f * scale, 0.0f, 1.0f, 0.0f, 3.0f, -3.0f);
|
||||
this.cape_texcoords = new float[] {
|
||||
0.1875f, 0.53125f, 0.1875f, 0.03125f, 0.34375f, 0.03125f, 0.34375f, 0.53125f,
|
||||
0.015625f, 0.03125f, 0.015625f, 0f, 0.171875f, 0f, 0.171875f, 0.03125f,
|
||||
0.171875f, 0.03125f, 0.171875f, 0f, 0.328125f, 0f, 0.328125f, 0.03125f,
|
||||
0f, 0.53125f, 0f, 0.03125f, 0.015625f, 0.03125f, 0.015625f, 0.53125f,
|
||||
0.171875f, 0.53125f, 0.171875f, 0.03125f, 0.1875f, 0.03125f, 0.1875f, 0.53125f,
|
||||
0.015625f, 0.53125f, 0.015625f, 0.03125f, 0.171875f, 0.03125f, 0.171875f, 0.53125f
|
||||
};
|
||||
this.AddTextures(this.cape_texcoords);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<alpha
|
||||
android:duration="500"
|
||||
android:duration="800"
|
||||
android:fromAlpha="1"
|
||||
android:toAlpha="0" />
|
||||
<translate
|
||||
android:duration="500"
|
||||
android:duration="800"
|
||||
android:fromXDelta="0"
|
||||
android:fromYDelta="0"
|
||||
android:toXDelta="0"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<alpha
|
||||
android:duration="500"
|
||||
android:duration="800"
|
||||
android:fromAlpha="0"
|
||||
android:toAlpha="1" />
|
||||
<translate
|
||||
android:duration="500"
|
||||
android:duration="800"
|
||||
android:fromXDelta="0"
|
||||
android:fromYDelta="100%"
|
||||
android:toXDelta="0"
|
||||
|
|
Loading…
Reference in New Issue