Skip to content

Commit

Permalink
use hpp instead of h files
Browse files Browse the repository at this point in the history
  • Loading branch information
Hatrickek committed Mar 25, 2024
1 parent 83876cf commit f7837f7
Show file tree
Hide file tree
Showing 210 changed files with 627 additions and 638 deletions.
32 changes: 16 additions & 16 deletions Oxylus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
set(PROJECT_NAME Oxylus)

file(GLOB src "src/*.h" "src/*.cpp")
file(GLOB src "src/*.h" "src/*.hpp" "src/*.cpp")
source_group("src" FILES ${src})
file(GLOB_RECURSE Assets "src/Assets/*.h" "src/Assets/*.cpp" )
file(GLOB_RECURSE Assets "src/Assets/*.h" "src/Assets/*.hpp" "src/Assets/*.cpp" )
source_group("src/Assets" FILES ${Assets})
file(GLOB_RECURSE Audio "src/Audio/*.h" "src/Audio/*.cpp" )
file(GLOB_RECURSE Audio "src/Audio/*.h" "src/Audio/*.hpp" "src/Audio/*.cpp" )
source_group("src/Audio" FILES ${Audio})
file(GLOB_RECURSE Core "src/Core/*.h" "src/Core/*.cpp" )
file(GLOB_RECURSE Core "src/Core/*.h" "src/Core/*.hpp" "src/Core/*.cpp" )
source_group("src/Core" FILES ${Core})
file(GLOB_RECURSE Event "src/Event/*.h" "src/Event/*.cpp" )
file(GLOB_RECURSE Event "src/Event/*.h" "src/Event/*.hpp" "src/Event/*.cpp" )
source_group("src/Event" FILES ${Event})
file(GLOB_RECURSE Physics "src/Physics/*.h" "src/Physics/*.cpp" )
file(GLOB_RECURSE Physics "src/Physics/*.h" "src/Physics/*.hpp" "src/Physics/*.cpp" )
source_group("src/Physics" FILES ${Physics})
file(GLOB_RECURSE Scripting "src/Scripting/*.h" "src/Scripting/*.cpp" )
file(GLOB_RECURSE Scripting "src/Scripting/*.h" "src/Scripting/*.hpp" "src/Scripting/*.cpp" )
source_group("src/Scripting" FILES ${Scripting})
file(GLOB_RECURSE Modules "src/Modules/*.h" "src/Modules/*.cpp" )
file(GLOB_RECURSE Modules "src/Modules/*.h" "src/Modules/*.hpp" "src/Modules/*.cpp" )
source_group("src/Modules" FILES ${Modules})

file(GLOB Render "src/Render/*.h" "src/Render/*.cpp" )
file(GLOB Render "src/Render/*.h" "src/Render/*.hpp" "src/Render/*.cpp" )
source_group("src/Render" FILES ${Render})
file(GLOB Passes "src/Render/Passes/*.h" "src/Render/Passes/*.cpp" )
file(GLOB Passes "src/Render/Passes/*.h" "src/Render/Passes/*.hpp" "src/Render/Passes/*.cpp" )
source_group("src/Render/Passes" FILES ${Passes})
file(GLOB Vulkan "src/Render/Vulkan/*.h" "src/Render/Vulkan/*.cpp" )
file(GLOB Vulkan "src/Render/Vulkan/*.h" "src/Render/Vulkan/*.hpp" "src/Render/Vulkan/*.cpp" )
source_group("src/Render/Vulkan" FILES ${Vulkan})
file(GLOB RenderUtils "src/Render/Utils/*.h" "src/Render/Utils/*.cpp" )
file(GLOB RenderUtils "src/Render/Utils/*.h" "src/Render/Utils/*.hpp" "src/Render/Utils/*.cpp" )
source_group("src/Render/Utils" FILES ${RenderUtils})

set(RENDERER_FILES ${Render} ${Passes} ${Vulkan} ${RenderUtils})

file(GLOB_RECURSE Scene "src/Scene/*.h" "src/Scene/*.cpp" )
file(GLOB_RECURSE Scene "src/Scene/*.h" "src/Scene/*.hpp" "src/Scene/*.cpp" )
source_group("src/Scene" FILES ${Scene})
file(GLOB_RECURSE Thread "src/Thread/*.h" "src/Thread/*.cpp" )
file(GLOB_RECURSE Thread "src/Thread/*.h" "src/Thread/*.hpp" "src/Thread/*.cpp" )
source_group("src/Thread" FILES ${Thread})
file(GLOB_RECURSE UI "src/UI/*.h" "src/UI/*.cpp" )
file(GLOB_RECURSE UI "src/UI/*.h" "src/UI/*.hpp" "src/UI/*.cpp" )
source_group("src/UI" FILES ${UI})
file(GLOB_RECURSE Utils "src/Utils/*.h" "src/Utils/*.cpp" )
file(GLOB_RECURSE Utils "src/Utils/*.h" "src/Utils/*.hpp" "src/Utils/*.cpp" )
source_group("src/Utils" FILES ${Utils})

