Commit Graph

50 Commits

Author SHA1 Message Date
Geralt
e26558e1a5 [Feature] Implement Joker descriptions in the Shop when holding B (#530)
Some checks are pending
Build and Deploy Doxygen Docs / docs (push) Waiting to run
* WIP

* WIP

* WIP

* WIP

* Tags are bugged but it's looking good

* Centering is bugged, almost there

* WIP

* Fixed centeriiiing, yaaaay

* good progress

* add proper '\n' support

* WIP descriptions

* All descriptions are there ^^

* missing 9-patch for pretty display

* WIP

* fix rebase issues

* Fix minor Run Setup screen issues

* Almost done, only one fix to go

* Aaaalmooost doooneeeee

* make desc frame size adaptative

* add rarity color and text

* final cleanup

* clang format

* clang format

* clang format

* clang format

* clang format

* Fix Joker update loop index

* Fix const and Bull description

* Fix unwanted button SFX

* fix tte colors

* Add misprint description

* Fix justified line length computation

* Add safeguards to tag parsing loop

* clang format

* Fix Ante bugged display at boss blind end

* Tweak suit colors

* Final fixes

* Simplified the way we print descriptions

* simplify further

* get rid of weird macro

* Fix Onwed joker price when holding A after showing its description

---------

Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
2026-06-08 18:16:37 -07:00
Geralt
1df8402900 [Feature] Implement seeded runs by adding a Seed selection menu (#482)
* 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>
2026-06-02 00:06:37 -07:00
Rickey
221b6d77c0 Add option to enable a more readable deck, suggestion by @Turro75 (#495) (#511)
Some checks are pending
Build and Deploy Doxygen Docs / docs (push) Waiting to run
* Options menu revamp

* Implement readable card sprites

* redraw characters to fix the original style

* clang format

* remove usage of UNDEFINED (-1) for unsigned values

* typo

* change save fix for something cleaner

* remove dependency to game_variables.h from card.c

* Make the palette look less silly ^^'

* Address @ricfehr3's comments

* clang format

* quick rename

* clang format

---------

Co-authored-by: Geralt <84459734+MathisMartin31@users.noreply.github.com>
Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
Co-authored-by: Turro75 <valerio.turrini@gmail.com>
2026-05-25 11:11:33 -07:00
Rickey
cebdebbfd0 Revert "Add option to enable a more readable deck, suggestion by @Turro75 (#495)" (#510)
This reverts commit d3c0357856.
2026-05-25 11:01:13 -07:00
Geralt
d3c0357856 Add option to enable a more readable deck, suggestion by @Turro75 (#495)
* Options menu revamp

* Implement readable card sprites

* redraw characters to fix the original style

* clang format

* remove usage of UNDEFINED (-1) for unsigned values

* typo

* change save fix for something cleaner

* remove dependency to game_variables.h from card.c

* Make the palette look less silly ^^'

* Address @ricfehr3's comments

* clang format

* quick rename

* clang format

---------

Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
2026-05-25 11:00:37 -07:00
Rickey
d7414157a5 Add logging (#492)
Some checks are pending
Build and Deploy Doxygen Docs / docs (push) Waiting to run
* 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
c2844a5d32 Refactor/RNG system (#476)
* 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>
2026-05-21 19:47:48 -07:00
Geralt
a79c4c92e2 Updating the save mechanism by creating an intermediary SaveData struct (#472)
* Make save changes their own branch

* Make SaveData tags char[] instead of u32[]

* Make Game and Options data saving independent

* removed unused functions

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* mark save sections as valid only after they are actually written to SRAM

* fix comparison between different integer types

* Implement some suggestions from @ricfehr3

* Add extensive documentation on the structure of the savefile

* fix doxygen doc generation

* fix it again

---------

Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-10 12:39:54 -07:00
MeirGavish
18f70714ce Increased number of audio channels to 14 (#409) 2026-03-29 20:04:25 -07:00
MeirGavish
6575fc7f94 Update the truncate number function to use decimal point (#333)
Some checks failed
Deploy Nightly / Run Build ROM Workflow (push) Has been cancelled
Deploy Nightly / Deploy nightly (push) Has been cancelled
* Fixed to truncate as "1.234M" instead of "1234K"

* Optimized by switching to strings to avoid divisions

* Changed FP constants to strings

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-23 07:52:30 +02: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 b607085c13.

* 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
Rickey
2fb9e6d633 Clang format joker files and def files (#257)
* 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>
2025-12-10 09:41:24 +02:00
MeirGavish
53d2e53d78 Changed music to start after Splash Screen 2025-10-17 13:43:21 +03:00
Drew
dbef1dacdc Added the ability to restart the game after a game over.
The function that handles this is the on_exit of the game lost state. This function is not meant to
be permanent, but is just a placeholder while we decide what we actually want to do when game over is
reached.
2025-10-14 10:26:05 -05:00
cellos51
f4d8fc9097 Merge branch 'main' of https://github.com/cellos51/balatro-gba into hblank_affine_background_effects and changed parameters on affine source to be updated from experimental branch 2025-08-28 22:39:48 -04:00
cellos51
6e2d3ee499 Merge branch 'main' of https://github.com/cellos51/balatro-gba into hblank_affine_background_effects 2025-08-25 19:34:25 -04:00
Elliptical
21d85f49ab Update source/main.c
Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2025-08-25 16:14:51 -04:00
cellos51
4f1f7cb347 Add splash screen functionality and update game state management
- Introduced GAME_SPLASH_SCREEN state in game.h
- Implemented splash_screen_init and splash_screen_update functions in splash_screen.c
- Updated game.c to initialize with GAME_SPLASH_SCREEN and handle splash screen updates
- Removed old splash screen code from main.c
2025-08-24 15:44:45 -04:00
cellos51
53e6156397 Merge branch 'main' of https://github.com/cellos51/balatro-gba into main_menu_and_splash_screen 2025-08-24 13:47:41 -04:00
MeirGavish
3be49b1d80 Removed old comment 2025-08-22 02:09:24 +03:00
MeirGavish
42a0e94afd Refactor - Added defines for text colors and used them in all usses of tte_printf 2025-08-19 17:47:24 +03:00
cellos51
5d0ea3a101 Changed formatting on github link 2025-08-12 21:42:44 -04:00
cellos51
4c5c0f4d40 Removed rng set in game_round_init() and updated defines for splash screen 2025-08-12 20:55:03 -04:00
cellos51
abfcb68f75 Merge branch 'main' of https://github.com/cellos51/balatro-gba into main_menu_and_splash_screen 2025-08-12 20:53:31 -04:00
MeirGavish
f66e296989 Merge branch 'main' into hblank_affine_background_effects 2025-08-12 17:24:14 +03:00
MeirGavish
05af8217ff Small affine background CBB/SBB fix 2025-08-12 01:59:04 +03:00
cellos51
7505d89194 Addec count down timer to splash screen and stopped music playing until at menu 2025-08-10 13:11:05 -04:00
cellos51
7d2be834a3 Splash screen with disclaimer added 2025-08-10 13:00:38 -04:00
cellos51
164f58aa1e Main menu prototype 2025-08-09 21:49:37 -04:00
cellos51
521b373bd2 Added new background visuals 2025-08-09 13:52:24 -04:00
cellos51
592d7ae8bc Add affine background color functionality and integrate into game loop 2025-08-05 14:35:52 -04:00
Elliptical
8315d6a42c Switching to a boss blind now changes the background palette 2025-08-02 10:29:26 -04:00
cellos51
c8893c806c Added @GreenNinja2525's replacement deck icon. Added play hand and discard buttons and changed keybindings. 2025-07-22 01:42:31 -04:00
cellos51
4a5644eddb Defining a basic system for jokers 2025-07-17 21:47:50 -04:00
cellos51
54d8aa2ec6 Applied most refactors from previous merge by @MeirGavish 2025-07-16 21:31:05 -04:00
GreenNinja2525
4f8930510e Update main.c and remove #include "background_play_gfx.h" 2025-07-13 12:21:56 -04:00
MeirGavish
4e5e1f340e Changed game to start at blind selection - added game_round_init() and game_set_state() etc to try and make easier state transmissions 2025-07-11 18:22:45 +03:00
MeirGavish
b822d2b365 Moved code to new graphic_utils.c/.h header and added Rect wrapper struct 2025-07-09 04:59:19 +03:00
MeirGavish
2a92b3ecaa Added SBB and CBB defines for SE/tile bases to remove their magic numbers 2025-07-09 00:40:59 +03:00
cellos51
6435b92378 Slight update to graphics and added shop background image 2025-07-03 21:49:29 -04:00
MeirGavish
878a0a24eb Replaced call to vid_sync() with the better VBlankIntrWait() 2025-07-03 04:15:48 +03:00
cellos51
c58b569516 Added more stuff to the end round, made the blind token a sprite and toned dow n the background animation a bit. 2025-06-30 03:18:04 -04:00
cellos51
5196362ab9 Added wip moving background, end of round screen and temporarily removed blind icon. 2025-06-28 22:32:45 -04:00
cellos51
36b1508e85 Added begginings of the round end screen 2025-06-27 00:03:38 -04:00
cellos51
af43a91f19 moved all logic from card.c to game.c for future optimization 2025-06-26 00:20:46 -04:00
cellos51
ac24754380 Completed functionality of the small blind 2025-06-13 15:10:19 -04:00
cellos51
2d21c83f89 Update card handling logic and improve background management; add hand types and refine game state transitions. 2025-05-19 11:24:13 -04:00
cellos51
7ce6082edd Refactor hand_discard function to return a boolean and update game logic for discarding cards; add background_play_gfx and improve text engine initialization. 2025-02-16 22:07:44 -05:00
cellos51
edfa358e35 Added the ability to discard cards in a hand and other various changes. 2025-02-08 22:27:05 -05:00
cellos51
cac321a325 first commit 2025-01-31 17:42:09 -05:00