mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-26 21:00:50 -04:00
Merge branch 'main' of github.com:geode-sdk/geode
This commit is contained in:
commit
67149eada9
5 changed files with 23 additions and 21 deletions
loader
src
test/members
|
@ -13,7 +13,7 @@ $execute {
|
|||
reinterpret_cast<void*>(base::get() + 0x603948), toByteArray(&cast::typeinfoCastInternal)
|
||||
);
|
||||
#elif defined(GEODE_IS_ANDROID)
|
||||
(void)Mod::get()->addHook(reinterpret_cast<void*>(base::get() + 0x519a8c), &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||
(void)Mod::get()->addHook(reinterpret_cast<void*>(base::get() + (0x720348 - 0x10000) + 1), &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -63,16 +63,17 @@ gd::string decompressString2(unsigned char* data, bool decrypt, int size, int de
|
|||
|
||||
// Modify doesnt want to work for some reason!
|
||||
$execute {
|
||||
(void) Mod::get()->addHook(
|
||||
reinterpret_cast<void*>(
|
||||
geode::addresser::getNonVirtual(
|
||||
&cocos2d::ZipUtils::decompressString2
|
||||
)
|
||||
),
|
||||
&decompressString2,
|
||||
"cocos2d::ZipUtils::decompressString2",
|
||||
tulip::hook::TulipConvention::Cdecl
|
||||
);
|
||||
// TODO: 2.2 maybe reenable?
|
||||
// (void) Mod::get()->addHook(
|
||||
// reinterpret_cast<void*>(
|
||||
// geode::addresser::getNonVirtual(
|
||||
// &cocos2d::ZipUtils::decompressString2
|
||||
// )
|
||||
// ),
|
||||
// &decompressString2,
|
||||
// "cocos2d::ZipUtils::decompressString2",
|
||||
// tulip::hook::TulipConvention::Cdecl
|
||||
// );
|
||||
}
|
||||
|
||||
#endif
|
|
@ -60,9 +60,9 @@ Result<> Loader::Impl::setup() {
|
|||
|
||||
log::debug("Setting up crash handler");
|
||||
log::pushNest();
|
||||
if (!crashlog::setupPlatformHandler()) {
|
||||
log::debug("Failed to set up crash handler");
|
||||
}
|
||||
// if (!crashlog::setupPlatformHandler()) {
|
||||
// log::debug("Failed to set up crash handler");
|
||||
// }
|
||||
log::popNest();
|
||||
|
||||
log::debug("Loading hooks");
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
|
||||
namespace geode::base {
|
||||
uintptr_t get() {
|
||||
static uintptr_t base = (reinterpret_cast<uintptr_t>(&MenuLayer::scene) - 0x2f9068) & (~0x1);
|
||||
static uintptr_t base = (reinterpret_cast<uintptr_t>(&MenuLayer::scene) - (0x309068 - 0x10000)) & (~0x1);
|
||||
log::debug("base: {}", (void*)base);
|
||||
// static uintptr_t base = reinterpret_cast<uintptr_t>(dlopen("libcocos2dcpp.so", RTLD_NOW));
|
||||
return base;
|
||||
}
|
||||
|
@ -17,7 +18,7 @@ namespace gd {
|
|||
namespace {
|
||||
static inline auto emptyInternalString() {
|
||||
return reinterpret_cast<_internal_string*>(
|
||||
geode::base::get() + 0x75fb24 + sizeof(_internal_string)
|
||||
geode::base::get() + (0xaa1c3c - 0x10000) + sizeof(_internal_string)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -27,12 +28,12 @@ namespace gd {
|
|||
}
|
||||
|
||||
string::string(char const* ok) : m_data(nullptr) {
|
||||
reinterpret_cast<void (*)(string*, char const*)>(geode::base::get() + 0x506c08)(this, ok);
|
||||
reinterpret_cast<void (*)(string*, char const*)>(geode::base::get() + (0x753a44 - 0x10000) + 1)(this, ok);
|
||||
}
|
||||
|
||||
string::string(string const& ok) : m_data(nullptr) {
|
||||
if (*(string**)(&ok) == nullptr) return;
|
||||
reinterpret_cast<void (*)(string*, string const&)>(geode::base::get() + 0x506634)(this, ok);
|
||||
reinterpret_cast<void (*)(string*, string const&)>(geode::base::get() + (0x7530e0 - 0x10000) + 1)(this, ok);
|
||||
}
|
||||
|
||||
string& string::operator=(char const* ok) {
|
||||
|
@ -50,7 +51,7 @@ namespace gd {
|
|||
string::~string() {
|
||||
if (m_data == nullptr) return;
|
||||
|
||||
reinterpret_cast<void (*)(string*)>(geode::base::get() + 0x5054bc)(this);
|
||||
reinterpret_cast<void (*)(string*)>(geode::base::get() + (0x7514c8 - 0x10000) + 1)(this);
|
||||
}
|
||||
|
||||
bool string::operator<(string const& other) const {
|
||||
|
|
|
@ -28,8 +28,8 @@ GEODE_SIZE_CHECK(CustomListView, 0x168);
|
|||
GEODE_SIZE_CHECK(CCMenuItemSpriteExtra, 0x174);
|
||||
GEODE_SIZE_CHECK(LoadingLayer, 0x15c);
|
||||
GEODE_SIZE_CHECK(GJDropDownLayer, 0x1e4);
|
||||
// GEODE_SIZE_CHECK(TableViewCell, 0x19c);
|
||||
// GEODE_SIZE_CHECK(Slider, 0x158);
|
||||
GEODE_SIZE_CHECK(TableViewCell, 0x19c);
|
||||
GEODE_SIZE_CHECK(Slider, 0x158);
|
||||
GEODE_SIZE_CHECK(SliderTouchLogic, 0x174);
|
||||
GEODE_SIZE_CHECK(CCScrollLayerExt, 0x184);
|
||||
GEODE_SIZE_CHECK(TableView, 0x1dc);
|
||||
|
|
Loading…
Add table
Reference in a new issue