Merge branch 'main' of https://github.com/cellos51/balatro-gba into hblank_affine_background_effects and changed parameters on affine source to be updated from experimental branch

This commit is contained in:
cellos51
2025-08-28 22:39:48 -04:00
17 changed files with 273 additions and 57 deletions
+9 -2
View File
@@ -5,9 +5,15 @@
#include "graphic_utils.h"
#define AFFINE_BG_PAL_LEN 5
#define AFFINE_BG_PB (PAL_ROW_LEN * 15) // This isn't really a palette bank, just the starting index of the palette
#define AFFINE_BG_IDX 2 // The index of the affine background BGCNT register etc.
#define AFFINE_BG_PAL_LEN 16
#define AFFINE_BG_PB (PAL_ROW_LEN * 10) // This isn't really a palette bank, just the starting index of the palette
enum AffineBackgroundID
{
AFFINE_BG_MAIN_MENU,
AFFINE_BG_GAME,
};
void affine_background_init();
IWRAM_CODE void affine_background_hblank();
@@ -15,5 +21,6 @@ IWRAM_CODE void affine_background_update();
void affine_background_set_color(COLOR color);
// Must be called with an array of size at least AFFINE_BG_PAL_LEN
void affine_background_load_palette(const u16 *src);
void affine_background_change_background(enum AffineBackgroundID new_bg);
#endif // AFFINE_BACKGROUND_H
+4
View File
@@ -16,6 +16,7 @@
#define BG_ID_ROUND_END 3
#define BG_ID_SHOP 4
#define BG_ID_BLIND_SELECT 5
#define BG_ID_MAIN_MENU 6
// Input bindings
#define SELECT_CARD KEY_A
@@ -27,6 +28,8 @@
enum GameState
{
GAME_SPLASH_SCREEN,
GAME_MAIN_MENU,
GAME_PLAYING,
GAME_ROUND_END,
GAME_SHOP,
@@ -75,6 +78,7 @@ enum HandType
// Game functions
void game_init();
void game_update();
void game_set_state(enum GameState new_game_state);
// Forward declaration
struct List;
+6
View File
@@ -173,4 +173,10 @@ void memcpy16_tile8_with_palette_offset(u16* dst, const u16* src, uint hwcount,
*/
void memcpy32_tile8_with_palette_offset(u32* dst, const u32* src, uint wcount, u8 palette_offset);
/* Toggles the visibility of the window layers.
* win0 and win1 are the visibility states for the two windows.
* These windows are primarily used for the shadows on held jokers, consumables and cards.
*/
void toggle_windows(bool win0, bool win1);
#endif //GRAPHIC_UTILS_H
+13
View File
@@ -0,0 +1,13 @@
#ifndef SPLASH_SCREEN_H
#define SPLASH_SCREEN_H
#include <tonc.h>
#define SPLASH_FPS 60
#define SPLASH_DURATION_SECONDS 10
#define SPLASH_DURATION_FRAMES (SPLASH_FPS * SPLASH_DURATION_SECONDS)
void splash_screen_init();
void splash_screen_update(uint timer);
#endif // SPLASH_SCREEN_H