bruh(2)
This commit is contained in:
@ -30,6 +30,7 @@ game_t * gameInit(platform_t *platform) {
|
||||
|
||||
// Load the world
|
||||
game->world = worldLoad("testworld/");
|
||||
playerCreate(&game->world->entities, 0);
|
||||
|
||||
// Pass to the main game to handle
|
||||
return game;
|
||||
@ -45,7 +46,10 @@ uint32_t gameUpdate(game_t *game) {
|
||||
// Prepare for rendering
|
||||
shaderUse(game->shader);
|
||||
shaderUseCamera(game->shader, game->camera);
|
||||
worldRender(game->world, game->shader, game->camera);
|
||||
worldRender(game->world,
|
||||
game->shader, game->camera,
|
||||
game->engine->input
|
||||
);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -13,6 +13,8 @@
|
||||
#include "../display/shader.h"
|
||||
#include "../world/world.h"
|
||||
|
||||
#include "../world/entity/player.h"
|
||||
|
||||
/////////////////////////////////// CONSTANTS //////////////////////////////////
|
||||
/** Name of the Game */
|
||||
#define GAME_NAME "Dawn Game"
|
||||
@ -27,13 +29,14 @@
|
||||
|
||||
/////////////////////////////// TYPE DEFINITIONS ///////////////////////////////
|
||||
/** Information about the current game context. */
|
||||
typedef struct {
|
||||
typedef struct game_t {
|
||||
/** The engine context for the game */
|
||||
engine_t *engine;
|
||||
|
||||
/** Rendering items */
|
||||
camera_t *camera;
|
||||
shader_t *shader;
|
||||
|
||||
world_t *world;
|
||||
} game_t;
|
||||
|
||||
|
Reference in New Issue
Block a user