[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>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "game/main_menu.h"
|
||||
#include "game/options_menu.h"
|
||||
#include "game/round_end.h"
|
||||
#include "game/run_setup.h"
|
||||
#include "game/shop.h"
|
||||
|
||||
typedef void (*BackgroundRenderCallback)(void);
|
||||
@@ -19,6 +20,7 @@ static const BackgroundRenderCallback bgCallbacks[] = {
|
||||
[BG_ROUND_END] = game_round_end_change_background,
|
||||
[BG_SHOP] = game_shop_change_background,
|
||||
[BG_BLIND_SELECT] = game_blind_select_change_background,
|
||||
[BG_RUN_SETUP] = game_run_setup_change_background,
|
||||
[BG_OPTIONS_MENU] = game_options_menu_change_background,
|
||||
[BG_MAIN_MENU] = game_main_menu_change_background,
|
||||
};
|
||||
|
||||
@@ -102,7 +102,7 @@ void game_main_menu_change_background(void)
|
||||
void game_main_menu_on_init(void)
|
||||
{
|
||||
affine_background_change_background(AFFINE_BG_MAIN_MENU);
|
||||
change_background(BG_MAIN_MENU, false);
|
||||
change_background(BG_MAIN_MENU, true);
|
||||
main_menu_ace = card_object_new(card_new(SPADES, ACE));
|
||||
card_object_set_sprite(main_menu_ace, 0);
|
||||
main_menu_ace->sprite_object->sprite->obj->attr0 |= ATTR0_AFF_DBL;
|
||||
@@ -208,7 +208,7 @@ static void main_menu_on_key_transit(SelectionGrid* selection_grid, Selection* s
|
||||
|
||||
static void play_on_pressed(void)
|
||||
{
|
||||
game_change_state(GAME_STATE_GAME_START);
|
||||
game_change_state(GAME_STATE_RUN_SETUP);
|
||||
}
|
||||
|
||||
static void options_on_pressed(void)
|
||||
|
||||
@@ -359,7 +359,6 @@ static void update_volume_slider_graphics(enum OptionButtonRows sel_row)
|
||||
void game_options_menu_change_background(void)
|
||||
{
|
||||
tte_erase_screen();
|
||||
CBB_CLEAR(MAIN_BG_CBB);
|
||||
|
||||
GRIT_CPY(pal_bg_mem, background_options_menu_gfxPal);
|
||||
GRIT_CPY(&tile_mem[MAIN_BG_CBB], background_options_menu_gfxTiles);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user