* Updated all static variables to have the s_ prefix and constants to upper case
* Renamed missed sneaky functions in round.c (+ clang-format...)
* Renamed a few more missed constants
* Updated rng_update() documentation
* Apply suggestions from Copilot's code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Added missed suggestion
* Updated rng_update() comment
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* initial commit
* wip
* WIP
* WIP
* clang format
* Choose Seed navigation mostly done
* seed input navigation done
* seed input done
* cleanup and clang format
* Implement base 10 to 36 conversions
* Enable seeded runs
* clang format
* show default deck sprite, name and description
* Rename Deck enum to DeckType
* Implement arbitrary 9-patch expand system
* Make 9-patch example smaller in the docs
* Improve NinePatchRect docs
* fix Deck back side sprite palette
* clang format
* Add last deck description
* clang format
* Fix 'Z' in seed input keyboard
* Fix rebase issue
* fix deck sprite not updating
* Documents static funcs in run_setup.c
* more documentation
* clang format
* Move Play button to the left in its row
* Tests WIP
* removing tests for random.h
* use the new StateMachine struct
* First wave of fixes
* Fix the 9-patch again
* Changed the base 36 logic so it's in big endian
* properly set end of base 36 string to '\0'
* typos
* fix cursor position after rolling a seed + fix random seed generation
* Make keyboard more intuitive to use
* static const var
* Address more comment from @ricfehr3
* clang format
* clang format
* clang format
* clang format
* clang format
* clang format
* clang format
* fix deck palette
* create the `DEF_SEED_KEYBOARD_BUTTON_OBJECT` macro
* Replace `expand_3x3` by a call to `expand_9-patch`
* clang format
* clang format
* clang format
* fix rebase iussue in state_machine.h
---------
Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
* initial additions
* Move current_blind to game vars
* tmp
* tmp
* tmp
* tmp
* tmp
* tmp
* tmp
* Compile but is broken
* temp fix for token location
* tmp
* Working, lets clean up
* remove todo
* Remove odd reroll blind variable
* fix skipping blind screen
* fix reroll
* remove magic for blind token locations
* clang format
* Cleanup button highlight in blind menu
* some cleanup
* Add layout file for global UI rects
* remove dead code
* Clang format
* clang format it up
* Move reset top left funct to gfx utils
* make note of soon-to-be removed vars
* Cleanup gamevars declaration
* Cleanup layout file
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Add include for stdbool.h in common_ui.h
* Cleanup rect declaration
* Start moving state machine stuff to new file
* quick tmp
* oops, add new files
* working call list
* fixed pointer stuff
* working as per norm
* working replacement
* move defines to static const
* fix compile issue
* Add some missing "void"s
* Working new substates
* add statemachine to blind select
* Fix game restart statemachine leak
* clang-format
* Clang format
* Rework shop exit logic
* Use new state machine in shop
* Remove substates entirely
* Remove debug stuff
* Clang format
* document state machine better
* update list tests
* clang-format
* Update for PR
* Claaaaang format
* another clang-format
* Remove extra state in round_end
* cleanup docs for removals in lists
* clang-format... again
* update doxygen format
* Clang format
* Update list docs
* Update lists tests
* Fix bad conflict resolution
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* move all hand funcs to their new file. now to clean up
* WIP
* Cleanup + doc hand.h
* clang format
* Refactor loose variables in hand.c into a proper Hand struct
* Fix some more issues
* Apply *some* suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* remove outdated comment
* fix rebase issue
* fix rng_info missing from g_game_vars init
---------
Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Extract rng manipulation to its own file
* clang format
* Get CPU cycles since game start to use for RNG
* change a few things
* clang format
* Implement suggestions from @ricfehr3
* clang format
* Fix rebase issue
* clang format
* Create RngInfo struct to hold seed and step
* clang format
* Make a note about rng_restore system not having been tested properly yet
* Apply suggestions from @ricfehr3
Co-authored-by: Rickey <ric@rf3.xyz>
* clang format
---------
Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
Co-authored-by: Rickey <ric@rf3.xyz>
* initial commit, DOES NOT COMPILE
* Rename joker interactions file to `joker_row`
* IT'S WORKIIING (now to make it pretty lol)
* fixed rebase issues
* fix rebase + undo state machine changes
* Document shop state functions
* clang format
* fix reroll cost not appearing on shop init
* Move generic SpriteObject text/price printing functions to sprite.c + some minor fixes
* Resolve weird defines/include order issue
* clang format
* Implement suggestions from @ricfehr3
* clang format
* clang format
* fix rebase
* Implement sugegstions from @ricfehr3
* Refactored shop to use the Button struct
* missed some memsets
---------
Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
* background
* Implement Options button
* Update main menu artwork
* add options menu tiles
* prepare options menu handling
* incorporate main menu refactor
* toto
* add all menu interactions
* do not reset selection_x in main_menu
* options struct
* fix rebase from ricfehr3's repo
* Implement high contrast cards
* Save/Load options values to SRAM
* load options on game_init and validate data within the load_options function
* Get changes from ricfehr3's PR
* recover fix for glitched ace
* clang format
* clang format
* clang format
* Save 500B of image data by using only minimal set of tiles instead of keeping final window in source file
* clang format
* clang format
* Implement Options button
* Update main menu artwork
* progress, leaving it alone for now until discussion
* make game_vars an extern
* Move options vars into their own struct
* rollback previous commit
* Implement save validation. Version check to come
* implement data validity + version check for game saves
* clang format
* Save position in rng sequence for consistent run after load
* fix rebase issues
* fix rebase issue
* remove unused/duplicate define
* Oops, made a mistake when testing PR #424
* encode high contrast palette into an image, and load it at game_start
* document save.c/h and correct typos
* correct alignment
* game speed and high contrast buttons working
* small cleanup
* sliders also work again now
* clang format
* Moved balatro_version extern declaration to version.h file
* removed unsused variable
* make showing ROM version a toggle
* move ante, round and money to the GameVariables struct
* Rename SaveCheckInfo struct to SaveHeader for clarity
* Add SaveHeader struct explanation
* clang format
* Revert unnecessary tileset optimization
* SFX now follows the sound volume slider
* clang format
* Music now follows volume slider
* Changed volume slider increment from 5 to 20 to avoid having the music sound too rough under 20% volume
* refactor main_menu.c to use SelectionGrid and Button structs
* clang format
* make a "new" save button so we don't save during the state transition
* clang format
* Reduced state transition flicker by only changing affine background to a different one
* Fix loading game too late in game init sequence
* First batch of suggestions from @MeirGavish
* Remove unnecessary intermediary buffers for high contrast palette swapping
* comment row warp hack for button input
* Add some of Copilot's suggestions
* rename balatro_version into gbalatro_version for rebranding reasons + version display erase screen fix
* remove unnecessary NULL check on `on_selection_changed` method
* implement small game speed arrow buttons animation
* factorize some code
* remove unnecessary data validation in load_game(), since we already checked the header
* Implement @MeirGavish 's suggestion regarding splitting the huge `on_update` function
* clang format
* implement @ricfehr3 's suggestion about keeping last selected button instead of using an obscure `on_boot` boolean
* Apply @ricfehr3's suggestions
* fix clang-format flags
---------
Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
* Created sprite bank for all blinds
* progress city, it's a beatiful city that progress city!
* Sprite appears in blind selection screen
* Added all blind colors
* fix magic numbers + disable boss reroll
* Fix boss blind token not moving after a reroll
* fix always rolling the Needle due to choosing too early for the rng seed to be set
* No need for affine sprite for blind tokens, regular is enough
* address Copilot's review 1/2
* address Copilot's review 2/2
* correct Blind Tokens/Types
* Index palette colors into the files instead of code
* Fix blind sprites (flip bug not solved)
* Fix magic number, tile index and Mark colors
* load boss blind palette only when changing spritesheet
* Adressing clang format and ease of modification of the blinds' list
* Removed some magic numbers
---------
Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
* Clang format joker files and def files
* Fix blind usage of GBLA_UNUSED macro
* Add final files for clang-format (main.c and selection_grid.h)
---------
Co-authored-by: MeirGavish <meir.gavish@gmail.com>
* Fixed score truncation erasure, and centering for chips, mult, score and "temp score
* Added centering for money
* Added tests for truncate_uint_to_suffixed_str()
* Fixed u32 bug with get_digits
* Fixed score flames for large numbers
* Small change to update documentation
* Added 1 pixel on to score rect on the left to make room for full character tile + reset_top_left_panel_bottom_row() refactor
* Replaced directional defines with enums
* Updated ante_lut comment
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Quick cleanup on bitset docs
* Clang format blind.h/c
* Replace `_` with `s_` for functions
* Fix newline size for macros.
* Fix format for ci
* Add macro for "unused" attribute