From 0b002c7f2890e5f8b407404abc402561db408a51 Mon Sep 17 00:00:00 2001 From: Flavien Chenu Date: Mon, 25 Mar 2024 13:42:16 +0100 Subject: [PATCH] refactor: rename common directory to shared --- .gitignore | 4 ++-- Makefile | 2 +- core/src/types/Providers.hpp | 2 +- games/snake/export.cpp | 4 ++-- graphics/ncurses/export.cpp | 4 ++-- {common => shared}/README.md | 0 {common => shared}/games/IEntity.hpp | 0 {common => shared}/games/IGame.hpp | 0 {common => shared}/games/IGameProvider.hpp | 0 {common => shared}/games/components/ICollidableComponent.hpp | 0 {common => shared}/games/components/IComponent.hpp | 0 {common => shared}/games/components/IDisplayableComponent.hpp | 0 {common => shared}/games/components/IKeyboardComponent.hpp | 0 {common => shared}/games/components/IPositionComponent.hpp | 0 {common => shared}/games/components/ISoundComponent.hpp | 0 {common => shared}/games/export.cpp.example | 0 {common => shared}/games/types/GameManifest.hpp | 0 {common => shared}/graphics/IGraphicsProvider.hpp | 0 {common => shared}/graphics/ISound.hpp | 0 {common => shared}/graphics/ITexture.hpp | 0 {common => shared}/graphics/events/IEvent.hpp | 0 {common => shared}/graphics/events/key/AKeyEvent.hpp | 0 {common => shared}/graphics/events/key/KeyPressEvent.hpp | 0 {common => shared}/graphics/events/key/KeyReleaseEvent.hpp | 0 .../graphics/events/mouse/AMouseButtonEvent.hpp | 0 {common => shared}/graphics/events/mouse/AMouseEvent.hpp | 0 .../graphics/events/mouse/MouseButtonPressEvent.hpp | 0 .../graphics/events/mouse/MouseButtonReleaseEvent.hpp | 0 {common => shared}/graphics/events/mouse/MouseMoveEvent.hpp | 0 .../graphics/events/window/WindowCloseEvent.hpp | 0 .../graphics/events/window/WindowResizeEvent.hpp | 0 {common => shared}/graphics/export.cpp.example | 0 {common => shared}/graphics/types/EntityProps.hpp | 0 {common => shared}/graphics/types/GraphicsManifest.hpp | 0 {common => shared}/graphics/window/IWindow.hpp | 0 {common => shared}/graphics/window/IWindowIcon.hpp | 0 {common => shared}/pull.sh | 0 {common => shared}/types/Libraries.hpp | 0 {common => shared}/types/UUId.cpp | 0 {common => shared}/types/UUId.hpp | 0 {common => shared}/types/Vector.hpp | 0 {common => shared}/types/types.hpp | 0 42 files changed, 8 insertions(+), 8 deletions(-) rename {common => shared}/README.md (100%) rename {common => shared}/games/IEntity.hpp (100%) rename {common => shared}/games/IGame.hpp (100%) rename {common => shared}/games/IGameProvider.hpp (100%) rename {common => shared}/games/components/ICollidableComponent.hpp (100%) rename {common => shared}/games/components/IComponent.hpp (100%) rename {common => shared}/games/components/IDisplayableComponent.hpp (100%) rename {common => shared}/games/components/IKeyboardComponent.hpp (100%) rename {common => shared}/games/components/IPositionComponent.hpp (100%) rename {common => shared}/games/components/ISoundComponent.hpp (100%) rename {common => shared}/games/export.cpp.example (100%) rename {common => shared}/games/types/GameManifest.hpp (100%) rename {common => shared}/graphics/IGraphicsProvider.hpp (100%) rename {common => shared}/graphics/ISound.hpp (100%) rename {common => shared}/graphics/ITexture.hpp (100%) rename {common => shared}/graphics/events/IEvent.hpp (100%) rename {common => shared}/graphics/events/key/AKeyEvent.hpp (100%) rename {common => shared}/graphics/events/key/KeyPressEvent.hpp (100%) rename {common => shared}/graphics/events/key/KeyReleaseEvent.hpp (100%) rename {common => shared}/graphics/events/mouse/AMouseButtonEvent.hpp (100%) rename {common => shared}/graphics/events/mouse/AMouseEvent.hpp (100%) rename {common => shared}/graphics/events/mouse/MouseButtonPressEvent.hpp (100%) rename {common => shared}/graphics/events/mouse/MouseButtonReleaseEvent.hpp (100%) rename {common => shared}/graphics/events/mouse/MouseMoveEvent.hpp (100%) rename {common => shared}/graphics/events/window/WindowCloseEvent.hpp (100%) rename {common => shared}/graphics/events/window/WindowResizeEvent.hpp (100%) rename {common => shared}/graphics/export.cpp.example (100%) rename {common => shared}/graphics/types/EntityProps.hpp (100%) rename {common => shared}/graphics/types/GraphicsManifest.hpp (100%) rename {common => shared}/graphics/window/IWindow.hpp (100%) rename {common => shared}/graphics/window/IWindowIcon.hpp (100%) rename {common => shared}/pull.sh (100%) rename {common => shared}/types/Libraries.hpp (100%) rename {common => shared}/types/UUId.cpp (100%) rename {common => shared}/types/UUId.hpp (100%) rename {common => shared}/types/Vector.hpp (100%) rename {common => shared}/types/types.hpp (100%) diff --git a/.gitignore b/.gitignore index 5b89776..07f96f0 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,8 @@ cmake-build-debug .idea ## Github -common/.github -common/.gitignore +shared/.github +shared/.gitignore ## Binary arcade diff --git a/Makefile b/Makefile index b0ddc84..d2c78b4 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ tests_run: echo "pass" update: - @cd common && ./pull.sh . + @cd shared && ./pull.sh . .PHONY: all clean fclean re tests_run update DEFAULT_GOAL := all diff --git a/core/src/types/Providers.hpp b/core/src/types/Providers.hpp index 7b7be0b..518f976 100644 --- a/core/src/types/Providers.hpp +++ b/core/src/types/Providers.hpp @@ -7,7 +7,7 @@ #pragma once -#include "common/types/Libraries.hpp" +#include "shared/types/Libraries.hpp" typedef std::vector> GameProviders; typedef std::vector> GraphicsProviders; diff --git a/games/snake/export.cpp b/games/snake/export.cpp index facedea..f2f7054 100644 --- a/games/snake/export.cpp +++ b/games/snake/export.cpp @@ -5,8 +5,8 @@ ** export */ -#include "common/games/IGameProvider.hpp" -#include "common/types/Libraries.hpp" +#include "shared/games/IGameProvider.hpp" +#include "shared/types/Libraries.hpp" extern "C" { shared::types::LibraryType SHARED_LIBRARY_TYPE_GETTER_NAME(void) diff --git a/graphics/ncurses/export.cpp b/graphics/ncurses/export.cpp index 4e047b7..8ba688b 100644 --- a/graphics/ncurses/export.cpp +++ b/graphics/ncurses/export.cpp @@ -5,8 +5,8 @@ ** export */ -#include "common/games/IGameProvider.hpp" -#include "common/types/Libraries.hpp" +#include "shared/games/IGameProvider.hpp" +#include "shared/types/Libraries.hpp" extern "C" { shared::types::LibraryType SHARED_LIBRARY_TYPE_GETTER_NAME(void) diff --git a/common/README.md b/shared/README.md similarity index 100% rename from common/README.md rename to shared/README.md diff --git a/common/games/IEntity.hpp b/shared/games/IEntity.hpp similarity index 100% rename from common/games/IEntity.hpp rename to shared/games/IEntity.hpp diff --git a/common/games/IGame.hpp b/shared/games/IGame.hpp similarity index 100% rename from common/games/IGame.hpp rename to shared/games/IGame.hpp diff --git a/common/games/IGameProvider.hpp b/shared/games/IGameProvider.hpp similarity index 100% rename from common/games/IGameProvider.hpp rename to shared/games/IGameProvider.hpp diff --git a/common/games/components/ICollidableComponent.hpp b/shared/games/components/ICollidableComponent.hpp similarity index 100% rename from common/games/components/ICollidableComponent.hpp rename to shared/games/components/ICollidableComponent.hpp diff --git a/common/games/components/IComponent.hpp b/shared/games/components/IComponent.hpp similarity index 100% rename from common/games/components/IComponent.hpp rename to shared/games/components/IComponent.hpp diff --git a/common/games/components/IDisplayableComponent.hpp b/shared/games/components/IDisplayableComponent.hpp similarity index 100% rename from common/games/components/IDisplayableComponent.hpp rename to shared/games/components/IDisplayableComponent.hpp diff --git a/common/games/components/IKeyboardComponent.hpp b/shared/games/components/IKeyboardComponent.hpp similarity index 100% rename from common/games/components/IKeyboardComponent.hpp rename to shared/games/components/IKeyboardComponent.hpp diff --git a/common/games/components/IPositionComponent.hpp b/shared/games/components/IPositionComponent.hpp similarity index 100% rename from common/games/components/IPositionComponent.hpp rename to shared/games/components/IPositionComponent.hpp diff --git a/common/games/components/ISoundComponent.hpp b/shared/games/components/ISoundComponent.hpp similarity index 100% rename from common/games/components/ISoundComponent.hpp rename to shared/games/components/ISoundComponent.hpp diff --git a/common/games/export.cpp.example b/shared/games/export.cpp.example similarity index 100% rename from common/games/export.cpp.example rename to shared/games/export.cpp.example diff --git a/common/games/types/GameManifest.hpp b/shared/games/types/GameManifest.hpp similarity index 100% rename from common/games/types/GameManifest.hpp rename to shared/games/types/GameManifest.hpp diff --git a/common/graphics/IGraphicsProvider.hpp b/shared/graphics/IGraphicsProvider.hpp similarity index 100% rename from common/graphics/IGraphicsProvider.hpp rename to shared/graphics/IGraphicsProvider.hpp diff --git a/common/graphics/ISound.hpp b/shared/graphics/ISound.hpp similarity index 100% rename from common/graphics/ISound.hpp rename to shared/graphics/ISound.hpp diff --git a/common/graphics/ITexture.hpp b/shared/graphics/ITexture.hpp similarity index 100% rename from common/graphics/ITexture.hpp rename to shared/graphics/ITexture.hpp diff --git a/common/graphics/events/IEvent.hpp b/shared/graphics/events/IEvent.hpp similarity index 100% rename from common/graphics/events/IEvent.hpp rename to shared/graphics/events/IEvent.hpp diff --git a/common/graphics/events/key/AKeyEvent.hpp b/shared/graphics/events/key/AKeyEvent.hpp similarity index 100% rename from common/graphics/events/key/AKeyEvent.hpp rename to shared/graphics/events/key/AKeyEvent.hpp diff --git a/common/graphics/events/key/KeyPressEvent.hpp b/shared/graphics/events/key/KeyPressEvent.hpp similarity index 100% rename from common/graphics/events/key/KeyPressEvent.hpp rename to shared/graphics/events/key/KeyPressEvent.hpp diff --git a/common/graphics/events/key/KeyReleaseEvent.hpp b/shared/graphics/events/key/KeyReleaseEvent.hpp similarity index 100% rename from common/graphics/events/key/KeyReleaseEvent.hpp rename to shared/graphics/events/key/KeyReleaseEvent.hpp diff --git a/common/graphics/events/mouse/AMouseButtonEvent.hpp b/shared/graphics/events/mouse/AMouseButtonEvent.hpp similarity index 100% rename from common/graphics/events/mouse/AMouseButtonEvent.hpp rename to shared/graphics/events/mouse/AMouseButtonEvent.hpp diff --git a/common/graphics/events/mouse/AMouseEvent.hpp b/shared/graphics/events/mouse/AMouseEvent.hpp similarity index 100% rename from common/graphics/events/mouse/AMouseEvent.hpp rename to shared/graphics/events/mouse/AMouseEvent.hpp diff --git a/common/graphics/events/mouse/MouseButtonPressEvent.hpp b/shared/graphics/events/mouse/MouseButtonPressEvent.hpp similarity index 100% rename from common/graphics/events/mouse/MouseButtonPressEvent.hpp rename to shared/graphics/events/mouse/MouseButtonPressEvent.hpp diff --git a/common/graphics/events/mouse/MouseButtonReleaseEvent.hpp b/shared/graphics/events/mouse/MouseButtonReleaseEvent.hpp similarity index 100% rename from common/graphics/events/mouse/MouseButtonReleaseEvent.hpp rename to shared/graphics/events/mouse/MouseButtonReleaseEvent.hpp diff --git a/common/graphics/events/mouse/MouseMoveEvent.hpp b/shared/graphics/events/mouse/MouseMoveEvent.hpp similarity index 100% rename from common/graphics/events/mouse/MouseMoveEvent.hpp rename to shared/graphics/events/mouse/MouseMoveEvent.hpp diff --git a/common/graphics/events/window/WindowCloseEvent.hpp b/shared/graphics/events/window/WindowCloseEvent.hpp similarity index 100% rename from common/graphics/events/window/WindowCloseEvent.hpp rename to shared/graphics/events/window/WindowCloseEvent.hpp diff --git a/common/graphics/events/window/WindowResizeEvent.hpp b/shared/graphics/events/window/WindowResizeEvent.hpp similarity index 100% rename from common/graphics/events/window/WindowResizeEvent.hpp rename to shared/graphics/events/window/WindowResizeEvent.hpp diff --git a/common/graphics/export.cpp.example b/shared/graphics/export.cpp.example similarity index 100% rename from common/graphics/export.cpp.example rename to shared/graphics/export.cpp.example diff --git a/common/graphics/types/EntityProps.hpp b/shared/graphics/types/EntityProps.hpp similarity index 100% rename from common/graphics/types/EntityProps.hpp rename to shared/graphics/types/EntityProps.hpp diff --git a/common/graphics/types/GraphicsManifest.hpp b/shared/graphics/types/GraphicsManifest.hpp similarity index 100% rename from common/graphics/types/GraphicsManifest.hpp rename to shared/graphics/types/GraphicsManifest.hpp diff --git a/common/graphics/window/IWindow.hpp b/shared/graphics/window/IWindow.hpp similarity index 100% rename from common/graphics/window/IWindow.hpp rename to shared/graphics/window/IWindow.hpp diff --git a/common/graphics/window/IWindowIcon.hpp b/shared/graphics/window/IWindowIcon.hpp similarity index 100% rename from common/graphics/window/IWindowIcon.hpp rename to shared/graphics/window/IWindowIcon.hpp diff --git a/common/pull.sh b/shared/pull.sh similarity index 100% rename from common/pull.sh rename to shared/pull.sh diff --git a/common/types/Libraries.hpp b/shared/types/Libraries.hpp similarity index 100% rename from common/types/Libraries.hpp rename to shared/types/Libraries.hpp diff --git a/common/types/UUId.cpp b/shared/types/UUId.cpp similarity index 100% rename from common/types/UUId.cpp rename to shared/types/UUId.cpp diff --git a/common/types/UUId.hpp b/shared/types/UUId.hpp similarity index 100% rename from common/types/UUId.hpp rename to shared/types/UUId.hpp diff --git a/common/types/Vector.hpp b/shared/types/Vector.hpp similarity index 100% rename from common/types/Vector.hpp rename to shared/types/Vector.hpp diff --git a/common/types/types.hpp b/shared/types/types.hpp similarity index 100% rename from common/types/types.hpp rename to shared/types/types.hpp