Commit Graph

72 Commits

Author SHA1 Message Date
gravestench 5dfca5e9f3 WIP 2021-03-24 10:10:36 -07:00
gravestench 98e13a706a
Merge pull request #1090 from gucio321/hotfix4
d2enum: String and full name methods
2021-03-11 22:23:58 -08:00
M. Sz 352e78ffba d2enum: lintfix 2021-03-11 09:29:08 +01:00
M. Sz a662bbaeb4 d2enum: move compositeType.Name method int composite_type.go; lintfix 2021-03-11 09:22:50 +01:00
M. Sz 00bd2c52a0 d2enum: weapon class: Name method 2021-03-11 09:11:54 +01:00
M. Sz 36f356d0c3 d2enum: draw effect string 2021-03-11 08:35:14 +01:00
M. Sz e7ea9cacce d2enum: composite_type: removed Int method 2021-03-11 08:23:50 +01:00
M. Sz 39ccf33947 enum: added String method for d2enum.TileType 2021-03-08 15:25:07 +01:00
M. Sz 20f2649b65 asset manager: merged TranslateLabel to TranslateString 2021-02-02 10:15:18 +01:00
M. Sz 157f110105 data encoding: added COF encoder 2021-01-30 18:23:00 +01:00
M. Sz b25bbe31f4 d2ui: rename NewCustomButton -> NewDefaultButton; lintfix 2021-01-19 17:47:42 +01:00
M. Sz 07eeec4827 party panel: rearranged constants (moved part of them into d2enum) 2021-01-19 17:39:40 +01:00
M. Sz 71e4470c25 party panel: colored labels; d2ui improvement: SwitchableButton.SetState() method; lintfix 2021-01-17 20:47:40 +01:00
M. Sz bd3fc4bb25 party panel: switchers creator, party indexes (name, classs labels and switchers) 2021-01-16 21:59:44 +01:00
gucio321 6addf7a243
removed links to closed issues from code (#1005)
Co-authored-by: M. Sz <mszeptuch@protonmail.com>
Co-authored-by: gravestench <dknuth0101@gmail.com>
2021-01-06 21:48:12 -08:00
gucio321 2e31f3d1ec
Move Gold Panel (#962)
* move gold panel
2020-12-12 01:39:26 -08:00
M. Sz dffa8ff865 moved max quests acts to d2enum 2020-12-04 10:43:33 +01:00
M. Sz ed89d91ae4 code cleanup 2020-12-04 09:20:38 +01:00
Thomas Christlieb 320583b5d4 save act and difficulty. Fixes #866 2020-11-25 11:51:20 +01:00
Julien Ganichot 0d691dbffa
Key binding menu (#918)
* Feat(KeyBindingMenu): Adds dynamic box system with scrollbar

* Feat(Hotkeys): WIP Adds a lot of things

* Feat(KeyBindingMenu): WIP Adds logic to binding

* Feat(KeyBindingMenu): Fixes assignment logic

* Feat(KeyBindingMenu): Adds buttons logic

* Feat(KeyBindingMenu): Fixes sprites positions+add padding to Box

* Feat(KeyBindingMenu): Adds label blinking cap

* Feat(KeyBindingMenu): Removes commented func

* Feat(KeyBindingMenu): Fixes lint errors and refactors a bit

* Feat(KeyBindingMenu): Corrects few minor things from Grave

* Feat(KeyBindingMenu): removes forgotten key to string mapping
2020-11-13 12:03:30 -08:00
Julien Ganichot 8365400ff5
Feat(KeyMapping): Adds a configurable keymap to GameControls, resolves #793 (#893)
* Feat(KeyMapping): Adds a configurable keymap to GameControls + Updates help overlay to use it

Co-authored-by: gravestench <dknuth0101@gmail.com>
2020-11-01 19:43:23 -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 02acba231b
removed all 'wsl' lint errors (#836) 2020-10-25 17:28:40 -07:00
gravestench a1380bc264
removed all `golint` lint errors (#833)
* removed all 'golint' type lint errors
2020-10-25 16:23:55 -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 589850a728
Removing TODO comments, making issues for them (#807)
* 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
2020-10-25 10:21:14 -04:00
presiyan-ivanov 7661b81576
Initial left & right skill select panel implementation. HeroSkill serialization cleanup. (#783)
- 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>
2020-10-22 16:53:18 -04:00
juander-ux e5dae4e5d8
Inital skilltree panel implementation (#782)
* 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>
2020-10-22 12:54:45 -04:00
presiyan-ivanov 88326b5278
Initial cast overlay implementation. Fix HeroSkill deserialization & map entities processing crashing for remote client. (#766)
* 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>
2020-10-10 18:47:51 -04:00
Gürkan Kaymak f4a71c72e4
lint fixes (#727) 2020-09-12 16:25:09 -04:00
Ziemas dccb930f5c
Only draw shadows for layers that should have them (#704)
* Don't draw shadows for transparent layers

* Also use cof shadow setting
2020-08-16 14:59:34 -04:00
lord 33f66badfc
d2enum lint (#700)
* fixing some lint errors in d2enum

* fixed lint errors in d2enum
2020-08-06 16:45:22 -04:00
AndrejMijic 6514fd15de
Add monseq.txt loader (#664) 2020-08-01 17:55:34 -04:00
AndrejMijic 3fea5a096d
Add monequip.txt loader (#662) 2020-07-31 18:24:47 -04:00
AndrejMijic 42cd1e1a3b
Add monumod.txt loader (#653) 2020-07-30 21:49:29 -04:00
AndrejMijic 333b8610ac
Add pettype.txt loader (#648)
* Add pettype.txt loader

* Remove go.mod replace
2020-07-30 11:31:32 -04:00
lord bfd3f1046d
D2items WIP (#646)
* wip d2items system and item properties

* added loader for TreasureClassEx.txt

* wip item spawn from treasure class records

* wip items

* add call to init item equivalencies, remove treasure class test from d2app

* made item affix records global var a map of affix codes to the records

* changed how item to item common record equivalency is determined

* changed set items records export to a map of their codes to the records, grouped property params into a struct

* changed property parameter field from calcstring to string

* fixed bug in stat value clone

* adding equipper interface as part of stat context, eventually to be used to resolve set bonus (among other things)

* made the item interface simpler, only needs name and description methods

* adding equipper interface, for anything that will equip or have active items

* handle case where min and max are swapped, removed commented code

* added property/stat resolution for magic, rare, set, and unique items

* adding item generator which can roll for items using treasure class records

* fixed item equivalency func being called in the wrong spot
2020-07-30 10:14:15 -04:00
Gürkan Kaymak 7a49f3637f
lint fixes (#615) 2020-07-23 12:56:50 -04:00
dk 1654fd7e90
Removing lint errors in npc.go, mapstamp.go (#597)
- made an enum for NPCActionType to get rid of magic numbers
- moved the enum to d2enum
- fixed lint errors in npc.go
- fixed lint errors in mapstamp.go (because it was using npc.go)
2020-07-17 18:51:19 -04:00
Intyre 9e58b134e5
Refactored d2enum (#567)
* Refactored animation mode enum

* More d2enum changes

* Refactored tile enum

* Refactored weapon class enum

* Refactored more enums

* Refactored item event enum

* Fixed init_functions animation mode

* Removed string2enum from MonsterAnimationMode

* Refactored ItemStatCost description

* Last enum lint errors

* Regenerated monster stringer file
2020-07-09 23:12:28 -04:00
Ziemas e2e8a303c2
Use our own DrawEffects enum for draw effects (#564)
* Add PushEffect, handle effects in renderer

* Set effects instead of blend

* Stop using PushCompositeMode, use PushEffect

* Remove remaining composite mode things
2020-07-08 21:57:35 -04:00
Intyre a10a53be26
Renamed EquippedSlot enum (#563) 2020-07-08 19:08:07 -04:00
Ziemas 1ad3c72211
Standardize indexed color to RGBA conversion to one function (#562)
* Common function for indexed color to rgba

* Use ImgIndexToRGBA when decoding tiles

* Pass DrawEffect down to animation
2020-07-08 17:46:45 -04:00
dk 60e6fcb7ac
moving enumerations out of d2interface (#552)
* 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
2020-07-06 21:26:08 -04:00
Ziemas 6269726316
Composite work (#536)
* Quit using ObjectLookupRecord in composite

* Unexport SetMode in map entities

* Get rid of weaponClass from MapEntity

* Pass ObjectType to composite instead of string

* Use layer weaponclass from cof

* Manage more stuff directly in composite

* Explicitly index when picking equipment
2020-07-03 22:52:50 -04:00
dk de116e8367
moving package comments into doc.go files (#534) 2020-07-03 18:33:46 -04:00
Ziemas fa20b9ee51
Spawn monster by monstat record (#508)
* 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
2020-07-01 00:06:06 -04:00
Tim Sarbin e2572b8745
More linting (#500) 2020-06-30 09:58:53 -04:00
dk 4938ec1f44
Resolved most lint errors in d2data and d2datadict (#499)
* 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
2020-06-30 09:17:07 -04:00
dk 06202a2ddf
fixed monstats lint errors, added doc file for d2datadict (#494)
* adding comments to d2interface for linter

* moved d2render renderer interfaces and types into d2interface

* fixed most lint errors for monstats loader
2020-06-29 18:46:31 -04:00