Advertisement
riking

FRY_ModelFariy

Feb 13th, 2012
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 7.83 KB | None | 0 0
  1. import org.lwjgl.opengl.GL11;
  2.  
  3. public class FRY_ModelFairy extends vs
  4. {
  5.   public ps strand;
  6.   public ps crown;
  7.   public ps wingLeft;
  8.   public ps wingRight;
  9.   public boolean flymode;
  10.   public boolean showCrown;
  11.   public boolean scoutWings;
  12.   public float sinage;
  13.  
  14.   public FRY_ModelFairy()
  15.   {
  16.     this(0.0F);
  17.   }
  18.  
  19.   public FRY_ModelFairy(float f) {
  20.     this(f, 0.0F);
  21.   }
  22.  
  23.   public FRY_ModelFairy(float f, float f1) {
  24.     this.r = 0;
  25.     this.s = 0;
  26.     this.t = false;
  27.     this.flymode = (this.showCrown = 0);
  28.  
  29.     this.c = new ps(this, 0, 0);
  30.     this.c.a(-3.0F, -6.0F, -3.0F, 6, 6, 6, f);
  31.     this.c.a(0.0F, 0.0F + f1, 0.0F);
  32.  
  33.     this.strand = new ps(this).b(64, 32);
  34.     this.strand.a(0, 20).a(-3.0F, -5.0F, 3.0F, 6, 3, 1, f);
  35.     this.strand.a(24, 0).a(-4.0F, -5.0F, -3.0F, 1, 3, 6, f);
  36.     this.strand.a(24, 0).a(3.0F, -5.0F, -3.0F, 1, 3, 6, f);
  37.     this.strand.a(13, 23).a(-5.0F, -2.5F, 1.5F, 10, 3, 3, f);
  38.     this.strand.a(0.0F, 0.0F + f1, 0.0F);
  39.  
  40.     this.crown = new ps(this, 37, 14);
  41.     this.crown.a(-3.0F, -6.75F, -3.0F, 6, 3, 6, f + 0.25F);
  42.     this.crown.a(0.0F, 0.0F + f1, 0.0F);
  43.  
  44.     this.e = new ps(this).b(64, 32);
  45.     this.e.a(8, 12).a(-2.0F, 0.0F, -1.0F, 4, 6, 2, f);
  46.     this.e.a(15, 20).a(-2.0F, 1.0F, -2.0F, 4, 2, 1, f);
  47.     this.e.a(0.0F, 0.0F + f1, 0.0F);
  48.  
  49.     this.wingRight = new ps(this, 27, 9);
  50.     this.wingRight.a(0.0F, -0.75F, -1.0F, 5, 4, 1, f + 0.25F);
  51.     this.wingRight.a(0.5F, 0.0F + f1, 1.0F);
  52.  
  53.     this.wingLeft = new ps(this, 27, 9);
  54.     this.wingLeft.i = true;
  55.     this.wingLeft.a(-5.0F, -0.75F, -1.0F, 5, 4, 1, f + 0.25F);
  56.     this.wingLeft.a(-0.5F, 0.0F + f1, 1.0F);
  57.  
  58.     this.f = new ps(this, 0, 12);
  59.     this.f.a(-1.0F, -1.0F, -1.0F, 2, 6, 2, f);
  60.     this.f.a(-5.0F, 1.0F + f1, 0.0F);
  61.  
  62.     this.g = new ps(this, 0, 12);
  63.     this.g.i = true;
  64.     this.g.a(-1.0F, -1.0F, -1.0F, 2, 6, 2, f);
  65.     this.g.a(5.0F, 1.0F + f1, 0.0F);
  66.  
  67.     this.n = new ps(this, 20, 12);
  68.     this.n.a(-1.0F, 0.0F, -1.0F, 2, 6, 2, f);
  69.     this.n.a(-1.0F, 18.0F + f1, 0.0F);
  70.  
  71.     this.o = new ps(this, 20, 12);
  72.     this.o.i = true;
  73.     this.o.a(-1.0F, 0.0F, -1.0F, 2, 6, 2, f);
  74.     this.o.a(1.0F, 18.0F + f1, 0.0F);
  75.   }
  76.  
  77.   public void a(ms e, float f, float f1, float f2, float f3, float f4, float f5) {
  78.     GL11.glPushMatrix();
  79.  
  80.     a(f, f1, f2, f3, f4, f5);
  81.     this.c.a(f5);
  82.     this.e.a(f5);
  83.     this.f.a(f5);
  84.     this.g.a(f5);
  85.     this.n.a(f5);
  86.     this.o.a(f5);
  87.  
  88.     this.strand.a(f5);
  89.  
  90.     if (this.showCrown) {
  91.       this.crown.a(f5);
  92.     }
  93.  
  94.     if (!this.scoutWings) {
  95.       this.wingLeft.a(f5);
  96.       this.wingRight.a(f5);
  97.     }
  98.     GL11.glPopMatrix();
  99.   }
  100.  
  101.   public void a(float f, float f1, float f2, float f3, float f4, float f5) {
  102.     this.c.g = (f3 / 57.29578F);
  103.     this.c.f = (f4 / 57.29578F);
  104.  
  105.     this.strand.g = this.c.g;
  106.     this.strand.f = this.c.f;
  107.  
  108.     this.crown.g = this.c.g;
  109.     this.crown.f = this.c.f;
  110.  
  111.     if (!this.flymode) {
  112.       this.f.f = (ga.b(f * 0.6662F + 3.141593F) * 2.0F * f1 * 0.5F);
  113.       this.g.f = (ga.b(f * 0.6662F) * 2.0F * f1 * 0.5F);
  114.       this.n.f = (ga.b(f * 0.6662F) * 1.4F * f1);
  115.       this.o.f = (ga.b(f * 0.6662F + 3.141593F) * 1.4F * f1);
  116.     } else {
  117.       this.f.f = 0.0F;
  118.       this.g.f = 0.0F;
  119.       this.n.f = 0.0F;
  120.       this.o.f = 0.0F;
  121.     }
  122.  
  123.     this.f.h = 0.05F;
  124.     this.g.h = -0.05F;
  125.     this.n.g = 0.0F;
  126.     this.o.g = 0.0F;
  127.     this.n.h = 0.0F;
  128.     this.o.h = 0.0F;
  129.  
  130.     if (((this.i) || (this.t)) && (!this.flymode)) {
  131.       this.f.f += -0.6283185F;
  132.       this.g.f += -0.6283185F;
  133.       this.n.f = -1.256637F;
  134.       this.o.f = -1.256637F;
  135.       this.n.g = 0.314159F;
  136.       this.o.g = -0.314159F;
  137.       if (this.t) {
  138.         this.n.f = -1.570796F;
  139.         this.o.f = -1.570796F;
  140.       }
  141.     }
  142.  
  143.     if (this.r != 0) {
  144.       this.g.f = (this.g.f * 0.5F - 0.314159F);
  145.     }
  146.  
  147.     if (this.s != 0) {
  148.       this.f.f = (this.f.f * 0.5F - 0.314159F);
  149.     }
  150.  
  151.     this.f.g = 0.0F;
  152.     this.g.g = 0.0F;
  153.  
  154.     if (this.h > -9990.0F) {
  155.       float f6 = this.h;
  156.       this.e.g = (ga.a(ga.c(f6) * 3.141593F * 2.0F) * 0.2F);
  157.       this.wingLeft.g = (this.wingRight.g = ga.a(ga.c(f6) * 3.141593F * 2.0F) * 0.2F);
  158.       this.f.e = (ga.a(this.e.g) * 5.0F);
  159.       this.f.c = (-ga.b(this.e.g) * 5.0F + 2.0F);
  160.       this.g.e = (-ga.a(this.e.g) * 5.0F);
  161.       this.g.c = (ga.b(this.e.g) * 5.0F - 2.0F);
  162.       this.f.g += this.e.g;
  163.       this.g.g += this.e.g;
  164.       this.g.f += this.e.g;
  165.       f6 = 1.0F - this.h;
  166.       f6 *= f6;
  167.       f6 *= f6;
  168.       f6 = 1.0F - f6;
  169.       float f8 = ga.a(f6 * 3.141593F);
  170.       float f9 = ga.a(this.h * 3.141593F) * -(this.c.f - 0.7F) * 0.75F;
  171.       ps tmp720_717 = this.f; tmp720_717.f = (float)(tmp720_717.f - (f8 * 1.2D + f9));
  172.       this.f.g += this.e.g * 2.0F;
  173.       this.f.h = (ga.a(this.h * 3.141593F) * -0.4F);
  174.     }
  175.  
  176.     if (this.flymode) {
  177.       float f7 = 3.141593F;
  178.       this.e.f = (f7 / 2.0F);
  179.       this.e.d = 19.0F;
  180.       this.wingLeft.f = (f7 / 2.0F);
  181.       this.wingRight.f = (f7 / 2.0F);
  182.       this.wingLeft.d = 17.5F;
  183.       this.wingRight.d = 17.5F;
  184.       this.wingLeft.e = 1.0F;
  185.       this.wingRight.e = 1.0F;
  186.       this.n.e = 0.0F;
  187.       this.o.e = 0.0F;
  188.       this.f.d = 19.0F;
  189.       this.g.d = 19.0F;
  190.       this.n.d = 18.0F;
  191.       this.o.d = 18.0F;
  192.       this.n.e = 6.0F;
  193.       this.o.e = 6.0F;
  194.       this.c.e = -3.0F;
  195.       this.c.d = 19.75F;
  196.  
  197.       this.strand.e = -3.0F;
  198.       this.strand.d = 19.75F;
  199.       this.crown.e = -3.0F;
  200.       this.crown.d = 19.75F;
  201.     } else {
  202.       this.e.f = 0.0F;
  203.       this.e.d = 12.0F;
  204.       this.wingLeft.f = 0.0F;
  205.       this.wingRight.f = 0.0F;
  206.       this.wingLeft.d = 12.5F;
  207.       this.wingRight.d = 12.5F;
  208.       this.wingLeft.e = 1.0F;
  209.       this.wingRight.e = 1.0F;
  210.       this.n.e = 0.0F;
  211.       this.o.e = 0.0F;
  212.  
  213.       if (this.i) {
  214.         this.f.d = 13.0F;
  215.         this.g.d = 13.0F;
  216.       } else {
  217.         this.f.d = 13.0F;
  218.         this.g.d = 13.0F;
  219.       }
  220.  
  221.       this.n.d = 18.0F;
  222.       this.o.d = 18.0F;
  223.       this.n.e = 0.0F;
  224.       this.o.e = 0.0F;
  225.       this.c.e = 0.0F;
  226.       this.c.d = 12.0F;
  227.  
  228.       this.strand.e = 0.0F;
  229.       this.strand.d = 12.0F;
  230.       this.crown.e = 0.0F;
  231.       this.crown.d = 12.0F;
  232.     }
  233.  
  234.     if (this.flymode) {
  235.       this.f.h += ga.b(f2 * 0.09F) * 0.1F + 0.05F;
  236.       this.g.h -= ga.b(f2 * 0.09F) * 0.1F + 0.05F;
  237.       this.f.f += ga.a(f2 * 0.067F) * 0.1F;
  238.       this.g.f -= ga.a(f2 * 0.067F) * 0.1F;
  239.       this.n.h += ga.b(f2 * 0.09F) * 0.1F + 0.05F;
  240.       this.o.h -= ga.b(f2 * 0.09F) * 0.1F + 0.05F;
  241.       this.n.f = 0.1F;
  242.       this.o.f = 0.1F;
  243.     } else {
  244.       this.f.h += ga.b(f2 * 0.09F) * 0.05F + 0.05F;
  245.       this.g.h -= ga.b(f2 * 0.09F) * 0.05F + 0.05F;
  246.       this.f.f += ga.a(f2 * 0.067F) * 0.05F;
  247.       this.g.f -= ga.a(f2 * 0.067F) * 0.05F;
  248.     }
  249.  
  250.     if (this.flymode) {
  251.       this.wingLeft.g = 0.1F;
  252.       this.wingRight.g = -0.1F;
  253.       ps tmp1505_1502 = this.wingLeft; tmp1505_1502.g = (float)(tmp1505_1502.g + Math.sin(this.sinage) / 6.0D);
  254.       ps tmp1531_1528 = this.wingRight; tmp1531_1528.g = (float)(tmp1531_1528.g - Math.sin(this.sinage) / 6.0D);
  255.       this.wingLeft.h = 0.5F;
  256.       this.wingRight.h = -0.5F;
  257.     } else {
  258.       this.wingLeft.g = 0.6F;
  259.       this.wingRight.g = -0.6F;
  260.       ps tmp1596_1593 = this.wingLeft; tmp1596_1593.g = (float)(tmp1596_1593.g + Math.sin(this.sinage) / 3.0D);
  261.       ps tmp1622_1619 = this.wingRight; tmp1622_1619.g = (float)(tmp1622_1619.g - Math.sin(this.sinage) / 3.0D);
  262.       this.wingLeft.h = 0.125F;
  263.       this.wingRight.h = -0.125F;
  264.     }
  265.     ps tmp1666_1663 = this.wingLeft; tmp1666_1663.h = (float)(tmp1666_1663.h + Math.cos(this.sinage) / (this.flymode ? 3.0F : 8.0F));
  266.     ps tmp1704_1701 = this.wingRight; tmp1704_1701.h = (float)(tmp1704_1701.h - Math.cos(this.sinage) / (this.flymode ? 3.0F : 8.0F));
  267.   }
  268.  
  269.   public void a(float f)
  270.   {
  271.   }
  272.  
  273.   public void b(float f)
  274.   {
  275.   }
  276. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement