Skip to content

Commit

Permalink
Improved MosDecoder
Browse files Browse the repository at this point in the history
- more flexible and extensible design
- requires less memory
  • Loading branch information
Argent77 committed Mar 15, 2014
1 parent 9d54043 commit 7515d4e
Show file tree
Hide file tree
Showing 9 changed files with 1,108 additions and 659 deletions.
2 changes: 1 addition & 1 deletion src/infinity/resource/graphics/BamV1Decoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ private void init()
bamData = Compressor.decompress(bamData);
signature = DynamicArray.getString(bamData, 0x00, 4);
version = DynamicArray.getString(bamData, 0x04, 4);
} else if ("BAM ".equals(signature)) {
} else if ("BAM ".equals(signature) && "V1 ".equals(version)) {
setType(Type.BAMV1);
} else {
throw new Exception("Invalid BAM type");
Expand Down
1 change: 1 addition & 0 deletions src/infinity/resource/graphics/BamV2Decoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ private PvrDecoder getPVR(int page)
if ((size & 0xff) == 0x34 && marker == 0x9c78) {
data = Compressor.decompress(data, 0);
PvrDecoder decoder = new PvrDecoder(data);
data = null;
pvrTable.put(key, decoder);
return decoder;
}
Expand Down
Loading

0 comments on commit 7515d4e

Please sign in to comment.