Collin Smith
fac0f9fd5d
Changed Bink code to help with debugging and testability
2020-10-05 01:46:06 -07:00
Collin Smith
bb8a621d5d
Additional work on Bink video codec
2020-10-05 00:49:04 -07:00
Collin Smith
2bbd3f0c9c
Created BIK coded along with BinkAudio and BinkVideo (see #59 )
2020-10-04 16:58:22 -07:00
Collin Smith
58d31d0634
Adjusted API of UnsafeNarrowing to be more useful
...
UnsafeNarrowing is now loosely coupled with InvalidFormat via UnsafeNarrowing#wrapAndThrow
UnsafeNarrowing can now be passed an optional offset value
2020-10-03 00:56:58 -07:00
Collin Smith
08bc23160f
Increased robustness of UnsafeNarrowing exception
...
UnsafeNarrowing now requires a ByteInput argument to track where exception was thrown
Changed visibility of BitConstraints to public
Added BitConstraints safeXXu checkers for BitInput as well as ByteInput
2020-10-02 22:03:54 -07:00
Collin Smith
5a9d179e15
Ported readSafeXXu methods from ByteInput to BitInput
2020-10-02 21:01:14 -07:00
Collin Smith
35eaccf9a9
RiiabloTest changes logger to synchronous appender
2020-10-02 18:57:06 -07:00
Collin Smith
c62c103948
Implemented support for com.riiablo.io into DCC codec
...
InputStream signatures have all been removed (interoperability would have meant tons of code duplication)
MPQInputStream now supports fast-track reading of uncompressed files
2020-10-02 12:11:48 -07:00
Collin Smith
64fa1611e4
Revised BitInput slice strategy
...
BitInput now carries logical bitsRead from all previous ByteInput slices
Created BitInput#maxBit to track initial bitsRead + numBits
Created BitInput#maxBitByteOffset to trace delta between maxByte bit offset and maxBit
numBits check not replaced with bitsRead vs maxBit
ByteInput#slice(long) will slice at the current buffer readerIndex instead of mark due to an issue where mark was carrying parent offset
2020-10-02 11:41:54 -07:00
Collin Smith
6e65f5361a
Added support for reading bit input slices of arbitrary boundaries ( closes #118 )
...
BitInput#readSlice uses ByteInput#slice and performs manual #skipBits on parent buffer
Added single-byte tests
2020-09-30 16:36:38 -07:00
collinsmith
235ae94d5a
Begin work on transitioning DCC to use new io API
2020-09-30 14:47:07 -07:00
collinsmith
757a85f84b
Propagated name change
2020-09-30 10:18:34 -07:00
collinsmith
bb84f49d63
Merge branch 'master' of https://github.com/collinsmith/riiablo
2020-09-30 09:51:09 -07:00
collinsmith
d1af110c12
Created util function to retrieve safe u32s
2020-09-30 09:50:40 -07:00
Collin Smith
88e173de60
Spelling error
2020-09-29 15:57:39 -07:00
collinsmith
1116e14fc7
Refined implementation
...
FileHandleAdapter changed to abstract class
FileHandleAdapter now incorporates Reader functionality via #adapt(FileHandle,Class)
Removed specialized functions from AsyncAssetLoader (should be callable directly now)
Refactor renamed readers to adapters
AssetLoader changed from interface to abstract class
AssetLoader requires type reference and is more similar to LibGDX implementation
Adjusted test case with new API
2020-09-29 12:10:23 -07:00
Collin Smith
0c81104adb
Reorganized code slightly
2020-09-29 01:17:37 -07:00
Collin Smith
d3a9511a35
Closer API to what I would like, still requires better type inference on Reader
2020-09-29 01:14:06 -07:00
Collin Smith
9d7ee8450e
Changed strategy to support FileHandleAdapter and AsyncAdapter
2020-09-29 00:55:40 -07:00
Collin Smith
8837ff46b6
Fixed typing issue
2020-09-28 22:22:46 -07:00
Collin Smith
f92db89f61
Refined implementation
...
Attempted transition from reader type to filehandle type
Created sample loaders for testing purposes
Created SyncReader interface
2020-09-28 22:21:28 -07:00
Collin Smith
8305ba4b50
Committing experimental Asset Manager
2020-09-28 21:09:58 -07:00
Collin Smith
ad19056cfb
Changed async logger appender to be a daemon thread
2020-09-27 13:12:53 -07:00
Collin Smith
1a6783f047
Workaround for an issue with LibGDX AssetDescriptor path contraint
2020-09-25 01:22:43 -07:00
Collin Smith
01d92a69c3
Changed capitalization of extensions
2020-09-25 01:03:53 -07:00
Collin Smith
055b56907b
Reorganized code slightly
2020-09-25 00:42:17 -07:00
Collin Smith
f2ec4c9c2e
Created Decryptor.LookupTable#fix(String) to return a valid translated path string
2020-09-25 00:26:11 -07:00
Collin Smith
e2c00d7336
Cleaner way of doing byte[] to upper case and converting path delimiter
2020-09-25 00:17:14 -07:00
Collin Smith
874bb809f8
Fixed mpq_bytebuf impl bugs
...
Added remaining MPQFileHandle impl override methods
MPQFileHandleResolver will automatically fix path delimiters
Fixed decompression on an uncompressed sector
2020-09-24 19:34:33 -07:00
Collin Smith
e091821c46
Fixed an issue where Exploder was masking an incorrect number of bytes for the copy offset
2020-09-24 19:12:26 -07:00
Collin Smith
8284ab095e
Removed INTS pool by using a ByteBuf instead
2020-09-24 17:57:26 -07:00
Collin Smith
cd9d8801c7
Refactored CursorMovementSystem#setTarget to Actioneer#moveTo
2020-09-23 11:48:54 -07:00
Collin Smith
6f40094f73
Increased sectors cache to 16384 offsets (67 MB)
...
Should research keeping a ByteBuf copy of offsets
2020-09-23 01:55:28 -07:00
Collin Smith
e1252e172c
Added terminator for MPQ#getIndex(long,int,short) for case where not found
2020-09-23 01:54:08 -07:00
Collin Smith
2c5d056457
Refined MPQFileHandle and MPQInputStream impls
2020-09-23 01:26:19 -07:00
Collin Smith
d7649ca94c
Removed throws IOException from methods
2020-09-22 15:59:10 -07:00
Collin Smith
16474a215f
Replaced gdx object pool with thread-safe com.riiablo.util.Pool
2020-09-22 13:40:36 -07:00
Collin Smith
5c10340222
Added support for initial capacity pre-init to Pool
2020-09-22 13:35:23 -07:00
Collin Smith
63c17b0e17
Created com.riiablo.util.Pool thread safe pool ( closes #116 )
2020-09-22 13:22:24 -07:00
Collin Smith
6d8cefb2c8
Committing tests of mpq_bytebuf package
2020-09-22 12:37:09 -07:00
Collin Smith
bd9b30a33d
Upgraded mpq_bytebuf library
...
Created MPQFileHandleResolver to resolve a filename to an MPQ
Greatly improved efficiency of MPQInputStream and reduced overhead
Added support for fast-path ByteBufInputStream for a native memory read
MPQFileHandle now supports key/offset caching for faster lookup
MPQ now initializes using a FileChannel instead of a RandomAccessFile
MPQ hash and block tables are read using a buffer
Moved MPQFileHandle file operations to MPQFileHandle from MPQ
Added ability to retrieve MPQ block table entry from an MPQ hash table entry
Inlined Exploder#TRUNCATE
Decryptor now works using arrays directly (asserted input is a heap byte buf)
Decryptor returns a long tuple consisting of key and seed state for buffered calls
2020-09-22 12:36:40 -07:00
Collin Smith
35504fccdc
Improved logger throughput
...
Added initial size and pool object init
AsyncAppender now releases events more reliably
Workaround for #116
2020-09-21 13:36:12 -07:00
Collin Smith
24f8c764bb
Created var-arg alternative methods
2020-09-21 02:32:19 -07:00
Collin Smith
368f2f71bf
Deferred log message creation until enabled is evaluated
2020-09-21 02:25:44 -07:00
Collin Smith
6117efc25e
Created AsyncOutputStreamAppender to support logging output on separate threads
2020-09-21 02:02:16 -07:00
Collin Smith
bb4efb7967
Created Pooled variations of message factory implementations
...
Created Pooled variations of message factory implementations
Set logger to default to use these pooled message factories
2020-09-21 01:45:23 -07:00
Collin Smith
aa04ebd132
Changed LogEvent to support pooling
2020-09-21 01:32:55 -07:00
Collin Smith
703be01ceb
Created Message#release()
2020-09-21 01:30:56 -07:00
Collin Smith
dd0707a759
Created methods for non-varargs log functions
2020-09-21 01:25:10 -07:00
Collin Smith
5b22902b10
Changed varargs to array
2020-09-21 01:10:16 -07:00