From b42b0c69a070776156f912fb60e518a301505f70 Mon Sep 17 00:00:00 2001 From: Joey Pollack Date: Mon, 16 May 2022 19:57:28 -0400 Subject: [PATCH] Adds beginnings of the style guide Refactors file and folder names to conform to the style guide --- CMakeLists.txt | 14 +++++------ docs/design/style_guide.txt | 10 ++++++++ src/core/core.cpp | 4 ++-- src/core/core.h | 2 +- src/core/run_mode.h | 2 +- src/graphics/opengl/glGraphics.cpp | 4 ++-- .../{inputManager.cpp => input_manager.cpp} | 2 +- src/input/{inputManager.h => input_manager.h} | 2 +- src/input/keyboard.h | 2 +- .../data_headers/open_font.h} | 0 .../data_headers/roboto_font.h} | 0 .../{dataManager.cpp => data_manager.cpp} | 2 +- .../{dataManager.h => data_manager.h} | 2 +- .../internal_font.cpp} | 8 +++---- .../internal_font.h} | 2 +- src/internal_libs/assets/CMakeLists.txt | 2 +- .../{assetManager.cpp => asset_manager.cpp} | 0 .../{assetManager.h => asset_manager.h} | 4 +++- src/internal_libs/assets/definitions.h | 23 ------------------- .../{assetIndex.cpp => asset_index.cpp} | 6 ++--- .../loaders/{assetIndex.h => asset_index.h} | 14 ++++++----- src/internal_libs/assets/loaders/gameFile.h | 0 src/internal_libs/assets/types/image.h | 10 +++++++- src/internal_libs/gui/console.cpp | 6 ++--- src/internal_libs/gui/file_browser.cpp | 2 +- src/internal_libs/gui/gui.cpp | 2 +- src/internal_libs/gui/luaConsole.cpp | 2 +- src/platform/{keyCodes.h => key_codes.h} | 2 +- src/run_modes/editor/CMakeLists.txt | 8 +++---- src/run_modes/editor/editor.cpp | 10 ++++---- src/run_modes/editor/panel_manager.cpp | 8 +++---- .../{assetBrowser.cpp => asset_browser.cpp} | 2 +- .../{assetBrowser.h => asset_browser.h} | 2 +- ...propertiesView.cpp => properties_view.cpp} | 4 ++-- .../{propertiesView.h => properties_view.h} | 2 +- .../panels/{worldTree.cpp => world_tree.cpp} | 2 +- .../panels/{worldTree.h => world_tree.h} | 2 +- .../panels/{worldView.cpp => world_view.cpp} | 2 +- .../panels/{worldView.h => world_view.h} | 2 +- .../tools/map_editor/panels/tile_set_view.h | 2 +- src/run_modes/testbed/CMakeLists.txt | 2 +- .../scenes/{baseScene.cpp => base_scene.cpp} | 2 +- .../scenes/{baseScene.h => base_scene.h} | 4 ++-- .../{physicsScene.cpp => physics_scene.cpp} | 4 ++-- .../{physicsScene.h => physics_scene.h} | 4 ++-- ...enderScene.cpp => simple_render_scene.cpp} | 6 ++--- ...pleRenderScene.h => simple_render_scene.h} | 4 ++-- src/run_modes/testbed/testbed.cpp | 4 ++-- src/run_modes/testbed/testbed.h | 2 +- src/scripting/coreAPI.cpp | 2 +- .../{scriptManager.cpp => script_manager.cpp} | 4 ++-- .../{scriptManager.h => script_manager.h} | 2 +- ...yFileBuffer.cpp => binary_file_buffer.cpp} | 4 ++-- ...inaryFileBuffer.h => binary_file_buffer.h} | 2 +- .../{frameCounter.cpp => frame_counter.cpp} | 4 ++-- src/utils/{frameCounter.h => frame_counter.h} | 4 ++-- ...ResTimer.cpp => high_resolution_timer.cpp} | 4 ++-- ...highResTimer.h => high_resolution_timer.h} | 2 +- src/utils/logger.cpp | 2 +- src/utils/logger.h | 6 ++--- 60 files changed, 121 insertions(+), 122 deletions(-) create mode 100644 docs/design/style_guide.txt rename src/input/{inputManager.cpp => input_manager.cpp} (99%) rename src/input/{inputManager.h => input_manager.h} (97%) rename src/{graphics/openFontData.h => internal_data/data_headers/open_font.h} (100%) rename src/{graphics/robotoFontData.h => internal_data/data_headers/roboto_font.h} (100%) rename src/internal_data/{dataManager.cpp => data_manager.cpp} (99%) rename src/internal_data/{dataManager.h => data_manager.h} (93%) rename src/{graphics/internalFont.cpp => internal_data/internal_font.cpp} (87%) rename src/{graphics/internalFont.h => internal_data/internal_font.h} (90%) rename src/internal_libs/assets/{assetManager.cpp => asset_manager.cpp} (100%) rename src/internal_libs/assets/{assetManager.h => asset_manager.h} (93%) delete mode 100644 src/internal_libs/assets/definitions.h rename src/internal_libs/assets/loaders/{assetIndex.cpp => asset_index.cpp} (96%) rename src/internal_libs/assets/loaders/{assetIndex.h => asset_index.h} (85%) delete mode 100644 src/internal_libs/assets/loaders/gameFile.h rename src/platform/{keyCodes.h => key_codes.h} (98%) rename src/run_modes/editor/panels/{assetBrowser.cpp => asset_browser.cpp} (99%) rename src/run_modes/editor/panels/{assetBrowser.h => asset_browser.h} (95%) rename src/run_modes/editor/panels/{propertiesView.cpp => properties_view.cpp} (93%) rename src/run_modes/editor/panels/{propertiesView.h => properties_view.h} (93%) rename src/run_modes/editor/panels/{worldTree.cpp => world_tree.cpp} (98%) rename src/run_modes/editor/panels/{worldTree.h => world_tree.h} (94%) rename src/run_modes/editor/panels/{worldView.cpp => world_view.cpp} (97%) rename src/run_modes/editor/panels/{worldView.h => world_view.h} (94%) rename src/run_modes/testbed/scenes/{baseScene.cpp => base_scene.cpp} (96%) rename src/run_modes/testbed/scenes/{baseScene.h => base_scene.h} (90%) rename src/run_modes/testbed/scenes/{physicsScene.cpp => physics_scene.cpp} (99%) rename src/run_modes/testbed/scenes/{physicsScene.h => physics_scene.h} (92%) rename src/run_modes/testbed/scenes/{simpleRenderScene.cpp => simple_render_scene.cpp} (98%) rename src/run_modes/testbed/scenes/{simpleRenderScene.h => simple_render_scene.h} (92%) rename src/scripting/{scriptManager.cpp => script_manager.cpp} (97%) rename src/scripting/{scriptManager.h => script_manager.h} (94%) rename src/utils/{binaryFileBuffer.cpp => binary_file_buffer.cpp} (96%) rename src/utils/{binaryFileBuffer.h => binary_file_buffer.h} (94%) rename src/utils/{frameCounter.cpp => frame_counter.cpp} (96%) rename src/utils/{frameCounter.h => frame_counter.h} (92%) rename src/utils/{highResTimer.cpp => high_resolution_timer.cpp} (93%) rename src/utils/{highResTimer.h => high_resolution_timer.h} (94%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d2dd2c..c73b09d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,10 +63,10 @@ set(LUNARIUM_SRC "src/utils/stb/stb_image_write.cpp" "src/utils/stb/stb_image.cpp" "src/utils/args.cpp" -"src/utils/binaryFileBuffer.cpp" -"src/utils/frameCounter.cpp" +"src/utils/binary_file_buffer.cpp" +"src/utils/frame_counter.cpp" "src/utils/helpers.cpp" -"src/utils/highResTimer.cpp" +"src/utils/high_resolution_timer.cpp" "src/utils/logger.cpp" "src/utils/op_res.cpp" "src/platform/window.cpp" @@ -74,11 +74,11 @@ set(LUNARIUM_SRC "src/graphics/opengl/glGraphics.cpp" "src/graphics/opengl/glText.cpp" "src/graphics/opengl/glShader.cpp" -"src/graphics/internalFont.cpp" -"src/internal_data/dataManager.cpp" +"src/internal_data/internal_font.cpp" +"src/internal_data/data_manager.cpp" "src/input/keyboard.cpp" -"src/input/inputManager.cpp" -"src/scripting/scriptManager.cpp" +"src/input/input_manager.cpp" +"src/scripting/script_manager.cpp" "src/scripting/coreAPI.cpp" ) diff --git a/docs/design/style_guide.txt b/docs/design/style_guide.txt new file mode 100644 index 0000000..9b4f5bc --- /dev/null +++ b/docs/design/style_guide.txt @@ -0,0 +1,10 @@ + + +file and folder names should be all lower-case using underscores to separate words (snake case) (ex: run_mode.h, simple_render_scene.cpp) +All variables should be snake case (lower-case with underscores to separate words) +All method names should be pascal case (no underscores and each word capitalized ex: GetUserName()) +All class and struct names should be pascal case (no underscores and each word capitalized ex: GetUserName()) + +All methods should be defined in a .cpp (no inline methods in headers) +Class member variables should start with m (ex: mUserName) +Struct member variables should NOT start with m (ex: UserName) \ No newline at end of file diff --git a/src/core/core.cpp b/src/core/core.cpp index 2e1c5f9..ade1593 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -22,12 +22,12 @@ // Sub Systems #include -#include +#include #include #include // #include // #include -#include +#include #include namespace lunarium diff --git a/src/core/core.h b/src/core/core.h index 0fc3322..7302364 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include namespace lunarium { diff --git a/src/core/run_mode.h b/src/core/run_mode.h index 92bbfa6..9902b72 100644 --- a/src/core/run_mode.h +++ b/src/core/run_mode.h @@ -10,7 +10,7 @@ #define RUN_MODE_H_ #include -#include +#include #include namespace lunarium diff --git a/src/graphics/opengl/glGraphics.cpp b/src/graphics/opengl/glGraphics.cpp index 6e2efdd..c96efdf 100644 --- a/src/graphics/opengl/glGraphics.cpp +++ b/src/graphics/opengl/glGraphics.cpp @@ -10,7 +10,7 @@ #include "defaultShaders.h" #include #include -#include "../openFontData.h" +#include #include #include #include @@ -32,7 +32,7 @@ namespace lunarium if (type == GL_DEBUG_TYPE_ERROR) { - Logger::GIInfo(LogCategory::GRAPHICS, + Logger::GIError(LogCategory::GRAPHICS, "%s (type: %s, source: %s, severity: %s), message: %s", (type == GL_DEBUG_TYPE_ERROR ? "** GL ERROR **" : ""), OglGraphics::mDebugMsgSources[source].c_str(), diff --git a/src/input/inputManager.cpp b/src/input/input_manager.cpp similarity index 99% rename from src/input/inputManager.cpp rename to src/input/input_manager.cpp index 934975d..f229c76 100644 --- a/src/input/inputManager.cpp +++ b/src/input/input_manager.cpp @@ -9,7 +9,7 @@ ******************************************************************************/ #include -#include "inputManager.h" +#include "input_manager.h" #include #include #include diff --git a/src/input/inputManager.h b/src/input/input_manager.h similarity index 97% rename from src/input/inputManager.h rename to src/input/input_manager.h index e3ad039..35a0e79 100644 --- a/src/input/inputManager.h +++ b/src/input/input_manager.h @@ -1,6 +1,6 @@ /****************************************************************************** -* File - InputManager.h +* File - input_manager.h * Author - Joey Pollack * Date - 2019/11/14 (y/m/d) * Mod Date - 2021/09/08 (y/m/d) diff --git a/src/input/keyboard.h b/src/input/keyboard.h index 8bee03b..6b703f0 100644 --- a/src/input/keyboard.h +++ b/src/input/keyboard.h @@ -14,7 +14,7 @@ #include #include -#include +#include namespace lunarium { diff --git a/src/graphics/openFontData.h b/src/internal_data/data_headers/open_font.h similarity index 100% rename from src/graphics/openFontData.h rename to src/internal_data/data_headers/open_font.h diff --git a/src/graphics/robotoFontData.h b/src/internal_data/data_headers/roboto_font.h similarity index 100% rename from src/graphics/robotoFontData.h rename to src/internal_data/data_headers/roboto_font.h diff --git a/src/internal_data/dataManager.cpp b/src/internal_data/data_manager.cpp similarity index 99% rename from src/internal_data/dataManager.cpp rename to src/internal_data/data_manager.cpp index 2b08850..94dba88 100644 --- a/src/internal_data/dataManager.cpp +++ b/src/internal_data/data_manager.cpp @@ -7,7 +7,7 @@ * UI sounds etc.. ******************************************************************************/ -#include "dataManager.h" +#include "data_manager.h" #include #include diff --git a/src/internal_data/dataManager.h b/src/internal_data/data_manager.h similarity index 93% rename from src/internal_data/dataManager.h rename to src/internal_data/data_manager.h index db8f6d8..6a2b8fe 100644 --- a/src/internal_data/dataManager.h +++ b/src/internal_data/data_manager.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - dataManager.h +* File - data_manager.h * Author - Joey Pollack * Date - 2021/12/01 (y/m/d) * Mod Date - 2021/12/01 (y/m/d) diff --git a/src/graphics/internalFont.cpp b/src/internal_data/internal_font.cpp similarity index 87% rename from src/graphics/internalFont.cpp rename to src/internal_data/internal_font.cpp index bdc96b1..0896786 100644 --- a/src/graphics/internalFont.cpp +++ b/src/internal_data/internal_font.cpp @@ -1,5 +1,5 @@ /****************************************************************************** -* File - InternalFont.h +* File - Internal_font.h * Author - Joey Pollack * Date - 2020/01/08 (y/m/d) * Mod Date - 2021/09/07 (y/m/d) @@ -7,9 +7,9 @@ * ******************************************************************************/ -#include "internalFont.h" -#include "openFontData.h" -#include "robotoFontData.h" +#include "internal_font.h" +#include "data_headers/open_font.h" +#include "data_headers/roboto_font.h" #include #include diff --git a/src/graphics/internalFont.h b/src/internal_data/internal_font.h similarity index 90% rename from src/graphics/internalFont.h rename to src/internal_data/internal_font.h index 42dd9fe..03b1cb9 100644 --- a/src/graphics/internalFont.h +++ b/src/internal_data/internal_font.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - InternalFont.h +* File - internal_font.h * Author - Joey Pollack * Date - 2020/01/08 (y/m/d) * Mod Date - 2020/01/08 (y/m/d) diff --git a/src/internal_libs/assets/CMakeLists.txt b/src/internal_libs/assets/CMakeLists.txt index 0768e80..c212f1c 100644 --- a/src/internal_libs/assets/CMakeLists.txt +++ b/src/internal_libs/assets/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(assets assetManager.cpp types/asset.cpp types/image.cpp loaders/assetIndex.cpp) +add_library(assets asset_manager.cpp types/asset.cpp types/image.cpp loaders/asset_index.cpp) # add utils target_link_directories(assets diff --git a/src/internal_libs/assets/assetManager.cpp b/src/internal_libs/assets/asset_manager.cpp similarity index 100% rename from src/internal_libs/assets/assetManager.cpp rename to src/internal_libs/assets/asset_manager.cpp diff --git a/src/internal_libs/assets/assetManager.h b/src/internal_libs/assets/asset_manager.h similarity index 93% rename from src/internal_libs/assets/assetManager.h rename to src/internal_libs/assets/asset_manager.h index 6455828..3625b33 100644 --- a/src/internal_libs/assets/assetManager.h +++ b/src/internal_libs/assets/asset_manager.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - assetManager.h +* File - asset_manager.h * Author - Joey Pollack * Date - 2021/10/25 (y/m/d) * Mod Date - 2021/10/25 (y/m/d) @@ -9,6 +9,8 @@ #ifndef ASSET_MANAGER_H_ #define ASSET_MANAGER_H_ +#include + #include #include #include diff --git a/src/internal_libs/assets/definitions.h b/src/internal_libs/assets/definitions.h deleted file mode 100644 index 2f77a0d..0000000 --- a/src/internal_libs/assets/definitions.h +++ /dev/null @@ -1,23 +0,0 @@ -/****************************************************************************** -* File - definitions.h -* Author - Joey Pollack -* Date - 2021/09/14 (y/m/d) -* Mod Date - 2021/09/14 (y/m/d) -* Description - Common graphics definitions -******************************************************************************/ - -#ifndef ASSETS_DEFINITIONS_H_ -#define ASSETS_DEFINITIONS_H_ - -namespace lunarium -{ - enum ImageFormat - { - RGB, - RGBA, - BGR, - BGRA - }; -} - -#endif // ASSETS_DEFINITIONS_H_ \ No newline at end of file diff --git a/src/internal_libs/assets/loaders/assetIndex.cpp b/src/internal_libs/assets/loaders/asset_index.cpp similarity index 96% rename from src/internal_libs/assets/loaders/assetIndex.cpp rename to src/internal_libs/assets/loaders/asset_index.cpp index 5c3ae70..01f11ef 100644 --- a/src/internal_libs/assets/loaders/assetIndex.cpp +++ b/src/internal_libs/assets/loaders/asset_index.cpp @@ -1,5 +1,5 @@ /****************************************************************************** -* File - assetIndex.h +* File - asset_index.h * Author - Joey Pollack * Date - 2021/10/25 (y/m/d) * Mod Date - 2021/10/25 (y/m/d) @@ -7,8 +7,8 @@ * the asset index by asset ID or name. ******************************************************************************/ -#include "assetIndex.h" -#include +#include "asset_index.h" +#include namespace lunarium { diff --git a/src/internal_libs/assets/loaders/assetIndex.h b/src/internal_libs/assets/loaders/asset_index.h similarity index 85% rename from src/internal_libs/assets/loaders/assetIndex.h rename to src/internal_libs/assets/loaders/asset_index.h index 54e1e60..2bdebd4 100644 --- a/src/internal_libs/assets/loaders/assetIndex.h +++ b/src/internal_libs/assets/loaders/asset_index.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - assetIndex.h +* File - asset_index.h * Author - Joey Pollack * Date - 2021/10/25 (y/m/d) * Mod Date - 2021/10/25 (y/m/d) @@ -10,11 +10,13 @@ #ifndef ASSET_INDEX_H_ #define ASSET_INDEX_H_ +#include +#include +#include +#include + #include #include -#include -#include -#include namespace lunarium { @@ -26,8 +28,8 @@ namespace lunarium int32_t ID; std::string Name; AssetType Type; - std::string File; - int32_t Offset; + std::string File; // The data file the asset is stored in + u32 Offset; // The offset into the file at which the asset can be found }; public: diff --git a/src/internal_libs/assets/loaders/gameFile.h b/src/internal_libs/assets/loaders/gameFile.h deleted file mode 100644 index e69de29..0000000 diff --git a/src/internal_libs/assets/types/image.h b/src/internal_libs/assets/types/image.h index 9f01cea..de0f84a 100644 --- a/src/internal_libs/assets/types/image.h +++ b/src/internal_libs/assets/types/image.h @@ -10,11 +10,19 @@ #ifndef IMAGE_H_ #define IMAGE_H_ -#include #include "asset.h" namespace lunarium { + + enum ImageFormat + { + RGB, + RGBA, + BGR, + BGRA + }; + class Image : public Asset { public: diff --git a/src/internal_libs/gui/console.cpp b/src/internal_libs/gui/console.cpp index bd76cb4..26bd32d 100644 --- a/src/internal_libs/gui/console.cpp +++ b/src/internal_libs/gui/console.cpp @@ -10,7 +10,7 @@ #include "console.h" #include #include -#include +#include #include #include #include @@ -103,8 +103,8 @@ namespace lunarium for (int i = 0; i < mMsgHistory.size(); i++) { - if ((mMsgHistory[i].find("[OGL_DEBUG]") != std::string::npos && !mbOglDebug) - || (mMsgHistory[i].find("[INFO_VERBOSE]") != std::string::npos && !mbInfoVerbose)) + if ((mMsgHistory[i].find("[GRAPHICS_INTERNAL_DEBUG]") != std::string::npos && !mbOglDebug) + || (mMsgHistory[i].find("[TRACE]") != std::string::npos && !mbInfoVerbose)) { continue; } diff --git a/src/internal_libs/gui/file_browser.cpp b/src/internal_libs/gui/file_browser.cpp index 5b67f54..f8122a3 100644 --- a/src/internal_libs/gui/file_browser.cpp +++ b/src/internal_libs/gui/file_browser.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include "dearimgui/imgui.h" diff --git a/src/internal_libs/gui/gui.cpp b/src/internal_libs/gui/gui.cpp index 1b9f81c..a5adc4c 100644 --- a/src/internal_libs/gui/gui.cpp +++ b/src/internal_libs/gui/gui.cpp @@ -14,7 +14,7 @@ #include "dearimgui/imgui.h" #include "dearimgui/imgui_impl_glfw.h" #include "dearimgui/imgui_impl_opengl3.h" -#include +#include namespace lunarium { diff --git a/src/internal_libs/gui/luaConsole.cpp b/src/internal_libs/gui/luaConsole.cpp index 604085e..10475ac 100644 --- a/src/internal_libs/gui/luaConsole.cpp +++ b/src/internal_libs/gui/luaConsole.cpp @@ -8,7 +8,7 @@ #include "luaConsole.h" #include -#include +#include #include #include #include diff --git a/src/platform/keyCodes.h b/src/platform/key_codes.h similarity index 98% rename from src/platform/keyCodes.h rename to src/platform/key_codes.h index ffc84d5..0e4b3dc 100644 --- a/src/platform/keyCodes.h +++ b/src/platform/key_codes.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - KeyCodes.h +* File - key_codes.h * Author - Joey Pollack * Date - 2019/11/14 (y/m/d) * Mod Date - 2021/09/08 (y/m/d) diff --git a/src/run_modes/editor/CMakeLists.txt b/src/run_modes/editor/CMakeLists.txt index 9a9c338..efbaa9d 100644 --- a/src/run_modes/editor/CMakeLists.txt +++ b/src/run_modes/editor/CMakeLists.txt @@ -6,10 +6,10 @@ set(EDITOR_SRC "panel_manager.cpp" "project.cpp" "panels/about.cpp" -"panels/assetBrowser.cpp" -"panels/worldTree.cpp" -"panels/worldView.cpp" -"panels/propertiesView.cpp" +"panels/asset_browser.cpp" +"panels/world_tree.cpp" +"panels/world_view.cpp" +"panels/properties_view.cpp" "contents/content_manager.cpp" "contents/editor_asset.cpp" "contents/tile_map.cpp" diff --git a/src/run_modes/editor/editor.cpp b/src/run_modes/editor/editor.cpp index c88363c..4a6090a 100644 --- a/src/run_modes/editor/editor.cpp +++ b/src/run_modes/editor/editor.cpp @@ -12,15 +12,15 @@ #include #include #include -#include +#include #include #include // Panels -#include "panels/worldTree.h" -#include "panels/worldView.h" -#include "panels/propertiesView.h" -#include "panels/assetBrowser.h" +#include "panels/world_tree.h" +#include "panels/world_view.h" +#include "panels/properties_view.h" +#include "panels/asset_browser.h" // Tools #include "tools/map_editor/map_editor.h" diff --git a/src/run_modes/editor/panel_manager.cpp b/src/run_modes/editor/panel_manager.cpp index 0a45add..269e287 100644 --- a/src/run_modes/editor/panel_manager.cpp +++ b/src/run_modes/editor/panel_manager.cpp @@ -14,10 +14,10 @@ // Panels #include "panels/about.h" -#include "panels/assetBrowser.h" -#include "panels/worldTree.h" -#include "panels/worldView.h" -#include "panels/propertiesView.h" +#include "panels/asset_browser.h" +#include "panels/world_tree.h" +#include "panels/world_view.h" +#include "panels/properties_view.h" using namespace lunarium::gui; diff --git a/src/run_modes/editor/panels/assetBrowser.cpp b/src/run_modes/editor/panels/asset_browser.cpp similarity index 99% rename from src/run_modes/editor/panels/assetBrowser.cpp rename to src/run_modes/editor/panels/asset_browser.cpp index 9cc9cdd..84eca10 100644 --- a/src/run_modes/editor/panels/assetBrowser.cpp +++ b/src/run_modes/editor/panels/asset_browser.cpp @@ -6,7 +6,7 @@ * Description - Browse and manage project assets ******************************************************************************/ -#include "assetBrowser.h" +#include "asset_browser.h" #include #include diff --git a/src/run_modes/editor/panels/assetBrowser.h b/src/run_modes/editor/panels/asset_browser.h similarity index 95% rename from src/run_modes/editor/panels/assetBrowser.h rename to src/run_modes/editor/panels/asset_browser.h index 0004706..755a512 100644 --- a/src/run_modes/editor/panels/assetBrowser.h +++ b/src/run_modes/editor/panels/asset_browser.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - assetBrowser.h +* File - asset_browser.h * Author - Joey Pollack * Date - 2021/11/10 (y/m/d) * Mod Date - 2021/11/10 (y/m/d) diff --git a/src/run_modes/editor/panels/propertiesView.cpp b/src/run_modes/editor/panels/properties_view.cpp similarity index 93% rename from src/run_modes/editor/panels/propertiesView.cpp rename to src/run_modes/editor/panels/properties_view.cpp index 572112f..d0b8cee 100644 --- a/src/run_modes/editor/panels/propertiesView.cpp +++ b/src/run_modes/editor/panels/properties_view.cpp @@ -1,5 +1,5 @@ /****************************************************************************** -* File - propertiesView.h +* File - properties_view.h * Author - Joey Pollack * Date - 2022/01/26 (y/m/d) * Mod Date - 2022/01/26 (y/m/d) @@ -7,7 +7,7 @@ * object. ******************************************************************************/ -#include "propertiesView.h" +#include "properties_view.h" #include #include diff --git a/src/run_modes/editor/panels/propertiesView.h b/src/run_modes/editor/panels/properties_view.h similarity index 93% rename from src/run_modes/editor/panels/propertiesView.h rename to src/run_modes/editor/panels/properties_view.h index bc5063b..a033533 100644 --- a/src/run_modes/editor/panels/propertiesView.h +++ b/src/run_modes/editor/panels/properties_view.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - propertiesView.h +* File - properties_view.h * Author - Joey Pollack * Date - 2022/01/26 (y/m/d) * Mod Date - 2022/01/26 (y/m/d) diff --git a/src/run_modes/editor/panels/worldTree.cpp b/src/run_modes/editor/panels/world_tree.cpp similarity index 98% rename from src/run_modes/editor/panels/worldTree.cpp rename to src/run_modes/editor/panels/world_tree.cpp index 796c7f4..6697c8e 100644 --- a/src/run_modes/editor/panels/worldTree.cpp +++ b/src/run_modes/editor/panels/world_tree.cpp @@ -6,7 +6,7 @@ * Description - The tree view listing all objects in the world ******************************************************************************/ -#include "worldTree.h" +#include "world_tree.h" #include #include #include diff --git a/src/run_modes/editor/panels/worldTree.h b/src/run_modes/editor/panels/world_tree.h similarity index 94% rename from src/run_modes/editor/panels/worldTree.h rename to src/run_modes/editor/panels/world_tree.h index f7e972c..a68b42f 100644 --- a/src/run_modes/editor/panels/worldTree.h +++ b/src/run_modes/editor/panels/world_tree.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - worldTree.h +* File - world_tree.h * Author - Joey Pollack * Date - 2021/11/04 (y/m/d) * Mod Date - 2021/11/04 (y/m/d) diff --git a/src/run_modes/editor/panels/worldView.cpp b/src/run_modes/editor/panels/world_view.cpp similarity index 97% rename from src/run_modes/editor/panels/worldView.cpp rename to src/run_modes/editor/panels/world_view.cpp index 324c225..884febf 100644 --- a/src/run_modes/editor/panels/worldView.cpp +++ b/src/run_modes/editor/panels/world_view.cpp @@ -6,7 +6,7 @@ * Description - A rendered view of the world ******************************************************************************/ -#include "worldView.h" +#include "world_view.h" #include #include #include diff --git a/src/run_modes/editor/panels/worldView.h b/src/run_modes/editor/panels/world_view.h similarity index 94% rename from src/run_modes/editor/panels/worldView.h rename to src/run_modes/editor/panels/world_view.h index e1b0534..65a90a9 100644 --- a/src/run_modes/editor/panels/worldView.h +++ b/src/run_modes/editor/panels/world_view.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - worldView.h +* File - world_view.h * Author - Joey Pollack * Date - 2022/01/26 (y/m/d) * Mod Date - 2022/01/26 (y/m/d) diff --git a/src/run_modes/editor/tools/map_editor/panels/tile_set_view.h b/src/run_modes/editor/tools/map_editor/panels/tile_set_view.h index b9184d2..6a1692e 100644 --- a/src/run_modes/editor/tools/map_editor/panels/tile_set_view.h +++ b/src/run_modes/editor/tools/map_editor/panels/tile_set_view.h @@ -11,7 +11,7 @@ #include #include -#include +#include #include namespace lunarium { class Image; } diff --git a/src/run_modes/testbed/CMakeLists.txt b/src/run_modes/testbed/CMakeLists.txt index c0a5b77..2492d0a 100644 --- a/src/run_modes/testbed/CMakeLists.txt +++ b/src/run_modes/testbed/CMakeLists.txt @@ -1,6 +1,6 @@ -add_library(testbed testbed.cpp scenes/baseScene.cpp scenes/simpleRenderScene.cpp scenes/physicsScene.cpp) +add_library(testbed testbed.cpp scenes/base_scene.cpp scenes/simple_render_scene.cpp scenes/physics_scene.cpp) target_include_directories(testbed PUBLIC "${PROJECT_BINARY_DIR}" diff --git a/src/run_modes/testbed/scenes/baseScene.cpp b/src/run_modes/testbed/scenes/base_scene.cpp similarity index 96% rename from src/run_modes/testbed/scenes/baseScene.cpp rename to src/run_modes/testbed/scenes/base_scene.cpp index 17faab8..e8d4748 100644 --- a/src/run_modes/testbed/scenes/baseScene.cpp +++ b/src/run_modes/testbed/scenes/base_scene.cpp @@ -6,7 +6,7 @@ * Description - The interface class for tester scenes ******************************************************************************/ -#include "baseScene.h" +#include "base_scene.h" namespace lunarium { diff --git a/src/run_modes/testbed/scenes/baseScene.h b/src/run_modes/testbed/scenes/base_scene.h similarity index 90% rename from src/run_modes/testbed/scenes/baseScene.h rename to src/run_modes/testbed/scenes/base_scene.h index 5c7257e..85f1ab7 100644 --- a/src/run_modes/testbed/scenes/baseScene.h +++ b/src/run_modes/testbed/scenes/base_scene.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - baseScene.h +* File - base_scene.h * Author - Joey Pollack * Date - 2021/10/27 (y/m/d) * Mod Date - 2021/10/27 (y/m/d) @@ -9,7 +9,7 @@ #ifndef BASE_SCENE_H_ #define BASE_SCENE_H_ -#include +#include #include namespace lunarium diff --git a/src/run_modes/testbed/scenes/physicsScene.cpp b/src/run_modes/testbed/scenes/physics_scene.cpp similarity index 99% rename from src/run_modes/testbed/scenes/physicsScene.cpp rename to src/run_modes/testbed/scenes/physics_scene.cpp index cd69256..6206920 100644 --- a/src/run_modes/testbed/scenes/physicsScene.cpp +++ b/src/run_modes/testbed/scenes/physics_scene.cpp @@ -1,12 +1,12 @@ /****************************************************************************** -* File - physicsScene.h +* File - physics_scene.h * Author - Joey Pollack * Date - 2021/10/27 (y/m/d) * Mod Date - 2021/10/27 (y/m/d) * Description - Displays a scene that tests the Box2D physics system ******************************************************************************/ -#include "physicsScene.h" +#include "physics_scene.h" #include #include #include diff --git a/src/run_modes/testbed/scenes/physicsScene.h b/src/run_modes/testbed/scenes/physics_scene.h similarity index 92% rename from src/run_modes/testbed/scenes/physicsScene.h rename to src/run_modes/testbed/scenes/physics_scene.h index dae793f..d06d10c 100644 --- a/src/run_modes/testbed/scenes/physicsScene.h +++ b/src/run_modes/testbed/scenes/physics_scene.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - physicsScene.h +* File - physics_scene.h * Author - Joey Pollack * Date - 2021/10/27 (y/m/d) * Mod Date - 2021/10/27 (y/m/d) @@ -9,7 +9,7 @@ #ifndef PHYSICS_SCENE_H_ #define PHYSICS_SCENE_H_ -#include "baseScene.h" +#include "base_scene.h" #include namespace lunarium diff --git a/src/run_modes/testbed/scenes/simpleRenderScene.cpp b/src/run_modes/testbed/scenes/simple_render_scene.cpp similarity index 98% rename from src/run_modes/testbed/scenes/simpleRenderScene.cpp rename to src/run_modes/testbed/scenes/simple_render_scene.cpp index 755046f..5e555a3 100644 --- a/src/run_modes/testbed/scenes/simpleRenderScene.cpp +++ b/src/run_modes/testbed/scenes/simple_render_scene.cpp @@ -1,17 +1,17 @@ /****************************************************************************** -* File - simpleRenderScene.cpp +* File - simple_render_scene.cpp * Author - Joey Pollack * Date - 2021/10/27 (y/m/d) * Mod Date - 2021/10/27 (y/m/d) * Description - Displays a simple scene that tests basic render features. ******************************************************************************/ -#include "simpleRenderScene.h" +#include "simple_render_scene.h" #include #include #include #include -#include +#include #include #include #include diff --git a/src/run_modes/testbed/scenes/simpleRenderScene.h b/src/run_modes/testbed/scenes/simple_render_scene.h similarity index 92% rename from src/run_modes/testbed/scenes/simpleRenderScene.h rename to src/run_modes/testbed/scenes/simple_render_scene.h index 0626845..558ab64 100644 --- a/src/run_modes/testbed/scenes/simpleRenderScene.h +++ b/src/run_modes/testbed/scenes/simple_render_scene.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - simpleRenderScene.h +* File - simple_render_scene.h * Author - Joey Pollack * Date - 2021/10/27 (y/m/d) * Mod Date - 2021/10/27 (y/m/d) @@ -9,7 +9,7 @@ #ifndef SIMPLE_RENDER_SCENE_H_ #define SIMPLE_RENDER_SCENE_H_ -#include "baseScene.h" +#include "base_scene.h" #include #include diff --git a/src/run_modes/testbed/testbed.cpp b/src/run_modes/testbed/testbed.cpp index 2076fc1..0a11fdd 100644 --- a/src/run_modes/testbed/testbed.cpp +++ b/src/run_modes/testbed/testbed.cpp @@ -7,8 +7,8 @@ ******************************************************************************/ #include "testbed.h" -#include "scenes/simpleRenderScene.h" -#include "scenes/physicsScene.h" +#include "scenes/simple_render_scene.h" +#include "scenes/physics_scene.h" #include #include diff --git a/src/run_modes/testbed/testbed.h b/src/run_modes/testbed/testbed.h index dc5cda9..048bad3 100644 --- a/src/run_modes/testbed/testbed.h +++ b/src/run_modes/testbed/testbed.h @@ -11,7 +11,7 @@ #include #include -#include "scenes/baseScene.h" +#include "scenes/base_scene.h" namespace lunarium { diff --git a/src/scripting/coreAPI.cpp b/src/scripting/coreAPI.cpp index 2d2a65c..9d4e35e 100644 --- a/src/scripting/coreAPI.cpp +++ b/src/scripting/coreAPI.cpp @@ -9,7 +9,7 @@ ******************************************************************************/ #include "coreAPI.h" -#include "scriptManager.h" +#include "script_manager.h" #include #include diff --git a/src/scripting/scriptManager.cpp b/src/scripting/script_manager.cpp similarity index 97% rename from src/scripting/scriptManager.cpp rename to src/scripting/script_manager.cpp index 85e08a6..185f3f8 100644 --- a/src/scripting/scriptManager.cpp +++ b/src/scripting/script_manager.cpp @@ -1,5 +1,5 @@ /****************************************************************************** -* File - scriptManager.cpp +* File - script_manager.cpp * Author - Joey Pollack * Date - 2021/08/30 (y/m/d) * Mod Date - 2021/09/02 (y/m/d) @@ -8,7 +8,7 @@ * history of errors that can be queried. ******************************************************************************/ -#include "scriptManager.h" +#include "script_manager.h" #include #include diff --git a/src/scripting/scriptManager.h b/src/scripting/script_manager.h similarity index 94% rename from src/scripting/scriptManager.h rename to src/scripting/script_manager.h index e450f0d..ebd9d48 100644 --- a/src/scripting/scriptManager.h +++ b/src/scripting/script_manager.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - scriptManager.h +* File - script_manager.h * Author - Joey Pollack * Date - 2021/08/30 (y/m/d) * Mod Date - 2021/09/02 (y/m/d) diff --git a/src/utils/binaryFileBuffer.cpp b/src/utils/binary_file_buffer.cpp similarity index 96% rename from src/utils/binaryFileBuffer.cpp rename to src/utils/binary_file_buffer.cpp index 9212041..e74f930 100644 --- a/src/utils/binaryFileBuffer.cpp +++ b/src/utils/binary_file_buffer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** -* File - BinaryFileBuffer.cpp +* File - binary_file_buffer.cpp * Author - Joey Pollack * Date - 2020/01/24 (y/m/d) * Mod Date - 2020/01/24 (y/m/d) @@ -8,7 +8,7 @@ * large files chunk by chunk. ******************************************************************************/ -#include "binaryFileBuffer.h" +#include "binary_file_buffer.h" #include #include diff --git a/src/utils/binaryFileBuffer.h b/src/utils/binary_file_buffer.h similarity index 94% rename from src/utils/binaryFileBuffer.h rename to src/utils/binary_file_buffer.h index 74b5b2a..790dfc4 100644 --- a/src/utils/binaryFileBuffer.h +++ b/src/utils/binary_file_buffer.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - BinaryFileBuffer.h +* File - binary_file_buffer.h * Author - Joey Pollack * Date - 2020/01/24 (y/m/d) * Mod Date - 2020/01/24 (y/m/d) diff --git a/src/utils/frameCounter.cpp b/src/utils/frame_counter.cpp similarity index 96% rename from src/utils/frameCounter.cpp rename to src/utils/frame_counter.cpp index 9630456..5cd55c1 100644 --- a/src/utils/frameCounter.cpp +++ b/src/utils/frame_counter.cpp @@ -1,12 +1,12 @@ /****************************************************************************** -* File - FrameCounter.cpp +* File - frame_counter.cpp * Author - Joey Pollack * Date - 2021/09/03 (y/m/d) * Mod Date - 2021/09/03 (y/m/d) * Description - Tracks frame statistics ******************************************************************************/ -#include "frameCounter.h" +#include "frame_counter.h" #include namespace lunarium diff --git a/src/utils/frameCounter.h b/src/utils/frame_counter.h similarity index 92% rename from src/utils/frameCounter.h rename to src/utils/frame_counter.h index c44049a..b4df225 100644 --- a/src/utils/frameCounter.h +++ b/src/utils/frame_counter.h @@ -1,5 +1,5 @@ /****************************************************************************** -* File - FrameCounter.h +* File - frame_counter.h * Author - Joey Pollack * Date - 2021/09/03 (y/m/d) * Mod Date - 2021/09/03 (y/m/d) @@ -10,7 +10,7 @@ #define FRAME_COUNTER_H_ #include -#include "highResTimer.h" +#include "high_resolution_timer.h" namespace lunarium { diff --git a/src/utils/highResTimer.cpp b/src/utils/high_resolution_timer.cpp similarity index 93% rename from src/utils/highResTimer.cpp rename to src/utils/high_resolution_timer.cpp index 960d1d0..6be8e17 100644 --- a/src/utils/highResTimer.cpp +++ b/src/utils/high_resolution_timer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** -* Filename: HighResTimer.cpp +* Filename: high_resolution_timer.cpp * Date: 12/06/2010 * Mod. Date: 03/21/2018 * Author: Joseph R. Pollack @@ -8,7 +8,7 @@ * does not include windows.h in the header. ******************************************************************************/ -#include "highResTimer.h" +#include "high_resolution_timer.h" using std::chrono::high_resolution_clock; using std::chrono::duration; diff --git a/src/utils/highResTimer.h b/src/utils/high_resolution_timer.h similarity index 94% rename from src/utils/highResTimer.h rename to src/utils/high_resolution_timer.h index 317796b..a7e799f 100644 --- a/src/utils/highResTimer.h +++ b/src/utils/high_resolution_timer.h @@ -1,5 +1,5 @@ /****************************************************************************** -* Filename: HighResTimer.h +* Filename: high_resolution_timer.h * Date: 12/06/2010 * Mod. Date: 03/21/2018 * Author: Joseph R. Pollack diff --git a/src/utils/logger.cpp b/src/utils/logger.cpp index 88e1d57..0ca9023 100644 --- a/src/utils/logger.cpp +++ b/src/utils/logger.cpp @@ -323,7 +323,7 @@ namespace lunarium va_end(args); } - void Logger::GIInfo(uint32_t LogCategory, const char* message, ...) + void Logger::GIError(uint32_t LogCategory, const char* message, ...) { va_list args; va_start(args, message); diff --git a/src/utils/logger.h b/src/utils/logger.h index 0f30b27..06dd065 100644 --- a/src/utils/logger.h +++ b/src/utils/logger.h @@ -17,9 +17,9 @@ #include #include -// TODO: Remove the dependence on HighResTimer.h +// TODO: Remove the dependence on high_resolution_timer.h // OR re-write HighResTimer with modern timer code -#include "highResTimer.h" +#include "high_resolution_timer.h" // Conflict with a region flag in wingdi.h #undef ERROR @@ -170,7 +170,7 @@ namespace lunarium static void Info(uint32_t LogCategory, const char* message, ...); static void Debug(uint32_t LogCategory, const char* message, ...); static void Trace(uint32_t LogCategory, const char* message, ...); - static void GIInfo(uint32_t LogCategory, const char* message, ...); + static void GIError(uint32_t LogCategory, const char* message, ...); static void GIDebug(uint32_t LogCategory, const char* message, ...); void Log_buff(uint32_t logCategory, uint32_t logLevel);