Commit Graph
82 Commits
Author SHA1 Message Date
RickeyandMeirGavish bf08d4eb78 Refine controls section in README.md (#552)
* Refine controls section in README.md

Updated control descriptions for clarity and consistency.

* Update control instructions in README.md

* Update README.md

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

---------

Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2026-06-13 01:17:56 -07:00
Rickey 36b01e0c95 Remove automatic releases on tags (#554) 2026-06-12 21:38:43 -07:00
Rickey 8111b6e046 Cleanup sprite_position usage (#539)
* Cleanup sprite_position usage

* Add IWRAM_CODE attr for inline sprite function

* removed extra sprite_position call
2026-06-11 18:01:41 -07:00
Rickey 4cbdd6c004 Temporarily remove "new run" and "resume" buttons (#546)
* Temporarily remove "new run" and "resume" buttons

* clang format

* Add apology
2026-06-10 21:09:12 -07:00
Rickey Fehr 2665f5bff5 Revert "Temporarily remove "new run" and "resume" buttons"
This reverts commit 55073b5b1d.
2026-06-09 19:30:58 -07:00
Rickey Fehr 55073b5b1d Temporarily remove "new run" and "resume" buttons 2026-06-09 19:26:01 -07:00
Rickey 917354f057 Clarify Linux installation instructions (#531)
Added note about Ubuntu version requirements for installation.
2026-06-05 21:29:35 -07:00
RickeyandCopilot Autofix powered by AI 63b6584706 Feature/game over audio (#494)
* 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

* tmp

* Update for Pr

* clang-format

* Cleanup for only supporting losing

* bug fix, thanks logs!

* Fix dangling pointer bug

The control of removing statemachines may call issues if starting the
function is done from another state machine call. To remedy this, add a
flag to determine if a state machine is registered and return early
instead of blindly removing it to re-add.

* Fix bug with audio iterations possibly going in reverse

* Remove extra includes

* Clang-format

* Add sound effects for game win/lose

* adjust audio steps

* tmp

* Nice sounding and cleaned up

* Fix and cleanup

* clang-format

* clang-format

* clang format again

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-27 21:57:30 -07:00
221b6d77c0 Add option to enable a more readable deck, suggestion by @Turro75 (#495) (#511)
* 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
RickeyandCopilot Autofix powered by AI 92cb9f9883 Refactor/state machine (#470)
* 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>
2026-05-22 18:06:13 -07:00
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
Rickey 9b85329669 Document deprecation warning for 'getdata' method (#489)
Added comments regarding the deprecation of 'getdata' in Pillow.

Comment in regards to: https://github.com/GBALATRO/balatro-gba/pull/486 . Good info for anyone seeing the warning.
2026-05-18 21:43:24 -07:00
Rickey b1c2b7f35e Refactor/round end (#479)
* Initial round_end extraction

* move hands to game vars

* Checkpoint

* Finish removing all variables for state fns

* Move over round_end substate functions

* Move over round_end with compile

* working in general

* Fix round start state issue

* clang-format

* Fix clang format issue

* PR fixes and standardize types in game vars struct

* Clang-format
2026-05-13 18:22:02 -07:00
d01b1ba12d Refactor/blind select screen (#461)
Refactor Blind Select Screen.

Based on #363
---------

Co-authored-by: emiyl <me@emiyl.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-06 00:56:59 -07:00
Rickey 877bd09576 Remove extra extern >:( (#460) 2026-05-03 02:37:25 -07:00
Rickey 39591f2d6a Docs/update windows build docs (#453)
* Move build instructions to contributing

* Add python pillow install instructions for win

* update linux instructions

* make cleaner menus

* Add macos help

* Update formatting and instructions in CONTRIBUTING.md

* Add build instructions reference to README

Added a note to refer to CONTRIBUTING.md for build instructions.

* Update build instructions in README.md

Clarified build instructions in README for different platforms.

* Fix step number in build instructions

Updated the step number in the build instructions to reflect the correct sequence.
2026-05-02 14:40:36 -07:00
Rickeyandemiyl da988ba7f5 Refactor/main menu (#416)
* Add basic common_ui background gfx functions

* Move game main menu to separate file

* clang format

* tmp commit basic docs

* clang format

* scope vars and cleanup

* Quick consistency update. Finalize.

This branch is based on: https://github.com/GBALATRO/balatro-gba/pull/363
Co-authored-by: emiyl <me@emiyl.com>

* Simplify global struct

* clang-format

* Add clang-format to subdirs

* Move timer definitions into their own file

* clang-format

* Fix action yml

* docs

* Update for PR

* Move game start to a state

* Remove lag switch

* Remove GameVariables pointer for callbacks

* Make game_vars a global

* move declaration of game vars in header

* Fix multiple game_vars

* fix for pr

* remove change_background in update again

* clang format

* Make bgCallbacks table static const

---------

Co-authored-by: emiyl <me@emiyl.com>
2026-04-27 20:04:18 -07:00
Rickey adca0961f5 Refactor/make game vars extern (#451)
* Remove GameVariables pointer for callbacks

* Make game_vars a global

* move declaration of game vars in header

* Move g_game_vars location
2026-04-27 19:55:07 -07:00
Rickey a31eccba20 Fix dos line endings in shell script (#434) 2026-04-06 21:39:34 -07:00
Rickey 2c9264bdcb Update CONTRIBUTING guide to inform of hosted docs (#422)
* Update CONTRIBUTING guide to inform of hosted docs

* update link to match rest of doc
2026-04-03 12:17:03 +03: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 91bc9b949e Update github action versions (#418) 2026-03-31 21:34:06 +03:00
Rickeyandemiyl 835e44e4db Introduce the game variables struct (#338)
Co-authored-by: emiyl <me@emiyl.com>

* Introduce the game variables struct

* Fix clang format

* Move game variables into their own file
2026-03-29 14:32:21 -07:00
RickeyandMeirGavish 0bc140b4e8 Document sprite.h w/ minor optimizations / fixes (#379)
* Rename Sprite to SpriteInfo

---------

Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2026-02-11 16:55:56 +02:00
RickeyandMeirGavish 955a0942f1 Add contributing guide (#334)
* Add contributing guide

* small format changes for CONTRIBUTING.md

* Update CONTRIBUTING.md

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

* Update CONTRIBUTING.md with more clang-format

* Move stuff around for CONTRIBUTING

* Update VScode instructions

* Remove recommendation for formatOnSave

* Update the clang-format thing again

* Update CONTRIBUTING.md

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

---------

Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2025-12-21 17:27:03 -08:00
Rickey 1da8e0332e document splash_screen.h (#331) 2025-12-19 11:22:21 +02:00
RickeyandMeirGavish 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
Rickey 9a2d128e87 Fix url for nightly (#323) 2025-12-18 05:36:33 +02:00
RickeyandMeirGavish 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
RickeyandMeirGavish 35ecbf33ae Format and document utility files (#246)
* Format and document utility files

* Add Doxyfile

* small updates for cleanup

* Final touches for util docs

* Replace `_` with `s_` for static functions

* update for clang-format changes

* Update include/audio_utils.h

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

* Apply suggestions from code review

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

* Update include/audio_utils.h

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

* Update include/graphic_utils.h

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

* Make clang-format happy :)

* Update gitignore for doxygen

* restor graphic_utils.c to main

* update graphics utils

* tmp

* tmp

* get it to compile

* fix some bad merge mistakes

* Fix clang format

* Apply suggestions from code review

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

* make clang-format happy

---------

Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2025-12-07 12:56:39 -08:00
Rickey a82bd671de Separate clang-format test into its own workflow (#283)
* Rework workflow dependencies
2025-12-06 23:59:55 +02:00
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
Rickey 1cacabdff6 Clang format pool (#255)
* Update comment prefix + add github action

* Clang Format pool

* fix clang format version

* Fix pool clang format
2025-11-27 10:41:13 -08:00
Rickey 184ee719b3 Clang format card.c/h (#256) 2025-11-26 00:52:04 +02:00
Rickey 09dd996181 Clang Format Blinds (#253)
* 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
2025-11-25 13:47:44 -08:00
RickeyandMeirGavish 2c32ff69e3 Clang format hand analysis (#261)
* Clang format hand analysis

* Update source/hand_analysis.c

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

---------

Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2025-11-25 13:45:07 -08:00
Rickey e910aee184 Clang format list (#254)
* Finish clang-format on lists
2025-11-25 11:32:50 +02:00
Rickey 6db35b0f95 Clang format sprite (#262) 2025-11-24 23:26:47 +02:00
Rickey Fehr fcb2337fa2 Clang format splash screen 2025-11-23 18:43:45 -08:00
Rickey 47b1bac31f Add list_swap() and list_insert() functions (#232)
* Add list_swap() and list_insert() functions

* Update docs for list_swap

* Add test case and fix list insert bug

* Fix silly bug with list length on insertion

* Initial changes for pr

* Add reverse iterator and update test for it

* Cleanup iterator next function

* update tests to cover list_get_at_idx
2025-11-18 18:19:00 -08:00
RickeyandMeirGavish a4caa44580 Add clang format and used it for bitset (#240)
* Add clang format file .clang-format

* Use clang format on bitset


---------

Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2025-11-18 08:56:32 +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
Rickey ecd98d0626 Merge pull request #208 from ffrank89/patch-1
Add gba-dev pacman installation instructions to README.md
2025-11-03 22:13:06 -08:00
Rickey 438df88316 Add download button (#196)
* Add download button

* Update README.md
2025-11-02 08:29:40 +02:00
Rickey Fehr 73abe5b6ce Junk directories on release zip 2025-11-01 21:19:00 -07:00
Rickey 2c532b5bd8 Merge pull request #197 from ricfehr3/hotfix/fix-nightly-permissions
Fix permissions issue for nightly workflow
2025-10-31 23:37:11 -07:00
Rickey Fehr fa52350146 Fix permissions issue for nightly workflow 2025-10-31 23:22:33 -07:00
Rickey 9dc0905c93 Merge pull request #195 from ricfehr3/update-issue-template
Update issue template for bug reports
2025-10-31 22:30:37 -07: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
Rickey Fehr 4af345c567 Update issue template for bug reports 2025-10-31 20:53:54 -07:00
RickeyandMeirGavish 52b1af576f Update source/pool.c
Update for PR fix magic number

Co-authored-by: MeirGavish <meir.gavish@gmail.com>
2025-10-20 18:07:48 -07:00
Rickey Fehr 517d40c294 Cleanup for PR, return old sprite tracker 2025-10-19 15:52:36 -07:00
Rickey Fehr e40f3c989f Fix memory map script 2025-10-18 17:35:53 -07:00
Rickey Fehr af3d69bcfb Rename def files 2025-10-18 17:28:35 -07:00
Rickey Fehr a5c5f9cb15 Add timings to memory test 2025-10-18 17:23:59 -07:00
Rickey Fehr ab07c9af04 Hotfix going out of bounds 2025-10-18 17:09:22 -07:00
Rickey Fehr 09f6c35496 Fix slight bug with false positives on pool test 2025-10-17 18:08:20 -07:00
Rickey Fehr 138792df48 Add memory pool test, fix bugs 2025-10-17 18:05:36 -07:00
Rickey Fehr 16059ab632 Update for PR
Readd sprite tracker to not reuse indices
check for capacity when returning pool entries
Update script for printing memory map
2025-10-17 16:55:09 -07:00
Rickey Fehr d499abe2c4 Cleanup for PR 2025-10-17 16:55:09 -07:00
Rickey Fehr d78e04c6b5 Fix style, tiny error, and typo 2025-10-17 16:55:09 -07:00
Rickey Fehr 5e2bd9a59a Update memory map script and cleanup 2025-10-17 16:55:09 -07:00
Rickey Fehr a1e73be3fc Update github actions to print the memory map 2025-10-17 16:55:09 -07:00
Rickey Fehr 06cd13a17f Centralize location of memory pools
This commit centralizes the location of memory pools and adds an
associated script (scripts/get_memory_map.sh) to read the memory map.
2025-10-17 16:55:09 -07:00
Rickey Fehr 72c0a6c4a9 Optimize bit operations, style fix, cleanup 2025-10-17 16:55:07 -07:00
Rickey Fehr e00c51502b Replace Malloc With Pools
This commit introduces an object pool and replaces instances of malloc with pools where sensible.
2025-10-17 16:54:09 -07:00
Rickey Fehr ef048791c1 Separate out graphics and add ability change boss 2025-10-13 23:36:27 -07:00
Rickey Fehr f885fa9164 Fix Iterating over every blind instead of 3 max 2025-10-13 23:36:27 -07:00
Rickey Fehr 54d955d1e7 Update for PR 2025-10-13 23:36:27 -07:00
Rickey Fehr 3c2dd0edba Rename blind enums to represent their type
This commit prefixes the enums `BlindType` and `BlindState` with their
types for clarity
2025-10-13 23:36:27 -07:00
Rickey Fehr 7ee07bb34c Refactor blind into a map 2025-10-13 23:36:27 -07:00
Rickey Fehr 73ec9a40d3 Fix softlock related to #163 2025-10-08 20:29:11 -07:00
Rickey Fehr cca015238d Update docs for docker 2025-10-07 20:30:11 -07:00
Rickey Fehr 88726cbb39 Add script to get version 2025-09-24 20:49:01 -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
Rickey Fehr e58208e13d Add uploading ROM on tag push 2025-09-22 14:27:50 -07:00
Rickey Fehr 5b76cbfad0 Add cache for docker compose container 2025-09-14 15:15:42 -07:00
Rickey Fehr 074f1956aa Update Github Actions CI to use Docker Compose 2025-09-14 15:15:10 -07:00
Rickey Fehr b27c94e5bd Add docker support
Add docker support via a docker compose file with included instructions.
2025-09-11 12:59:52 -07:00