* d2player/panels: Add close button to hero/inventory/skilltree panel
we require a OnClose callback here, as we need to update the perspective
of the view which is handled by gamecontrols.updateLayout().
* d2player/skilltree: Fix using the same tab label for all tabs
* d2player/game_controls: Fix wrong position of left/right menu
the character would not detect that a click was in a menu and start
walking.
* removed the rest of the magic number errors from d2game
* hotfix for bug i added in map engine test
* removed TODO's from d2mapengine/engine.go, added link to github issue
* removed TODO's and made issues and other minor lint work
* lint cleanup, mostly removing TODO's and putting links to their issues on github
* d2game/d2player/inventory.go: magic number lint cleanup
* d2game/d2player/mini_panel.go: magic number lint cleanup
* d2game/d2player/skill_select_panel.go: lint cleanup
* d2game/d2player/skilltree.go: removed all lint errors
* removed the rest of the magic number errors from d2game
* hotfix for bug i added in map engine test
* all magic numbers removed (excluding mapgen)
* minor refactor of hero_stats_panel to clean up lint errors
* minor edit to skill_select_panel.go
* major refactor of d2game/d2player/game_controls.go, removed most lint errors.
- Clicking the active left/right skill now opens a skill select panel.
Only the available skills for the hero, which are valid for the panel type are shown.
Clicking on a skill from the skill select panel makes it the new active skill for the hero.
- Hovering a skill in the skill select panel shows the skill name +
skill description.
- New command which learns all skills for a specific
class(not persisted to a save file yet) - e.g. `learnskills ama` will learn
skills for the Amazon class.
- Initialize HeroSkill.shallowHeroSkill struct in the hero state factory, so we can use it
when we serialize the HeroSkill to packets/game save files.
- The parsed Skill.ListRow is now a number instead of string.
Co-authored-by: Presiyan Ivanov <presiyan-ivanov@users.noreply.github.com>
* d2ui/UIFrame: Refactor into its own class
it's not useful to have the handling of frames for the
inventory/herostate/skilltree/quest panels individually in each of
those.
* d2ui/button: Fix crash when a buttonlayout was not allowing FrameChange
When AllowFrameChange is false we do not create pressedSurface. So if we
press the button the game will crash.
* d2ui/button: Allow label-only buttons
At least for the skillmenu we need buttons were the graphic size does
not match the buttonsize. So let's render the graphic in there and make
the button label only.
* d2hero/hero_state_factory: Give all heroes their class specific skills
* d2player/gamecontrols: Fix wrong inventory/stats layouts for exp chars
For Druid/Assassin the inventory frame was rendered for a 640x480
resolution. This brings it in line with all other characters.
* d2player: Add inital Skilltree panel
* d2player/game_controls: Enable skilltree
Note here, that the inventory panel and skilltree panel can overlap.
* d2player/skilltree: Add skillicon rendering
Note here, that I couldn't figure out how to render them dark if no
skillpoints are invested.
Signed-off-by: juander <juander@rumtueddeln.de>
* Casting a skill now plays the corresponding overlay(if any).
* Prevent a crash caused by nil pointer in HeroSkill deserialization, happening when
unmarshalling HeroSkill from packets as a remote client.
* Add PlayerAnimationModeNone to handle some of the Skills(e.g.
Paladin auras) having "" as animation mode.
* Joining a game as remote client now waits for map generation to finish
before rendering map or processing map entities. This is temporary hack to prevent the game from
crashing due to concurrent map read & write exception.
* Send CastSkill packet to other clients.
Co-authored-by: Presiyan Ivanov <presiyan-ivanov@users.noreply.github.com>
* 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
* 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>
* Remove weapons, armor, misc, itemCommon, itemTyps datadict singletons
- removed loader calls from d2app
- removed the HeroObjects singleton from `d2core/d2inventory`
- added an InventoryItemFactory in d2inventory
- package-level functions that use data records are now methods of the InventoryItemFactory
- renamed ItemGenerator in d2item to ItemFactory
- package-level functions that use records are now methods of ItemFactory
- d2map.MapEntityFactory now has an item factory instance for creating items
- fixed a bug in unique item record loader where it loaded an empty record
- added a PlayerStateFactory for creating a player state (uses the asset manager)
- updated the test inventory/equipment code in d2player to handle errors from the ItemFactory
- character select and character creation screens have a player state and inventory item factory
- updated item tests to use the item factory
* minor edit
* Removed d2datadict.Experience singleton
added a HeroStatsFactory, much like the other factories. The factory gets an
asset manager reference in order to use data records.
* removed d2datadict.AutoMagic singleton
* removed d2datadict.AutoMap singleton
* removed d2datadict.BodyLocations singleton
* removed d2datadict.Books singleton
* Removed singletons for level records
- removed loader calls in d2app
- changed type references from d2datadict to d2records
- added a `MapGenerator` in d2mapgen which uses thew asset manager and map engine
- package-level map generation functions are now MapGenerator methods
- `d2datadict.GetLevelDetails(id int)` is now a method of the RecordManager
* remove SkillCalc and MissileCalc singletons
* Removed CharStats and ItemStatCost singletons
- added an ItemStatFactory which uses the asset manager to create stats
- package-level functions for stats in d2item are now StatFactory methods
- changed type references from d2datadict to d2records
- `d2player.GetAllPlayerStates` is now a method of the `PlayerStateFactory`
* Removed DkillDesc and Skills singletons from d2datadict
- removed loader calls from d2app
- diablo2stats.Stat instances are given a reference to the factory for doing record lookups
* update the stats test to use mock a asset manager and stat factory
* fixed diablo2stats tests and diablo2item tests
* removed CompCodes singleton from d2datadict
* remove cubemain singleton from d2datadict
* removed DifficultyLevels singleton from d2datadict
* removed ElemTypes singleton from d2datadict
* removed events.go loader from d2datadict (was unused)
* removed Gems singleton from d2datadict
* removed Hireling and Inventory singletons from d2datadict
* removed MagicPrefix and MagicSuffix singletons from d2datadict
* removed ItemRatios singleton from d2datadict
* removed Missiles singleton from d2datadict
* removed MonModes singleton
* Removed all monster and npc singletons from d2datadict
- MapStamp instances now get a reference to their factory for doing record lookups
* removed SoundEntry and SoundEnviron singletons from d2datadict
* Initial player Left skill and Right skill handling
* Handle empty skill names in charStats.BaseSkils + add Attack skill for all classes.
Co-authored-by: Presiyan Ivanov <presiyan-ivanov@users.noreply.github.com>
* finishing up help overlay
* fixes help overlay close button,
adds hack to prevent buysellbtn from rendering all 24 unrelated frames on top of eachother
* 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)
```
* Prevent player movement and casting if current spell cast is not finished yet
* Properly format the fields of Player struct
Co-authored-by: Presiyan Ivanov <presiyan-ivanov@users.noreply.github.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
* export d2asset singleton
* add *d2asset.AssetManager to d2app
- d2app now has a reference to an asset manager which it will use for loading
- added asset loader methods to the asset manager
- functions in d2asset are now wrappers for asset manager methods
* add asset manager reference to audio provider
- d2app asset manager reference is now passed to audio provider
- asset manager is created in main.go for now to pass into audio provider
- CreateSoundEffect is now a method, no longer exported, uses the asset manager reference
* d2app passes asset manager refence to map engine test
* in d2asset, all calls to LoadFile replaced with call to Singleton.Loadfile
* blizzard intro and credits screen
- d2app passes reference to the asset manager to these screens
* asset manager for d2map
- adding MapStampFactory, takes an asset manager reference
- embedded MapStampFactory into the MapEngine
- LoadStamp is now a method of the MapStampFactory
* d2asset: removed LoadFileStream, LoadFile, and FileExists
* d2gui changes
- singleton now has an asset manager reference
- calls to d2asset loader functions removed
- createButton is now a method of LayoutManager
- moved LayoutEntry to its own file
* map entity factory
- Map engine has an embedded map entity factory
- Map stamp factory gets a reference to the map engine's entity factory
- Stamps are given a reference to the map engine entity factory when created
- Character select gets a map entity factory
- Embedded the stamp factory into the MapEngine
* asset manager for d2ui
- d2ui is passed an asset manager reference when created
- all calls to d2asset loader functions in d2ui now refer to the asset manager
- d2gamescreen gets a ui manager when created
- help overlay is now passed a ui manager when created
* d2gamescreen + d2player: asset manager references
added an asset manager reference to
- inventory panel + inventory grid
- mini panel
- game controls
- help overlay
- character select
- main menu
- select hero class
- hero stats panel
* Removed d2asset.LoadAnimation
all references to this function have been replaced with calls to the asset manager method
* adding asset to help overlay, bugfix for 4d59c91
* Removed d2asset.LoadFont and d2asset.LoadAnimationWithEffect
all references to these have been replaced with calls to the asset manager methods
* MapRenderer now gets an asset manager reference
* removed d2asset.LoadPalette
all references have been replaced with calls to an asset manager instance
* merged d2object with d2mapentity
d2object was only being used to create objects in the map, so the provider
function is now a method of the map entity factory. calls to d2asset have
been removed.
* removed d2asset.LoadComposite
all calls are now made to the asset manager method
* removed d2asset singleton
all singleton references have been removed, a single instance of the
asset manager is passed around the entire app
* rename Initialize to NewAssetManager
* 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
* Set HP/Mana stats when globes are clicked
* Display HP or Mana stat when hovering over globe
* Display HP/Mana stats when hovering globe or when toggling by clicking the respective globe. Rename internal to assets and move assets package into folder.
* Adding .bmp to assets folder
* fixed lint errors in button.go
* fixed lint errors in checkbox.go
* Removed d2ui singleton, fixed nearly all lint errors
- Changed `UI` struct to `UIManager`, removed singleton
- UI element provider functions are now methods of the UI Manager
- Screens now use the UI manager to create UI elements
- game panels in d2player now use the UI Manager to create UI elements
- Only the UI manager knows about "widgets"; calls to `d2ui.AddWidget` in Screen instances have been removed
* changed ui element provider methods from `Create` to `New`
* adding simple inventory item descriptions
* adding method to identify items
* offset description so it doesn't overlap with item in inventory grid
* needed to offset inv panel by 1px
* 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
* smooth camera with vectors
* add smooth cam support to map engine test
smooth cam now works in map engine test.
clicking or holding the left-mouse button will move the camera.
also works with freecam mode in single-player.
* Update ebiten_renderer.go
did not mean to edit this file
* delint_d2networking
not sure what to do about lint error G110 on calls to `io.Copy`, warns
about gzip compression bomb possibility, leaving those.
all todo's have been left.
* removed duplicate const
* adding resource entry for inventory.txt
* adding loader for inventory.txt
* adding call to inventory.txt loader in d2app
* d2game now uses the inventory.txt records for making the inventory panel
* Add PushEffect, handle effects in renderer
* Set effects instead of blend
* Stop using PushCompositeMode, use PushEffect
* Remove remaining composite mode things
The split between d2ui and d2asset Font version caused incorrect caching between the two. After looking at d2interface.Font, I saw the d2asset was the most recent and more tightly and cleanly packaged.
I therefore removed the old d2ui.Font and embedded the d2asset version in the d2ui.Label and d2ui.Button.
Looking at the code of d2ui, it would be logical to completly swap it for their d2gui version. But at least for the moment, the d2ui.Button as more functionality since it embeds a Label (instead of a font), and this label now has multiline horizontal alignement.
* 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
Only lint left are meaningful TODOs.
I also defaulted the level and exp parameters as if we were to handle non-default state, we would need much more information. It might be worth creating another function at that point.
* 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.
* Add PushBrightness to surface
* Highlight selectable objects
Check if mapentity is selectable. (seems reasonable)
Request objects to highlight themselves is required (idk)
* 412 - move missle code to game_client and add animation, still buggy
* mostly working casting animation that cancels path
Co-authored-by: carrelda@Davids-MacBook-Pro.local <carrelda@Davids-MacBook-Pro.local>
* 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
* First improvements
Signed-off-by: William Claude <w.claude@thebeat.co>
* Make the menu more generic
Signed-off-by: William Claude <w.claude@thebeat.co>
* Handle mouse events
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove debug statement
Signed-off-by: William Claude <w.claude@thebeat.co>
* Handle left clicks better
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove unused file
Signed-off-by: William Claude <w.claude@thebeat.co>
* Handle titles in screens
Signed-off-by: William Claude <w.claude@thebeat.co>
* Improve the menu using layouts
Signed-off-by: William Claude <w.claude@thebeat.co>
* Add support for onOff labels
Signed-off-by: William Claude <w.claude@thebeat.co>
* Mutualise title creation
Signed-off-by: William Claude <w.claude@thebeat.co>
* Add gutter and mutualise things
Signed-off-by: William Claude <w.claude@thebeat.co>
* Improve menu, mutualise a lot of things and support animated sprites
Signed-off-by: William Claude <w.claude@thebeat.co>
* Use a cfg struct instead of independent handlers
Signed-off-by: William Claude <w.claude@thebeat.co>
* Fix hardcoded value
Signed-off-by: William Claude <w.claude@thebeat.co>
* Clean things a bit
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove unused property
Signed-off-by: William Claude <w.claude@thebeat.co>
* First support for hoverable elements
Signed-off-by: William Claude <w.claude@thebeat.co>
* Add support for label selection feedback
Signed-off-by: William Claude <w.claude@thebeat.co>
* Add support options
Signed-off-by: William Claude <w.claude@thebeat.co>
* Update print statement
Signed-off-by: William Claude <w.claude@thebeat.co>
* Update rendering and clean code
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove debug things
Signed-off-by: William Claude <w.claude@thebeat.co>
* Handle hovering
Signed-off-by: William Claude <w.claude@thebeat.co>
* Support enter key for labels
Signed-off-by: William Claude <w.claude@thebeat.co>
* Attach methods to layout
Signed-off-by: William Claude <w.claude@thebeat.co>
* Move things under EscapeMenu
Signed-off-by: William Claude <w.claude@thebeat.co>
* Some renaming
Signed-off-by: William Claude <w.claude@thebeat.co>
* Clean
Signed-off-by: William Claude <w.claude@thebeat.co>
* Set hovered element ID when using the mouse
Signed-off-by: William Claude <w.claude@thebeat.co>
* Clean
Signed-off-by: William Claude <w.claude@thebeat.co>
* Delete unused file
Signed-off-by: William Claude <w.claude@thebeat.co>
* Wire save & exit with a nasty hack
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove unused file
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove dead code
Signed-off-by: William Claude <w.claude@thebeat.co>
* Reorder the code a bit
Signed-off-by: William Claude <w.claude@thebeat.co>
* Rename hoverableElement into actionableElement
Signed-off-by: William Claude <w.claude@thebeat.co>
* Prevent regenerating the label if the text didn't change
Signed-off-by: William Claude <w.claude@thebeat.co>
* 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>
* refactoring escape menu to allow pop back to menu
* refactors escape menu to allow exiting the game
* fixes bug causing player to not be removed on game exit
* 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
* Add InventoryItemMisc struct
* Add GetMiscItemByCode function
* Implement InventoryItem interface for InventoryItemMisc
* Add rings and amulets to the example items loading.
* Fix Y of LeftHand and RightHand equipment slots.
* Add "Ripolak" name to CONTRIBUTORS
* Remove double item
* 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
* Handles Click and Hovers on most game control elements.
Creates a new type of "Actionable" which includes most of the bottom
bar elements. Then handles both "Click" and "Hover" into a separate
handler function.
At the moment, hover does nothing but routes correctly. Click logs
the corresponding actionable.
Known issues:
- Not capturing button press on click (meaning player will move).
- Basic touch detection, could be a more fancy QuadTree like struct.
- Since the visual frames used are not just the actionable, the actual
x, y coordinates of the actionable need to be entered statically. Changes
in resolution would probably affect this.
* Renaming vars for code consistency and readability
* Improve run/walk/neutral animation handling. Initial parsing of LevelDetail records. Support for holding mouse buttons.
- Run/walk/neutral positions now map to a different animation mode(and speed) depending if in or out of town.
- Run/walk toggle which can be activated/deactivated with R key.
- Temporary(and incorrect) loading and mapping for LevelDetails records.
- Zone change label which shows the level name from LevelDetailsRecord when the player enters a different zone.
- Allow holding mouse left/right button to repeatedly generate an action.
* Remove duplicate load of LevelDetails. Replace numbers in zone change logic with their corresponding RegionIdType
* Move zone change check at the correct place
Co-authored-by: Presiyan Ivanov <presiyan-ivanov@users.noreply.github.com>
* 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
* update with new renderer and escape menu
* 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>
* 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
* Switched to json formatted characters
* Added infrastructure for networking
* Minor updates.
* more updates for map engine/rendering
* More map engine changes and fixes
* 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