Just thiknking about how to put it all together.

This commit is contained in:
2021-07-29 10:01:58 -07:00
parent 6a666b64ca
commit 289e6fccfc
14 changed files with 233 additions and 23 deletions

View File

@ -0,0 +1,15 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "action.h"
queueaction_t * pokerGameActionAdd(pokergame_t *game) {
queueaction_t *action;
action = queueAdd(&game->scene.conversation.actionQueue);
action->data = (void *)game;
return action;
}

View File

@ -0,0 +1,19 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include <dawn/dawn.h>
#include "../../../vn/conversation/talk.h"
#include "../../../display/animation/queue.h"
/**
* Adds an action to the poker game scene's queue.
*
* @param game Game to add the action to.
* @return Action that was added to the game.
*/
queueaction_t * pokerGameActionAdd(pokergame_t *game);

View File

View File

@ -0,0 +1,8 @@
// Copyright (c) 2021 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include <dawn/dawn.h>

View File

@ -0,0 +1,35 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "start.h"
void _pokerGameActionStartOnStart(
queue_t *queue, queueaction_t *action, uint8_t i
) {
pokergame_t *game = (pokergame_t *)action->data;
queueNext(queue);
}
void _pokerGameActionStartOnEnd(queue_t *queue,queueaction_t *action,uint8_t i){
pokergame_t *game = (pokergame_t *)action->data;
pokerActionMatchAdd(&game->scene.conversation.actionQueue, &game->poker);
vnConversationTalk(&game->scene.conversation,
"The game is No Limits Texas Hold'em.", NULL
);
pokerGameActionRoundAdd(game);
}
queueaction_t * pokerGameActionStartAdd(pokergame_t *game) {
queueaction_t *action = pokerGameActionAdd(game);
action->onStart = &_pokerGameActionStartOnStart;
action->onEnd = &_pokerGameActionStartOnEnd;
return action;
}

View File

@ -0,0 +1,21 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include <dawn/dawn.h>
#include "../../../vn/conversation/talk.h"
#include "../../../display/animation/queue.h"
#include "../../../poker/actions/match.h"
#include "action.h"
void _pokerGameActionStartOnStart(
queue_t *queue, queueaction_t *action, uint8_t i
);
void _pokerGameActionStartOnEnd(queue_t *queue,queueaction_t *action,uint8_t i);
queueaction_t * pokerGameAcionStartAdd(pokergame_t *game);