Restored some of the rendering

This commit is contained in:
2021-05-22 14:18:23 -07:00
parent 58e86d160e
commit d84e760c34
36 changed files with 813 additions and 331 deletions

View File

@ -9,13 +9,12 @@
#include "../libs.h"
#include "player.h"
#include "card.h"
#include "render.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"
#include "../display/shader.h"
#include "../display/texture.h"
#include "../display/tileset.h"
/** Rounds that the game can be in */
#define POKER_ROUND_DEAL 0x00
@ -32,14 +31,30 @@
/** How many cards the dealer can hold in their hand */
#define POKER_DEALER_HAND 5
/** How many cards the grave can hold */
#define POKER_GRAVE_SIZE CARD_DECK_SIZE
/** How many players in a poker game (excludes dealer) */
#define POKER_PLAYER_COUNT 5
/** How many chips each player has by defautl */
#define POKER_PLAYER_CHIPS_DEFAULT 10000
/** The default blind cost for the big blind. Small Blind is half this */
#define POKER_BLIND_BIG_DEFAULT 600
#define POKER_BLIND_SMALL_DEFAULT (POKER_BLIND_BIG_DEFAULT/2)
typedef struct {
/** Current Card Deck */
card_t deck[CARD_DECK_SIZE];
uint8_t deckSize;
/** Dealer Money */
uint32_t blindSmall;
uint32_t blindBig;
/** Card grave (where spent cards go when burned */
card_t grave[POKER_GRAVE_SIZE];
uint8_t graveSize;
/** Blinds */
uint32_t blindSmall, blindBig;
/** Dealer Hand */
card_t cards[POKER_DEALER_HAND];
@ -48,37 +63,33 @@ typedef struct {
/** Player States */
pokerplayer_t players[POKER_PLAYER_COUNT];
/** Game State */
/** The current round the game is on */
uint8_t round;
uint8_t roundPlayer;
/** The current player that is the dealer */
uint8_t roundDealer;
/** Current pot of chips */
uint32_t pot;
/** The current buy-in bet size. */
uint32_t roundBet;
/** Rendering Assets */
texture_t *kagamiTexture;
tileset_t *kagamiTileset;
primitive_t *kagamiQuad;
texture_t dealerTexture;
tileset_t dealerTileset;
primitive_t dealerPrimitive;
primitive_t *chipPrimitive;
texture_t *chipTexture;
primitive_t *tablePrimitive;
texture_t *tableTexture;
texture_t chipTexture;
primitive_t chipPrimitive;
texture_t tableTexture;
primitive_t tablePrimitive;
texture_t *cardTexture;
tileset_t *cardTileset;
primitive_t *cardPrimitive;
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;
shader_t shader;
camera_t camera;
} poker_t;