Commit Graph

31 Commits

Author SHA1 Message Date
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
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 20f0d8a3d5 removed some of nolint:govet 2021-02-06 19:10:15 +01:00
M. Sz 215ac8cfc5 ds1: splited loading function 2021-02-06 18:58:15 +01:00
M. Sz 32570d6ae5 replaced nolint:gomnd directives with "magic numbers'" names 2021-02-06 18:28:01 +01:00
M. Sz b3a754a4a6 ds1 encoder: Marshal method was splited to avoid nolint directive 2021-02-05 15:05:11 +01: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
M. Sz 3dafb3ebcd dt1 encoder: moved record encoders and decoders to appropriate files 2021-02-05 14:07:51 +01:00
M. Sz 9f56574066 data encoder: ds1 2021-02-05 12:52:51 +01:00
M. Sz 909a0a9939 lintfix: gomnd 2021-02-02 12:02:11 +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
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
lord 16b8a6467f
fixed most lint errors in d2data (#701)
- moved ds1 object definition into the ds1 dir
- added doc files
- only lint errors remaining are for the unused variables in d2video
2020-08-06 16:45:38 -04:00
lord 8e41133f39
lint and minor refactor of d2common (#690)
- moved contents of `d2common/math.go` into `d2math/math.go`
- removed lint errors from files in d2common
2020-08-05 00:03:33 -04:00
Gürkan Kaymak 1ce81f1aec
fixed Id renaming in strings (#618) 2020-07-24 07:54:52 -04:00
danhale-git 727e8244c6
Implemented Position in Path and PathTile (#605)
* Unnecessary constructor assignments removed.

* Position implemented in d2common.Path

* Position implemented in mapEntity.Step.

* Position implemented in d2common.PathTile.
2020-07-18 18:07:13 -04:00
dk de116e8367
moving package comments into doc.go files (#534) 2020-07-03 18:33:46 -04:00
Ziemas fa20b9ee51
Spawn monster by monstat record (#508)
* 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
2020-07-01 00:06:06 -04:00
Ziemas 6c56027731
Fix monpreset for other acts (#478) 2020-06-28 00:07:52 -04:00
Ziemas 3f1fe538e2
Load monpreset and use that to find monstat entries for NPC's (#477)
* Load monpreset.txt

* Get monstat for npc's and their name from strings

Using monpreset to grab the key for monstat

* Object name tags
2020-06-27 23:15:20 -04:00
Tim Sarbin 954670da5f
Fixed linting issues (#438) 2020-06-24 10:13:11 -04:00
Tim Sarbin 2da08884c4
Added multiplayer support (#336) 2020-06-18 14:11:04 -04:00
Alex Yatskov a4efd41383
File format cleanup (#320)
* Configuration cleanup

* Cleanup

* cleanup file formats

* make palettes a proper fileformat
2020-02-26 08:39:38 -05:00
nicholas-eden bdfdeda67b
Add support for missiles (#308)
* WIP: Add support for missiles

Break AnimatedEntity into two parts to support single and composite animations.  Summon misssiles on right click.

* Break animated entity down further

Move npc only logic to npc struct, reduce duplication in map entities

* Change a bunch of int32s to int
2020-02-22 20:44:30 -05:00
Tim Sarbin 3412c4338c
Added pathfinding and (buggy) collision data. (#285) 2020-02-02 12:46:19 -05:00
Alex Yatskov ea4450f207
Move d2config to d2core, remove d2helper (#282) 2020-02-01 21:06:22 -05:00
Tim Sarbin 2461142fbd
Minor changes to project layout (#276)
* Minor changes to reduce interdependencies on modules.
2020-01-31 23:18:11 -05:00