ladybird/Userland/Demos/CatDog
Andre Eisenbach e80f0b23e3 CatDog: Simplify animation frame logic and fix minor bugs
Moved all images into a Vector instead of storing every animation frame
in its own member variable. This greatly simplifies the bitmap selection
logic and removes redundant if() checks.

Also fixes minor state bugs. For example, CatDog woudld go to sleep
immediately after actively moving for > 5 seconds. Also fixes arbitrary
hardcoded values for mouse offset movement tresholds as well as
inconsistent movement increments. This allows clicking anywhere on the
CatDog window without moving CatDog.

In addition to removing many member variables, the API interface is
also cleaned up a bit to expose less CatDog internals. Nobody likes
exposed CatDog internals ;).

Variables and function are also renamed where necessary to (hopefully)
improve readability.
2022-12-16 08:50:35 -07:00
..
CatDog.cpp CatDog: Simplify animation frame logic and fix minor bugs 2022-12-16 08:50:35 -07:00
CatDog.h CatDog: Simplify animation frame logic and fix minor bugs 2022-12-16 08:50:35 -07:00
CMakeLists.txt Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
main.cpp CatDog: Simplify animation frame logic and fix minor bugs 2022-12-16 08:50:35 -07:00
SpeechBubble.cpp CatDog: Simplify animation frame logic and fix minor bugs 2022-12-16 08:50:35 -07:00
SpeechBubble.h Demos/CatDog: Let the speech bubble know about the CatDog widget 2022-03-02 18:10:02 +01:00