mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-30 06:35:35 +00:00
Few refactorings & formatting
This commit is contained in:
@@ -456,6 +456,15 @@ public class SWFOutputStream extends OutputStream {
|
||||
}
|
||||
return nBits;
|
||||
}
|
||||
|
||||
public static int getNeededBitsU(int first, int... params) {
|
||||
int nBits = 0;
|
||||
nBits = enlargeBitCountU(nBits, first);
|
||||
for (int i = 0; i < params.length; i++) {
|
||||
nBits = enlargeBitCountU(nBits, params[i]);
|
||||
}
|
||||
return nBits;
|
||||
}
|
||||
|
||||
private static long getIntPart(double value) {
|
||||
if (value < 0) {
|
||||
@@ -491,13 +500,21 @@ public class SWFOutputStream extends OutputStream {
|
||||
return getNeededBitsS(k) + 16;
|
||||
}
|
||||
|
||||
private static int enlargeBitCountS(int currentBitCount, int value) {
|
||||
public static int enlargeBitCountS(int currentBitCount, int value) {
|
||||
int neededNew = getNeededBitsS(value);
|
||||
if (neededNew > currentBitCount) {
|
||||
return neededNew;
|
||||
}
|
||||
return currentBitCount;
|
||||
}
|
||||
|
||||
public static int enlargeBitCountU(int currentBitCount, int value) {
|
||||
int neededNew = getNeededBitsU(value);
|
||||
if (neededNew > currentBitCount) {
|
||||
return neededNew;
|
||||
}
|
||||
return currentBitCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes MATRIX value to the stream
|
||||
|
||||
Reference in New Issue
Block a user