* 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
* Disallow clicking through the help menu to control the game
* Move Navigator and EscapeMenu up in package tree to be accessible by GameControls. Disallow GameControls input when EscapeMenu is open
* Make ESC key behavior more consistent with D2
* 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
* lint fixes, added data caching to filesystem asset
* adding comment for mpq asset close
* Decouple d2asset from d2render
Notable changes in d2common:
* d2dcc.Load now fully decodes the dcc and stores the directions/frames in the dcc struct
* un-exported dcc.decodeDirection, it is only used in d2dcc
* removed font interface from d2interface, we only have one font implementation
* added `Renderer` method to d2interface.Surface, animations use this to bind to a renderer and create surfaces as they need
* added `BindRenderer` method to animation interface
Notable changes in d2common/d2asset:
* **d2asset.NewAssetManager only needs to be passed a d2config.Config**, it is decoupled from d2render
* exported Animation
* Animation implementation binds to the renderer to create surfaces only on the first time it is rendered
* font, dcc, dc6 initialization logic moved out of asset_manager.go
* for dc6 and dcc animations, the process of decoding and creating render surfaces has been broken into different methods
* the d2asset.Font struct now stores font table data for initialization purposes
Notable changes in d2core/d2render:
* Surfaces store a renderer reference, this allows animations to bind to the renderer and create a surface just-in-time
**These last changes should have been a separate PR, sorry.**
Notable changes in d2core/d2ui:
* ui.NewSprite now handles creating an animation internally, only needs image and palette path as arguments
Notable Changes in d2game:
Because of the change in d2ui, all instances of this code pattern...
```golang
animation, err := screen.asset.LoadAnimation(imgPath, palettePath)
sprite, err := screen.ui.NewSprite(animation)
```
... becomes this ...
```golang
sprite, err := screen.ui.NewSprite(imgPath, palettePath)
```
* 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
- fixed lint errors in d2interface
- removed `archived_` from interface names, was not necessary
- removed the Bitmuncher and Bitstream interfaces, as they are too specific and unnecessary
* adding debug printing boxes for entity bounds
* minor edits
- adding `spawnmon` command. currently does not have a netpacket, just for debug
- adding `GetSize` method to map entities for getting frame bounds (for debug printing)
* bug fix
* Working sound engine and sound environments
* Clean up sounds.txt loader
* Make global volume settings apply properly
Als shuffle some stuff around
* Reset sound engine on game unload
* entity debug rendering, with command
needed to add getter method to MapEntity interface, so that's the reasoning for changing objects/npcs/player/etc
this currently brings allocs/s up to 10 (you can check by running `fps` command, se we need to look into d2debugutils and how it handles drawing text
* reverting velocity copy, broke the map entity tests. debug display wont show velocity currently.
* adding velocity debug
* Fixed nil pointer in Copy()
* Position added
Added Floor() and String() methods to Vector.
Also added Position which declares an embedded Vector2 and returns various forms of it.
* d2vector.Vector2 renamed to d2vector.BigFloat
* vector.go renamed to big_float.go
* Float64 stub and more renaming
* Vector value getters
* Separate vector types with initial methods.
* Divide and lint warnings.
* Distance and Length.
* Scale, Abs and Negate.
* CompareFloat64Fuzzy delta direction reversed.
* Refactor vector_test.go.
* Renamed Approx methods.
* Distance and Length.
* Distance and Length.
* Removed BigFloat and Vector, renamed Float64 to Vector, simplified tests.
* Angle, SignedAngle and other small functions.
* Receiver rename.
* SingedAngle and test fixed
* Rotate.
* SetLength.
* Cross.
* NinetyAnti and NinetyClock.
* Lerp and Clamp.
* Reflect and ReflectSurface.
* Cardinal convenience functions.
* Comments.
* Panic on NaN and Inf in Position.
* Lint warnings and comments.
* Add PushEffect, handle effects in renderer
* Set effects instead of blend
* Stop using PushCompositeMode, use PushEffect
* Remove remaining composite mode things
* moved filter constants back to d2enum
* moving key and mouse button enums into d2enum
* moving render type enum into d2enum
* moving input even priority enums into d2enum
* moving terminal enums into d2enum
* abstracted palettes, colors, and palette manager
* make asset manager use the palette manager interface
* added BGRA setter/getter, fixed lint errors
* abstraction for animation and animation manager
* abstracted font and font manager
* abstracted palettes, colors, and palette manager
* make asset manager use the palette manager interface
* added BGRA setter/getter, fixed lint errors
* abstraction for animation and animation manager
I realized that the file manager is actually managing file access
to the archives, but it's doing so through the archive manager.
I've renamed it, it's now called ArchivedFileManager because that
is really what it is.
* Fixed nil pointer in Copy()
* Position added
Added Floor() and String() methods to Vector.
Also added Position which declares an embedded Vector2 and returns various forms of it.
* Position tests improved
* Move MapEntity to d2interface
* New package d2object, first object initFun
Moves objects out to their own package and implements the very first
init function, torches/braziers now gets their animation mode set at creation.
* Apply name again
* Turn on waypoints
* fixed lint issues of the package d2core/d2inventory
* fixed lint issues of the d2script package
* fixed lint issues of the d2common/d2interface package
* fixed lint issues of the d2common/d2resource package
* fixed lint issues of the d2core/d2term package
* fixed conflict errors
* Fixes#496 using ebiten.SubImage to Render Section of a Surface.
I had to add matching functions to both animation and sprite to get it to be called
for a sprite object.
* Fixed linter warning on comments for Sprite and Animation.
* Removing what's remaining of the old Sprite re-generation and caching.
* adding comments to d2interface for linter
* moved d2render renderer interfaces and types into d2interface
* fixed most lint errors for monstats loader
* decouple bitmuncher to interface
* Switch items to dynamic load with a common struct, add misc.txt loading
* Update Ebiten Reference
* Switch references to point to D2Shared
* Migrate part 2