diff options
author | chai <chaifix@163.com> | 2018-10-17 07:50:46 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-17 07:50:46 +0800 |
commit | dce7b78db8a7071217b1439c4b7f6a341ce37cf1 (patch) | |
tree | 27740a75015d3bd42a5901fbc845e3e86f2bf8c5 | |
parent | 5534828032730762f8c1e4daf924b466fffb8be0 (diff) |
*格式化代码
95 files changed, 360 insertions, 299 deletions
diff --git a/bin/Jin.exe b/bin/Jin.exe Binary files differindex dae29ff..02ebb92 100644 --- a/bin/Jin.exe +++ b/bin/Jin.exe diff --git a/bin/font.ttf b/bin/font.ttf Binary files differdeleted file mode 100644 index ac64abe..0000000 --- a/bin/font.ttf +++ /dev/null diff --git a/bin/img.png b/bin/img.png Binary files differdeleted file mode 100644 index 0d11f85..0000000 --- a/bin/img.png +++ /dev/null diff --git a/bin/jin.exe b/bin/jin.exe Binary files differindex dae29ff..02ebb92 100644 --- a/bin/jin.exe +++ b/bin/jin.exe diff --git a/build/vc++/libjin/libjin.vcxproj b/build/vc++/libjin/libjin.vcxproj index 77a3fff..f8d4a17 100644 --- a/build/vc++/libjin/libjin.vcxproj +++ b/build/vc++/libjin/libjin.vcxproj @@ -145,7 +145,6 @@ <ClInclude Include="..\..\..\src\libjin\Audio\Source.h" /> <ClInclude Include="..\..\..\src\libjin\Common\Array.hpp" /> <ClInclude Include="..\..\..\src\libjin\Common\common.h" /> - <ClInclude Include="..\..\..\src\libjin\Common\Data.h" /> <ClInclude Include="..\..\..\src\libjin\Common\Exception.h" /> <ClInclude Include="..\..\..\src\libjin\Common\Object.h" /> <ClInclude Include="..\..\..\src\libjin\Common\Singleton.hpp" /> @@ -170,11 +169,11 @@ <ClInclude Include="..\..\..\src\libjin\Graphics\Image.h" /> <ClInclude Include="..\..\..\src\libjin\Graphics\Mesh.h" /> <ClInclude Include="..\..\..\src\libjin\Graphics\OpenGL.h" /> - <ClInclude Include="..\..\..\src\libjin\Graphics\Shader.h" /> - <ClInclude Include="..\..\..\src\libjin\Graphics\Shaders\base.shader.h" /> - <ClInclude Include="..\..\..\src\libjin\Graphics\Shaders\default.shader.h" /> - <ClInclude Include="..\..\..\src\libjin\Graphics\Shaders\font.shader.h" /> - <ClInclude Include="..\..\..\src\libjin\Graphics\Shaders\texture.shader.h" /> + <ClInclude Include="..\..\..\src\libjin\Graphics\Shader\base.shader.h" /> + <ClInclude Include="..\..\..\src\libjin\Graphics\Shader\default.shader.h" /> + <ClInclude Include="..\..\..\src\libjin\Graphics\Shader\font.shader.h" /> + <ClInclude Include="..\..\..\src\libjin\Graphics\Shader\Shader.h" /> + <ClInclude Include="..\..\..\src\libjin\Graphics\Shader\texture.shader.h" /> <ClInclude Include="..\..\..\src\libjin\Graphics\Shapes.h" /> <ClInclude Include="..\..\..\src\libjin\Graphics\Sprite.h" /> <ClInclude Include="..\..\..\src\libjin\Graphics\Texture.h" /> @@ -231,7 +230,7 @@ <ClCompile Include="..\..\..\src\libjin\Graphics\Image.cpp" /> <ClCompile Include="..\..\..\src\libjin\Graphics\Mesh.cpp" /> <ClCompile Include="..\..\..\src\libjin\Graphics\OpenGL.cpp" /> - <ClCompile Include="..\..\..\src\libjin\Graphics\Shader.cpp" /> + <ClCompile Include="..\..\..\src\libjin\Graphics\Shader\Shader.cpp" /> <ClCompile Include="..\..\..\src\libjin\Graphics\Shapes.cpp" /> <ClCompile Include="..\..\..\src\libjin\Graphics\Sprite.cpp" /> <ClCompile Include="..\..\..\src\libjin\Graphics\Texture.cpp" /> diff --git a/build/vc++/libjin/libjin.vcxproj.filters b/build/vc++/libjin/libjin.vcxproj.filters index 6030f3c..e50f56a 100644 --- a/build/vc++/libjin/libjin.vcxproj.filters +++ b/build/vc++/libjin/libjin.vcxproj.filters @@ -55,9 +55,6 @@ <Filter Include="Source\Utils"> <UniqueIdentifier>{6259760f-501a-4b52-b9a1-4abb4d788a99}</UniqueIdentifier> </Filter> - <Filter Include="Source\Graphics\Shaders"> - <UniqueIdentifier>{bed786b4-6d8a-4c8d-b04f-67eb0f7435b8}</UniqueIdentifier> - </Filter> <Filter Include="Source\3rdparty\ogl2d"> <UniqueIdentifier>{c582e534-7e96-484c-ae1b-a9e7962ab6c2}</UniqueIdentifier> </Filter> @@ -70,6 +67,9 @@ <Filter Include="Source\3rdparty\base64"> <UniqueIdentifier>{086e2fe7-2366-4d52-b059-212ada075da4}</UniqueIdentifier> </Filter> + <Filter Include="Source\Graphics\Shader"> + <UniqueIdentifier>{bed786b4-6d8a-4c8d-b04f-67eb0f7435b8}</UniqueIdentifier> + </Filter> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\src\libjin\modules.h"> @@ -198,27 +198,12 @@ <ClInclude Include="..\..\..\src\libjin\Common\common.h"> <Filter>Source\Common</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\libjin\Graphics\Shaders\base.shader.h"> - <Filter>Source\Graphics\Shaders</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\libjin\Graphics\Shaders\default.shader.h"> - <Filter>Source\Graphics\Shaders</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\libjin\Graphics\Shaders\font.shader.h"> - <Filter>Source\Graphics\Shaders</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\libjin\Common\Data.h"> - <Filter>Source\Common</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\libjin\Common\types.h"> <Filter>Source\Common</Filter> </ClInclude> <ClInclude Include="..\..\..\src\libjin\3rdparty\ogl\OpenGL.h"> <Filter>Source\3rdparty\ogl2d</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\libjin\Graphics\Shaders\texture.shader.h"> - <Filter>Source\Graphics\Shaders</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\libjin\Game\Game.h"> <Filter>Source\Game</Filter> </ClInclude> @@ -267,9 +252,6 @@ <ClInclude Include="..\..\..\src\libjin\Graphics\OpenGL.h"> <Filter>Source\Graphics</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\libjin\Graphics\Shader.h"> - <Filter>Source\Graphics</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\libjin\Graphics\Shapes.h"> <Filter>Source\Graphics</Filter> </ClInclude> @@ -283,6 +265,21 @@ <Filter>Source\Graphics</Filter> </ClInclude> <ClInclude Include="..\..\..\src\libjin\3rdparty\base64\base64.h" /> + <ClInclude Include="..\..\..\src\libjin\Graphics\Shader\base.shader.h"> + <Filter>Source\Graphics\Shader</Filter> + </ClInclude> + <ClInclude Include="..\..\..\src\libjin\Graphics\Shader\default.shader.h"> + <Filter>Source\Graphics\Shader</Filter> + </ClInclude> + <ClInclude Include="..\..\..\src\libjin\Graphics\Shader\font.shader.h"> + <Filter>Source\Graphics\Shader</Filter> + </ClInclude> + <ClInclude Include="..\..\..\src\libjin\Graphics\Shader\Shader.h"> + <Filter>Source\Graphics\Shader</Filter> + </ClInclude> + <ClInclude Include="..\..\..\src\libjin\Graphics\Shader\texture.shader.h"> + <Filter>Source\Graphics\Shader</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <None Include="..\..\..\src\libjin\README.md"> @@ -398,9 +395,6 @@ <ClCompile Include="..\..\..\src\libjin\Graphics\OpenGL.cpp"> <Filter>Source\Graphics</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\libjin\Graphics\Shader.cpp"> - <Filter>Source\Graphics</Filter> - </ClCompile> <ClCompile Include="..\..\..\src\libjin\Graphics\Shapes.cpp"> <Filter>Source\Graphics</Filter> </ClCompile> @@ -413,5 +407,8 @@ <ClCompile Include="..\..\..\src\libjin\Graphics\Window.cpp"> <Filter>Source\Graphics</Filter> </ClCompile> + <ClCompile Include="..\..\..\src\libjin\Graphics\Shader\Shader.cpp"> + <Filter>Source\Graphics\Shader</Filter> + </ClCompile> </ItemGroup> </Project>
\ No newline at end of file diff --git a/src/libjin/Audio/Audio.cpp b/src/libjin/Audio/Audio.cpp index d148467..6c68b35 100644 --- a/src/libjin/Audio/Audio.cpp +++ b/src/libjin/Audio/Audio.cpp @@ -9,7 +9,7 @@ namespace jin namespace audio { - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO diff --git a/src/libjin/Audio/Audio.h b/src/libjin/Audio/Audio.h index 48cbfe4..5ba0844 100644 --- a/src/libjin/Audio/Audio.h +++ b/src/libjin/Audio/Audio.h @@ -45,8 +45,8 @@ namespace jin }; - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO #endif // __LIBJIN_AUDIO_H diff --git a/src/libjin/Audio/SDL/SDLAudio.cpp b/src/libjin/Audio/SDL/SDLAudio.cpp index e06979c..6c341c0 100644 --- a/src/libjin/Audio/SDL/SDLAudio.cpp +++ b/src/libjin/Audio/SDL/SDLAudio.cpp @@ -135,7 +135,7 @@ namespace jin this->volume = clamp(volume, 0.0f, 1.0f); } - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO && LIBJIN_AUDIO_SDLAUDIO diff --git a/src/libjin/Audio/SDL/SDLAudio.h b/src/libjin/Audio/SDL/SDLAudio.h index 32519d2..31022c6 100644 --- a/src/libjin/Audio/SDL/SDLAudio.h +++ b/src/libjin/Audio/SDL/SDLAudio.h @@ -53,8 +53,8 @@ namespace jin }; - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO && LIBJIN_AUDIO_SDLAUDIO #endif // __LIBJIN_AUDIO_SDL_H diff --git a/src/libjin/Audio/SDL/SDLSource.cpp b/src/libjin/Audio/SDL/SDLSource.cpp index 12ffb9b..fc22bbf 100644 --- a/src/libjin/Audio/SDL/SDLSource.cpp +++ b/src/libjin/Audio/SDL/SDLSource.cpp @@ -393,7 +393,7 @@ namespace jin } - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO && LIBJIN_AUDIO_SDLAUDIO diff --git a/src/libjin/Audio/SDL/SDLSource.h b/src/libjin/Audio/SDL/SDLSource.h index d9059cb..df005a0 100644 --- a/src/libjin/Audio/SDL/SDLSource.h +++ b/src/libjin/Audio/SDL/SDLSource.h @@ -100,8 +100,8 @@ namespace jin } }; - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO && LIBJIN_AUDIO_SDLAUDIO #endif // __LIBJIN_SOURCE_SDL_H diff --git a/src/libjin/Audio/Source.cpp b/src/libjin/Audio/Source.cpp index 306d93f..8da4cde 100644 --- a/src/libjin/Audio/Source.cpp +++ b/src/libjin/Audio/Source.cpp @@ -23,7 +23,7 @@ namespace jin return SourceType::INVALID; } - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO diff --git a/src/libjin/Audio/Source.h b/src/libjin/Audio/Source.h index 40707de..07a9a4e 100644 --- a/src/libjin/Audio/Source.h +++ b/src/libjin/Audio/Source.h @@ -40,8 +40,8 @@ namespace jin }; - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO #endif // __LIBJIN_AUDIO_SOURCE_H diff --git a/src/libjin/Common/Object.h b/src/libjin/Common/Object.h index f7f3b43..c4bf225 100644 --- a/src/libjin/Common/Object.h +++ b/src/libjin/Common/Object.h @@ -44,6 +44,6 @@ namespace jin }; // Object -} // jin +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Common/Singleton.hpp b/src/libjin/Common/Singleton.hpp index 600813a..cdb395f 100644 --- a/src/libjin/Common/Singleton.hpp +++ b/src/libjin/Common/Singleton.hpp @@ -32,6 +32,6 @@ namespace jin #define SINGLETON(T) friend Singleton<T> -} // jin +} // namespace jin #endif // __LIBJIN_SINGLETON_H
\ No newline at end of file diff --git a/src/libjin/Common/StringMap.hpp b/src/libjin/Common/StringMap.hpp index 9e4b0f5..641e32d 100644 --- a/src/libjin/Common/StringMap.hpp +++ b/src/libjin/Common/StringMap.hpp @@ -138,6 +138,6 @@ namespace jin }; // StringMap -} // jin +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Common/Subsystem.hpp b/src/libjin/Common/Subsystem.hpp index 78f4e01..b9ca88b 100644 --- a/src/libjin/Common/Subsystem.hpp +++ b/src/libjin/Common/Subsystem.hpp @@ -38,6 +38,6 @@ namespace jin }; -} // jin +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Common/utf8.cpp b/src/libjin/Common/utf8.cpp index f00d03c..33ee128 100644 --- a/src/libjin/Common/utf8.cpp +++ b/src/libjin/Common/utf8.cpp @@ -37,6 +37,6 @@ namespace jin } } -} // jin +} // namespace jin #endif // LIBJIN_OS == LIBJIN_WINDOWS diff --git a/src/libjin/Common/utf8.h b/src/libjin/Common/utf8.h index fd6ce1f..ae41728 100644 --- a/src/libjin/Common/utf8.h +++ b/src/libjin/Common/utf8.h @@ -25,7 +25,7 @@ namespace jin **/ void replace_char(std::string & str, char find, char replace); -} // jin +} // namespace jin #endif // LIBJIN_OS == LIBJIN_WINDOWS #endif // __LIBJIN_COMMON_UTF8_H diff --git a/src/libjin/Filesystem/Buffer.h b/src/libjin/Filesystem/Buffer.h index a47b0ef..f0d987a 100644 --- a/src/libjin/Filesystem/Buffer.h +++ b/src/libjin/Filesystem/Buffer.h @@ -61,7 +61,7 @@ namespace jin }; - } // filesystem -} // jin + } // namespace filesystem +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Filesystem/Filesystem.cpp b/src/libjin/Filesystem/Filesystem.cpp index b8faed7..8dce5a3 100644 --- a/src/libjin/Filesystem/Filesystem.cpp +++ b/src/libjin/Filesystem/Filesystem.cpp @@ -63,5 +63,5 @@ namespace jin return smtexists(S, path) == 0; } - } // filesystem -} // jin
\ No newline at end of file + } // namespace filesystem +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/Filesystem/Filesystem.h b/src/libjin/Filesystem/Filesystem.h index b43d260..b13e207 100644 --- a/src/libjin/Filesystem/Filesystem.h +++ b/src/libjin/Filesystem/Filesystem.h @@ -27,5 +27,5 @@ namespace jin }; - } // filesystem -} // jin
\ No newline at end of file + } // namespace filesystem +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/Game/Game.cpp b/src/libjin/Game/Game.cpp index 82597b7..b04661f 100644 --- a/src/libjin/Game/Game.cpp +++ b/src/libjin/Game/Game.cpp @@ -68,5 +68,5 @@ namespace jin { } - } // core -} // jin
\ No newline at end of file + } // namespace core +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/Game/Game.h b/src/libjin/Game/Game.h index ede2418..c4a341f 100644 --- a/src/libjin/Game/Game.h +++ b/src/libjin/Game/Game.h @@ -52,7 +52,7 @@ namespace jin }; - } // core -} // jin + } // namespace core +} // namespace jin #endif // __LIBJIN_CORE_GAME_H diff --git a/src/libjin/Graphics/Bitmap.h b/src/libjin/Graphics/Bitmap.h index 5599521..9277cc8 100644 --- a/src/libjin/Graphics/Bitmap.h +++ b/src/libjin/Graphics/Bitmap.h @@ -45,8 +45,8 @@ namespace jin }; - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/Canvas.cpp b/src/libjin/Graphics/Canvas.cpp index 6db06c6..11b2d77 100644 --- a/src/libjin/Graphics/Canvas.cpp +++ b/src/libjin/Graphics/Canvas.cpp @@ -29,11 +29,11 @@ namespace jin GLint current_fbo; glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, ¤t_fbo); - /* generate a new render buffer object */ + // generate a new render buffer object fbo = gl.genFrameBuffer(); gl.bindFrameBuffer(fbo); - /* generate texture save target */ + // generate texture save target texture = gl.genTexture(); gl.bindTexture(texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -96,7 +96,7 @@ namespace jin } - } // render -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/Canvas.h b/src/libjin/Graphics/Canvas.h index 4851c83..935a65e 100644 --- a/src/libjin/Graphics/Canvas.h +++ b/src/libjin/Graphics/Canvas.h @@ -32,8 +32,8 @@ namespace jin }; - } // render -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER #endif // __LIBJIN_CANVAS_H
\ No newline at end of file diff --git a/src/libjin/Graphics/Color.h b/src/libjin/Graphics/Color.h index b235a66..6c49691 100644 --- a/src/libjin/Graphics/Color.h +++ b/src/libjin/Graphics/Color.h @@ -78,8 +78,8 @@ namespace jin }; - } // render -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER #endif // __LIBJIN_COLOR_H
\ No newline at end of file diff --git a/src/libjin/Graphics/Drawable.cpp b/src/libjin/Graphics/Drawable.cpp index b9a0b36..aa17f1a 100644 --- a/src/libjin/Graphics/Drawable.cpp +++ b/src/libjin/Graphics/Drawable.cpp @@ -1,7 +1,7 @@ #include "../jin_configuration.h" #if LIBJIN_MODULES_RENDER -#include "Shader.h" +#include "./Shader/Shader.h" #include "drawable.h" #include "../math/matrix.h" #include <stdlib.h> @@ -112,7 +112,7 @@ namespace jin gl.bindTexture(0); } - } // render -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/Decoder.cpp b/src/libjin/Graphics/Font/Decoder.cpp index 856627b..362fd2a 100644 --- a/src/libjin/Graphics/Font/Decoder.cpp +++ b/src/libjin/Graphics/Font/Decoder.cpp @@ -89,5 +89,5 @@ namespace jin return p + 1; } - } // graphics -} // jin
\ No newline at end of file + } // namespace graphics +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/Decoder.h b/src/libjin/Graphics/Font/Decoder.h index e5940a2..533f60b 100644 --- a/src/libjin/Graphics/Font/Decoder.h +++ b/src/libjin/Graphics/Font/Decoder.h @@ -38,7 +38,7 @@ namespace jin const void* next(const void* data) const override; }; - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/Font.h b/src/libjin/Graphics/Font/Font.h index 9ccef54..14211e1 100644 --- a/src/libjin/Graphics/Font/Font.h +++ b/src/libjin/Graphics/Font/Font.h @@ -33,7 +33,7 @@ namespace jin }; - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/TTF.cpp b/src/libjin/Graphics/Font/TTF.cpp index 7e62485..4c3648a 100644 --- a/src/libjin/Graphics/Font/TTF.cpp +++ b/src/libjin/Graphics/Font/TTF.cpp @@ -6,7 +6,7 @@ #include "../../Common/Array.hpp" #include "../OpenGL.h" #include "../Color.h" -#include "../Shader.h" +#include "../Shader/Shader.h" #include "TTF.h" #include "Page.h" @@ -142,7 +142,7 @@ namespace jin // TTF ///////////////////////////////////////////////////////////////////////////// - #include "../Shaders/font.shader.h" + #include "../Shader/font.shader.h" using namespace std; using namespace jin::math; @@ -448,7 +448,7 @@ namespace jin return bakeGlyph(character); } - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/TTF.h b/src/libjin/Graphics/Font/TTF.h index fc2eca3..8e9ed73 100644 --- a/src/libjin/Graphics/Font/TTF.h +++ b/src/libjin/Graphics/Font/TTF.h @@ -22,14 +22,14 @@ namespace jin class TTF; - /** - * TTFData - * |- TTF(14px) - * |- TTF(15px) - * . - * . - * . - */ + // + // TTFData + // |- TTF(14px) + // |- TTF(15px) + // . + // . + // . + // class TTFData { public: @@ -83,13 +83,13 @@ namespace jin struct TTFGlyph { GLuint atlas; - /* normalized coordinates */ + // normalized coordinates struct Bbox { float x, y; float w, h; } bbox; - /* glyph size in pixel */ + // glyph size in pixel unsigned int width, height; }; @@ -125,8 +125,8 @@ namespace jin }; - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER #endif // __LIBJIN_FONT_H
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/Text.cpp b/src/libjin/Graphics/Font/Text.cpp index ac0242e..f2231f8 100644 --- a/src/libjin/Graphics/Font/Text.cpp +++ b/src/libjin/Graphics/Font/Text.cpp @@ -152,5 +152,5 @@ namespace jin return content; } - } // graphics -} // jin
\ No newline at end of file + } // namespace graphics +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/Text.h b/src/libjin/Graphics/Font/Text.h index a4cbcbf..7256a52 100644 --- a/src/libjin/Graphics/Font/Text.h +++ b/src/libjin/Graphics/Font/Text.h @@ -68,7 +68,7 @@ namespace jin }; - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/TextureFont.cpp b/src/libjin/Graphics/Font/TextureFont.cpp index 8c9c4ac..4f6f5d6 100644 --- a/src/libjin/Graphics/Font/TextureFont.cpp +++ b/src/libjin/Graphics/Font/TextureFont.cpp @@ -1,7 +1,7 @@ #include <vector> #include "../../Math/Vector2.hpp" -#include "../Shader.h" +#include "../Shader/Shader.h" #include "TextureFont.h" namespace jin diff --git a/src/libjin/Graphics/Graphics.h b/src/libjin/Graphics/Graphics.h index 199d2aa..a173599 100644 --- a/src/libjin/Graphics/Graphics.h +++ b/src/libjin/Graphics/Graphics.h @@ -7,11 +7,12 @@ #include "color.h" #include "Shapes.h" #include "texture.h" -#include "Shader.h" #include "window.h" #include "Bitmap.h" #include "Image.h" +#include "./Shader/Shader.h" + #include "./Font/TTF.h" #include "./Font/Text.h" #include "./Font/TextureFont.h" diff --git a/src/libjin/Graphics/Shader.h b/src/libjin/Graphics/Shader.h deleted file mode 100644 index 6339883..0000000 --- a/src/libjin/Graphics/Shader.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __LIBJIN_JSL_H -#define __LIBJIN_JSL_H -#include "../jin_configuration.h" -#if LIBJIN_MODULES_RENDER - -#include <string> -#include <map> -#include "color.h" -#include "texture.h" -#include "canvas.h" -#include "../3rdparty/GLee/GLee.h" -#include "Shaders/base.shader.h" - -namespace jin -{ - namespace graphics - { - - class Shader - { - public: - static Shader* createShader(const std::string& program); - static inline Shader* getCurrentShader() { return currentShader; } - static void unuse(); - - virtual ~Shader(); - - void use(); - void sendFloat(const char* name, float number); - void sendTexture(const char* name, const Texture* image); - void sendInt(const char* name, int value); - void sendVec2(const char* name, float x, float y); - void sendVec3(const char* name, float x, float y, float z); - void sendVec4(const char* name, float x, float y, float z, float w); - void sendCanvas(const char* name, const Canvas* canvas); - void sendColor(const char* name, const Color* col); - void sendMatrix4(const char* name, const math::Matrix* mat4); - - void bindVertexPointer(int n, GLenum type, GLsizei stride, const GLvoid * pointers); - void bindUVPointer(int n, GLenum type, GLsizei stride, const GLvoid * pointers); - - protected: - static Shader* currentShader; - - GLint claimTextureUnit(const std::string& name); - Shader(const std::string& program); - bool compile(const std::string& program); - - GLuint pid; - GLint currentTextureUnit; - std::map<std::string, GLint> textureUnits; - - }; - - } // graphics -} // jin - -#endif // LIBJIN_MODULES_RENDER -#endif // __LIBJIN_JSL_H
\ No newline at end of file diff --git a/src/libjin/Graphics/Shader.cpp b/src/libjin/Graphics/Shader/Shader.cpp index 8788900..163ba92 100644 --- a/src/libjin/Graphics/Shader.cpp +++ b/src/libjin/Graphics/Shader/Shader.cpp @@ -1,12 +1,12 @@ #include <regex> -#include "../jin_configuration.h" +#include "../../jin_configuration.h" #if LIBJIN_MODULES_RENDER #include <iostream> -#include "../utils/macros.h" +#include "../../Filesystem/Buffer.h" +#include "../../utils/macros.h" #include "Shader.h" -#include "../Filesystem/Buffer.h" namespace jin { namespace graphics @@ -21,7 +21,7 @@ namespace jin * SHADER_FORMAT_SIZE * formatShader */ - #include "Shaders/default.shader.h" + #include "default.shader.h" /** * https://stackoverflow.com/questions/27941496/use-sampler-without-passing-through-value @@ -48,7 +48,7 @@ namespace jin */ const int DEFAULT_TEXTURE_UNIT = 0; - /*static*/ Shader* Shader::currentShader = nullptr; + /*static*/ Shader* Shader::CurrentShader = nullptr; Shader* Shader::createShader(const string& program) { @@ -65,7 +65,7 @@ namespace jin } Shader::Shader(const string& program) - : currentTextureUnit(DEFAULT_TEXTURE_UNIT) + : mCurrentTextureUnit(DEFAULT_TEXTURE_UNIT) { if (!compile(program)) throw 0; @@ -73,7 +73,7 @@ namespace jin Shader::~Shader() { - if (currentShader == this) + if (CurrentShader == this) unuse(); } @@ -113,11 +113,11 @@ namespace jin glGetShaderiv(fshader, GL_COMPILE_STATUS, &success); if (success == GL_FALSE) return false; - pid = glCreateProgram(); - glAttachShader(pid, vshader); - glAttachShader(pid, fshader); - glLinkProgram(pid); - glGetProgramiv(pid, GL_LINK_STATUS, &success); + mPID = glCreateProgram(); + glAttachShader(mPID, vshader); + glAttachShader(mPID, fshader); + glLinkProgram(mPID); + glGetProgramiv(mPID, GL_LINK_STATUS, &success); if (success == GL_FALSE) throw false; } @@ -131,44 +131,44 @@ namespace jin void Shader::use() { - glUseProgram(pid); - currentShader = this; + glUseProgram(mPID); + CurrentShader = this; sendInt(SHADER_MAIN_TEXTURE, DEFAULT_TEXTURE_UNIT); } /*static*/ void Shader::unuse() { glUseProgram(0); - currentShader = nullptr; + CurrentShader = nullptr; } GLint Shader::claimTextureUnit(const std::string& name) { - std::map<std::string, GLint>::iterator unit = textureUnits.find(name); - if (unit != textureUnits.end()) + std::map<std::string, GLint>::iterator unit = mTextureUnits.find(name); + if (unit != mTextureUnits.end()) return unit->second; static GLint MAX_TEXTURE_UNITS = getMaxTextureUnits(); - if (++currentTextureUnit >= MAX_TEXTURE_UNITS) + if (++mCurrentTextureUnit >= MAX_TEXTURE_UNITS) return 0; - textureUnits[name] = currentTextureUnit; - return currentTextureUnit; + mTextureUnits[name] = mCurrentTextureUnit; + return mCurrentTextureUnit; } #define checkJSL() \ - if (currentShader != this) \ + if (CurrentShader != this) \ return void Shader::sendInt(const char* name, int value) { checkJSL(); - int loc = glGetUniformLocation(pid, name); + int loc = glGetUniformLocation(mPID, name); glUniform1i(loc, value); } void Shader::sendFloat(const char* variable, float number) { checkJSL(); - int loc = glGetUniformLocation(pid, variable); + int loc = glGetUniformLocation(mPID, variable); glUniform1f(loc, number); } @@ -183,13 +183,13 @@ namespace jin * ... * }; * - * TextureUnit textureUnits[GL_MAX_TEXTURE_IMAGE_UNITS] - * GLuint currentTextureUnit = 0; + * TextureUnit mTextureUnits[GL_MAX_TEXTURE_IMAGE_UNITS] + * GLuint mCurrentTextureUnit = 0; */ void Shader::sendTexture(const char* variable, const Texture* tex) { checkJSL(); - GLint location = glGetUniformLocation(pid, variable); + GLint location = glGetUniformLocation(mPID, variable); if (location == -1) return; GLint unit = claimTextureUnit(variable); @@ -207,7 +207,7 @@ namespace jin void Shader::sendCanvas(const char* variable, const Canvas* canvas) { checkJSL(); - GLint location = glGetUniformLocation(pid, variable); + GLint location = glGetUniformLocation(mPID, variable); if (location == -1) return; GLint unit = claimTextureUnit(variable); @@ -226,28 +226,28 @@ namespace jin void Shader::sendVec2(const char* name, float x, float y) { checkJSL(); - int loc = glGetUniformLocation(pid, name); + int loc = glGetUniformLocation(mPID, name); glUniform2f(loc, x, y); } void Shader::sendVec3(const char* name, float x, float y, float z) { checkJSL(); - int loc = glGetUniformLocation(pid, name); + int loc = glGetUniformLocation(mPID, name); glUniform3f(loc, x, y, z); } void Shader::sendVec4(const char* name, float x, float y, float z, float w) { checkJSL(); - int loc = glGetUniformLocation(pid, name); + int loc = glGetUniformLocation(mPID, name); glUniform4f(loc, x, y, z, w); } void Shader::sendColor(const char* name, const Color* col) { checkJSL(); - int loc = glGetUniformLocation(pid, name); + int loc = glGetUniformLocation(mPID, name); glUniform4f(loc, col->r / 255.f, col->g / 255.f, @@ -258,25 +258,25 @@ namespace jin void Shader::sendMatrix4(const char* name, const math::Matrix* mat4) { - int loc = glGetUniformLocation(pid, name); + int loc = glGetUniformLocation(mPID, name); glUniformMatrix4fv(loc, 1, GL_FALSE, mat4->getElements()); } void Shader::bindVertexPointer(int n, GLenum type, GLsizei stride, const GLvoid * pointers) { - GLint loc = glGetAttribLocation(pid, SHADER_VERTEX_COORDS); + GLint loc = glGetAttribLocation(mPID, SHADER_VERTEX_COORDS); glEnableVertexAttribArray(0); glVertexAttribPointer(loc, n, type, GL_FALSE, stride, pointers); } void Shader::bindUVPointer(int n, GLenum type, GLsizei stride, const GLvoid * pointers) { - GLint loc = glGetAttribLocation(pid, SHADER_TEXTURE_COORDS); + GLint loc = glGetAttribLocation(mPID, SHADER_TEXTURE_COORDS); glEnableVertexAttribArray(1); glVertexAttribPointer(loc, n, type, GL_FALSE, stride, pointers); } - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/Shader/Shader.h b/src/libjin/Graphics/Shader/Shader.h new file mode 100644 index 0000000..b9f83e7 --- /dev/null +++ b/src/libjin/Graphics/Shader/Shader.h @@ -0,0 +1,123 @@ +#ifndef __LIBJIN_SHADER_H +#define __LIBJIN_SHADER_H +#include "../../jin_configuration.h" +#if LIBJIN_MODULES_RENDER + +#include <string> +#include <map> +#include "../../3rdparty/GLee/GLee.h" +#include "../color.h" +#include "../texture.h" +#include "../canvas.h" +#include "base.shader.h" + +namespace jin +{ + namespace graphics + { + /// + /// @details Built in shader program. + /// + class Shader + { + public: + /// + /// @brief Create shader program from source code. + /// + /// @param source The shader source code. + /// + static Shader* createShader(const std::string& source); + + /// + /// @brief Get current shader. + /// + static inline Shader* getCurrentShader() { return CurrentShader; } + + /// + /// @brief Unuse current shader + /// + static void unuse(); + + /// + /// + /// + virtual ~Shader(); + + /// + /// + /// + void use(); + + /// + /// + /// + void sendFloat(const char* name, float number); + + /// + /// + /// + void sendTexture(const char* name, const Texture* image); + + /// + /// + /// + void sendInt(const char* name, int value); + + /// + /// + /// + void sendVec2(const char* name, float x, float y); + + /// + /// + /// + void sendVec3(const char* name, float x, float y, float z); + + /// + /// + /// + void sendVec4(const char* name, float x, float y, float z, float w); + + /// + /// + /// + void sendCanvas(const char* name, const Canvas* canvas); + + /// + /// + /// + void sendColor(const char* name, const Color* col); + + /// + /// + /// + void sendMatrix4(const char* name, const math::Matrix* mat4); + + /// + /// + /// + void bindVertexPointer(int n, GLenum type, GLsizei stride, const GLvoid * pointers); + + /// + /// + /// + void bindUVPointer(int n, GLenum type, GLsizei stride, const GLvoid * pointers); + + protected: + static Shader* CurrentShader; + + GLint claimTextureUnit(const std::string& name); + Shader(const std::string& program); + bool compile(const std::string& program); + + GLuint mPID; + GLint mCurrentTextureUnit; + std::map<std::string, GLint> mTextureUnits; + + }; + + } // namespace graphics +} // namespace jin + +#endif // LIBJIN_MODULES_RENDER +#endif // __LIBJIN_SHADER_H
\ No newline at end of file diff --git a/src/libjin/Graphics/Shaders/base.shader.h b/src/libjin/Graphics/Shader/base.shader.h index 45b63cd..45b63cd 100644 --- a/src/libjin/Graphics/Shaders/base.shader.h +++ b/src/libjin/Graphics/Shader/base.shader.h diff --git a/src/libjin/Graphics/Shaders/default.shader.h b/src/libjin/Graphics/Shader/default.shader.h index f0175d7..f0175d7 100644 --- a/src/libjin/Graphics/Shaders/default.shader.h +++ b/src/libjin/Graphics/Shader/default.shader.h diff --git a/src/libjin/Graphics/Shaders/font.shader.h b/src/libjin/Graphics/Shader/font.shader.h index e04c225..e04c225 100644 --- a/src/libjin/Graphics/Shaders/font.shader.h +++ b/src/libjin/Graphics/Shader/font.shader.h diff --git a/src/libjin/Graphics/Shaders/texture.shader.h b/src/libjin/Graphics/Shader/texture.shader.h index d1fc86f..d1fc86f 100644 --- a/src/libjin/Graphics/Shaders/texture.shader.h +++ b/src/libjin/Graphics/Shader/texture.shader.h diff --git a/src/libjin/Graphics/Shapes.cpp b/src/libjin/Graphics/Shapes.cpp index 5e87473..b99c569 100644 --- a/src/libjin/Graphics/Shapes.cpp +++ b/src/libjin/Graphics/Shapes.cpp @@ -1,7 +1,7 @@ #include "../jin_configuration.h" #if LIBJIN_MODULES_RENDER -#include "Shader.h" +#include "./Shader/Shader.h" #include "Shapes.h" #include "../math/matrix.h" #include "../math/constant.h" @@ -120,7 +120,7 @@ namespace jin } } - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/Shapes.h b/src/libjin/Graphics/Shapes.h index 93cde6d..61efcfe 100644 --- a/src/libjin/Graphics/Shapes.h +++ b/src/libjin/Graphics/Shapes.h @@ -30,8 +30,8 @@ namespace jin extern void points(int n, GLshort* p, GLubyte* c); extern void polygon(RenderMode mode, float* p, int count); - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER #endif // __LIBJIN_GEOMETRY_H
\ No newline at end of file diff --git a/src/libjin/Graphics/Texture.cpp b/src/libjin/Graphics/Texture.cpp index 915fe54..4af29a7 100644 --- a/src/libjin/Graphics/Texture.cpp +++ b/src/libjin/Graphics/Texture.cpp @@ -28,7 +28,7 @@ namespace jin { } - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/Texture.h b/src/libjin/Graphics/Texture.h index eb16519..15fd78e 100644 --- a/src/libjin/Graphics/Texture.h +++ b/src/libjin/Graphics/Texture.h @@ -24,8 +24,8 @@ namespace jin }; - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER #endif // __LIBJIN_TEXTURE_H
\ No newline at end of file diff --git a/src/libjin/Graphics/Window.cpp b/src/libjin/Graphics/Window.cpp index 140ef36..7f8f02d 100644 --- a/src/libjin/Graphics/Window.cpp +++ b/src/libjin/Graphics/Window.cpp @@ -5,7 +5,7 @@ #include "window.h" #include "OpenGL.h" #include "canvas.h" -#include "Shader.h" +#include "./Shader/Shader.h" #include "../utils/utils.h" #include "../audio/sdl/SDLAudio.h" #include "../utils/log.h" @@ -103,7 +103,7 @@ namespace jin SDL_SetWindowTitle(wnd, title); }; - } // graphics -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/Window.h b/src/libjin/Graphics/Window.h index 3734ee3..5871562 100644 --- a/src/libjin/Graphics/Window.h +++ b/src/libjin/Graphics/Window.h @@ -48,8 +48,8 @@ namespace jin }; - } // render -} // jin + } // namespace graphics +} // namespace jin #endif // LIBJIN_MODULES_RENDER #endif // __LIBJIN_RENDER_WINDOW
\ No newline at end of file diff --git a/src/libjin/Input/Event.cpp b/src/libjin/Input/Event.cpp index 3edff01..c8eb78c 100644 --- a/src/libjin/Input/Event.cpp +++ b/src/libjin/Input/Event.cpp @@ -4,4 +4,4 @@ namespace jin { -} // jin
\ No newline at end of file +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/Input/Event.h b/src/libjin/Input/Event.h index 9a31c06..af2ced2 100644 --- a/src/libjin/Input/Event.h +++ b/src/libjin/Input/Event.h @@ -98,8 +98,8 @@ namespace jin */ #endif // LIBJIN_INPUT_SDL - } // input - } // jin + } // namespace input +} // namespace jin - #endif // LIBJIN_MODULES_INPUT +#endif // LIBJIN_MODULES_INPUT #endif
\ No newline at end of file diff --git a/src/libjin/Input/Joypad.h b/src/libjin/Input/Joypad.h index 50cbe01..570699e 100644 --- a/src/libjin/Input/Joypad.h +++ b/src/libjin/Input/Joypad.h @@ -44,7 +44,7 @@ namespace jin } } - } // input -} // jin + } // namespace input +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Input/Keyboard.h b/src/libjin/Input/Keyboard.h index b50302c..60f1169 100644 --- a/src/libjin/Input/Keyboard.h +++ b/src/libjin/Input/Keyboard.h @@ -11,7 +11,7 @@ namespace jin }; - } // input -} // jin + } // namespace input +} // namespace jin #endif // __LIBJIN_KEYBOARD_H
\ No newline at end of file diff --git a/src/libjin/Input/Mouse.cpp b/src/libjin/Input/Mouse.cpp index 3869337..9fcb4ee 100644 --- a/src/libjin/Input/Mouse.cpp +++ b/src/libjin/Input/Mouse.cpp @@ -21,7 +21,7 @@ namespace jin SDL_ShowCursor(visible ? SDL_ENABLE : SDL_DISABLE); } - } // input -} // jin + } // namespace input +} // namespace jin #endif // LIBJIN_MODULES_INPUT
\ No newline at end of file diff --git a/src/libjin/Input/Mouse.h b/src/libjin/Input/Mouse.h index 29d730b..5f77f0d 100644 --- a/src/libjin/Input/Mouse.h +++ b/src/libjin/Input/Mouse.h @@ -24,8 +24,8 @@ namespace jin }; - } // input -} // jin + } // namespace input +} // namespace jin #endif // LIBJIN_MODULES_INPUT #endif // __LIBJIN_MOUSE_H
\ No newline at end of file diff --git a/src/libjin/Math/Math.h b/src/libjin/Math/Math.h index 98f9cd8..c1b5084 100644 --- a/src/libjin/Math/Math.h +++ b/src/libjin/Math/Math.h @@ -71,7 +71,7 @@ namespace jin return a + t * (b - a); } - } // math -} // jin + } // namespace math +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Math/Matrix.cpp b/src/libjin/Math/Matrix.cpp index 74d3a58..9f933f8 100644 --- a/src/libjin/Math/Matrix.cpp +++ b/src/libjin/Math/Matrix.cpp @@ -190,5 +190,5 @@ namespace jin } } - } // math -} // jin
\ No newline at end of file + } // namespace math +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/Math/Matrix.h b/src/libjin/Math/Matrix.h index c1f903a..1fe6ab1 100644 --- a/src/libjin/Math/Matrix.h +++ b/src/libjin/Math/Matrix.h @@ -153,7 +153,7 @@ namespace jin }; - } // math -} // jin + } // namespace math +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Math/Quad.h b/src/libjin/Math/Quad.h index c649cf7..6eb4f45 100644 --- a/src/libjin/Math/Quad.h +++ b/src/libjin/Math/Quad.h @@ -11,7 +11,7 @@ namespace jin float x, y, w, h; }; - } // math -} // jin + } // namespace math +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Math/Vector2.hpp b/src/libjin/Math/Vector2.hpp index f0bbfc7..51ac4a7 100644 --- a/src/libjin/Math/Vector2.hpp +++ b/src/libjin/Math/Vector2.hpp @@ -34,7 +34,7 @@ namespace jin }; - } // math -} // jin + } // namespace math +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Math/Vector3.hpp b/src/libjin/Math/Vector3.hpp index 9b38cad..96d4e9a 100644 --- a/src/libjin/Math/Vector3.hpp +++ b/src/libjin/Math/Vector3.hpp @@ -35,7 +35,7 @@ namespace jin }; - } // math -} // jin + } // namespace math +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Math/Vector4.hpp b/src/libjin/Math/Vector4.hpp index e2978d4..35be056 100644 --- a/src/libjin/Math/Vector4.hpp +++ b/src/libjin/Math/Vector4.hpp @@ -39,7 +39,7 @@ namespace jin }; - } // math -} // jin + } // namespace math +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/Net/Net.cpp b/src/libjin/Net/Net.cpp index 8fd4256..940b239 100644 --- a/src/libjin/Net/Net.cpp +++ b/src/libjin/Net/Net.cpp @@ -20,5 +20,5 @@ namespace jin } - } // net -} // jin
\ No newline at end of file + } // namespace net +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/Net/Net.h b/src/libjin/Net/Net.h index b5f999f..4cf6e93 100644 --- a/src/libjin/Net/Net.h +++ b/src/libjin/Net/Net.h @@ -24,8 +24,8 @@ namespace jin }; - } // net -} // jin + } // namespace net +} // namespace jin #endif // LIBJIN_MODULES_NET #endif // __LIBJIN_NET_H diff --git a/src/libjin/Net/Socket.cpp b/src/libjin/Net/Socket.cpp index 2a1454b..770b47d 100644 --- a/src/libjin/Net/Socket.cpp +++ b/src/libjin/Net/Socket.cpp @@ -186,5 +186,5 @@ namespace jin } } - } // net -} // jin
\ No newline at end of file + } // namespace net +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/Net/Socket.h b/src/libjin/Net/Socket.h index ad2ce60..dfc1e41 100644 --- a/src/libjin/Net/Socket.h +++ b/src/libjin/Net/Socket.h @@ -55,8 +55,8 @@ namespace jin }; - } // net -} // jin + } // namespace net +} // namespace jin #endif // LIBJIN_MODULES_NET #endif // __LIBJIN_NET_SOCKET_H diff --git a/src/libjin/Net/net.cpp b/src/libjin/Net/net.cpp index 8fd4256..940b239 100644 --- a/src/libjin/Net/net.cpp +++ b/src/libjin/Net/net.cpp @@ -20,5 +20,5 @@ namespace jin } - } // net -} // jin
\ No newline at end of file + } // namespace net +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/Net/net.h b/src/libjin/Net/net.h index b5f999f..4cf6e93 100644 --- a/src/libjin/Net/net.h +++ b/src/libjin/Net/net.h @@ -24,8 +24,8 @@ namespace jin }; - } // net -} // jin + } // namespace net +} // namespace jin #endif // LIBJIN_MODULES_NET #endif // __LIBJIN_NET_H diff --git a/src/libjin/Thread/Thread.cpp b/src/libjin/Thread/Thread.cpp index 0703f1b..6eefca1 100644 --- a/src/libjin/Thread/Thread.cpp +++ b/src/libjin/Thread/Thread.cpp @@ -295,7 +295,7 @@ namespace jin unlock(); } - } // thread -} // jin + } // namespace thread +} // namespace jin #endif // LIBJIN_MODULES_THREAD
\ No newline at end of file diff --git a/src/libjin/Thread/Thread.h b/src/libjin/Thread/Thread.h index d6d0a19..7c126e4 100644 --- a/src/libjin/Thread/Thread.h +++ b/src/libjin/Thread/Thread.h @@ -159,8 +159,8 @@ namespace jin }; - } // thread -} // jin + } // namespace thread +} // namespace jin #endif // LIBJIN_MODULES_THREAD #endif // __LIBJIN_THREAD_H
\ No newline at end of file diff --git a/src/libjin/Thread/thread.cpp b/src/libjin/Thread/thread.cpp index 0703f1b..6eefca1 100644 --- a/src/libjin/Thread/thread.cpp +++ b/src/libjin/Thread/thread.cpp @@ -295,7 +295,7 @@ namespace jin unlock(); } - } // thread -} // jin + } // namespace thread +} // namespace jin #endif // LIBJIN_MODULES_THREAD
\ No newline at end of file diff --git a/src/libjin/Thread/thread.h b/src/libjin/Thread/thread.h index d6d0a19..7c126e4 100644 --- a/src/libjin/Thread/thread.h +++ b/src/libjin/Thread/thread.h @@ -159,8 +159,8 @@ namespace jin }; - } // thread -} // jin + } // namespace thread +} // namespace jin #endif // LIBJIN_MODULES_THREAD #endif // __LIBJIN_THREAD_H
\ No newline at end of file diff --git a/src/libjin/Time/Timer.cpp b/src/libjin/Time/Timer.cpp index 426f2d5..54fb2a3 100644 --- a/src/libjin/Time/Timer.cpp +++ b/src/libjin/Time/Timer.cpp @@ -94,7 +94,7 @@ namespace jin return true; } - } // time -} // jin + } // namespace time +} // namespace jin #endif // LIBJIN_MODULES_TIME diff --git a/src/libjin/Time/Timer.h b/src/libjin/Time/Timer.h index 93a90ae..8f49ec3 100644 --- a/src/libjin/Time/Timer.h +++ b/src/libjin/Time/Timer.h @@ -70,8 +70,8 @@ namespace jin #endif } - } // time -} // jin + } // namespace time +} // namespace jin #endif // LIBJIN_MODULES_TIME #endif // __LIBJIN_TIMER_H diff --git a/src/libjin/audio/audio.cpp b/src/libjin/audio/audio.cpp index d148467..6c68b35 100644 --- a/src/libjin/audio/audio.cpp +++ b/src/libjin/audio/audio.cpp @@ -9,7 +9,7 @@ namespace jin namespace audio { - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO diff --git a/src/libjin/audio/audio.h b/src/libjin/audio/audio.h index 48cbfe4..5ba0844 100644 --- a/src/libjin/audio/audio.h +++ b/src/libjin/audio/audio.h @@ -45,8 +45,8 @@ namespace jin }; - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO #endif // __LIBJIN_AUDIO_H diff --git a/src/libjin/audio/source.cpp b/src/libjin/audio/source.cpp index 306d93f..8da4cde 100644 --- a/src/libjin/audio/source.cpp +++ b/src/libjin/audio/source.cpp @@ -23,7 +23,7 @@ namespace jin return SourceType::INVALID; } - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO diff --git a/src/libjin/audio/source.h b/src/libjin/audio/source.h index 40707de..07a9a4e 100644 --- a/src/libjin/audio/source.h +++ b/src/libjin/audio/source.h @@ -40,8 +40,8 @@ namespace jin }; - } // audio -} // jin + } // namespace audio +} // namespace jin #endif // LIBJIN_MODULES_AUDIO #endif // __LIBJIN_AUDIO_SOURCE_H diff --git a/src/libjin/input/event.cpp b/src/libjin/input/event.cpp index 3edff01..c8eb78c 100644 --- a/src/libjin/input/event.cpp +++ b/src/libjin/input/event.cpp @@ -4,4 +4,4 @@ namespace jin { -} // jin
\ No newline at end of file +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/input/event.h b/src/libjin/input/event.h index 9a31c06..af2ced2 100644 --- a/src/libjin/input/event.h +++ b/src/libjin/input/event.h @@ -98,8 +98,8 @@ namespace jin */ #endif // LIBJIN_INPUT_SDL - } // input - } // jin + } // namespace input +} // namespace jin - #endif // LIBJIN_MODULES_INPUT +#endif // LIBJIN_MODULES_INPUT #endif
\ No newline at end of file diff --git a/src/libjin/input/joypad.h b/src/libjin/input/joypad.h index 50cbe01..570699e 100644 --- a/src/libjin/input/joypad.h +++ b/src/libjin/input/joypad.h @@ -44,7 +44,7 @@ namespace jin } } - } // input -} // jin + } // namespace input +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/input/keyboard.h b/src/libjin/input/keyboard.h index b50302c..60f1169 100644 --- a/src/libjin/input/keyboard.h +++ b/src/libjin/input/keyboard.h @@ -11,7 +11,7 @@ namespace jin }; - } // input -} // jin + } // namespace input +} // namespace jin #endif // __LIBJIN_KEYBOARD_H
\ No newline at end of file diff --git a/src/libjin/input/mouse.cpp b/src/libjin/input/mouse.cpp index 3869337..9fcb4ee 100644 --- a/src/libjin/input/mouse.cpp +++ b/src/libjin/input/mouse.cpp @@ -21,7 +21,7 @@ namespace jin SDL_ShowCursor(visible ? SDL_ENABLE : SDL_DISABLE); } - } // input -} // jin + } // namespace input +} // namespace jin #endif // LIBJIN_MODULES_INPUT
\ No newline at end of file diff --git a/src/libjin/input/mouse.h b/src/libjin/input/mouse.h index 29d730b..5f77f0d 100644 --- a/src/libjin/input/mouse.h +++ b/src/libjin/input/mouse.h @@ -24,8 +24,8 @@ namespace jin }; - } // input -} // jin + } // namespace input +} // namespace jin #endif // LIBJIN_MODULES_INPUT #endif // __LIBJIN_MOUSE_H
\ No newline at end of file diff --git a/src/libjin/math/math.h b/src/libjin/math/math.h index 98f9cd8..c1b5084 100644 --- a/src/libjin/math/math.h +++ b/src/libjin/math/math.h @@ -71,7 +71,7 @@ namespace jin return a + t * (b - a); } - } // math -} // jin + } // namespace math +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/math/matrix.cpp b/src/libjin/math/matrix.cpp index 74d3a58..9f933f8 100644 --- a/src/libjin/math/matrix.cpp +++ b/src/libjin/math/matrix.cpp @@ -190,5 +190,5 @@ namespace jin } } - } // math -} // jin
\ No newline at end of file + } // namespace math +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/math/matrix.h b/src/libjin/math/matrix.h index c1f903a..1fe6ab1 100644 --- a/src/libjin/math/matrix.h +++ b/src/libjin/math/matrix.h @@ -153,7 +153,7 @@ namespace jin }; - } // math -} // jin + } // namespace math +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/math/quad.h b/src/libjin/math/quad.h index c649cf7..6eb4f45 100644 --- a/src/libjin/math/quad.h +++ b/src/libjin/math/quad.h @@ -11,7 +11,7 @@ namespace jin float x, y, w, h; }; - } // math -} // jin + } // namespace math +} // namespace jin #endif
\ No newline at end of file diff --git a/src/libjin/net/net.cpp b/src/libjin/net/net.cpp index 8fd4256..940b239 100644 --- a/src/libjin/net/net.cpp +++ b/src/libjin/net/net.cpp @@ -20,5 +20,5 @@ namespace jin } - } // net -} // jin
\ No newline at end of file + } // namespace net +} // namespace jin
\ No newline at end of file diff --git a/src/libjin/net/net.h b/src/libjin/net/net.h index b5f999f..4cf6e93 100644 --- a/src/libjin/net/net.h +++ b/src/libjin/net/net.h @@ -24,8 +24,8 @@ namespace jin }; - } // net -} // jin + } // namespace net +} // namespace jin #endif // LIBJIN_MODULES_NET #endif // __LIBJIN_NET_H diff --git a/src/libjin/thread/thread.cpp b/src/libjin/thread/thread.cpp index 0703f1b..6eefca1 100644 --- a/src/libjin/thread/thread.cpp +++ b/src/libjin/thread/thread.cpp @@ -295,7 +295,7 @@ namespace jin unlock(); } - } // thread -} // jin + } // namespace thread +} // namespace jin #endif // LIBJIN_MODULES_THREAD
\ No newline at end of file diff --git a/src/libjin/thread/thread.h b/src/libjin/thread/thread.h index d6d0a19..7c126e4 100644 --- a/src/libjin/thread/thread.h +++ b/src/libjin/thread/thread.h @@ -159,8 +159,8 @@ namespace jin }; - } // thread -} // jin + } // namespace thread +} // namespace jin #endif // LIBJIN_MODULES_THREAD #endif // __LIBJIN_THREAD_H
\ No newline at end of file |