Files
balatro-gba-chinese-jocker-…/source/splash_screen.c
T
cellos51 4f1f7cb347 Add splash screen functionality and update game state management
- Introduced GAME_SPLASH_SCREEN state in game.h
- Implemented splash_screen_init and splash_screen_update functions in splash_screen.c
- Updated game.c to initialize with GAME_SPLASH_SCREEN and handle splash screen updates
- Removed old splash screen code from main.c
2025-08-24 15:44:45 -04:00

30 lines
947 B
C

#include "splash_screen.h"
#include <tonc.h>
#include "graphic_utils.h"
#include "game.h"
void splash_screen_init()
{
tte_printf("#{P:72,8; cx:0xF000}DISCLAIMER");
tte_printf("#{P:8,24; cx:0xF000}This project is NOT endorsed \n by or affiliated with \n Playstack or LocalThunk.\n\n If you have paid for this, \n you have been scammed \n and should request a refund \n IMMEDIATELY. \n\n The only official place \n to obtain this is from: \n\n 'github.com/\n cellos51/balatro-gba'");
tte_printf("#{P:8,144; cx:0xF000}(Press any key to skip)");
}
void splash_screen_update(uint timer)
{
if (timer < SPLASH_DURATION_FRAMES)
{
tte_erase_rect_wrapper((Rect){208, 144, 240, 152});
tte_printf("#{P:208,144; cx:0xF000}%d", 1 + (SPLASH_DURATION_FRAMES - timer) / SPLASH_FPS);
if (!key_hit(KEY_ANY))
{
return;
}
}
game_set_state(GAME_MAIN_MENU);
tte_erase_screen();
}