diff options
Diffstat (limited to 'src/libjin/Graphics')
33 files changed, 137 insertions, 136 deletions
diff --git a/src/libjin/Graphics/Font/je_decoder.cpp b/src/libjin/Graphics/Font/je_decoder.cpp index 20695e7..01e1990 100644 --- a/src/libjin/Graphics/Font/je_decoder.cpp +++ b/src/libjin/Graphics/Font/je_decoder.cpp @@ -2,9 +2,9 @@ #include <string.h> #include "je_decoder.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /* utf8 byte string to unicode codepoint */ @@ -89,5 +89,5 @@ namespace jin return p + 1; } - } // namespace graphics -} // namespace jin
\ No newline at end of file + } // namespace Graphics +} // namespace JinEngine
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/je_decoder.h b/src/libjin/Graphics/Font/je_decoder.h index 6a69c21..162f22e 100644 --- a/src/libjin/Graphics/Font/je_decoder.h +++ b/src/libjin/Graphics/Font/je_decoder.h @@ -5,9 +5,9 @@ #include "je_text.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /// @@ -82,7 +82,7 @@ namespace jin const void* next(const void* data) const override; }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/je_font.h b/src/libjin/Graphics/Font/je_font.h index 0601713..ec60c21 100644 --- a/src/libjin/Graphics/Font/je_font.h +++ b/src/libjin/Graphics/Font/je_font.h @@ -4,9 +4,9 @@ #include <vector> #include "je_text.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { struct Page; @@ -93,7 +93,7 @@ namespace jin }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/je_page.h b/src/libjin/Graphics/Font/je_page.h index 569780e..7df2784 100644 --- a/src/libjin/Graphics/Font/je_page.h +++ b/src/libjin/Graphics/Font/je_page.h @@ -5,9 +5,9 @@ #include "je_font.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { class Font; @@ -42,10 +42,10 @@ namespace jin Font* font; std::vector<GlyphArrayDrawInfo> glyphinfolist; std::vector<GlyphVertex> glyphvertices; - math::Vector2<int> size; + Math::Vector2<int> size; }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/je_text.cpp b/src/libjin/Graphics/Font/je_text.cpp index aa5cbda..beba94f 100644 --- a/src/libjin/Graphics/Font/je_text.cpp +++ b/src/libjin/Graphics/Font/je_text.cpp @@ -3,9 +3,9 @@ #include "je_text.h" #include "je_decoder.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { ///////////////////////////////////////////////////////////////////////////// @@ -152,5 +152,5 @@ namespace jin return content; } - } // namespace graphics -} // namespace jin
\ No newline at end of file + } // namespace Graphics +} // namespace JinEngine
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/je_text.h b/src/libjin/Graphics/Font/je_text.h index 9d2dd95..af40993 100644 --- a/src/libjin/Graphics/Font/je_text.h +++ b/src/libjin/Graphics/Font/je_text.h @@ -3,9 +3,9 @@ #include <vector> -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { typedef unsigned int Codepoint; @@ -73,7 +73,7 @@ namespace jin }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/je_texture_font.cpp b/src/libjin/Graphics/Font/je_texture_font.cpp index 3df77e5..81ac343 100644 --- a/src/libjin/Graphics/Font/je_texture_font.cpp +++ b/src/libjin/Graphics/Font/je_texture_font.cpp @@ -6,13 +6,13 @@ #include "je_texture_font.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { using namespace std; - using namespace math; + using namespace Math; TextureFont * TextureFont::createTextureFont(const Bitmap* bitmap, const Content& codepoints, int cellw, int cellh) { diff --git a/src/libjin/Graphics/Font/je_texture_font.h b/src/libjin/Graphics/Font/je_texture_font.h index bfa4815..9805cda 100644 --- a/src/libjin/Graphics/Font/je_texture_font.h +++ b/src/libjin/Graphics/Font/je_texture_font.h @@ -13,9 +13,9 @@ #include "je_font.h" #include "je_text.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /// @@ -59,7 +59,7 @@ namespace jin }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/je_ttf.cpp b/src/libjin/Graphics/Font/je_ttf.cpp index d44b2c7..0ee02ab 100644 --- a/src/libjin/Graphics/Font/je_ttf.cpp +++ b/src/libjin/Graphics/Font/je_ttf.cpp @@ -15,9 +15,9 @@ #define STB_TRUETYPE_IMPLEMENTATION #include "../../3rdparty/stb/stb_truetype.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { ///////////////////////////////////////////////////////////////////////////// @@ -147,7 +147,7 @@ namespace jin #include "../shader/je_font.shader.h" using namespace std; - using namespace jin::math; + using namespace JinEngine::Math; const int TTF::TEXTURE_WIDTHS[] = { 128, 256, 256, 512, 512, 1024, 1024 }; const int TTF::TEXTURE_HEIGHTS[] = { 128, 128, 256, 256, 512, 512, 1024 }; @@ -450,7 +450,7 @@ namespace jin return bakeGlyph(character); } - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/Font/je_ttf.h b/src/libjin/Graphics/Font/je_ttf.h index 5c44d26..e4314fe 100644 --- a/src/libjin/Graphics/Font/je_ttf.h +++ b/src/libjin/Graphics/Font/je_ttf.h @@ -16,9 +16,9 @@ #include "je_font.h" #include "je_text.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { class TTF; @@ -122,12 +122,12 @@ namespace jin int descent; /* cursor helped render to texture */ - math::Vector2<float> cursor; + Math::Vector2<float> cursor; }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER diff --git a/src/libjin/Graphics/Shader/je_shader.cpp b/src/libjin/Graphics/Shader/je_shader.cpp index 686f2b9..19485b9 100644 --- a/src/libjin/Graphics/Shader/je_shader.cpp +++ b/src/libjin/Graphics/Shader/je_shader.cpp @@ -9,12 +9,12 @@ #include "je_shader.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { - using namespace jin::filesystem; + using namespace JinEngine::Filesystem; using namespace std; // @@ -258,7 +258,7 @@ namespace jin ); } - void Shader::sendMatrix4(const char* name, const math::Matrix* mat4) + void Shader::sendMatrix4(const char* name, const Math::Matrix* mat4) { int loc = glGetUniformLocation(mPID, name); glUniformMatrix4fv(loc, 1, GL_FALSE, mat4->getElements()); @@ -278,7 +278,7 @@ namespace jin glVertexAttribPointer(loc, n, type, GL_FALSE, stride, pointers); } - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // jin_graphics_shader
\ No newline at end of file diff --git a/src/libjin/Graphics/Shader/je_shader.h b/src/libjin/Graphics/Shader/je_shader.h index 5145f85..69746de 100644 --- a/src/libjin/Graphics/Shader/je_shader.h +++ b/src/libjin/Graphics/Shader/je_shader.h @@ -15,9 +15,9 @@ #include "je_base.shader.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /// @@ -135,7 +135,7 @@ namespace jin /// @param name Name of the uniform variable to be assigned. /// @param mat4 Matrix to be sent. /// - void sendMatrix4(const char* name, const math::Matrix* mat4); + void sendMatrix4(const char* name, const Math::Matrix* mat4); /// /// Set vertices value. @@ -192,8 +192,8 @@ namespace jin }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // jin_graphics && jin_graphics_shader diff --git a/src/libjin/Graphics/je_bitmap.cpp b/src/libjin/Graphics/je_bitmap.cpp index 2a619ac..c284d2a 100644 --- a/src/libjin/Graphics/je_bitmap.cpp +++ b/src/libjin/Graphics/je_bitmap.cpp @@ -4,11 +4,11 @@ #include "je_bitmap.h" -using namespace jin::math; +using namespace JinEngine::Math; -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /* pixelbitmap */ diff --git a/src/libjin/Graphics/je_bitmap.h b/src/libjin/Graphics/je_bitmap.h index 92ab836..eeb065e 100644 --- a/src/libjin/Graphics/je_bitmap.h +++ b/src/libjin/Graphics/je_bitmap.h @@ -7,9 +7,9 @@ #include "../math/je_vector2.hpp" #include "je_color.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /// /// A RGBA32 bitmap. @@ -145,7 +145,7 @@ namespace jin /// /// @return Size of bitmap. /// - inline math::Vector2<int> getSize() const { return math::Vector2<int>(width, height); } + inline Math::Vector2<int> getSize() const { return Math::Vector2<int>(width, height); } protected: /// @@ -166,8 +166,8 @@ namespace jin }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/je_canvas.cpp b/src/libjin/Graphics/je_canvas.cpp index af9868b..b8553b5 100644 --- a/src/libjin/Graphics/je_canvas.cpp +++ b/src/libjin/Graphics/je_canvas.cpp @@ -5,9 +5,9 @@ #include "je_canvas.h" #include "je_window.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /*class member*/ const Canvas* Canvas::current = nullptr; @@ -96,7 +96,7 @@ namespace jin } - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/je_canvas.h b/src/libjin/Graphics/je_canvas.h index 5a44e87..321cd32 100644 --- a/src/libjin/Graphics/je_canvas.h +++ b/src/libjin/Graphics/je_canvas.h @@ -4,9 +4,10 @@ #if LIBJIN_MODULES_RENDER #include "je_drawable.h" -namespace jin + +namespace JinEngine { - namespace graphics + namespace Graphics { /// /// Renderable canvas. @@ -59,8 +60,8 @@ namespace jin }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER #endif // __JE_CANVAS_H
\ No newline at end of file diff --git a/src/libjin/Graphics/je_color.cpp b/src/libjin/Graphics/je_color.cpp index 821f19e..da48162 100644 --- a/src/libjin/Graphics/je_color.cpp +++ b/src/libjin/Graphics/je_color.cpp @@ -1,8 +1,8 @@ #include "je_color.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { const Color Color::WHITE = Color(255, 255, 255); diff --git a/src/libjin/Graphics/je_color.h b/src/libjin/Graphics/je_color.h index 675d25e..01484ff 100644 --- a/src/libjin/Graphics/je_color.h +++ b/src/libjin/Graphics/je_color.h @@ -8,9 +8,9 @@ #include "../utils/je_endian.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { typedef unsigned char Channel; @@ -78,8 +78,8 @@ namespace jin }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER #endif // __JE_COLOR_H
\ No newline at end of file diff --git a/src/libjin/Graphics/je_drawable.cpp b/src/libjin/Graphics/je_drawable.cpp index 9b5746a..00ff739 100644 --- a/src/libjin/Graphics/je_drawable.cpp +++ b/src/libjin/Graphics/je_drawable.cpp @@ -8,9 +8,9 @@ #include "shader/je_shader.h" #include "je_drawable.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { Drawable::Drawable(int w, int h) @@ -82,7 +82,7 @@ namespace jin gl.bindTexture(0); } - void Drawable::draw(const math::Quad& slice, int x, int y, float sx, float sy, float r, float ax, float ay) + void Drawable::draw(const Math::Quad& slice, int x, int y, float sx, float sy, float r, float ax, float ay) { float vertCoords[8] = { 0, 0, @@ -119,7 +119,7 @@ namespace jin // glTexParameteri(GL_) //} - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/je_drawable.h b/src/libjin/Graphics/je_drawable.h index f31f3d7..28fd28b 100644 --- a/src/libjin/Graphics/je_drawable.h +++ b/src/libjin/Graphics/je_drawable.h @@ -9,9 +9,9 @@ #include "je_gl.h" #include "je_bitmap.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /// /// @@ -47,7 +47,7 @@ namespace jin /// /// /// - void draw(const math::Quad& slice, int x, int y, float sx = 1, float sy = 1, float r = 0, float ax = 0, float ay = 0); + void draw(const Math::Quad& slice, int x, int y, float sx = 1, float sy = 1, float r = 0, float ax = 0, float ay = 0); /// /// @@ -76,15 +76,15 @@ namespace jin GLuint vbo; /* TODO: vertex buffer object */ /* GLuint vbo; */ - jin::math::Vector2<unsigned int> size; - jin::math::Vector2<int> anchor; + JinEngine::Math::Vector2<unsigned int> size; + JinEngine::Math::Vector2<int> anchor; float vertex_coords[DRAWABLE_V_SIZE]; float texture_coords[DRAWABLE_V_SIZE]; }; } // namespace render -} // namespace jin +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER #endif // __JE_DRAWABLE
\ No newline at end of file diff --git a/src/libjin/Graphics/je_gl.cpp b/src/libjin/Graphics/je_gl.cpp index d228bb5..f27f7ba 100644 --- a/src/libjin/Graphics/je_gl.cpp +++ b/src/libjin/Graphics/je_gl.cpp @@ -1,9 +1,9 @@ #define OGL2D_IMPLEMENT #include "je_gl.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { OpenGL gl; diff --git a/src/libjin/Graphics/je_gl.h b/src/libjin/Graphics/je_gl.h index 2b76162..e0bc81f 100644 --- a/src/libjin/Graphics/je_gl.h +++ b/src/libjin/Graphics/je_gl.h @@ -5,16 +5,16 @@ #include "../3rdparty/ogl/OpenGL.h" #include "../math/je_matrix.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { class OpenGL : public ogl2d::OpenGL { public: - math::Matrix ProjectionMatrix; - math::Matrix ModelMatrix; + Math::Matrix ProjectionMatrix; + Math::Matrix ModelMatrix; OpenGL() : ogl2d::OpenGL() { diff --git a/src/libjin/Graphics/je_image.cpp b/src/libjin/Graphics/je_image.cpp index cca78a3..9c6f2ad 100644 --- a/src/libjin/Graphics/je_image.cpp +++ b/src/libjin/Graphics/je_image.cpp @@ -1,14 +1,14 @@ #include "../3rdparty/stb/stb_image.h" -#include "../filesystem/je_filesystem.h" +#include "../filesystem/je_asset_database.h" #include "je_image.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { - using namespace filesystem; + using namespace Filesystem; /*static*/ Image* Image::createImage(const void* imgData, size_t size) { @@ -27,7 +27,7 @@ namespace jin Image* Image::createImage(const char* path) { - Filesystem* fs = Filesystem::get(); + AssetDatabase* fs = AssetDatabase::get(); Buffer buffer; fs->read(path, &buffer); return createImage(buffer.data, buffer.size); @@ -42,5 +42,5 @@ namespace jin { } - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine diff --git a/src/libjin/Graphics/je_image.h b/src/libjin/Graphics/je_image.h index adb9cde..04ee4d2 100644 --- a/src/libjin/Graphics/je_image.h +++ b/src/libjin/Graphics/je_image.h @@ -3,9 +3,9 @@ #include "je_bitmap.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /// @@ -54,7 +54,7 @@ namespace jin }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif
\ No newline at end of file diff --git a/src/libjin/Graphics/je_mesh.cpp b/src/libjin/Graphics/je_mesh.cpp index 1047e7e..de810e7 100644 --- a/src/libjin/Graphics/je_mesh.cpp +++ b/src/libjin/Graphics/je_mesh.cpp @@ -1,8 +1,8 @@ #include "je_mesh.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { diff --git a/src/libjin/Graphics/je_mesh.h b/src/libjin/Graphics/je_mesh.h index e85344c..29c8916 100644 --- a/src/libjin/Graphics/je_mesh.h +++ b/src/libjin/Graphics/je_mesh.h @@ -1,9 +1,9 @@ #ifndef __JE_MESH_H #define __JE_MESH_H -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { class Mesh diff --git a/src/libjin/Graphics/je_shapes.cpp b/src/libjin/Graphics/je_shapes.cpp index 31c793f..5a6dee8 100644 --- a/src/libjin/Graphics/je_shapes.cpp +++ b/src/libjin/Graphics/je_shapes.cpp @@ -9,12 +9,12 @@ #include "shader/je_shader.h" #include "je_shapes.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { - using namespace math; + using namespace Math; void point(int x, int y) { @@ -122,7 +122,7 @@ namespace jin } } - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/je_shapes.h b/src/libjin/Graphics/je_shapes.h index bb2da25..ea010be 100644 --- a/src/libjin/Graphics/je_shapes.h +++ b/src/libjin/Graphics/je_shapes.h @@ -7,9 +7,9 @@ #include "je_canvas.h" #include "je_texture.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { typedef enum { @@ -30,8 +30,8 @@ namespace jin extern void points(int n, GLshort* p, GLubyte* c); extern void polygon(RenderMode mode, float* p, int count); - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER #endif // __JE_GEOMETRY_H
\ No newline at end of file diff --git a/src/libjin/Graphics/je_sprite.h b/src/libjin/Graphics/je_sprite.h index e0bf6fa..9c3f7a2 100644 --- a/src/libjin/Graphics/je_sprite.h +++ b/src/libjin/Graphics/je_sprite.h @@ -1,9 +1,9 @@ #ifndef __JE_SPRITE_H #define __JE_SPRITE_H -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /// /// A sprite is a transformable texture. diff --git a/src/libjin/Graphics/je_texture.cpp b/src/libjin/Graphics/je_texture.cpp index d2e53e2..da56047 100644 --- a/src/libjin/Graphics/je_texture.cpp +++ b/src/libjin/Graphics/je_texture.cpp @@ -8,12 +8,12 @@ #include "je_texture.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { - using namespace jin::math; + using namespace JinEngine::Math; /*static*/ Texture* Texture::createTexture(Bitmap* bitmap) { @@ -30,7 +30,7 @@ namespace jin { } - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/je_texture.h b/src/libjin/Graphics/je_texture.h index a58f1db..e5c9cff 100644 --- a/src/libjin/Graphics/je_texture.h +++ b/src/libjin/Graphics/je_texture.h @@ -9,9 +9,9 @@ #include "je_drawable.h" #include "je_bitmap.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /// /// @@ -37,8 +37,8 @@ namespace jin }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // jin_graphics diff --git a/src/libjin/Graphics/je_window.cpp b/src/libjin/Graphics/je_window.cpp index 680dd0e..bdcb00a 100644 --- a/src/libjin/Graphics/je_window.cpp +++ b/src/libjin/Graphics/je_window.cpp @@ -12,9 +12,9 @@ #include "je_gl.h" #include "je_canvas.h" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { bool Window::initSystem(const SettingBase* s) @@ -105,7 +105,7 @@ namespace jin SDL_SetWindowTitle(wnd, title); }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // LIBJIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Graphics/je_window.h b/src/libjin/Graphics/je_window.h index 08a9c59..f7d265f 100644 --- a/src/libjin/Graphics/je_window.h +++ b/src/libjin/Graphics/je_window.h @@ -9,9 +9,9 @@ #include "../math/je_vector2.hpp" #include "../common/je_subsystem.hpp" -namespace jin +namespace JinEngine { - namespace graphics + namespace Graphics { /// /// @@ -83,13 +83,13 @@ namespace jin void quitSystem() override; SDL_Window* wnd; - jin::math::Vector2<unsigned int> size; + JinEngine::Math::Vector2<unsigned int> size; int fps; }; - } // namespace graphics -} // namespace jin + } // namespace Graphics +} // namespace JinEngine #endif // jin_graphics |