mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-07-15 23:10:48 +00:00
feat: organize flags, and better skin sync
This commit is contained in:
@@ -596,22 +596,38 @@ export default function PckEditorView() {
|
||||
{prop.key === "ANIM" && (
|
||||
<div className="mt-2 p-3 bg-black/30 border border-[#373737]/50 grid grid-cols-2 gap-x-4 gap-y-2">
|
||||
{[
|
||||
{ label: "Slim Format", flag: 1 << 19 },
|
||||
{ label: "Modern Wide", flag: 1 << 18 },
|
||||
{ label: "Hide Hat", flag: 1 << 16 },
|
||||
{ label: "Hide Head", flag: 1 << 10 },
|
||||
{ label: "Hide Body", flag: 1 << 13 },
|
||||
{ label: "Hide Right Arm", flag: 1 << 11 },
|
||||
{ label: "Hide Left Arm", flag: 1 << 12 },
|
||||
{ label: "Hide Right Leg", flag: 1 << 14 },
|
||||
{ label: "Hide Left Leg", flag: 1 << 15 },
|
||||
{ label: "Hide Jacket", flag: 1 << 24 },
|
||||
{ label: "Hide Right Sleeve", flag: 1 << 21 },
|
||||
{ label: "Hide Left Sleeve", flag: 1 << 20 },
|
||||
{ label: "Hide Right Pant", flag: 1 << 23 },
|
||||
{ label: "Hide Left Pant", flag: 1 << 22 },
|
||||
{ label: "Zombie Arms", flag: 1 << 1 },
|
||||
{ label: "Upside Down", flag: 1 << 31 },
|
||||
{ label: "01: Static arms", flag: 0x1 },
|
||||
{ label: "01: Zombie arms", flag: 0x2 },
|
||||
{ label: "01: Static legs", flag: 0x4 },
|
||||
{ label: "01: Bad Santa", flag: 0x8 },
|
||||
{ label: "02: Unknown", flag: 0x10 },
|
||||
{ label: "02: Synced legs", flag: 0x20 },
|
||||
{ label: "02: Synced arms", flag: 0x40 },
|
||||
{ label: "02: Statue of Lib", flag: 0x80 },
|
||||
{ label: "03: No Armor", flag: 0x100 },
|
||||
{ label: "03: No Bobbing", flag: 0x200 },
|
||||
{ label: "03: No Head", flag: 0x400 },
|
||||
{ label: "03: No R. Arm", flag: 0x800 },
|
||||
{ label: "04: No L. Arm", flag: 0x1000 },
|
||||
{ label: "04: No Body", flag: 0x2000 },
|
||||
{ label: "04: No R. Leg", flag: 0x4000 },
|
||||
{ label: "04: No L. Leg", flag: 0x8000 },
|
||||
{ label: "05: No Head Overlay", flag: 0x10000 },
|
||||
{ label: "05: Back Crouch", flag: 0x20000 },
|
||||
{ label: "05: Modern Skin", flag: 0x40000 },
|
||||
{ label: "05: Slim Skin", flag: 0x80000 },
|
||||
{ label: "06: No L. Sleeve", flag: 0x100000 },
|
||||
{ label: "06: No R. Sleeve", flag: 0x200000 },
|
||||
{ label: "06: No L. Pant", flag: 0x400000 },
|
||||
{ label: "06: No R. Pant", flag: 0x800000 },
|
||||
{ label: "07: No Jacket", flag: 0x1000000 },
|
||||
{ label: "07: Rend Head Arm", flag: 0x2000000 },
|
||||
{ label: "07: Rend R.Arm Arm", flag: 0x4000000 },
|
||||
{ label: "07: Rend L.Arm Arm", flag: 0x8000000 },
|
||||
{ label: "08: Rend Body Arm", flag: 0x10000000 },
|
||||
{ label: "08: Rend R.Leg Arm", flag: 0x20000000 },
|
||||
{ label: "08: Rend L.Leg Arm", flag: 0x40000000 },
|
||||
{ label: "08: Dinnerbone", flag: 0x80000000 },
|
||||
].map((item) => {
|
||||
const currentVal = parseInt(prop.value) || 0;
|
||||
const isChecked = (currentVal & item.flag) !== 0;
|
||||
|
||||
@@ -40,7 +40,8 @@ export function useSkinSync({ profile, editions }: UseSkinSyncProps) {
|
||||
try {
|
||||
const res = await fetch(b64);
|
||||
const buf = await res.arrayBuffer();
|
||||
const animValue = (skinIsSlim) ? "0x00040000" : "0x00040000"; //neo: forces wide skin, because slim is not even working.
|
||||
const isModernHeight = img.height === 64;
|
||||
const animValue = skinIsSlim ? "0x00080000" : (isModernHeight ? "0x00040000" : "0x00000000");
|
||||
let boxes: PCKProperty[] = [];
|
||||
/*if (skinIsSlim) {
|
||||
boxes.push({
|
||||
@@ -55,7 +56,7 @@ export function useSkinSync({ profile, editions }: UseSkinSyncProps) {
|
||||
const pckBuf = PckService.serializePCK({
|
||||
version: 3,
|
||||
endianness: "little",
|
||||
xmlSupport: true,
|
||||
xmlSupport: false,
|
||||
properties: ["ANIM", "DISPLAYNAME", "THEMENAME", "GAME_FLAGS", "FREE", "BOX"],
|
||||
files: [{
|
||||
id: "0",
|
||||
|
||||
Reference in New Issue
Block a user