aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/Jin.exebin478208 -> 478208 bytes
-rw-r--r--bin/jin.exebin478208 -> 478208 bytes
-rw-r--r--src/libjin/Graphics/Font/je_text.cpp2
-rw-r--r--src/lua/common/Proxy.h4
-rw-r--r--src/lua/embed/embed.h2
-rw-r--r--src/lua/jin.cpp178
-rw-r--r--src/lua/jin.h11
-rw-r--r--src/lua/modules/audio/audio.cpp4
-rw-r--r--src/lua/modules/audio/source.cpp4
-rw-r--r--src/lua/modules/bit/bit.cpp4
-rw-r--r--src/lua/modules/core/core.cpp4
-rw-r--r--src/lua/modules/event/event.cpp4
-rw-r--r--src/lua/modules/filesystem/filesystem.cpp4
-rw-r--r--src/lua/modules/graphics/bitmap.cpp2
-rw-r--r--src/lua/modules/graphics/canvas.cpp4
-rw-r--r--src/lua/modules/graphics/page.cpp4
-rw-r--r--src/lua/modules/graphics/shader.cpp4
-rw-r--r--src/lua/modules/graphics/text.cpp4
-rw-r--r--src/lua/modules/graphics/texture_font.cpp4
-rw-r--r--src/lua/modules/graphics/ttf.cpp4
-rw-r--r--src/lua/modules/graphics/ttfData.cpp4
-rw-r--r--src/lua/modules/joypad/joypad.cpp4
-rw-r--r--src/lua/modules/keyboard/keyboard.cpp4
-rw-r--r--src/lua/modules/math/math.cpp4
-rw-r--r--src/lua/modules/mouse/mouse.cpp4
-rw-r--r--src/lua/modules/net/Buffer.cpp6
-rw-r--r--src/lua/modules/net/Buffer.h6
-rw-r--r--src/lua/modules/net/net.cpp4
-rw-r--r--src/lua/modules/net/socket.cpp4
-rw-r--r--src/lua/modules/thread/Thread.cpp4
-rw-r--r--src/lua/modules/thread/Thread.h4
-rw-r--r--src/lua/modules/time/time.cpp4
32 files changed, 152 insertions, 147 deletions
diff --git a/bin/Jin.exe b/bin/Jin.exe
index b44458d..ca3ff90 100644
--- a/bin/Jin.exe
+++ b/bin/Jin.exe
Binary files differ
diff --git a/bin/jin.exe b/bin/jin.exe
index b44458d..ca3ff90 100644
--- a/bin/jin.exe
+++ b/bin/jin.exe
Binary files differ
diff --git a/src/libjin/Graphics/Font/je_text.cpp b/src/libjin/Graphics/Font/je_text.cpp
index beba94f..70a1c36 100644
--- a/src/libjin/Graphics/Font/je_text.cpp
+++ b/src/libjin/Graphics/Font/je_text.cpp
@@ -21,7 +21,6 @@ namespace JinEngine
switch (encode)
{
case Encode::UTF8: decoder = new Utf8(); break;
- //case Encode::UTF16: decoder = new Utf16(); break;
case Encode::ASCII: decoder = new Ascii(); break;
}
}
@@ -35,7 +34,6 @@ namespace JinEngine
switch (encode)
{
case Encode::UTF8: decoder = new Utf8(); break;
- //case Encode::UTF16: decoder = new Utf16(); break;
case Encode::ASCII: decoder = new Ascii(); break;
}
}
diff --git a/src/lua/common/Proxy.h b/src/lua/common/Proxy.h
index 1fa72e4..4fec5ff 100644
--- a/src/lua/common/Proxy.h
+++ b/src/lua/common/Proxy.h
@@ -61,7 +61,7 @@ namespace Lua
};
-} // Lua
-} // JinEngine
+} // namespace Lua
+} // namespace JinEngine
#endif // __JIN_COMMON_PROXY_H \ No newline at end of file
diff --git a/src/lua/embed/embed.h b/src/lua/embed/embed.h
index cde2ba4..18373c8 100644
--- a/src/lua/embed/embed.h
+++ b/src/lua/embed/embed.h
@@ -41,6 +41,6 @@ namespace embed
}
} // embed
-} // JinEngine
+} // namespace JinEngine
#endif \ No newline at end of file
diff --git a/src/lua/jin.cpp b/src/lua/jin.cpp
index fc1e443..4d8837a 100644
--- a/src/lua/jin.cpp
+++ b/src/lua/jin.cpp
@@ -4,106 +4,106 @@
namespace JinEngine
{
-namespace Lua
-{
+ namespace Lua
+ {
- extern int luaopen_core(lua_State* L);
- extern int luaopen_graphics(lua_State* L);
- extern int luaopen_audio(lua_State* L);
- extern int luaopen_net(lua_State* L);
- extern int luaopen_event(lua_State* L);
- extern int luaopen_time(lua_State* L);
- extern int luaopen_mouse(lua_State* L);
- extern int luaopen_keyboard(lua_State* L);
- extern int luaopen_filesystem(lua_State* L);
- extern int luaopen_joypad(lua_State* L);
- extern int luaopen_math(lua_State* L);
- extern int luaopen_thread(lua_State* L);
- extern int luaopen_bit(lua_State* L);
+ extern int luaopen_core(lua_State* L);
+ extern int luaopen_graphics(lua_State* L);
+ extern int luaopen_audio(lua_State* L);
+ extern int luaopen_net(lua_State* L);
+ extern int luaopen_event(lua_State* L);
+ extern int luaopen_time(lua_State* L);
+ extern int luaopen_mouse(lua_State* L);
+ extern int luaopen_keyboard(lua_State* L);
+ extern int luaopen_filesystem(lua_State* L);
+ extern int luaopen_joypad(lua_State* L);
+ extern int luaopen_math(lua_State* L);
+ extern int luaopen_thread(lua_State* L);
+ extern int luaopen_bit(lua_State* L);
- static int l_getversion(lua_State* L)
- {
- luax_pushstring(L, VERSION);
- return 1;
- }
+ static int l_getversion(lua_State* L)
+ {
+ luax_pushstring(L, VERSION);
+ return 1;
+ }
- static int l_getAuthor(lua_State* L)
- {
- luax_pushstring(L, AUTHOR);
- return 1;
- }
+ static int l_getAuthor(lua_State* L)
+ {
+ luax_pushstring(L, AUTHOR);
+ return 1;
+ }
- static int l_getOS(lua_State* L)
- {
- #ifdef _WIN32
- luax_pushstring(L, "windows");
- #elif defined __unix__
- luax_pushstring(L, "unix");
- #elif defined __APPLE__
- luax_pushstring(L, "macos");
- #endif
- return 1;
- }
+ static int l_getOS(lua_State* L)
+ {
+ #ifdef _WIN32
+ luax_pushstring(L, "windows");
+ #elif defined __unix__
+ luax_pushstring(L, "unix");
+ #elif defined __APPLE__
+ luax_pushstring(L, "macos");
+ #endif
+ return 1;
+ }
- static int l_revision(lua_State* L)
- {
- luax_pushnumber(L, REVISION);
- return 1;
- }
+ static int l_revision(lua_State* L)
+ {
+ luax_pushnumber(L, REVISION);
+ return 1;
+ }
- static const luax_Str s[] = {
- { "version", VERSION },
- { "author", AUTHOR },
- { "codename", CODE_NAME },
- { 0, 0 }
- };
+ static const luax_Str s[] = {
+ { "version", VERSION },
+ { "author", AUTHOR },
+ { "codename", CODE_NAME },
+ { 0, 0 }
+ };
- static const luax_Num n[] = {
- { "revision", REVISION },
- { 0, 0 }
- };
+ static const luax_Num n[] = {
+ { "revision", REVISION },
+ { 0, 0 }
+ };
- /* sub modules */
- static const luax_Ref mods[] = {
- { "core", luaopen_core },
- { "event", luaopen_event },
- { "graphics", luaopen_graphics },
- { "time", luaopen_time },
- { "mouse", luaopen_mouse },
- { "keyboard", luaopen_keyboard },
- { "filesystem", luaopen_filesystem },
- { "net", luaopen_net },
- { "audio", luaopen_audio },
- { "joypad", luaopen_joypad },
- { "math", luaopen_math },
- { "thread", luaopen_thread },
- { "bit", luaopen_bit },
- { 0, 0 }
- };
+ /* sub modules */
+ static const luax_Ref mods[] = {
+ { "core", luaopen_core },
+ { "event", luaopen_event },
+ { "graphics", luaopen_graphics },
+ { "time", luaopen_time },
+ { "mouse", luaopen_mouse },
+ { "keyboard", luaopen_keyboard },
+ { "filesystem", luaopen_filesystem },
+ { "net", luaopen_net },
+ { "audio", luaopen_audio },
+ { "joypad", luaopen_joypad },
+ { "math", luaopen_math },
+ { "thread", luaopen_thread },
+ { "bit", luaopen_bit },
+ { 0, 0 }
+ };
- /* register jin module, keep it on the top of stack */
- int luaopen_jin(lua_State* L)
- {
- luax_globaltable(L, MODULE_NAME);
+ /* register jin module, keep it on the top of stack */
+ int luaopen_jin(lua_State* L)
+ {
+ luax_globaltable(L, MODULE_NAME);
- /* register values */
- luax_setfieldstrings(L, s);
- luax_setfieldnumbers(L, n);
+ /* register values */
+ luax_setfieldstrings(L, s);
+ luax_setfieldnumbers(L, n);
- /* register submodules */
- for (int i = 0; mods[i].name; ++i)
- {
- mods[i].func(L);
- luax_setfield(L, -2, mods[i].name);
- }
+ /* register submodules */
+ for (int i = 0; mods[i].name; ++i)
+ {
+ mods[i].func(L);
+ luax_setfield(L, -2, mods[i].name);
+ }
- return 1;
- }
+ return 1;
+ }
- void boot(lua_State* L)
- {
- JinEngine::embed::boot(L);
- }
+ void boot(lua_State* L)
+ {
+ JinEngine::embed::boot(L);
+ }
-} // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/jin.h b/src/lua/jin.h
index d88eed5..71ad51b 100644
--- a/src/lua/jin.h
+++ b/src/lua/jin.h
@@ -18,10 +18,17 @@ namespace JinEngine
namespace Lua
{
+ ///
+ /// open jin module.
+ ///
int luaopen_jin(lua_State* L);
+
+ ///
+ /// Boot jin.
+ ///
void boot(lua_State* L);
- } // JinEngine
-} // Lua
+ } // namespace JinEngine
+} // namespace Lua
#endif // __JIN_M_JIN_H \ No newline at end of file
diff --git a/src/lua/modules/audio/audio.cpp b/src/lua/modules/audio/audio.cpp
index 8d8bd22..0aa4a29 100644
--- a/src/lua/modules/audio/audio.cpp
+++ b/src/lua/modules/audio/audio.cpp
@@ -119,5 +119,5 @@ namespace JinEngine
return 1;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/audio/source.cpp b/src/lua/modules/audio/source.cpp
index e5b7953..bf43ceb 100644
--- a/src/lua/modules/audio/source.cpp
+++ b/src/lua/modules/audio/source.cpp
@@ -112,5 +112,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/bit/bit.cpp b/src/lua/modules/bit/bit.cpp
index 2d0b644..cedd60a 100644
--- a/src/lua/modules/bit/bit.cpp
+++ b/src/lua/modules/bit/bit.cpp
@@ -80,5 +80,5 @@ namespace JinEngine
return 1;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/core/core.cpp b/src/lua/modules/core/core.cpp
index da7b470..a576bec 100644
--- a/src/lua/modules/core/core.cpp
+++ b/src/lua/modules/core/core.cpp
@@ -42,5 +42,5 @@ namespace JinEngine
return 1;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/event/event.cpp b/src/lua/modules/event/event.cpp
index 7227516..9f565d0 100644
--- a/src/lua/modules/event/event.cpp
+++ b/src/lua/modules/event/event.cpp
@@ -126,5 +126,5 @@ namespace JinEngine
return 1;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/filesystem/filesystem.cpp b/src/lua/modules/filesystem/filesystem.cpp
index 4919936..f46f8d9 100644
--- a/src/lua/modules/filesystem/filesystem.cpp
+++ b/src/lua/modules/filesystem/filesystem.cpp
@@ -136,5 +136,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/graphics/bitmap.cpp b/src/lua/modules/graphics/bitmap.cpp
index 30ac807..13517f9 100644
--- a/src/lua/modules/graphics/bitmap.cpp
+++ b/src/lua/modules/graphics/bitmap.cpp
@@ -110,4 +110,4 @@ namespace JinEngine
}
} // graphics
-} // JinEngine \ No newline at end of file
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/graphics/canvas.cpp b/src/lua/modules/graphics/canvas.cpp
index 506d782..79e7282 100644
--- a/src/lua/modules/graphics/canvas.cpp
+++ b/src/lua/modules/graphics/canvas.cpp
@@ -71,5 +71,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/graphics/page.cpp b/src/lua/modules/graphics/page.cpp
index d135ac0..8c9e918 100644
--- a/src/lua/modules/graphics/page.cpp
+++ b/src/lua/modules/graphics/page.cpp
@@ -69,5 +69,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/graphics/shader.cpp b/src/lua/modules/graphics/shader.cpp
index d2d0767..d7733d4 100644
--- a/src/lua/modules/graphics/shader.cpp
+++ b/src/lua/modules/graphics/shader.cpp
@@ -131,5 +131,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/graphics/text.cpp b/src/lua/modules/graphics/text.cpp
index beefcae..cbc82f1 100644
--- a/src/lua/modules/graphics/text.cpp
+++ b/src/lua/modules/graphics/text.cpp
@@ -28,5 +28,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/graphics/texture_font.cpp b/src/lua/modules/graphics/texture_font.cpp
index 0c31ef7..a2e88ba 100644
--- a/src/lua/modules/graphics/texture_font.cpp
+++ b/src/lua/modules/graphics/texture_font.cpp
@@ -63,5 +63,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/graphics/ttf.cpp b/src/lua/modules/graphics/ttf.cpp
index 5eb536e..414c7eb 100644
--- a/src/lua/modules/graphics/ttf.cpp
+++ b/src/lua/modules/graphics/ttf.cpp
@@ -69,5 +69,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/graphics/ttfData.cpp b/src/lua/modules/graphics/ttfData.cpp
index d7f06fb..43c3613 100644
--- a/src/lua/modules/graphics/ttfData.cpp
+++ b/src/lua/modules/graphics/ttfData.cpp
@@ -47,5 +47,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/joypad/joypad.cpp b/src/lua/modules/joypad/joypad.cpp
index 75df50f..d67a624 100644
--- a/src/lua/modules/joypad/joypad.cpp
+++ b/src/lua/modules/joypad/joypad.cpp
@@ -17,5 +17,5 @@ namespace JinEngine
return 1;
}
/*SDL_JoystickGetButton*/
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/keyboard/keyboard.cpp b/src/lua/modules/keyboard/keyboard.cpp
index 22bba0d..727a51e 100644
--- a/src/lua/modules/keyboard/keyboard.cpp
+++ b/src/lua/modules/keyboard/keyboard.cpp
@@ -12,5 +12,5 @@ namespace JinEngine
return 1;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/math/math.cpp b/src/lua/modules/math/math.cpp
index fe05b3e..4891762 100644
--- a/src/lua/modules/math/math.cpp
+++ b/src/lua/modules/math/math.cpp
@@ -26,5 +26,5 @@ namespace JinEngine
return 1;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/mouse/mouse.cpp b/src/lua/modules/mouse/mouse.cpp
index 4ef5c16..9d45178 100644
--- a/src/lua/modules/mouse/mouse.cpp
+++ b/src/lua/modules/mouse/mouse.cpp
@@ -38,5 +38,5 @@ namespace JinEngine
return 1;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/net/Buffer.cpp b/src/lua/modules/net/Buffer.cpp
index bf71fa7..ddfbd6b 100644
--- a/src/lua/modules/net/Buffer.cpp
+++ b/src/lua/modules/net/Buffer.cpp
@@ -130,7 +130,7 @@ namespace JinEngine
{ 0, 0 }
};
- } // Net
+ } // namespace Net
int luaopen_Buffer(lua_State* L)
{
@@ -138,5 +138,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/net/Buffer.h b/src/lua/modules/net/Buffer.h
index eefbc32..8733778 100644
--- a/src/lua/modules/net/Buffer.h
+++ b/src/lua/modules/net/Buffer.h
@@ -90,8 +90,8 @@ namespace JinEngine
};
- } // Net
- } // Lua
-} // JinEngine
+ } // namespace Net
+ } // namespace Lua
+} // namespace JinEngine
#endif \ No newline at end of file
diff --git a/src/lua/modules/net/net.cpp b/src/lua/modules/net/net.cpp
index cc2b8de..4ef9ece 100644
--- a/src/lua/modules/net/net.cpp
+++ b/src/lua/modules/net/net.cpp
@@ -82,5 +82,5 @@ namespace Lua
return 1;
}
-} // Lua
-} // JinEngine \ No newline at end of file
+} // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/net/socket.cpp b/src/lua/modules/net/socket.cpp
index 9164073..d6de730 100644
--- a/src/lua/modules/net/socket.cpp
+++ b/src/lua/modules/net/socket.cpp
@@ -125,5 +125,5 @@ namespace JinEngine
return 0;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/thread/Thread.cpp b/src/lua/modules/thread/Thread.cpp
index b0cbf8e..e1c5a92 100644
--- a/src/lua/modules/thread/Thread.cpp
+++ b/src/lua/modules/thread/Thread.cpp
@@ -248,5 +248,5 @@ namespace JinEngine
return 1;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/thread/Thread.h b/src/lua/modules/thread/Thread.h
index 2ccadc2..60d588a 100644
--- a/src/lua/modules/thread/Thread.h
+++ b/src/lua/modules/thread/Thread.h
@@ -90,5 +90,5 @@ namespace JinEngine
};
} // thread
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file
diff --git a/src/lua/modules/time/time.cpp b/src/lua/modules/time/time.cpp
index ec4d6b9..f6e6f26 100644
--- a/src/lua/modules/time/time.cpp
+++ b/src/lua/modules/time/time.cpp
@@ -34,5 +34,5 @@ namespace JinEngine
return 1;
}
- } // Lua
-} // JinEngine \ No newline at end of file
+ } // namespace Lua
+} // namespace JinEngine \ No newline at end of file