Moving files, make things easy.

This commit is contained in:
Kirigaya Kazuto 2018-03-04 15:10:49 +08:00
parent 7e8c6f7c1e
commit a09c723a98
64 changed files with 205 additions and 177 deletions

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "begin_code.h" namespace MiniEngine {
class AudioPlayer class AudioPlayer
{ {
public: public:
@ -17,4 +17,4 @@ private:
static _Audio* _sysAudio; static _Audio* _sysAudio;
static int _sysAudioCounter; static int _sysAudioCounter;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class BlendMode enum class BlendMode
{ {
None, None,
@ -7,4 +8,5 @@ enum class BlendMode
Add, Add,
Mod Mod
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,6 +1,8 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "begin_code.h"
namespace MiniEngine {
class ColorMode class ColorMode
{ {
public: public:
@ -8,4 +10,5 @@ public:
ColorMode(int R, int G, int B); ColorMode(int R, int G, int B);
ColorMode(); ColorMode();
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,10 +1,12 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "_SystemCursorType.h" #include "SystemCursorType.h"
#include "Point.h" #include "Point.h"
#include "Surface.h" #include "Surface.h"
#include "__Plugin.h" #include "__Plugin.h"
#include "begin_code.h"
namespace MiniEngine {
class Cursor class Cursor
{ {
public: public:
@ -30,4 +32,5 @@ private:
friend class _internal::Plugin; friend class _internal::Plugin;
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,7 +1,9 @@
#pragma once #pragma once
#include <exception> #include <exception>
#include <string> #include <string>
#include "begin_code.h"
namespace MiniEngine {
class ErrorViewer : public std::exception class ErrorViewer : public std::exception
{ {
public: public:
@ -11,4 +13,5 @@ public:
private: private:
std::string str; std::string str;
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,9 +1,12 @@
#pragma once #pragma once
#include "begin_code.h"
namespace MiniEngine {
enum class FlipMode enum class FlipMode
{ {
None, None,
Horizontal, Horizontal,
Vertical Vertical
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,14 +1,14 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "_FontStyle.h" #include "FontStyle.h"
#include "_FontHint.h" #include "FontHint.h"
#include "Rect.h" #include "Rect.h"
#include "Surface.h" #include "Surface.h"
#include "Texture.h" #include "Texture.h"
#include "Renderer.h" #include "Renderer.h"
#include <vector> #include <vector>
#include "__Plugin.h" #include "__Plugin.h"
#include "begin_code.h" namespace MiniEngine {
class Font class Font
{ {
public: public:
@ -122,4 +122,4 @@ private:
friend class _internal::Plugin; friend class _internal::Plugin;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class FontHint enum class FontHint
{ {
Normal, Normal,
@ -8,4 +9,5 @@ enum class FontHint
None, None,
Error Error
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class FontStyle enum class FontStyle
{ {
Normal, Normal,
@ -8,4 +9,5 @@ enum class FontStyle
UnderLine, UnderLine,
StrikeThrough StrikeThrough
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class IMGInitFlag enum class IMGInitFlag
{ {
JPG, JPG,
@ -8,4 +8,4 @@ enum class IMGInitFlag
WEBP, WEBP,
ALL ALL
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "begin_code.h" namespace MiniEngine {
class LogSystem class LogSystem
{ {
static void v(const char* fmt,...);/// Verbose static void v(const char* fmt,...);/// Verbose
@ -10,4 +10,4 @@ class LogSystem
static void e(const char* fmt,...);/// Error static void e(const char* fmt,...);/// Error
static void critical(const char* fmt,...);/// Critical static void critical(const char* fmt,...);/// Critical
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,10 +1,10 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "_MessageBoxType.h" #include "MessageBoxType.h"
#include <string> #include <string>
#include <functional> #include <functional>
#include <vector> #include <vector>
#include "begin_code.h" namespace MiniEngine {
class WindowMessageBoxButton class WindowMessageBoxButton
{ {
public: public:
@ -42,4 +42,4 @@ public:
private: private:
std::vector<WindowMessageBoxButton> _vec; std::vector<WindowMessageBoxButton> _vec;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,9 +1,9 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class MessageBoxType enum class MessageBoxType
{ {
Error, Error,
Warning, Warning,
Information Information
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class MixInitFlag enum class MixInitFlag
{ {
FLAC, FLAC,
@ -9,4 +9,4 @@ enum class MixInitFlag
OGG, OGG,
FLUIDSYNTH FLUIDSYNTH
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -5,10 +5,10 @@
#include "ErrorViewer.h" #include "ErrorViewer.h"
#include "Audio.h" #include "Audio.h"
#include "RWOP.h" #include "RWOP.h"
#include "_MusicType.h" #include "MusicType.h"
#include "__Noncopyable.h" #include "__Noncopyable.h"
#include "__Plugin.h" #include "__Plugin.h"
#include "begin_code.h" namespace MiniEngine {
/// Forward Declaration /// Forward Declaration
class Music class Music
{ {
@ -54,4 +54,4 @@ private:
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,8 +1,8 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "begin_code.h" namespace MiniEngine {
enum class MusicType enum class MusicType
{ {
None,CMD,WAV,MOD,MID,OGG,MP3,MP3MAD,FLAC,MODPLUG None,CMD,WAV,MOD,MID,OGG,MP3,MP3MAD,FLAC,MODPLUG
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class Platform enum class Platform
{ {
Unknown, Unknown,
@ -9,4 +9,4 @@ enum class Platform
iOS, iOS,
Android Android
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,7 +1,8 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "Rect.h" #include "Rect.h"
#include "begin_code.h" namespace MiniEngine {
class Point class Point
{ {
public: public:
@ -11,4 +12,5 @@ public:
SDL_Point toSDLPoint() const; SDL_Point toSDLPoint() const;
bool inRect(const Rect& rect) const; bool inRect(const Rect& rect) const;
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class PowerState enum class PowerState
{ {
Unknown, Unknown,
@ -8,4 +8,4 @@ enum class PowerState
Charging, Charging,
Charged Charged
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,7 +1,8 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "ColorMode.h" #include "ColorMode.h"
#include "begin_code.h"
namespace MiniEngine {
class RGBA class RGBA
{ {
@ -14,4 +15,4 @@ public:
ColorMode toColorMode() const; ColorMode toColorMode() const;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -4,7 +4,9 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include "__Plugin.h" #include "__Plugin.h"
#include "begin_code.h"
namespace MiniEngine {
class RWOP class RWOP
{ {
public: public:
@ -28,4 +30,5 @@ private:
friend class _internal::Plugin; friend class _internal::Plugin;
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "begin_code.h" namespace MiniEngine {
class Rect class Rect
{ {
@ -18,4 +18,4 @@ public:
Rect getUnion(const Rect&) const; Rect getUnion(const Rect&) const;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,13 +1,13 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "_RendererType.h" #include "RendererType.h"
#include "_FlipMode.h" #include "FlipMode.h"
#include "Window.h" #include "Window.h"
#include "Surface.h" #include "Surface.h"
#include "Texture.h" #include "Texture.h"
#include "__Plugin.h" #include "__Plugin.h"
#include <initializer_list> #include <initializer_list>
#include "begin_code.h" namespace MiniEngine {
class Renderer class Renderer
{ {
public: public:
@ -149,4 +149,4 @@ private:
friend class _internal::Plugin; friend class _internal::Plugin;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class RendererType enum class RendererType
{ {
Software, Software,
@ -7,4 +8,5 @@ enum class RendererType
PresentSync, PresentSync,
TargetTexture TargetTexture
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class SDLInitFlag enum class SDLInitFlag
{ {
Timer, Timer,
@ -11,4 +11,4 @@ enum class SDLInitFlag
Events, Events,
All All
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,16 +1,16 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "_PowerState.h" #include "PowerState.h"
#include "_Platform.h" #include "Platform.h"
#include "_SDLInitFlag.h" #include "SDLInitFlag.h"
#include "_IMGInitFlag.h" #include "IMGInitFlag.h"
#include "_MixInitFlag.h" #include "MixInitFlag.h"
#include "__Noncopyable.h" #include "__Noncopyable.h"
#include "__Nonmoveable.h" #include "__Nonmoveable.h"
#include "ErrorViewer.h" #include "ErrorViewer.h"
#include <tuple> #include <tuple>
#include <string> #include <string>
#include "begin_code.h" namespace MiniEngine {
class SDLSystem : public NonCopyable, public NonMoveable class SDLSystem : public NonCopyable, public NonMoveable
{ {
@ -73,4 +73,4 @@ private:
void _init(Uint32,Uint32,Uint32,bool); void _init(Uint32,Uint32,Uint32,bool);
void _quit(); void _quit();
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -3,7 +3,7 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include <functional> #include <functional>
#include "begin_code.h" namespace MiniEngine {
class SharedLibrary class SharedLibrary
{ {
public: public:
@ -27,4 +27,4 @@ private:
void _clear(); void _clear();
std::shared_ptr<void> _obj; std::shared_ptr<void> _obj;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -6,7 +6,7 @@
#include "ErrorViewer.h" #include "ErrorViewer.h"
#include "RWOP.h" #include "RWOP.h"
#include "__Plugin.h" #include "__Plugin.h"
#include "begin_code.h" namespace MiniEngine {
class Sound class Sound
{ {
public: public:
@ -67,4 +67,4 @@ public:
Channel playSound(Sound sound, int loops); Channel playSound(Sound sound, int loops);
Channel fadeIn(Sound sound, int loops, int ms); Channel fadeIn(Sound sound, int loops, int ms);
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,12 +1,14 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "_BlendMode.h" #include "BlendMode.h"
#include "RGBA.h" #include "RGBA.h"
#include "Point.h" #include "Point.h"
#include "RWOP.h" #include "RWOP.h"
#include "ErrorViewer.h" #include "ErrorViewer.h"
#include "__Plugin.h" #include "__Plugin.h"
#include "begin_code.h"
namespace MiniEngine {
class Surface class Surface
{ {
public: public:
@ -86,4 +88,4 @@ private:
friend class _internal::Plugin; friend class _internal::Plugin;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class SystemCursorType enum class SystemCursorType
{ {
Arrow, Ibeam, CrossHair, Arrow, Ibeam, CrossHair,
@ -7,4 +8,5 @@ enum class SystemCursorType
SizeNWSE, SizeNESW, SizeWE, SizeNS, SizeAll, SizeNWSE, SizeNESW, SizeWE, SizeNS, SizeAll,
No, Hand No, Hand
}; };
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -3,10 +3,11 @@
#include "Rect.h" #include "Rect.h"
#include "RGBA.h" #include "RGBA.h"
#include "ColorMode.h" #include "ColorMode.h"
#include "_BlendMode.h" #include "BlendMode.h"
#include "__Plugin.h" #include "__Plugin.h"
#include <memory> #include <memory>
#include "begin_code.h"
namespace MiniEngine {
class Texture class Texture
{ {
@ -45,4 +46,4 @@ private:
friend class _internal::Plugin; friend class _internal::Plugin;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include <functional> #include <functional>
#include "begin_code.h" namespace MiniEngine {
Uint32 _global_timer_executor(Uint32 interval,void* param); Uint32 _global_timer_executor(Uint32 interval,void* param);
class Timer class Timer
@ -48,4 +48,4 @@ private:
/// Reserved Variable For Template variable Parameter /// Reserved Variable For Template variable Parameter
bool _delete_on_disable; bool _delete_on_disable;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,12 +1,12 @@
#pragma once #pragma once
#include "include.h" #include "include.h"
#include "_WindowType.h" #include "WindowType.h"
#include "_MessageBoxType.h" #include "MessageBoxType.h"
#include "ErrorViewer.h" #include "ErrorViewer.h"
#include "MessageBox.h" #include "MessageBox.h"
#include "Surface.h" #include "Surface.h"
#include "__Plugin.h" #include "__Plugin.h"
#include "begin_code.h" namespace MiniEngine {
class Window class Window
{ {
public: public:
@ -65,4 +65,4 @@ private:
friend class Renderer; friend class Renderer;
friend class _internal::Plugin; friend class _internal::Plugin;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
enum class WindowType enum class WindowType
{ {
FullScreen, OpenGL, Shown, Hidden, FullScreen, OpenGL, Shown, Hidden,
@ -9,4 +9,4 @@ enum class WindowType
MouseCapture, AlwaysOnTop, SkipTaskBar, MouseCapture, AlwaysOnTop, SkipTaskBar,
Utility, ToolTip, PopUpMenu Utility, ToolTip, PopUpMenu
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
class NonCopyable class NonCopyable
{ {
protected: protected:
@ -8,4 +8,4 @@ protected:
NonCopyable(const NonCopyable&) = delete; NonCopyable(const NonCopyable&) = delete;
NonCopyable& operator = (const NonCopyable&) = delete; NonCopyable& operator = (const NonCopyable&) = delete;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#include "begin_code.h" namespace MiniEngine {
class NonMoveable class NonMoveable
{ {
public: public:
@ -8,4 +8,4 @@ public:
NonMoveable(NonMoveable&&) =delete; NonMoveable(NonMoveable&&) =delete;
NonMoveable& operator = (NonMoveable&&)=delete; NonMoveable& operator = (NonMoveable&&)=delete;
}; };
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include "begin_code.h"
namespace MiniEngine {
namespace _internal namespace _internal
{ {
@ -33,4 +35,5 @@ public:
}; };
} }
#include "end_code.h"
} /// End of namespace MiniEngine

View File

@ -1,11 +1,11 @@
#pragma once #pragma once
/// Include SDL Library Headers. /// Include SDL Library Headers.
#include <SDL2/SDL.h> #include "SDL2/SDL.h"
#undef main #undef main
#include <SDL2/SDL_image.h> #include "SDL2/SDL_image.h"
#include <SDL2/SDL_ttf.h> #include "SDL2/SDL_ttf.h"
#include <SDL2/SDL_mixer.h> #include "SDL2/SDL_mixer.h"
/// Version Requiring Definition /// Version Requiring Definition
#define _MINIENGINE_SDL_VERSION_ATLEAST(X,Y,Z) SDL_VERSION_ATLEAST(X,Y,Z) #define _MINIENGINE_SDL_VERSION_ATLEAST(X,Y,Z) SDL_VERSION_ATLEAST(X,Y,Z)

View File

@ -1,5 +1,5 @@
#include "Audio.h" #include "SDLWrapper/Audio.h"
#include "begin_code.h" namespace MiniEngine {
AudioPlayer::AudioPlayer() AudioPlayer::AudioPlayer()
{ {
if (!_sysAudioCounter) if (!_sysAudioCounter)
@ -30,4 +30,4 @@ AudioPlayer::_Audio::~_Audio()
AudioPlayer::_Audio* AudioPlayer::_sysAudio = nullptr; AudioPlayer::_Audio* AudioPlayer::_sysAudio = nullptr;
int AudioPlayer::_sysAudioCounter = 0; int AudioPlayer::_sysAudioCounter = 0;
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#include "ColorMode.h" #include "SDLWrapper/ColorMode.h"
#include "begin_code.h" namespace MiniEngine {
ColorMode::ColorMode(int R, int G, int B) ColorMode::ColorMode(int R, int G, int B)
{ {
r = R; r = R;
@ -11,4 +11,4 @@ ColorMode::ColorMode()
{ {
r = g = b = 0; r = g = b = 0;
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,6 +1,6 @@
#include "Cursor.h" #include "SDLWrapper/Cursor.h"
#include "_caster.h" #include "_caster.h"
#include "begin_code.h" namespace MiniEngine {
//private //private
void Cursor::_set(SDL_Cursor* p) void Cursor::_set(SDL_Cursor* p)
{ {
@ -78,4 +78,4 @@ void Cursor::activate()
SDL_SetCursor(_get()); SDL_SetCursor(_get());
} }
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,6 +1,6 @@
#include "ErrorViewer.h" #include "SDLWrapper/ErrorViewer.h"
#include "include.h" #include "SDLWrapper/include.h"
#include "begin_code.h" namespace MiniEngine {
void ErrorViewer::fetch() void ErrorViewer::fetch()
{ {
str = SDL_GetError(); str = SDL_GetError();
@ -15,4 +15,4 @@ const char * ErrorViewer::what() const noexcept
{ {
return str.c_str(); return str.c_str();
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,6 +1,6 @@
#include "Font.h" #include "SDLWrapper/Font.h"
#include "_caster.h" #include "_caster.h"
#include "begin_code.h" namespace MiniEngine {
// private // private
void Font::_set(TTF_Font* p) void Font::_set(TTF_Font* p)
{ {
@ -399,4 +399,4 @@ void Font::release()
{ {
_clear(); _clear();
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#include "Log.h" #include "SDLWrapper/Log.h"
#include "begin_code.h" namespace MiniEngine {
void LogSystem::d(const char* fmt,...) void LogSystem::d(const char* fmt,...)
{ {
va_list ap; 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); SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION,SDL_LOG_PRIORITY_CRITICAL,fmt,ap);
va_end(ap); va_end(ap);
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#include "MessageBox.h" #include "SDLWrapper/MessageBox.h"
#include "begin_code.h" namespace MiniEngine {
WindowMessageBoxButton::WindowMessageBoxButton() WindowMessageBoxButton::WindowMessageBoxButton()
{ {
_hitoption=0; _hitoption=0;
@ -63,4 +63,4 @@ const WindowMessageBoxButton& WindowMessageBox::getButtonConst(int index) const
{ {
return _vec.at(index); return _vec.at(index);
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,6 +1,6 @@
#include "Music.h" #include "SDLWrapper/Music.h"
#include "_caster.h" #include "_caster.h"
#include "begin_code.h" namespace MiniEngine {
//private //private
void Music::_set(Mix_Music* p) void Music::_set(Mix_Music* p)
{ {
@ -126,4 +126,4 @@ int MusicPlayer::setPosition(double second)
return Mix_SetMusicPosition(second); return Mix_SetMusicPosition(second);
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#include "Point.h" #include "SDLWrapper/Point.h"
#include "begin_code.h" namespace MiniEngine {
Point::Point(int X, int Y) Point::Point(int X, int Y)
{ {
@ -27,4 +27,4 @@ bool Point::inRect(const Rect& rect) const
return ( SDL_PointInRect(&p, &r) == SDL_TRUE ); return ( SDL_PointInRect(&p, &r) == SDL_TRUE );
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#include "RGBA.h" #include "SDLWrapper/RGBA.h"
#include "begin_code.h" namespace MiniEngine {
RGBA::RGBA(int R, int G, int B, int A) RGBA::RGBA(int R, int G, int B, int A)
{ {
r = R; r = R;
@ -35,4 +35,4 @@ ColorMode RGBA::toColorMode() const
{ {
return ColorMode(r, g, b); return ColorMode(r, g, b);
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#include "RWOP.h" #include "SDLWrapper/RWOP.h"
#include "begin_code.h" namespace MiniEngine {
// private // private
void RWOP::_set(SDL_RWops* p) void RWOP::_set(SDL_RWops* p)
{ {
@ -45,4 +45,4 @@ void RWOP::release()
{ {
_clear(); _clear();
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -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) Rect::Rect(int X, int Y, int W, int H)
{ {
@ -69,4 +69,4 @@ Rect Rect::getUnion(const Rect& r) const
return Rect(c); return Rect(c);
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,6 +1,6 @@
#include "Renderer.h" #include "SDLWrapper/Renderer.h"
#include "_caster.h" #include "_caster.h"
#include "begin_code.h" namespace MiniEngine {
//private //private
void Renderer::_set(SDL_Renderer* p) void Renderer::_set(SDL_Renderer* p)
@ -516,4 +516,4 @@ int Renderer::GetDriversNum()
return SDL_GetNumRenderDrivers(); return SDL_GetNumRenderDrivers();
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,6 +1,6 @@
#include "SDLSystem.h" #include "SDLWrapper/SDLSystem.h"
#include "_caster.h" #include "_caster.h"
#include "begin_code.h" namespace MiniEngine {
// private // private
void SDLSystem::_init(Uint32 sdl_flag, Uint32 img_flag, Uint32 mix_flag, bool init_ttf) 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; return SDL_HasClipboardText()==SDL_TRUE;
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#include "SharedLibrary.h" #include "SDLWrapper/SharedLibrary.h"
#include "begin_code.h" namespace MiniEngine {
//private //private
void* SharedLibrary::_get() const void* SharedLibrary::_get() const
{ {
@ -64,4 +64,4 @@ void SharedLibrary::release()
{ {
_clear(); _clear();
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#include "Sound.h" #include "SDLWrapper/Sound.h"
#include "begin_code.h" namespace MiniEngine {
//private //private
void Sound::_set(Mix_Chunk* p) void Sound::_set(Mix_Chunk* p)
{ {
@ -170,4 +170,4 @@ Channel SoundPlayer::fadeIn(Sound sound, int loops, int ms)
c.fadeIn(sound,loops,ms); c.fadeIn(sound,loops,ms);
return c; return c;
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,6 +1,6 @@
#include "Surface.h" #include "SDLWrapper/Surface.h"
#include "_caster.h" #include "_caster.h"
#include "begin_code.h" namespace MiniEngine {
//private //private
void Surface::_set(SDL_Surface* p) void Surface::_set(SDL_Surface* p)
{ {
@ -356,4 +356,4 @@ SDL_Surface* Surface::getRawPointer()
{ {
return _get(); return _get();
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,6 +1,6 @@
#include "Texture.h" #include "SDLWrapper/Texture.h"
#include "_caster.h" #include "_caster.h"
#include "begin_code.h" namespace MiniEngine {
//private //private
void Texture::_set(SDL_Texture* p) void Texture::_set(SDL_Texture* p)
{ {
@ -123,4 +123,4 @@ void Texture::release()
{ {
_clear(); _clear();
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#include "Timer.h" #include "SDLWrapper/Timer.h"
#include "begin_code.h" namespace MiniEngine {
/// Global Executor For class Timer /// Global Executor For class Timer
Uint32 _global_timer_executor(Uint32 interval,void* param) Uint32 _global_timer_executor(Uint32 interval,void* param)
{ {
@ -84,4 +84,4 @@ void Timer::_delete_delegator(std::function<Uint32(Uint32)>* param)
{ {
delete param; delete param;
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,6 +1,6 @@
#include "Window.h" #include "SDLWrapper/Window.h"
#include "_caster.h" #include "_caster.h"
#include "begin_code.h" namespace MiniEngine {
//private //private
void Window::_set(SDL_Window* p) void Window::_set(SDL_Window* p)
{ {
@ -247,4 +247,4 @@ bool Window::isScreenKeyboardShown()
{ {
return SDL_IsScreenKeyboardShown(_get())==SDL_TRUE; return SDL_IsScreenKeyboardShown(_get())==SDL_TRUE;
} }
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,10 +1,10 @@
#pragma once #pragma once
#include <experimental/optional> #include <experimental/optional>
#include "begin_code.h" namespace MiniEngine {
template<typename T> template<typename T>
using Optional = std::experimental::optional<T>; using Optional = std::experimental::optional<T>;
using BadOptionalAccess = std::experimental::bad_optional_access; using BadOptionalAccess = std::experimental::bad_optional_access;
constexpr std::experimental::nullopt_t NullOpt = std::experimental::nullopt; constexpr std::experimental::nullopt_t NullOpt = std::experimental::nullopt;
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,5 +1,5 @@
#include "_caster.h" #include "_caster.h"
#include "begin_code.h" namespace MiniEngine {
namespace _internal namespace _internal
{ {
BlendMode getBlendModeFromSDLBlendMode(SDL_BlendMode mode) BlendMode getBlendModeFromSDLBlendMode(SDL_BlendMode mode)
@ -342,4 +342,4 @@ Mix_MusicType getMixMusicTypeFromMusicType(MusicType type)
}/// End of namespace _internal }/// End of namespace _internal
#include "end_code.h" } /// End of namespace MiniEngine

View File

@ -1,16 +1,16 @@
#pragma once #pragma once
#include "include.h" #include "SDLWrapper/include.h"
#include "_BlendMode.h" #include "SDLWrapper/BlendMode.h"
#include "_WindowType.h" #include "SDLWrapper/WindowType.h"
#include "_SystemCursorType.h" #include "SDLWrapper/SystemCursorType.h"
#include "_FontStyle.h" #include "SDLWrapper/FontStyle.h"
#include "_FlipMode.h" #include "SDLWrapper/FlipMode.h"
#include "_SDLInitFlag.h" #include "SDLWrapper/SDLInitFlag.h"
#include "_IMGInitFlag.h" #include "SDLWrapper/IMGInitFlag.h"
#include "_MixInitFlag.h" #include "SDLWrapper/MixInitFlag.h"
#include "_MusicType.h" #include "SDLWrapper/MusicType.h"
#include <vector> #include <vector>
#include "begin_code.h" namespace MiniEngine {
namespace _internal namespace _internal
{ {
BlendMode getBlendModeFromSDLBlendMode(SDL_BlendMode mode); BlendMode getBlendModeFromSDLBlendMode(SDL_BlendMode mode);
@ -28,4 +28,4 @@ int getIntFromMixInitFlag(MixInitFlag flag);
MusicType getMusicTypeFromMixMusicType(Mix_MusicType); MusicType getMusicTypeFromMixMusicType(Mix_MusicType);
Mix_MusicType getMixMusicTypeFromMusicType(MusicType); Mix_MusicType getMixMusicTypeFromMusicType(MusicType);
}/// End of namespace _internal }/// End of namespace _internal
#include "end_code.h" }/// End of namespace MiniEngine

View File

@ -1,3 +0,0 @@
/// Include this file at the beginning of MiniEngine headers and sources.
namespace MiniEngine
{

View File

@ -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 "{" !