Add basic common_ui background gfx functions (#415)
* Add basic common_ui background gfx functions * clang format * document common_ui.h * Remove unused tonc header * Fix header guard name convention * more header cleanup * claaaaanggggg format
This commit is contained in:
+6
-11
@@ -1,6 +1,7 @@
|
||||
#ifndef GAME_H
|
||||
#define GAME_H
|
||||
|
||||
#include "game/common_ui.h"
|
||||
#include "game_variables.h"
|
||||
|
||||
#include <tonc.h>
|
||||
@@ -38,17 +39,6 @@ typedef struct CardObject CardObject;
|
||||
typedef struct Card Card;
|
||||
typedef struct JokerObject JokerObject;
|
||||
|
||||
enum BackgroundId
|
||||
{
|
||||
BG_NONE,
|
||||
BG_CARD_SELECTING,
|
||||
BG_CARD_PLAYING,
|
||||
BG_ROUND_END,
|
||||
BG_SHOP,
|
||||
BG_BLIND_SELECT,
|
||||
BG_MAIN_MENU
|
||||
};
|
||||
|
||||
// Enum value names in ../include/def_state_info_table.h
|
||||
enum GameState
|
||||
{
|
||||
@@ -182,4 +172,9 @@ void set_game_speed(int new_game_speed);
|
||||
bool is_shortcut_joker_active(void);
|
||||
int get_straight_and_flush_size(void);
|
||||
|
||||
// Temporary change for Refactor. Currently this compatibility binder is to allow
|
||||
// simultaneous integration of the new system in `common_ui` with the the existing
|
||||
// old system incrementally and without losing functionality.
|
||||
void change_background_legacy(enum BackgroundId id);
|
||||
|
||||
#endif // GAME_H
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @file common_ui.h
|
||||
*
|
||||
* @brief Common functions to render UI elements.
|
||||
*/
|
||||
#ifndef COMMON_UI_H
|
||||
#define COMMON_UI_H
|
||||
|
||||
/**
|
||||
* @brief Enum of possible backgrounds to render with @ref change_background
|
||||
*/
|
||||
enum BackgroundId
|
||||
{
|
||||
BG_NONE,
|
||||
BG_CARD_SELECTING,
|
||||
BG_CARD_PLAYING,
|
||||
BG_ROUND_END,
|
||||
BG_SHOP,
|
||||
BG_BLIND_SELECT,
|
||||
BG_MAIN_MENU
|
||||
};
|
||||
|
||||
/**
|
||||
* Change the background
|
||||
*
|
||||
* @param id @ref BackgroundId to render to screen
|
||||
*/
|
||||
void change_background(enum BackgroundId id);
|
||||
|
||||
#endif // COMMON_UI_H
|
||||
Reference in New Issue
Block a user