Putting it all together and testing it.
This commit is contained in:
@ -7,9 +7,11 @@
|
||||
|
||||
#pragma once
|
||||
#include "../card.h"
|
||||
#include "../../display/render.h"
|
||||
#include "../../display/spritebatch.h"
|
||||
#include "../../display/texture.h"
|
||||
#include "../../display/tileset.h"
|
||||
#include "../../display/framebuffer.h"
|
||||
|
||||
/** How many cards a player can hold in their hand */
|
||||
#define HOLDEM_PLAYER_HAND 2
|
||||
@ -23,6 +25,13 @@
|
||||
/** State for whether or not a player is showing their hand */
|
||||
#define HOLDEM_STATE_SHOWING 0x02
|
||||
|
||||
#define HOLDEM_GAME_FRAME_HEIGHT RENDER_STATE.height
|
||||
#define HOLDEM_GAME_FRAME_LEFT_WIDTH RENDER_STATE.width*0.75
|
||||
#define HOLDEM_GAME_FRAME_RIGHT_WIDTH (\
|
||||
RENDER_STATE.width - HOLDEM_GAME_FRAME_LEFT_WIDTH\
|
||||
)
|
||||
|
||||
|
||||
/** Texas Hold'em Player State */
|
||||
typedef struct {
|
||||
/** Cards in the players' hand */
|
||||
@ -39,7 +48,7 @@ typedef struct {
|
||||
uint32_t currentBet;
|
||||
} holdemplayer_t;
|
||||
|
||||
/** Representation of a Texas Hold'em Game State */
|
||||
/** Representation of a Texas Hold'em Match State */
|
||||
typedef struct {
|
||||
/** Current Card Deck */
|
||||
card_t deck[CARD_DECK_SIZE];
|
||||
@ -60,10 +69,23 @@ typedef struct {
|
||||
|
||||
/** Player States */
|
||||
holdemplayer_t players[HOLDEM_PLAYER_COUNT];
|
||||
} holdemgame_t;
|
||||
} holdemmatch_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
spritebatch_t *batch;
|
||||
holdemmatch_t match;
|
||||
|
||||
|
||||
primitive_t *cube;
|
||||
texture_t *texture;
|
||||
tileset_t *tileset;
|
||||
} holdemrender_t;
|
||||
|
||||
/** Game Render Frames */
|
||||
framebuffer_t *frameLeft;
|
||||
framebuffer_t *frameRight;
|
||||
primitive_t *quadLeft;
|
||||
primitive_t *quadRight;
|
||||
camera_t cameraLeft;
|
||||
camera_t cameraRight;
|
||||
} holdemgame_t;
|
||||
|
||||
extern holdemgame_t HOLDEM_GAME_STATE;
|
Reference in New Issue
Block a user