diff options
author | chai <chaifix@163.com> | 2018-10-20 10:13:31 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-20 10:13:31 +0800 |
commit | 58ad98213763348b49d8313675203b287a5442bb (patch) | |
tree | ce3287557048e610c09f7e88417bdeca949a2761 /src | |
parent | 7d5f055547e70fa93ee9ac944e62f8d657b9dc55 (diff) |
*修改头文件宏
Diffstat (limited to 'src')
57 files changed, 166 insertions, 143 deletions
diff --git a/src/libjin/Audio/SDL/je_sdl_audio.h b/src/libjin/Audio/SDL/je_sdl_audio.h index c64b109..4ce3756 100644 --- a/src/libjin/Audio/SDL/je_sdl_audio.h +++ b/src/libjin/Audio/SDL/je_sdl_audio.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_AUDIO_SDL_H -#define __LIBJIN_AUDIO_SDL_H +#ifndef __JE_AUDIO_SDL_H +#define __JE_AUDIO_SDL_H #include "../../core/je_configuration.h" #if LIBJIN_MODULES_AUDIO && LIBJIN_AUDIO_SDLAUDIO @@ -59,4 +59,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_AUDIO && LIBJIN_AUDIO_SDLAUDIO -#endif // __LIBJIN_AUDIO_SDL_H +#endif // __JE_AUDIO_SDL_H diff --git a/src/libjin/Audio/SDL/je_sdl_source.h b/src/libjin/Audio/SDL/je_sdl_source.h index 15676d6..1d055bf 100644 --- a/src/libjin/Audio/SDL/je_sdl_source.h +++ b/src/libjin/Audio/SDL/je_sdl_source.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_SOURCE_SDL_H -#define __LIBJIN_SOURCE_SDL_H +#ifndef __JE_SOURCE_SDL_H +#define __JE_SOURCE_SDL_H #include "../../core/je_configuration.h" #if LIBJIN_MODULES_AUDIO && LIBJIN_AUDIO_SDLAUDIO @@ -104,4 +104,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_AUDIO && LIBJIN_AUDIO_SDLAUDIO -#endif // __LIBJIN_SOURCE_SDL_H +#endif // __JE_SOURCE_SDL_H diff --git a/src/libjin/Audio/je_audio.h b/src/libjin/Audio/je_audio.h index 341e4c9..4dd8007 100644 --- a/src/libjin/Audio/je_audio.h +++ b/src/libjin/Audio/je_audio.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_AUDIO_H -#define __LIBJIN_AUDIO_H +#ifndef __JE_AUDIO_H +#define __JE_AUDIO_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_AUDIO @@ -50,4 +50,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_AUDIO -#endif // __LIBJIN_AUDIO_H +#endif // __JE_AUDIO_H diff --git a/src/libjin/Audio/je_source.h b/src/libjin/Audio/je_source.h index bcac214..07cfee5 100644 --- a/src/libjin/Audio/je_source.h +++ b/src/libjin/Audio/je_source.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_AUDIO_SOURCE_H -#define __LIBJIN_AUDIO_SOURCE_H +#ifndef __JE_AUDIO_SOURCE_H +#define __JE_AUDIO_SOURCE_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_AUDIO @@ -44,4 +44,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_AUDIO -#endif // __LIBJIN_AUDIO_SOURCE_H +#endif // __JE_AUDIO_SOURCE_H diff --git a/src/libjin/Common/je_array.hpp b/src/libjin/Common/je_array.hpp index eadd36f..6708378 100644 --- a/src/libjin/Common/je_array.hpp +++ b/src/libjin/Common/je_array.hpp @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_COMMON_ARRAY_H -#define __LIBJIN_COMMON_ARRAY_H +#ifndef __JE_COMMON_ARRAY_H +#define __JE_COMMON_ARRAY_H namespace jin { diff --git a/src/libjin/Common/je_common.h b/src/libjin/Common/je_common.h index 63528b0..0dfa79a 100644 --- a/src/libjin/Common/je_common.h +++ b/src/libjin/Common/je_common.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_COMMON_H -#define __LIBJIN_COMMON_H +#ifndef __JE_COMMON_H +#define __JE_COMMON_H #include "je_array.hpp" diff --git a/src/libjin/Common/je_object.h b/src/libjin/Common/je_object.h index c4bf225..1f11936 100644 --- a/src/libjin/Common/je_object.h +++ b/src/libjin/Common/je_object.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_COMMON_OBJECT_H -#define __LIBJIN_COMMON_OBJECT_H +#ifndef __JE_COMMON_OBJECT_H +#define __JE_COMMON_OBJECT_H namespace jin { diff --git a/src/libjin/Common/je_singleton.hpp b/src/libjin/Common/je_singleton.hpp index 12b1450..c49184b 100644 --- a/src/libjin/Common/je_singleton.hpp +++ b/src/libjin/Common/je_singleton.hpp @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_SINGLETON_H -#define __LIBJIN_SINGLETON_H +#ifndef __JE_SINGLETON_H +#define __JE_SINGLETON_H namespace jin { @@ -34,4 +34,4 @@ namespace jin } // namespace jin -#endif // __LIBJIN_SINGLETON_H
\ No newline at end of file +#endif // __JE_SINGLETON_H
\ No newline at end of file diff --git a/src/libjin/Common/je_stringmap.hpp b/src/libjin/Common/je_stringmap.hpp index 641e32d..a4c24a9 100644 --- a/src/libjin/Common/je_stringmap.hpp +++ b/src/libjin/Common/je_stringmap.hpp @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_COMMON_SREINGMAP_H -#define __LIBJIN_COMMON_SREINGMAP_H +#ifndef __JE_COMMON_SREINGMAP_H +#define __JE_COMMON_SREINGMAP_H namespace jin { diff --git a/src/libjin/Common/je_subsystem.hpp b/src/libjin/Common/je_subsystem.hpp index 2875058..ecfab20 100644 --- a/src/libjin/Common/je_subsystem.hpp +++ b/src/libjin/Common/je_subsystem.hpp @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_COMMON_SUBSYSTEM_H -#define __LIBJIN_COMMON_SUBSYSTEM_H +#ifndef __JE_COMMON_SUBSYSTEM_H +#define __JE_COMMON_SUBSYSTEM_H #include "../utils/je_macros.h" diff --git a/src/libjin/Common/je_types.h b/src/libjin/Common/je_types.h index 2d257c3..fb11181 100644 --- a/src/libjin/Common/je_types.h +++ b/src/libjin/Common/je_types.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_TYPES_H -#define __LIBJIN_TYPES_H +#ifndef __JE_TYPES_H +#define __JE_TYPES_H #include <stdint.h> namespace jin diff --git a/src/libjin/Common/je_utf8.h b/src/libjin/Common/je_utf8.h index 0193abd..00eaab5 100644 --- a/src/libjin/Common/je_utf8.h +++ b/src/libjin/Common/je_utf8.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_COMMON_UTF8_H -#define __LIBJIN_COMMON_UTF8_H +#ifndef __JE_COMMON_UTF8_H +#define __JE_COMMON_UTF8_H #include "../core/je_configuration.h" #if LIBJIN_OS == LIBJIN_WINDOWS @@ -28,4 +28,4 @@ namespace jin } // namespace jin #endif // LIBJIN_OS == LIBJIN_WINDOWS -#endif // __LIBJIN_COMMON_UTF8_H +#endif // __JE_COMMON_UTF8_H diff --git a/src/libjin/Filesystem/je_buffer.h b/src/libjin/Filesystem/je_buffer.h index f0d987a..6ac9f4a 100644 --- a/src/libjin/Filesystem/je_buffer.h +++ b/src/libjin/Filesystem/je_buffer.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_BUFFER_H -#define __LIBJIN_BUFFER_H +#ifndef __JE_BUFFER_H +#define __JE_BUFFER_H #include <string.h> #include <stdlib.h> diff --git a/src/libjin/Game/je_game.h b/src/libjin/Game/je_game.h index 9323177..5225ed7 100644 --- a/src/libjin/Game/je_game.h +++ b/src/libjin/Game/je_game.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_CORE_GAME_H -#define __LIBJIN_CORE_GAME_H +#ifndef __JE_CORE_GAME_H +#define __JE_CORE_GAME_H #include "../common/je_subsystem.hpp" #include "../utils/je_macros.h" @@ -55,4 +55,4 @@ namespace jin } // namespace core } // namespace jin -#endif // __LIBJIN_CORE_GAME_H +#endif // __JE_CORE_GAME_H diff --git a/src/libjin/Graphics/Font/je_decoder.h b/src/libjin/Graphics/Font/je_decoder.h index e95f7c3..6a69c21 100644 --- a/src/libjin/Graphics/Font/je_decoder.h +++ b/src/libjin/Graphics/Font/je_decoder.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_UTF8_H -#define __LIBJIN_UTF8_H +#ifndef __JE_UTF8_H +#define __JE_UTF8_H #include <vector> diff --git a/src/libjin/Graphics/Font/je_font.h b/src/libjin/Graphics/Font/je_font.h index 9fde723..0601713 100644 --- a/src/libjin/Graphics/Font/je_font.h +++ b/src/libjin/Graphics/Font/je_font.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_FONT_H -#define __LIBJIN_FONT_H +#ifndef __JE_FONT_H +#define __JE_FONT_H #include <vector> #include "je_text.h" diff --git a/src/libjin/Graphics/Font/je_page.h b/src/libjin/Graphics/Font/je_page.h index d887c9b..569780e 100644 --- a/src/libjin/Graphics/Font/je_page.h +++ b/src/libjin/Graphics/Font/je_page.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_PAGE_H -#define __LIBJIN_PAGE_H +#ifndef __JE_PAGE_H +#define __JE_PAGE_H #include "../../math/je_vector2.hpp" diff --git a/src/libjin/Graphics/Font/je_text.h b/src/libjin/Graphics/Font/je_text.h index 38e60ca..9d2dd95 100644 --- a/src/libjin/Graphics/Font/je_text.h +++ b/src/libjin/Graphics/Font/je_text.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_TEXT_H -#define __LIBJIN_TEXT_H +#ifndef __JE_TEXT_H +#define __JE_TEXT_H #include <vector> diff --git a/src/libjin/Graphics/Font/je_texture_font.h b/src/libjin/Graphics/Font/je_texture_font.h index fa3f72e..bfa4815 100644 --- a/src/libjin/Graphics/Font/je_texture_font.h +++ b/src/libjin/Graphics/Font/je_texture_font.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_TEXTURE_FONT_H -#define __LIBJIN_TEXTURE_FONT_H +#ifndef __JE_TEXTURE_FONT_H +#define __JE_TEXTURE_FONT_H #include <map> #include <vector> diff --git a/src/libjin/Graphics/Font/je_ttf.h b/src/libjin/Graphics/Font/je_ttf.h index f3761ac..5c44d26 100644 --- a/src/libjin/Graphics/Font/je_ttf.h +++ b/src/libjin/Graphics/Font/je_ttf.h @@ -1,5 +1,5 @@ -#ifndef __LIBJINTTF_H -#define __LIBJIN_TTF_H +#ifndef __JETTF_H +#define __JE_TTF_H #include "../../core/je_configuration.h" #if LIBJIN_MODULES_RENDER @@ -131,4 +131,4 @@ namespace jin #endif // LIBJIN_MODULES_RENDER -#endif // __LIBJIN_FONT_H
\ No newline at end of file +#endif // __JE_FONT_H
\ No newline at end of file diff --git a/src/libjin/Graphics/Shader/je_base.shader.h b/src/libjin/Graphics/Shader/je_base.shader.h index 45b63cd..0616751 100644 --- a/src/libjin/Graphics/Shader/je_base.shader.h +++ b/src/libjin/Graphics/Shader/je_base.shader.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_BASE_SHADER_H -#define __LIBJIN_BASE_SHADER_H +#ifndef __JE_BASE_SHADER_H +#define __JE_BASE_SHADER_H static const char* base_shared = R"( #define Number float diff --git a/src/libjin/Graphics/Shader/je_shader.h b/src/libjin/Graphics/Shader/je_shader.h index bcee584..5145f85 100644 --- a/src/libjin/Graphics/Shader/je_shader.h +++ b/src/libjin/Graphics/Shader/je_shader.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_SHADER_H -#define __LIBJIN_SHADER_H +#ifndef __JE_SHADER_H +#define __JE_SHADER_H #include "../../core/je_configuration.h" #if defined(jin_graphics) && defined(jin_graphics_shader) @@ -197,4 +197,4 @@ namespace jin #endif // jin_graphics && jin_graphics_shader -#endif // __LIBJIN_SHADER_H
\ No newline at end of file +#endif // __JE_SHADER_H
\ No newline at end of file diff --git a/src/libjin/Graphics/je_bitmap.h b/src/libjin/Graphics/je_bitmap.h index b9747f2..92ab836 100644 --- a/src/libjin/Graphics/je_bitmap.h +++ b/src/libjin/Graphics/je_bitmap.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_BITMAP_H -#define __LIBJIN_BITMAP_H +#ifndef __JE_BITMAP_H +#define __JE_BITMAP_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_RENDER diff --git a/src/libjin/Graphics/je_canvas.h b/src/libjin/Graphics/je_canvas.h index 12611d9..5a44e87 100644 --- a/src/libjin/Graphics/je_canvas.h +++ b/src/libjin/Graphics/je_canvas.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_CANVAS_H -#define __LIBJIN_CANVAS_H +#ifndef __JE_CANVAS_H +#define __JE_CANVAS_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_RENDER @@ -63,4 +63,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_RENDER -#endif // __LIBJIN_CANVAS_H
\ No newline at end of file +#endif // __JE_CANVAS_H
\ No newline at end of file diff --git a/src/libjin/Graphics/je_color.h b/src/libjin/Graphics/je_color.h index b13d882..675d25e 100644 --- a/src/libjin/Graphics/je_color.h +++ b/src/libjin/Graphics/je_color.h @@ -1,8 +1,8 @@ /** * Some color operating here. */ -#ifndef __LIBJIN_COLOR_H -#define __LIBJIN_COLOR_H +#ifndef __JE_COLOR_H +#define __JE_COLOR_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_RENDER @@ -82,4 +82,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_RENDER -#endif // __LIBJIN_COLOR_H
\ No newline at end of file +#endif // __JE_COLOR_H
\ No newline at end of file diff --git a/src/libjin/Graphics/je_drawable.h b/src/libjin/Graphics/je_drawable.h index 13464f0..f31f3d7 100644 --- a/src/libjin/Graphics/je_drawable.h +++ b/src/libjin/Graphics/je_drawable.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_DRAWABLE -#define __LIBJIN_DRAWABLE +#ifndef __JE_DRAWABLE +#define __JE_DRAWABLE #include "../core/je_configuration.h" #if LIBJIN_MODULES_RENDER @@ -87,4 +87,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_RENDER -#endif // __LIBJIN_DRAWABLE
\ No newline at end of file +#endif // __JE_DRAWABLE
\ No newline at end of file diff --git a/src/libjin/Graphics/je_gl.h b/src/libjin/Graphics/je_gl.h index 296b8aa..2b76162 100644 --- a/src/libjin/Graphics/je_gl.h +++ b/src/libjin/Graphics/je_gl.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_OPENGL_H -#define __LIBJIN_OPENGL_H +#ifndef __JE_OPENGL_H +#define __JE_OPENGL_H #include "../3rdparty/GLee/GLee.h" #include "../3rdparty/ogl/OpenGL.h" diff --git a/src/libjin/Graphics/je_graphics.h b/src/libjin/Graphics/je_graphics.h index 6f099cd..8c964c3 100644 --- a/src/libjin/Graphics/je_graphics.h +++ b/src/libjin/Graphics/je_graphics.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_GRAPHICS_H -#define __LIBJIN_GRAPHICS_H +#ifndef __JE_GRAPHICS_H +#define __JE_GRAPHICS_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_RENDER @@ -18,4 +18,4 @@ #include "font/je_texture_font.h" #endif // LIBJIN_MODULES_RENDER -#endif // __LIBJIN_GRAPHICS_H
\ No newline at end of file +#endif // __JE_GRAPHICS_H
\ No newline at end of file diff --git a/src/libjin/Graphics/je_image.h b/src/libjin/Graphics/je_image.h index 5c06258..adb9cde 100644 --- a/src/libjin/Graphics/je_image.h +++ b/src/libjin/Graphics/je_image.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_IMAGE_H -#define __LIBJIN_IMAGE_H +#ifndef __JE_IMAGE_H +#define __JE_IMAGE_H #include "je_bitmap.h" diff --git a/src/libjin/Graphics/je_mesh.h b/src/libjin/Graphics/je_mesh.h index 66727e4..e85344c 100644 --- a/src/libjin/Graphics/je_mesh.h +++ b/src/libjin/Graphics/je_mesh.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_MESH_H -#define __LIBJIN_MESH_H +#ifndef __JE_MESH_H +#define __JE_MESH_H namespace jin { diff --git a/src/libjin/Graphics/je_shapes.h b/src/libjin/Graphics/je_shapes.h index 32b5284..bb2da25 100644 --- a/src/libjin/Graphics/je_shapes.h +++ b/src/libjin/Graphics/je_shapes.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_GEOMETRY_H -#define __LIBJIN_GEOMETRY_H +#ifndef __JE_GEOMETRY_H +#define __JE_GEOMETRY_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_RENDER @@ -34,4 +34,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_RENDER -#endif // __LIBJIN_GEOMETRY_H
\ No newline at end of file +#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 7a4e53a..e0bf6fa 100644 --- a/src/libjin/Graphics/je_sprite.h +++ b/src/libjin/Graphics/je_sprite.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_SPRITE_H -#define __LIBJIN_SPRITE_H +#ifndef __JE_SPRITE_H +#define __JE_SPRITE_H namespace jin { diff --git a/src/libjin/Graphics/je_texture.h b/src/libjin/Graphics/je_texture.h index 30c5063..a58f1db 100644 --- a/src/libjin/Graphics/je_texture.h +++ b/src/libjin/Graphics/je_texture.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_TEXTURE_H -#define __LIBJIN_TEXTURE_H +#ifndef __JE_TEXTURE_H +#define __JE_TEXTURE_H #include "../core/je_configuration.h" #if defined(jin_graphics) @@ -42,4 +42,4 @@ namespace jin #endif // jin_graphics -#endif // __LIBJIN_TEXTURE_H
\ No newline at end of file +#endif // __JE_TEXTURE_H
\ No newline at end of file diff --git a/src/libjin/Graphics/je_window.h b/src/libjin/Graphics/je_window.h index 995d8b0..08a9c59 100644 --- a/src/libjin/Graphics/je_window.h +++ b/src/libjin/Graphics/je_window.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_RENDER_WINDOW -#define __LIBJIN_RENDER_WINDOW +#ifndef __JE_RENDER_WINDOW +#define __JE_RENDER_WINDOW #include "../core/je_configuration.h" #if defined(jin_graphics) @@ -93,4 +93,4 @@ namespace jin #endif // jin_graphics -#endif // __LIBJIN_RENDER_WINDOW
\ No newline at end of file +#endif // __JE_RENDER_WINDOW
\ No newline at end of file diff --git a/src/libjin/Input/je_event.h b/src/libjin/Input/je_event.h index d8ceda0..e39032e 100644 --- a/src/libjin/Input/je_event.h +++ b/src/libjin/Input/je_event.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_EVENT_H -#define __LIBJIN_EVENT_H +#ifndef __JE_EVENT_H +#define __JE_EVENT_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_INPUT diff --git a/src/libjin/Input/je_input.h b/src/libjin/Input/je_input.h index 2f6a895..8c7faf7 100644 --- a/src/libjin/Input/je_input.h +++ b/src/libjin/Input/je_input.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_INPUT_H -#define __LIBJIN_INPUT_H +#ifndef __JE_INPUT_H +#define __JE_INPUT_H #include "je_event.h" #include "je_keyboard.h" diff --git a/src/libjin/Input/je_joypad.h b/src/libjin/Input/je_joypad.h index 570699e..a163dca 100644 --- a/src/libjin/Input/je_joypad.h +++ b/src/libjin/Input/je_joypad.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_JOYPAD_H -#define __LIBJIN_JOYPAD_H +#ifndef __JE_JOYPAD_H +#define __JE_JOYPAD_H #include <SDL2/SDL.h> diff --git a/src/libjin/Input/je_keyboard.h b/src/libjin/Input/je_keyboard.h index 60f1169..2b9ea38 100644 --- a/src/libjin/Input/je_keyboard.h +++ b/src/libjin/Input/je_keyboard.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_KEYBOARD_H -#define __LIBJIN_KEYBOARD_H +#ifndef __JE_KEYBOARD_H +#define __JE_KEYBOARD_H namespace jin { @@ -14,4 +14,4 @@ namespace jin } // namespace input } // namespace jin -#endif // __LIBJIN_KEYBOARD_H
\ No newline at end of file +#endif // __JE_KEYBOARD_H
\ No newline at end of file diff --git a/src/libjin/Input/je_mouse.h b/src/libjin/Input/je_mouse.h index e9fab42..f229ed1 100644 --- a/src/libjin/Input/je_mouse.h +++ b/src/libjin/Input/je_mouse.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_MOUSE_H -#define __LIBJIN_MOUSE_H +#ifndef __JE_MOUSE_H +#define __JE_MOUSE_H #include "../core/je_configuration.h" #ifdef LIBJIN_MODULES_INPUT @@ -28,4 +28,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_INPUT -#endif // __LIBJIN_MOUSE_H
\ No newline at end of file +#endif // __JE_MOUSE_H
\ No newline at end of file diff --git a/src/libjin/Math/je_constant.h b/src/libjin/Math/je_constant.h index f8e0f5a..5ab126c 100644 --- a/src/libjin/Math/je_constant.h +++ b/src/libjin/Math/je_constant.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_MATH_CONSTANT_H -#define __LIBJIN_MATH_CONSTANT_H +#ifndef __JE_MATH_CONSTANT_H +#define __JE_MATH_CONSTANT_H #define PI 3.1415926f diff --git a/src/libjin/Math/je_math.h b/src/libjin/Math/je_math.h index b6a2ffd..66cb2d6 100644 --- a/src/libjin/Math/je_math.h +++ b/src/libjin/Math/je_math.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_UTILS_MATH_H -#define __LIBJIN_UTILS_MATH_H +#ifndef __JE_UTILS_MATH_H +#define __JE_UTILS_MATH_H #include "je_constant.h" #include "je_matrix.h" diff --git a/src/libjin/Math/je_matrix.h b/src/libjin/Math/je_matrix.h index 1fe6ab1..f478d70 100644 --- a/src/libjin/Math/je_matrix.h +++ b/src/libjin/Math/je_matrix.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_MATRIX_H -#define __LIBJIN_MATRIX_H +#ifndef __JE_MATRIX_H +#define __JE_MATRIX_H namespace jin { diff --git a/src/libjin/Math/je_quad.h b/src/libjin/Math/je_quad.h index 6eb4f45..3f6c26d 100644 --- a/src/libjin/Math/je_quad.h +++ b/src/libjin/Math/je_quad.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_QUAD_H -#define __LIBJIN_QUAD_H +#ifndef __JE_QUAD_H +#define __JE_QUAD_H namespace jin { diff --git a/src/libjin/Math/je_vector2.hpp b/src/libjin/Math/je_vector2.hpp index 51ac4a7..7ebe307 100644 --- a/src/libjin/Math/je_vector2.hpp +++ b/src/libjin/Math/je_vector2.hpp @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_VECTOR_H -#define __LIBJIN_VECTOR_H +#ifndef __JE_VECTOR_H +#define __JE_VECTOR_H namespace jin { diff --git a/src/libjin/Math/je_vector3.hpp b/src/libjin/Math/je_vector3.hpp index 96d4e9a..d200898 100644 --- a/src/libjin/Math/je_vector3.hpp +++ b/src/libjin/Math/je_vector3.hpp @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_VECTOR3_H -#define __LIBJIN_VECTOR3_H +#ifndef __JE_VECTOR3_H +#define __JE_VECTOR3_H namespace jin { diff --git a/src/libjin/Math/je_vector4.hpp b/src/libjin/Math/je_vector4.hpp index 35be056..81b343f 100644 --- a/src/libjin/Math/je_vector4.hpp +++ b/src/libjin/Math/je_vector4.hpp @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_VECTOR4_H -#define __LIBJIN_VECTOR4_H +#ifndef __JE_VECTOR4_H +#define __JE_VECTOR4_H namespace jin { diff --git a/src/libjin/Net/je_net.h b/src/libjin/Net/je_net.h index 7718085..6ed018a 100644 --- a/src/libjin/Net/je_net.h +++ b/src/libjin/Net/je_net.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_NET_H -#define __LIBJIN_NET_H +#ifndef __JE_NET_H +#define __JE_NET_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_NET @@ -29,4 +29,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_NET -#endif // __LIBJIN_NET_H +#endif // __JE_NET_H diff --git a/src/libjin/Net/je_socket.h b/src/libjin/Net/je_socket.h index ab6a561..e360d72 100644 --- a/src/libjin/Net/je_socket.h +++ b/src/libjin/Net/je_socket.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_NET_SOCKET_H -#define __LIBJIN_NET_SOCKET_H +#ifndef __JE_NET_SOCKET_H +#define __JE_NET_SOCKET_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_NET @@ -59,4 +59,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_NET -#endif // __LIBJIN_NET_SOCKET_H +#endif // __JE_NET_SOCKET_H diff --git a/src/libjin/Thread/je_thread.h b/src/libjin/Thread/je_thread.h index bdbc093..ddba541 100644 --- a/src/libjin/Thread/je_thread.h +++ b/src/libjin/Thread/je_thread.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_THREAD_H -#define __LIBJIN_THREAD_H +#ifndef __JE_THREAD_H +#define __JE_THREAD_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_THREAD @@ -163,4 +163,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_THREAD -#endif // __LIBJIN_THREAD_H
\ No newline at end of file +#endif // __JE_THREAD_H
\ No newline at end of file diff --git a/src/libjin/Time/je_timer.h b/src/libjin/Time/je_timer.h index c31de42..12d3101 100644 --- a/src/libjin/Time/je_timer.h +++ b/src/libjin/Time/je_timer.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_TIMER_H -#define __LIBJIN_TIMER_H +#ifndef __JE_TIMER_H +#define __JE_TIMER_H #include "../core/je_configuration.h" #if LIBJIN_MODULES_TIME @@ -74,4 +74,4 @@ namespace jin } // namespace jin #endif // LIBJIN_MODULES_TIME -#endif // __LIBJIN_TIMER_H +#endif // __JE_TIMER_H diff --git a/src/libjin/Utils/je_macros.h b/src/libjin/Utils/je_macros.h index e19193c..475a482 100644 --- a/src/libjin/Utils/je_macros.h +++ b/src/libjin/Utils/je_macros.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_MACROS_H -#define __LIBJIN_MACROS_H +#ifndef __JE_MACROS_H +#define __JE_MACROS_H #include <cstring> //#define implement // ʵֽӿ diff --git a/src/libjin/Utils/je_utils.h b/src/libjin/Utils/je_utils.h index 583f892..21c507d 100644 --- a/src/libjin/Utils/je_utils.h +++ b/src/libjin/Utils/je_utils.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_UTILS_H -#define __LIBJIN_UTILS_H +#ifndef __JE_UTILS_H +#define __JE_UTILS_H #include "je_macros.h" #include "je_endian.h" diff --git a/src/libjin/core/je_configuration.h b/src/libjin/core/je_configuration.h index 55633a1..819b34d 100644 --- a/src/libjin/core/je_configuration.h +++ b/src/libjin/core/je_configuration.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_COMMON_MODULES_H -#define __LIBJIN_COMMON_MODULES_H +#ifndef __JE_COMMON_MODULES_H +#define __JE_COMMON_MODULES_H /* * ģģı룬Ҫģرղ */ diff --git a/src/libjin/core/je_types.h b/src/libjin/core/je_types.h index 71ba640..3c902cc 100644 --- a/src/libjin/core/je_types.h +++ b/src/libjin/core/je_types.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_CORE_TYPES_H -#define __LIBJIN_CORE_TYPES_H +#ifndef __JE_CORE_TYPES_H +#define __JE_CORE_TYPES_H #include <stdint.h> @@ -21,4 +21,4 @@ namespace jin } } -#endif // __LIBJIN_CORE_TYPES_H
\ No newline at end of file +#endif // __JE_CORE_TYPES_H
\ No newline at end of file diff --git a/src/libjin/jin.h b/src/libjin/jin.h index 0b6a416..ad328d4 100644 --- a/src/libjin/jin.h +++ b/src/libjin/jin.h @@ -1,5 +1,5 @@ -#ifndef __LIBJIN_H -#define __LIBJIN_H +#ifndef __JE_H +#define __JE_H #include "core/je_configuration.h" @@ -22,4 +22,4 @@ #define LIBJIN_RELEASE "Jin 0.1.1"; #define LIBJIN_VERSION_NUM 101; -#endif // __LIBJIN_H
\ No newline at end of file +#endif // __JE_H
\ No newline at end of file diff --git a/src/lua/modules/graphics/graphics.cpp b/src/lua/modules/graphics/graphics.cpp index 4ef2b56..31f6fba 100644 --- a/src/lua/modules/graphics/graphics.cpp +++ b/src/lua/modules/graphics/graphics.cpp @@ -1,18 +1,16 @@ -#include "lua/modules/luax.h" -#include "lua/modules/types.h" -#include "libjin/jin.h" -#include "lua/common/common.h" - #include <iostream> #include <fstream> -using namespace std; +#include "libjin/jin.h" +#include "lua/modules/luax.h" +#include "lua/modules/types.h" +#include "lua/common/common.h" namespace jin { namespace lua { - + using namespace std; using namespace jin::graphics; using jin::filesystem::Filesystem; using jin::filesystem::Buffer; @@ -655,8 +653,23 @@ namespace lua { Proxy* p = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_BITMAP); Bitmap* bitmap = p->getObject<Bitmap>(); - Proxy* pt = (Proxy*)luax_checktype(L, 2, JIN_GRAPHICS_TEXT); - Text* text = pt->getObject<Text>(); + Text* text; + if (luax_istype(L, 2, JIN_GRAPHICS_TEXT)) + { + Proxy* pt = (Proxy*)luax_checktype(L, 2, JIN_GRAPHICS_TEXT); + text = pt->getObject<Text>(); + } + else if (luax_isstring(L, 2)) + { + unsigned len; + const char* str = luax_checklstring(L, 2, &len); + text = new Text(Encode::UTF8, str, len); + } + else + { + luax_typerror(L, 2, "Text or string"); + return 1; + } float cellh = luax_checknumber(L, 4); TextureFont* textureFont = nullptr; if (luax_istable(L, 3)) @@ -672,6 +685,16 @@ namespace lua float cellw = luax_checknumber(L, 3); textureFont = TextureFont::createTextureFont(bitmap, *text, cellw, cellh); } + else + { + luax_error(L, "bad arguments #3 to 'newTextureFont', need to be table or number"); + return 0; + } + if (luax_isstring(L, 2)) + { + // Delete temporary text. + delete text; + } Proxy* proxy = (Proxy*)luax_newinstance(L, JIN_GRAPHICS_TEXTUREFONT, sizeof(Proxy)); proxy->bind(new Ref<TextureFont>(textureFont, JIN_GRAPHICS_TEXTUREFONT)); return 1; diff --git a/src/lua/modules/graphics/textureFont.cpp b/src/lua/modules/graphics/texture_font.cpp index 4cf5bdd..4cf5bdd 100644 --- a/src/lua/modules/graphics/textureFont.cpp +++ b/src/lua/modules/graphics/texture_font.cpp |