Commit Graph

25 Commits

Author SHA1 Message Date
MeirGavish
6022dda230 Updated documentation 2026-09-04 19:10:24 +03:00
MeirGavish
8c57f57f1a Removed prefix from macro names 2026-09-04 18:47:40 +03:00
MeirGavish
298e46e273 Added RET_NONE define, removed void macros and replaced all usages with ret versions 2026-09-04 18:22:57 +03:00
MeirGavish
2d8fc0fde2 Used __VA_OPT__(,) to avoid trailing commas.
Fixed error in previous commit
2026-09-04 18:22:57 +03:00
MeirGavish
992e2d7fbb Used empty macro argument to avoid code duplication 2026-09-04 18:22:56 +03:00
MeirGavish
84074d561c Removed unrelated includes from joker tiles/palettes block 2026-09-04 18:22:56 +03:00
MeirGavish
73f3ef76c8 Fixed assert documentation 2026-09-04 18:22:56 +03:00
MeirGavish
7d9c0203d0 Added documentation + clang-format 2026-09-04 18:22:56 +03:00
MeirGavish
57104454b1 Extracted cust_msg macros and removed unnecessary RETURN_IF_EQUALS/UNEQUALS macros 2026-09-04 18:22:55 +03:00
MeirGavish
91104a6898 Added generic assert - WIP 2026-09-04 18:22:55 +03:00
MeirGavish
4d26f13c26 Add logging macros that include the function name (#557)
Some checks failed
Build and Deploy Doxygen Docs / docs (push) Has been cancelled
* Added function name logging to mgba_logger

* Addendum to no-op defines

* Fixed compile errors

* Added "()" to function name in log to make it clearer it's a function

* Corrected documentation

* clang-format...?

* Removed MGBA_LOG_LEVEL_MASK magic number

* Added CHECK_NULL_ARG macros

* clang-format...?

* clang-format for real

* Added documentation for CHECK_NULL_ARG_VOID and CHECK_NULL_ARG_RET

* Fixed typo

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

* Fixed macro safety by wrappinh with do-while

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

* Fixed format string cut risk in mgba_func_printf

* clang-format

* clang-format some more

* clang-format for real

* Fixed DEBUG -> INFO in comment

Co-authored-by: Rickey <ric@rf3.xyz>

* Moved NULL-check macros to util.h and renamed them

* Small additions - macro rename + clang-format

* Truncate the string instead of the function name

* Cleaned up code from previous commit

* clang-format

* Added mgba_logger_available check to mgba_func_printf

* Updated documentation for latest change

* Changed CHECK_NULL_ARG functions to generic RETURN_ON_ERROR_VAL functions.

* clang-format

* Changed back to specifically check NULL

* clang-format

* Changed "=" into "==" in the error message

* clang-format

* Fixed forgotten "=="

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Rickey <ric@rf3.xyz>
2026-06-28 06:54:47 +03: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
63b6584706 Feature/game over audio (#494)
Some checks failed
Build and Deploy Doxygen Docs / docs (push) Has been cancelled
* 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
MeirGavish
8a9750b0b3 Used proper text centering for price printing and consolidated functions for printing and erasing (#308) 2025-12-13 09:03:06 +02:00
MeirGavish
d96bc9b1c2 Renamed GBLA_UNUSED -> GBAL_UNUSED and updated RowOnKeyTransitFunc documentation (#292) 2025-12-10 17:17:28 -08:00
Rickey
35ecbf33ae Format and document utility files (#246)
Some checks failed
Deploy Nightly / Run Build ROM Workflow (push) Has been cancelled
Deploy Nightly / Deploy nightly (push) Has been cancelled
* 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
MeirGavish
43d837571e Truncate Scores (#269)
* 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>
2025-12-02 08:28:36 +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
Geralt
2fb41e533c Make Chips, Mult and Score unsigned and protect against overflow (#212)
---------

Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
2025-11-20 12:39:15 +02:00
Geralt
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
MeirGavish
fd8e52d48a Removed magic numbers for card score length and intmax buffer sizes 2025-08-08 01:59:21 +03:00
MeirGavish
0c834d17c2 Added dynamic palette loading for jokers and added new joker designs by @GreenNinja2525 2025-07-30 21:00:29 +03:00
theturtlemafia
ed1204db74 remove usage of extern for joker_registry. Add array size macro to util.h 2025-07-28 14:24:33 -04:00
MeirGavish
95565862b0 Extracted JokerObject and CardObject common functionalities to SpriteObject, removing duplicate code and dangerous casts. 2025-07-27 01:13:57 +03:00
cellos51
a56bba2c0e implemented shop screen after round end 2025-07-05 19:34:48 -04:00