* Add hunger and hunger bar
- New functions added to Player struct in game.zig to use and heal hunger.
- If an attempt is made to use more hunger than there is available, the player is killed.
- Hunger bar uses placeholder icons.
- Hunger bar is based on the health bar
- Hunger bar is anchored to the left of the hotbar, rather than the right like the health bar.
* Don't kill player when hunger runs out.
- Don't use hunger when there's not enough to use
- Allow for code to know if hunger was used, so that is can handle not having enough hunger.
* New hunger textures
* Desaturate the highlight a little
* Return true if hunger was already true.
* Fix formatting
* Rename hunger to energy, and fix other issues.
* Make energy synchronized between client and server
Also removes the functions that add/remove energy on the game.Player struct
* Run formatter
* Fix incorrect formatting by formatter.
* Remove AddHunger struct and addHunger function
- Keep base operation so things like accessories and food can use it when syncing
* Fix formatting again.
---------
Co-authored-by: Carrie <carriecapp9@gmail.com>
* Refactor getting X positions of buttons in preparation for not moving the window when clicking the buttons
* Initial support for controllers
* Basic controller support
* Allow runtime download of gamecontrollerdb.txt
* Add new gamepad cursor asset, and use it.
* Various improvements
Allow saving and configuring gamepad mappings
Add gamepad sensitivity, for camera only
Adjust multipliers in usage of gamepad axes
Prompt for downloading controller mappings, and allow configuration
* Refactor startup window handling so that controller settings does not duplicate code, or have to detect if startup has finished
* Clamp cursor position to window size when changing via gamepad
* Add deadzone
* Implement changes requested
* Follow more suggestions
* Use atomics
* Use orelse for oldState in Gamepads.update
* Implement requested changes
* Fix accidental removal of whitespace on two empty lines
* Fix incorrect formatting on blank line due to Vim expanding tabs to spaces
* Fix build errors.
* Change unusual orelse usage with better if expression
* Add resettable keys
* Revert "Add resettable keys"
This reverts commit 902f032ec834161dcaac97cbe596788e0110e870.
* Update controller support
* Fix things I forgot about
* Fix more things
* Implement most requested changes and change button text to be more clear
* Update controller support
* Hopefully fix format without breaking it.
* Refactor getting X positions of buttons in preparation for not moving the window when clicking the buttons
* Initial support for controllers
* Basic controller support
* Allow runtime download of gamecontrollerdb.txt
* Add new gamepad cursor asset, and use it.
* Various improvements
Allow saving and configuring gamepad mappings
Add gamepad sensitivity, for camera only
Adjust multipliers in usage of gamepad axes
Prompt for downloading controller mappings, and allow configuration
* Refactor startup window handling so that controller settings does not duplicate code, or have to detect if startup has finished
* Clamp cursor position to window size when changing via gamepad
* Add deadzone
* Implement changes requested
* Follow more suggestions
* Use atomics
* Use orelse for oldState in Gamepads.update
* Implement requested changes
* Fix build errors.
* Change unusual orelse usage with better if expression
* Add resettable keys
* Revert "Add resettable keys"
This reverts commit 902f032ec834161dcaac97cbe596788e0110e870.
* Update controller support
* Fix things I forgot about
* Fix more things
* Implement most requested changes and change button text to be more clear
* Update controller support
* Hopefully fix format without breaking it.
* Implement suggestions
* Update controller mapping downloading to be more automatic
* Fix parameter in Window.Gamepad.ControllerMappingDownloadTask.isStillNeeded
* Revert order of window opening and opening next startup window in openStartupWindow
* Only download controller mappings the first moment a controller is plugged in
* Open controller mapping download UI when actually downloading mappings, or at startup if they have started before GUI initialization but haven't finished yet.
* Don't unnecessarily try to download controller mappings at init when it will be done once the first update happens anyways.
* Implement requested changes
* Remove debugging log output
* Implement changes to download_controller_mappings.zig