Refactor/shop (#475)

* initial commit, DOES NOT COMPILE

* Rename joker interactions file to `joker_row`

* IT'S WORKIIING (now to make it pretty lol)

* fixed rebase issues

* fix rebase + undo state machine changes

* Document shop state functions

* clang format

* fix reroll cost not appearing on shop init

* Move generic SpriteObject text/price printing functions to sprite.c + some minor fixes

* Resolve weird defines/include order issue

* clang format

* Implement suggestions from @ricfehr3

* clang format

* clang format

* fix rebase

* Implement sugegstions from @ricfehr3

* Refactored shop to use the Button struct

* missed some memsets

---------

Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
This commit is contained in:
Geralt
2026-05-15 18:36:19 -07:00
committed by GitHub
co-authored by MathisMartin31
parent b1c2b7f35e
commit d5d5a6fd6b
15 changed files with 1090 additions and 847 deletions
+2 -1
View File
@@ -5,6 +5,7 @@
#include "game/main_menu.h"
#include "game/options_menu.h"
#include "game/round_end.h"
#include "game/shop.h"
typedef void (*BackgroundRenderCallback)(void);
@@ -16,7 +17,7 @@ static const BackgroundRenderCallback bgCallbacks[] = {
[BG_CARD_SELECTING] = NULL,
[BG_CARD_PLAYING] = NULL,
[BG_ROUND_END] = game_round_end_change_background,
[BG_SHOP] = NULL,
[BG_SHOP] = game_shop_change_background,
[BG_BLIND_SELECT] = game_blind_select_change_background,
[BG_OPTIONS_MENU] = game_options_menu_change_background,
[BG_MAIN_MENU] = game_main_menu_change_background,