diff options
author | chai <chaifix@163.com> | 2018-10-22 21:30:21 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-22 21:30:21 +0800 |
commit | 58d09aa3ca4409e2a15473b0ac3c0446f0acb1a2 (patch) | |
tree | 37dadab5575116c75b54064556b045ba8a245871 /src | |
parent | 99bea1e47c813016d89c9e99296fa66e183d808f (diff) |
*misc
Diffstat (limited to 'src')
43 files changed, 766 insertions, 497 deletions
diff --git a/src/libjin/Common/je_exception.h b/src/libjin/Common/je_exception.h index e69de29..7c66af8 100644 --- a/src/libjin/Common/je_exception.h +++ b/src/libjin/Common/je_exception.h @@ -0,0 +1,22 @@ +#ifndef __JE_EXCEPTION_H +#define __JE_EXCEPTION_H + +#include <exception> + +namespace JinEngine +{ + + /// + /// Built-in exception class. + /// + class JinException : public std::exception + { + public: + JinException(); + const char* what() const throw(); + + }; + +} // namespace JinEngine + +#endif
\ No newline at end of file diff --git a/src/libjin/Common/je_noncopyable.h b/src/libjin/Common/je_noncopyable.h new file mode 100644 index 0000000..89a3e68 --- /dev/null +++ b/src/libjin/Common/je_noncopyable.h @@ -0,0 +1,24 @@ +#ifndef __JE_NONCOPYABLE_H +#define __JE_NONCOPYABLE_H + +namespace JinEngine +{ + + /// + /// Class inherites this could not be copied. + /// + class Noncopyable + { + public: + Noncopyable(void) { } + virtual ~Noncopyable(void) { } + + private: + Noncopyable(const Noncopyable& other); + Noncopyable& operator=(const Noncopyable& other); + + }; + +} // namespace JinEngine + +#endif
\ No newline at end of file diff --git a/src/libjin/Common/je_object.h b/src/libjin/Common/je_object.h new file mode 100644 index 0000000..c256879 --- /dev/null +++ b/src/libjin/Common/je_object.h @@ -0,0 +1,16 @@ +#ifndef __JE_OBJECT_H +#define __JE_OBJECT_H + +namespace JinEngine +{ + + /// + /// Base class of all objects in Jin. + /// + class Object + { + }; + +} // namespace JinEngine + +#endif
\ No newline at end of file diff --git a/src/libjin/Common/je_pool.hpp b/src/libjin/Common/je_pool.hpp new file mode 100644 index 0000000..1107fd5 --- /dev/null +++ b/src/libjin/Common/je_pool.hpp @@ -0,0 +1,11 @@ +#ifndef __JE_POOL_H +#define __JE_POOL_H + +namespace JinEngine +{ + + + +} + +#endif
\ No newline at end of file diff --git a/src/libjin/Common/je_temporary.h b/src/libjin/Common/je_temporary.h new file mode 100644 index 0000000..5af8704 --- /dev/null +++ b/src/libjin/Common/je_temporary.h @@ -0,0 +1,31 @@ +#ifndef __JE_ON_STACK_H +#define __JE_ON_STACK_H + +namespace JinEngine +{ + + /// + /// Class inherites this clound only be created on stack or static zone. + /// + class Temporary + { + public: + Temporary() {}; + virtual ~Temporary() {}; +/* + protected: + void operator delete(void* t) + { + if(t != nullptr) + free(t); + } +*/ + private: + // Disable new operands. + void* operator new(size_t); + + }; + +} // namespace JinEngine + +#endif
\ No newline at end of file diff --git a/src/libjin/Filesystem/je_asset_database.cpp b/src/libjin/Filesystem/je_asset_database.cpp index 738b18f..ac547f0 100644 --- a/src/libjin/Filesystem/je_asset_database.cpp +++ b/src/libjin/Filesystem/je_asset_database.cpp @@ -46,7 +46,7 @@ namespace JinEngine Buffer* read(const char* path) { - + return nullptr; } void* AssetDatabase::read(const char* path, unsigned int* len) @@ -74,6 +74,11 @@ namespace JinEngine return smtexists(mSmt, path) == 0; } + std::vector<std::string> AssetDatabase::getFiles(const char* path, bool recursive) + { + + } + } // namespace Filesystem } // namespace JinEngine diff --git a/src/libjin/Filesystem/je_asset_database.h b/src/libjin/Filesystem/je_asset_database.h index 3d47f15..8c30fc1 100644 --- a/src/libjin/Filesystem/je_asset_database.h +++ b/src/libjin/Filesystem/je_asset_database.h @@ -4,6 +4,8 @@ #include "../core/je_configuration.h" #if defined(jin_filesystem) +#include <vector> + #include "../3rdparty/smount/smount.h" #include "je_buffer.h" @@ -32,6 +34,13 @@ namespace JinEngine AssetDatabase(); /// + /// Set asset root folder. + /// + /// @param root Root folder of assets. + /// + void mount(const char* root); + + /// /// Check if the path is directory. /// /// @param path Path under asset folder. @@ -73,11 +82,13 @@ namespace JinEngine void* read(const char* path, unsigned int* length); /// - /// Set asset root folder. - /// - /// @param root Root folder of assets. + /// Get files under given directory. + /// + /// @param path Path of directory. + /// @param recursive Recursivily search folder. + /// @return File list under given directory. /// - void mount(const char* root); + std::vector<std::string> getFiles(const char* path, bool recursive); /// /// Get full path of asset. @@ -89,7 +100,9 @@ namespace JinEngine private: static AssetDatabase* mAssetDatabase; +#if jin_filesystem == jin_filesystem_smount smtShared* mSmt; +#endif }; diff --git a/src/libjin/Filesystem/je_buffer.h b/src/libjin/Filesystem/je_buffer.h index a2f4deb..0726e1d 100644 --- a/src/libjin/Filesystem/je_buffer.h +++ b/src/libjin/Filesystem/je_buffer.h @@ -7,6 +7,7 @@ #include <string.h> #include <stdlib.h> +#include "../common/je_temporary.h" #include "../common/je_types.h" namespace JinEngine @@ -17,7 +18,7 @@ namespace JinEngine /// /// Data buffer allocated on heap. /// - class Buffer + class Buffer : public Temporary { public: /// @@ -158,10 +159,6 @@ namespace JinEngine byte* mData; size_t mSize; - // diasble new and delete - void* operator new(size_t t); - void operator delete(void*); - }; } // namespace Filesystem diff --git a/src/libjin/Game/je_entity.cpp b/src/libjin/Game/je_entity.cpp new file mode 100644 index 0000000..1396518 --- /dev/null +++ b/src/libjin/Game/je_entity.cpp @@ -0,0 +1,11 @@ +#include "je_entity.h" + +namespace JinEngine +{ + namespace Game + { + + + + } // namespace Game +} // namespace JinEngine
\ No newline at end of file diff --git a/src/libjin/Game/je_entity.h b/src/libjin/Game/je_entity.h index 41a3c10..4a252da 100644 --- a/src/libjin/Game/je_entity.h +++ b/src/libjin/Game/je_entity.h @@ -4,9 +4,11 @@ #include "../core/je_configuration.h" #if defined(jin_game) +#include <list> #include <map> #include <set> +#include "../common/je_object.h" #include "../common/je_types.h" namespace JinEngine @@ -17,24 +19,41 @@ namespace JinEngine /// /// Game object base class. /// - class Entity + class Entity : public Object { public: + + /// + /// + /// virtual ~Entity(); + /// + /// + /// void lifecycle(); + /// + /// + /// + void setVisible(bool isVisible); + + /// + /// + /// + void setActive(bool isActive); + protected: virtual void onAlive(); virtual void onUpdate(float dt); virtual void onDraw(); virtual void onDie(); - uint32 layer; // layer where entity belongs - uint32 index; // render index in layer - uint64 tag; // tag of entity - bool mIsVisible; - bool mIsActive; + uint32 layer; // layer where entity belongs + uint32 index; // render index in layer + uint64 tag; // tag of entity, 64 now + bool mIsVisible; // if the entity is visible or not + bool mIsActive; // if the entity is joined into the logic }; diff --git a/src/libjin/Game/je_scene.cpp b/src/libjin/Game/je_scene.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/libjin/Game/je_scene.cpp diff --git a/src/libjin/Game/je_scene.h b/src/libjin/Game/je_scene.h index 34d4569..f510a1f 100644 --- a/src/libjin/Game/je_scene.h +++ b/src/libjin/Game/je_scene.h @@ -65,8 +65,8 @@ namespace JinEngine }; - } -} + } // namespace Game +} // namespace JinEngine #endif // jin_game diff --git a/src/libjin/Graphics/Font/je_texture_font.cpp b/src/libjin/Graphics/Font/je_texture_font.cpp index f85a8ce..2c04815 100644 --- a/src/libjin/Graphics/Font/je_texture_font.cpp +++ b/src/libjin/Graphics/Font/je_texture_font.cpp @@ -245,7 +245,7 @@ namespace JinEngine } TextureFont::TextureFont(const Bitmap* bitmap, const Content& codepoints, int cellw, int cellh) - : Drawable(bitmap) + : Graphic(bitmap) , Font(cellh) { TextureGlyph glyph; @@ -266,7 +266,7 @@ namespace JinEngine } TextureFont::TextureFont(const Bitmap* bitmap, const Content& codepoints, Color mask, int cellh) - : Drawable(bitmap) + : Graphic(bitmap) , Font(cellh) { TextureGlyph glyph; diff --git a/src/libjin/Graphics/Font/je_texture_font.h b/src/libjin/Graphics/Font/je_texture_font.h index 43d92c8..6276350 100644 --- a/src/libjin/Graphics/Font/je_texture_font.h +++ b/src/libjin/Graphics/Font/je_texture_font.h @@ -6,7 +6,7 @@ #include "../../math/je_vector4.hpp" -#include "../je_drawable.h" +#include "../je_graphic.h" #include "../je_bitmap.h" #include "je_page.h" @@ -22,7 +22,7 @@ namespace JinEngine /// /// class TextureFont : public Font - , public Drawable + , public Graphic { public: diff --git a/src/libjin/Graphics/Font/je_ttf.h b/src/libjin/Graphics/Font/je_ttf.h index 7bc6934..e3d63b2 100644 --- a/src/libjin/Graphics/Font/je_ttf.h +++ b/src/libjin/Graphics/Font/je_ttf.h @@ -10,7 +10,7 @@ #include "../../math/je_quad.h" #include "../je_color.h" -#include "../je_drawable.h" +#include "../je_graphic.h" #include "je_page.h" #include "je_font.h" diff --git a/src/libjin/Graphics/Shader/je_default.shader.h b/src/libjin/Graphics/Shader/je_default.shader.h index f0175d7..3f57c44 100644 --- a/src/libjin/Graphics/Shader/je_default.shader.h +++ b/src/libjin/Graphics/Shader/je_default.shader.h @@ -14,7 +14,7 @@ Vertex vert(Vertex v) Color frag(Color col, Texture tex, Vertex v) { - return col; + return col * texel(tex, v.uv); } #END_FRAGMENT_SHADER diff --git a/src/libjin/Graphics/Shader/je_jsl_compiler.cpp b/src/libjin/Graphics/Shader/je_jsl_compiler.cpp index 2683969..81b14e8 100644 --- a/src/libjin/Graphics/Shader/je_jsl_compiler.cpp +++ b/src/libjin/Graphics/Shader/je_jsl_compiler.cpp @@ -1,16 +1,54 @@ #include "../../core/je_configuration.h" #if defined(jin_graphics) && (jin_graphics & jin_graphics_shader) +#include "../../Filesystem/je_buffer.h" + #include "je_jsl_compiler.h" +using namespace std; +using namespace JinEngine::Filesystem; + namespace JinEngine { namespace Graphics { +#include "je_base.shader.h" + bool JSLCompiler::compile(const string& jsl, string* vertex_shader, string* fragment_shader) + { + // parse shader source, need some optimizations + int loc_VERTEX_SHADER = jsl.find("#VERTEX_SHADER"); + int loc_END_VERTEX_SHADER = jsl.find("#END_VERTEX_SHADER"); + int loc_FRAGMENT_SHADER = jsl.find("#FRAGMENT_SHADER"); + int loc_END_FRAGMENT_SHADER = jsl.find("#END_FRAGMENT_SHADER"); + if (loc_VERTEX_SHADER == string::npos + || loc_END_VERTEX_SHADER == string::npos + || loc_FRAGMENT_SHADER == string::npos + || loc_END_FRAGMENT_SHADER == string::npos + ) + return false; + // Load vertex and fragment shader source into buffers. + { + // Compile JSL vertex program. + int start = loc_VERTEX_SHADER + strlen("#VERTEX_SHADER"); + *vertex_shader = jsl.substr(start, loc_END_VERTEX_SHADER - start); + Buffer vbuffer = Buffer(vertex_shader->length() + BASE_VERTEX_SHADER_SIZE); + formatVertexShader((char*)&vbuffer, vertex_shader->c_str()); + vertex_shader->assign((char*)&vbuffer); + } + { + // Compile JSL fragment program. + int start = loc_FRAGMENT_SHADER + strlen("#FRAGMENT_SHADER"); + *fragment_shader = jsl.substr(start, loc_END_FRAGMENT_SHADER - start); + Buffer fbuffer = Buffer(fragment_shader->length() + BASE_FRAGMENT_SHADER_SIZE); + formatFragmentShader((char*)&fbuffer, fragment_shader->c_str()); + fragment_shader->assign((char*)&fbuffer); + } + return true; + } } // namespace Graphics -} // namespace JinEngine +} // namespace JinEngine #endif // (jin_graphics) && (jin_graphics & jin_graphics_shader)
\ No newline at end of file diff --git a/src/libjin/Graphics/Shader/je_jsl_compiler.h b/src/libjin/Graphics/Shader/je_jsl_compiler.h index 1817a7b..29129e1 100644 --- a/src/libjin/Graphics/Shader/je_jsl_compiler.h +++ b/src/libjin/Graphics/Shader/je_jsl_compiler.h @@ -4,6 +4,8 @@ #include "../../core/je_configuration.h" #if defined(jin_graphics) && (jin_graphics & jin_graphics_shader) +#include <string> + #include "../../common/je_singleton.hpp" namespace JinEngine @@ -17,7 +19,15 @@ namespace JinEngine class JSLCompiler : public Singleton<JSLCompiler> { public: - + /// + /// Compile JSL shader source into GLSL. + /// + /// @param jsl JSL shader source. + /// @param glsl_vertex Output of vertex glsl shader source. + /// @param glsl_fragment Output of fragment glsl shader source. + /// @return True if compile successful, otherwise return false. + /// + bool compile(const std::string& jsl, std::string* glsl_vertex, std::string* glsl_fragment); private: singleton(JSLCompiler); diff --git a/src/libjin/Graphics/Shader/je_shader.cpp b/src/libjin/Graphics/Shader/je_shader.cpp index 6c8076a..b0e7506 100644 --- a/src/libjin/Graphics/Shader/je_shader.cpp +++ b/src/libjin/Graphics/Shader/je_shader.cpp @@ -6,6 +6,7 @@ #include "../../filesystem/je_buffer.h" #include "../../utils/je_macros.h" +#include "je_jsl_compiler.h" #include "je_shader.h" namespace JinEngine @@ -13,8 +14,8 @@ namespace JinEngine namespace Graphics { + using namespace std; using namespace JinEngine::Filesystem; - using namespace std; // // default_texture @@ -82,49 +83,39 @@ namespace JinEngine bool Shader::compile(const string& program) { - // parse shader source, need some optimizations - int loc_VERTEX_SHADER = program.find("#VERTEX_SHADER"); - int loc_END_VERTEX_SHADER = program.find("#END_VERTEX_SHADER"); - int loc_FRAGMENT_SHADER = program.find("#FRAGMENT_SHADER"); - int loc_END_FRAGMENT_SHADER = program.find("#END_FRAGMENT_SHADER"); - if (loc_VERTEX_SHADER == string::npos - || loc_END_VERTEX_SHADER == string::npos - || loc_FRAGMENT_SHADER == string::npos - || loc_END_FRAGMENT_SHADER == string::npos - ) - return false; - // load vertex and fragment shader source into buffers - int start = loc_VERTEX_SHADER + strlen("#VERTEX_SHADER"); - string vertex_shader = program.substr(start, loc_END_VERTEX_SHADER - start); - Buffer vbuffer = Buffer(vertex_shader.length() + BASE_VERTEX_SHADER_SIZE); - formatVertexShader((char*)&vbuffer, vertex_shader.c_str()); - start = loc_FRAGMENT_SHADER + strlen("#FRAGMENT_SHADER"); - string fragment_shader = program.substr(start, loc_END_FRAGMENT_SHADER - start); - Buffer fbuffer = Buffer(fragment_shader.length() + BASE_FRAGMENT_SHADER_SIZE); - formatFragmentShader((char*)&fbuffer, fragment_shader.c_str()); - // compile - GLint success; - GLuint vshader = glCreateShader(GL_VERTEX_SHADER); - const byte* _data = &vbuffer; - glShaderSource(vshader, 1, (const GLchar**)&_data, NULL); - glCompileShader(vshader); - glGetShaderiv(vshader, GL_COMPILE_STATUS, &success); - if (success == GL_FALSE) - return false; - GLuint fshader = glCreateShader(GL_FRAGMENT_SHADER); - _data = &fbuffer; - glShaderSource(fshader, 1, (const GLchar**)&_data, NULL); - glCompileShader(fshader); - glGetShaderiv(fshader, GL_COMPILE_STATUS, &success); - if (success == GL_FALSE) - return false; + string vertex_shader, fragment_shader; + // Compile JSL shader source into GLSL shader source. + JSLCompiler* compiler = JSLCompiler::get(); + if (!compiler->compile(program, &vertex_shader, &fragment_shader)) + { + return false; + } +#define glsl(SHADER_MODE, SHADER, SRC) \ +do{ \ +const GLchar* src = SRC.c_str(); \ +glShaderSource(SHADER, 1, &src, NULL); \ +glCompileShader(SHADER); \ +GLint success; \ +glGetShaderiv(SHADER, GL_COMPILE_STATUS, &success); \ +if (success == GL_FALSE) \ + return false; \ +}while(0) + // Compile vertex shader. + GLuint vid = glCreateShader(GL_VERTEX_SHADER); + glsl(GL_VERTEX_SHADER, vid, vertex_shader); + // Compile fragment shader. + GLuint fid = glCreateShader(GL_FRAGMENT_SHADER); + glsl(GL_FRAGMENT_SHADER, fid, fragment_shader); +#undef glsl + // Create OpenGL shader program. mPID = glCreateProgram(); - glAttachShader(mPID, vshader); - glAttachShader(mPID, fshader); + glAttachShader(mPID, vid); + glAttachShader(mPID, fid); glLinkProgram(mPID); + GLint success; glGetProgramiv(mPID, GL_LINK_STATUS, &success); if (success == GL_FALSE) - throw false; + return false; } static inline GLint getMaxTextureUnits() @@ -133,7 +124,7 @@ namespace JinEngine glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits); return maxTextureUnits; } - + void Shader::use() { glUseProgram(mPID); diff --git a/src/libjin/Graphics/animation/je_animation.h b/src/libjin/Graphics/animation/je_animation.h index c006f83..f330a0c 100644 --- a/src/libjin/Graphics/animation/je_animation.h +++ b/src/libjin/Graphics/animation/je_animation.h @@ -6,6 +6,9 @@ namespace JinEngine namespace Graphics { + /// + /// + /// class Animation { diff --git a/src/libjin/Graphics/animation/je_clip.h b/src/libjin/Graphics/animation/je_clip.h index 35a35b3..d6709dc 100644 --- a/src/libjin/Graphics/animation/je_clip.h +++ b/src/libjin/Graphics/animation/je_clip.h @@ -6,6 +6,9 @@ namespace JinEngine namespace Graphics { + /// + /// Animation clip with key. + /// class Clip { diff --git a/src/libjin/Graphics/je_bitmap.h b/src/libjin/Graphics/je_bitmap.h index 445bf91..ae97d0d 100644 --- a/src/libjin/Graphics/je_bitmap.h +++ b/src/libjin/Graphics/je_bitmap.h @@ -13,11 +13,11 @@ namespace JinEngine { namespace Graphics { + /// /// A RGBA32 bitmap. /// - /// A bitmap keeps pixels and can't render directly onto screen. To render bitmap, - /// a texture is required. A texture is create from specific bitmap. + /// A bitmap keeps pixels and can't draw directly onto screen. To render bitmap, a texture is required. /// class Bitmap { diff --git a/src/libjin/Graphics/je_canvas.cpp b/src/libjin/Graphics/je_canvas.cpp index 6406e5f..3841206 100644 --- a/src/libjin/Graphics/je_canvas.cpp +++ b/src/libjin/Graphics/je_canvas.cpp @@ -24,16 +24,16 @@ namespace JinEngine } Canvas::Canvas(int w, int h) - : Drawable(w, h) + : Graphic(w, h) { 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 mTexture = gl.genTexture(); gl.bindTexture(mTexture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -44,7 +44,7 @@ namespace JinEngine GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); - /* unbind framebuffer */ + // Unbind framebuffer gl.bindFrameBuffer(current_fbo); } @@ -67,7 +67,7 @@ namespace JinEngine gl.bindFrameBuffer(canvas->fbo); int w = canvas->mSize.w; int h = canvas->mSize.h; - /* set view port to canvas */ + // Set view port to canvas. glViewport(0, 0, w, h); gl.ProjectionMatrix.setOrtho(0, w, 0, h, -1, 1); } diff --git a/src/libjin/Graphics/je_canvas.h b/src/libjin/Graphics/je_canvas.h index a4c0330..f39b0de 100644 --- a/src/libjin/Graphics/je_canvas.h +++ b/src/libjin/Graphics/je_canvas.h @@ -3,7 +3,7 @@ #include "../core/je_configuration.h" #if defined(jin_graphics) -#include "je_drawable.h" +#include "je_graphic.h" namespace JinEngine { @@ -14,7 +14,7 @@ namespace JinEngine /// /// A canvas is a rendering target. /// - class Canvas: public Drawable + class Canvas: public Graphic { public: /// diff --git a/src/libjin/Graphics/je_color.h b/src/libjin/Graphics/je_color.h index 80c1e4d..8fe7691 100644 --- a/src/libjin/Graphics/je_color.h +++ b/src/libjin/Graphics/je_color.h @@ -6,6 +6,7 @@ #include "../core/je_configuration.h" #if defined(jin_graphics) +#include "../common/je_types.h" #include "../utils/je_endian.h" namespace JinEngine @@ -13,7 +14,7 @@ namespace JinEngine namespace Graphics { - typedef unsigned char Channel; + typedef uint8 Channel; class Color { diff --git a/src/libjin/Graphics/je_drawable.cpp b/src/libjin/Graphics/je_graphic.cpp index 7480a32..831e409 100644 --- a/src/libjin/Graphics/je_drawable.cpp +++ b/src/libjin/Graphics/je_graphic.cpp @@ -6,17 +6,16 @@ #include "../math/je_matrix.h" #include "shader/je_shader.h" -#include "je_drawable.h" +#include "je_graphic.h" namespace JinEngine { namespace Graphics { - Drawable::Drawable(int w, int h) + Graphic::Graphic(int w, int h) : mTexture(0) , mSize(w, h) - , mOrigin(0, 0) { mVertexCoords[0] = 0; mVertexCoords[1] = 0; mVertexCoords[2] = 0; mVertexCoords[3] = h; @@ -29,9 +28,8 @@ namespace JinEngine mTextureCoords[6] = 1; mTextureCoords[7] = 0; } - Drawable::Drawable(const Bitmap* bitmap) + Graphic::Graphic(const Bitmap* bitmap) : mTexture(0) - , mOrigin(0, 0) { uint32 w = mSize.w = bitmap->getWidth(); uint32 h = mSize.h = bitmap->getHeight(); @@ -56,20 +54,14 @@ namespace JinEngine gl.bindTexture(0); } - Drawable::~Drawable() + Graphic::~Graphic() { glDeleteTextures(1, &mTexture); } - void Drawable::setOrigin(int x, int y) + void Graphic::draw(int x, int y, float sx, float sy, float r, float ox, float oy) { - mOrigin.x = x; - mOrigin.y = y; - } - - void Drawable::draw(int x, int y, float sx, float sy, float r) - { - gl.ModelMatrix.setTransformation(x, y, r, sx, sy, mOrigin.x, mOrigin.y); + gl.ModelMatrix.setTransformation(x, y, r, sx, sy, ox, oy); Shader* shader = Shader::getCurrentShader(); shader->sendMatrix4(SHADER_MODEL_MATRIX, &gl.ModelMatrix); @@ -82,7 +74,7 @@ namespace JinEngine 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 Graphic::draw(const Math::Quad& slice, int x, int y, float sx, float sy, float r, float ax, float ay) { float vertCoords[8] = { 0, 0, @@ -114,7 +106,7 @@ namespace JinEngine gl.bindTexture(0); } - //void Drawable::setFilter(GLint min, GLint max) + //void Graphic::setFilter(GLint min, GLint max) //{ // glTexParameteri(GL_) //} diff --git a/src/libjin/Graphics/je_drawable.h b/src/libjin/Graphics/je_graphic.h index fdf9ea2..d7e3254 100644 --- a/src/libjin/Graphics/je_drawable.h +++ b/src/libjin/Graphics/je_graphic.h @@ -13,36 +13,39 @@ namespace JinEngine { namespace Graphics { + + // + // Graphic + // |-Texture + // |-Canvas + // + /// - /// - /// - class Drawable + /// Class inherites Graphic doesn't keep any state such as origin, scale and other + /// properties. + /// + class Graphic { public: /// /// /// - Drawable(int w = 0, int h = 0); + Graphic(int w = 0, int h = 0); /// /// /// - Drawable(const Bitmap* bitmap); + Graphic(const Bitmap* bitmap); /// /// /// - virtual ~Drawable(); - - /// - /// - /// - void setOrigin(int x, int y); + virtual ~Graphic(); /// /// /// - void draw(int x, int y, float sx = 1, float sy = 1, float r = 0); + void draw(int x, int y, float sx = 1, float sy = 1, float r = 0, float ox = 0, float oy = 0); /// /// @@ -73,9 +76,11 @@ namespace JinEngine static const int DRAWABLE_V_SIZE = 8; GLuint mTexture; - GLuint mVBO; - JinEngine::Math::Vector2<unsigned int> mSize; - JinEngine::Math::Vector2<int> mOrigin; + + // Size of drawable thing. + JinEngine::Math::Vector2<uint> mSize; + + // Screen coordinates and uv coordinates. float mVertexCoords[DRAWABLE_V_SIZE]; float mTextureCoords[DRAWABLE_V_SIZE]; diff --git a/src/libjin/Graphics/je_sprite.h b/src/libjin/Graphics/je_sprite.h index 4273240..3b96162 100644 --- a/src/libjin/Graphics/je_sprite.h +++ b/src/libjin/Graphics/je_sprite.h @@ -17,11 +17,16 @@ namespace JinEngine class Sprite { public: + void setOrigin(float x, float y); + void setPosition(int x, int y); + void setScale(float x, float y); + void setColor(Color color); + void setShader(const Shader* shader); private: Math::Vector2<int> mPosition; - Math::Vector2<int> mOrigin; - Math::Vector2<int> mScale; + Math::Vector2<float> mOrigin; + Math::Vector2<float> mScale; Color mColor; const Shader* mShader; diff --git a/src/libjin/Graphics/je_texture.cpp b/src/libjin/Graphics/je_texture.cpp index d191c8b..8aa3f9a 100644 --- a/src/libjin/Graphics/je_texture.cpp +++ b/src/libjin/Graphics/je_texture.cpp @@ -30,7 +30,7 @@ namespace JinEngine } Texture::Texture(const Bitmap* bitmap) - : Drawable(bitmap) + : Graphic(bitmap) { } diff --git a/src/libjin/Graphics/je_texture.h b/src/libjin/Graphics/je_texture.h index 5238aa1..ddc8cfc 100644 --- a/src/libjin/Graphics/je_texture.h +++ b/src/libjin/Graphics/je_texture.h @@ -6,7 +6,7 @@ #include "../3rdparty/GLee/GLee.h" #include "je_color.h" -#include "je_drawable.h" +#include "je_graphic.h" #include "je_bitmap.h" namespace JinEngine @@ -17,7 +17,7 @@ namespace JinEngine /// /// /// - class Texture: public Drawable + class Texture: public Graphic { public: /// diff --git a/src/libjin/Graphics/je_window.cpp b/src/libjin/Graphics/je_window.cpp index 8c36c85..f0b789e 100644 --- a/src/libjin/Graphics/je_window.cpp +++ b/src/libjin/Graphics/je_window.cpp @@ -27,15 +27,15 @@ namespace JinEngine return false; const Setting* setting = (Setting*)s; - size.w = setting->width; - size.h = setting->height; - fps = setting->fps; + mSize.w = setting->width; + mSize.h = setting->height; + mFps = setting->fps; bool vsync = setting->vsync; const char* title = setting->title; - if (wnd) + if (mWnd) { - SDL_DestroyWindow(wnd); + SDL_DestroyWindow(mWnd); SDL_FlushEvent(SDL_WINDOWEVENT); } @@ -62,14 +62,14 @@ namespace JinEngine if (setting->fullscreen) flag |= SDL_WINDOW_FULLSCREEN; if (setting->resizable) flag |= SDL_WINDOW_RESIZABLE; - wnd = SDL_CreateWindow(title, wx, wy, size.w, size.h, flag); - if (wnd == NULL) + mWnd = SDL_CreateWindow(title, wx, wy, mSize.w, mSize.h, flag); + if (mWnd == NULL) return false; - ctx = SDL_GL_CreateContext(wnd); + ctx = SDL_GL_CreateContext(mWnd); if (ctx == NULL) return false; SDL_GL_SetSwapInterval(vsync ? 1 : 0); - SDL_GL_MakeCurrent(wnd, ctx); + SDL_GL_MakeCurrent(mWnd, ctx); // default configuration gl.setClearColor(0, 0, 0, 0xff); gl.pushColor(0xff, 0xff, 0xff, 0xff); @@ -90,19 +90,19 @@ namespace JinEngine gl.disable(GL_BLEND); gl.disable(GL_TEXTURE_2D); // close window - SDL_DestroyWindow(wnd); + SDL_DestroyWindow(mWnd); SDL_Quit(); } void Window::swapBuffers() { - if (wnd) - SDL_GL_SwapWindow(wnd); + if (mWnd) + SDL_GL_SwapWindow(mWnd); } void Window::setTitle(const char* title) { - SDL_SetWindowTitle(wnd, title); + SDL_SetWindowTitle(mWnd, title); }; } // namespace Graphics diff --git a/src/libjin/Graphics/je_window.h b/src/libjin/Graphics/je_window.h index 0969a36..7ca1e5e 100644 --- a/src/libjin/Graphics/je_window.h +++ b/src/libjin/Graphics/je_window.h @@ -41,17 +41,17 @@ namespace JinEngine /// /// /// - inline int getW(){ return size.w; } + inline int getW(){ return mSize.w; } /// /// /// - inline int getH(){ return size.h; } + inline int getH(){ return mSize.h; } /// /// /// - inline int getFPS(){ return fps; } + inline int getFPS(){ return mFps; } /// /// @@ -83,9 +83,9 @@ namespace JinEngine /// void quitSystem() override; - SDL_Window* wnd; - JinEngine::Math::Vector2<unsigned int> size; - int fps; + SDL_Window* mWnd; + JinEngine::Math::Vector2<unsigned int> mSize; + int mFps; }; diff --git a/src/libjin/Graphics/particle/je_particle.h b/src/libjin/Graphics/particle/je_particle.h index ba4dd18..2a5c54f 100644 --- a/src/libjin/Graphics/particle/je_particle.h +++ b/src/libjin/Graphics/particle/je_particle.h @@ -11,6 +11,7 @@ namespace JinEngine /// class Particle { + }; diff --git a/src/libjin/Graphics/particle/je_particle_batch.h b/src/libjin/Graphics/particle/je_particle_batch.h index e69de29..19f4ded 100644 --- a/src/libjin/Graphics/particle/je_particle_batch.h +++ b/src/libjin/Graphics/particle/je_particle_batch.h @@ -0,0 +1,20 @@ +#ifndef __JE_PARTICLE_BATCH_H +#define __JE_PARTICLE_BATCH_H + +namespace JinEngine +{ + namespace Graphics + { + + /// + /// + /// + class ParticleBatch + { + + }; + + } // namespace Graphics +} // namespace JinEngine + +#endif
\ No newline at end of file diff --git a/src/libjin/Graphics/particle/je_particle_emitter.cpp b/src/libjin/Graphics/particle/je_particle_emitter.cpp index e69de29..d57d5ed 100644 --- a/src/libjin/Graphics/particle/je_particle_emitter.cpp +++ b/src/libjin/Graphics/particle/je_particle_emitter.cpp @@ -0,0 +1,11 @@ +#include "je_particle_emitter.h" + +namespace JinEngine +{ + namespace Graphics + { + + + + } +} diff --git a/src/libjin/Graphics/particle/je_particle_emitter.h b/src/libjin/Graphics/particle/je_particle_emitter.h index e69de29..e191e36 100644 --- a/src/libjin/Graphics/particle/je_particle_emitter.h +++ b/src/libjin/Graphics/particle/je_particle_emitter.h @@ -0,0 +1,23 @@ +#ifndef __JE_PARTICLE_EMMITTER_H +#define __JE_PARTICLE_EMMITTER_H + +namespace JinEngine +{ + namespace Graphics + { + + /// + /// Particle emitter + /// + class ParticleEmitter + { + public: + + private: + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/src/libjin/core/je_configuration.h b/src/libjin/core/je_configuration.h index 167ffd0..34c3a74 100644 --- a/src/libjin/core/je_configuration.h +++ b/src/libjin/core/je_configuration.h @@ -1,6 +1,8 @@ #ifndef __JE_COMMON_MODULES_H #define __JE_COMMON_MODULES_H +#define jin_undefined 0x00 + #define jin_debug #define jin_os_windows 0x01 @@ -18,14 +20,13 @@ #define jin_audio_openal 0x02 #define jin_audio jin_audio_sdl -#define jin_filesystem +#define jin_filesystem_smount 0x01 +#define jin_filesystem jin_filesystem_smount #define jin_game #define jin_core -#define jin_filesystem - #define jin_input_sdl 0x01 #define jin_input jin_input_sdl diff --git a/src/lua/embed/boot.lua.h b/src/lua/embed/boot.lua.h index 35606af..99e657b 100644 --- a/src/lua/embed/boot.lua.h +++ b/src/lua/embed/boot.lua.h @@ -40,6 +40,7 @@ end function jin.core.run() call(jin.core.onLoad) + jin.graphics.reset() local dt = 0 local previous = jin.time.second() local current = previous @@ -138,9 +139,9 @@ jin.nogame = { ------------------------------------------------------------------------- local function onError(msg) + jin.graphics.reset() jin.graphics.setClearColor(100, 100, 100, 255) jin.graphics.clear() - jin.graphics.unsetFont() jin.graphics.print("Error:\n" .. msg .. "\n" .. debug.traceback(), 5, 5) jin.graphics.present() while jin.core.running() do diff --git a/src/lua/embed/graphics.lua.h b/src/lua/embed/graphics.lua.h index 288d2f4..5fa5dad 100644 --- a/src/lua/embed/graphics.lua.h +++ b/src/lua/embed/graphics.lua.h @@ -35,4 +35,12 @@ jin.graphics.unuseShader = function() jin.graphics.useShader(default_shader) end +-- Reset all attributes to default value. +jin.graphics.reset = function() + jin.graphics.setColor(255, 255, 255, 255) + jin.graphics.setClearColor(0, 0, 0, 255) + jin.graphics.clear() + jin.graphics.unsetFont() +end + )"; diff --git a/src/lua/modules/graphics/canvas.cpp b/src/lua/modules/graphics/canvas.cpp index b64dc16..e49e209 100644 --- a/src/lua/modules/graphics/canvas.cpp +++ b/src/lua/modules/graphics/canvas.cpp @@ -40,15 +40,6 @@ namespace JinEngine return 2; } - static int l_setOrigin(lua_State* L) - { - CanvasRef ref = checkCanvas(L); - int x = luax_checknumber(L, 1); - int y = luax_checknumber(L, 2); - ref->setOrigin(x, y); - return 0; - } - static int l_gc(lua_State* L) { Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_CANVAS); @@ -61,7 +52,6 @@ namespace JinEngine { "getWidth", l_getWidth }, { "getHeight", l_getHeight }, { "getSize", l_getSize }, - { "setOrigin", l_setOrigin }, { 0, 0 } }; diff --git a/src/lua/modules/graphics/graphics.cpp b/src/lua/modules/graphics/graphics.cpp index 2608051..8b2d7cd 100644 --- a/src/lua/modules/graphics/graphics.cpp +++ b/src/lua/modules/graphics/graphics.cpp @@ -272,9 +272,11 @@ namespace JinEngine float sx = luax_optnumber(L, 4, 1); float sy = luax_optnumber(L, 5, 1); float r = luax_optnumber(L, 6, 0); + float ox = luax_optnumber(L, 7, 0); + float oy = luax_optnumber(L, 8, 0); Proxy* proxy = (Proxy*)luax_toudata(L, 1); Ref<Texture>& tex = proxy->getRef<Texture>(); - tex->draw(x, y, sx, sy, r); + tex->draw(x, y, sx, sy, r, ox, oy); } static void l_draw_canvas(lua_State* L) @@ -286,9 +288,11 @@ namespace JinEngine float sx = luax_optnumber(L, 4, 1); float sy = luax_optnumber(L, 5, 1); float r = luax_optnumber(L, 6, 0); + float ox = luax_optnumber(L, 7, 0); + float oy = luax_optnumber(L, 8, 0); Proxy* proxy = (Proxy*)luax_toudata(L, 1); Ref<Canvas>& p = proxy->getRef<Canvas>(); - p->draw(x, y, sx, sy, r); + p->draw(x, y, sx, sy, r, ox, oy); } /* jin.graphics.draw(text, font, x, y) */ @@ -371,20 +375,20 @@ namespace JinEngine float sx = luax_optnumber(L, 5, 1); float sy = luax_optnumber(L, 6, 1); float r = luax_optnumber(L, 7, 0); - float ax = luax_optnumber(L, 8, 0); - float ay = luax_optnumber(L, 9, 0); + float ox = luax_optnumber(L, 8, 0); + float oy = luax_optnumber(L, 9, 0); if (luax_istype(L, 1, JIN_GRAPHICS_TEXTURE)) { Proxy* proxy = (Proxy*)luax_toudata(L, 1); Ref<Texture>& tex = proxy->getRef<Texture>(); - tex->draw(q, x, y, sx, sy, r, ax, ay); + tex->draw(q, x, y, sx, sy, r, ox, oy); } else if (luax_istype(L, 1, JIN_GRAPHICS_CANVAS)) { Proxy* proxy = (Proxy*)luax_toudata(L, 1); Ref<Canvas>& p = proxy->getRef<Canvas>(); - p->draw(q, x, y, sx, sy, r, ax, ay); + p->draw(q, x, y, sx, sy, r, ox, oy); } else { diff --git a/src/lua/modules/graphics/texture.cpp b/src/lua/modules/graphics/texture.cpp index 15e258c..61bfaee 100644 --- a/src/lua/modules/graphics/texture.cpp +++ b/src/lua/modules/graphics/texture.cpp @@ -32,15 +32,6 @@ namespace JinEngine return 1; } - static int l_setOrigin(lua_State* L) - { - TextureRef ref = checkTexture(L); - int x = luax_checknumber(L, 2); - int y = luax_checknumber(L, 3); - ref->setOrigin(x, y); - return 0; - } - static int l_getSize(lua_State* L) { TextureRef ref = checkTexture(L); @@ -61,7 +52,6 @@ namespace JinEngine { "getWidth", l_getWidth }, { "getHeight", l_getHeight }, { "getSize", l_getSize }, - { "setOrigin", l_setOrigin }, { 0, 0 } }; diff --git a/src/lua/resources/font.ttf.h b/src/lua/resources/font.ttf.h index 9978fc1..bb0734f 100644 --- a/src/lua/resources/font.ttf.h +++ b/src/lua/resources/font.ttf.h @@ -1,341 +1,364 @@ static const char default_font_bitmap[] = -{ 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,3,106,0,0,0,14,8,6,0,0,0,94, -166,239,218,0,0,0,1,115,82,71,66,0,174,206,28,233,0,0,0,4,103,65,77,65,0,0, -177,143,11,252,97,5,0,0,0,9,112,72,89,115,0,0,14,195,0,0,14,195,1,199,111,168, -100,0,0,0,24,116,69,88,116,83,111,102,116,119,97,114,101,0,112,97,105,110,116, -46,110,101,116,32,52,46,49,46,49,99,42,156,75,0,0,26,249,73,68,65,84,120,94, -237,156,191,146,45,73,78,198,231,149,246,9,176,246,13,88,159,117,112,214,29, -147,8,28,204,113,0,103,173,193,193,218,87,3,139,192,193,186,212,79,95,233,232, -147,50,171,78,117,223,190,196,16,177,58,161,233,74,233,75,165,254,101,86,213, -233,158,251,211,183,159,190,125,131,127,26,148,242,157,46,201,49,119,56,232,9, -238,9,6,122,138,131,238,112,31,181,241,4,191,195,221,205,219,225,119,180,195, -185,204,229,79,232,233,188,167,56,232,71,96,29,119,133,189,211,65,79,230,222, -205,135,62,138,59,135,111,233,43,237,126,21,38,41,177,79,109,190,195,37,253,8, -188,99,158,224,206,225,45,185,189,39,115,238,240,87,242,164,119,122,167,39, -216,39,152,29,249,188,167,115,63,138,135,158,206,121,138,155,244,145,121,79, -112,31,181,245,213,88,232,163,248,73,79,231,126,100,141,175,182,153,184,43, -172,235,175,48,78,79,177,63,202,222,255,55,220,247,200,167,46,233,74,255,81, -121,210,59,61,244,84,63,49,239,230,65,87,152,148,79,221,149,60,201,245,87,152, -164,207,98,79,81,163,167,250,115,216,232,183,164,187,162,156,243,35,230,61, -193,56,125,20,159,244,154,147,23,92,37,133,180,228,91,195,19,19,252,237,219, -175,7,255,194,200,41,144,29,123,106,138,2,113,131,57,165,178,127,131,115,66, -247,194,253,225,117,133,127,208,175,47,201,83,27,201,79,227,252,246,237,191, -15,254,163,201,242,234,143,7,255,199,193,191,55,29,244,251,131,145,163,63,173, -110,237,178,182,251,159,124,206,184,39,112,54,231,114,94,160,30,224,160,64, -126,49,54,80,29,215,176,37,89,117,73,161,189,208,15,221,118,62,20,168,143,227, -78,233,53,13,252,119,217,253,44,230,53,50,14,121,199,126,251,246,143,109,84, -204,190,234,18,205,119,137,243,196,95,217,61,56,236,232,83,210,29,30,217,148, -190,199,201,190,235,157,215,184,22,155,109,254,157,15,171,174,143,166,126,172, -211,248,13,54,124,210,231,18,3,39,53,249,180,13,239,236,219,120,51,167,143, -118,172,79,73,54,254,5,127,180,183,14,14,253,83,251,176,99,235,30,209,217,253, -184,179,53,115,49,176,225,91,142,31,96,161,151,236,6,223,112,87,236,243,199, -90,141,111,112,203,58,159,177,217,163,232,172,79,151,248,168,219,17,95,213,12, -158,246,158,212,247,184,74,106,24,184,227,158,218,131,251,40,121,198,115,149, -195,137,123,186,238,7,252,139,120,245,121,47,79,63,119,245,152,49,172,152,189, -205,55,242,164,208,222,232,161,64,108,244,47,201,244,73,207,93,127,137,159,41, -27,113,36,29,163,154,235,249,157,57,205,249,115,173,97,119,209,139,207,213,58, -33,55,76,240,169,218,82,195,206,94,216,244,64,27,185,95,211,103,125,52,154, -118,239,230,245,53,187,238,233,122,115,222,224,164,99,212,145,211,230,21,207, -121,21,223,207,7,199,51,255,46,119,177,166,75,156,167,205,119,248,100,155,231, -6,98,50,20,210,146,111,155,97,98,130,127,203,47,106,127,31,255,173,23,161,127, -54,221,83,27,201,127,125,81,91,40,144,95,140,13,84,199,53,108,73,86,93,82,104, -83,255,55,175,43,49,227,46,57,103,117,10,212,199,113,167,244,154,6,254,187, -236,126,22,115,142,232,183,255,57,152,195,232,212,198,39,71,16,189,249,95,113, -85,244,115,59,96,225,158,99,250,212,105,197,107,205,73,58,16,225,89,163,61, -254,231,134,17,110,174,77,124,187,189,8,79,236,47,139,159,176,214,230,134,254, -187,131,61,127,251,253,232,251,185,235,242,234,234,28,192,62,235,84,61,180, -198,140,1,90,206,140,67,222,125,175,218,237,124,135,51,167,187,60,166,142,51, -207,53,216,236,15,55,112,213,63,99,112,82,60,107,77,119,216,95,223,244,22,254, -56,85,207,172,241,239,123,1,173,251,162,155,249,236,243,222,179,123,95,147, -122,15,120,125,15,137,229,124,237,151,178,91,113,20,239,240,196,63,107,2,14, -223,99,189,147,215,30,83,29,42,7,133,211,25,80,184,43,159,24,35,255,157,97, -179,79,38,201,159,196,85,13,177,145,164,56,102,95,232,158,157,216,110,39,89, -152,89,147,189,61,213,55,227,132,20,3,54,10,23,117,130,78,73,229,165,227,210, -222,236,195,95,151,117,247,49,247,252,193,171,173,164,190,47,181,174,231,91, -181,244,62,221,227,148,195,25,199,25,115,72,159,200,43,223,187,243,194,247, -207,174,102,123,155,111,228,73,161,189,209,67,129,24,122,155,65,13,230,94,90, -207,50,201,218,185,10,29,186,178,173,222,163,102,191,44,57,213,188,171,179, -253,223,15,254,215,131,215,30,16,159,171,117,66,110,152,224,83,181,165,134,85, -47,176,54,254,254,126,233,149,234,209,213,111,245,144,124,69,226,126,40,7,217, -99,189,222,37,87,127,122,142,106,61,252,233,121,144,15,218,115,72,124,189,238, -103,238,99,217,151,60,99,175,57,176,124,103,29,168,98,41,249,186,22,172,188, -245,179,106,230,174,143,254,233,96,124,129,255,28,178,105,179,98,128,231,158, -175,88,192,157,40,55,16,1,66,33,45,249,182,25,38,38,56,155,118,76,9,100,199, -158,154,162,64,220,96,78,169,236,223,224,156,208,189,112,74,56,9,96,147,252, -110,36,251,156,177,82,160,10,39,126,26,39,141,217,55,176,107,167,14,122,127, -56,8,183,30,54,226,115,198,61,129,179,57,151,243,2,245,0,7,5,242,139,177,129, -234,184,134,45,201,170,75,10,109,234,117,168,144,91,29,68,51,255,155,249,80, -160,62,142,59,165,215,52,240,223,101,247,51,152,215,149,250,233,63,15,222,31, -198,240,232,205,243,39,7,115,127,113,80,142,243,240,155,7,34,251,102,222,184, -250,77,64,12,78,178,117,143,172,248,181,142,144,246,136,75,29,183,187,81,20, -150,185,87,47,45,47,108,228,180,240,235,126,244,156,117,93,94,85,47,186,94, -246,89,71,55,15,253,212,77,112,222,36,70,93,194,39,125,118,24,108,164,205,100, -214,226,76,148,206,53,112,173,93,55,78,49,54,241,177,251,174,250,227,11,120, -242,146,26,240,216,89,95,130,215,120,115,220,207,122,217,78,59,94,219,196,75, -102,55,184,224,172,79,73,24,131,239,253,85,182,221,15,30,168,234,33,66,62,36, -87,253,24,187,45,120,232,163,54,210,172,253,194,23,135,238,87,105,42,55,41, -129,229,227,196,18,35,228,117,210,90,254,197,164,214,2,235,57,225,250,151,13, -14,91,228,68,49,186,63,142,237,121,129,11,231,245,22,206,109,38,110,215,23, -224,32,250,115,221,39,176,236,17,99,198,92,246,214,122,176,30,113,130,185,90, -215,235,4,87,78,223,247,173,120,246,31,243,228,163,231,123,237,151,53,135,216, -197,254,124,161,163,175,200,95,236,249,131,171,111,222,227,122,47,136,21,179, -62,239,229,30,183,203,165,251,151,131,179,87,136,119,158,139,123,155,111,228, -73,161,189,209,67,129,24,250,115,132,95,58,43,75,15,33,39,158,234,47,245,62, -249,130,67,26,118,220,182,234,170,125,179,246,6,57,215,179,102,151,147,59,228, -60,208,175,122,241,42,145,116,209,132,83,23,212,176,213,35,252,100,221,94,23, -245,94,250,214,95,250,103,46,188,191,149,3,250,84,189,237,61,173,121,149,115, -183,169,245,42,239,222,147,154,87,54,125,189,242,83,253,39,105,198,134,92,200, -253,61,64,254,95,95,51,103,206,203,61,248,15,7,131,251,211,193,189,127,88,75, -87,172,143,207,196,197,60,249,231,57,129,149,51,250,99,222,35,97,230,178,103, -91,79,185,129,179,188,155,205,80,87,197,51,17,112,54,109,151,174,216,10,172, -120,6,179,195,164,253,46,237,35,103,95,87,197,175,205,227,141,113,103,99,250, -5,63,141,147,185,125,190,107,87,219,222,212,247,56,214,94,31,12,193,117,201, -158,119,126,186,62,121,174,59,71,206,79,109,194,19,203,216,245,201,235,250, -171,93,199,236,236,248,90,213,3,186,233,247,30,120,158,135,39,184,43,140,243, -87,218,253,40,166,174,242,112,230,80,169,222,211,39,177,208,236,205,26,59,78, -57,166,63,251,193,153,220,125,128,242,32,156,88,237,177,89,163,129,223,158,87, -194,105,143,156,24,40,80,169,215,97,249,220,79,120,183,182,52,251,253,120,149, -163,178,92,189,232,122,217,103,29,214,3,83,15,91,115,239,140,186,132,79,250, -236,48,245,45,110,105,153,71,253,213,3,62,15,174,152,185,81,229,195,53,26,126, -34,239,190,171,254,251,243,209,99,113,105,143,55,165,92,95,189,204,68,93,7, -227,15,182,215,223,124,172,115,240,67,121,119,108,229,162,247,195,216,55,145, -99,141,202,78,104,226,147,56,168,233,109,222,218,47,117,243,174,90,139,203,70, -74,224,21,155,245,128,61,247,170,197,254,33,73,249,18,115,221,243,33,220,172, -13,63,25,111,127,19,245,26,121,206,215,51,120,246,71,217,76,9,172,245,225,125, -14,224,253,189,67,107,123,204,112,217,75,222,225,92,143,95,244,131,226,159, -246,148,27,244,94,175,171,61,138,13,245,201,21,238,24,89,14,203,246,186,46, -235,121,159,238,243,227,53,16,151,31,142,203,117,245,121,47,119,223,92,14,247, -28,107,125,151,164,190,247,206,181,252,24,57,133,246,70,15,5,98,232,207,209, -190,207,118,121,33,231,35,207,97,199,109,11,67,126,119,189,129,77,116,119,47, -106,127,94,230,137,243,170,247,141,62,142,91,131,55,106,216,127,139,255,18, -143,190,112,99,236,122,197,66,126,214,61,43,93,249,226,53,154,243,244,153,243, -232,205,222,199,210,85,126,239,116,190,158,250,132,28,226,11,235,50,174,245, -179,231,102,31,233,183,91,216,76,60,184,251,250,106,94,238,161,156,179,246, -168,206,32,48,59,186,234,183,60,123,51,22,8,25,254,100,174,95,247,99,95,48,28, -133,66,90,114,136,255,186,35,187,95,255,65,96,242,97,32,105,109,226,42,4,77, -147,212,31,18,132,33,144,73,253,69,173,14,106,247,79,201,241,132,174,182,106, -189,189,13,10,171,6,75,109,242,26,39,113,244,95,237,10,247,93,127,250,120,48, -235,200,118,199,173,7,160,228,105,151,67,32,41,27,44,105,247,237,79,174,203, -188,172,137,114,232,184,125,158,228,223,51,155,122,24,216,247,195,251,90,195, -90,155,218,96,11,31,43,15,178,227,190,245,63,67,89,215,232,57,244,186,72,82,7, -66,199,145,79,229,167,227,202,223,213,22,107,43,254,26,207,245,177,235,24,98, -233,117,88,215,78,156,175,205,124,236,56,201,110,98,42,43,248,145,246,176,3, -191,125,33,56,184,230,117,92,229,236,148,58,29,146,105,215,215,23,70,154,43, -251,13,31,60,247,157,112,218,35,46,237,231,193,226,103,227,189,205,117,109, -177,214,114,9,236,57,235,186,188,170,30,113,125,249,198,222,161,110,229,163, -62,142,109,117,137,252,93,99,176,227,53,132,201,17,114,253,244,121,112,143, -185,250,67,54,145,223,158,97,73,92,31,92,57,239,115,118,181,88,115,58,112,73, -92,159,140,111,187,243,109,246,66,197,209,207,7,124,239,249,134,123,62,125, -205,170,223,138,131,154,222,230,173,177,209,111,21,31,250,212,8,187,126,97,49, -115,198,90,220,228,121,161,70,142,190,106,225,57,169,115,156,185,232,97,217, -241,124,116,28,54,177,87,107,246,51,162,174,164,175,115,76,31,105,228,23,126, -122,15,86,158,82,34,126,167,15,76,210,41,169,28,206,62,168,120,224,202,159, -239,245,194,100,238,248,6,93,184,181,175,192,248,57,11,238,234,175,0,136,25, -125,210,106,175,143,152,179,246,40,92,47,187,170,131,122,100,247,165,214,236, -251,234,7,199,29,179,34,127,250,188,151,123,13,93,14,87,254,42,191,174,247, -250,116,57,53,38,151,91,223,146,24,155,110,209,67,129,48,189,161,149,179,53, -79,217,215,213,95,125,63,70,158,23,219,212,47,109,206,90,106,254,122,31,73, -121,242,172,173,56,175,202,47,73,87,172,106,188,163,93,126,181,135,210,103, -215,43,22,245,17,18,95,171,114,161,154,123,172,154,87,189,234,243,164,171,158, -91,231,225,19,54,239,95,212,92,87,249,99,205,164,58,107,228,255,250,126,226, -177,213,181,242,80,168,181,30,242,131,231,87,176,154,63,49,213,243,96,121,54, -37,87,224,229,211,236,1,207,151,219,45,159,184,22,230,156,227,6,162,17,161, -144,150,28,98,82,6,84,137,119,140,112,44,162,7,119,73,248,185,110,62,201,193, -85,146,214,96,106,174,36,172,203,184,55,160,138,154,137,79,169,2,246,13,169, -195,13,91,42,190,235,202,6,155,130,36,231,88,177,36,46,121,141,147,241,238, -102,250,61,47,106,229,207,190,233,118,15,134,204,203,166,66,66,126,33,240,140, -209,239,234,145,185,205,248,115,188,219,204,138,181,164,172,1,118,23,139,219, -68,90,49,117,108,249,37,73,198,209,107,45,44,107,107,189,148,150,14,95,124, -189,190,169,170,7,148,251,181,94,165,147,4,59,216,155,55,27,244,89,39,36,53, -175,48,204,213,193,38,73,190,92,102,207,19,71,183,43,255,144,147,39,230,173,7, -213,147,181,251,205,160,240,110,167,14,151,92,143,235,170,229,186,31,177,131, -206,105,253,102,206,115,118,72,38,5,186,227,91,205,2,35,205,26,87,225,157,174, -246,40,49,57,41,174,210,55,63,79,38,23,73,187,222,155,107,59,253,136,23,53,8, -159,66,19,185,89,243,215,250,225,1,134,188,164,205,90,95,178,222,143,154,235, -245,1,79,190,145,49,7,249,244,125,241,7,226,250,100,245,155,75,214,90,96,67, -123,229,6,231,196,248,96,197,182,63,47,157,114,157,158,43,157,111,232,32,245, -11,154,126,99,246,245,60,127,221,22,60,244,54,79,126,58,182,246,35,235,103, -190,97,157,33,51,38,157,21,94,75,174,97,214,82,93,180,190,206,144,190,159,243, -42,243,249,234,177,243,51,113,216,34,14,190,56,144,189,123,172,106,87,154,210, -150,173,232,143,147,43,79,41,17,191,211,59,38,153,88,148,191,121,134,41,199, -89,95,72,62,58,78,103,167,247,89,93,207,26,8,235,204,218,187,231,0,234,226, -207,11,216,237,231,145,56,175,170,238,146,118,123,117,159,112,218,189,128,176, -206,92,119,119,94,170,55,231,58,87,114,247,207,229,112,207,223,238,75,147,210, -117,57,62,146,147,110,115,230,216,107,37,14,31,157,2,97,250,243,170,122,104, -218,80,79,226,83,213,163,239,199,253,254,208,121,129,110,251,210,189,241,229, -37,79,10,109,215,123,204,229,23,227,53,246,53,120,163,134,125,151,199,234,41, -226,149,87,169,235,207,10,61,86,229,160,114,228,243,164,171,253,238,243,180, -30,243,136,111,247,91,179,170,151,247,181,116,217,67,232,97,239,113,252,184, -250,101,4,253,5,49,151,47,180,132,45,90,235,168,24,176,205,26,90,103,98,42, -183,196,3,179,22,182,241,115,247,242,199,154,137,171,250,74,166,60,106,205,63, -231,28,55,112,150,119,187,49,249,111,58,155,180,187,169,103,224,46,69,54,111, -184,96,210,161,171,53,27,230,100,217,119,73,21,109,146,26,32,113,149,112,221, -104,60,217,101,131,68,165,180,26,44,37,201,107,156,204,235,235,9,247,217,23, -53,124,148,61,52,251,66,95,189,168,201,174,36,21,195,28,247,121,19,7,239,114, -189,195,85,238,222,99,145,129,157,113,63,171,53,188,230,222,235,136,125,54, -163,110,130,72,253,0,168,30,192,175,221,255,239,83,58,73,246,177,213,161,150, -62,203,39,63,80,132,193,79,24,123,96,242,112,216,231,65,254,101,12,117,248, -120,253,203,110,174,173,107,95,187,174,122,95,187,29,29,46,185,86,246,125,141, -187,61,8,157,215,51,109,223,62,116,79,58,48,211,110,237,157,19,207,207,38,191, -193,7,123,141,11,231,57,18,59,110,248,57,88,245,156,210,221,218,98,173,229,18, -216,115,214,117,121,85,253,230,250,242,45,127,59,82,113,232,227,216,86,151, -200,223,61,6,166,198,252,84,156,66,113,189,59,211,103,204,224,153,255,119,7, -35,191,58,195,94,254,64,92,31,92,57,239,115,82,238,180,222,52,125,254,33,73, -226,250,100,197,179,206,243,94,72,255,241,179,231,170,30,72,18,7,45,127,26, -103,107,18,163,234,23,154,248,36,14,106,122,155,39,127,28,91,51,61,127,149, -251,217,227,58,43,192,112,175,96,78,61,216,103,45,197,138,219,247,126,197,137, -31,121,175,137,156,54,92,95,49,243,33,156,180,59,155,172,151,185,86,204,142, -83,13,221,87,184,242,148,18,241,59,189,175,75,14,168,235,107,237,17,203,172, -47,44,95,189,190,235,249,90,61,55,207,196,99,148,116,74,246,126,118,123,240, -126,31,148,127,85,119,198,250,20,78,250,234,97,173,171,61,237,56,245,72,214, -13,34,239,202,189,227,206,56,248,105,178,107,185,215,208,229,112,173,169,120, -103,13,116,223,89,207,236,43,121,213,53,105,158,81,225,163,19,178,151,190,114, -122,237,147,214,32,223,94,183,188,42,157,164,165,81,172,216,252,218,23,181,94, -51,167,229,158,116,154,217,210,192,158,82,17,99,211,65,125,95,118,125,94,225, -87,63,95,149,131,58,103,124,158,116,228,77,231,153,207,211,58,218,43,72,188, -238,217,11,190,15,82,162,253,201,90,248,146,210,236,127,190,72,146,205,171, -254,18,103,77,185,135,97,139,216,177,65,252,253,121,163,239,73,244,60,151,205, -251,23,115,253,221,200,233,231,77,191,169,103,124,77,105,148,95,93,43,167,231, -28,55,112,150,112,91,68,130,82,194,196,92,239,110,234,51,129,123,172,48,42, -108,242,186,65,87,76,218,119,137,175,209,177,187,127,242,179,18,211,155,102, -103,163,26,44,37,201,107,156,204,83,126,58,238,51,47,106,52,28,255,176,67,29, -196,107,161,149,27,151,73,94,118,37,169,24,230,184,207,155,56,120,151,235,29, -238,170,198,59,108,249,215,177,207,106,13,175,185,175,220,104,19,195,172,195, -198,233,53,169,30,144,15,222,3,176,235,36,217,199,214,237,212,3,171,247,112, -239,55,30,184,241,25,187,178,199,183,37,243,198,175,57,96,168,253,254,69,77,7, -78,174,253,183,7,99,255,201,111,203,208,23,166,30,72,118,212,243,6,203,47,214, -148,79,98,213,205,113,101,119,214,83,188,238,243,218,59,142,75,223,103,142,6, -126,123,94,9,247,242,33,41,80,169,223,248,25,24,93,107,237,28,37,239,214,150, -102,205,3,236,57,235,186,188,202,254,152,185,174,190,171,126,96,141,171,135, -140,87,93,194,39,143,115,131,57,152,248,234,79,187,75,182,59,211,103,125,210, -183,228,190,151,149,87,229,175,164,201,172,69,44,243,252,241,120,75,51,99,189, -239,173,204,211,187,255,71,45,215,90,243,169,189,229,188,171,159,114,172,17, -241,160,7,135,157,185,238,204,123,178,252,113,73,159,153,249,171,60,206,92, -200,215,180,79,222,192,102,141,152,147,243,149,83,247,173,206,38,213,66,24, -174,231,3,206,101,172,33,95,109,150,157,19,3,53,220,190,214,92,35,235,251,160, -102,213,218,93,239,231,97,198,18,154,101,221,194,58,175,118,229,59,182,118, -212,107,246,196,30,172,248,178,255,224,202,129,227,100,111,205,207,140,195, -251,66,188,183,87,247,129,100,252,91,207,155,195,250,109,190,248,233,114,173, -167,251,142,203,97,205,201,222,91,109,30,163,15,173,149,242,228,169,63,70,147, -2,145,122,205,239,251,208,245,176,244,228,207,235,230,136,202,247,122,94,104, -143,93,248,21,210,141,60,41,180,93,239,49,151,95,140,215,53,32,252,218,209, -188,127,157,43,138,24,155,206,207,109,245,157,235,171,143,164,247,103,141,218, -247,107,189,165,171,220,251,60,173,87,251,222,99,83,252,181,151,192,166,206, -123,79,146,100,108,65,107,157,196,62,202,56,177,193,125,16,25,118,145,247,189, -91,181,0,143,109,197,234,24,197,82,243,11,43,196,244,69,58,184,114,163,107, -206,29,108,44,251,217,13,156,37,220,20,81,6,88,156,17,63,161,221,77,157,69,94, -7,245,193,96,53,238,56,28,67,158,201,230,231,159,6,134,185,245,176,170,159, -140,123,3,170,25,8,90,5,151,148,185,253,77,86,56,108,232,160,90,155,6,223,221, -6,54,181,126,226,146,133,173,66,104,61,205,237,184,239,249,211,199,202,157, -251,42,28,107,239,30,12,203,174,36,110,175,143,251,188,137,131,21,163,227,42, -79,112,74,175,106,140,77,228,142,213,92,223,120,194,62,171,181,176,242,203, -165,165,211,191,200,163,17,63,149,139,212,87,15,72,190,250,145,62,227,15,18, -126,66,119,55,84,94,170,21,227,122,136,103,94,193,164,95,96,25,175,223,252,87, -126,137,143,181,213,83,126,136,245,67,19,94,49,138,19,27,222,207,253,160,47, -255,229,123,49,126,106,111,186,180,98,201,56,114,126,175,81,197,61,107,15,158, -241,236,147,138,179,164,251,184,174,240,19,35,156,246,200,49,74,10,84,234,175, -253,132,25,239,122,175,173,29,54,165,185,218,143,149,51,151,107,109,88,243, -214,62,204,220,178,30,18,114,206,126,216,253,150,105,214,101,205,199,138,73, -123,30,55,215,187,51,125,87,159,156,79,238,122,61,21,91,234,137,47,53,153,235, -187,63,135,138,120,147,2,229,184,235,154,229,124,201,246,55,70,199,227,31,54, -230,183,188,172,239,184,93,253,228,155,70,216,65,15,78,222,22,238,234,190,82, -107,59,182,219,197,15,48,194,133,54,62,133,95,207,129,25,31,107,114,175,91, -125,171,124,101,125,42,127,189,23,221,167,22,107,200,187,205,172,75,246,108, -177,247,163,206,38,239,169,92,123,251,91,137,243,170,214,238,250,121,102,118, -237,186,15,88,215,113,202,155,199,172,30,115,46,255,214,125,74,204,232,29,183, -251,211,219,153,155,172,111,143,71,185,1,139,157,125,158,97,159,47,201,190, -167,122,44,215,121,78,220,62,95,171,159,202,249,79,75,62,224,153,191,185,23, -175,215,218,199,112,160,156,24,155,110,209,67,129,72,253,218,111,93,15,123, -206,75,46,91,26,225,155,158,27,221,111,217,22,207,120,114,190,62,139,60,41, -180,93,31,152,243,170,245,194,249,113,220,26,188,209,192,158,82,17,99,211,101, -44,181,143,92,175,154,237,251,167,242,171,243,199,231,73,135,239,58,67,215, -121,149,215,167,186,218,239,90,79,156,190,65,146,207,122,212,121,89,190,250, -26,126,157,72,88,249,96,14,204,181,214,118,140,242,67,156,232,176,197,203,31, -246,246,185,246,156,200,46,68,239,243,165,63,63,161,118,159,116,3,97,20,10, -105,201,33,28,76,34,24,21,204,49,194,225,104,254,191,56,16,55,235,94,32,88, -133,72,7,33,236,245,4,9,227,235,130,97,237,254,0,213,111,88,73,42,132,31,18, -74,102,21,195,11,217,27,49,169,190,113,78,92,178,236,171,161,197,196,178,198, -240,253,255,152,72,198,223,99,150,252,255,254,69,109,159,39,29,228,179,198, -101,147,127,116,37,73,57,242,220,195,79,107,13,175,185,47,91,171,111,253,80, -89,253,239,57,92,253,216,247,122,223,244,234,113,198,250,76,12,254,42,238,57, -103,230,161,99,211,207,249,47,24,229,85,238,31,126,246,94,151,63,172,225,164, -53,59,70,55,198,67,18,251,94,26,24,63,122,110,84,207,220,215,73,235,67,119, -197,61,107,177,63,11,42,14,167,170,175,199,117,135,119,140,112,218,35,199,40, -233,144,151,173,242,19,6,231,164,158,118,4,172,181,95,181,12,155,210,104,45, -199,194,190,175,186,60,123,76,235,172,125,144,185,83,109,197,25,247,60,11,118, -117,249,203,6,227,251,123,103,159,28,60,125,81,131,193,175,121,170,188,238, -252,210,122,107,77,155,63,73,129,114,220,117,111,65,181,15,215,124,190,122, -193,152,177,226,74,201,186,255,161,249,96,43,223,52,98,61,242,74,172,242,182, -112,87,231,37,180,125,41,49,187,57,71,254,133,54,62,13,127,94,101,95,120,45, -239,231,123,237,106,14,177,144,67,239,1,247,169,197,26,242,213,230,142,122, -143,84,13,29,79,206,215,190,168,81,173,221,245,208,46,191,144,98,119,172,234, -235,235,10,51,206,215,164,83,146,246,119,191,169,157,61,142,237,53,14,173,155, -249,133,246,103,161,250,165,237,183,240,67,159,105,207,251,244,234,108,157, -254,93,237,63,124,211,115,81,151,131,239,245,147,60,237,174,231,133,234,139, -111,138,97,93,139,184,88,107,158,137,248,128,205,46,63,102,59,49,54,221,162, -135,2,145,250,122,176,87,143,197,140,248,228,8,34,30,252,245,56,101,75,163, -242,217,115,44,57,243,126,217,245,110,204,215,103,145,39,133,182,235,3,115,94, -149,95,146,46,216,211,204,150,6,246,148,138,24,155,46,123,138,122,175,61,44, -93,249,226,251,96,206,115,187,53,79,247,30,207,157,116,213,119,119,58,95,79, -123,36,243,238,132,15,46,239,247,73,245,37,54,235,188,22,231,62,218,239,33, -249,226,103,198,250,69,140,108,111,249,77,174,33,126,186,182,216,106,224,6, -194,40,20,210,146,67,62,18,207,67,11,86,18,87,158,77,188,11,108,218,187,10, -126,93,183,143,156,245,209,104,218,115,159,246,126,87,81,167,230,42,206,233, -27,227,46,203,171,189,237,207,219,45,121,151,236,121,103,207,245,201,19,119, -85,19,216,243,9,251,6,117,28,60,177,123,187,58,92,167,116,231,107,94,237,116, -190,214,92,231,105,124,19,55,71,37,117,77,215,237,120,230,97,231,63,188,143, -129,13,206,161,196,225,164,149,83,115,101,199,227,24,152,164,151,108,198,252, -196,55,113,31,77,126,26,243,193,225,143,62,37,221,225,167,175,176,225,146,142, -145,227,36,203,209,228,55,54,225,54,255,14,63,117,195,206,71,114,242,214,22, -252,4,179,227,57,15,30,115,91,204,240,58,167,143,118,172,79,73,54,107,64,199, -168,227,230,168,51,231,12,55,91,221,112,93,99,246,195,110,105,186,255,181,183, -58,247,250,172,54,94,154,248,148,228,202,30,60,107,126,103,23,158,182,231,232, -29,251,252,145,239,198,189,158,151,62,133,252,147,54,155,206,217,237,165,196, -71,221,142,248,249,186,31,170,47,212,48,240,172,217,213,218,250,148,228,217, -186,91,92,248,241,89,123,79,253,211,189,100,253,51,243,156,63,243,120,37,135, -167,111,211,39,61,23,112,111,239,47,133,215,54,35,7,73,161,189,209,67,129,72, -189,63,107,29,146,69,47,12,58,189,132,148,92,216,66,241,64,127,253,219,215,25, -103,206,215,103,145,39,133,182,235,3,179,72,36,93,52,167,153,45,13,236,41,21, -49,54,93,198,178,127,33,213,203,46,241,235,101,215,99,173,151,14,189,168,121, -253,52,175,158,3,221,166,214,171,188,123,94,53,175,108,250,122,179,191,174, -120,246,209,211,121,179,142,53,79,123,100,135,57,70,119,20,104,199,151,77,226, -247,47,82,146,88,171,205,115,3,167,217,213,240,41,110,52,49,39,159,218,78,200, -13,179,197,5,226,13,6,10,212,3,28,20,200,11,92,211,41,113,36,71,9,18,211,36, -235,159,37,137,79,43,157,144,27,38,112,231,71,227,218,216,235,166,23,159,150, -58,5,106,224,206,143,203,66,254,132,192,217,156,203,121,129,122,128,131,2,233, -88,223,160,135,196,105,193,30,35,167,83,186,127,81,51,108,73,86,93,82,104,47, -244,67,183,157,15,5,234,227,184,83,122,77,3,255,204,174,14,198,250,38,239,53, -51,62,207,237,92,96,146,6,246,169,205,75,92,82,160,191,24,31,136,142,121,130, -59,165,123,26,216,183,115,208,25,174,225,249,105,178,151,60,41,180,55,122,167, -64,190,193,6,226,13,102,71,49,171,207,123,59,23,189,97,223,226,161,152,241,96, -78,160,158,224,28,1,207,155,244,197,60,40,144,111,112,79,48,208,192,125,25,22, -10,244,7,240,147,98,246,131,185,79,113,208,83,236,39,113,11,54,180,93,191,96, -156,208,25,238,18,27,168,31,103,239,183,143,203,63,213,186,216,55,33,125,38, -127,233,146,24,155,14,210,3,175,63,180,139,247,248,83,158,20,90,215,215,51,85, -177,199,145,207,90,167,110,107,195,95,24,74,30,88,232,148,36,166,30,179,29,51, -109,158,186,144,110,228,73,161,237,250,5,147,132,220,48,193,167,106,75,3,123, -74,69,140,77,231,81,173,191,68,80,205,136,253,234,75,97,244,80,255,237,107, -201,245,229,153,215,165,214,163,54,178,157,18,249,192,28,61,143,251,122,199, -213,19,26,115,190,107,94,27,73,178,96,238,40,208,3,223,70,87,108,243,124,202, -105,118,53,124,138,27,77,204,201,167,182,19,114,195,108,113,129,120,131,129,2, -245,0,7,5,242,2,215,116,127,120,93,209,52,73,106,158,245,64,129,79,43,157,144, -27,38,112,231,71,99,29,26,144,26,250,226,176,154,20,168,129,59,63,46,11,249, -19,2,103,115,46,231,5,234,1,14,10,164,99,117,176,253,245,69,237,134,6,254,153, -221,58,252,238,110,62,33,155,244,4,147,52,176,79,109,94,226,146,2,253,197,248, -64,116,204,19,220,41,221,211,192,190,157,131,206,112,13,207,79,147,189,228,73, -161,189,209,59,5,242,13,54,16,111,48,59,138,89,125,222,219,185,232,13,251,22, -15,197,140,7,115,2,245,0,55,41,102,61,156,23,200,55,184,39,24,104,224,190,12, -11,5,250,3,248,73,49,251,193,220,167,56,232,41,246,147,184,5,27,218,174,95,48, -78,232,12,119,137,13,212,143,179,247,219,199,233,203,191,159,226,57,200,229, -231,252,144,62,147,191,116,73,140,77,247,233,181,146,66,235,250,254,204,150, -84,127,134,158,235,29,156,116,140,166,141,39,47,106,226,254,204,118,34,174, -253,14,233,70,158,20,218,174,95,48,73,200,13,19,124,170,182,52,176,167,84,196, -216,116,161,111,35,143,211,114,24,236,115,235,217,89,124,55,175,215,188,235, -158,174,119,92,61,161,49,231,75,231,5,226,13,198,41,208,31,192,39,197,172,192, -127,251,246,191,150,9,212,207,222,71,90,5,0,0,0,0,73,69,78,68,174,66,96,130 }; +{ 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,3,154,0,0,0,14,8,6,0,0,0,78, +234,99,67,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,0,9,112,72,89,115, +0,0,14,194,0,0,14,194,1,21,40,74,128,0,0,0,25,116,69,88,116,83,111,102,116, +119,97,114,101,0,112,97,105,110,116,46,110,101,116,32,52,46,48,46,50,49,241, +32,105,149,0,0,29,22,73,68,65,84,120,94,237,92,61,168,109,75,82,126,8,134,166, +26,138,32,152,152,60,16,68,12,6,28,159,130,136,129,58,193,168,136,99,96,224,4, +38,47,83,208,64,197,224,129,168,32,19,61,13,12,100,20,20,196,72,196,216,159, +200,68,19,49,209,72,65,20,19,17,217,246,87,95,215,174,175,126,122,239,117,206, +61,87,158,48,181,169,123,86,87,125,93,93,127,221,107,173,125,238,189,31,220, +62,184,221,192,31,20,114,249,164,115,82,204,35,28,232,10,238,10,6,116,21,7, +122,132,123,169,141,43,248,9,247,104,222,132,159,104,194,169,76,229,87,232, +234,188,171,56,208,251,192,42,238,132,125,164,3,93,153,251,104,62,232,165,184, +61,124,74,111,105,247,173,48,78,142,189,106,243,25,206,233,125,224,21,115,5, +183,135,15,73,237,93,153,243,8,127,146,59,61,211,43,93,193,94,193,76,164,243, +174,206,125,41,30,116,117,206,85,92,165,151,204,187,130,123,169,173,183,198, +130,94,138,175,116,117,238,75,214,120,107,155,142,59,97,85,127,194,40,93,197, +190,47,123,255,223,112,239,34,175,58,167,147,254,165,114,167,103,122,208,85, +125,197,60,155,7,58,97,92,94,117,39,185,147,234,79,24,167,215,98,183,40,209, +85,253,30,38,250,44,233,78,228,115,222,199,188,43,24,165,151,226,157,238,243, +238,179,11,87,73,30,5,87,73,30,5,87,201,73,174,60,75,201,251,74,13,236,208,44, +56,149,143,137,169,24,227,219,237,211,197,159,96,164,100,200,140,221,154,32, +67,60,192,108,41,237,63,192,41,65,119,199,125,225,126,5,255,64,159,222,37,87, +109,56,95,141,243,118,251,207,197,95,18,153,95,125,105,241,191,44,254,72,116, +160,143,22,67,14,253,182,58,218,197,218,234,191,243,158,241,152,128,147,57, +199,121,134,186,128,3,25,242,141,177,134,202,184,132,13,73,215,57,153,246,160, +47,186,113,62,200,80,47,199,109,233,153,10,254,157,236,190,22,115,31,9,155,60, +99,111,183,95,76,163,96,236,171,44,225,124,149,40,87,252,201,238,98,179,195, +79,72,39,60,100,85,250,28,71,251,170,87,238,113,53,155,105,254,35,31,186,46, +143,170,190,172,147,248,9,214,124,226,231,136,1,59,37,121,181,13,158,236,203, +120,152,147,71,19,243,19,146,193,63,227,151,246,214,98,211,95,181,15,86,108, +220,35,50,171,31,143,108,213,92,20,172,249,230,227,11,88,208,93,246,0,159,112, +39,214,249,101,173,196,15,112,109,157,215,216,204,81,100,230,39,75,116,148, +237,144,79,53,3,87,123,87,234,187,174,156,18,6,156,113,87,237,129,243,200,185, +198,115,202,97,197,93,93,247,5,254,89,188,252,60,151,187,159,83,61,106,12,29, +51,219,124,34,119,50,237,3,61,200,16,131,254,46,169,62,241,185,235,171,246, +211,101,37,14,167,53,138,185,154,223,154,83,159,95,215,42,118,155,158,188,87, +203,4,185,96,140,183,106,164,132,173,189,48,244,64,26,169,95,213,103,126,56, +170,118,31,205,203,107,102,221,213,245,234,188,194,78,107,148,145,213,230,137, +235,188,136,239,227,197,246,204,63,229,206,214,84,137,114,181,249,12,239,172, +243,170,206,185,74,242,40,184,74,242,40,184,74,110,183,111,177,171,42,87,158, +165,228,125,165,6,44,120,144,73,67,62,54,115,197,24,127,150,95,52,127,198,254, +140,23,185,223,16,221,85,27,206,95,123,209,108,100,200,55,198,26,42,227,18,54, +36,93,231,100,90,215,127,238,126,69,198,56,75,246,172,76,134,122,57,110,75, +207,84,240,239,100,247,181,152,61,66,191,253,215,98,28,166,91,107,31,31,129, +208,155,255,97,87,65,31,167,27,4,56,231,24,125,170,212,241,92,179,18,15,116, +112,173,209,140,255,56,97,136,171,107,35,190,105,47,130,43,246,147,230,39,152, +107,227,129,228,195,197,154,191,121,63,234,126,206,58,191,58,157,3,176,143, +117,162,30,92,163,198,0,106,103,198,146,103,223,163,118,147,239,96,207,233, +148,71,215,225,204,83,13,108,230,135,51,112,212,223,99,80,98,60,189,166,19, +246,211,39,189,5,127,148,162,103,122,252,115,47,64,171,190,240,97,164,246,121, +238,217,217,87,167,220,3,90,223,37,145,156,247,126,9,187,17,71,240,132,71,252, +181,38,192,193,119,91,111,115,239,49,214,33,114,16,56,158,1,129,59,249,132,49, +228,31,10,214,251,164,18,253,113,92,212,16,54,156,24,71,237,11,222,179,29,155, +237,56,19,83,107,50,219,99,125,61,78,16,99,128,141,192,89,157,64,91,18,121, +201,56,183,87,251,240,211,182,238,28,115,206,31,184,219,114,202,251,146,235, +106,190,89,75,237,211,25,199,28,214,56,118,204,38,189,34,143,124,79,231,133, +238,159,169,102,179,205,39,114,39,211,62,208,131,12,81,244,50,3,53,168,123, +169,159,101,148,165,115,21,180,116,97,155,189,135,154,125,210,114,202,121,167, +179,253,247,22,255,214,226,222,3,228,189,90,38,200,5,99,188,85,35,37,44,123,1, +107,195,223,143,90,175,68,143,118,191,217,67,244,21,18,245,131,57,240,30,203, +245,14,57,251,83,115,20,235,193,159,156,7,250,192,61,7,137,174,151,253,244, +125,76,251,148,123,236,49,7,76,223,177,14,40,98,9,121,95,11,204,188,229,179, +170,230,46,143,126,121,49,124,1,127,197,100,213,102,196,0,174,123,62,98,1,206, +81,129,207,92,37,121,20,92,37,252,243,27,23,255,210,226,239,218,227,9,247,23, +139,191,167,201,149,103,41,121,95,169,97,43,16,200,164,33,31,155,185,98,140, +125,211,149,41,134,204,216,173,9,50,196,3,204,150,210,254,3,156,18,116,119,28, +27,6,5,196,38,255,176,52,203,158,209,201,80,129,35,95,141,19,27,43,31,64,170, +173,58,208,243,195,141,184,126,88,146,247,140,199,4,156,204,57,206,51,212,5, +28,200,144,111,140,53,84,198,37,108,72,186,206,201,180,174,231,161,136,220, +242,32,173,249,31,230,131,12,245,114,220,150,158,169,224,223,201,238,107,48, +247,43,246,211,191,46,158,111,38,224,210,155,251,39,110,44,249,197,135,57,246, +195,187,30,232,216,55,245,198,155,111,98,100,224,40,235,123,164,227,123,29,65, +220,35,42,85,220,116,163,11,44,230,158,94,186,238,88,203,105,224,251,126,212, +156,101,157,95,69,47,170,158,246,177,14,111,126,252,201,155,120,189,201,149, +186,152,79,252,76,24,216,112,155,206,88,11,103,34,117,170,1,199,218,113,227, +39,195,38,124,204,190,179,254,240,5,120,228,197,53,192,195,78,127,137,239,241, +250,56,159,245,180,237,118,180,182,142,167,76,111,208,96,175,79,72,48,6,62, +247,87,216,86,63,240,64,24,15,65,244,193,57,234,135,177,218,2,23,189,213,134, +154,222,47,248,226,83,253,10,77,228,198,37,96,250,88,177,136,17,164,117,226, +90,250,197,42,215,2,86,115,130,235,79,6,28,108,33,39,140,81,253,81,108,206,11, +56,112,90,111,226,212,166,227,166,190,0,14,132,254,236,251,4,76,123,136,209, +99,14,123,189,30,88,15,113,2,115,90,87,235,4,142,156,62,239,91,114,237,63,204, +163,143,154,239,222,47,61,135,176,11,251,245,133,20,125,133,252,217,158,95,28, +125,243,28,151,123,129,204,152,249,121,46,215,184,85,78,221,111,46,246,94,65, +188,245,92,156,109,62,145,59,153,246,129,30,100,136,162,223,35,248,197,179,50, +244,32,200,17,79,244,23,123,31,249,2,155,212,236,168,109,214,149,251,166,247, +6,114,206,103,205,44,71,238,32,199,11,73,215,147,187,132,210,166,49,167,14, +148,176,209,35,248,137,117,115,93,216,123,238,91,254,210,162,230,66,251,155, +57,64,159,178,183,181,167,57,47,114,174,54,185,94,228,93,123,146,243,194,166, +174,23,126,178,255,40,245,216,32,39,114,190,7,208,255,243,53,230,212,121,190, +7,127,97,49,112,95,94,156,251,7,107,241,10,235,195,103,196,133,121,244,79,115, +2,102,206,208,31,245,30,9,198,92,236,217,220,83,25,19,92,37,121,20,92,37,252, +243,231,23,255,227,98,212,156,26,197,128,111,183,111,93,252,223,77,174,204,63, +127,120,241,15,236,107,240,183,217,207,61,82,195,187,61,135,205,28,87,193,181, +144,96,223,116,89,218,177,81,152,224,90,140,9,227,246,179,52,143,148,117,93, +54,111,108,126,109,236,71,54,170,95,224,171,113,98,110,158,175,218,110,91,55, +229,99,28,214,238,15,182,192,101,201,204,147,159,170,119,174,235,214,145,242, +85,155,224,138,197,88,245,206,125,253,110,87,49,147,29,93,43,122,128,15,45, +185,7,174,231,225,10,238,132,81,126,75,187,47,197,196,149,223,92,112,40,70, +239,241,227,88,80,237,205,24,43,142,57,70,127,230,131,223,57,251,0,242,131, +188,98,185,199,106,141,10,126,60,175,136,227,30,217,24,144,161,92,207,195,254, +186,159,224,105,109,106,230,253,120,202,81,88,142,94,84,61,237,99,29,172,7,76, +60,44,214,189,83,234,98,62,241,51,97,226,91,244,208,98,30,234,207,30,208,121, +224,136,25,55,90,127,57,128,6,63,33,207,190,179,254,243,249,168,177,168,52, +199,235,82,92,159,94,198,172,174,133,225,15,108,247,223,60,245,57,240,131,121, +87,108,228,34,247,67,217,55,150,99,142,194,142,105,236,227,56,80,210,203,188, +222,47,241,240,17,181,38,135,13,151,128,59,214,235,1,214,220,179,22,243,67,30, +243,69,198,117,206,7,113,181,54,248,137,241,248,155,192,251,72,115,222,207, +224,218,31,97,211,37,96,174,15,158,115,0,158,239,29,92,91,99,6,135,61,231,9, +167,122,248,133,126,96,252,213,30,115,3,189,214,235,180,71,97,131,125,114,194, +173,145,228,48,108,247,117,177,158,246,233,156,31,173,1,57,252,80,156,175,203, +207,115,185,250,166,114,112,206,49,215,87,137,235,115,239,156,229,107,164,100, +218,7,122,144,33,138,126,143,230,62,155,242,130,156,151,60,155,29,181,77,12, +242,59,245,6,108,66,247,232,69,243,43,109,30,217,175,114,223,240,163,184,30, +188,80,194,254,142,253,137,120,248,133,33,198,170,103,44,200,79,223,179,212, +133,47,90,163,58,143,159,58,15,189,153,251,152,186,200,239,35,157,174,199,62, +65,14,225,11,214,197,56,214,247,158,171,125,196,223,46,194,166,227,129,123,92, +95,206,243,61,228,115,122,143,242,12,2,102,162,83,191,249,217,235,177,128,32, +131,63,158,235,184,31,199,108,231,239,94,252,199,77,122,187,253,219,226,31, +219,163,224,60,2,225,207,127,88,252,125,54,186,221,190,121,241,9,215,229,202, +183,219,175,217,159,164,95,89,12,233,191,47,254,38,199,168,1,75,52,200,164,33, +7,225,79,77,228,244,235,99,16,48,254,48,227,212,55,97,52,18,154,222,41,63,228, +16,131,66,84,202,47,154,113,163,81,255,88,92,109,136,110,43,214,155,109,160, +49,185,65,92,235,220,227,68,28,249,175,6,16,247,78,127,117,118,49,214,161,237, +140,235,7,56,229,110,23,135,152,147,111,16,167,233,219,55,95,23,243,188,38, +204,161,226,230,60,209,191,107,54,249,48,51,247,195,243,90,131,185,54,106,3, +91,240,49,242,64,59,234,91,254,107,76,125,141,156,67,173,11,37,113,160,101,28, +242,201,252,100,92,248,219,109,97,109,198,31,227,186,62,236,42,6,177,228,58, +244,181,29,167,107,99,62,236,40,209,174,99,34,43,240,195,237,193,14,248,233, +11,205,226,152,151,113,145,179,45,85,90,146,106,87,215,39,134,154,147,253,132, +55,174,251,142,56,238,17,149,230,243,160,249,153,120,182,217,215,38,115,45, +149,128,53,103,89,231,87,209,35,170,15,223,176,119,80,183,240,145,31,197,166, +186,88,254,206,24,216,209,26,130,145,35,200,249,83,231,129,115,204,209,31,180, +9,249,195,51,204,9,215,139,35,231,121,206,84,139,158,211,130,115,194,245,102, +248,54,157,111,181,23,34,142,124,62,192,247,156,111,112,206,167,174,25,245, +235,56,80,210,203,188,30,27,250,45,226,131,222,53,196,246,47,92,106,206,176, +22,30,82,240,133,0,228,208,71,45,52,39,113,142,99,46,244,96,218,209,124,100, +28,108,194,94,172,153,207,136,184,162,62,206,49,126,168,161,95,240,83,123,48, +242,228,18,242,51,189,97,156,182,36,114,88,251,32,226,1,71,254,116,175,7,198, +115,135,223,96,16,215,251,10,24,61,103,129,59,253,45,12,196,12,189,83,183,151, +71,152,211,123,20,28,47,235,172,3,123,100,250,82,174,246,125,244,131,226,214, +44,203,31,63,207,229,90,67,149,131,35,127,145,95,213,107,125,178,28,53,70,46, +71,223,156,48,22,93,211,131,12,33,122,65,51,103,61,79,222,215,209,95,121,63, +90,158,155,109,212,207,109,214,90,114,126,191,143,184,220,185,214,150,236,87, +225,23,165,29,203,26,79,52,229,151,123,200,125,86,61,99,97,31,65,162,107,69, +46,88,115,141,149,243,162,87,117,30,117,209,115,125,30,124,130,205,199,47,154, +170,139,252,97,77,167,56,107,232,127,127,63,209,216,226,154,121,8,84,175,7, +253,192,243,43,176,156,95,49,209,243,192,226,217,20,185,2,158,62,213,30,208, +124,169,221,240,9,215,196,196,28,191,250,206,197,127,184,248,239,23,255,248, +93,234,124,187,125,126,241,31,217,149,190,112,118,220,143,44,254,171,61,250, +179,197,191,106,215,29,199,171,42,87,190,221,254,103,241,183,239,209,31,64, +176,232,119,23,223,231,169,1,219,72,32,147,134,28,132,160,189,32,209,56,138, +33,14,73,226,139,7,37,248,217,15,15,202,129,139,34,247,98,196,92,74,176,46, +198,121,3,177,41,189,113,92,202,130,233,129,194,195,25,182,216,188,170,11,27, +216,212,104,18,31,51,22,199,57,247,56,49,158,30,6,222,229,69,51,252,153,55, +205,244,96,139,121,190,41,32,65,126,65,192,99,12,253,84,15,207,173,199,239, +227,233,48,98,172,33,197,26,192,78,177,168,77,72,35,166,140,13,191,40,241,56, +114,173,137,197,218,92,207,165,161,131,47,186,94,62,20,162,7,152,251,94,175, +208,81,2,59,176,87,111,150,208,123,157,32,137,121,129,193,92,30,204,148,248, +203,177,247,60,226,200,118,233,31,228,200,19,230,245,131,246,202,218,249,102, +22,120,181,19,135,163,175,135,235,168,101,223,143,176,3,157,82,255,102,84,115, +182,36,149,12,157,241,169,102,134,161,166,199,21,120,165,211,30,69,76,74,140, +43,244,201,207,205,200,133,211,212,123,117,109,165,105,63,70,238,179,206,175, +78,49,186,111,32,248,100,26,203,77,207,95,234,135,11,24,228,197,109,198,250, +148,229,126,228,92,173,15,240,200,55,100,152,3,121,245,189,249,3,194,245,102, +246,155,74,122,45,96,131,123,229,1,78,9,227,197,140,109,62,47,149,124,157,156, +43,158,111,208,129,216,47,208,228,7,11,93,79,243,151,109,129,139,94,230,209, +79,197,198,126,196,250,158,111,48,207,144,26,19,207,10,173,37,174,193,88,139, +117,225,250,60,67,242,126,246,43,207,231,189,199,246,167,226,96,11,113,224, +139,15,218,123,140,101,237,66,19,218,176,101,253,177,57,242,228,18,242,51,189, +98,156,17,11,243,87,207,48,230,216,235,11,162,143,138,227,217,169,125,22,215, +181,6,196,42,99,237,233,57,0,117,209,231,5,216,205,231,17,217,175,162,238,148, +102,123,113,159,80,154,94,160,176,78,93,119,58,47,217,155,117,157,147,92,253, +83,57,56,231,111,250,210,39,116,89,14,31,145,147,108,179,230,88,107,69,54,31, +149,12,33,250,125,21,61,84,109,176,39,225,83,212,35,239,199,121,127,240,188, +128,110,252,210,96,240,229,46,119,50,109,214,107,204,225,23,198,61,246,30,188, +80,194,62,203,99,244,20,226,165,87,174,203,207,10,57,86,230,32,114,164,243, +168,139,253,174,243,184,30,230,33,190,233,183,150,81,47,237,107,234,188,135, +160,7,107,143,195,143,211,47,83,208,95,32,204,197,23,114,196,6,245,58,50,6, +216,198,26,92,167,98,34,183,136,7,140,181,96,27,126,78,47,175,88,211,113,81, +95,202,152,71,174,249,21,153,243,19,139,127,127,49,98,248,185,197,212,184,62, +112,126,245,29,139,255,124,241,223,44,254,98,194,128,111,183,63,93,252,179, +123,244,189,139,241,79,167,190,110,192,241,170,202,149,187,228,235,239,215,91, +162,6,118,123,142,7,11,254,244,100,59,77,15,37,94,56,149,66,86,31,24,128,241, +132,158,214,76,152,205,180,175,146,104,186,74,108,96,199,69,195,240,70,169, +205,18,54,80,104,151,198,6,113,137,115,143,19,243,242,122,196,189,246,69,19, +62,210,30,52,115,163,158,94,52,105,151,146,136,161,142,243,188,138,3,79,185, +158,112,145,187,231,88,200,128,173,113,95,171,53,184,231,94,235,8,251,216,136, +188,137,67,170,7,88,244,0,252,154,254,189,91,232,40,153,99,139,67,217,125,166, +79,122,32,18,3,63,193,176,7,140,31,110,115,30,232,159,199,16,135,167,214,63, +236,250,218,188,214,181,227,42,247,181,218,225,225,232,107,121,223,199,56,219, +3,65,167,245,116,219,15,95,26,42,45,76,181,27,123,103,227,241,51,201,31,224, +141,181,198,129,211,28,145,21,87,252,44,204,122,86,233,180,54,153,107,169,4, +172,57,203,58,191,138,126,83,125,248,230,191,157,138,56,248,81,108,170,139, +229,239,49,6,140,26,227,39,227,36,10,215,211,153,94,99,6,30,243,127,106,49, +228,167,51,236,238,15,8,215,139,35,231,121,142,203,149,250,77,95,231,47,137, +19,174,55,51,158,62,79,123,193,253,135,159,57,87,241,64,229,56,80,251,171,149, +178,38,98,100,253,76,99,31,199,129,146,94,230,209,31,197,198,76,205,95,228, +190,246,56,207,10,96,112,175,192,156,120,49,241,90,146,25,183,238,253,136,19, +126,248,189,198,114,154,112,121,69,207,7,113,212,78,54,177,158,231,154,49,43, +142,53,84,95,193,145,39,151,144,159,233,117,93,228,0,117,189,175,93,98,169, +245,5,211,87,173,111,63,95,163,231,234,153,184,70,78,91,50,251,153,237,129, +231,125,16,254,69,221,49,230,39,112,212,71,15,115,93,238,105,197,177,71,188, +110,32,228,157,185,87,220,142,3,63,69,118,150,107,13,85,14,142,53,25,111,173, +1,239,59,253,204,62,201,163,174,78,245,140,50,31,149,32,187,235,35,167,103, +159,184,6,242,173,117,243,171,208,81,26,26,198,10,155,111,251,162,153,107,166, +212,238,73,219,204,72,5,187,165,36,140,69,7,202,251,50,235,253,10,126,229,243, +149,57,136,115,70,231,81,135,188,241,60,211,121,92,135,123,5,18,173,187,247, +130,238,3,151,112,127,98,45,248,226,82,239,127,124,17,70,155,167,254,34,123, +77,113,15,131,45,196,14,27,136,63,63,111,228,61,9,61,158,203,234,253,11,115, +245,221,72,233,227,161,223,216,51,186,38,53,204,47,175,153,211,152,243,235, +246,39,34,9,75,217,46,56,143,190,127,241,63,45,254,235,36,5,223,110,63,36,35, +240,15,46,254,134,36,1,251,85,149,43,207,82,242,190,82,3,187,5,199,38,68,81, +88,112,50,174,167,135,146,218,0,51,150,24,54,166,115,63,96,58,198,237,171,68, +215,200,216,233,191,76,142,194,230,166,159,108,196,6,113,137,115,143,19,243, +152,159,140,123,205,139,38,54,12,190,93,136,27,73,111,84,230,70,101,148,135, +93,74,34,134,58,206,243,42,14,60,229,122,194,157,106,60,97,195,191,140,189,86, +107,112,207,125,228,134,135,16,24,235,96,227,231,154,68,15,208,7,237,1,176, +234,40,153,99,203,118,226,129,91,123,56,247,27,94,24,224,51,236,210,30,190, +173,170,15,46,156,3,12,106,63,191,104,242,192,244,181,127,116,49,236,95,249, +109,37,244,129,137,7,170,137,114,222,192,244,11,107,210,39,50,235,166,184,176, +91,235,73,238,251,60,246,142,226,220,247,154,163,130,31,207,43,226,238,62,56, +25,202,245,131,159,134,225,53,215,246,145,243,180,54,53,61,15,96,205,89,214, +249,149,247,71,205,117,244,93,244,3,214,56,61,36,221,235,98,62,105,156,3,102, +49,226,139,127,26,16,178,233,76,175,245,113,223,156,243,94,102,94,153,191,144, +58,99,45,196,82,207,31,141,55,52,53,214,199,189,229,121,122,246,111,52,125, +173,158,79,238,45,229,169,126,204,49,71,136,7,122,224,96,167,174,91,243,238, +76,127,84,146,103,122,254,34,143,53,23,244,213,237,35,111,192,122,141,48,199, +231,51,167,234,91,156,77,172,5,49,184,174,15,104,199,88,77,222,109,134,157, +141,1,37,220,92,107,92,67,150,247,65,204,138,181,179,94,207,67,143,197,52,109, +221,192,42,119,187,244,29,182,38,202,53,187,98,15,204,248,188,255,192,145,3, +197,209,94,207,79,141,67,251,130,60,219,139,251,128,51,252,235,231,205,178, +254,48,95,248,169,114,174,199,251,142,202,193,156,227,189,215,109,174,209,139, +214,114,185,115,213,175,81,37,67,184,158,243,243,62,84,61,152,122,228,79,235, +166,136,200,119,63,47,184,199,14,126,153,116,144,59,153,54,235,53,230,240,11, +227,190,6,8,126,77,84,239,95,123,69,18,198,162,211,115,155,125,167,250,232,35, +234,245,89,35,246,125,175,55,117,145,123,157,199,245,98,223,107,108,140,63, +246,18,176,174,211,222,163,196,25,182,64,189,78,100,29,121,156,176,129,251,32, +100,176,11,121,222,187,81,11,224,97,155,177,42,134,177,196,252,192,18,81,125, +161,14,28,185,225,53,206,29,216,232,251,153,127,242,223,101,222,110,255,188, +248,139,38,115,125,198,225,37,242,47,23,255,237,226,159,52,217,140,235,92,37, +39,185,242,44,37,239,43,53,176,91,112,104,66,38,0,201,195,8,63,65,211,67,9, +146,116,191,209,44,6,150,227,140,67,98,33,247,102,193,207,47,23,12,230,198, +195,54,127,98,156,55,16,155,25,69,99,195,82,138,185,249,155,4,226,96,131,7, +109,111,122,248,174,54,96,147,235,59,206,153,216,104,36,174,199,185,25,247,46, +127,117,54,114,167,190,18,135,181,167,7,219,176,75,137,218,203,227,60,175,226, +192,140,81,113,145,39,176,75,79,53,134,77,200,21,203,185,122,112,16,123,173, +214,196,210,47,149,134,142,255,35,24,71,248,201,92,184,62,122,128,242,238,135, +251,12,127,32,193,79,208,163,7,2,124,41,192,24,251,77,200,243,10,140,251,5,44, +198,253,55,47,145,95,196,135,181,217,83,122,8,231,67,31,220,49,140,19,54,180, +159,243,141,42,252,167,239,193,240,147,123,83,165,17,139,199,225,243,115,141, +34,238,90,123,224,49,174,125,18,113,134,116,142,235,132,175,24,226,184,71,214, +200,201,80,174,63,251,9,198,120,234,189,180,182,217,164,230,180,31,35,103,42, +231,218,96,206,235,125,232,185,197,122,144,32,231,216,15,211,111,249,106,93, +122,62,58,198,237,105,220,184,158,206,244,169,62,62,31,185,203,245,100,108, +174,71,124,174,241,92,63,250,235,116,22,175,147,161,20,119,174,153,207,167, +108,190,177,43,30,254,193,70,253,150,29,235,43,110,170,31,125,227,8,118,160,7, +142,222,6,238,116,95,137,181,21,155,237,194,15,96,136,51,173,125,2,223,207, +129,26,31,214,196,189,174,251,22,249,242,250,68,254,114,47,170,79,41,86,147, +103,155,94,23,239,217,96,237,71,158,77,218,83,190,246,248,91,161,125,21,107, +103,125,61,51,179,182,239,3,172,171,56,230,77,99,102,143,41,135,127,125,159, +34,102,232,21,55,253,213,237,154,27,175,111,142,135,185,1,22,118,230,60,131, +117,62,37,115,79,229,88,206,121,118,220,156,175,238,39,115,254,65,203,7,184, +230,175,238,197,243,90,115,12,11,165,132,177,232,154,30,100,8,215,247,126,203, +122,176,230,60,228,180,197,17,124,227,115,163,250,77,219,228,26,143,207,231, +167,201,157,76,155,245,134,217,87,169,23,246,71,113,61,120,161,130,221,82,18, +198,162,243,88,98,31,169,158,53,155,251,39,242,203,243,71,231,81,7,223,121, +134,246,121,145,215,171,186,216,239,92,143,236,190,129,40,175,245,136,243,50, +124,213,53,244,218,145,96,230,3,115,192,184,230,218,138,97,126,16,39,116,176, +133,151,87,216,155,115,173,57,161,93,16,122,31,191,180,192,79,80,190,79,198, +108,240,231,22,255,201,226,233,55,149,248,13,230,223,45,254,233,197,161,81,12, +56,143,130,171,228,36,87,158,165,228,125,165,6,44,41,32,147,134,28,132,4,59, +161,24,108,56,197,16,135,68,251,191,69,3,225,97,35,55,24,152,141,228,9,6,193, +94,46,48,49,186,46,48,88,59,63,0,230,27,174,19,27,73,15,57,54,67,52,147,54,98, +222,72,78,241,141,191,227,156,105,159,27,146,140,88,122,12,239,254,159,1,121, +252,57,102,202,255,239,95,52,231,60,241,70,84,107,28,54,241,159,38,57,49,71, +154,123,240,213,90,131,123,238,195,86,247,45,31,138,221,255,156,195,238,199, +220,235,249,208,98,143,99,204,79,197,192,95,198,93,231,212,60,100,172,251,89, +255,7,53,191,242,253,131,159,185,215,233,15,214,80,226,154,25,195,27,251,146, +216,190,167,6,12,63,114,110,88,79,223,215,78,253,165,33,226,174,181,152,207, +130,136,67,41,234,171,113,61,194,43,134,56,238,145,53,114,90,242,176,21,126, +130,129,83,98,79,43,2,204,181,239,181,52,155,212,112,45,197,130,117,95,101, +185,247,24,215,233,125,224,185,99,109,201,30,119,61,11,166,186,124,117,192, +232,254,158,236,35,7,87,95,52,193,192,247,60,69,94,39,191,184,94,175,105,242, +199,201,80,138,59,247,22,40,246,97,207,231,189,23,132,49,102,92,46,233,251,31, +84,31,204,233,27,71,88,15,121,69,172,244,54,112,167,243,18,52,190,84,137,93, +159,67,255,76,107,159,132,223,87,222,23,90,203,199,243,181,118,49,7,177,32, +135,218,3,234,83,138,213,228,221,230,68,185,71,162,134,138,71,206,123,95,196, +40,214,206,122,208,148,95,16,99,87,44,235,171,235,18,83,206,87,167,45,113,251, +211,111,202,107,143,195,118,143,131,235,122,126,65,243,89,200,126,73,251,205, +252,224,167,218,211,62,61,157,173,213,191,211,254,131,111,124,46,202,114,224, +115,253,40,119,187,253,188,96,125,225,27,99,232,107,33,46,172,85,207,68,248,0, +155,89,190,102,43,97,44,186,166,7,25,194,245,241,98,194,30,179,25,246,241,17, +8,241,192,95,141,147,182,56,10,159,53,199,148,99,222,39,83,239,218,124,126, +154,220,201,180,89,111,152,125,21,126,81,218,176,219,204,72,5,187,165,36,140, +69,231,61,133,122,247,30,166,46,124,209,125,80,231,169,221,152,199,123,143, +230,142,186,232,187,71,58,93,143,123,196,243,174,4,31,84,158,239,147,236,75, +216,140,243,154,236,251,104,222,67,244,69,207,140,254,69,18,109,143,252,36, +215,32,252,84,109,176,214,160,234,200,159,111,146,219,237,183,101,20,92,37, +121,20,92,37,39,185,242,44,37,239,43,53,96,73,1,153,52,228,32,29,145,235,161, +11,102,19,116,174,155,112,42,76,181,119,42,94,95,55,143,148,249,225,168,218, +83,159,102,191,163,41,171,230,20,103,245,13,227,44,243,171,217,246,235,237, +134,60,75,102,158,236,169,222,185,226,78,53,1,107,62,193,122,192,40,14,92,177, +179,93,222,28,170,116,242,213,175,38,157,174,85,215,185,26,95,197,213,81,72, +85,147,117,19,215,60,76,254,131,231,24,112,64,225,80,197,225,202,149,93,115, +178,163,113,20,140,211,93,86,99,190,226,27,57,143,42,95,141,121,177,249,195, +79,72,39,124,245,21,44,56,167,53,82,28,101,62,170,252,196,38,56,205,127,132, +175,186,98,231,37,57,121,106,11,124,5,51,113,157,7,46,115,83,204,224,62,39, +143,38,230,39,36,195,26,160,53,202,184,58,202,140,115,6,15,11,124,96,80,141, +216,55,187,161,201,254,199,222,202,156,235,211,109,220,53,246,9,201,201,30, +184,214,252,145,93,112,181,93,71,207,88,231,151,124,39,206,245,60,250,100,242, +87,218,76,58,101,181,231,18,29,101,59,228,235,235,190,168,190,160,132,1,215, +154,157,214,230,39,36,215,214,29,113,230,199,107,237,93,245,143,247,146,254, +207,20,124,126,205,227,73,14,174,190,85,159,248,92,128,123,123,126,169,61,219, +180,28,56,153,246,129,30,100,8,215,235,179,214,146,52,61,49,208,241,37,42,228, +196,6,10,47,36,231,223,126,215,56,125,62,63,77,238,100,218,172,55,76,147,80, +218,52,219,204,72,5,187,165,36,140,69,231,177,204,47,212,124,89,71,252,124,89, +215,88,227,165,137,47,154,90,63,206,139,231,64,181,201,245,34,239,154,87,206, +11,155,186,94,237,175,19,215,62,186,58,175,214,49,230,113,143,76,152,53,122, +68,134,86,124,216,68,252,250,69,144,19,214,202,243,98,118,230,42,201,163,224, +42,201,163,224,42,57,201,149,103,41,121,95,169,129,157,150,158,152,45,78,84, +49,155,183,54,19,228,130,25,113,134,120,130,1,25,234,2,14,100,200,3,46,233,88, +120,20,151,5,38,163,201,251,95,107,35,111,43,153,32,23,140,225,246,135,227,56, +152,250,161,69,222,150,50,25,170,224,246,71,101,38,191,66,192,201,156,227,60, +67,93,192,129,12,169,88,61,96,150,68,169,97,215,72,105,75,231,23,77,193,134, +164,235,156,76,123,208,23,221,56,31,100,168,151,227,182,244,76,5,127,205,46, +15,246,248,38,245,62,211,62,215,237,28,48,78,5,123,213,230,17,231,100,232,55, +198,27,34,99,174,224,182,116,166,130,125,58,7,58,193,37,60,126,138,236,46,119, +50,237,3,189,146,33,159,96,13,241,4,51,145,205,202,243,158,206,133,94,176,79, +241,32,155,113,97,142,161,174,224,20,1,174,15,25,135,121,32,67,62,193,93,193, +128,10,238,205,176,32,67,191,0,95,201,102,95,152,123,21,7,186,138,125,37,174, +97,77,155,245,13,163,4,157,224,142,88,67,189,63,123,159,125,156,255,85,191, +195,190,49,233,53,249,93,231,132,177,232,64,124,96,215,151,14,242,140,223,114, +39,211,170,62,158,169,130,53,14,127,214,218,186,209,134,190,240,132,220,176, +160,45,113,76,188,38,40,166,218,220,58,147,14,114,39,211,102,125,195,56,65,46, +24,227,173,26,169,96,183,148,132,177,232,52,170,254,75,16,214,12,177,159,190, +212,134,30,148,127,251,29,114,126,249,167,117,137,245,80,27,218,118,9,125,192, +28,62,143,235,122,235,234,10,149,57,239,52,47,141,40,105,152,71,100,232,130, +79,163,19,235,188,170,115,174,146,60,10,174,146,60,10,174,146,147,92,121,150, +146,247,149,26,216,105,233,137,217,226,68,21,179,121,107,51,65,46,152,17,103, +136,39,24,144,161,46,224,64,134,60,224,146,238,11,247,43,52,189,19,155,191,31, +136,224,109,37,19,228,130,49,220,254,112,204,67,15,196,13,121,56,108,43,25, +170,224,246,71,101,38,191,66,192,201,156,227,60,67,93,192,129,12,169,88,30, +204,95,123,209,124,64,5,127,205,110,28,222,143,110,158,38,171,116,5,227,84, +176,87,109,30,113,78,134,126,99,188,33,50,230,10,110,75,103,42,216,167,115, +160,19,92,194,227,167,200,238,114,39,211,62,208,43,25,242,9,214,16,79,48,19, +217,172,60,239,233,92,232,5,251,20,15,178,25,23,230,24,234,2,174,146,205,186, +56,207,144,79,112,87,48,160,130,123,51,44,200,208,47,192,87,178,217,23,230,94, +197,129,174,98,95,137,107,88,211,102,125,195,40,65,39,184,35,214,80,239,207, +222,103,31,199,47,47,63,176,231,32,149,239,249,38,189,38,191,235,156,48,22, +221,171,215,114,50,173,234,243,51,155,83,252,51,6,95,111,177,211,26,85,27,87, +94,52,201,249,153,109,35,206,126,155,116,144,59,153,54,235,27,198,9,114,193, +24,111,213,72,5,187,165,36,140,69,103,250,52,210,56,37,135,198,58,55,158,157, +201,143,230,229,154,103,221,213,245,214,213,21,42,115,222,116,158,33,158,96, +148,12,253,2,188,147,205,242,57,58,91,185,74,242,40,184,74,242,40,184,74,78, +114,229,89,74,182,63,111,183,255,5,75,238,218,119,32,100,170,216,0,0,0,0,73, +69,78,68,174,66,96,130 }; static const char* -default_charset = R"( abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,.!?;:-_/|\!'"+=*()[]{}&%$#@)"; +default_charset = R"( abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,.!?;:-_/|\!'"+=*()[]{}&%$#@<>^`~)"; #include "libjin/jin.h" |