diff --git a/bin/assets/plugins/lspclient.json b/bin/assets/plugins/lspclient.json index b11a75da4..aac1f2121 100644 --- a/bin/assets/plugins/lspclient.json +++ b/bin/assets/plugins/lspclient.json @@ -147,7 +147,7 @@ "file_patterns": ["%.dart"] }, { - "language": "bash", + "language": "shellscript", "name": "bash-language-server", "url": "https://github.com/bash-lsp/bash-language-server", "command": "bash-language-server start", diff --git a/premake4.lua b/premake4.lua index 54490b2ef..38ef78c4f 100644 --- a/premake4.lua +++ b/premake4.lua @@ -235,13 +235,13 @@ function postsymlinklib(src_path, dst_path, lib) if os.is("windows") then postbuildcommands { "mklink \"" .. dst_path .. lib .. ".dll\"" .. " \"" .. src_path .. lib .. ".dll\" || ver>nul" } else - postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" } + postbuildcommands { "ln -sf \"" .. src_path .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" } end configuration { "debug", "windows" } if os.is("windows") then postbuildcommands { "mklink \"" .. dst_path .. lib .. "-debug.dll\"" .. " \"" .. src_path .. lib .. "-debug.dll\" || ver>nul" } else - postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "-debug." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" } + postbuildcommands { "ln -sf \"" .. src_path .. lib .. "-debug." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" } end configuration { "release", "not windows" } postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" } diff --git a/premake5.lua b/premake5.lua index a5eff7fc2..8f7434818 100644 --- a/premake5.lua +++ b/premake5.lua @@ -21,9 +21,9 @@ newoption { } function get_dll_extension() - if os.target("macosx") then + if os.target() == "macosx" then return "dylib" - elseif os.target("windows") then + elseif os.target() == "windows" then return "dll" else return "so" @@ -35,13 +35,13 @@ function postsymlinklib(src_path, dst_path, lib, arch) if os.ishost("windows") then postbuildcommands { "mklink \"" .. dst_path .. lib .. ".dll\"" .. " \"" .. src_path .. lib .. ".dll\" || ver>nul" } else - postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" } + postbuildcommands { "ln -sf \"" .. src_path .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" } end filter { "configurations:debug*", "system:windows", arch } if os.ishost("windows") then postbuildcommands { "mklink \"" .. dst_path .. lib .. "-debug.dll\"" .. " \"" .. src_path .. lib .. "-debug.dll\" || ver>nul" } else - postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "-debug." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" } + postbuildcommands { "ln -sf \"" .. src_path .. lib .. "-debug." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" } end filter { "configurations:release*", "not system:windows", arch } postbuildcommands { "ln -sf \"" .. src_path .. "lib" .. lib .. "." .. get_dll_extension() .. "\" \"" .. dst_path .. "\"" } @@ -924,7 +924,7 @@ workspace "eepp" defines { "EE_STATIC" } end build_base_cpp_configuration( "eepp-maps-static" ) - target_dir_lib("eepp-maps") + target_dir_lib("") filter "action:not vs*" buildoptions { "-Wall" } @@ -938,7 +938,7 @@ workspace "eepp" defines { "EE_MAPS_EXPORTS" } build_base_cpp_configuration( "eepp-maps" ) postsymlinklib_arch( "eepp-maps" ) - target_dir_lib("eepp-maps") + target_dir_lib("") filter "action:not vs*" buildoptions { "-Wall" } @@ -953,7 +953,7 @@ workspace "eepp" defines { "EE_STATIC" } end build_base_cpp_configuration( "eepp-physics-static" ) - target_dir_lib("eepp-physics") + target_dir_lib("") filter "action:not vs*" buildoptions { "-Wall" } @@ -967,7 +967,7 @@ workspace "eepp" defines { "EE_PHYSICS_EXPORTS" } build_base_cpp_configuration( "eepp-physics" ) postsymlinklib_arch( "eepp-physics" ) - target_dir_lib("eepp-physics") + target_dir_lib("") filter "action:not vs*" buildoptions { "-Wall" } @@ -981,7 +981,7 @@ workspace "eepp" defines { "EE_STATIC" } end build_base_cpp_configuration( "eterm" ) - target_dir_lib("eterm") + target_dir_lib("") filter "action:not vs*" buildoptions { "-Wall" } diff --git a/projects/android-project/app/src/main/res/mipmap-hdpi/ic_launcher.png b/projects/android-project/app/src/main/res/mipmap-hdpi/ic_launcher.png index e7c16aa12..884bbcfcf 100644 Binary files a/projects/android-project/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/projects/android-project/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/projects/android-project/app/src/main/res/mipmap-ldpi/ic_launcher.png b/projects/android-project/app/src/main/res/mipmap-ldpi/ic_launcher.png deleted file mode 100644 index 50128d33a..000000000 Binary files a/projects/android-project/app/src/main/res/mipmap-ldpi/ic_launcher.png and /dev/null differ diff --git a/projects/android-project/app/src/main/res/mipmap-mdpi/ic_launcher.png b/projects/android-project/app/src/main/res/mipmap-mdpi/ic_launcher.png index 449bce30a..bcb4a8239 100644 Binary files a/projects/android-project/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/projects/android-project/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/projects/android-project/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/projects/android-project/app/src/main/res/mipmap-xhdpi/ic_launcher.png index e9a354720..53203c9e4 100644 Binary files a/projects/android-project/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/projects/android-project/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/projects/android-project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/projects/android-project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index f23bbff51..1cb3c7a1b 100644 Binary files a/projects/android-project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/projects/android-project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/projects/android-project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/projects/android-project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..c26988c9a Binary files /dev/null and b/projects/android-project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/projects/mingw32/make.sh b/projects/mingw32/make.sh index fc2e57890..a809826cd 100755 --- a/projects/mingw32/make.sh +++ b/projects/mingw32/make.sh @@ -2,7 +2,6 @@ cd "$(dirname "$0")" || exit ARCH=32 -ARCHI=x86 for i in "$@"; do case $i in config=*) @@ -16,29 +15,9 @@ done if [[ "$CONFIG" == *"x86_64"* ]]; then ARCH=64 - ARCHI=x86_64 fi premake5 --file=../../premake5.lua --os=windows --cc=mingw --with-mojoal --windows-mingw-build gmake2 cd ../../make/windows/ || exit mingw"$ARCH"-make "$@" - -case "$OSTYPE" in - darwin*|linux*|freebsd*) - cd ../../bin/ || exit - ln -sf ../libs/windows/$ARCHI/eepp.dll eepp.dll - ln -sf ../libs/windows/$ARCHI/eepp-debug.dll eepp-debug.dll - ;; - cygwin*|win*) - cd ../../libs/windows/$ARCHI || exit - - if [ -f eepp.dll ]; then - cp -f eepp.dll ../../bin/eepp.dll - fi - - if [ -f eepp-debug.dll ]; then - cp -f eepp-debug.dll ../../bin/eepp-debug.dll - fi - ;; -esac diff --git a/src/eepp/graphics/renderer/renderergles2.cpp b/src/eepp/graphics/renderer/renderergles2.cpp index 56a7059c0..ec2cfd199 100644 --- a/src/eepp/graphics/renderer/renderergles2.cpp +++ b/src/eepp/graphics/renderer/renderergles2.cpp @@ -458,7 +458,7 @@ void RendererGLES2::texCoordPointer( int size, unsigned int type, int stride, co } int RendererGLES2::getStateIndex( const Uint32& State ) { - eeASSERT( State < EEGL_ARRAY_STATES_COUNT ); + eeASSERT( State < EEGL_ARRAY_STATES_COUNT || State == EEGL_TEXTURE_COORD_ARRAY ); if ( EEGL_TEXTURE_COORD_ARRAY == State ) return mTextureUnits[mCurActiveTex]; diff --git a/src/eepp/graphics/vertexbuffer.cpp b/src/eepp/graphics/vertexbuffer.cpp index 62dce8d19..05eb67f80 100644 --- a/src/eepp/graphics/vertexbuffer.cpp +++ b/src/eepp/graphics/vertexbuffer.cpp @@ -178,7 +178,8 @@ void VertexBuffer::addQuad( const Vector2f& pos, const Sizef& size, const Color& void VertexBuffer::setQuad( const Vector2u& gridPos, const Vector2f& pos, const Sizef& size, const Color& color ) { eeASSERT( mDrawType == PrimitiveType::PRIMITIVE_QUADS || - mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP ); + mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP || + mDrawType == PrimitiveType::PRIMITIVE_TRIANGLES ); eeASSERT( mGridSize != Sizei::Zero ); eeASSERT( static_cast( gridPos.x * GLi->quadVertexs() + gridPos.y * mGridSize.x * GLi->quadVertexs() + @@ -214,7 +215,8 @@ void VertexBuffer::setQuad( const Vector2u& gridPos, const Vector2f& pos, const void VertexBuffer::setQuadColor( const Vector2u& gridPos, const Color& color ) { eeASSERT( mDrawType == PrimitiveType::PRIMITIVE_QUADS || - mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP ); + mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP || + mDrawType == PrimitiveType::PRIMITIVE_TRIANGLES ); eeASSERT( mGridSize != Sizei::Zero ); eeASSERT( static_cast( gridPos.x * GLi->quadVertexs() + gridPos.y * mGridSize.x * GLi->quadVertexs() + @@ -241,7 +243,8 @@ void VertexBuffer::setQuadColor( const Vector2u& gridPos, const Color& color ) { void VertexBuffer::setQuadFree( const Vector2u& gridPos, const Vector2f& pos0, const Vector2f& pos1, const Vector2f& pos2, const Vector2f& pos3, const Color& color ) { eeASSERT( mDrawType == PrimitiveType::PRIMITIVE_QUADS || - mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP ); + mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP || + mDrawType == PrimitiveType::PRIMITIVE_TRIANGLES ); eeASSERT( mGridSize != Sizei::Zero ); eeASSERT( static_cast( gridPos.x * GLi->quadVertexs() + gridPos.y * mGridSize.x * GLi->quadVertexs() + @@ -278,7 +281,8 @@ void VertexBuffer::setQuadFree( const Vector2u& gridPos, const Vector2f& pos0, c void VertexBuffer::setQuadTexCoords( const Vector2u& gridPos, const Rectf& coords, const Uint32& textureLevel ) { eeASSERT( mDrawType == PrimitiveType::PRIMITIVE_QUADS || - mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP ); + mDrawType == PrimitiveType::PRIMITIVE_QUAD_STRIP || + mDrawType == PrimitiveType::PRIMITIVE_TRIANGLES ); eeASSERT( mGridSize != Sizei::Zero ); eeASSERT( static_cast( gridPos.x * GLi->quadVertexs() + gridPos.y * mGridSize.x * GLi->quadVertexs() + diff --git a/src/tools/ecode/ecode.cpp b/src/tools/ecode/ecode.cpp index cd640aed1..2a0de16b7 100644 --- a/src/tools/ecode/ecode.cpp +++ b/src/tools/ecode/ecode.cpp @@ -2715,7 +2715,7 @@ void App::loadFileSystemMatcher( const std::string& folderPath ) { static std::string GetCurrentProcessName() { #if defined( __APPLE__ ) || defined( __FreeBSD__ ) return getprogname(); -#elif defined( _GNU_SOURCE ) +#elif defined( _GNU_SOURCE ) && EE_PLATFORM != EE_PLATFORM_ANDROID && EE_PLATFORM != EE_PLATFORM_IOS return program_invocation_name; #elif defined( _WIN32 ) return __argv[0]; @@ -2730,7 +2730,7 @@ static std::string GetCurrentProcessName() { #endif static std::string getCurrentProcessPath() { -#if EE_PLATFORM != EE_PLATFORM_MACOSX +#if EE_PLATFORM != EE_PLATFORM_MACOSX && EE_PLATFORM != EE_PLATFORM_ANDROID auto path( Sys::getProcessPath() ); FileSystem::dirAddSlashAtEnd( path ); if ( String::startsWith( GetCurrentProcessName(), Sys::getProcessPath() ) ) { @@ -2741,6 +2741,8 @@ static std::string getCurrentProcessPath() { path += GetCurrentProcessName(); } return path; +#elif EE_PLATFORM == EE_PLATFORM_ANDROID + return Sys::getProcessPath(); #else char pathbuf[PROC_PIDPATHINFO_MAXSIZE]; pid_t pid = getpid(); @@ -2833,7 +2835,12 @@ FontTrueType* App::loadFont( const std::string& name, std::string fontPath, const std::string& fallback ) { if ( FileSystem::isRelativePath( fontPath ) ) fontPath = mResPath + fontPath; +#if EE_PLATFORM == EE_PLATFORM_ANDROID + if ( fontPath.empty() || + ( !FileSystem::fileExists( fontPath ) && !PackManager::instance()->exists( fontPath ) ) ) { +#else if ( fontPath.empty() || !FileSystem::fileExists( fontPath ) ) { +#endif fontPath = fallback; if ( !fontPath.empty() && FileSystem::isRelativePath( fontPath ) ) fontPath = mResPath + fontPath; @@ -2878,11 +2885,20 @@ void App::init( const LogLevel& logLevel, std::string file, const Float& pidelDe : 0 ); mDisplayDPI = currentDisplay->getDPI(); +#if EE_PLATFORM == EE_PLATFORM_ANDROID + mConfig.windowState.pixelDensity = + pidelDensity > 0 + ? pidelDensity + : ( mConfig.windowState.pixelDensity > 0 ? mConfig.windowState.pixelDensity + : currentDisplay->getPixelDensity() > 2 ? currentDisplay->getPixelDensity() / 2 + : currentDisplay->getPixelDensity() ); +#else mConfig.windowState.pixelDensity = pidelDensity > 0 ? pidelDensity : ( mConfig.windowState.pixelDensity > 0 ? mConfig.windowState.pixelDensity : currentDisplay->getPixelDensity() ); +#endif displayManager->enableScreenSaver(); displayManager->enableMouseFocusClickThrough(); diff --git a/src/tools/ecode/uiwelcomescreen.cpp b/src/tools/ecode/uiwelcomescreen.cpp index 3a67e6ef8..14f87b0f4 100644 --- a/src/tools/ecode/uiwelcomescreen.cpp +++ b/src/tools/ecode/uiwelcomescreen.cpp @@ -24,6 +24,7 @@ const char* LAYOUT = R"xml( background-image: icon(ecode,256dp); background-position: center center; background-tint: var(--font-hint); + background-size: 100% 100%; } #home_logo:hover { background-tint: var(--primary);