From 343a19b58fe8ccfc2d5aafc3021f9548883d4426 Mon Sep 17 00:00:00 2001 From: PrimedErwin <1973609350@qq.com> Date: Mon, 23 Dec 2024 13:32:32 +0800 Subject: [PATCH 1/4] updated pkpy to v2.0.4 --- .gitmodules | 1 + vendor/pocketpy | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index e684d1829..0c67231e1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -89,3 +89,4 @@ [submodule "vendor/pocketpy"] path = vendor/pocketpy url = https://github.com/PrimedErwin/pocketpy.git + shallow = true diff --git a/vendor/pocketpy b/vendor/pocketpy index ab4ff49ed..416ee069f 160000 --- a/vendor/pocketpy +++ b/vendor/pocketpy @@ -1 +1 @@ -Subproject commit ab4ff49eda82aff7a9116d2dfe3bfafbe4fb4bc8 +Subproject commit 416ee069fdd275b141e3b292fcfe913c8abfa194 From 85cc39cedb631c795f1eba43177384ee0e2f4389 Mon Sep 17 00:00:00 2001 From: PrimedErwin <1973609350@qq.com> Date: Tue, 24 Dec 2024 19:43:05 +0800 Subject: [PATCH 2/4] lz4 fix --- cmake/pocketpy.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/pocketpy.cmake b/cmake/pocketpy.cmake index 077374897..36b76d2f3 100644 --- a/cmake/pocketpy.cmake +++ b/cmake/pocketpy.cmake @@ -9,6 +9,7 @@ if(BUILD_WITH_PYTHON) if(NOT WIN32) option(PK_BUILD_WITH_IPO "" OFF) + option(PK_BUILD_MODULE_LZ4 "" OFF) endif() add_subdirectory(${THIRDPARTY_DIR}/pocketpy) From 5b6edff051d79660360bb8f7f6d58ede4973f75a Mon Sep 17 00:00:00 2001 From: PrimedErwin <1973609350@qq.com> Date: Tue, 24 Dec 2024 22:51:55 +0800 Subject: [PATCH 3/4] fixed some return val --- src/api/python.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/python.c b/src/api/python.c index 0e41645cd..b80d6b673 100644 --- a/src/api/python.c +++ b/src/api/python.c @@ -136,6 +136,7 @@ static bool py_cls(int argc, py_Ref argv) color = py_toint(py_arg(0)); core->api.cls(tic, color); + py_assign(py_retval(), py_None()); return true; } @@ -172,6 +173,7 @@ static bool py_spr(int argc, py_Ref argv) return TypeError("The given argument is not int or list"); core->api.spr(tic, spr_id, x, y, w, h, colors, color_count, scale, flip, rotate); + py_assign(py_retval(), py_None()); return true; } From 88f1b5414211466972c945c624060931f51a6c43 Mon Sep 17 00:00:00 2001 From: PrimedErwin <1973609350@qq.com> Date: Wed, 25 Dec 2024 18:00:14 +0800 Subject: [PATCH 4/4] fix cmake issue --- cmake/pocketpy.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/pocketpy.cmake b/cmake/pocketpy.cmake index 36b76d2f3..73b5a431f 100644 --- a/cmake/pocketpy.cmake +++ b/cmake/pocketpy.cmake @@ -6,10 +6,10 @@ option(BUILD_WITH_PYTHON "Python Enabled" ${BUILD_WITH_ALL}) message("BUILD_WITH_PYTHON: ${BUILD_WITH_PYTHON}") if(BUILD_WITH_PYTHON) option(PK_ENABLE_OS "" OFF) + option(PK_BUILD_MODULE_LZ4 "" OFF) if(NOT WIN32) option(PK_BUILD_WITH_IPO "" OFF) - option(PK_BUILD_MODULE_LZ4 "" OFF) endif() add_subdirectory(${THIRDPARTY_DIR}/pocketpy)