60 lines
1.2 KiB
C
60 lines
1.2 KiB
C
|
|
#ifndef TC_STATE_H
|
|
#define TC_STATE_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <SDL2/SDL.h>
|
|
|
|
#include <assets.h>
|
|
#include <shaders.h>
|
|
#include <entity.h>
|
|
#include <blocks.h>
|
|
#include <world.h>
|
|
#include <utility/utility.h>
|
|
|
|
typedef struct tc_camera
|
|
{
|
|
tc_vec3f_s position;
|
|
tc_vec3f_s rotation;
|
|
float fov;
|
|
|
|
} tc_camera_s;
|
|
|
|
typedef struct tc_renderer
|
|
{
|
|
tc_camera_s *active_camera;
|
|
tc_shader_program_s draw_shader;
|
|
|
|
SDL_Window *window;
|
|
SDL_GLContext gl_context;
|
|
|
|
} tc_renderer_s;
|
|
|
|
typedef struct
|
|
{
|
|
tc_renderer_s renderer;
|
|
tc_asset_storage_s asset_storage;
|
|
tc_block_registry_s block_registry;
|
|
tc_entity_registry_s entity_registry;
|
|
tc_world_s *main_world;
|
|
tc_entity_s *viewer;
|
|
tc_entity_s *player;
|
|
|
|
uint16_t fps;
|
|
uint16_t tps;
|
|
|
|
tc_image_s *block_texture_atlas;
|
|
|
|
} techneck_s;
|
|
|
|
extern techneck_s tc_game_state_g;
|
|
|
|
void tc_init ();
|
|
void tc_cleanup ();
|
|
|
|
void tc_load_textures ();
|
|
|
|
#endif
|
|
|