A lightweight game engine and development platform using JavaScript for game coding, based on the original Sphere engine by Chad Austin but with a redesigned, modern API and brand-new command-line development tools.
Writing the code changes in fe1aee15d87d16473264db45b139e34f10bcd189 made me realize that the current mouse handling logic in input.c is pretty clunky. It assumes a fixed set of mouse buttons, and a mouse wheel that only scrolls vertically. As many modern mice are as complex as gamepads, this code should be refactored to be more flexible.
To be honest, input.c could use to be split off into separate source files for keyboard, mouse and joystick instead of the huge monolithic mess it is now.
Writing the code changes in fe1aee15d87d16473264db45b139e34f10bcd189 made me realize that the current mouse handling logic in
input.c
is pretty clunky. It assumes a fixed set of mouse buttons, and a mouse wheel that only scrolls vertically. As many modern mice are as complex as gamepads, this code should be refactored to be more flexible.