decord/source/4795_getAlpha.js

59 lines
1.3 KiB
JavaScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 4795
// Function ID: 41711
2026-07-20 16:05:17 +00:00
// Name: getAlpha
2026-07-25 08:10:48 +00:00
// Dependencies: [4763]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 4795 (getAlpha)
2026-07-23 10:11:24 +00:00
const module = arg2;
const dependencyMap = arg6;
2026-07-20 16:05:17 +00:00
function getAlpha(arg0) {
const obj = {};
let num = 0;
if (16 & arg0) {
num = 1;
}
obj.value = num;
let str = "No";
if (16 & arg0) {
str = "Yes";
}
obj.description = str;
return obj;
}
function getAnimation(byteAt) {
const obj = {};
let num = 0;
if (2 & byteAt) {
num = 1;
}
obj.value = num;
let str = "No";
if (2 & byteAt) {
str = "Yes";
}
obj.description = str;
return obj;
}
function getThreeByteValue(getUint8, sum) {
2026-07-25 08:10:48 +00:00
let obj = module(4763);
2026-07-20 16:05:17 +00:00
const byteAt = obj.getByteAt(getUint8, sum);
2026-07-25 08:10:48 +00:00
sum = byteAt + 256 * module(4763).getByteAt(getUint8, sum + 1);
const obj2 = module(4763);
const sum1 = sum + 65536 * module(4763).getByteAt(getUint8, sum + 2) + 1;
2026-07-20 16:05:17 +00:00
obj = { value: sum1, description: `${tmp3}px` };
return obj;
}
2026-07-23 10:11:24 +00:00
let c2 = 4;
let c3 = 7;
2026-07-20 16:05:17 +00:00
arg5.default = {
read(getUint8, sum) {
const obj = {};
2026-07-25 08:10:48 +00:00
const byteAt = module(4763).getByteAt(getUint8, sum);
2026-07-20 16:05:17 +00:00
obj.Alpha = getAlpha(byteAt);
obj.Animation = getAnimation(byteAt);
2026-07-23 10:11:24 +00:00
obj.ImageWidth = getThreeByteValue(getUint8, sum + c2);
obj.ImageHeight = getThreeByteValue(getUint8, sum + c3);
2026-07-20 16:05:17 +00:00
return obj;
}
};