feat: more prog

This commit is contained in:
TrèsAbhi committed 2023-12-26 13:35:07 -06:00
1 parent 4ffb7cac7c
commit 2f650af0f7
6 files changed
+46 -26

No files matched your search

+10 -6
View File
@@ -177,6 +177,7 @@ enum DdsCaps2 {
export class DdsStream extends WindowsStream {
async dds() {
this.magicNumber();
const header = this.header();
if (
@@ -190,8 +191,11 @@ export class DdsStream extends WindowsStream {
switch (headerDxt10.dxgiFormat) {
case DxgiFormat.BC1_UNORM_SRGB: {
this.skip(1);
const image = new Bc1Stream(
this.consume((header.width / 4) * (header.height / 4) * 8),
// this.consume((header.width / 4) * (header.height / 4) * 8),
this.consumeRemaining(),
).bc1(header.width, header.height);
writeFileSync(
@@ -257,11 +261,11 @@ export class DdsStream extends WindowsStream {
headerDxt10() {
return {
dxgiFormat: this.uint() as DxgiFormat,
resourceDimension: this.uint() as DdsDimension,
miscFlag: this.uint(),
arraySize: this.uint(),
miscFlags2: this.uint(),
dxgiFormat: this.dword() as DxgiFormat,
resourceDimension: this.dword() as DdsDimension,
miscFlag: this.dword(),
arraySize: this.dword(),
miscFlags2: this.dword(),
};
}
}