コード例 #1
0
 /**
  * Relative bulk <i>put</i> method&nbsp;&nbsp;<i>(optional operation)</i>.
  *
  * <p>This method transfers the floats remaining in the given source buffer into this buffer. If
  * there are more floats remaining in the source buffer than in this buffer, that is, if
  * <tt>src.remaining()</tt>&nbsp;<tt>&gt;</tt>&nbsp;<tt>remaining()</tt>, then no floats are
  * transferred and a {@link BufferOverflowException} is thrown.
  *
  * <p>Otherwise, this method copies <i>n</i>&nbsp;=&nbsp;<tt>src.remaining()</tt> floats from the
  * given buffer into this buffer, starting at each buffer's current position. The positions of
  * both buffers are then incremented by <i>n</i>.
  *
  * <p>In other words, an invocation of this method of the form <tt>dst.put(src)</tt> has exactly
  * the same effect as the loop
  *
  * <pre>
  *     while (src.hasRemaining())
  *         dst.put(src.get()); </pre>
  *
  * except that it first checks that there is sufficient space in this buffer and it is potentially
  * much more efficient.
  *
  * @param src The source buffer from which floats are to be read; must not be this buffer
  * @return This buffer
  * @throws BufferOverflowException If there is insufficient space in this buffer for the remaining
  *     floats in the source buffer
  * @throws IllegalArgumentException If the source buffer is this buffer
  * @throws ReadOnlyBufferException If this buffer is read-only
  */
 public FloatBuffer put(FloatBuffer src) {
   if (src == this) throw new IllegalArgumentException();
   int n = src.remaining();
   if (n > remaining()) throw new BufferOverflowException();
   for (int i = 0; i < n; i++) put(src.get());
   return this;
 }
コード例 #2
0
 /**
  * Compares this buffer to another.
  *
  * <p>Two float buffers are compared by comparing their sequences of remaining elements
  * lexicographically, without regard to the starting position of each sequence within its
  * corresponding buffer.
  *
  * <p>Pairs of {@code float} elements are compared as if by invoking {@link
  * Float#compare(float,float)}, except that {@code -0.0} and {@code 0.0} are considered to be
  * equal. {@code Float.NaN} is considered by this method to be equal to itself and greater than
  * all other {@code float} values (including {@code Float.POSITIVE_INFINITY}).
  *
  * <p>A float buffer is not comparable to any other type of object.
  *
  * @return A negative integer, zero, or a positive integer as this buffer is less than, equal to,
  *     or greater than the given buffer
  */
 public int compareTo(FloatBuffer that) {
   int n = this.position() + Math.min(this.remaining(), that.remaining());
   for (int i = this.position(), j = that.position(); i < n; i++, j++) {
     int cmp = compare(this.get(i), that.get(j));
     if (cmp != 0) return cmp;
   }
   return this.remaining() - that.remaining();
 }
コード例 #3
0
 /**
  * Tells whether or not this buffer is equal to another object.
  *
  * <p>Two float buffers are equal if, and only if,
  *
  * <p>
  *
  * <ol>
  *   <li>
  *       <p>They have the same element type,
  *   <li>
  *       <p>They have the same number of remaining elements, and
  *   <li>
  *       <p>The two sequences of remaining elements, considered independently of their starting
  *       positions, are pointwise equal.
  *       <p>This method considers two float elements {@code a} and {@code b} to be equal if {@code
  *       (a == b) || (Float.isNaN(a) && Float.isNaN(b))}. The values {@code -0.0} and {@code +0.0}
  *       are considered to be equal, unlike {@link Float#equals(Object)}.
  * </ol>
  *
  * <p>A float buffer is not equal to any other type of object.
  *
  * @param ob The object to which this buffer is to be compared
  * @return <tt>true</tt> if, and only if, this buffer is equal to the given object
  */
 public boolean equals(Object ob) {
   if (this == ob) return true;
   if (!(ob instanceof FloatBuffer)) return false;
   FloatBuffer that = (FloatBuffer) ob;
   if (this.remaining() != that.remaining()) return false;
   int p = this.position();
   for (int i = this.limit() - 1, j = that.limit() - 1; i >= p; i--, j--)
     if (!equals(this.get(i), that.get(j))) return false;
   return true;
 }
