mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-23 03:15:58 -04:00
Merge branch 'main' into new-index-but-better
This commit is contained in:
commit
b417e0686d
6 changed files with 42 additions and 9 deletions
|
@ -231,7 +231,7 @@ if (DEFINED GEODE_TULIPHOOK_REPO_PATH)
|
|||
message(STATUS "Using ${GEODE_TULIPHOOK_REPO_PATH} for TulipHook")
|
||||
add_subdirectory(${GEODE_TULIPHOOK_REPO_PATH} ${GEODE_TULIPHOOK_REPO_PATH}/build)
|
||||
else()
|
||||
CPMAddPackage("gh:geode-sdk/TulipHook#047031e")
|
||||
CPMAddPackage("gh:geode-sdk/TulipHook#7fa328b")
|
||||
endif()
|
||||
set(CMAKE_WARN_DEPRECATED ON CACHE BOOL "" FORCE)
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace gd {
|
|||
|
||||
allocator() throw(): std::allocator<T>() { }
|
||||
allocator(const allocator &a) throw(): std::allocator<T>(a) { }
|
||||
template <class U>
|
||||
template <class U>
|
||||
allocator(const allocator<U> &a) throw(): std::allocator<T>(a) { }
|
||||
~allocator() throw() { }
|
||||
};
|
||||
|
@ -194,6 +194,24 @@ namespace gd {
|
|||
return (*__i).second;
|
||||
}
|
||||
|
||||
V& at(K const& __k) {
|
||||
iterator __i = lower_bound(__k);
|
||||
if (__i == end() || compare(__k, (*__i).first)) {
|
||||
throw std::out_of_range("map::at");
|
||||
}
|
||||
|
||||
return (*__i).second;
|
||||
}
|
||||
|
||||
const V& at(K const& __k) const {
|
||||
iterator __i = lower_bound(__k);
|
||||
if (__i == end() || compare(__k, (*__i).first)) {
|
||||
throw std::out_of_range("map::at");
|
||||
}
|
||||
|
||||
return (*__i).second;
|
||||
}
|
||||
|
||||
iterator begin() noexcept {
|
||||
return iterator(m_header.m_left);
|
||||
}
|
||||
|
@ -211,7 +229,7 @@ namespace gd {
|
|||
}
|
||||
|
||||
iterator lower_bound(K const& __x) {
|
||||
_tree_node __j = static_cast<_tree_node>(m_header.m_left);
|
||||
_tree_node __j = static_cast<_tree_node>(m_header.m_parent);
|
||||
_tree_node __k = static_cast<_tree_node>(&m_header);
|
||||
while (__j != nullptr) {
|
||||
if (!compare(__j->m_value.first, __x)) {
|
||||
|
@ -226,7 +244,7 @@ namespace gd {
|
|||
}
|
||||
|
||||
iterator upper_bound(K const& __x) {
|
||||
_tree_node __j = static_cast<_tree_node>(m_header.m_left);
|
||||
_tree_node __j = static_cast<_tree_node>(m_header.m_parent);
|
||||
_tree_node __k = static_cast<_tree_node>(&m_header);
|
||||
while (__j != nullptr) {
|
||||
if (compare(__x, __j->m_value.first)) {
|
||||
|
@ -249,6 +267,10 @@ namespace gd {
|
|||
return find(__x) != end() ? 1 : 0;
|
||||
}
|
||||
|
||||
bool contains(K const& __x) {
|
||||
return count(__x) > 0;
|
||||
}
|
||||
|
||||
map(map const& lol) : map(std::map<K, V>(lol)) {}
|
||||
|
||||
map() : map(std::map<K, V>()) {}
|
||||
|
|
|
@ -300,6 +300,10 @@ public:
|
|||
virtual float getRotatePerSecondVar();
|
||||
virtual void setRotatePerSecondVar(float degrees);
|
||||
|
||||
RT_ADD (
|
||||
virtual void setVisible(bool visible);
|
||||
)
|
||||
|
||||
virtual void setScale(float s);
|
||||
virtual void setRotation(float newRotation);
|
||||
virtual void setScaleX(float newScaleX);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <Geode/Geode.hpp>
|
||||
#include <Geode/modify/CCMenuItem.hpp>
|
||||
#include <Geode/modify/CCMenu.hpp>
|
||||
|
||||
using namespace geode::prelude;
|
||||
|
||||
|
@ -9,4 +10,12 @@ class $modify(CCMenuItem) {
|
|||
CCMenuItem::activate();
|
||||
this->release();
|
||||
}
|
||||
};
|
||||
|
||||
class $modify(CCMenu) {
|
||||
void ccTouchEnded(CCTouch* touch, CCEvent* event) {
|
||||
this->retain();
|
||||
CCMenu::ccTouchEnded(touch, event);
|
||||
this->release();
|
||||
}
|
||||
};
|
|
@ -1,7 +1,5 @@
|
|||
#include <Geode/Geode.hpp>
|
||||
|
||||
#ifdef GEODE_IS_ANDROID
|
||||
|
||||
using namespace geode::prelude;
|
||||
|
||||
auto g_systemInitialized = false;
|
||||
|
@ -30,12 +28,14 @@ $execute {
|
|||
reinterpret_cast<void*>(geode::addresser::getNonVirtual(&FMOD::System::init)),
|
||||
&FMOD_System_init_hook,
|
||||
"FMOD::System::init"
|
||||
GEODE_WINDOWS(, tulip::hook::TulipConvention::Stdcall)
|
||||
);
|
||||
|
||||
(void)geode::Mod::get()->hook(
|
||||
reinterpret_cast<void*>(geode::addresser::getNonVirtual(&FMOD::ChannelControl::setVolume)),
|
||||
&FMOD_ChannelControl_setVolume_hook,
|
||||
"FMOD::ChannelControl::setVolume"
|
||||
GEODE_WINDOWS(, tulip::hook::TulipConvention::Stdcall)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -63,5 +63,3 @@ struct AndroidFMODFix : Modify<AndroidFMODFix, FMODAudioEngine> {
|
|||
}
|
||||
};
|
||||
*/
|
||||
|
||||
#endif
|
|
@ -43,7 +43,7 @@ int WINAPI gdMainHook(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
|
|||
fmt::format(
|
||||
"This version of Geode is made for Geometry Dash {} "
|
||||
"but you're trying to play with GD {}.\n"
|
||||
"Please, update your game or install an older version of Geode.",
|
||||
"Please, update your game.",
|
||||
GEODE_STR(GEODE_GD_VERSION),
|
||||
LoaderImpl::get()->getGameVersion()
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue