diff --git a/Makefile b/Makefile index be6d26c1..96ebb59c 100644 --- a/Makefile +++ b/Makefile @@ -270,6 +270,7 @@ endif ifeq ($(TARGET_RPI),1) $(info Compiling for Raspberry Pi) DISCORD_SDK := 0 + COOPNET := 0 machine = $(shell sh -c 'uname -m 2>/dev/null || echo unknown') # Raspberry Pi B+, Zero, etc @@ -1319,7 +1320,7 @@ ifeq ($(VERSION),eu) $(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/us/define_courses.inc.c $(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/de/define_courses.inc.c $(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/fr/define_courses.inc.c - + O_FILES += $(BUILD_DIR)/bin/eu/translation_en.o $(BUILD_DIR)/bin/eu/translation_de.o $(BUILD_DIR)/bin/eu/translation_fr.o else ifeq ($(VERSION),sh) diff --git a/src/pc/lua/smlua_utils.c b/src/pc/lua/smlua_utils.c index 86312241..c3e5dbd7 100644 --- a/src/pc/lua/smlua_utils.c +++ b/src/pc/lua/smlua_utils.c @@ -417,15 +417,14 @@ void smlua_push_object(lua_State* L, u16 lot, void* p) { lua_pushnil(L); return; } - u64 pointer = (uintptr_t) p; // add to allowlist - smlua_cobject_allowlist_add(lot, pointer); + smlua_cobject_allowlist_add(lot, (u64)(intptr_t) p); // get a cobject from a function lua_getglobal(L, "_NewCObject"); // Get the function by its global name lua_pushinteger(L, lot); - lua_pushinteger(L, pointer); + lua_pushinteger(L, (u64)(intptr_t) p); if (lua_pcall(L, 2, 1, 0) != LUA_OK) { LOG_ERROR("Error calling Lua function: %s\n", lua_tostring(L, -1)); @@ -438,13 +437,12 @@ void smlua_push_pointer(lua_State* L, u16 lvt, void* p) { return; } - u64 pointer = (uintptr_t) p; - smlua_cpointer_allowlist_add(lvt, pointer); + smlua_cpointer_allowlist_add(lvt, (u64)(intptr_t) p); // get a cpointer from a function lua_getglobal(L, "_NewCPointer"); // Get the function by its global name lua_pushinteger(L, lvt); - lua_pushinteger(L, pointer); + lua_pushinteger(L, (u64)(intptr_t) p); if (lua_pcall(L, 2, 1, 0) != LUA_OK) { LOG_ERROR("Error calling Lua function: %s\n", lua_tostring(L, -1)); }