Skip to content

Commit

Permalink
chore(deps): bump @wowserhq/io from 1.2.2 to 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak authored Dec 4, 2023
1 parent 122e512 commit af2956e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 25 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"wowser"
],
"dependencies": {
"@wowserhq/io": "^1.2.2"
"@wowserhq/io": "^1.3.0"
},
"devDependencies": {
"@commitlint/config-conventional": "^18.4.3",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/blp/Blp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Blp {

load(source: IoSource) {
const stream = openStream(source);
const header = blpIo.header.read(stream, {});
const header = blpIo.header.read(stream);

if (header.magic !== BLP_MAGIC) {
stream.close();
Expand Down
29 changes: 13 additions & 16 deletions src/lib/blp/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@ import * as io from '@wowserhq/io';
import { MAX_MIPS } from './const.js';
import { IoType } from '@wowserhq/io';

const header: IoType = io.struct(
{
magic: io.string({ size: 4, terminate: false }),
formatVersion: io.uint32le,
colorFormat: io.uint8,
alphaSize: io.uint8,
preferredFormat: io.uint8,
hasMips: io.uint8,
width: io.uint32le,
height: io.uint32le,
mipOffsets: io.array(io.uint32le, { size: MAX_MIPS }),
mipSizes: io.array(io.uint32le, { size: MAX_MIPS }),
extended: io.array(io.uint8, { size: 1024 }),
},
{},
);
const header: IoType = io.struct({
magic: io.string({ size: 4, terminate: false }),
formatVersion: io.uint32le,
colorFormat: io.uint8,
alphaSize: io.uint8,
preferredFormat: io.uint8,
hasMips: io.uint8,
width: io.uint32le,
height: io.uint32le,
mipOffsets: io.array(io.uint32le, { size: MAX_MIPS }),
mipSizes: io.array(io.uint32le, { size: MAX_MIPS }),
extended: io.array(io.uint8, { size: 1024 }),
});

export { header };

0 comments on commit af2956e

Please sign in to comment.