Skip to content

Commit

Permalink
fix(itemtable): Item table flags are now correct, closes #49
Browse files Browse the repository at this point in the history
Signed-off-by: dark0dave <dark0dave@mykolab.com>
  • Loading branch information
dark0dave committed Oct 2, 2024
1 parent 19144f1 commit 3fa5efb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 23 deletions.
42 changes: 24 additions & 18 deletions fixtures/cutmelis.cre.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,11 @@
"quantity_1": 0,
"quantity_2": 0,
"quantity_3": 0,
"identified": 0,
"unstealable": 0,
"unused_1": 0,
"undroppable": 0,
"stolen": 0,
"undroppable": 0
"unstealable": 0,
"identified": 0
},
{
"resource_name": "RING07",
Expand All @@ -458,10 +459,11 @@
"quantity_1": 0,
"quantity_2": 0,
"quantity_3": 0,
"identified": 0,
"unstealable": 0,
"unused_1": 0,
"undroppable": 0,
"stolen": 0,
"undroppable": 0
"unstealable": 0,
"identified": 0
},
{
"resource_name": "HELMNOAN",
Expand All @@ -470,10 +472,11 @@
"quantity_1": 0,
"quantity_2": 0,
"quantity_3": 0,
"identified": 0,
"unstealable": 0,
"unused_1": 0,
"undroppable": 0,
"stolen": 0,
"undroppable": 0
"unstealable": 0,
"identified": 0
},
{
"resource_name": "IMOENHP1",
Expand All @@ -482,10 +485,11 @@
"quantity_1": 0,
"quantity_2": 0,
"quantity_3": 0,
"identified": 0,
"unstealable": 0,
"unused_1": 0,
"undroppable": 0,
"stolen": 0,
"undroppable": 0
"unstealable": 0,
"identified": 0
},
{
"resource_name": "DW#RND08",
Expand All @@ -494,10 +498,11 @@
"quantity_1": 0,
"quantity_2": 0,
"quantity_3": 0,
"identified": 0,
"unstealable": 0,
"unused_1": 0,
"undroppable": 0,
"stolen": 0,
"undroppable": 0
"unstealable": 0,
"identified": 0
},
{
"resource_name": "DW#RND16",
Expand All @@ -506,10 +511,11 @@
"quantity_1": 0,
"quantity_2": 0,
"quantity_3": 0,
"identified": 0,
"unstealable": 0,
"unused_1": 0,
"undroppable": 0,
"stolen": 0,
"undroppable": 0
"unstealable": 0,
"identified": 0
}
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "infinity-viewer",
"displayName": "infinity-viewer",
"description": "Infinity Viewer lets you view infinity engine binary files as json",
"version": "0.7.0",
"version": "0.7.1",
"keywords": [
"Infinity Engine",
"Baldur's Gate",
Expand Down
12 changes: 8 additions & 4 deletions src/models/cre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,14 @@ const item_table_parser = new Parser()
.uint16le("quantity_1")
.uint16le("quantity_2")
.uint16le("quantity_3")
.uint8("identified")
.uint8("unstealable")
.uint8("stolen")
.uint8("undroppable");
.bit4("unused_1")
.bit1("undroppable")
.bit1("stolen")
.bit1("unstealable")
.bit1("identified")
.seek(function () {
return 3;
});

const item_slots_parser = new Parser()
.int16le("helmet")
Expand Down

0 comments on commit 3fa5efb

Please # to comment.