Add smooth-movement plugin - #5875
Conversation
|
A general comment as this is a pervasive issue and I do not wish to pepper the review with dozens if not hundreds of comments: there are a lot of operations in here that work on (x,y) coordinate pairs that involve effectively duplicated code. DFHack has a 2d coordinate type I've made some other specific comments but this should not be considered a full review. |
This will be a substantial refactor. I will look into it and the others comments as well. |
|
Camera feature was not working properly and introduced a mouse click bug so I opted to remove it. Edit: forgot to tag @ab9rf |
ab9rf
left a comment
There was a problem hiding this comment.
note: this is not a complete review - i'll make another pass after these comments are addressed
not necessary to tag me, i'm notified on all activity on dfhack repositories |
|
I'm not ignoring this PR; instead, reviewing this PR has illuminated for me a few places where our infrastructure is insufficient and so I am working on improving those. I should have some more comments in another day or two. |
No worries, just let me know what I can do on my side. |
There are two things I'm working on that will impact this PR.
|
| bool flip_enabled = false; | ||
| bool zlevel_enabled = false; | ||
|
|
||
| // DF stores fire's animation frame in bits 28--31 of screentexpos_spatter_flag. |
There was a problem hiding this comment.
These appear to be incorrect. the encoding is actually
frame1 = 001 (1)
frame2 = 010 (2)
frame3 = 100 (4)
frame4 = 011 (3)
in bits 28-30. Bit 31 is used for something else.
Why Toady did it this way, I have no idea, but this is what's in the headers so...
Also this type is being added to df_structures as viewport_spatter_flag; please use the codegen-provided constants here instead of hardcoding them - see DFHack/df-structures#892
Summary
Adds the
smooth-movementplugin to DFHack. It provides smooth visual interpolation for creatures, items, vehicles, and related overlays in the fortress viewport.Notes
I closed the previous PR in favor of this version, which preserves the original code structure that was already reviewed by humans in the standalone repository.
Standalone repository: https://github.com/notliad/df-smooth-movement
Testing
smooth-movementplugin through the DFHack build system.smooth-movement-test.