diff --git a/cmake/Platform.cmake b/cmake/Platform.cmake index 6b58e50c..5413ccbd 100644 --- a/cmake/Platform.cmake +++ b/cmake/Platform.cmake @@ -79,6 +79,7 @@ elseif (GEODE_TARGET_PLATFORM STREQUAL "Win32") ${GEODE_LOADER_PATH}/include/link/glew32.lib ${GEODE_LOADER_PATH}/include/link/gdstring.lib ${GEODE_LOADER_PATH}/include/link/fmod.lib + opengl32 ) # Windows links against .lib and not .dll @@ -95,6 +96,7 @@ elseif (GEODE_TARGET_PLATFORM STREQUAL "Android32") ${GEODE_LOADER_PATH}/include/link/android32/libssl.a ${GEODE_LOADER_PATH}/include/link/android32/libcrypto.a ${GEODE_LOADER_PATH}/include/link/android32/libcocos2dcpp.so + GLESv2 log ) diff --git a/loader/include/Geode/cocos/CCDirector.h b/loader/include/Geode/cocos/CCDirector.h index 82a45ddb..ff2b0740 100644 --- a/loader/include/Geode/cocos/CCDirector.h +++ b/loader/include/Geode/cocos/CCDirector.h @@ -379,9 +379,10 @@ public: void updateScreenScale(CCSize); void applySmoothFix(); - void createStatsLabel(); void showFPSLabel(); void toggleShowFPS(bool, gd::string, cocos2d::CCPoint); + protected: + void createStatsLabel(); protected: CC_SYNTHESIZE_READONLY_NV(float, m_fScreenScaleFactor, ScreenScaleFactor); @@ -468,7 +469,7 @@ protected: /** calculates delta time since last time it was called */ void calculateDeltaTime(); -protected: +public: /* The CCEGLView, where everything is rendered */ CCEGLView *m_pobOpenGLView; @@ -479,6 +480,9 @@ protected: bool m_bLandscape; bool m_bDisplayStats; + + float m_unknown; + float m_fAccumDt; float m_fFrameRate; @@ -533,10 +537,15 @@ protected: RT_ADD( CC_SYNTHESIZE(CCSceneDelegate*, m_pAppDelegate, SceneDelegate); + void* m_unknownPtr; + CCNode* m_unknownLabel; CCSize m_obScaleFactor; CCSize m_obResolutionInPixels; CC_SYNTHESIZE_READONLY_NV(TextureQuality, m_eTextureQuality, LoadedTextureQuality); CC_SYNTHESIZE_NV(bool, m_bDontCallWillSwitch, DontCallWillSwitch); + // these were just garbage memory in reclass + void* m_unknownPtr2; + void* m_unknownPtr3; ) // CCEGLViewProtocol will recreate stats labels to fit visible rect diff --git a/loader/src/hooks/FixClippingRect.cpp b/loader/src/hooks/FixClippingRect.cpp new file mode 100644 index 00000000..3aeb1ebd --- /dev/null +++ b/loader/src/hooks/FixClippingRect.cpp @@ -0,0 +1,16 @@ +#include + +using namespace geode::prelude; + +struct MyGameToolbox : Modify { + static void preVisitWithClippingRect(CCNode* node, CCRect rect) { + if (node->isVisible()) { + glEnable(0xc11); + if (node->getParent()) { + // rob messed this up somehow causing nested ScrollLayers to be not clipped properly + rect.origin = node->getParent()->convertToWorldSpace(rect.origin); + } + CCEGLView::get()->setScissorInPoints(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height); + } + } +}; \ No newline at end of file diff --git a/loader/src/ui/nodes/MDTextArea.cpp b/loader/src/ui/nodes/MDTextArea.cpp index 52860b1f..0ec4e143 100644 --- a/loader/src/ui/nodes/MDTextArea.cpp +++ b/loader/src/ui/nodes/MDTextArea.cpp @@ -1,4 +1,4 @@ -// #include +#include #include #include #include @@ -181,8 +181,7 @@ void MDTextArea::onGDProfile(CCObject* pSender) { auto profile = std::string(href->getCString()); profile = profile.substr(profile.find(":") + 1); try { - // TODO: im really lazy rn - // ProfilePage::create(std::stoi(profile), false)->show(); + ProfilePage::create(std::stoi(profile), false)->show(); } catch (...) { FLAlertLayer::create( diff --git a/loader/test/members/Android32.cpp b/loader/test/members/Android32.cpp index 6312ec70..9fd26bfa 100644 --- a/loader/test/members/Android32.cpp +++ b/loader/test/members/Android32.cpp @@ -35,6 +35,7 @@ GEODE_SIZE_CHECK(CCScrollLayerExt, 0x184); GEODE_SIZE_CHECK(TableView, 0x1dc); GEODE_SIZE_CHECK(CCTextInputNode, 0x1a0); GEODE_SIZE_CHECK(CCTouchDispatcher, 0x6c); +GEODE_SIZE_CHECK(CCSpritePlus, 0x208); // GEODE_MEMBER_CHECK(CCTouchDispatcher, m_forcePrio, 0x60); @@ -46,6 +47,17 @@ GEODE_MEMBER_CHECK(TableView, m_cellArray, 0x1b0); GEODE_MEMBER_CHECK(TableViewCell, m_backgroundLayer, 0x190); +GEODE_SIZE_CHECK(GameObject, 0x488); +GEODE_SIZE_CHECK(EnhancedGameObject, 0x4f0); +GEODE_SIZE_CHECK(EffectGameObject, 0x668); +GEODE_SIZE_CHECK(TextGameObject, 0x490); +GEODE_SIZE_CHECK(SmartGameObject, 0x490); +GEODE_SIZE_CHECK(ParticleGameObject, 0x618); +GEODE_SIZE_CHECK(SpecialAnimGameObject, 0x4f0); +GEODE_SIZE_CHECK(RingObject, 0x668); +GEODE_SIZE_CHECK(StartPosObject, 0x668); +GEODE_SIZE_CHECK(LabelGameObject, 0x690); +// GEODE_SIZE_CHECK(EventLinkTrigger, 0x688); // GEODE_MEMBER_CHECK(CCNode, m_pUserObject, 0xcc); diff --git a/loader/test/members/Windows.cpp b/loader/test/members/Windows.cpp index de9e8477..5db4ffc9 100644 --- a/loader/test/members/Windows.cpp +++ b/loader/test/members/Windows.cpp @@ -15,6 +15,14 @@ GEODE_SIZE_CHECK(CCLayerColor, 0x1b8); // GEODE_SIZE_CHECK(CCLabelBMFont, 0x194); +GEODE_SIZE_CHECK(CCDirector, 0x130); +GEODE_MEMBER_CHECK(CCDirector, m_pobOpenGLView, 0x8c); +GEODE_MEMBER_CHECK(CCDirector, m_fFrameRate, 0xac); +GEODE_MEMBER_CHECK(CCDirector, m_pRunningScene, 0xcc); +GEODE_MEMBER_CHECK(CCDirector, m_pobScenesStack, 0xd8); +GEODE_MEMBER_CHECK(CCDirector, m_obWinSizeInPoints, 0xe8); + + GEODE_MEMBER_CHECK(CCTextInputNode, m_allowedChars, 0x174); GEODE_MEMBER_CHECK(CCTextInputNode, m_maxLabelWidth, 0x18c); GEODE_MEMBER_CHECK(CCTextInputNode, m_maxLabelScale, 0x190); @@ -27,6 +35,13 @@ GEODE_MEMBER_CHECK(BoomListView, m_tableView, 0x144); GEODE_MEMBER_CHECK(BoomListView, m_entries, 0x148); GEODE_MEMBER_CHECK(TableView, m_cellArray, 0x1b0); +GEODE_MEMBER_CHECK(CCScrollLayerExt, m_cutContent, 0x16c); + +GEODE_SIZE_CHECK(SliderThumb, 0x140); +GEODE_SIZE_CHECK(Slider, 0x158); +GEODE_MEMBER_CHECK(Slider, m_touchLogic, 0x13c); +GEODE_SIZE_CHECK(SliderTouchLogic, 0x178); +