Trying to put it all together.
This commit is contained in:
24
src/game/poker/actions/look.c
Normal file
24
src/game/poker/actions/look.c
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include "look.h"
|
||||
|
||||
|
||||
void _pokerGameActionLookOnStart(
|
||||
queue_t *queue, queueaction_t *action, uint8_t i
|
||||
) {
|
||||
|
||||
printf("Looking at %u\n", (uint8_t)action->data);
|
||||
pokerWorldLookAtPlayer(action);
|
||||
queueNext(queue);
|
||||
}
|
||||
|
||||
queueaction_t * pokerGameActionLookAdd(pokergame_t *game, uint8_t playerIndex) {
|
||||
queueaction_t *action = pokerGameActionAdd(game);
|
||||
action->onStart = &_pokerGameActionLookOnStart;
|
||||
return action;
|
||||
}
|
25
src/game/poker/actions/look.h
Normal file
25
src/game/poker/actions/look.h
Normal file
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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 "../../../display/animation/queue.h"
|
||||
#include "../pokerworld.h"
|
||||
|
||||
void _pokerGameActionLookOnStart(
|
||||
queue_t *queue, queueaction_t *action, uint8_t i
|
||||
);
|
||||
|
||||
/**
|
||||
* Queues a look action to the poker game.
|
||||
*
|
||||
* @param game Game to add to.
|
||||
* @param playerIndex The player index to look at.
|
||||
* @return The queued action.
|
||||
*/
|
||||
queueaction_t * pokerGameActionLookAdd(pokergame_t *game, uint8_t playerIndex);
|
Reference in New Issue
Block a user