devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Add helpers to anim info

Open k-bar opened this issue 3 years ago • 6 comments

  • Added helpers to animationinfo (improves readability of it's usage in the code) added triggerFrame
  • clean all clang-tidy remarks in animationinfo in the process (access/ case style / casts)

review remarks: animationinfo.h <- here are vast majority of changes, but mainly access/sort/case style + added helpers the rest of the code is derivates of these changes.

other change in the rest of the code is support for triggerFrame (load/save/monster/player).

k-bar avatar Jun 29 '22 09:06 k-bar

somebody stop me just wanted to squelch some clang-tidy warnings:

  • misc-non-private-member-variables-in-classes
  • invalid case style for member

k-bar avatar Jun 29 '22 15:06 k-bar

Can you please rewrite the history to squash related commits and put the clang-tidy changes first? Having 14 commits with very similar names doing partial applications of a change makes it hard to review.

ephphatha avatar Jun 30 '22 22:06 ephphatha

Can you please rewrite the history to squash related commits and put the clang-tidy changes first? Having 14 commits with very similar names doing partial applications of a change makes it hard to review.

I think that since most changes are straigthforward like case style change, it is best to view as final work together. I could squash them all together. Reversing history would be meaning I had to write things I replaced by helpers in a way I did not write it here.

k-bar avatar Jul 01 '22 01:07 k-bar

Oh, the only place I moved things around is header file of animationinfo. The rest are replace strings in lines and simple additions. Or really simple one line movings in one or two switch cases.

k-bar avatar Jul 01 '22 01:07 k-bar

Ye, I checked again. It is best to inspect the header 1st. Like all those getters/setters/helpers. So if header is fine, the rest are derivatives of its changes. Plus added handling for triggerFrame in the code.

k-bar avatar Jul 01 '22 02:07 k-bar

Squashed and rebased on latest changed master.

k-bar avatar Jul 02 '22 09:07 k-bar