set(SOURCE_FILES ${src} ${Core} ${Assets} ${Audio} ${Event} ${Physics} ${Modules}
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions Oxylus/src/Assets/AssetManager.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "AssetManager.h"
#include "AssetManager.hpp"

#include <filesystem>

#include "Audio/AudioSource.h"
#include "Audio/AudioSource.hpp"
#include "Render/Mesh.h"

#include "Utils/Log.h"
#include "Utils/Profiler.h"
#include "Utils/Log.hpp"
#include "Utils/Profiler.hpp"

namespace ox {
AssetManager::AssetLibrary AssetManager::asset_library;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <ankerl/unordered_dense.h>

#include "Core/Base.h"
#include "Core/Base.hpp"

namespace ox {
struct TextureLoadInfo;
Expand Down
4 changes: 2 additions & 2 deletions Oxylus/src/Assets/EmbedAsset.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "EmbedAsset.h"
#include "EmbedAsset.hpp"

#include <fstream>
#include <ostream>

#include "Utils/Log.hpp"
#include "Render/Texture.h"
#include "Utils/Log.h"

namespace ox {
void EmbedAsset::EmbedTexture(const std::string& texFilePath, const std::string& outPath, const std::string& arrayName) {
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions Oxylus/src/Assets/Material.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "Material.h"
#include "Material.hpp"

#include <vuk/CommandBuffer.hpp>

#include "Render/Utils/VukCommon.h"
#include "Render/Vulkan/VkContext.h"
#include "Render/Utils/VukCommon.hpp"
#include "Render/Vulkan/VkContext.hpp"

#include "Utils/Profiler.h"
#include "Utils/Profiler.hpp"

namespace ox {
Material::Material(const std::string& material_name) {
Expand Down
16 changes: 6 additions & 10 deletions Oxylus/src/Assets/Material.h → Oxylus/src/Assets/Material.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

#include <string>

#include "TextureAsset.h"
#include "Core/Base.hpp"
#include "Core/Types.hpp"
#include "TextureAsset.hpp"
#include "glm/vec4.hpp"
#include "Core/Base.h"
#include "Core/Types.h"

namespace vuk {
class CommandBuffer;
struct Texture;
}
} // namespace vuk

namespace ox {
class Material {
Expand All @@ -21,11 +21,7 @@ class Material {
Mask,
};

enum class Sampler : uint32_t {
Bilinear,
Trilinear,
Anisotropy
};
enum class Sampler : uint32_t { Bilinear, Trilinear, Anisotropy };

struct Parameters {
Vec4 color = Vec4(1.0f);
Expand Down Expand Up @@ -102,4 +98,4 @@ class Material {
Shared<TextureAsset> ao_texture = nullptr;
Shared<TextureAsset> emissive_texture = nullptr;
};
}
} // namespace ox
8 changes: 4 additions & 4 deletions Oxylus/src/Assets/TextureAsset.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "TextureAsset.h"
#include "TextureAsset.hpp"

#include <vuk/Partials.hpp>

#include "Render/Vulkan/VkContext.hpp"
#include "Render/RendererCommon.h"
#include "Render/Texture.h"
#include "Render/Vulkan/VkContext.h"

#include "Core/FileSystem.h"
#include "Utils/Profiler.h"
#include "Core/FileSystem.hpp"
#include "Utils/Profiler.hpp"

namespace ox {
Shared<TextureAsset> TextureAsset::s_white_texture = nullptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <vuk/Image.hpp>
#include <vuk/ImageAttachment.hpp>

#include "Asset.h"
#include "Asset.hpp"

#include "Core/Base.h"
#include "Core/Base.hpp"

namespace ox {
struct TextureLoadInfo {
Expand Down
6 changes: 3 additions & 3 deletions Oxylus/src/Audio/AudioEngine.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "AudioEngine.h"
#include "AudioEngine.hpp"

#define MINIAUDIO_IMPLEMENTATION

#include <miniaudio.h>

#include "Utils/Log.h"
#include "Utils/Profiler.h"
#include "Utils/Log.hpp"
#include "Utils/Profiler.hpp"

namespace ox {
void AudioEngine::init() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "Core/ESystem.h"
#include "Core/ESystem.hpp"
struct ma_engine;

namespace ox {
Expand Down
6 changes: 3 additions & 3 deletions Oxylus/src/Audio/AudioListener.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "AudioListener.h"
#include "AudioListener.hpp"

#include "AudioEngine.h"
#include <miniaudio.h>
#include "AudioEngine.hpp"

#include "Core/App.h"
#include "Core/App.hpp"

namespace ox {
void AudioListener::set_config(const AudioListenerConfig& config) const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "Core/Types.h"
#include "Core/Types.hpp"

namespace ox {
struct AudioListenerConfig {
Expand Down
8 changes: 4 additions & 4 deletions Oxylus/src/Audio/AudioSource.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "AudioSource.h"
#include "AudioSource.hpp"

#include <miniaudio.h>

#include "AudioEngine.h"
#include "AudioEngine.hpp"

#include "Core/App.h"
#include "Core/App.hpp"

#include "Utils/Log.h"
#include "Utils/Log.hpp"

namespace ox {
AudioSource::AudioSource(const std::string& filepath) : m_path(filepath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include <string>

#include "Core/Base.h"
#include "Core/Types.h"
#include "Core/Base.hpp"
#include "Core/Types.hpp"

struct ma_sound;

Expand Down
32 changes: 16 additions & 16 deletions Oxylus/src/Core/App.cpp
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
#include "App.h"
#include "App.hpp"

#include <filesystem>

#include "FileSystem.h"
#include "Layer.h"
#include "LayerStack.h"
#include "Project.h"
#include "FileSystem.hpp"
#include "Layer.hpp"
#include "LayerStack.hpp"
#include "Project.hpp"

#include "Audio/AudioEngine.h"
#include "Audio/AudioEngine.hpp"

#include "Modules/ModuleRegistry.h"
#include "Modules/ModuleRegistry.hpp"

#include "Render/Vulkan/Renderer.h"
#include "Render/Vulkan/VkContext.h"
#include "Render/Vulkan/Renderer.hpp"
#include "Render/Vulkan/VkContext.hpp"
#include "Render/Window.h"

#include "Scripting/LuaManager.h"
#include "Scripting/LuaManager.hpp"

#include "Thread/TaskScheduler.h"
#include "Thread/ThreadManager.h"
#include "Thread/TaskScheduler.hpp"
#include "Thread/ThreadManager.hpp"

#include "UI/ImGuiLayer.h"
#include "UI/ImGuiLayer.hpp"

#include "Utils/FileDialogs.h"
#include "Utils/Profiler.h"
#include "Utils/Random.h"
#include "Utils/FileDialogs.hpp"
#include "Utils/Profiler.hpp"
#include "Utils/Random.hpp"

namespace ox {
App* App::instance = nullptr;
Expand Down
8 changes: 4 additions & 4 deletions Oxylus/src/Core/App.h → Oxylus/src/Core/App.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

#include <ankerl/unordered_dense.h>

#include "Base.h"
#include "ESystem.h"
#include "Base.hpp"
#include "ESystem.hpp"

#include "Utils/Log.h"
#include "Utils/Timestep.h"
#include "Utils/Log.hpp"
#include "Utils/Timestep.hpp"

int main(int argc, char** argv);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "Keycodes.h"
#include "Keycodes.hpp"

namespace ox {
class KeyEvent {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions Oxylus/src/Core/ESystem.h → Oxylus/src/Core/ESystem.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include "Base.h"
#include "Base.hpp"

#include "Event/Event.h"
#include "Event/Event.hpp"

namespace ox {
/// Engine systems interface
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "App.h"
#include "Utils/Log.h"
#include "Utils/Log.hpp"
#include "App.hpp"

int main(int argc, char** argv) {
ox::Log::init(argc, argv);
Expand Down
12 changes: 6 additions & 6 deletions Oxylus/src/Core/FileSystem.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "FileSystem.h"
#include "FileSystem.hpp"

#include "Core/PlatformDetection.h"
#include "PlatformDetection.hpp"

#include "Utils/StringUtils.h"
#include "Utils/StringUtils.hpp"

#ifdef OX_PLATFORM_WINDOWS
#include <ShlObj_core.h>
Expand All @@ -12,9 +12,9 @@

#include <filesystem>

#include "App.h"
#include "Utils/Log.h"
#include "Utils/Profiler.h"
#include "Utils/Log.hpp"
#include "Utils/Profiler.hpp"
#include "App.hpp"

namespace ox {
std::pair<std::string, std::string> FileSystem::split_path(std::string_view full_path) {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions Oxylus/src/Core/Input.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "Input.h"
#include "Input.hpp"
#include "Render/Window.h"
#include "Types.hpp"
#include "stb_image.h"
#include "Types.h"

#include "GLFW/glfw3.h"

Expand Down
8 changes: 4 additions & 4 deletions Oxylus/src/Core/Input.h → Oxylus/src/Core/Input.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include "Keycodes.h"
#include "Keycodes.hpp"

#include "ApplicationEvents.h"
#include "Types.h"
#include "ApplicationEvents.hpp"
#include "Types.hpp"

#include "Event/Event.h"
#include "Event/Event.hpp"

#include "glm/vec2.hpp"

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Oxylus/src/Core/Layer.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "Layer.h"
#include "Layer.hpp"

namespace ox {
Layer::Layer(const std::string& name) : debug_name(name) { }
Expand Down
Loading

0 comments on commit f7837f7

Please sign in to comment.