Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
TypeDefinition committed Apr 20, 2024
1 parent 152eb18 commit 32bae62
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/game/scene/game_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ namespace mkr {
init_materials();
init_levels();
init_player();
// init_sphere_gallery();
// init_transparency_gallery();
init_shadow_gallery();
init_sphere_gallery();
init_transparency_gallery();
// init_shadow_gallery();
}

void game_scene::pre_update() {
Expand All @@ -51,7 +51,7 @@ namespace mkr {
}

void game_scene::init_input() {
// input_manager::instance().set_relative_mouse(true);
input_manager::instance().set_relative_mouse(true);

// Register Buttons
input_manager::instance().register_button(quit, input_context_default, controller_index_default, kc_escape);
Expand Down Expand Up @@ -342,19 +342,19 @@ namespace mkr {
}

// Directional Light
/*{
{
transform light_trans;
light_trans.set_position({0.0f, 0.0f, 0.0f});
quaternion rotation_x, rotation_y;
rotation_x.set_rotation(vector3::x_axis(), 45.0f * maths_util::deg2rad);
// rotation_y.set_rotation(vector3::y_axis(), 45.0f * maths_util::deg2rad);
rotation_y.set_rotation(vector3::y_axis(), 45.0f * maths_util::deg2rad);
light_trans.set_rotation(rotation_x * rotation_y);
light lt;
lt.set_shadow_distance(30.0f);
lt.set_mode(light_mode::directional);
lt.set_power(1.0f);
world_.entity().set<transform>(light_trans).set<light>(lt).add<local_to_world>();
}*/
}

// Point Light
/*{
Expand Down Expand Up @@ -383,7 +383,7 @@ namespace mkr {

void game_scene::init_player() {
transform head_trans;
head_trans.set_position({0.0f, 4.0f, 0.0f});
head_trans.set_position({0.0f, 1.7f, 0.0f});

camera cam;
cam.skybox_.shader_ = shader_manager::instance().get_shader("skybox");
Expand Down Expand Up @@ -426,7 +426,7 @@ namespace mkr {
render_mesh rend{};
rend.mesh_ = mesh_manager::instance().get_mesh("sphere");
rend.material_ = material_manager::instance().get_material("pavement");
world_.entity().set<transform>(trans).set<render_mesh>(rend).add<local_to_world>().add<rotate_tag>();
world_.entity().set<transform>(trans).set<render_mesh>(rend).add<local_to_world>();
}

{
Expand Down

0 comments on commit 32bae62

Please sign in to comment.