Skip to content

Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.

930 B
Raw Blame
#ifndef UI_H
#define UI_H
#include <stdint.h>
#include <stdbool.h>

enum { CARD_PAUSE, CARD_WIN, CARD_LOSE };

/* in-game overlay */
void hud_reset(void);
extern float hud_score, hud_coins; /* Set Score values, hidden when negative */
void hud_tick(uint8_t buttons);
void hud_draw(uint16_t *px, int y, int n);
void viewfinder_draw(uint16_t *px, int y, int n, int t);

/* menus: capture the blurred background from the current view */
void ui_capture_background(void);
/* card screen; anim counts frames since the card appeared; sel is the focused button */
void card_setup(int kind, int level);
void card_draw(int anim, int sel, bool full);
#define CARD_SEL_QUIT 9 /* sel: the Quit game button under the others */
int card_buttons(void); /* number of buttons (1 to 3) */
/* level select */
void levels_draw(int sel, int scroll);
/* "Quit game?" over the blurred background, Yes focused or not */
void quit_draw(bool yes);

#endif