Nuked PokerGame file
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include "game.h"
|
||||
|
||||
game_t GAME_STATE;
|
||||
pokergame_t POKER_STATE;
|
||||
|
||||
bool gameInit() {
|
||||
// Init the game
|
||||
@ -26,8 +27,26 @@ bool gameInit() {
|
||||
"shaders/textured.vert", "shaders/textured.frag"
|
||||
);
|
||||
|
||||
// Send to Texas Game
|
||||
holdemGameInit();
|
||||
// Font
|
||||
POKER_STATE.fontTexture = assetTextureLoad("font.png");
|
||||
POKER_STATE.fontTileset = tilesetCreate(20, 20,
|
||||
POKER_STATE.fontTexture->width,
|
||||
POKER_STATE.fontTexture->height,
|
||||
1, 1, 1, 1
|
||||
);
|
||||
POKER_STATE.fontBatch = spriteBatchCreate(1024);
|
||||
|
||||
// Prepare the renderer.
|
||||
holdemRenderFrameInit();
|
||||
holdemRenderWorldInit();
|
||||
holdemRenderPlayerInit();
|
||||
holdemRenderCardInit();
|
||||
|
||||
// Prepare the action manager
|
||||
pokerActionInit();
|
||||
|
||||
// Start the first action
|
||||
pokerActionAdd(actionStart());
|
||||
|
||||
// Init the input manger.
|
||||
return true;
|
||||
@ -39,13 +58,24 @@ bool gameUpdate(float platformDelta) {
|
||||
inputUpdate();
|
||||
|
||||
shaderUse(GAME_STATE.shaderWorld);// TODO: remove
|
||||
holdemGameUpdate();
|
||||
|
||||
// Update the frame buffers and action queue
|
||||
holdemRenderFrameUpdate();
|
||||
pokerActionUpdate();
|
||||
|
||||
// Render things on each frame, then render those frames.
|
||||
holdemRenderFrameUseLeft();
|
||||
holdemRenderWorld();
|
||||
holdemRenderFrameUseRight();
|
||||
holdemRenderWorld();
|
||||
holdemRenderFrameBack();
|
||||
|
||||
if(inputIsPressed(INPUT_NULL)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void gameDispose() {
|
||||
pokerActionDispose();
|
||||
shaderDispose(GAME_STATE.shaderWorld);
|
||||
inputDispose();
|
||||
renderDispose();
|
||||
|
@ -9,10 +9,17 @@
|
||||
#include "../display/render.h"
|
||||
#include "../display/camera.h"
|
||||
#include "../display/shader.h"
|
||||
#include "../display/gui/font.h"
|
||||
#include "../file/asset.h"
|
||||
#include "../input/input.h"
|
||||
#include "../poker/holdemgame.h"
|
||||
#include "../debug/log.h"
|
||||
#include "../poker/action/action.h"
|
||||
#include "../poker/action/start.h"
|
||||
#include "../poker/render/player.h"
|
||||
#include "../poker/render/card.h"
|
||||
#include "../poker/render/frame.h"
|
||||
#include "../poker/render/look.h"
|
||||
#include "../poker/render/world.h"
|
||||
|
||||
/**
|
||||
* Initialize the game context.
|
||||
|
Reference in New Issue
Block a user