Nuked Poker State

This commit is contained in:
2021-05-17 06:43:48 -07:00
parent c854ebbb5d
commit a97933d366
17 changed files with 185 additions and 174 deletions

View File

@ -7,18 +7,84 @@
#include "../libs.h"
#include "../display/shader.h"
#include "../display/camera.h"
#include "../poker/poker.h"
#include "../poker/card.h"
#include "../poker/player.h"
#include "../poker/render.h"
#include "../poker/action.h"
#include "../display/render.h"
#include "../display/spritebatch.h"
#include "../display/texture.h"
#include "../display/tileset.h"
#include "../display/framebuffer.h"
/** Name of the current game */
#define GAME_NAME "Dawn"
/** Describes the current game */
typedef struct {
/** Describes the name of a specific game. */
/** Describes the name of the specific game. */
char *name;
/** World Rendering stuff. */
shader_t *shaderWorld;
camera_t cameraWorld;
camera_t cameraMain;
/** Current Card Deck */
card_t deck[CARD_DECK_SIZE];
/** Count of cards in the deck */
uint8_t deckSize;
/** How big is the current small blind */
uint32_t blindSmall;
/** How big is the current big blind */
uint32_t blindBig;
/** Current round pot */
uint32_t pot;
/** Cards that have been dealt */
card_t cards[HOLDEM_DEALER_HAND];
/** How many dealt cards are face up */
uint8_t cardsFacing;
/** Player States */
pokerplayer_t players[POKER_PLAYER_COUNT];
texture_t *kagamiTexture;
tileset_t *kagamiTileset;
primitive_t *kagamiQuad;
/** Action and Allocated Data Space */
pokeraction_t actionQueue[POKER_ACTION_QUEUE_SIZE];
void *actionData[POKER_ACTION_DATA_SIZE*POKER_ACTION_QUEUE_SIZE];
bool actionInitState[POKER_ACTION_DATA_SIZE];
/** Poker Table */
primitive_t *tablePrimitive;
texture_t *tableTexture;
texture_t *cardTexture;
tileset_t *cardTileset;
primitive_t *cardPrimitive;
texture_t *fontTexture;
tileset_t *fontTileset;
spritebatch_t *fontBatch;
/** Game Render Frames */
framebuffer_t *frameLeft;
framebuffer_t *frameRight;
primitive_t *quadLeft;
primitive_t *quadRight;
camera_t cameraLeft;
camera_t cameraRight;
} game_t;
/** The current running game state. */

View File

@ -15,10 +15,10 @@
#define POKER_PLAYER_COUNT 5
/** State for whether or not a player has folded */
#define POKER_STATE_FOLDED 0x01
#define GAME_STATE_FOLDED 0x01
/** State for whether or not a player is showing their hand */
#define POKER_STATE_SHOWING 0x02
#define GAME_STATE_SHOWING 0x02
/** Poker Player State */
typedef struct {

View File

@ -36,58 +36,4 @@
#define HOLDEM_GAME_CARD_SLOT_FLOP1 0x03
#define HOLDEM_GAME_CARD_SLOT_FLOP2 0x04
#define HOLDEM_GAME_CARD_SLOT_FLOP3 0x05
#define HOLDEM_GAME_CARD_SLOT_FLOP4 0x06
typedef struct {
/** Current Card Deck */
card_t deck[CARD_DECK_SIZE];
/** Count of cards in the deck */
uint8_t deckSize;
/** How big is the current small blind */
uint32_t blindSmall;
/** How big is the current big blind */
uint32_t blindBig;
/** Current round pot */
uint32_t pot;
/** Cards that have been dealt */
card_t cards[HOLDEM_DEALER_HAND];
/** How many dealt cards are face up */
uint8_t cardsFacing;
/** Player States */
pokerplayer_t players[POKER_PLAYER_COUNT];
texture_t *kagamiTexture;
tileset_t *kagamiTileset;
primitive_t *kagamiQuad;
/** Action and Allocated Data Space */
pokeraction_t actionQueue[POKER_ACTION_QUEUE_SIZE];
void *actionData[POKER_ACTION_DATA_SIZE*POKER_ACTION_QUEUE_SIZE];
bool actionInitState[POKER_ACTION_DATA_SIZE];
/** Poker Table */
primitive_t *tablePrimitive;
texture_t *tableTexture;
texture_t *cardTexture;
tileset_t *cardTileset;
primitive_t *cardPrimitive;
texture_t *fontTexture;
tileset_t *fontTileset;
spritebatch_t *fontBatch;
/** Game Render Frames */
framebuffer_t *frameLeft;
framebuffer_t *frameRight;
primitive_t *quadLeft;
primitive_t *quadRight;
camera_t cameraLeft;
camera_t cameraRight;
} pokergame_t;
extern pokergame_t POKER_STATE;
#define HOLDEM_GAME_CARD_SLOT_FLOP4 0x06