1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-13 11:10:43 +00:00
Commit Graph

479 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
gravestench
8e3620ff45 remove unnecessary interface 2021-03-29 01:31:47 -07:00
M. Sz
3fd19f727e d2dat: lintfix 2021-03-28 17:56:53 +02:00
M. Sz
5962d2e832 d2dat: add New method for DATPalette 2021-03-28 17:56:53 +02:00
Tim Sarbin
5efe96ebe3
Merge pull request #1108 from gucio321/d2font
d2font: fixed creating file bug
2021-03-28 10:25:43 -04:00
M. Sz
d72b3e3345 d2font: fixed bug, when was unable to create new file doing just &Font{}.Marshal() 2021-03-28 16:21:06 +02:00
gucio321
41c1d8e874
bugfix: "insert" bug (#12)
* remove magic 'et' file

* ds1 refactor: test for InsertFloors; fixed inserting bug

* ds1: global method for getting layers group; fixed Delete.. bug (group var in delete meghod wasn't pointer

* ds1: lintfix

* ds1: remove ds1.ds1Layers.Orientation

* ds1: lintfix

* ds1: addet getMaxGroupLen method

* ds1: insert now returns if after inserting group will be greater than max number of ...

* ds1: add common test for ds1Layers.Insert...

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
2021-03-27 13:09:53 -07:00
Tim Sarbin
26c6dde74d
Merge pull request #1102 from drpaneas/readme
Redesign the readme
2021-03-26 18:21:24 -04:00
Panagiotis Georgiadis
4558da0136
Fix golang-ci gocritic error
It should fix this error:
`nilValReturn: returned expr is always nil; replace err with nil`
2021-03-26 18:52:53 +01: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
gucio321
6e7e7b9d3f
Ds1 refactor (#11)
* Refactoring d2ds1

* Adding setters/getters so that state management can be maintained
internally when the ds1 struct is altered
* Adding unit tests for DS1

* 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>

* renamed some files in d2ds1

* d2ds1.FloorShadow is now private

* renamed another file

* DS1.Tile() now calls update if dirty

* 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>

* 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>

* 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>

* WIP

* Ds1 refactor - tests (#10)

* ds1 refactor test: example data

* added loader check

* ds1 refactor: fixed bug, with loading substitutions; added descriptive error message in engine.go:118 and changed Logger.Error with Logger.Fatal

* ds1 refactor: fixed loading bug

* ds1 refactor: fixed bug when walls wasn't rendered (now we can see only walls :-)

Co-authored-by: M. Sz <mszeptuch@protonmail.com>

* ds1: floor rendering bugfix

* ds1: implemented encode layers method

* ds1: implemented encoder

* ds1: update of ds1_test

Co-authored-by: gravestench <dknuth0101@gmail.com>
Co-authored-by: M. Sz <mszeptuch@protonmail.com>
2021-03-24 10:28:02 -07:00
gucio321
6f41387e30 Ds1 refactor - tests (#10)
* ds1 refactor test: example data

* added loader check

* ds1 refactor: fixed bug, with loading substitutions; added descriptive error message in engine.go:118 and changed Logger.Error with Logger.Fatal

* ds1 refactor: fixed loading bug

* ds1 refactor: fixed bug when walls wasn't rendered (now we can see only walls :-)

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
2021-03-24 10:10:36 -07:00
gravestench
5dfca5e9f3 WIP 2021-03-24 10:10:36 -07:00
gucio321
a33117fb56 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-03-24 10:10:36 -07:00
gucio321
5706a1c19a 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-03-24 10:10:36 -07:00
gucio321
ca47018e8a 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-03-24 10:10:36 -07:00
gravestench
4bc4fa0221 DS1.Tile() now calls update if dirty 2021-03-24 10:10:36 -07:00
gravestench
2353ef2e70 renamed another file 2021-03-24 10:10:36 -07:00
gravestench
87d0803a4f d2ds1.FloorShadow is now private 2021-03-24 10:10:36 -07:00
gravestench
ee758b785c renamed some files in d2ds1 2021-03-24 10:10:36 -07:00
gucio321
194c1e467c 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-03-24 10:10:36 -07:00
gravestench
5e0e51d5e2 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-03-24 10:10:36 -07:00
Tim Sarbin
236a091997
Merge pull request #1098 from willroberts/windows-path-support
Use filepath instead of path for Windows support
2021-03-24 08:55:20 -04:00
Tim Sarbin
421d4252d9
Merge pull request #1094 from willroberts/bitmuncher-tests
Adds 100% test coverage for BitMuncher
2021-03-24 08:52:22 -04: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
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