* 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>
* 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>
* 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 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>
* 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: 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: 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>
* 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>
* 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: 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: 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>
*`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
* 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
* Reorganize MapEngine
This is already turning into a mess...
* Map engine selects tile index to use
Still very ugly
* Fix subtile flag combination
* Prepare randomly generated base tiles
* Restore collision viewer
* Movement works again, searches for straight paths
Paths are now d2vector slices
* Fix LOS calculation
* Fix test (I think)
* Unnecessary constructor assignments removed.
* Position implemented in d2common.Path
* Position implemented in mapEntity.Step.
* Position implemented in d2common.PathTile.
* DS1 reader no longer looks up objects
* Start of enteties managing their own equipment
* stringer and string2enum CompositeType
String2enum
* Use CompositeType stringer to simplify composite
* Finally fix GetDelimitedList
And lint issues
* NPC selects random equipment