diff --git a/enginecustom/src/inc/system/macro.h b/enginecustom/src/inc/system/macro.h index abc34bf..27fa409 100644 --- a/enginecustom/src/inc/system/macro.h +++ b/enginecustom/src/inc/system/macro.h @@ -8,6 +8,8 @@ // --------------------- // #define R_FALSE return false; #define R_TRUE return true; +#define TO_RAD 0.0174532925f +#define TO_DEG (180.0f/3.141593f) #ifdef max #pragma push_macro("max") @@ -164,8 +166,6 @@ inline bool TestPlaneCorner( // ---------------------------------------------- // // --- Macros for the camera input processing --- // // ---------------------------------------------- // -#define TO_RAD 0.0174532925f - struct CameraInput { bool move_forward = false; bool move_backward = false; @@ -176,4 +176,4 @@ struct CameraInput { bool scroll_up = false; bool scroll_down = false; bool right_click = false; -}; +}; \ No newline at end of file diff --git a/enginecustom/src/src/system/application_class.cpp b/enginecustom/src/src/system/application_class.cpp index b034b8e..dd76214 100644 --- a/enginecustom/src/src/system/application_class.cpp +++ b/enginecustom/src/src/system/application_class.cpp @@ -840,8 +840,8 @@ bool application_class::frame(input_class* Input) camera_->move(frameTime, deltaX, deltaY); XMFLOAT3 dir = sun_light_->GetDirection(); - float pitch = asinf(-dir.y) * (180.0f / XM_PI); // en degrés - float yaw = atan2f(dir.x, dir.z) * (180.0f / XM_PI); // en degrés + float pitch = asinf(-dir.y) * TO_DEG; // en degrés + float yaw = atan2f(dir.x, dir.z) * TO_DEG; // en degrés float roll = 0.0f; if (Input->is_key_pressed(DIK_TAB)) { @@ -1157,9 +1157,6 @@ bool application_class::render(float rotation, float x, float y, float z, float R_FALSE } - // Reset the world matrix. - worldMatrix = direct_3d_->get_world_matrix(); - // Get the camera reflection view matrix. camera_->get_reflection_view_matrix(reflectionMatrix); @@ -1842,19 +1839,6 @@ bool application_class::render_pass(XMFLOAT4* diffuse, XMFLOAT4* position, XMFLO renderCount += entitiesRendered; } - // Rendu des objets traditionnels comme avant - // if (active_camera_ == sun_camera_) - // { - // shadow_map_->set_render_target(direct_3d_->get_device_context()); - // shadow_map_->clear_render_target(direct_3d_->get_device_context()); - // } - - // if (active_camera_ == sun_camera_) - // { - // direct_3d_->set_back_buffer_render_target(); - // direct_3d_->reset_viewport(); - // } - set_render_count(renderCount); R_TRUE