57 lines
735 B
C
57 lines
735 B
C
#ifndef _PIUMA_ENGINESTATE_H_
|
|
#define _PIUMA_ENGINESTATE_H_
|
|
|
|
#include "lib/types.h"
|
|
#include "lib/math.h"
|
|
#include "render/render.h"
|
|
#include "audio.h"
|
|
#include "camera.h"
|
|
#include "assets.h"
|
|
#include "physics/physics.h"
|
|
|
|
|
|
enum input_target
|
|
{
|
|
INPUT_TARGET_PLAYER,
|
|
INPUT_TARGET_CAMERA,
|
|
INPUT_TARGET_EDITOR
|
|
};
|
|
|
|
struct es_input
|
|
{
|
|
f32 mouse_sensitivity;
|
|
f32 movement_sensitivity;
|
|
bool init;
|
|
|
|
enum input_target target;
|
|
|
|
v2s player_movement;
|
|
|
|
v3 camera_rotation;
|
|
v3 camera_movement;
|
|
};
|
|
|
|
|
|
struct engine_state
|
|
{
|
|
es_input input;
|
|
audio_player audio;
|
|
|
|
asset_manager am;
|
|
|
|
f64 time;
|
|
f64 delta_t;
|
|
|
|
f32 gui_scaling;
|
|
|
|
phy_world *world;
|
|
};
|
|
|
|
extern engine_state engine;
|
|
|
|
bool enginestate_init();
|
|
void enginestate_deinit();
|
|
|
|
|
|
#endif
|