Refactoring structs Part 1
This commit is contained in:
84
include/dawn/poker/poker.h
Normal file
84
include/dawn/poker/poker.h
Normal file
@ -0,0 +1,84 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "player.h"
|
||||
#include "card.h"
|
||||
|
||||
#include "../display/tileset.h"
|
||||
#include "../display/primitive.h"
|
||||
#include "../display/texture.h"
|
||||
#include "../display/shader.h"
|
||||
#include "../display/camera.h"
|
||||
#include "../display/spritebatch.h"
|
||||
|
||||
/** Rounds that the game can be in */
|
||||
#define POKER_ROUND_DEAL 0x00
|
||||
#define POKER_ROUND_BLINDS 0x01
|
||||
#define POKER_ROUND_BET0 0x02
|
||||
#define POKER_ROUND_FLOP 0X03
|
||||
#define POKER_ROUND_BET1 0x04
|
||||
#define POKER_ROUND_TURN 0x05
|
||||
#define POKER_ROUND_BET2 0x06
|
||||
#define POKER_ROUND_RIVER 0x07
|
||||
#define POKER_ROUND_BET3 0x08
|
||||
#define POKER_ROUND_WINNER 0x09
|
||||
|
||||
/** How many cards the dealer can hold in their hand */
|
||||
#define POKER_DEALER_HAND 5
|
||||
|
||||
typedef struct {
|
||||
/** Current Card Deck */
|
||||
card_t deck[CARD_DECK_SIZE];
|
||||
uint8_t deckSize;
|
||||
|
||||
/** Dealer Money */
|
||||
uint32_t blindSmall;
|
||||
uint32_t blindBig;
|
||||
|
||||
/** Dealer Hand */
|
||||
card_t cards[POKER_DEALER_HAND];
|
||||
uint8_t cardsFacing;
|
||||
|
||||
/** Player States */
|
||||
pokerplayer_t players[POKER_PLAYER_COUNT];
|
||||
|
||||
/** Game State */
|
||||
uint8_t round;
|
||||
uint8_t roundPlayer;
|
||||
uint8_t roundDealer;
|
||||
uint32_t pot;
|
||||
uint32_t roundBet;
|
||||
|
||||
/** Rendering Assets */
|
||||
texture_t *kagamiTexture;
|
||||
tileset_t *kagamiTileset;
|
||||
primitive_t *kagamiQuad;
|
||||
|
||||
primitive_t *chipPrimitive;
|
||||
texture_t *chipTexture;
|
||||
primitive_t *tablePrimitive;
|
||||
texture_t *tableTexture;
|
||||
|
||||
texture_t *cardTexture;
|
||||
tileset_t *cardTileset;
|
||||
primitive_t *cardPrimitive;
|
||||
|
||||
texture_t *fontTexture;
|
||||
tileset_t *fontTileset;
|
||||
spritebatch_t *fontBatch;
|
||||
|
||||
shader_t *shaderWorld;
|
||||
framebuffer_t *frameLeft;
|
||||
framebuffer_t *frameRight;
|
||||
primitive_t *quadLeft;
|
||||
primitive_t *quadRight;
|
||||
camera_t cameraMain;
|
||||
camera_t cameraLeft;
|
||||
camera_t cameraRight;
|
||||
} poker_t;
|
Reference in New Issue
Block a user