* Remove d2config.Config singleton
* refactored config file bootstrap
* `d2loader.Loader` adds the config directories during init
* `d2asset.AssetManager` loads the config file during init
* mpq verification logic removed from d2config; this is done by d2loader
* added `errorMessage` to `d2app.App` for setting the error message for the error screen.
* fixed loader test
* refactored logging in d2config, d2record, and d2asset
* asset manager, record manager, and file loader now utilitize d2util.Logger
* added colored logging to d2util.Logger (excluding windows platforms)
* removed mpq file verification from d2config; d2loader handles this
* record loaders now use the record manager's logger for printing info
* added command line argument for setting log level (`--loglevel 4`, `-l4`, or `-l 4`
* added `LogLevel` parameter to config file
* default log level will show errors, warnings, and info log messages
* specifying log level as an argument overrides setting from config file
* fixed log level tests
* adds error handling, returns early from funcs where it makes sense
* fixes build errors
* merge ballresin PR with upstream
* adds error handling, returns early from funcs where it makes sense
* fixes build errors
* merge ballresin PR with upstream
Co-authored-by: dknuth <dknuth0101@gmail.com>
* improve AssetManager implementation
Notable changes are:
* removed the individual managers inside of d2asset, only one asset manager
* AssetManager now has caches for the types of files it loads
* created a type for TextDictionary (the txt file structs)
* fixed a file path bug in d2loader Source
* fixed a asset stream bug in d2loader Asset
* d2loader.Loader now needs a d2config.Config on creation (for resolving locale files)
* updated the mpq file in d2asset test data, added test case for "sub-directory"
* added a Data method to d2asset.Asset. The data is cached on first full read.
* renamed ArchiveDataStream to DataStream in d2interface
* moved palette utility func out of d2asset and into d2util
* bugfix for MacOS mpq loader issue
* minor lint fixes
* removed obsolete interfaces from d2interface
* lint fixes, added data caching to filesystem asset
* adding comment for mpq asset close
* adding comment for mpq asset close
* 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