diff options
author | chai <chaifix@163.com> | 2018-12-22 12:56:40 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-12-22 12:56:40 +0800 |
commit | ef7c4915c20d7f6ceb5484f99f96979fd5a9594d (patch) | |
tree | ed5f5e8b91dca09c7728448ee0ad6f72f2039bb7 /src | |
parent | 013438437f1f530609578454cf1123a84749f70d (diff) |
*misc
Diffstat (limited to 'src')
-rw-r--r-- | src/libjin-lua/embed/app.lua.h | 32 | ||||
-rw-r--r-- | src/libjin-lua/embed/clear.bat | 3 | ||||
-rw-r--r-- | src/libjin-lua/embed/scripts/app.lua | 2 | ||||
-rw-r--r-- | src/libjin/graphics/je_window.cpp | 22 |
4 files changed, 32 insertions, 27 deletions
diff --git a/src/libjin-lua/embed/app.lua.h b/src/libjin-lua/embed/app.lua.h index 9799c00..3e2a7bb 100644 --- a/src/libjin-lua/embed/app.lua.h +++ b/src/libjin-lua/embed/app.lua.h @@ -172,37 +172,37 @@ static char app_lua[] = { 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,13,10,13,10,106,105,110,46,97,117,100,105,111,46,105,110, -105,116,40,41,13,10,106,105,110,46,103,114,97,112,104,105,99,115,46,105, -110,105,116,40,106,105,110,46,99,111,110,102,105,103,41,13,10,13,10,45, +105,116,40,41,13,10,13,10,106,105,110,46,103,114,97,112,104,105,99,115, +46,105,110,105,116,40,106,105,110,46,99,111,110,102,105,103,41,13,10,13, +10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,45,45,32,66, +111,111,116,32,103,97,109,101,13,10,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,13,10,45,45,32,66,111,111, -116,32,103,97,109,101,13,10,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,13,10,13,10,120,112,99,97,108,108,40,98,111,111,116,44,32, +111,110,69,114,114,111,114,41,13,10,13,10,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,13,10,13,10,120,112,99,97,108,108,40,98,111,111,116,44,32,111,110, -69,114,114,111,114,41,13,10,13,10,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,13,10,45,45,32,68,101,115,116,114,111,121,32,115,117, +98,45,115,121,115,116,101,109,115,13,10,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,13,10,45,45,32,68,101,115,116,114,111,121,32,115,117,98,45, -115,121,115,116,101,109,115,13,10,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,13,10,13,10,106,105,110,46,103,114,97,112,104,105,99,115, +46,100,101,115,116,114,111,121,40,41,13,10,13,10,106,105,110,46,97,117, +100,105,111,46,100,101,115,116,114,111,121,40,41,13,10,13,10,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,13,10,13,10,106,105,110,46,103,114,97,112,104,105,99,115,46,100, -101,115,116,114,111,121,40,41,13,10,106,105,110,46,97,117,100,105,111,46, -100,101,115,116,114,111,121,40,41,13,10,13,10,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, +45,45,45,45,45,45,45,45,45,45,13,10,45,45,32,81,117,105,116,32, +103,97,109,101,13,10,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,13,10,45,45,32,81,117,105,116,32,103,97,109,101, -13,10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, -45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,106, -105,110,46,99,111,114,101,46,113,117,105,116,40,41,13,10 +45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13, +10,13,10,106,105,110,46,99,111,114,101,46,113,117,105,116,40,41,13,10 }; diff --git a/src/libjin-lua/embed/clear.bat b/src/libjin-lua/embed/clear.bat new file mode 100644 index 0000000..d0c57ed --- /dev/null +++ b/src/libjin-lua/embed/clear.bat @@ -0,0 +1,3 @@ +for %%f in (*.lua.h) do ( + del /f %%f +)
\ No newline at end of file diff --git a/src/libjin-lua/embed/scripts/app.lua b/src/libjin-lua/embed/scripts/app.lua index 9492b21..a55b598 100644 --- a/src/libjin-lua/embed/scripts/app.lua +++ b/src/libjin-lua/embed/scripts/app.lua @@ -113,6 +113,7 @@ end ------------------------------------------------------------------------- jin.audio.init() + jin.graphics.init(jin.config) ------------------------------------------------------------------------- @@ -126,6 +127,7 @@ xpcall(boot, onError) ------------------------------------------------------------------------- jin.graphics.destroy() + jin.audio.destroy() ------------------------------------------------------------------------- diff --git a/src/libjin/graphics/je_window.cpp b/src/libjin/graphics/je_window.cpp index 6cbea15..4e5ecb1 100644 --- a/src/libjin/graphics/je_window.cpp +++ b/src/libjin/graphics/je_window.cpp @@ -70,17 +70,17 @@ namespace JinEngine return false; // Set window icon. - try - { - Bitmap* bitmap = new Bitmap(icon); - SDL_Surface *surface; - Color* pixels = const_cast<Color*>(bitmap->getPixels()); - uint w = bitmap->getWidth(), h = bitmap->getHeight(); - surface = SDL_CreateRGBSurfaceFrom( - pixels, w, h, 32, w * 4, Color::RMASK, Color::GMASK, Color::BMASK, Color::AMASK); - SDL_SetWindowIcon(mWnd, surface); - SDL_FreeSurface(surface); - } catch (...) {} + //try + //{ + // Bitmap* bitmap = new Bitmap(icon); + // SDL_Surface *surface; + // Color* pixels = const_cast<Color*>(bitmap->getPixels()); + // uint w = bitmap->getWidth(), h = bitmap->getHeight(); + // surface = SDL_CreateRGBSurfaceFrom( + // pixels, w, h, 32, w * 4, Color::RMASK, Color::GMASK, Color::BMASK, Color::AMASK); + // SDL_SetWindowIcon(mWnd, surface); + // SDL_FreeSurface(surface); + //} catch (...) {} ctx = SDL_GL_CreateContext(mWnd); if (ctx == NULL) |