diff --git a/app/src/main/cpp/deps/raymob/features.c b/app/src/main/cpp/deps/raymob/features.c index 57d38f3..42f7022 100644 --- a/app/src/main/cpp/deps/raymob/features.c +++ b/app/src/main/cpp/deps/raymob/features.c @@ -24,7 +24,6 @@ #include "raymob.h" #include // Used for 'SoftKeyboardEditText()' -#include // Used for 'malloc' in 'getL10NString()' /* VIBRATION */ diff --git a/app/src/main/cpp/deps/raymob/helper.c b/app/src/main/cpp/deps/raymob/helper.c index 511d021..2a3a7ee 100644 --- a/app/src/main/cpp/deps/raymob/helper.c +++ b/app/src/main/cpp/deps/raymob/helper.c @@ -130,12 +130,8 @@ char* GetCacheDir(void) return cachePath; } -/** - * Read file from cache directory, the readFile from Raylib is reserved to read in Assets folder - * @param fileName to read - * @return file content - */ -char* LoadCacheFile(const char* fileName) { +char* LoadCacheFile(const char* fileName) +{ char *text = NULL; char *cacheDir = GetCacheDir(); size_t len1 = strlen(cacheDir); @@ -185,11 +181,6 @@ char* LoadCacheFile(const char* fileName) { return text; } -/** - * Get localized string resource by name : L10N - * @param value string resource name - * @return localized string - */ char* GetL10NString(const char* value) { jobject nativeInstance = GetNativeLoaderInstance(); @@ -261,4 +252,4 @@ char* GetL10NString(const char* value) } return NULL; -} \ No newline at end of file +} diff --git a/app/src/main/cpp/deps/raymob/raymob.h b/app/src/main/cpp/deps/raymob/raymob.h index 432fbfd..a406d2e 100644 --- a/app/src/main/cpp/deps/raymob/raymob.h +++ b/app/src/main/cpp/deps/raymob/raymob.h @@ -87,6 +87,27 @@ RMBAPI jobject GetFeaturesInstance(void); */ RMBAPI char* GetCacheDir(void); +/** + * @brief Read file from cache directory, the readFile from raylib is reserved to read in Assets folder. + * + * @param fileName to read + * @return file content + */ +char* LoadCacheFile(const char* fileName); + +/** + * @brief Get localized string resource by name L10N. + * + * @see L10N: https://en.wikipedia.org/wiki/Internationalization_and_localization + * + * @warning This function returns a string allocated on the heap. + * The responsibility for releasing the memory lies with the user. + * + * @param value string resource name + * @return localized string + */ +char* GetL10NString(const char* value); + /* Feature functions */ /** diff --git a/app/src/main/java/com/raylib/raymob/Features.java b/app/src/main/java/com/raylib/raymob/Features.java index fd1be39..aff7096 100644 --- a/app/src/main/java/com/raylib/raymob/Features.java +++ b/app/src/main/java/com/raylib/raymob/Features.java @@ -24,14 +24,11 @@ package com.raylib.raymob; -import android.annotation.SuppressLint; import android.content.Context; -import android.content.ContextWrapper; - import com.raylib.features.*; import java.util.Optional; -public class Features extends ContextWrapper { +public class Features { /* FEATURES INSTANCES */