* 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
* 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
* de-lint d2data wip
* d2data: resolve linting errors
* 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
* adding comments to d2interface for linter
* moved d2render renderer interfaces and types into d2interface
* fixed most lint errors for monstats loader
* String2enum ObjectAnimationMode
* Render objects at their assigned layer
Gets the orderflag from the object record and assign it to the mapentity
so the renderer can get at it.
This adds another render pass that loops through the objects.
* Get object animation speed from their txt entry
* WIP refactor of d2map stuff
* more d2map refactor
adding realm init to game client
passing map engine from client and server into realm at init
change `generate map packet` to have act and level index as data
* client explodes, but getting there
* realm now initializes, networking works, but map generators dont currently do anything
* changed the way that level type records are loaded
* fixed funcs for level data lookups
* started implementing level generator, currently crashing
* client no longer exploding
* d2networking refactor
put exports into d2client.go and d2server.go
kept GameClient and GameServer methods into their respective files
made methods for packet handlers instead of the giant switch statements
* bugfix: getting first level id by act
* minor refactor of gamescreen for readability
* towns now generate on server start, create player takes act and level id as args, levels have their own map engine
* Save/load hero stats and display them in stats panel.
* Load default hero state for characters created before saving stats was introduced
Co-authored-by: Presiyan Ivanov <presiyan-ivanov@users.noreply.github.com>
* Use integer directions for rotating map entities
* Manage composite directly in npc
* Player manages its own composite
* Split up animation mode types
Players, monsters, objects all have their own types
* Clean up AnimatedEntity
* Rename AnimatedEntity -> Object
* Keep the object txt record on hand in Object
When clicking on the other side of a wall or in an an inaccessible area,
route the player the closest possible node. This allows running along
walls and matches the original closely.
Co-authored-by: Nicholas Eden <neden@zigzagame.com>
* Added automap.go stub
* Handle errors in original AutoMap.txt file
* Completed AutoMapRecord struct and comments
* AutoMap loader implemented
* Update from base repo
* Cel1-4 fields replaced with a slice
* Commented out Type fields as they aren't used
* Add basic EquipmentSlot struct
* Add Load function to EquipmentSlot
* Move EquipmentSlot struct to inventory_grid.go
* Add equipmentSlots arg to ItemGrid struct
* Add basic rendering of equipment slots.
* Change rendering of equipment slots to simply use their static x and y
* Add ChangeEquippedSlot function
* Add initialization to all equipped slots types.
* Fix Y locations of equipment slots
* Move default equipment slots to a genEquipmentSlotsMap function.
* Change Item to item
* Fix coordinates
* Change usage of string to EquippedSlotType when dealing with different slots in rendering.
* Fix import error
* Remove neck example
* Add loading sprites of equipped items.
* Clean code in Inventory rendering
* Clean code in Inventory rendering
* Clean code in Inventory rendering
* Change default items that get rendered.
* Change default items that get rendered.
* Add width and height to EquipementSlot struct
* Fill in width and height to current equipment slots.
* Fix Y setting of equipment slots
* Rename variables for clean code.
* Change handling nil itemSprite to condition instead of loop return.
* Split Render function to 2 functions.
* Add TODO
* Change comment to start with capital I
* added SuperUniques data dictionary
* added a call to LoadSuperUniques() method from the main
* added a call to LoadSuperUniques() method from the main
Copied go-astar into d2common/d2astar, made a few optimizations. Runs
roughly 30% faster according to my benchmarking.
Added a `maxCost` param to prevent searching the entire map for a path.
This probably needs tweaked a bit, but follows the original game more
closely.
Co-authored-by: Nicholas Eden <neden@zigzagame.com>
* make game update at 25fps, ui update at max fps
* minor edits to func names, d2resource constants
* renamed `loadDictionary` to `loadTextDictionary` to avoid confusion with `LoadDataDictionary`
* updated line in main.go that calls `loadTextDictionary`
* added tokens as constants inside of `d2resource/resource_paths.go` that are used in font/language paths
* moved locale string handling stuff into it's own func, now uses tokens defined in d2resource
* minor edits to func names, d2resource constants
* renamed `loadDictionary` to `loadTextDictionary` to avoid confusion with `LoadDataDictionary`
* updated line in main.go that calls `loadTextDictionary`
* added tokens as constants inside of `d2resource/resource_paths.go` that are used in font/language paths
* moved locale string handling stuff into it's own func, now uses tokens defined in d2resource
* fix: accidentally renamed func in d2asset
* git is hard
accidentally added changes not meant for this commit
* camera offset for ui panels :
added maprenderer viewport to be aligned left or right
calling alignement on keyPress in game_controls
* check if already aligned
* fix bugs
-forgot to assign alignement
-defaultScreenRect instead of screenRect because of issue mentionned in original comment
* remove config.json and replace go.mod line
* removing duplicate import of d2common
replacing all dh to d2common
* remove useless breaks from switch statement
* better range when value unused + prettying import
* item_affix rewrite
using return values instead of pointer references in arguments
* ebiten deprecated calls
* small fixes
* Handle up/down/enter keys and reset menu on toggle
Signed-off-by: William Claude <w.claude@thebeat.co>
* Add sound when selecting an item
Signed-off-by: William Claude <w.claude@thebeat.co>
* Reorganise code and remove unused things (YAGNI)
Signed-off-by: William Claude <w.claude@thebeat.co>
* Group properties
Signed-off-by: William Claude <w.claude@thebeat.co>
* Use switch statements instead of IFs
Signed-off-by: William Claude <w.claude@thebeat.co>
* Prevent opening the escape menu over hero stats or inventory
Signed-off-by: William Claude <w.claude@thebeat.co>