Commit Graph

504 Commits

Author SHA1 Message Date
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 b18a70cef9 Updates more instances of path->filepath 2021-03-23 23:18:19 -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
anvil-of-fury 4835cefef8 removing TODO comment since it broke linting during build 2021-03-21 02:44:37 +00:00
anvil-of-fury ddd72a3aed for now passing test when weight exceeds budget until someone confirms 2021-03-21 02:31:22 +00:00
anvil-of-fury 05c8b5b294 golang lint reformatting applied 2021-03-21 02:27:58 +00:00
evbo a900c6245d added Cache unit tests for non-trivial functions 2021-03-21 01:31:55 +00:00
gravestench 536233ffee
Merge pull request #1091 from gucio321/data-encoder-dat
d2pl2: added RGBA and SetRGBA methods
2021-03-11 22:24:29 -08:00
gravestench 98e13a706a
Merge pull request #1090 from gucio321/hotfix4
d2enum: String and full name methods
2021-03-11 22:23:58 -08:00
gravestench ed28ff1176
Merge pull request #1089 from gucio321/hotfix3
enum: added String method for d2enum.TileType
2021-03-11 22:23:00 -08:00
gravestench 54745a215b
Merge pull request #1088 from gucio321/hotfix2
d2dat: fixed encoder bug (make(..., nonzero) and append later)
2021-03-11 22:22:41 -08:00
gravestench 384db6e75e
Merge pull request #1087 from gucio321/anim-data-encoder
hotfix: string table encoder bug
2021-03-11 22:21:42 -08:00
gravestench 97516d5da9
Merge pull request #1082 from gucio321/hotfix
bugfix: d2util.Logger.Fatal()
2021-03-11 22:17:51 -08:00
M. Sz ce692eb829 pl2: lintfix 2021-03-11 20:24:08 +01:00
M. Sz a7b8f82204 pl2: RGBA and SetRGBA methods for PL2Color24Bits 2021-03-11 11:20:15 +01:00
M. Sz fd9c806928 d2pl2: lintfix 2021-03-11 10:19:19 +01:00
M. Sz 0f08c722f5 d2pl2: added RGBA and SetRGBA methods (to implement HellSpawner/hswidget/hspalettegridwidget.PaletteColor) 2021-03-11 10:07:52 +01:00
M. Sz 352e78ffba d2enum: lintfix 2021-03-11 09:29:08 +01:00
M. Sz a662bbaeb4 d2enum: move compositeType.Name method int composite_type.go; lintfix 2021-03-11 09:22:50 +01:00
M. Sz 00bd2c52a0 d2enum: weapon class: Name method 2021-03-11 09:11:54 +01:00
M. Sz 36f356d0c3 d2enum: draw effect string 2021-03-11 08:35:14 +01:00
M. Sz e7ea9cacce d2enum: composite_type: removed Int method 2021-03-11 08:23:50 +01:00
M. Sz 39ccf33947 enum: added String method for d2enum.TileType 2021-03-08 15:25:07 +01:00
M. Sz 7b77011977 d2dat: fixed encoder bug (make(..., nonzero) and append later) 2021-03-07 19:31:49 +01:00
M. Sz da3fe0ed09 string table: fixed bug, when (despite OpenDiablo2#1080) string tables wasn't encoded correctly 2021-03-05 13:12:53 +01:00
M. Sz fb7279f6b0 animation data: lintfix 2021-03-04 11:55:33 +01:00
M. Sz 98539befe3 animation data: Add/Delete entry methods 2021-03-04 11:52:08 +01:00
M. Sz 2e2d086d71 animation data: lintfix 2021-03-04 11:37:16 +01:00
M. Sz c603eaafbc animation data: methods for edition animation data records count 2021-03-04 11:35:42 +01:00
gucio321 5d78275bbc
Merge branch 'master' into hotfix 2021-03-03 20:17:34 +01:00
gravestench 9a2d92198e
Merge branch 'master' into anim-data-encoder 2021-03-03 11:13:11 -08:00
M. Sz 12f9efded7 bugfix: d2util.Logger.Fatal() didn't return any value, when d2util.Logger.level < LogLevelFatal 2021-03-01 13:49:20 +01:00
M. Sz b43da8f083 text dictionary: added no-named string check as separated test function 2021-02-28 20:35:35 +01:00
M. Sz 3b41f9e89b text dictionary: removed #2 string from test 2021-02-28 20:31:44 +01:00
M. Sz 4104d9d9ae text dictionary: added support for non-name (#??) strings 2021-02-28 16:29:05 +01:00
M. Sz 287fb2bf4d hotfix: lintfix 2021-02-28 14:14:47 +01:00
M. Sz de1c0ebe5d hotfix: string table: fixed bug, when sometimes encoded end decoded table wasn't the same 2021-02-28 12:25:08 +01:00
M. Sz 90f13724cf animation data: methods for editing 2021-02-27 17:08:24 +01:00
gucio321 ab14168f50
Merge branch 'master' into anim-data-encoder 2021-02-26 21:04:14 +01:00
gucio321 6d88c9eacc
Merge branch 'master' into data-encoding2 2021-02-26 20:56:06 +01:00
gravestench 1ffafcb769
Merge branch 'master' into data-encoder-dat 2021-02-26 11:26:38 -08:00
M. Sz 62c58468e9 anim data: lintfix 2021-02-26 15:11:56 +01:00
M. Sz e039c8ee70 anim data encoder + unit test for encoding 2021-02-26 14:57:55 +01:00
M. Sz 00e26fb862 animdata: the game now uses animation data manager from d2fileformats/d2animdata (instead of d2data/animation_data.go) 2021-02-26 11:56:49 +01:00
M. Sz b5fa6e77eb cof: buildfix 2021-02-25 20:25:39 +01:00
M. Sz 15d30ffcce cof: rename SpeedToFPS -> FPS 2021-02-25 20:21:44 +01:00
M. Sz 976d78e595 pl2: lintfix 2021-02-25 19:26:01 +01:00
M. Sz d61d829b98 pl2 encoder + test 2021-02-25 19:19:56 +01:00
M. Sz c933e4b891 fixed build error & tbl: removed version check (because of error screen; we don't need to check version) 2021-02-25 14:11:19 +01:00
M. Sz 8d5cf7a26b tbl: replaced lolstring with teststring in tests 2021-02-25 13:09:38 +01:00
M. Sz 3b8cdffe15 tbl: lintfix 2021-02-25 12:08:02 +01:00
M. Sz e163c40107 tbl: completed error mesages 2021-02-25 12:06:37 +01:00
M. Sz 91b3290322 tbl: completed test 2021-02-25 12:03:00 +01:00
M. Sz 522f749cfc tbl: encoder 2021-02-25 11:58:32 +01:00
M. Sz 2859eae91c Revert "data encoding: tbl"
This reverts commit 5a0571763e.
2021-02-25 10:02:10 +01:00
M. Sz 78404ed56c cof: added Duration method 2021-02-25 09:33:47 +01:00
M. Sz e7c5efe8e4 cof: added SpeedToFPS method 2021-02-25 09:30:59 +01:00
M. Sz b4cd34e351 cof: splited long Marshal method to avoid nolint:funlen 2021-02-25 09:28:11 +01:00
gucio321 4e7ec3e843
Ds1 refactor: removed npcIndexes field+fixed SetNumberOfWalls bug (#7)
* ds1 refactor: removed npcIndexes field
it was unnecessary, because described a number of objects with paths to use in encoder, but we can calculate manually

* ds1 refactor: fixed set number of (layers) bug

* ds1 refactor: SetNumberOf...Layers now returns error if incorrect number given

* ds1 refactor: lintfix

* ds1 refactor: rename: setupStreamLayerTypes -> GetStreamLayerTypes

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
2021-02-23 12:35:06 -08:00
gucio321 5e62b12bc4
Ds1 refactor: test bugs + descriptive errors + SetNumberOfWall/FloorLayers (#6)
* ds1 refactor:
- removed DS1.layerStreamTypes field
- written unit test for setupStreamLayerTypes method
- added more descriptive error messages for LoadDS1 (and submethods)

* ds1 refactor: added some missing error messages

* ds1 refactor: fixed test bugs

* ds1 refactor: removed unnecessary c1. and c2. comments in ds1_test errors

* ds1 refactor: removed fmt from ds1_test

* ds1 refactor: fixed bug with SetTiles test + lintfix

* ds1 refactor: SetNumberOfWalls

* ds1 refactor: SetTile(s) now changes walls/floors length if neccesary

* ds1 refactor: removed unnecessary debugging fmt

* ds1 refactor: added substitution layer and object with paths to example data

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
2021-02-22 12:18:35 -08:00
gucio321 46d2bc6559
Ds1 refactor: some test improvement (#5)
* ds1 refactor: floor_shadow.go: methods Encode, Decode an Hidden are methods of floorShadow

* ds1 refactor: test checks, if our methods sets all fields correctly

* ds1 refactor: minor bugfixes

* i don't remember what's this, but i commit it ;-)

* ds1 refactor: reverted some pushed by mistake things

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
2021-02-20 11:28:06 -08:00
gravestench bc4bd7235b
Merge branch 'master' into d2ds1_refactor 2021-02-20 11:23:40 -08:00
M. Sz a4f12f6ebe hotfix: removed unnecessary 0 from d2fontglyph.unknown3 bytes list 2021-02-19 14:22:11 +01:00
M. Sz 7574293624 hotfix: font format:
- removed magic numbers
- corrected unknown1 bytes count in d2fontglyph.Create
2021-02-19 08:49:04 +01:00
M. Sz a9ccda1873 hothotfix: fixed argument order in call to d2fontglyph.Create 2021-02-19 07:42:25 +01:00
M. Sz b75f82fc8c font format: refactor: moved font glyph into new package 2021-02-18 21:05:16 +01:00
M. Sz aeef2d5c4b font format: NewFontGlyph method 2021-02-18 20:39:57 +01:00
gravestench 169521e546 DS1.Tile() now calls update if dirty 2021-02-17 10:57:38 -08:00
gravestench 8a5148647b renamed another file 2021-02-17 10:23:49 -08:00
gravestench 84d510fe16 d2ds1.FloorShadow is now private 2021-02-17 10:16:10 -08:00
gravestench 09bbcf0b4d renamed some files in d2ds1 2021-02-17 10:15:51 -08:00
gucio321 99908016be
unit tests for ds1 (#4)
* ds1 refactor: added test fore some methods; put tests in right order

* ds1 refactor: unit tests for all methods

* ds1 refactor: fixed build errors

* ds1 refactor: lintfix

* ds1 refactor: fixed bug with SetWidth, SetHeight methods

* ds1 refactor: rename tile_record.go -> tile.go

* ds1 refactor: unit test for SetTiles

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
2021-02-17 10:04:44 -08:00
gravestench ec47f16cc4 Refactoring d2ds1
* Adding setters/getters so that state management can be maintained
internally when the ds1 struct is altered
* Adding unit tests for DS1
2021-02-17 02:36:25 -08:00
M. Sz 6fdbaa07bd font table format: lintfix 2021-02-17 10:37:04 +01:00
M. Sz 66ac5ff657 font table format: methods to set size and frame index 2021-02-17 10:28:36 +01:00
M. Sz 7a54465eb3 hotfix: font table format: fontGlyph is now exported 2021-02-17 09:05:29 +01:00
M. Sz 4243a1f6b1 font: rename GetSize, and GetFrameIndex -> Size, FrameIndex 2021-02-17 08:38:41 +01:00
M. Sz 9f47ed4b35 font encoder: lintfix 2021-02-17 08:32:41 +01:00
M. Sz 1d12c2036a hotfix: font table editor: added methods GetSize, and GetFrameIndex to font glyph 2021-02-17 08:28:23 +01:00
gucio321 b2e10ca43e
Merge branch 'master' into date-encoder-font 2021-02-17 07:56:00 +01:00
gravestench 97708c1349
Revert "hotfix: ds1: method setupLayerTypes is now exported + circleci build job bugfix" 2021-02-16 10:02:34 -08:00
M. Sz 6866a03f34 hotfix: ds1: method setupLayerTypes is now exported 2021-02-16 13:06:12 +01:00
M. Sz 0dd9ae6783 ds1 encoder: fixed build error 2021-02-15 15:07:33 +01:00
M. Sz 8a4c138835 ds1 encoder: layerStreamTypes and npcIndexes are now exported 2021-02-15 15:01:14 +01:00
M. Sz bbeb4b48e2 hotfix: rename hidden -> HiddenBytes in wall_record.go and floor_shadow_record.go 2021-02-15 08:34:12 +01:00
gravestench 298fc786b8
Merge branch 'master' into date-encoder-font 2021-02-10 12:14:41 -08:00
gravestench d268a987f3
Merge branch 'master' into data-encoder-dat 2021-02-10 12:05:10 -08:00
gravestench 0c5a3ae54c
Merge branch 'master' into data-encoding2 2021-02-10 11:52:00 -08:00
gucio321 025a172500 fixed lint errors in stream_writter 2021-02-10 19:53:11 +01:00
gucio321 004787597e
Merge branch 'master' into data-encoder-dt1 2021-02-10 19:43:32 +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 6c230f66d7
d2dat encoder: removed typo in comment 2021-02-10 13:03:59 +01:00
M. Sz 7d0eeb0fd3 hotfix: d2cof encoder: changed way of pushing weapon class 2021-02-10 12:59:07 +01:00
M. Sz 1010353071 hotfix: d2cof encoder: removed magic number (len of weapon class) 2021-02-10 12:35:35 +01:00
M. Sz 8a15c0b074 hotfix: cof encoder: coding weapon class 2021-02-10 08:33:29 +01:00
M. Sz d9cfe7f435 d2font: removed d2interface.Animation argument from d2font.Load; added height reading in glyphs loader 2021-02-09 08:53:34 +01:00
M. Sz 622e54dfce dc6 refactor: lintfix 2021-02-08 18:50:58 +01:00
M. Sz 6d098de778 d2dc6 refactor + unit test for it 2021-02-08 18:50:58 +01:00