Merge branch 'main' into refactor-log

This commit is contained in:
matcool 2023-12-28 15:18:56 -03:00
commit 237109ce39
6 changed files with 58 additions and 5 deletions

View file

@ -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
)

View file

@ -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

View file

@ -0,0 +1,16 @@
#include <Geode/modify/GameToolbox.hpp>
using namespace geode::prelude;
struct MyGameToolbox : Modify<MyGameToolbox, GameToolbox> {
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);
}
}
};

View file

@ -1,4 +1,4 @@
// #include <Geode/binding/ProfilePage.hpp>
#include <Geode/binding/ProfilePage.hpp>
#include <Geode/binding/CCContentLayer.hpp>
#include <Geode/loader/Mod.hpp>
#include <Geode/ui/MDTextArea.hpp>
@ -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(

View file

@ -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);

View file

@ -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);