diff --git a/CMakeLists.txt b/CMakeLists.txt index e512a68..00c3de1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,14 @@ set(CMAKE_OSX_ARCHITECTURES "x86_64") project(TextureLoader VERSION 1.0.0) +if(${GEODE_TARGET_PLATFORM} STREQUAL "iOS") + message(STATUS "building for ios :3") + unset(CMAKE_OSX_ARCHITECTURES) + set(CMAKE_OSX_ARCHITECTURES arm64) + set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0") + set(CMAKE_SYSTEM_NAME "iOS") +endif() + file(GLOB SOURCES src/*.cpp ) diff --git a/mod.json b/mod.json index b9a2ad4..6410548 100644 --- a/mod.json +++ b/mod.json @@ -1,9 +1,10 @@ { - "geode": "v2.0.0-beta.23", + "geode": "2.0.0-beta.25", "version": "v1.5.1", "gd": { "win": "2.204", "android": "*", + "ios": "2.205", "mac": "2.200" }, "id": "geode.texture-loader", diff --git a/src/DragThingy.cpp b/src/DragThingy.cpp index 6970a08..7947552 100644 --- a/src/DragThingy.cpp +++ b/src/DragThingy.cpp @@ -30,7 +30,11 @@ bool DragThingy::ccTouchBegan(CCTouch* touch, CCEvent*) { void DragThingy::ccTouchMoved(CCTouch* touch, CCEvent*) { if (m_onMove) +#ifndef GEODE_IS_IOS m_onMove(touch->getDelta()); +#else + m_onMove(ccpSub(touch->getLocation(), CCDirector::sharedDirector()->convertToGL(touch->m_prevPoint))); // TODO +#endif } void DragThingy::ccTouchEnded(CCTouch* touch, CCEvent*) { diff --git a/src/PackInfoPopup.cpp b/src/PackInfoPopup.cpp index 2dd0d0b..f264e00 100644 --- a/src/PackInfoPopup.cpp +++ b/src/PackInfoPopup.cpp @@ -29,7 +29,11 @@ class WackyBypassFont : public CCLabelBMFont { const char* text, ghc::filesystem::path const& fnt ) { +#ifdef GEODE_IS_IOS + auto label = CCLabelBMFont::create("", ""); +#else auto label = CCLabelBMFont::create(); +#endif static_cast(label)->setFntFile(fnt); // NOLINT(*-pro-type-static-cast-downcast) label->setString(text); return label;