diff --git a/README.md b/README.md index 4e0c391..d258289 100644 --- a/README.md +++ b/README.md @@ -334,7 +334,7 @@ mkdir bin-web cd bin-web emsdk activate latest emcmake cmake .. -make +make -j3 python -m http.server ``` 7. Visit this url **localhost:8000** in your **Web Browser**. diff --git a/app/src/main/cpp/SDL_android_main.c b/app/src/main/cpp/SDL_android_main.c index 00193e8..d17e1b8 100644 --- a/app/src/main/cpp/SDL_android_main.c +++ b/app/src/main/cpp/SDL_android_main.c @@ -1,3 +1,4 @@ +#if !defined(IS_ENGINE_VS_CODE) /* SDL_android_main.c, placed in the public domain by Sam Lantinga 3/13/14 */ @@ -81,3 +82,4 @@ JNIEXPORT int JNICALL Java_com_author_isengine_SDLActivity_nativeInit(JNIEnv* en #endif /* __ANDROID__ */ /* vi: set ts=4 sw=4 expandtab: */ +#endif /* IS_ENGINE_VS_CODE */ \ No newline at end of file diff --git a/app/src/main/cpp/isEngine/system/function/GameFunction.cpp b/app/src/main/cpp/isEngine/system/function/GameFunction.cpp index 02ccc49..e7e944d 100644 --- a/app/src/main/cpp/isEngine/system/function/GameFunction.cpp +++ b/app/src/main/cpp/isEngine/system/function/GameFunction.cpp @@ -123,6 +123,7 @@ float degToRad(float x) float lengthDirX(float dir, float angle, bool useScreenScale) { +#if defined(IS_ENGINE_SDL_2) if (useScreenScale) { if (static_cast(is::IS_ENGINE_SDL_screenXScale) != 1) @@ -132,11 +133,13 @@ float lengthDirX(float dir, float angle, bool useScreenScale) } return (dir * std::cos(degToRad(angle))) / is::IS_ENGINE_SDL_screenXScale; } +#endif return dir * std::cos(degToRad(angle)); } float lengthDirY(float dir, float angle, bool useScreenScale) { +#if defined(IS_ENGINE_SDL_2) if (useScreenScale) { if (static_cast(is::IS_ENGINE_SDL_screenXScale) != 1) @@ -146,6 +149,7 @@ float lengthDirY(float dir, float angle, bool useScreenScale) return (dir * std::sin(degToRad(angle))) / is::IS_ENGINE_SDL_screenYScale; } } +#endif return dir * std::sin(degToRad(angle)); } diff --git a/app/src/main/cpp/main.cpp b/app/src/main/cpp/main.cpp index a10beb0..da9673e 100644 --- a/app/src/main/cpp/main.cpp +++ b/app/src/main/cpp/main.cpp @@ -22,17 +22,6 @@ #if defined(IS_ENGINE_VS_CODE) #include "Main.hpp" #endif -#if defined(IS_ENGINE_HTML_5) -#include -#include - -inline std::vector *vectorFromIntPointer(uintptr_t vec) { - return reinterpret_cast *>(vec); -} -EMSCRIPTEN_BINDINGS(Wrappers) { - emscripten::register_vector("VectorString").constructor(&vectorFromIntPointer, emscripten::allow_raw_pointers()); -}; -#endif #include "isEngine/core/GameEngine.h" ////////////////////////////////////////////////////////////