/**
 * Copyright (c) 2021 Dominic Masters
 * 
 * This software is released under the MIT License.
 * https://opensource.org/licenses/MIT
 */

#pragma once
#include "../libs.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"

/** Size of the Render frames */
#define POKER_FRAME_HEIGHT RENDER_STATE.height
#define POKER_FRAME_LEFT_WIDTH RENDER_STATE.width*0.65
#define POKER_FRAME_RIGHT_WIDTH (\
  RENDER_STATE.width - POKER_FRAME_LEFT_WIDTH - 1\
)

/** Size of the rendered card */
#define POKER_CARD_WIDTH 0.04
#define POKER_CARD_HEIGHT POKER_CARD_WIDTH/2.5*3.5
#define POKER_CARD_DEPTH 0.0005
#define POKER_CARD_PADDING 0.0125

/** Macro for the angle (Yaw) that the seat has */
#define POKER_SEAT_ANGLE(seat) mathDeg2Rad(-45 * seat)

/** Slots where cards can render */
#define POKER_CARD_SLOT_HAND0 0x00
#define POKER_CARD_SLOT_HAND1 0x01
#define POKER_CARD_SLOT_FLOP0 0x02
#define POKER_CARD_SLOT_FLOP1 0x03
#define POKER_CARD_SLOT_FLOP2 0x04
#define POKER_CARD_SLOT_FLOP3 0x05
#define POKER_CARD_SLOT_FLOP4 0x06

/** Various seats at the table that people can sit */
#define POKER_SEAT_DEALER 0x00  
#define POKER_SEAT_PLAYER0 0x04
#define POKER_SEAT_PLAYER1 0x06
#define POKER_SEAT_PLAYER2 0x05
#define POKER_SEAT_PLAYER3 0x03
#define POKER_SEAT_PLAYER4 0x02

typedef struct {
  float x, z;
  float yaw;
} pokerposition_t;