Commit Graph

18 Commits

Author SHA1 Message Date
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
Will Roberts b18a70cef9 Updates more instances of path->filepath 2021-03-23 23:18:19 -04:00
Intyre db83814527
d2mpq refactored (#1020)
* d2mpq refactor

* d2mpq refactor last standing lint error

* d2mpq refactor: less linter noise

* d2mpq refactor: more linter issues
2021-01-08 12:46:11 -08:00
gravestench 6f8b43f8d6
Various lint error fixes and suppressions (#846)
* suppressing the magic number lint errors in mapgen, it will get a heavy refactor soon, hopefully...

* adding string token constants for SkillClass

* adding panic on error to left/right skill select render

* fixed cuddle lint error

* fixed unnecessary conversion, unused func param lint errors in dcc_animation.go

* adding comment for skill class tokens

* fixed typo in comment

* removed unused parameter in dcc/dc6 animations

* supress warning about Object.setMode always being passed direction value of 0

* fixed all invalid golint directives

* fixed a couple gocritic lint errors
2020-10-26 02:04:50 -07:00
gravestench 025ee94e50
Removed all TODO's in project (#831)
* removed the rest of the magic number errors from d2game

* hotfix for bug i added in map engine test

* removed all TODO's in project, made issues on github for each one
2020-10-25 18:36:12 -04:00
gravestench 783993470e
Lint error cleanup1 (#779)
* fixed lint error in d2app/app.go

* go fmt entire project

* adding doc.go for d2records

* fixed lint issues in d2core/d2map

* fixed lint error in d2interface/palette.go

* fixed lint error in  d2core/d2hero/hero_state_factory.go

* adding dov.go to d2common/d2geom

* fixing lint errors in d2common/d2loader

* adding doc.go to d2common/d2cache

* adding doc files for d2datautils, d2util, d2path

* adding package doc strings for mapgen, in-geam help screen, and tcp client connection

* removed all cuddling lint errors

* changed stamina equality check to '<=' instead of '<'
2020-10-22 01:12:06 -04:00
Brendan Porter ca45be0948
Adds error handling everywhere (#743)
* 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>
2020-09-23 13:30:54 -04:00
lord 7f6ae1b785
improve AssetManager implementation (#728)
* 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
2020-09-14 14:47:11 -04:00
lord aa4a936fde
fix lint errors in mpq package (#683) 2020-08-04 22:52:54 -04:00
Sunny Klair 41e7a5b28b
Add static checks to help ensure implementations conform to interfaces (#582) 2020-07-13 09:05:04 -04:00
dk 0a72ccaf16
Abstraction for archives and archive manager (#541)
* archive abstraction

* archive manager abstraction

* fixinglint errors

* archive abstraction

* archive manager abstraction

* fixinglint errors
2020-07-04 22:37:13 -04:00
dk de116e8367
moving package comments into doc.go files (#534) 2020-07-03 18:33:46 -04:00
Tim Sarbin 255ffc75da
Fixed lint issues (#484) 2020-06-28 22:32:34 -04:00
Tim Sarbin 490c00b7b2
Added audio streaming capabilities (#471) 2020-06-27 02:49:27 -04:00
Tim Sarbin 954670da5f
Fixed linting issues (#438) 2020-06-24 10:13:11 -04:00
Intyre 0c27ae63e6
MPQ memory improvements (#399) 2020-06-22 16:01:14 -04:00
Alex Yatskov 5e958b9174
Scene and GUI rework (#300) 2020-02-08 21:02:37 -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