Commit Graph

31 Commits

Author SHA1 Message Date
gravestench a3cb024b49 Merge branch 'master' of http://github.com/OpenDiablo2/OpenDiablo2 into merge_ds1_upstream 2021-03-29 01:44:52 -07:00
Panagiotis Georgiadis db99c66d25
Comply with gofmt -s 2021-03-25 02:29:16 +01:00
gravestench 468f5682ae Merge branch 'd2ds1_refactor' into d2ds1_refactor_wip 2021-03-24 11:55:34 -07:00
Will Roberts 804f4148d3 Satisfies golangci-lint 2021-03-23 23:40:24 -04:00
Will Roberts 34bc9cc697 Satisfies golangci-lint 2021-03-23 23:37:11 -04:00
Will Roberts 3b26d825d2 Replaces comparisons with assertions 2021-03-23 22:38:47 -04:00
Will Roberts bfa9c34ecc Adds 100% test coverage for BitMuncher 2021-03-23 22:30:57 -04:00
gucio321 025a172500 fixed lint errors in stream_writter 2021-02-10 19:53:11 +01:00
M. Sz 8a087dba6c stream writer and stream writer test:
- fixed typo
- cut PushBits... methods
- removed magic number
2021-02-10 14:00:03 +01:00
gucio321 98c38b0dbf
Merge branch 'master' into data-encoder-dt1 2021-02-08 18:40:27 +01:00
Tim Sarbin a85a7a18c1
Merge branch 'master' into master 2021-02-08 12:37:46 -05:00
gucio321 bcfb0fb5c2
Merge branch 'master' into data-encoder-dt1 2021-02-08 12:04:55 +01:00
gucio321 794c246f64 fixed lint error in bitmuncher_test.go 2021-02-08 09:57:43 +01:00
M. Sz 5caa93a399 unit test: bitmuncher 2021-02-08 08:23:43 +01:00
M. Sz 8e1ca1dd7f stream writer test: added test for pushing bits 2021-02-06 20:43:04 +01:00
gucio321 ac8794015e Merge branch 'master' into data-encoder-dt1 2021-02-06 17:30:10 +01:00
M. Sz aadfbbc8a6 stream writer: added warnings when bits count is greater then possible input size (in PUshBits... methods) 2021-02-06 17:23:11 +01:00
gravestench 248eaf9d79 Minor refactor of d2cof
* Changed `Load` to `Unmarshal`
* made `Marshal` and `Unmarshal` into methods of `COF`
* added `New` function which creates a new, empty COF instance
* added helper functions `Marshal` and `Unmarshal`
* Changed `StreamReader.ReadBytes` to account for edge case of reading 0
bytes (this was returning an error when it should not have)
* added really simple unit tests for COF
2021-02-05 14:43:42 -08:00
M. Sz 9227de3418 d2ds1 encoder: fixed lint errors 2021-02-05 14:54:35 +01:00
M. Sz 5702d96cac ds1 encoder: fixed bug, when decoded and encoded back data wasn't the same = records' encoding methods was rewritten to use streamWriter.Pushbit 2021-02-05 14:45:22 +01:00
gucio321 73ca325a6b
Merge branch 'master' into data-converting 2021-02-02 17:01:05 +01:00
M. Sz 909a0a9939 lintfix: gomnd 2021-02-02 12:02:11 +01:00
M. Sz 2ebb36eba8 fixed stream-writer's test bug 2021-02-01 20:58:29 +01:00
M. Sz 7781b2cd6b removed PushByte method from StreamWriter 2021-02-01 11:20:44 +01:00
M. Sz 0fec9473ed rename: PushBytes(b []byte) -> PushBytes(b ...byte) 2021-02-01 11:15:42 +01:00
M. Sz 0f32ad5d62 data encoder: COF remade Cof encoder to use stream writter 2021-01-31 19:14:18 +01:00
gravestench 87d531814d d2datautil.StreamReader refactor
*`StreamReader.Read` methods now return errors

The other edits in this commit are related to cleaning up lint errors
caused by the changes to StreamReader
2021-01-12 10:26:27 -08:00
Intyre 1e91df996c Refactor StreamReader 2020-12-23 10:43:33 +01:00
Intyre b78dca52c2 Refactor StreamWriter 2020-12-23 10:43:33 +01:00
gravestench 783993470e
Lint error cleanup1 (#779)
* fixed lint error in d2app/app.go

* go fmt entire project

* adding doc.go for d2records

* fixed lint issues in d2core/d2map

* fixed lint error in d2interface/palette.go

* fixed lint error in  d2core/d2hero/hero_state_factory.go

* adding dov.go to d2common/d2geom

* fixing lint errors in d2common/d2loader

* adding doc.go to d2common/d2cache

* adding doc files for d2datautils, d2util, d2path

* adding package doc strings for mapgen, in-geam help screen, and tcp client connection

* removed all cuddling lint errors

* changed stamina equality check to '<=' instead of '<'
2020-10-22 01:12:06 -04:00
lord 0218cad717
organize d2common pakage (#716)
* move music path enumerations into d2resource

* move text dictionary (.tbl) loader into d2fileformats sub-package d2tbl

* lint fix, add doc file for d2tbl

* moved data_dictionary.go into d2fileformats sub-package d2txt, added doc file

* added sub-packages d2geom for geometry-related things, and d2path for path-related things

* moved calcstring.go to d2calculation

* move bitmuncher, bitstream, stream reader/writer from d2common into sub-package d2datautils

* fix lint errors in d2datadict loaders (caused by moving stuf around in d2common)

* move size.go into d2geom

* move d2common/cache.go into sub-package d2common/d2cache

* renamed d2debugutil to d2util, moved utility functions from d2common into d2util
2020-09-08 15:58:35 -04:00