From f50040e4752e1097fac793bb82569c63a6c09ee9 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 20 Aug 2018 19:16:47 +0800 Subject: *update --- bin/jin.exe | Bin 0 -> 556032 bytes build/vs2015/jin.vcxproj | 6 +++++- build/vs2015/jin.vcxproj.filters | 18 +++++++++++++++--- src/libjin/3rdparty/smount/smount.c | 12 ++++++++++-- src/libjin/Common/Data.h | 2 ++ src/libjin/Common/data.h | 2 ++ src/libjin/Common/utf8.cpp | 2 +- src/libjin/Graphics/JSL.cpp | 2 +- src/libjin/common/data.h | 2 ++ src/libjin/modules.h | 2 +- src/lua/modules/embed/boot.lua.h | 1 + 11 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 bin/jin.exe diff --git a/bin/jin.exe b/bin/jin.exe new file mode 100644 index 0000000..57c747a Binary files /dev/null and b/bin/jin.exe differ diff --git a/build/vs2015/jin.vcxproj b/build/vs2015/jin.vcxproj index d755b55..427288f 100644 --- a/build/vs2015/jin.vcxproj +++ b/build/vs2015/jin.vcxproj @@ -150,6 +150,8 @@ + + @@ -210,9 +212,11 @@ - + + + diff --git a/build/vs2015/jin.vcxproj.filters b/build/vs2015/jin.vcxproj.filters index dc460c2..25b8715 100644 --- a/build/vs2015/jin.vcxproj.filters +++ b/build/vs2015/jin.vcxproj.filters @@ -315,6 +315,12 @@ src\lua\modules + + src\libjin\Common + + + src\libjin\Common + @@ -332,9 +338,6 @@ src\libjin\Audio - - src\libjin\Common - src\libjin\Core @@ -542,6 +545,15 @@ src\lua\modules + + src\libjin\Common + + + src\libjin\Common + + + src\libjin\Common + diff --git a/src/libjin/3rdparty/smount/smount.c b/src/libjin/3rdparty/smount/smount.c index 3006fa3..2b4e9b9 100644 --- a/src/libjin/3rdparty/smount/smount.c +++ b/src/libjin/3rdparty/smount/smount.c @@ -147,10 +147,18 @@ void *smtread(smtShared* S, const char *path, unsigned int *size) size = (unsigned int*)malloc(sizeof(unsigned int)); } char *r = concat(S->mount->path, "/", path, NULL); - if (!r) return NULL; + if (!r) + { + free(size); + return NULL; + } FILE *fp = fopen(r, "rb"); free(r); - if (!fp) return 0; + if (!fp) + { + free(size); + return 0; + } /* Get file size */ fseek(fp, 0, SEEK_END); *size = ftell(fp); diff --git a/src/libjin/Common/Data.h b/src/libjin/Common/Data.h index 7fcc389..4b0f1ba 100644 --- a/src/libjin/Common/Data.h +++ b/src/libjin/Common/Data.h @@ -1,6 +1,8 @@ #ifndef __JIN_COMMON_DATA_H #define __JIN_COMMON_DATA_H + + namespace jin { diff --git a/src/libjin/Common/data.h b/src/libjin/Common/data.h index 7fcc389..4b0f1ba 100644 --- a/src/libjin/Common/data.h +++ b/src/libjin/Common/data.h @@ -1,6 +1,8 @@ #ifndef __JIN_COMMON_DATA_H #define __JIN_COMMON_DATA_H + + namespace jin { diff --git a/src/libjin/Common/utf8.cpp b/src/libjin/Common/utf8.cpp index f21a0d9..bef6c85 100644 --- a/src/libjin/Common/utf8.cpp +++ b/src/libjin/Common/utf8.cpp @@ -37,6 +37,6 @@ namespace jin } } -} // jins +} // jin #endif // JIN_OS == JIN_WINDOWS \ No newline at end of file diff --git a/src/libjin/Graphics/JSL.cpp b/src/libjin/Graphics/JSL.cpp index b877e60..2ab7ceb 100644 --- a/src/libjin/Graphics/JSL.cpp +++ b/src/libjin/Graphics/JSL.cpp @@ -22,7 +22,7 @@ namespace graphics " gl_FragColor = effect(gl_Color, _tex0_, gl_TexCoord[0].xy, gl_FragCoord.xy);\n" "}\0"; - shared JSLProgram* JSLProgram::currentJSLProgram = nullptr; + /*static*/ JSLProgram* JSLProgram::currentJSLProgram = nullptr; JSLProgram* JSLProgram::createJSLProgram(const char* program) { diff --git a/src/libjin/common/data.h b/src/libjin/common/data.h index 7fcc389..4b0f1ba 100644 --- a/src/libjin/common/data.h +++ b/src/libjin/common/data.h @@ -1,6 +1,8 @@ #ifndef __JIN_COMMON_DATA_H #define __JIN_COMMON_DATA_H + + namespace jin { diff --git a/src/libjin/modules.h b/src/libjin/modules.h index bbfb085..5992f0c 100644 --- a/src/libjin/modules.h +++ b/src/libjin/modules.h @@ -49,7 +49,7 @@ * Open libjin debug */ -#define JIN_DEBUG 1 +#define JIN_DEBUG 0 /* * Operating system diff --git a/src/lua/modules/embed/boot.lua.h b/src/lua/modules/embed/boot.lua.h index 42f38d8..a269df8 100644 --- a/src/lua/modules/embed/boot.lua.h +++ b/src/lua/modules/embed/boot.lua.h @@ -49,6 +49,7 @@ function jin.core.run() local SEC_PER_UPDATE = 1 / conf.fps local dt = SEC_PER_UPDATE local running = true + -- TODO: 重写,事件处理事件应该高频率调用 while(jin.core.running()) do for _, e in pairs(jin.event.poll()) do if e.type == "keydown" then -- cgit v1.1-26-g67d0