Added some transitions.
This commit is contained in:
@ -59,7 +59,7 @@ void _pokerGameActionBetOnUpdate(
|
||||
break;
|
||||
|
||||
case POKER_TURN_TYPE_ALL_IN:
|
||||
discussion.reason = POKER_DISCUSSION_REASON_PLAYER_CALLING;
|
||||
discussion.reason = POKER_DISCUSSION_REASON_PLAYER_ALL_IN;
|
||||
break;
|
||||
|
||||
case POKER_TURN_TYPE_FOLD:
|
||||
|
@ -77,6 +77,13 @@ void pokerDiscussionGet(
|
||||
discussion->emotions[0] = VN_CHARACTER_EMOTION_BOASTFUL;
|
||||
break;
|
||||
|
||||
case POKER_DISCUSSION_REASON_PLAYER_ALL_IN:
|
||||
discussion->count++;
|
||||
discussion->messages[0] = "All in.";
|
||||
discussion->players[0] = data->playerCause;
|
||||
discussion->emotions[0] = VN_CHARACTER_EMOTION_ANGRY_PROUD;
|
||||
break;
|
||||
|
||||
// Flops
|
||||
case POKER_DISCUSSION_REASON_FLOP:
|
||||
discussion->count++;
|
||||
|
@ -23,9 +23,10 @@
|
||||
#define POKER_DISCUSSION_REASON_PLAYER_CHECKING 0x05
|
||||
#define POKER_DISCUSSION_REASON_PLAYER_CALLING 0x06
|
||||
#define POKER_DISCUSSION_REASON_PLAYER_RAISING 0x07
|
||||
#define POKER_DISCUSSION_REASON_FLOP 0x08
|
||||
#define POKER_DISCUSSION_REASON_DEAL 0x09
|
||||
#define POKER_DISCUSSION_REASON_BETTING_DONE 0x0A
|
||||
#define POKER_DISCUSSION_REASON_PLAYER_ALL_IN 0x08
|
||||
#define POKER_DISCUSSION_REASON_FLOP 0x09
|
||||
#define POKER_DISCUSSION_REASON_DEAL 0x0A
|
||||
#define POKER_DISCUSSION_REASON_BETTING_DONE 0x0B
|
||||
|
||||
typedef struct {
|
||||
pokergame_t *poker;
|
||||
|
@ -14,6 +14,9 @@ void pokerWorldInit(
|
||||
) {
|
||||
vncharacter_t *character;
|
||||
uint8_t i;
|
||||
|
||||
world->seat = POKER_GAME_SEAT_DEALER;
|
||||
world->seatTime = 0;
|
||||
|
||||
// Initialize the skywal
|
||||
skywallInit(&world->skywall);
|
||||
@ -34,16 +37,21 @@ void pokerWorldInit(
|
||||
}
|
||||
}
|
||||
|
||||
void pokerWorldLookAtPlayer(vnscene_t *scene, uint8_t playerIndex) {
|
||||
uint8_t seat;
|
||||
seat = pokerGameSeatFromIndex(playerIndex);
|
||||
scene->cameraLookX = POKER_WORLD_SEAT_POSITION_X(seat);
|
||||
scene->cameraLookZ = POKER_WORLD_SEAT_POSITION_Z(seat);
|
||||
void pokerWorldLookAtPlayer(
|
||||
vnscene_t *scene, uint8_t playerIndex
|
||||
) {
|
||||
uint8_t seat = pokerGameSeatFromIndex(playerIndex);
|
||||
vnSceneLookAt(scene,
|
||||
scene->cameraLook.x,
|
||||
scene->cameraLook.y,
|
||||
scene->cameraLook.z,
|
||||
POKER_WORLD_SEAT_POSITION_X(seat),
|
||||
scene->cameraLook.lookY,
|
||||
POKER_WORLD_SEAT_POSITION_Z(seat)
|
||||
);
|
||||
}
|
||||
|
||||
void pokerWorldRender(
|
||||
pokerworld_t *world, pokergameassets_t *assets
|
||||
) {
|
||||
void pokerWorldRender(pokerworld_t *world, pokergameassets_t *assets) {
|
||||
// Render the wall
|
||||
shaderUseTexture(&assets->shader, &assets->roomTexture);
|
||||
shaderUsePosition(&assets->shader, 0,2,0, 0,0,0);
|
||||
|
@ -9,11 +9,13 @@
|
||||
#include "../../libs.h"
|
||||
#include "../../display/shader.h"
|
||||
#include "../../display/primitive.h"
|
||||
#include "../../display/animation/easing.h"
|
||||
#include "../../display/primitives/skywall.h"
|
||||
#include "../../vn/vnscene.h"
|
||||
#include "../../vn/vncharacter.h"
|
||||
#include "../../poker/player.h"
|
||||
#include "../../poker/dealer.h"
|
||||
#include "../../engine/engine.h"
|
||||
#include "pokergameassets.h"
|
||||
|
||||
|
||||
@ -48,6 +50,10 @@
|
||||
|
||||
typedef struct {
|
||||
primitive_t skywall;
|
||||
|
||||
/** Which seat the game should look at */
|
||||
uint8_t seat;
|
||||
float seatTime;
|
||||
} pokerworld_t;
|
||||
|
||||
|
||||
@ -66,12 +72,14 @@ void pokerWorldInit(
|
||||
|
||||
/**
|
||||
* Adjusts the camera to look at a specific player. You can use this to look at
|
||||
* the dealer by referencing the POKER_PLAYER_COUNT as the index.
|
||||
* the dealer by referencing the POKER_PLAYER_HUMAN_INDEX as the index.
|
||||
*
|
||||
* @param scene Scene to adjust.
|
||||
* @param scene Visual Novel Engine scene.
|
||||
* @param playerIndex Player index to look at.
|
||||
*/
|
||||
void pokerWorldLookAtPlayer(vnscene_t *scene, uint8_t playerIndex);
|
||||
void pokerWorldLookAtPlayer(
|
||||
vnscene_t *scene, uint8_t playerIndex
|
||||
);
|
||||
|
||||
/**
|
||||
* Render the poker world.
|
||||
@ -79,9 +87,7 @@ void pokerWorldLookAtPlayer(vnscene_t *scene, uint8_t playerIndex);
|
||||
* @param world Poker Game World.
|
||||
* @param assets Assets to use.
|
||||
*/
|
||||
void pokerWorldRender(
|
||||
pokerworld_t *world, pokergameassets_t *assets
|
||||
);
|
||||
void pokerWorldRender(pokerworld_t *world, pokergameassets_t *assets);
|
||||
|
||||
/**
|
||||
* Cleanup the poker world.
|
||||
|
Reference in New Issue
Block a user