Commit Graph
56 Commits
Author SHA1 Message Date
291edaf4f2 Clang format and refactor game.h/c + update Bracket Alignment to BlockIndent (#259)
* Refactor and clang-format game.h/c

* Updated clang-format AlignAfterOpenBracket: BlockIndent and ColumnLimit: 100 and refactored all files accordingly

---------

Co-authored-by: MeirGavish <meir.gavish@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-03 13:49:31 +02:00
TygyhandCopilot 8bba449196 Convert BG_ID_* defines to enum BackgroundId (#265)
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2025-11-30 08:53:51 +02:00
GeraltandMathisMartin31 0953a430c4 Implement Seltzer and Joker Expiration effect (#252)
* Add Seltzer art

* Implement Joker expiration

* Add exception to copying Jokers + Seltzer message fix

* Move all scoring logic to joker_object_score away from check_and_score_joker_for_event

---------

Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
2025-11-30 08:52:42 +02:00
1ac55692e9 Break up the played cards scoring loop into several functions (#224)
* rename PLAY_PLAYING state into PLAY_STARTING

* make discarded_card and sound_played global variables

* Broken up cards_score state update

---------

Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2025-11-16 17:33:01 +02:00
GeraltandMathisMartin31 4183f563ab Implement cards held in hand effects (#205)
* Adapt existing Jokers to the Held Card mechanic + effect display location

* Add suggestions from @ricfehr3

* Add suggestions from @MeirGavish

---------

Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
2025-11-12 13:18:53 +02:00
Rickeyandrfehr-idexx e0cffab768 Update list implementation to work with memory pools (#168)
* Introduce indexed list implementation

* Fix CI tests for pool

* Take bitset out of pool

* Replace joker bitset interactions with wrappers

* Add bitset tests

* Add test to gitignore

---------

Co-authored-by: rfehr-idexx <ric-fehr@idexx.com>
2025-11-11 17:56:21 +02:00
03273de829 Adds Shortcut and Four Fingers (#95)
* adds shortcut joker

* adds Four Fingers joker, and combination support for Four Fingers + Shortcut

---------

Co-authored-by: MeirGavish <meir.gavish@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-01 16:28:40 +02:00
eb815b7820 Refactor of scoring flow, Joker Callbacks and Card Retriggers (#160)
* Remove Baseball Card for now, will have to wait a future PR

* Removed cards held in hand joker scoring stage - should be in another PR

---------

Co-authored-by: MonteCrysto <mathis.martin31@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2025-11-01 15:50:52 +02:00
c510e78704 Implement Interest (#144)
* Implemented Interest

* Very carefully applied changes from PR #144 to implement interest and fixed magic numbers

---------

Co-authored-by: JustinL-12 <jlong30@uic.edu>
Co-authored-by: MeirGavish <meir.gavish@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-29 20:43:26 +02:00
MeirGavish 9b568e8e1a Moved undefined game state to enum end (more xmacro idiomatic) 2025-10-21 12:50:18 +03:00
MeirGavish 53d2e53d78 Changed music to start after Splash Screen 2025-10-17 13:43:21 +03:00
Drew 3a6e004fc6 Rebase and some PR feedback 2025-10-14 10:44:21 -05:00
Drew 0f154741ed Renaming a function, fixing a call to memcpy16. Replacing magic numbers with enum values 2025-10-14 10:26:09 -05:00
Drew fb35397238 Cleanup 2025-10-14 10:20:43 -05:00
Drew 121bbc01d5 Refactored state machine.
Added a state info map which keeps track of a particular state's on_init, on_update and on_exit functions.
A few of the on_update functions have sub-states, which create extremely long switch statements.
Not sure if perhaps the best route would be to keep the switch statements but break the cases into individual
functions or if we should keep track of substates. The latter sounds like it could get complicated and really
messy quick. Problem for another day.
2025-10-14 10:20:40 -05:00
MeirGavish 6dce57e197 Merge pull request #145 from pansythoughts/main
kind of fixed how game_speed behaves
2025-10-14 13:57:40 +03:00
alex 767e21d5fa made the lerped temp score expression clearer 2025-10-13 20:26:20 -07:00
Geralt ce6d2049f8 Update game.h
Fix missing `is_joker_present` rename into `is_joker_owned`
2025-10-09 14:52:41 +02:00
MonteCrysto de7c9d4d60 Add a "get_num_hands_remaining" function and implement the Acrobat Joker 2025-09-30 23:06:13 +02:00
MonteCrysto c781ee9666 Add a "is_card_face" function to take into account if Pareidolia is present 2025-09-30 22:47:00 +02:00
alex 7bafc260dd fixed game_speed, now using fixed point and keeping game_speed static 2025-09-22 22:04:51 -07:00
alex 301f5a2a53 kind of fixed how game_speed behaves 2025-09-21 23:49:24 -07:00
alex 6e60cf5970 kind of fixed how game_speed behaves 2025-09-21 23:16:50 -07: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 7f5ed5433f Win screen + Game over animation with hand discard 2025-08-21 23:33:51 +03:00
MeirGavish 04515839dc (Manual conflict res) merged main into ttm/joker-scope-joker-1 2025-08-17 11:03:27 +03:00
MeirGavish 64274ae465 Added joker selling (still no animation) + fixed SpriteObject constructor focused bug 2025-08-16 15:38:34 +03:00
MeirGavish 92fa279059 Refactored jokers stack to be a list (AI used) 2025-08-16 13:18:44 +03:00
MeirGavish b218d4ac3e (Manual conflict res) Merge branch 'main' into ttm/joker-scope-joker-1 2025-08-15 10:56:41 +03:00
cellos51 164f58aa1e Main menu prototype 2025-08-09 21:49:37 -04:00
MeirGavish fd8e52d48a Removed magic numbers for card score length and intmax buffer sizes 2025-08-08 01:59:21 +03:00
MeirGavish 5e6d28c663 Fixed stack top bugs in joker_effects.c - e.g. Blackboard activated if just the first card in hand was not spades/clubs 2025-08-08 00:01:36 +03:00
theturtlemafia 0f3d1b3b77 adds walkie-talkie, fibonnaci, banner, mystic summit, blackboard 2025-08-02 13:25:04 -04:00
theturtlemafia 174050d813 add fist, parking, business card, scholar, scary face, abstact, bull, smiley, even, odd jokers 2025-08-02 13:25:04 -04:00
theturtlemafia ee0591562f add blue joker 2025-08-02 13:25:04 -04:00
theturtlemafia dbff88add0 Adds XMult, Joker Stencil and Misprint (rebase) 2025-08-01 18:35:31 -04:00
theturtlemafia a72458c2c3 adds jokers 6-16. Extract hand type detection logic from hand_get_type to be used by jokers as well 2025-07-28 18:27:48 -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 414bfa2a32 Semi functional jokers 2025-07-20 20:55:11 -04:00
cellos51 c06b179764 really bad purchasing system for jokers 2025-07-18 20:25:12 -04:00
cellos51 176910c483 Jokers appear in the shop but don't do anything yet 2025-07-18 19:29:17 -04:00
cellos51 e1c1d68694 basic implementation of blind select screen 2025-07-09 21:37:49 -04: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 2aaee73bac Replaced round end menu hack with clear rect function 2025-07-09 04:11:55 +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 a56bba2c0e implemented shop screen after round end 2025-07-05 19:34:48 -04:00
expected-ingot c8f2e96572 GAME_LOSE state 2025-06-30 14:16:07 +02:00
expected-ingot de6060eee3 Merge branch 'main' of https://github.com/cellos51/balatro-gba 2025-06-30 01:03:09 +02:00
expected-ingot de87271199 Fixed FRAMES macro to use ceil division 2025-06-30 00:55:55 +02:00