2022-02-02 22:51:56 +01:00
|
|
|
package love.distributedrebirth.numberxd.base2t.part;
|
2022-01-28 11:19:52 +01:00
|
|
|
|
2022-02-02 18:06:12 +01:00
|
|
|
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
|
2022-02-02 18:29:34 +01:00
|
|
|
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
2022-02-02 18:06:12 +01:00
|
|
|
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
|
2022-02-02 19:17:30 +01:00
|
|
|
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
|
2022-01-30 18:05:18 +01:00
|
|
|
|
2022-02-02 18:29:34 +01:00
|
|
|
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
2022-02-02 19:17:30 +01:00
|
|
|
@BãßBȍőnClassInfoʸᴰ(name = "T08PartOctal", purpose = "The distribution by 8.")
|
2022-02-03 13:21:40 +01:00
|
|
|
public enum T08PartOctal implements BãßBȍőnPartʸᴰ<T08PartOctal>,BãßBȍőnPartShiftBitsʸᴰ<T08PartOctal> {
|
2022-01-28 11:19:52 +01:00
|
|
|
|
2022-02-03 13:21:40 +01:00
|
|
|
PART_1("˥","心","heart",0),
|
|
|
|
|
PART_2("˩","頭","head", 3),
|
|
|
|
|
PART_3("꜒","眼","eye", 6),
|
|
|
|
|
PART_4("꜖","嘴","mouth",9),
|
|
|
|
|
PART_5("꜈","臂","arm", 12),
|
|
|
|
|
PART_6("꜌","手","hand", 15),
|
|
|
|
|
PART_7("꜍","肢","leg", 18),
|
|
|
|
|
PART_8("꜑","腳","feet", 21),
|
2022-01-28 11:19:52 +01:00
|
|
|
;
|
|
|
|
|
|
2022-01-28 18:37:50 +01:00
|
|
|
public static int BIT_COUNT = 3;
|
2022-01-28 11:19:52 +01:00
|
|
|
private static final byte BITMASK = 0x07;
|
2022-02-02 18:32:23 +01:00
|
|
|
private final BãßBȍőnCoffinOpenʸᴰ<BãßBȍőnPartKeyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
|
|
|
|
|
public BãßBȍőnCoffinʸᴰ<BãßBȍőnPartKeyʸᴰ> GET_BBC() { return BBC; }
|
2022-02-02 17:34:46 +01:00
|
|
|
public static int LENGTH() { return values().length; };
|
2022-01-30 14:50:21 +01:00
|
|
|
|
2022-02-03 13:21:40 +01:00
|
|
|
private T08PartOctal(String idTone, String chinaKey, String chinaValue, int shiftBits) {
|
2022-02-03 01:07:12 +01:00
|
|
|
BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ID_TONE, idTone);
|
2022-02-02 18:32:23 +01:00
|
|
|
BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey);
|
|
|
|
|
BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue);
|
|
|
|
|
BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.SHIFT_BITS, Integer.valueOf(shiftBits));
|
2022-02-04 21:59:42 +01:00
|
|
|
BBC.INIT_BOON(this);
|
2022-01-28 11:19:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static T08PartOctal indexOf(T08PartOctal group, int value) {
|
|
|
|
|
return T08PartOctal.values()[(value >> group.getShiftBits()) & BITMASK];
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-01 18:31:51 +01:00
|
|
|
public T02PartBinary splitPartBinary(T03PartTrit part) {
|
|
|
|
|
return T02PartBinary.values()[(ordinal() >> part.ordinal()) & 1];
|
2022-01-29 12:48:53 +01:00
|
|
|
}
|
2022-01-30 14:50:21 +01:00
|
|
|
|
2022-02-01 18:31:51 +01:00
|
|
|
public int ordinalOf(T08PartOctal group) {
|
|
|
|
|
return ordinal() << group.getShiftBits();
|
2022-01-30 14:50:21 +01:00
|
|
|
}
|
2022-01-28 11:19:52 +01:00
|
|
|
}
|