diff --git a/src/SDLWrapper/Audio.h b/include/SDLWrapper/Audio.h similarity index 81% rename from src/SDLWrapper/Audio.h rename to include/SDLWrapper/Audio.h index 1f0a62f..32196f9 100644 --- a/src/SDLWrapper/Audio.h +++ b/include/SDLWrapper/Audio.h @@ -1,6 +1,6 @@ #pragma once #include "include.h" -#include "begin_code.h" +namespace MiniEngine { class AudioPlayer { public: @@ -17,4 +17,4 @@ private: static _Audio* _sysAudio; static int _sysAudioCounter; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_BlendMode.h b/include/SDLWrapper/BlendMode.h similarity index 56% rename from src/SDLWrapper/_BlendMode.h rename to include/SDLWrapper/BlendMode.h index 23f106c..e7894f3 100644 --- a/src/SDLWrapper/_BlendMode.h +++ b/include/SDLWrapper/BlendMode.h @@ -1,5 +1,6 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { + enum class BlendMode { None, @@ -7,4 +8,5 @@ enum class BlendMode Add, Mod }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/ColorMode.h b/include/SDLWrapper/ColorMode.h similarity index 68% rename from src/SDLWrapper/ColorMode.h rename to include/SDLWrapper/ColorMode.h index cf37d3c..acb649b 100644 --- a/src/SDLWrapper/ColorMode.h +++ b/include/SDLWrapper/ColorMode.h @@ -1,6 +1,8 @@ #pragma once #include "include.h" -#include "begin_code.h" + +namespace MiniEngine { + class ColorMode { public: @@ -8,4 +10,5 @@ public: ColorMode(int R, int G, int B); ColorMode(); }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Cursor.h b/include/SDLWrapper/Cursor.h similarity index 86% rename from src/SDLWrapper/Cursor.h rename to include/SDLWrapper/Cursor.h index 6b45469..a3e1898 100644 --- a/src/SDLWrapper/Cursor.h +++ b/include/SDLWrapper/Cursor.h @@ -1,10 +1,12 @@ #pragma once #include "include.h" -#include "_SystemCursorType.h" +#include "SystemCursorType.h" #include "Point.h" #include "Surface.h" #include "__Plugin.h" -#include "begin_code.h" + +namespace MiniEngine { + class Cursor { public: @@ -30,4 +32,5 @@ private: friend class _internal::Plugin; }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/ErrorViewer.h b/include/SDLWrapper/ErrorViewer.h similarity index 79% rename from src/SDLWrapper/ErrorViewer.h rename to include/SDLWrapper/ErrorViewer.h index 88c7fcc..0389567 100644 --- a/src/SDLWrapper/ErrorViewer.h +++ b/include/SDLWrapper/ErrorViewer.h @@ -1,7 +1,9 @@ #pragma once #include #include -#include "begin_code.h" + +namespace MiniEngine { + class ErrorViewer : public std::exception { public: @@ -11,4 +13,5 @@ public: private: std::string str; }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_FlipMode.h b/include/SDLWrapper/FlipMode.h similarity index 56% rename from src/SDLWrapper/_FlipMode.h rename to include/SDLWrapper/FlipMode.h index cbc7e0a..520d3f8 100644 --- a/src/SDLWrapper/_FlipMode.h +++ b/include/SDLWrapper/FlipMode.h @@ -1,9 +1,12 @@ #pragma once -#include "begin_code.h" + +namespace MiniEngine { + enum class FlipMode { None, Horizontal, Vertical }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Font.h b/include/SDLWrapper/Font.h similarity index 97% rename from src/SDLWrapper/Font.h rename to include/SDLWrapper/Font.h index e5d5d00..f09f9de 100644 --- a/src/SDLWrapper/Font.h +++ b/include/SDLWrapper/Font.h @@ -1,14 +1,14 @@ #pragma once #include "include.h" -#include "_FontStyle.h" -#include "_FontHint.h" +#include "FontStyle.h" +#include "FontHint.h" #include "Rect.h" #include "Surface.h" #include "Texture.h" #include "Renderer.h" #include #include "__Plugin.h" -#include "begin_code.h" +namespace MiniEngine { class Font { public: @@ -122,4 +122,4 @@ private: friend class _internal::Plugin; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_FontHint.h b/include/SDLWrapper/FontHint.h similarity index 60% rename from src/SDLWrapper/_FontHint.h rename to include/SDLWrapper/FontHint.h index 225b76a..6674b9d 100644 --- a/src/SDLWrapper/_FontHint.h +++ b/include/SDLWrapper/FontHint.h @@ -1,5 +1,6 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { + enum class FontHint { Normal, @@ -8,4 +9,5 @@ enum class FontHint None, Error }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_FontStyle.h b/include/SDLWrapper/FontStyle.h similarity index 64% rename from src/SDLWrapper/_FontStyle.h rename to include/SDLWrapper/FontStyle.h index 9b2d32c..5d4092f 100644 --- a/src/SDLWrapper/_FontStyle.h +++ b/include/SDLWrapper/FontStyle.h @@ -1,5 +1,6 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { + enum class FontStyle { Normal, @@ -8,4 +9,5 @@ enum class FontStyle UnderLine, StrikeThrough }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_IMGInitFlag.h b/include/SDLWrapper/IMGInitFlag.h similarity index 60% rename from src/SDLWrapper/_IMGInitFlag.h rename to include/SDLWrapper/IMGInitFlag.h index ed9085e..d9f6ddb 100644 --- a/src/SDLWrapper/_IMGInitFlag.h +++ b/include/SDLWrapper/IMGInitFlag.h @@ -1,5 +1,5 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { enum class IMGInitFlag { JPG, @@ -8,4 +8,4 @@ enum class IMGInitFlag WEBP, ALL }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/IncludeAll.h b/include/SDLWrapper/IncludeAll.h similarity index 100% rename from src/SDLWrapper/IncludeAll.h rename to include/SDLWrapper/IncludeAll.h diff --git a/src/SDLWrapper/Log.h b/include/SDLWrapper/Log.h similarity index 86% rename from src/SDLWrapper/Log.h rename to include/SDLWrapper/Log.h index c4c06cf..748a721 100644 --- a/src/SDLWrapper/Log.h +++ b/include/SDLWrapper/Log.h @@ -1,6 +1,6 @@ #pragma once #include "include.h" -#include "begin_code.h" +namespace MiniEngine { class LogSystem { static void v(const char* fmt,...);/// Verbose @@ -10,4 +10,4 @@ class LogSystem static void e(const char* fmt,...);/// Error static void critical(const char* fmt,...);/// Critical }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/MessageBox.h b/include/SDLWrapper/MessageBox.h similarity index 93% rename from src/SDLWrapper/MessageBox.h rename to include/SDLWrapper/MessageBox.h index 49a7915..fe719e3 100644 --- a/src/SDLWrapper/MessageBox.h +++ b/include/SDLWrapper/MessageBox.h @@ -1,10 +1,10 @@ #pragma once #include "include.h" -#include "_MessageBoxType.h" +#include "MessageBoxType.h" #include #include #include -#include "begin_code.h" +namespace MiniEngine { class WindowMessageBoxButton { public: @@ -42,4 +42,4 @@ public: private: std::vector _vec; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_MessageBoxType.h b/include/SDLWrapper/MessageBoxType.h similarity index 59% rename from src/SDLWrapper/_MessageBoxType.h rename to include/SDLWrapper/MessageBoxType.h index 49fb880..925b83b 100644 --- a/src/SDLWrapper/_MessageBoxType.h +++ b/include/SDLWrapper/MessageBoxType.h @@ -1,9 +1,9 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { enum class MessageBoxType { Error, Warning, Information }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_MixInitFlag.h b/include/SDLWrapper/MixInitFlag.h similarity index 65% rename from src/SDLWrapper/_MixInitFlag.h rename to include/SDLWrapper/MixInitFlag.h index 8f70ef6..9332d83 100644 --- a/src/SDLWrapper/_MixInitFlag.h +++ b/include/SDLWrapper/MixInitFlag.h @@ -1,5 +1,5 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { enum class MixInitFlag { FLAC, @@ -9,4 +9,4 @@ enum class MixInitFlag OGG, FLUIDSYNTH }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Music.h b/include/SDLWrapper/Music.h similarity index 93% rename from src/SDLWrapper/Music.h rename to include/SDLWrapper/Music.h index 1d870a6..4cd5104 100644 --- a/src/SDLWrapper/Music.h +++ b/include/SDLWrapper/Music.h @@ -5,10 +5,10 @@ #include "ErrorViewer.h" #include "Audio.h" #include "RWOP.h" -#include "_MusicType.h" +#include "MusicType.h" #include "__Noncopyable.h" #include "__Plugin.h" -#include "begin_code.h" +namespace MiniEngine { /// Forward Declaration class Music { @@ -54,4 +54,4 @@ private: }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_MusicType.h b/include/SDLWrapper/MusicType.h similarity index 66% rename from src/SDLWrapper/_MusicType.h rename to include/SDLWrapper/MusicType.h index 7a11c5a..2772ce5 100644 --- a/src/SDLWrapper/_MusicType.h +++ b/include/SDLWrapper/MusicType.h @@ -1,8 +1,8 @@ #pragma once #include "include.h" -#include "begin_code.h" +namespace MiniEngine { enum class MusicType { None,CMD,WAV,MOD,MID,OGG,MP3,MP3MAD,FLAC,MODPLUG }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_Platform.h b/include/SDLWrapper/Platform.h similarity index 65% rename from src/SDLWrapper/_Platform.h rename to include/SDLWrapper/Platform.h index 4635e2e..4a07af8 100644 --- a/src/SDLWrapper/_Platform.h +++ b/include/SDLWrapper/Platform.h @@ -1,5 +1,5 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { enum class Platform { Unknown, @@ -9,4 +9,4 @@ enum class Platform iOS, Android }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Point.h b/include/SDLWrapper/Point.h similarity index 77% rename from src/SDLWrapper/Point.h rename to include/SDLWrapper/Point.h index eaa5841..eb7c8b8 100644 --- a/src/SDLWrapper/Point.h +++ b/include/SDLWrapper/Point.h @@ -1,7 +1,8 @@ #pragma once #include "include.h" #include "Rect.h" -#include "begin_code.h" +namespace MiniEngine { + class Point { public: @@ -11,4 +12,5 @@ public: SDL_Point toSDLPoint() const; bool inRect(const Rect& rect) const; }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_PowerState.h b/include/SDLWrapper/PowerState.h similarity index 65% rename from src/SDLWrapper/_PowerState.h rename to include/SDLWrapper/PowerState.h index f066d11..bf103fc 100644 --- a/src/SDLWrapper/_PowerState.h +++ b/include/SDLWrapper/PowerState.h @@ -1,5 +1,5 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { enum class PowerState { Unknown, @@ -8,4 +8,4 @@ enum class PowerState Charging, Charged }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/RGBA.h b/include/SDLWrapper/RGBA.h similarity index 81% rename from src/SDLWrapper/RGBA.h rename to include/SDLWrapper/RGBA.h index f3bf58a..23f1ca7 100644 --- a/src/SDLWrapper/RGBA.h +++ b/include/SDLWrapper/RGBA.h @@ -1,7 +1,8 @@ #pragma once #include "include.h" #include "ColorMode.h" -#include "begin_code.h" + +namespace MiniEngine { class RGBA { @@ -14,4 +15,4 @@ public: ColorMode toColorMode() const; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/RWOP.h b/include/SDLWrapper/RWOP.h similarity index 91% rename from src/SDLWrapper/RWOP.h rename to include/SDLWrapper/RWOP.h index bebefb3..b608bf2 100644 --- a/src/SDLWrapper/RWOP.h +++ b/include/SDLWrapper/RWOP.h @@ -4,7 +4,9 @@ #include #include #include "__Plugin.h" -#include "begin_code.h" + +namespace MiniEngine { + class RWOP { public: @@ -28,4 +30,5 @@ private: friend class _internal::Plugin; }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Rect.h b/include/SDLWrapper/Rect.h similarity index 87% rename from src/SDLWrapper/Rect.h rename to include/SDLWrapper/Rect.h index 016d5ef..8569ede 100644 --- a/src/SDLWrapper/Rect.h +++ b/include/SDLWrapper/Rect.h @@ -1,7 +1,7 @@ #pragma once #include "include.h" -#include "begin_code.h" +namespace MiniEngine { class Rect { @@ -18,4 +18,4 @@ public: Rect getUnion(const Rect&) const; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Renderer.h b/include/SDLWrapper/Renderer.h similarity index 98% rename from src/SDLWrapper/Renderer.h rename to include/SDLWrapper/Renderer.h index b807312..b91e880 100644 --- a/src/SDLWrapper/Renderer.h +++ b/include/SDLWrapper/Renderer.h @@ -1,13 +1,13 @@ #pragma once #include "include.h" -#include "_RendererType.h" -#include "_FlipMode.h" +#include "RendererType.h" +#include "FlipMode.h" #include "Window.h" #include "Surface.h" #include "Texture.h" #include "__Plugin.h" #include -#include "begin_code.h" +namespace MiniEngine { class Renderer { public: @@ -149,4 +149,4 @@ private: friend class _internal::Plugin; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_RendererType.h b/include/SDLWrapper/RendererType.h similarity index 64% rename from src/SDLWrapper/_RendererType.h rename to include/SDLWrapper/RendererType.h index 25b473b..1209e3c 100644 --- a/src/SDLWrapper/_RendererType.h +++ b/include/SDLWrapper/RendererType.h @@ -1,5 +1,6 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { + enum class RendererType { Software, @@ -7,4 +8,5 @@ enum class RendererType PresentSync, TargetTexture }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_SDLInitFlag.h b/include/SDLWrapper/SDLInitFlag.h similarity index 83% rename from src/SDLWrapper/_SDLInitFlag.h rename to include/SDLWrapper/SDLInitFlag.h index dfa67df..aa3a744 100644 --- a/src/SDLWrapper/_SDLInitFlag.h +++ b/include/SDLWrapper/SDLInitFlag.h @@ -1,5 +1,5 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { enum class SDLInitFlag { Timer, @@ -11,4 +11,4 @@ enum class SDLInitFlag Events, All }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/SDLSystem.h b/include/SDLWrapper/SDLSystem.h similarity index 92% rename from src/SDLWrapper/SDLSystem.h rename to include/SDLWrapper/SDLSystem.h index a82648a..549752e 100644 --- a/src/SDLWrapper/SDLSystem.h +++ b/include/SDLWrapper/SDLSystem.h @@ -1,16 +1,16 @@ #pragma once #include "include.h" -#include "_PowerState.h" -#include "_Platform.h" -#include "_SDLInitFlag.h" -#include "_IMGInitFlag.h" -#include "_MixInitFlag.h" +#include "PowerState.h" +#include "Platform.h" +#include "SDLInitFlag.h" +#include "IMGInitFlag.h" +#include "MixInitFlag.h" #include "__Noncopyable.h" #include "__Nonmoveable.h" #include "ErrorViewer.h" #include #include -#include "begin_code.h" +namespace MiniEngine { class SDLSystem : public NonCopyable, public NonMoveable { @@ -73,4 +73,4 @@ private: void _init(Uint32,Uint32,Uint32,bool); void _quit(); }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/SharedLibrary.h b/include/SDLWrapper/SharedLibrary.h similarity index 92% rename from src/SDLWrapper/SharedLibrary.h rename to include/SDLWrapper/SharedLibrary.h index 5438e41..39ab806 100644 --- a/src/SDLWrapper/SharedLibrary.h +++ b/include/SDLWrapper/SharedLibrary.h @@ -3,7 +3,7 @@ #include #include #include -#include "begin_code.h" +namespace MiniEngine { class SharedLibrary { public: @@ -27,4 +27,4 @@ private: void _clear(); std::shared_ptr _obj; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Sound.h b/include/SDLWrapper/Sound.h similarity index 96% rename from src/SDLWrapper/Sound.h rename to include/SDLWrapper/Sound.h index 0cfa621..2cada18 100644 --- a/src/SDLWrapper/Sound.h +++ b/include/SDLWrapper/Sound.h @@ -6,7 +6,7 @@ #include "ErrorViewer.h" #include "RWOP.h" #include "__Plugin.h" -#include "begin_code.h" +namespace MiniEngine { class Sound { public: @@ -67,4 +67,4 @@ public: Channel playSound(Sound sound, int loops); Channel fadeIn(Sound sound, int loops, int ms); }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Surface.h b/include/SDLWrapper/Surface.h similarity index 97% rename from src/SDLWrapper/Surface.h rename to include/SDLWrapper/Surface.h index 0d53988..b55e319 100644 --- a/src/SDLWrapper/Surface.h +++ b/include/SDLWrapper/Surface.h @@ -1,12 +1,14 @@ #pragma once #include "include.h" -#include "_BlendMode.h" +#include "BlendMode.h" #include "RGBA.h" #include "Point.h" #include "RWOP.h" #include "ErrorViewer.h" #include "__Plugin.h" -#include "begin_code.h" + +namespace MiniEngine { + class Surface { public: @@ -86,4 +88,4 @@ private: friend class _internal::Plugin; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_SystemCursorType.h b/include/SDLWrapper/SystemCursorType.h similarity index 72% rename from src/SDLWrapper/_SystemCursorType.h rename to include/SDLWrapper/SystemCursorType.h index 1bc9c64..a384de7 100644 --- a/src/SDLWrapper/_SystemCursorType.h +++ b/include/SDLWrapper/SystemCursorType.h @@ -1,5 +1,6 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { + enum class SystemCursorType { Arrow, Ibeam, CrossHair, @@ -7,4 +8,5 @@ enum class SystemCursorType SizeNWSE, SizeNESW, SizeWE, SizeNS, SizeAll, No, Hand }; -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Texture.h b/include/SDLWrapper/Texture.h similarity index 92% rename from src/SDLWrapper/Texture.h rename to include/SDLWrapper/Texture.h index 3c0dcfc..1538532 100644 --- a/src/SDLWrapper/Texture.h +++ b/include/SDLWrapper/Texture.h @@ -3,10 +3,11 @@ #include "Rect.h" #include "RGBA.h" #include "ColorMode.h" -#include "_BlendMode.h" +#include "BlendMode.h" #include "__Plugin.h" #include -#include "begin_code.h" + +namespace MiniEngine { class Texture { @@ -45,4 +46,4 @@ private: friend class _internal::Plugin; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Timer.h b/include/SDLWrapper/Timer.h similarity index 96% rename from src/SDLWrapper/Timer.h rename to include/SDLWrapper/Timer.h index dc93aa8..f1fc93a 100644 --- a/src/SDLWrapper/Timer.h +++ b/include/SDLWrapper/Timer.h @@ -1,7 +1,7 @@ #pragma once #include "include.h" #include -#include "begin_code.h" +namespace MiniEngine { Uint32 _global_timer_executor(Uint32 interval,void* param); class Timer @@ -48,4 +48,4 @@ private: /// Reserved Variable For Template variable Parameter bool _delete_on_disable; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Window.h b/include/SDLWrapper/Window.h similarity index 93% rename from src/SDLWrapper/Window.h rename to include/SDLWrapper/Window.h index 70ac461..4a3593e 100644 --- a/src/SDLWrapper/Window.h +++ b/include/SDLWrapper/Window.h @@ -1,12 +1,12 @@ #pragma once #include "include.h" -#include "_WindowType.h" -#include "_MessageBoxType.h" +#include "WindowType.h" +#include "MessageBoxType.h" #include "ErrorViewer.h" #include "MessageBox.h" #include "Surface.h" #include "__Plugin.h" -#include "begin_code.h" +namespace MiniEngine { class Window { public: @@ -65,4 +65,4 @@ private: friend class Renderer; friend class _internal::Plugin; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_WindowType.h b/include/SDLWrapper/WindowType.h similarity index 83% rename from src/SDLWrapper/_WindowType.h rename to include/SDLWrapper/WindowType.h index 6d5ae48..f3aae3a 100644 --- a/src/SDLWrapper/_WindowType.h +++ b/include/SDLWrapper/WindowType.h @@ -1,5 +1,5 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { enum class WindowType { FullScreen, OpenGL, Shown, Hidden, @@ -9,4 +9,4 @@ enum class WindowType MouseCapture, AlwaysOnTop, SkipTaskBar, Utility, ToolTip, PopUpMenu }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/__Noncopyable.h b/include/SDLWrapper/__Noncopyable.h similarity index 78% rename from src/SDLWrapper/__Noncopyable.h rename to include/SDLWrapper/__Noncopyable.h index c2c820c..a9a31d2 100644 --- a/src/SDLWrapper/__Noncopyable.h +++ b/include/SDLWrapper/__Noncopyable.h @@ -1,5 +1,5 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { class NonCopyable { protected: @@ -8,4 +8,4 @@ protected: NonCopyable(const NonCopyable&) = delete; NonCopyable& operator = (const NonCopyable&) = delete; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/__Nonmoveable.h b/include/SDLWrapper/__Nonmoveable.h similarity index 77% rename from src/SDLWrapper/__Nonmoveable.h rename to include/SDLWrapper/__Nonmoveable.h index 0d5bca4..9123e0a 100644 --- a/src/SDLWrapper/__Nonmoveable.h +++ b/include/SDLWrapper/__Nonmoveable.h @@ -1,5 +1,5 @@ #pragma once -#include "begin_code.h" +namespace MiniEngine { class NonMoveable { public: @@ -8,4 +8,4 @@ public: NonMoveable(NonMoveable&&) =delete; NonMoveable& operator = (NonMoveable&&)=delete; }; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/__Plugin.h b/include/SDLWrapper/__Plugin.h similarity index 91% rename from src/SDLWrapper/__Plugin.h rename to include/SDLWrapper/__Plugin.h index c9430ff..2c9f344 100644 --- a/src/SDLWrapper/__Plugin.h +++ b/include/SDLWrapper/__Plugin.h @@ -1,5 +1,7 @@ #pragma once -#include "begin_code.h" + +namespace MiniEngine { + namespace _internal { @@ -33,4 +35,5 @@ public: }; } -#include "end_code.h" + +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/include.h b/include/SDLWrapper/include.h similarity index 69% rename from src/SDLWrapper/include.h rename to include/SDLWrapper/include.h index 80376ce..e7d3864 100644 --- a/src/SDLWrapper/include.h +++ b/include/SDLWrapper/include.h @@ -1,11 +1,11 @@ #pragma once /// Include SDL Library Headers. -#include +#include "SDL2/SDL.h" #undef main -#include -#include -#include +#include "SDL2/SDL_image.h" +#include "SDL2/SDL_ttf.h" +#include "SDL2/SDL_mixer.h" /// Version Requiring Definition #define _MINIENGINE_SDL_VERSION_ATLEAST(X,Y,Z) SDL_VERSION_ATLEAST(X,Y,Z) diff --git a/src/SDLWrapper/Audio.cpp b/src/SDLWrapper/Audio.cpp index a55bbde..378415c 100644 --- a/src/SDLWrapper/Audio.cpp +++ b/src/SDLWrapper/Audio.cpp @@ -1,5 +1,5 @@ -#include "Audio.h" -#include "begin_code.h" +#include "SDLWrapper/Audio.h" +namespace MiniEngine { AudioPlayer::AudioPlayer() { if (!_sysAudioCounter) @@ -30,4 +30,4 @@ AudioPlayer::_Audio::~_Audio() AudioPlayer::_Audio* AudioPlayer::_sysAudio = nullptr; int AudioPlayer::_sysAudioCounter = 0; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/ColorMode.cpp b/src/SDLWrapper/ColorMode.cpp index c148e2e..9dd9b9d 100644 --- a/src/SDLWrapper/ColorMode.cpp +++ b/src/SDLWrapper/ColorMode.cpp @@ -1,5 +1,5 @@ -#include "ColorMode.h" -#include "begin_code.h" +#include "SDLWrapper/ColorMode.h" +namespace MiniEngine { ColorMode::ColorMode(int R, int G, int B) { r = R; @@ -11,4 +11,4 @@ ColorMode::ColorMode() { r = g = b = 0; } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Cursor.cpp b/src/SDLWrapper/Cursor.cpp index 30db39f..4e0b471 100644 --- a/src/SDLWrapper/Cursor.cpp +++ b/src/SDLWrapper/Cursor.cpp @@ -1,6 +1,6 @@ -#include "Cursor.h" +#include "SDLWrapper/Cursor.h" #include "_caster.h" -#include "begin_code.h" +namespace MiniEngine { //private void Cursor::_set(SDL_Cursor* p) { @@ -78,4 +78,4 @@ void Cursor::activate() SDL_SetCursor(_get()); } } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/ErrorViewer.cpp b/src/SDLWrapper/ErrorViewer.cpp index 8d48fe5..351d1da 100644 --- a/src/SDLWrapper/ErrorViewer.cpp +++ b/src/SDLWrapper/ErrorViewer.cpp @@ -1,6 +1,6 @@ -#include "ErrorViewer.h" -#include "include.h" -#include "begin_code.h" +#include "SDLWrapper/ErrorViewer.h" +#include "SDLWrapper/include.h" +namespace MiniEngine { void ErrorViewer::fetch() { str = SDL_GetError(); @@ -15,4 +15,4 @@ const char * ErrorViewer::what() const noexcept { return str.c_str(); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Font.cpp b/src/SDLWrapper/Font.cpp index 763c954..ed8f38d 100644 --- a/src/SDLWrapper/Font.cpp +++ b/src/SDLWrapper/Font.cpp @@ -1,6 +1,6 @@ -#include "Font.h" +#include "SDLWrapper/Font.h" #include "_caster.h" -#include "begin_code.h" +namespace MiniEngine { // private void Font::_set(TTF_Font* p) { @@ -399,4 +399,4 @@ void Font::release() { _clear(); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Log.cpp b/src/SDLWrapper/Log.cpp index 75d21c2..95aab88 100644 --- a/src/SDLWrapper/Log.cpp +++ b/src/SDLWrapper/Log.cpp @@ -1,5 +1,5 @@ -#include "Log.h" -#include "begin_code.h" +#include "SDLWrapper/Log.h" +namespace MiniEngine { void LogSystem::d(const char* fmt,...) { va_list ap; @@ -47,4 +47,4 @@ void LogSystem::critical(const char* fmt,...) SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION,SDL_LOG_PRIORITY_CRITICAL,fmt,ap); va_end(ap); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/MessageBox.cpp b/src/SDLWrapper/MessageBox.cpp index 2ad609d..9fd0bfe 100644 --- a/src/SDLWrapper/MessageBox.cpp +++ b/src/SDLWrapper/MessageBox.cpp @@ -1,5 +1,5 @@ -#include "MessageBox.h" -#include "begin_code.h" +#include "SDLWrapper/MessageBox.h" +namespace MiniEngine { WindowMessageBoxButton::WindowMessageBoxButton() { _hitoption=0; @@ -63,4 +63,4 @@ const WindowMessageBoxButton& WindowMessageBox::getButtonConst(int index) const { return _vec.at(index); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Music.cpp b/src/SDLWrapper/Music.cpp index 8e9410b..2267720 100644 --- a/src/SDLWrapper/Music.cpp +++ b/src/SDLWrapper/Music.cpp @@ -1,6 +1,6 @@ -#include "Music.h" +#include "SDLWrapper/Music.h" #include "_caster.h" -#include "begin_code.h" +namespace MiniEngine { //private void Music::_set(Mix_Music* p) { @@ -126,4 +126,4 @@ int MusicPlayer::setPosition(double second) return Mix_SetMusicPosition(second); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Point.cpp b/src/SDLWrapper/Point.cpp index 11ac926..d18b396 100644 --- a/src/SDLWrapper/Point.cpp +++ b/src/SDLWrapper/Point.cpp @@ -1,5 +1,5 @@ -#include "Point.h" -#include "begin_code.h" +#include "SDLWrapper/Point.h" +namespace MiniEngine { Point::Point(int X, int Y) { @@ -27,4 +27,4 @@ bool Point::inRect(const Rect& rect) const return ( SDL_PointInRect(&p, &r) == SDL_TRUE ); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/RGBA.cpp b/src/SDLWrapper/RGBA.cpp index c01b83e..8836d83 100644 --- a/src/SDLWrapper/RGBA.cpp +++ b/src/SDLWrapper/RGBA.cpp @@ -1,5 +1,5 @@ -#include "RGBA.h" -#include "begin_code.h" +#include "SDLWrapper/RGBA.h" +namespace MiniEngine { RGBA::RGBA(int R, int G, int B, int A) { r = R; @@ -35,4 +35,4 @@ ColorMode RGBA::toColorMode() const { return ColorMode(r, g, b); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/RWOP.cpp b/src/SDLWrapper/RWOP.cpp index 52b9e0b..9391b6a 100644 --- a/src/SDLWrapper/RWOP.cpp +++ b/src/SDLWrapper/RWOP.cpp @@ -1,5 +1,5 @@ -#include "RWOP.h" -#include "begin_code.h" +#include "SDLWrapper/RWOP.h" +namespace MiniEngine { // private void RWOP::_set(SDL_RWops* p) { @@ -45,4 +45,4 @@ void RWOP::release() { _clear(); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Rect.cpp b/src/SDLWrapper/Rect.cpp index a835b3c..2dd594d 100644 --- a/src/SDLWrapper/Rect.cpp +++ b/src/SDLWrapper/Rect.cpp @@ -1,6 +1,6 @@ -#include "Rect.h" +#include "SDLWrapper/Rect.h" -#include "begin_code.h" +namespace MiniEngine { Rect::Rect(int X, int Y, int W, int H) { @@ -69,4 +69,4 @@ Rect Rect::getUnion(const Rect& r) const return Rect(c); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Renderer.cpp b/src/SDLWrapper/Renderer.cpp index 796defe..75925dd 100644 --- a/src/SDLWrapper/Renderer.cpp +++ b/src/SDLWrapper/Renderer.cpp @@ -1,6 +1,6 @@ -#include "Renderer.h" +#include "SDLWrapper/Renderer.h" #include "_caster.h" -#include "begin_code.h" +namespace MiniEngine { //private void Renderer::_set(SDL_Renderer* p) @@ -516,4 +516,4 @@ int Renderer::GetDriversNum() return SDL_GetNumRenderDrivers(); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/SDLSystem.cpp b/src/SDLWrapper/SDLSystem.cpp index 3562d35..2c59850 100644 --- a/src/SDLWrapper/SDLSystem.cpp +++ b/src/SDLWrapper/SDLSystem.cpp @@ -1,6 +1,6 @@ -#include "SDLSystem.h" +#include "SDLWrapper/SDLSystem.h" #include "_caster.h" -#include "begin_code.h" +namespace MiniEngine { // private void SDLSystem::_init(Uint32 sdl_flag, Uint32 img_flag, Uint32 mix_flag, bool init_ttf) { @@ -300,4 +300,4 @@ bool SDLSystem::HasClipboardText() return SDL_HasClipboardText()==SDL_TRUE; } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/SharedLibrary.cpp b/src/SDLWrapper/SharedLibrary.cpp index 82bea93..ba7f705 100644 --- a/src/SDLWrapper/SharedLibrary.cpp +++ b/src/SDLWrapper/SharedLibrary.cpp @@ -1,5 +1,5 @@ -#include "SharedLibrary.h" -#include "begin_code.h" +#include "SDLWrapper/SharedLibrary.h" +namespace MiniEngine { //private void* SharedLibrary::_get() const { @@ -64,4 +64,4 @@ void SharedLibrary::release() { _clear(); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Sound.cpp b/src/SDLWrapper/Sound.cpp index 9184525..b510fa2 100644 --- a/src/SDLWrapper/Sound.cpp +++ b/src/SDLWrapper/Sound.cpp @@ -1,5 +1,5 @@ -#include "Sound.h" -#include "begin_code.h" +#include "SDLWrapper/Sound.h" +namespace MiniEngine { //private void Sound::_set(Mix_Chunk* p) { @@ -170,4 +170,4 @@ Channel SoundPlayer::fadeIn(Sound sound, int loops, int ms) c.fadeIn(sound,loops,ms); return c; } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Surface.cpp b/src/SDLWrapper/Surface.cpp index d215bbd..b8e12dd 100644 --- a/src/SDLWrapper/Surface.cpp +++ b/src/SDLWrapper/Surface.cpp @@ -1,6 +1,6 @@ -#include "Surface.h" +#include "SDLWrapper/Surface.h" #include "_caster.h" -#include "begin_code.h" +namespace MiniEngine { //private void Surface::_set(SDL_Surface* p) { @@ -356,4 +356,4 @@ SDL_Surface* Surface::getRawPointer() { return _get(); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Texture.cpp b/src/SDLWrapper/Texture.cpp index 6ac916e..c024e3d 100644 --- a/src/SDLWrapper/Texture.cpp +++ b/src/SDLWrapper/Texture.cpp @@ -1,6 +1,6 @@ -#include "Texture.h" +#include "SDLWrapper/Texture.h" #include "_caster.h" -#include "begin_code.h" +namespace MiniEngine { //private void Texture::_set(SDL_Texture* p) { @@ -123,4 +123,4 @@ void Texture::release() { _clear(); } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Timer.cpp b/src/SDLWrapper/Timer.cpp index 9c799a2..51aaf49 100644 --- a/src/SDLWrapper/Timer.cpp +++ b/src/SDLWrapper/Timer.cpp @@ -1,5 +1,5 @@ -#include "Timer.h" -#include "begin_code.h" +#include "SDLWrapper/Timer.h" +namespace MiniEngine { /// Global Executor For class Timer Uint32 _global_timer_executor(Uint32 interval,void* param) { @@ -84,4 +84,4 @@ void Timer::_delete_delegator(std::function* param) { delete param; } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/Window.cpp b/src/SDLWrapper/Window.cpp index 0ffd1e1..6bc82d9 100644 --- a/src/SDLWrapper/Window.cpp +++ b/src/SDLWrapper/Window.cpp @@ -1,6 +1,6 @@ -#include "Window.h" +#include "SDLWrapper/Window.h" #include "_caster.h" -#include "begin_code.h" +namespace MiniEngine { //private void Window::_set(SDL_Window* p) { @@ -247,4 +247,4 @@ bool Window::isScreenKeyboardShown() { return SDL_IsScreenKeyboardShown(_get())==SDL_TRUE; } -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/__Optional.h b/src/SDLWrapper/__Optional.h index f9978b1..3090934 100644 --- a/src/SDLWrapper/__Optional.h +++ b/src/SDLWrapper/__Optional.h @@ -1,10 +1,10 @@ #pragma once #include -#include "begin_code.h" +namespace MiniEngine { template using Optional = std::experimental::optional; using BadOptionalAccess = std::experimental::bad_optional_access; constexpr std::experimental::nullopt_t NullOpt = std::experimental::nullopt; -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_caster.cpp b/src/SDLWrapper/_caster.cpp index 7db951c..2346ccc 100644 --- a/src/SDLWrapper/_caster.cpp +++ b/src/SDLWrapper/_caster.cpp @@ -1,5 +1,5 @@ #include "_caster.h" -#include "begin_code.h" +namespace MiniEngine { namespace _internal { BlendMode getBlendModeFromSDLBlendMode(SDL_BlendMode mode) @@ -342,4 +342,4 @@ Mix_MusicType getMixMusicTypeFromMusicType(MusicType type) }/// End of namespace _internal -#include "end_code.h" +} /// End of namespace MiniEngine diff --git a/src/SDLWrapper/_caster.h b/src/SDLWrapper/_caster.h index 4583215..7b0a3e8 100644 --- a/src/SDLWrapper/_caster.h +++ b/src/SDLWrapper/_caster.h @@ -1,16 +1,16 @@ #pragma once -#include "include.h" -#include "_BlendMode.h" -#include "_WindowType.h" -#include "_SystemCursorType.h" -#include "_FontStyle.h" -#include "_FlipMode.h" -#include "_SDLInitFlag.h" -#include "_IMGInitFlag.h" -#include "_MixInitFlag.h" -#include "_MusicType.h" +#include "SDLWrapper/include.h" +#include "SDLWrapper/BlendMode.h" +#include "SDLWrapper/WindowType.h" +#include "SDLWrapper/SystemCursorType.h" +#include "SDLWrapper/FontStyle.h" +#include "SDLWrapper/FlipMode.h" +#include "SDLWrapper/SDLInitFlag.h" +#include "SDLWrapper/IMGInitFlag.h" +#include "SDLWrapper/MixInitFlag.h" +#include "SDLWrapper/MusicType.h" #include -#include "begin_code.h" +namespace MiniEngine { namespace _internal { BlendMode getBlendModeFromSDLBlendMode(SDL_BlendMode mode); @@ -28,4 +28,4 @@ int getIntFromMixInitFlag(MixInitFlag flag); MusicType getMusicTypeFromMixMusicType(Mix_MusicType); Mix_MusicType getMixMusicTypeFromMusicType(MusicType); }/// End of namespace _internal -#include "end_code.h" +}/// End of namespace MiniEngine diff --git a/src/SDLWrapper/begin_code.h b/src/SDLWrapper/begin_code.h deleted file mode 100644 index 49c8e78..0000000 --- a/src/SDLWrapper/begin_code.h +++ /dev/null @@ -1,3 +0,0 @@ -/// Include this file at the beginning of MiniEngine headers and sources. -namespace MiniEngine -{ diff --git a/src/SDLWrapper/end_code.h b/src/SDLWrapper/end_code.h deleted file mode 100644 index ad0bd81..0000000 --- a/src/SDLWrapper/end_code.h +++ /dev/null @@ -1,3 +0,0 @@ -/// Include this file at the end of MiniEngine headers and sources. -} /// End of namespace MiniEngine -/// NOTICE: If you see an compile error here, there must be some unclosed "{" !