GBAlatro
A Demake of Balatro for the GBA
Loading...
Searching...
No Matches
game_variables.h
Go to the documentation of this file.
1
6#ifndef GAME_VARIABLES_H
7#define GAME_VARIABLES_H
8
9#include "blind.h"
10#include "hand.h"
11#include "random.h"
12
13#include <tonc.h>
14
15#define GAME_SPEED_MIN 1
16#define GAME_SPEED_MAX 4
17
18// Volume is stored from 0 to 5 but is an increment of 20 so 0 to 100 will be displayed
19#define VOLUME_OPTION_MIN 0
20#define VOLUME_OPTION_MAX 5
21#define VOLUME_OPTION_INCREMENT 20
22
23#define DEFAULT_GAME_SPEED 1
24#define DEFAULT_MUSIC_VOLUME VOLUME_OPTION_MAX
25#define DEFAULT_SOUND_VOLUME VOLUME_OPTION_MAX
26
27#define MAX_HANDS 4
28#define MAX_DISCARDS 4
29
30#define DEFAULT_HAND_SIZE 8
31
38typedef struct
39{
40 // Internal variables
41
42 s32 timer; // This might already exist in libtonc but idk so i'm just making my own
43 RngInfo rng_info;
44
45 // Variables visible by the player
46
47 s32 round;
48 s32 ante;
49 s32 money;
50 s32 hand_size;
51 s32 deck;
52
53 u32 best_hand_score;
54 u32 nb_played_hands[HAND_TYPE_MAX];
55
56 // Blind variables
57
58 enum BlindType current_blind;
59 enum BlindType next_boss_blind;
60 enum BlindState blinds_states[NUM_BLINDS_PER_ANTE];
61
62 s32 hands;
63 s32 discards;
64 u32 score;
65 u32 chips;
66 u32 mult;
67
68 Sprite* playing_blind_token;
69 Sprite* round_end_blind_token;
70 // Options variables
71
72 // BY DEFAULT IS SET TO 1, but if changed to 2 or more, should speed up all (or most) of the
73 // game aspects that should be sped up by speed, as in the original game.
74 u8 game_speed;
75 u8 music_volume;
76 u8 sound_volume;
78
79extern GameVariables g_game_vars;
80
81#endif // GAME_VARIABLES_H
Data structures and functions relative to the behaviour and graphics of Blinds.
BlindType
All Blind types in the game are listed here.
Definition blind.h:69
BlindState
All the possible states an Ante's Blinds can be in when viewed in the "Blind Select" screen.
Definition blind.h:121
Functions relative to manipulating and analyzing the contents of the Hand, a.k.a. the Cards we hold a...
Common functions to handle RNG manipulation. Using this interface has three goals:
A central location for all game variables.
Information to track and restore RNG state.
Definition random.h:41
Sprite struct for GBA hardware specifics.
Definition sprite.h:29