mirror of
https://github.com/cellos51/balatro-gba.git
synced 2026-09-09 01:16:05 -05:00
* initial commit * wip * WIP * WIP * clang format * Choose Seed navigation mostly done * seed input navigation done * seed input done * cleanup and clang format * Implement base 10 to 36 conversions * Enable seeded runs * clang format * show default deck sprite, name and description * Rename Deck enum to DeckType * Implement arbitrary 9-patch expand system * Make 9-patch example smaller in the docs * Improve NinePatchRect docs * fix Deck back side sprite palette * clang format * Add last deck description * clang format * Fix 'Z' in seed input keyboard * Fix rebase issue * fix deck sprite not updating * Documents static funcs in run_setup.c * more documentation * clang format * Move Play button to the left in its row * Tests WIP * removing tests for random.h * use the new StateMachine struct * First wave of fixes * Fix the 9-patch again * Changed the base 36 logic so it's in big endian * properly set end of base 36 string to '\0' * typos * fix cursor position after rolling a seed + fix random seed generation * Make keyboard more intuitive to use * static const var * Address more comment from @ricfehr3 * clang format * clang format * clang format * clang format * clang format * clang format * clang format * fix deck palette * create the `DEF_SEED_KEYBOARD_BUTTON_OBJECT` macro * Replace `expand_3x3` by a call to `expand_9-patch` * clang format * clang format * clang format * fix rebase iussue in state_machine.h --------- Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
76 lines
1.7 KiB
C
76 lines
1.7 KiB
C
/**
|
|
* @file game_variables.h
|
|
*
|
|
* @brief Game global game variables struct definition
|
|
*/
|
|
#ifndef GAME_VARIABLES_H
|
|
#define GAME_VARIABLES_H
|
|
|
|
#include "blind.h"
|
|
#include "random.h"
|
|
|
|
#include <tonc.h>
|
|
|
|
#define GAME_SPEED_MIN 1
|
|
#define GAME_SPEED_MAX 4
|
|
|
|
// Volume is stored from 0 to 5 but is an increment of 20 so 0 to 100 will be displayed
|
|
#define VOLUME_OPTION_MIN 0
|
|
#define VOLUME_OPTION_MAX 5
|
|
#define VOLUME_OPTION_INCREMENT 20
|
|
|
|
#define DEFAULT_GAME_SPEED 1
|
|
#define DEFAULT_MUSIC_VOLUME VOLUME_OPTION_MAX
|
|
#define DEFAULT_SOUND_VOLUME VOLUME_OPTION_MAX
|
|
|
|
#define MAX_HANDS 4
|
|
#define MAX_DISCARDS 4
|
|
|
|
#define DEFAULT_HAND_SIZE 8
|
|
|
|
/**
|
|
* @brief A central location for all game variables.
|
|
*
|
|
* **NOTE**: This is currently WIP and will be populated with a refactor effort.
|
|
* NOT ALL VARIABLES ARE LOCATED HERE YET
|
|
*/
|
|
typedef struct
|
|
{
|
|
// Internal variables
|
|
|
|
s32 timer; // This might already exist in libtonc but idk so i'm just making my own
|
|
RngInfo rng_info;
|
|
|
|
// Variables visible by the player
|
|
|
|
s32 round;
|
|
s32 ante;
|
|
s32 money;
|
|
s32 hand_size;
|
|
s32 deck;
|
|
|
|
// Blind variables
|
|
|
|
enum BlindType current_blind;
|
|
enum BlindType next_boss_blind;
|
|
enum BlindState blinds_states[NUM_BLINDS_PER_ANTE];
|
|
|
|
s32 hands;
|
|
s32 discards;
|
|
u32 score;
|
|
|
|
Sprite* playing_blind_token;
|
|
Sprite* round_end_blind_token;
|
|
// Options variables
|
|
|
|
// BY DEFAULT IS SET TO 1, but if changed to 2 or more, should speed up all (or most) of the
|
|
// game aspects that should be sped up by speed, as in the original game.
|
|
u8 game_speed;
|
|
u8 music_volume;
|
|
u8 sound_volume;
|
|
} GameVariables;
|
|
|
|
extern GameVariables g_game_vars;
|
|
|
|
#endif // GAME_VARIABLES_H
|