38 lines
814 B
C
38 lines
814 B
C
/**
|
|
* Copyright (c) 2021 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#include "pokerui.h"
|
|
|
|
void pokerUiInit(pokergame_t *pokerGame) {
|
|
uint8_t i;
|
|
|
|
for(i = 0; i < POKER_PLAYER_COUNT; i++) {
|
|
pokerPlayerUiInit(pokerGame->ui.player + i);
|
|
}
|
|
}
|
|
|
|
void pokerUiRender(pokergame_t *pokerGame, engine_t *engine) {
|
|
uint8_t i;
|
|
pokerplayerui_t *ui;
|
|
|
|
for(i = 0; i < POKER_PLAYER_COUNT; i++) {
|
|
ui = pokerGame->ui.player + i;
|
|
|
|
pokerPlayerUiRender(ui, pokerGame,
|
|
&pokerGame->assets.shader, &pokerGame->assets.font, i,
|
|
engine->render.width, i * 75.0f
|
|
);
|
|
}
|
|
}
|
|
|
|
void pokerUiDispose(pokergame_t *pokerGame) {
|
|
uint8_t i;
|
|
|
|
for(i = 0; i < POKER_PLAYER_COUNT; i++) {
|
|
pokerPlayerUiDispose(pokerGame->ui.player + i);
|
|
}
|
|
} |