コード例 #4
0
  public FloatBuffer put(FloatBuffer src) {

    if (src instanceof HeapFloatBuffer) {
      if (src == this) throw new IllegalArgumentException();
      HeapFloatBuffer sb = (HeapFloatBuffer) src;
      int n = sb.remaining();
      if (n > remaining()) throw new BufferOverflowException();
      System.arraycopy(sb.hb, sb.ix(sb.position()), hb, ix(position()), n);
      sb.position(sb.position() + n);
      position(position() + n);
    } else if (src.isDirect()) {
      int n = src.remaining();
      if (n > remaining()) throw new BufferOverflowException();
      src.get(hb, ix(position()), n);
      position(position() + n);
    } else {
      super.put(src);
    }
    return this;
  }
コード例 #5
0
ファイル: r_Sub2.java プロジェクト: mitch112/Smexy
 static final void method2376(int i) {
   Node_Sub24.method2650(false, -14651);
   anInt11066++;
   Node_Sub29_Sub2.anInt10015 = 0;
   boolean bool = true;
   for (int i_26_ = 0;
       (Class188_Sub1_Sub1.aByteArrayArray9334.length ^ 0xffffffff) < (i_26_ ^ 0xffffffff);
       i_26_++) {
     if (StandardPlane.anIntArray7980[i_26_] != -1
         && Class188_Sub1_Sub1.aByteArrayArray9334[i_26_] == null) {
       Class188_Sub1_Sub1.aByteArrayArray9334[i_26_] =
           Animable_Sub1_Sub1.aClass302_10618.method3524(
               false, 0, StandardPlane.anIntArray7980[i_26_]);
       if (Class188_Sub1_Sub1.aByteArrayArray9334[i_26_] == null) {
         Node_Sub29_Sub2.anInt10015++;
         bool = false;
       }
     }
     if (Class144.anIntArray1789[i_26_] != -1 && FileOnDisk.aByteArrayArray1331[i_26_] == null) {
       FileOnDisk.aByteArrayArray1331[i_26_] =
           Animable_Sub1_Sub1.aClass302_10618.method3512(
               Class15.XTEA_KEYS[i_26_], 0, -114, Class144.anIntArray1789[i_26_]);
       if (FileOnDisk.aByteArrayArray1331[i_26_] == null) {
         bool = false;
         Node_Sub29_Sub2.anInt10015++;
       }
     }
     if (Class42.anIntArray645[i_26_] != -1 && Class320_Sub6.aByteArrayArray8263[i_26_] == null) {
       Class320_Sub6.aByteArrayArray8263[i_26_] =
           Animable_Sub1_Sub1.aClass302_10618.method3524(false, 0, Class42.anIntArray645[i_26_]);
       if (Class320_Sub6.aByteArrayArray8263[i_26_] == null) {
         Node_Sub29_Sub2.anInt10015++;
         bool = false;
       }
     }
     if (ProducingGraphicsBuffer.anIntArray9895[i_26_] != -1
         && Class320_Sub18.aByteArrayArray8378[i_26_] == null) {
       Class320_Sub18.aByteArrayArray8378[i_26_] =
           Animable_Sub1_Sub1.aClass302_10618.method3524(
               false, 0, ProducingGraphicsBuffer.anIntArray9895[i_26_]);
       if (Class320_Sub18.aByteArrayArray8378[i_26_] == null) {
         Node_Sub29_Sub2.anInt10015++;
         bool = false;
       }
     }
     if (Class204.anIntArray2460 != null
         && Class194.aByteArrayArray2373[i_26_] == null
         && (Class204.anIntArray2460[i_26_] ^ 0xffffffff) != 0) {
       Class194.aByteArrayArray2373[i_26_] =
           Animable_Sub1_Sub1.aClass302_10618.method3512(
               Class15.XTEA_KEYS[i_26_], 0, 118, Class204.anIntArray2460[i_26_]);
       if (Class194.aByteArrayArray2373[i_26_] == null) {
         Node_Sub29_Sub2.anInt10015++;
         bool = false;
       }
     }
   }
   if (Class262_Sub15_Sub1.aClass224_10520 == null) {
     if (Class92.aCacheNode_Sub11_1233 != null
         && r_Sub1.aClass302_11047.method3516(
             Class92.aCacheNode_Sub11_1233.aString9537 + "_staticelements", -73)) {
       if (r_Sub1.aClass302_11047.method3527(
           Class92.aCacheNode_Sub11_1233.aString9537 + "_staticelements", 0)) {
         Class262_Sub15_Sub1.aClass224_10520 =
             Class152.method1695(
                 Class101.aBoolean1313,
                 0,
                 r_Sub1.aClass302_11047,
                 Class92.aCacheNode_Sub11_1233.aString9537 + "_staticelements");
       } else {
         bool = false;
         Node_Sub29_Sub2.anInt10015++;
       }
     } else {
       Class262_Sub15_Sub1.aClass224_10520 = new Class224(0);
     }
   }
   if (!bool) {
     Class118.anInt5407 = 1;
   } else {
     bool = true;
     Node_Sub2.anInt6937 = 0;
     for (int i_27_ = 0;
         (Class188_Sub1_Sub1.aByteArrayArray9334.length ^ 0xffffffff) < (i_27_ ^ 0xffffffff);
         i_27_++) {
       byte[] bs = FileOnDisk.aByteArrayArray1331[i_27_];
       if (bs != null) {
         int i_28_ =
             (Class262_Sub1.MAP_REGION_HASHES[i_27_] >> 8) * 64 - Node_Sub53.gameSceneBaseX;
         int i_29_ =
             64 * (Class262_Sub1.MAP_REGION_HASHES[i_27_] & 0xff) + -Class320_Sub4.gameSceneBaseY;
         if ((Class61.anInt898 ^ 0xffffffff) != -1) {
           i_28_ = 10;
           i_29_ = 10;
         }
         bool &=
             Class118.method1175(
                 bs,
                 -1,
                 i_28_,
                 Node_Sub54.GAME_SCENE_WDITH,
                 i_29_,
                 Class377_Sub1.GAME_SCENE_HEIGHT);
       }
       bs = Class320_Sub18.aByteArrayArray8378[i_27_];
       if (bs != null) {
         int i_30_ =
             (Class262_Sub1.MAP_REGION_HASHES[i_27_] >> 8) * 64 + -Node_Sub53.gameSceneBaseX;
         int i_31_ =
             -Class320_Sub4.gameSceneBaseY + (0xff & Class262_Sub1.MAP_REGION_HASHES[i_27_]) * 64;
         if (Class61.anInt898 != 0) {
           i_31_ = 10;
           i_30_ = 10;
         }
         bool &=
             Class118.method1175(
                 bs,
                 -1,
                 i_30_,
                 Node_Sub54.GAME_SCENE_WDITH,
                 i_31_,
                 Class377_Sub1.GAME_SCENE_HEIGHT);
       }
     }
     if (!bool) {
       Class118.anInt5407 = 2;
     } else {
       if ((Class118.anInt5407 ^ 0xffffffff) != -1) {
         Class169_Sub3.method1779(
             Class93.aGraphicsToolkit1241,
             Class22.aClass22_375.method297(Class35.language) + "<br>(100%)",
             true,
             Class169_Sub3.aClass357_8820,
             StandardSprite.aClass52_8945,
             -16777216);
       }
       CacheNode_Sub16_Sub1.method2387((byte) -114);
       Node_Sub36_Sub2.method2761((byte) 125);
       Class30.method343(-126);
       boolean bool_33_ = false;
       if (Class93.aGraphicsToolkit1241.z()
           && Class213.aNode_Sub27_2512.aClass320_Sub26_7269.method3779(false) == 2) {
         for (int i_34_ = 0;
             (Class188_Sub1_Sub1.aByteArrayArray9334.length ^ 0xffffffff) < (i_34_ ^ 0xffffffff);
             i_34_++) {
           if (Class320_Sub18.aByteArrayArray8378[i_34_] != null
               || Class320_Sub6.aByteArrayArray8263[i_34_] != null) {
             bool_33_ = true;
             break;
           }
         }
       }
       int i_35_;
       if ((Class213.aNode_Sub27_2512.aClass320_Sub16_7316.method3744(false) ^ 0xffffffff) == -2) {
         i_35_ = CacheNode_Sub15.anIntArray9586[Node_Sub38_Sub25.CURRENT_GAME_SCENE_SIZE];
       } else {
         i_35_ = CacheNode_Sub14.anIntArray9575[Node_Sub38_Sub25.CURRENT_GAME_SCENE_SIZE];
       }
       if (Class93.aGraphicsToolkit1241.p()) {
         i_35_++;
       }
       AbstractToolkit.method1267(
           Class93.aGraphicsToolkit1241,
           Class244.anInt3081,
           9,
           4,
           Node_Sub54.GAME_SCENE_WDITH,
           Class377_Sub1.GAME_SCENE_HEIGHT,
           i_35_,
           bool_33_,
           Class93.aGraphicsToolkit1241.e() > 0);
       Class262_Sub16.method3195(Node_Sub9_Sub5.anInt9766);
       if (Node_Sub9_Sub5.anInt9766 == 0) {
         Node_Sub10.method2540(null);
       } else {
         Node_Sub10.method2540(CacheNode_Sub18.aClass52_9609);
       }
       for (int i_36_ = 0; (i_36_ ^ 0xffffffff) > -5; i_36_++)
         Class304.SCENE_CLIP_DATA_PLANES[i_36_].method991(-119);
       Class163.method1738(-1096);
       PlayerUpdateReference.method3808(false, -1);
       Class262_Sub17.method3197(0);
       Class59.aBoolean867 = false;
       CacheNode_Sub16_Sub1.method2387((byte) -114);
       System.gc();
       Node_Sub24.method2650(true, -14651);
       Node_Sub9_Sub5.method2528(1390489120);
       Class237.anInt2906 = Class213.aNode_Sub27_2512.aClass320_Sub12_7282.method3730(false);
       Class339_Sub6.aBoolean8715 = Class201.anInt2446 >= 96;
       Class34.aBoolean532 = Class213.aNode_Sub27_2512.aClass320_Sub26_7269.method3779(false) == 2;
       Class163.aBoolean2015 =
           Class213.aNode_Sub27_2512.aClass320_Sub24_7317.method3773(false) == 1;
       Class256.anInt3237 =
           (Class213.aNode_Sub27_2512.aClass320_Sub19_7301.method3751(false) ^ 0xffffffff) == -2
               ? -1
               : Class94.anInt1249;
       Class382.aBoolean5254 =
           Class213.aNode_Sub27_2512.aClass320_Sub23_7290.method3770(false) == 1;
       Class169_Sub2_Sub1.aBoolean10563 =
           Class213.aNode_Sub27_2512.aClass320_Sub30_7275.method3796(false) == 1;
       Node_Sub38_Sub1.aClass277_Sub1_10084 =
           new Class277_Sub1(
               4, Node_Sub54.GAME_SCENE_WDITH, Class377_Sub1.GAME_SCENE_HEIGHT, false);
       if (Class61.anInt898 == 0) {
         Actor.method863(
             Class188_Sub1_Sub1.aByteArrayArray9334,
             (byte) -74,
             Node_Sub38_Sub1.aClass277_Sub1_10084);
       } else {
         Class368.method4078(
             Class188_Sub1_Sub1.aByteArrayArray9334,
             (byte) -119,
             Node_Sub38_Sub1.aClass277_Sub1_10084);
       }
       Class290_Sub2.method3426(
           Node_Sub54.GAME_SCENE_WDITH >> 4, (byte) 119, Class377_Sub1.GAME_SCENE_HEIGHT >> 4);
       Class89.method1022(false);
       if (bool_33_) {
         Node_Sub38_Sub17.method2842(true);
         Class270_Sub1.aClass277_Sub1_8028 =
             new Class277_Sub1(
                 1, Node_Sub54.GAME_SCENE_WDITH, Class377_Sub1.GAME_SCENE_HEIGHT, true);
         if ((Class61.anInt898 ^ 0xffffffff) == -1) {
           Actor.method863(
               Class320_Sub6.aByteArrayArray8263, (byte) -74, Class270_Sub1.aClass277_Sub1_8028);
           Node_Sub24.method2650(true, -14651);
         } else {
           Class368.method4078(
               Class320_Sub6.aByteArrayArray8263, (byte) -116, Class270_Sub1.aClass277_Sub1_8028);
           Node_Sub24.method2650(true, -14651);
         }
         Class270_Sub1.aClass277_Sub1_8028.method3343(
             Node_Sub38_Sub1.aClass277_Sub1_10084.anIntArrayArrayArray3520[0], (byte) 119, 0);
         Class270_Sub1.aClass277_Sub1_8028.method3339(
             -2, null, Class93.aGraphicsToolkit1241, null);
         Node_Sub38_Sub17.method2842(false);
       }
       Node_Sub38_Sub1.aClass277_Sub1_10084.method3339(
           -2,
           bool_33_ ? Class270_Sub1.aClass277_Sub1_8028.anIntArrayArrayArray3520 : null,
           Class93.aGraphicsToolkit1241,
           Class304.SCENE_CLIP_DATA_PLANES);
       if ((Class61.anInt898 ^ 0xffffffff) != -1) {
         Node_Sub24.method2650(true, -14651);
         CacheNode_Sub7.method2317(
             FileOnDisk.aByteArrayArray1331, (byte) -122, Node_Sub38_Sub1.aClass277_Sub1_10084);
       } else {
         Node_Sub24.method2650(true, -14651);
         Class178.method1811(
             31269, FileOnDisk.aByteArrayArray1331, Node_Sub38_Sub1.aClass277_Sub1_10084);
         if (Class194.aByteArrayArray2373 != null) {
           Class201.method2019(32273);
         }
       }
       Node_Sub36_Sub2.method2761((byte) 125);
       if (Class201.anInt2446 < 96) {
         Class189.method1934((byte) 17);
       }
       Node_Sub24.method2650(true, -14651);
       Node_Sub38_Sub1.aClass277_Sub1_10084.method3346(
           (byte) 75,
           Class93.aGraphicsToolkit1241,
           bool_33_ ? Class368.aPlaneArray4548[0] : null,
           null);
       Node_Sub38_Sub1.aClass277_Sub1_10084.method3356(
           false, Class93.aGraphicsToolkit1241, (byte) 83);
       Node_Sub24.method2650(true, -14651);
       if (bool_33_) {
         Node_Sub38_Sub17.method2842(true);
         Node_Sub24.method2650(true, -14651);
         if ((Class61.anInt898 ^ 0xffffffff) != -1) {
           CacheNode_Sub7.method2317(
               Class320_Sub18.aByteArrayArray8378, (byte) -92, Class270_Sub1.aClass277_Sub1_8028);
         } else {
           Class178.method1811(
               31269, Class320_Sub18.aByteArrayArray8378, Class270_Sub1.aClass277_Sub1_8028);
         }
         Node_Sub36_Sub2.method2761((byte) 125);
         Node_Sub24.method2650(true, -14651);
         Class270_Sub1.aClass277_Sub1_8028.method3346(
             (byte) 75, Class93.aGraphicsToolkit1241, null, Node_Sub38_Sub37.aPlaneArray10466[0]);
         Class270_Sub1.aClass277_Sub1_8028.method3356(
             true, Class93.aGraphicsToolkit1241, (byte) 83);
         Node_Sub24.method2650(true, -14651);
         Node_Sub38_Sub17.method2842(false);
       }
       Class115.method1159(-122);
       int i_37_ = Node_Sub38_Sub1.aClass277_Sub1_10084.anInt8046;
       if (i_37_ > CacheNode_Sub20_Sub1.myPlayerPlane) {
         i_37_ = CacheNode_Sub20_Sub1.myPlayerPlane;
       }
       if (CacheNode_Sub20_Sub1.myPlayerPlane - 1 > i_37_) {
         i_37_ = -1 + CacheNode_Sub20_Sub1.myPlayerPlane;
       }
       if (Class213.aNode_Sub27_2512.aClass320_Sub19_7301.method3751(false) != 0) {
         CacheNode_Sub1.method2280(0);
       } else {
         CacheNode_Sub1.method2280(i_37_);
       }
       for (int i_38_ = 0; (i_38_ ^ 0xffffffff) > -5; i_38_++) {
         for (int i_39_ = 0; i_39_ < Node_Sub54.GAME_SCENE_WDITH; i_39_++) {
           for (int i_40_ = 0;
               (i_40_ ^ 0xffffffff) > (Class377_Sub1.GAME_SCENE_HEIGHT ^ 0xffffffff);
               i_40_++) Node_Sub36.method2750(false, i_38_, i_40_, i_39_);
         }
       }
       Class46.method471(-1);
       CacheNode_Sub16_Sub1.method2387((byte) -114);
       Class109.method1127(false);
       Node_Sub36_Sub2.method2761((byte) 125);
       Class239.method3022(false);
       if (Node_Sub29.aFrame7344 != null
           && Class218.aClass123_2566.aClass365_1557 != null
           && Class151.anInt1843 == 12) {
         Animable_Sub3.anInt9139++;
         Node_Sub13 node_sub13 =
             FloatBuffer.method2250(
                 -386, Class169_Sub3.aClass318_8808, Class218.aClass123_2566.anIsaacCipher1571);
         node_sub13.aPacket7113.writeInt(1057001181);
         Class218.aClass123_2566.sendPacket(126, node_sub13);
       }
       if ((Class61.anInt898 ^ 0xffffffff) == -1) {
         int i_41_ = (-(Node_Sub54.GAME_SCENE_WDITH >> 4) + Player.anInt11178) / 8;
         int i_42_ = (Player.anInt11178 - -(Node_Sub54.GAME_SCENE_WDITH >> 4)) / 8;
         int i_43_ = (-(Class377_Sub1.GAME_SCENE_HEIGHT >> 4) + Class277.anInt3527) / 8;
         int i_44_ = ((Class377_Sub1.GAME_SCENE_HEIGHT >> 4) + Class277.anInt3527) / 8;
         for (int i_45_ = i_41_ - 1; i_42_ + 1 >= i_45_; i_45_++) {
           for (int i_46_ = i_43_ - 1; (1 + i_44_ ^ 0xffffffff) <= (i_46_ ^ 0xffffffff); i_46_++) {
             if ((i_45_ ^ 0xffffffff) > (i_41_ ^ 0xffffffff)
                 || i_45_ > i_42_
                 || (i_46_ ^ 0xffffffff) > (i_43_ ^ 0xffffffff)
                 || (i_44_ ^ 0xffffffff) > (i_46_ ^ 0xffffffff)) {
               Animable_Sub1_Sub1.aClass302_10618.method3531("m" + i_45_ + "_" + i_46_, -18758);
               Animable_Sub1_Sub1.aClass302_10618.method3531("l" + i_45_ + "_" + i_46_, -18758);
             }
           }
         }
       }
       if ((Class151.anInt1843 ^ 0xffffffff) != -5) {
         if ((Class151.anInt1843 ^ 0xffffffff) == -9) {
           Class48.method478(7, (byte) 108);
         } else if ((Class151.anInt1843 ^ 0xffffffff) == -11) {
           Class48.method478(9, (byte) 113);
         } else {
           Class48.method478(11, (byte) 105);
           if (Class218.aClass123_2566.aClass365_1557 != null) {
             Node_Sub13 node_sub13 =
                 FloatBuffer.method2250(
                     -386, Class91.aClass318_1220, Class218.aClass123_2566.anIsaacCipher1571);
             Class218.aClass123_2566.sendPacket(127, node_sub13);
           }
         }
       } else {
         Class48.method478(3, (byte) 109);
       }
       Class365_Sub1.method4070(-122);
       CacheNode_Sub16_Sub1.method2387((byte) -114);
       Node_Sub38_Sub10.method2824(0);
       Class194_Sub1.aBoolean6892 = true;
       if (Class19.aBoolean313) {
         Node_Sub7.method2422(
             (byte) 43, "Took: " + (-Class366.aLong4528 + Class313.method3650(false)) + "ms");
         Class19.aBoolean313 = false;
       }
     }
   }
 }