Added missing header comments.

This commit is contained in:
2021-08-29 10:07:42 -07:00
parent 882469c5fb
commit d825689344
29 changed files with 184 additions and 73 deletions

View File

@ -7,7 +7,6 @@
#pragma once
#include <dawn/dawn.h>
#include "../../../vn/conversation/talk.h"
#include "../../../display/animation/queue.h"
/**

View File

@ -10,12 +10,14 @@
void _pokerGameActionBetOnUpdate(
queue_t *queue, queueaction_t *action, uint8_t i
) {
// Restack
bool isHuman;
bool turnMade = false;
pokerturn_t turn;
pokergame_t *game = (pokergame_t *)action->data;
pokerplayer_t *player;
// Are they human?
player = game->poker.players + game->poker.bet.better;
isHuman = game->poker.bet.better == POKER_PLAYER_HUMAN_INDEX;

View File

@ -12,4 +12,20 @@
#include "../../../poker/bet.h"
#include "../../../poker/actions/flop.h"
/** Callback when the bet action is updated. */
void _pokerGameActionBetOnUpdate(
queue_t *queue, queueaction_t *action, uint8_t i
);
/** Callback for when the bet action ends. */
void _pokerGameActionBetOnEnd(
queue_t *queue, queueaction_t *action, uint8_t i
);
/**
* Queues the bet action to the queue.
*
* @param game Game to queue onto.
* @return The action that was queued.
*/
queueaction_t * pokerGameActionBetAdd(pokergame_t *game);

View File

@ -7,7 +7,6 @@
#include "look.h"
void _pokerGameActionLookOnStart(
queue_t *queue, queueaction_t *action, uint8_t i
) {

View File

@ -11,6 +11,7 @@
#include "../../../display/animation/queue.h"
#include "../pokerworld.h"
/** Callback when the look action starts. */
void _pokerGameActionLookOnStart(
queue_t *queue, queueaction_t *action, uint8_t i
);

View File

@ -0,0 +1,21 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "restack.h"
void _pokerGameActionRestackOnStart(
queue_t *queue, queueaction_t *action, uint8_t i
) {
pokerGameQueueRestack(game);
queueNext(queue);
}
queueaction_t * pokerGameActionRestackAdd(pokergame_t *game) {
queueaction_t *action = pokerGameActionAdd(game);
action->onStart = &_pokerGameActionRestackOnStart;
return action;
}

View File

@ -0,0 +1,27 @@
/**
* 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 "action.h"
#include "../pokergame.h"
#include "../../../poker/turn.h"
#include "../../../poker/bet.h"
#include "../../../poker/actions/flop.h"
/** Callback for when the queue restack action stars. */
void _pokerGameActionRestackOnStart(
queue_t *queue, queueaction_t *action, uint8_t i
);
/**
* Adds a restack action to the queue.
*
* @param game Game to restack.
* @return The queued action.
*/
queueaction_t * pokerGameActionRestackAdd(pokergame_t *game);

View File

@ -13,10 +13,12 @@
#include "../discussion/pokerdiscussion.h"
#include "bet.h"
/** Callback that is fired when the round start event starts. */
void _pokerGameActionRoundOnStart(
queue_t *queue, queueaction_t *action, uint8_t i
);
/** Callback that is fired when the round action ends. */
void _pokerGameActionRoundOnEnd(queue_t *queue,queueaction_t *action,uint8_t i);
/**

View File

@ -14,10 +14,12 @@
#include "action.h"
#include "round.h"
/** Callback fired when the game action first starts */
void _pokerGameActionStartOnStart(
queue_t *queue, queueaction_t *action, uint8_t i
);
/** Callback fired when the game start action ends */
void _pokerGameActionStartOnEnd(queue_t *queue,queueaction_t *action,uint8_t i);
/**