Trying to put it all together.

This commit is contained in:
2021-08-24 08:54:27 -07:00
parent d9f11c764e
commit c198cd9908
18 changed files with 201 additions and 32 deletions

View File

@ -39,8 +39,9 @@
#include "game/dawn/dawngame.h"
#include "game/poker/pokergame.h"
#include "game/poker/pokerdiscussion.h"
#include "game/poker/pokergame.h"
#include "game/poker/pokergameaction.h"
#include "game/poker/pokergameassets.h"
#include "game/poker/pokerworld.h"
#include "game/poker/pokerui.h"

View File

@ -9,10 +9,11 @@
#include "../../libs.h"
#include "pokergame.h"
/** Maximum number of messages that the discussion buffer can hold */
#define POKER_DISCUSSION_MESSAGE_COUNT_MAX 32
/** Why the discussion is happening */
#define POKER_DISCUSSION_REASON_TEST 0x00
#define POKER_DISCUSSION_REASON_MATCH_START 0x01
#define POKER_DISCUSSION_REASON_ROUND_START 0x02
#define POKER_DISCUSSION_REASON_BLINDS_TAKEN 0x03
@ -26,5 +27,7 @@ typedef struct {
typedef struct {
char *messages[POKER_DISCUSSION_MESSAGE_COUNT_MAX];
uint8_t players[POKER_DISCUSSION_MESSAGE_COUNT_MAX];
uint8_t emotions[POKER_DISCUSSION_MESSAGE_COUNT_MAX];
uint8_t count;
} pokerdiscussion_t;

View File

@ -10,10 +10,25 @@
#include "pokergameassets.h"
#include "pokerworld.h"
#include "pokerui.h"
#include "pokergameaction.h"
#include "../../poker/poker.h"
#include "../../poker/player.h"
#include "../../vn/vnconversation.h"
#include "../../vn/vnscene.h"
#define POKER_GAME_SEAT_COUNT 8
#define POKER_GAME_SEAT_FOR_PLAYER(p) (p < POKER_PLAYER_HUMAN_INDEX ? \
p + 1 : POKER_GAME_SEAT_COUNT - (p - POKER_PLAYER_HUMAN_INDEX) \
)
#define POKER_GAME_SEAT_DEALER 0x00
#define POKER_GAME_PENNY_BASE_WIDTH 1000
#define POKER_GAME_PENNY_BASE_HEIGHT 1920
#define POKER_GAME_PENNY_FACE_X 367
#define POKER_GAME_PENNY_FACE_Y 256
#define POKER_GAME_PENNY_FACE_WIDTH 280
#define POKER_GAME_PENNY_FACE_HEIGHT 280
typedef struct {
/** Poker Game State */
poker_t poker;

View File

@ -0,0 +1,15 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../../libs.h"
typedef struct {
pokergame_t *game;
uint8_t player;
} pokergameactionlook_t;

View File

@ -9,6 +9,17 @@
#include "../../libs.h"
#include "../../display/primitive.h"
#define POKER_WORLD_SEAT_DISTANCE -1
#define POKER_WORLD_SEAT_ROTATION(n) ((8 - n) * 0.785398)
#define POKER_WORLD_SEAT_POSITION_X(n) ( \
POKER_WORLD_SEAT_DISTANCE * (float)sin(POKER_WORLD_SEAT_ROTATION(n)) \
)
#define POKER_WORLD_SEAT_POSITION_Y -0.2f
#define POKER_WORLD_SEAT_POSITION_Z(n) ( \
POKER_WORLD_SEAT_DISTANCE * (float)cos(POKER_WORLD_SEAT_ROTATION(n)) \
)
typedef struct {
primitive_t skywall;
} pokerworld_t;

View File

@ -22,6 +22,9 @@ typedef struct {
/** Character this conversation piece belongs to */
vncharacter_t *character;
/** Character's emotion */
uint8_t emotion;
} vnconversationitemdata_t;
/** Representation of a conversation, laid out similarly to a timeline. */

View File

@ -15,6 +15,13 @@
#define VN_SCENE_CHARACTERS_MAX 6
typedef struct {
float cameraX;
float cameraY;
float cameraZ;
float cameraLookX;
float cameraLookY;
float cameraLookZ;
/** Camera used for rendering, updated frequently */
camera_t camera;