Commit Graph

17 Commits

Author SHA1 Message Date
Rickey d7414157a5 Add logging (#492)
* Add logger implementation for mgba debugging

* Add logging details to contributors guide

* Clang-format

* update docs real quick

* Cleanup for PR

* Update for PR

* Fix bad rebase

* Fix docs
2026-05-21 20:07:34 -07:00
Geralt e7f550ce22 [Feature] Implement options menu and reading/writing values from/to the SRAM (#449)
* 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>
2026-05-02 14:28:52 -07:00
Rickey f46395b9d0 Add basic common_ui background gfx functions (#415)
* Add basic common_ui background gfx functions

* clang format

* document common_ui.h

* Remove unused tonc header

* Fix header guard name convention

* more header cleanup

* claaaaanggggg format
2026-03-31 21:04:47 -07:00
Rickey 628c0c992d Introduce decimal point font (#314)
* Introduce decimal point font

* Add png of font

* Add getting a decimal point str from int

* Move font out of utils

* Clang format

* set Readme.md as main page in docs

* Add font generator

* kind of fix font

* Fix image oddities

* Added pip install pillow to build_ci_workflow

* Added ensurepip

* Update Docker/CI for font generation

* Fix CI

* Fix CI forreal

* Another CI fix

* Fix directory name for rom

* Adjust directory

* Dummy commit for test

* Revert "Dummy commit for test"

This reverts commit b607085c1322c824d2fdd800ab3c3700389ad3a6.

* dos2unix and update .gitignore

* Delete the generated font file

* Delete the generated font file

* remove dot from font

* Update include/font.h

Co-authored-by: MeirGavish <meir.gavish@gmail.com>

---------

Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2025-12-18 18:19:01 -08:00
MeirGavish ae5369b8fe Added C standard gnu23 to the makefile (#288)
* Added C standard gnu23 to the makefile

* Added gnu23 standard to all test modue makefiles

* Added installation of latest gcc version to tests workflow

* Fixed typo in previous commit

* Made GCC 14 installation conditional and moved from the workflow to the script

* Extracted GCC version check to external script for CI and created tests README

* Added #!/bin/bash

* Make check_gcc_version.sh executable
2025-12-12 18:46:03 -08:00
Rickey d32d567c2b Add nightly rom releases (#182)
* Add nightly rom releases

* Begin testing CI

* Add tests workflow

* Move release tag workflow

* Fix upload logic for intermediate artifact

* Fix variable add names

* Update build CI

* Update nightly upload location

* Add git hash to output

* Update upload location again

* Update name to have a date

* Adjust date format for consistency
2025-10-31 22:00:15 -07:00
MeirGavish a083d3de74 Moved pool file out of external definition and replaced it with a flag (#176)
* Moved pool file out of external definition and replaced it with a flag
2025-10-22 22:43:02 +03:00
Rickey Fehr af3d69bcfb Rename def files 2025-10-18 17:28:35 -07:00
Rickey Fehr 138792df48 Add memory pool test, fix bugs 2025-10-17 18:05:36 -07:00
Rickey Fehr 36bcf0fa30 Move version into C file 2025-09-24 20:44:13 -07:00
Rickey Fehr 56bbc2ff9a Add defaults for GIT_HASH and GIT_DIRTY 2025-09-23 21:41:55 -07:00
Rickey Fehr ebe789aa52 Add git hash baked into ROM for bug reports 2025-09-23 16:15:50 -07:00
MeirGavish 7c6aa7371f Added -g compile flag to allow debug symbols for IDE debugging 2025-08-04 10:20:49 +03:00
MeirGavish 8043a2bad6 Added flag to Makefile to treat warnings as errors that fail build, and commented out code in game.c to be warning free 2025-07-26 20:04:39 +03:00
cellos51 52fa45e426 Refactor joker selection logic in game shop 2025-07-18 20:38:34 -04:00
cellos51 176910c483 Jokers appear in the shop but don't do anything yet 2025-07-18 19:29:17 -04:00
cellos51 cac321a325 first commit 2025-01-31 17:42:09 -05:00