Skip to content

Commit

Permalink
style: change screenpicker case type
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas7770 committed Jan 26, 2024
1 parent 6193c05 commit 58aef4e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ set(CUBOS_ENGINE_SOURCE

"src/cubos/engine/splitscreen/plugin.cpp"

"src/cubos/engine/screenpicker/plugin.cpp"
"src/cubos/engine/screenpicker/screenpicker.cpp"
"src/cubos/engine/screen_picker/plugin.cpp"
"src/cubos/engine/screen_picker/screen_picker.cpp"
)

# Create cubos engine
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
/// @dir
/// @brief @ref screenpicker-plugin plugin directory.
/// @brief @ref screen-picker-plugin plugin directory.

/// @file
/// @brief Plugin entry point.
/// @ingroup screenpicker-plugin
/// @ingroup screen-picker-plugin

#pragma once

#include <cubos/engine/cubos.hpp>
#include <cubos/engine/screenpicker/screenpicker.hpp>
#include <cubos/engine/screen_picker/screen_picker.hpp>

namespace cubos::engine
{
/// @defgroup screenpicker-plugin ScreenPicker
/// @defgroup screen-picker-plugin ScreenPicker
/// @ingroup engine
/// @brief Used to select entities and gizmos by clicking them.
///
/// ## Resources
/// - @ref ScreenPicker - provides a texture to store entity and gizmo ids.
///
/// ## Startup tags
/// - `cubos.screenpicker.init` - the ScreenPicker resource is initialized, after `cubos.window.init`
/// - `cubos.screenPicker.init` - the ScreenPicker resource is initialized, after `cubos.window.init`
///
/// ## Tags
/// - `cubos.screenpicker.clear` - the picking texture is cleared
/// - `cubos.screenpicker.resize` - window resize events are handled and the ScreenPicker texture is resized, after
/// `cubos.window.poll` and before `cubos.screenpicker.clear`.
/// - `cubos.screenPicker.clear` - the picking texture is cleared
/// - `cubos.screenPicker.resize` - window resize events are handled and the ScreenPicker texture is resized, after
/// `cubos.window.poll` and before `cubos.screenPicker.clear`.
///
/// ## Dependencies
/// - @ref window-plugin

/// @brief Plugin entry function.
/// @param cubos @b CUBOS. main class.
/// @ingroup screenpicker-plugin
/// @ingroup screen-picker-plugin
void screenPickerPlugin(Cubos& cubos);
} // namespace cubos::engine
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// @file
/// @brief Resource @ref cubos::engine::ScreenPicker.
/// @ingroup screenpicker-plugin
/// @ingroup screen-picker-plugin

#pragma once

Expand All @@ -12,7 +12,7 @@ namespace cubos::engine
{
/// @brief Resource which provides a texture to store entity/gizmo ids, for selection with a mouse.
///
/// @ingroup screenpicker-plugin
/// @ingroup screen-picker-plugin
class ScreenPicker final
{
public:
Expand Down
6 changes: 3 additions & 3 deletions engine/src/cubos/engine/renderer/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <cubos/engine/renderer/pps/bloom.hpp>
#include <cubos/engine/renderer/spot_light.hpp>
#include <cubos/engine/renderer/viewport.hpp>
#include <cubos/engine/screenpicker/plugin.hpp>
#include <cubos/engine/screen_picker/plugin.hpp>
#include <cubos/engine/settings/plugin.hpp>
#include <cubos/engine/transform/plugin.hpp>
#include <cubos/engine/window/plugin.hpp>
Expand Down Expand Up @@ -123,7 +123,7 @@ static void draw(Renderer& renderer, const ActiveCameras& activeCameras, Rendere
glm::mat4 views[4]{};
BaseRenderer::Viewport viewports[4]{};

bool screenPickingEnabled = settings.getBool("cubos.renderer.screenpicking.enabled", true);
bool screenPickingEnabled = settings.getBool("cubos.renderer.screenPicking.enabled", true);

int cameraCount = 0;

Expand Down Expand Up @@ -200,6 +200,6 @@ void cubos::engine::rendererPlugin(Cubos& cubos)
cubos.system(framePointLights).tagged("cubos.renderer.frame");
cubos.system(frameEnvironment).tagged("cubos.renderer.frame");
cubos.system(checkPaletteUpdateSystem).tagged("cubos.renderer.frame");
cubos.system(draw).tagged("cubos.renderer.draw").after("cubos.screenpicker.clear");
cubos.system(draw).tagged("cubos.renderer.draw").after("cubos.screenPicker.clear");
cubos.system(resize).after("cubos.window.poll").before("cubos.renderer.draw");
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <cubos/core/io/window.hpp>

#include <cubos/engine/cubos.hpp>
#include <cubos/engine/screenpicker/plugin.hpp>
#include <cubos/engine/screenpicker/screenpicker.hpp>
#include <cubos/engine/screen_picker/plugin.hpp>
#include <cubos/engine/screen_picker/screen_picker.hpp>
#include <cubos/engine/window/plugin.hpp>

using cubos::core::io::ResizeEvent;
Expand Down Expand Up @@ -38,11 +38,11 @@ void cubos::engine::screenPickerPlugin(Cubos& cubos)

cubos.addResource<ScreenPicker>();

cubos.startupSystem(initScreenPickerSystem).tagged("cubos.screenpicker.init").after("cubos.window.init");
cubos.startupSystem(initScreenPickerSystem).tagged("cubos.screenPicker.init").after("cubos.window.init");

cubos.system(clearTexture).tagged("cubos.screenpicker.clear");
cubos.system(clearTexture).tagged("cubos.screenPicker.clear");
cubos.system(processResize)
.tagged("cubos.screenpicker.resize")
.tagged("cubos.screenPicker.resize")
.after("cubos.window.poll")
.before("cubos.screenpicker.clear");
.before("cubos.screenPicker.clear");
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <cubos/core/gl/render_device.hpp>

#include <cubos/engine/screenpicker/screenpicker.hpp>
#include <cubos/engine/screen_picker/screen_picker.hpp>

using cubos::engine::ScreenPicker;

Expand Down

0 comments on commit 58aef4e

Please sign in to comment.