Files
balatro-gba/source/splash_screen.c
MeirGavish 7a5a4a1276
Some checks failed
Build and Deploy Doxygen Docs / docs (push) Has been cancelled
Updated all static variables to have the s_ prefix and constants to upper case (#591)
* Updated all static variables to have the s_ prefix and constants to upper case

* Renamed missed sneaky functions in round.c (+ clang-format...)

* Renamed a few more missed constants

* Updated rng_update() documentation

* Apply suggestions from Copilot's code review

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

* Added missed suggestion

* Updated rng_update() comment

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-16 20:21:18 +03:00

59 lines
1.4 KiB
C

#include "splash_screen.h"
#include "font.h"
#include "game.h"
#include "graphic_utils.h"
#include "maxmod.h"
#include "soundbank.h"
#include <tonc.h>
static const Rect COUNTDOWN_TIMER_RECT = {208, 144, 240, 152};
static uint s_timer = 0;
void splash_screen_on_init(void)
{
s_timer = 0;
tte_printf("#{P:72,8; cx:0x%X000}DISCLAIMER", TTE_WHITE_PB);
tte_printf(
"#{P:8,24; cx:0x%X000}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 GBALATRO/balatro-gba'",
TTE_WHITE_PB
);
tte_printf("#{P:8,144; cx:0x%X000}(Press any key to skip)", TTE_WHITE_PB);
}
void splash_screen_on_update(void)
{
s_timer++;
if (s_timer < SPLASH_DURATION_FRAMES)
{
tte_erase_rect_wrapper(COUNTDOWN_TIMER_RECT);
tte_printf(
"#{P:%d,%d; cx:0x%X000}%d",
COUNTDOWN_TIMER_RECT.left,
COUNTDOWN_TIMER_RECT.top,
TTE_WHITE_PB,
1 + (SPLASH_DURATION_FRAMES - s_timer) / SPLASH_FPS
);
if (!key_hit(KEY_ANY))
{
return;
}
}
game_change_state(GAME_STATE_MAIN_MENU);
tte_erase_screen();
}
void splash_screen_on_exit(void)
{
mmStart(MOD_MAIN_THEME, MM_PLAY_LOOP);
}