40 lines
710 B
C++
40 lines
710 B
C++
|
|
#include "enginestate.h"
|
||
|
|
#include "platform.h"
|
||
|
|
#include "assets.h"
|
||
|
|
#include "debug/logger.h"
|
||
|
|
|
||
|
|
engine_state engine;
|
||
|
|
|
||
|
|
|
||
|
|
bool enginestate_init()
|
||
|
|
{
|
||
|
|
u32 status;
|
||
|
|
|
||
|
|
assets_init(&engine.am);
|
||
|
|
|
||
|
|
engine.input.mouse_sensitivity = 1.4;
|
||
|
|
engine.input.movement_sensitivity = 7;
|
||
|
|
engine.input.init = true;
|
||
|
|
engine.input.target = INPUT_TARGET_PLAYER;
|
||
|
|
engine.input.player_movement = {0, 0};
|
||
|
|
engine.input.camera_rotation = {0, 0, 0};
|
||
|
|
engine.input.camera_movement = {0, 0, 0};
|
||
|
|
|
||
|
|
audio_init();
|
||
|
|
|
||
|
|
engine.time = 0;
|
||
|
|
engine.delta_t = 0;
|
||
|
|
|
||
|
|
engine.gui_scaling = 14;
|
||
|
|
|
||
|
|
engine.world = phy_create_world({0, 0, -9.81});
|
||
|
|
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
void enginestate_deinit()
|
||
|
|
{
|
||
|
|
phy_destroy_world(engine.world);
|
||
|
|
// @Correctness: complete this
|
||
|
|
}
|