Skip to content

Commit 6ff67eb

Browse files
committed
Fix GJGarageLayer::node
1 parent 40cc39f commit 6ff67eb

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

bindings/2.2081/GeometryDash.bro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9034,7 +9034,7 @@ class GJGarageLayer : cocos2d::CCLayer, TextInputDelegate, FLAlertLayerProtocol,
90349034

90359035
static gd::string achievementForUnlock(int id, UnlockType type) = win inline, imac 0x36f8b0, m1 0x2f96f0, ios inline;
90369036
static gd::string descriptionForUnlock(int id, UnlockType type) = win 0x278310, imac 0x36f730, m1 0x2f955c, ios 0x306acc;
9037-
static GJGarageLayer* node() = win inline, imac 0x369110, m1 0x2f33d8, ios 0x301ad4;
9037+
static GJGarageLayer* node() = imac 0x369110, m1 0x2f33d8, ios 0x301ad4, inline;
90389038
static cocos2d::CCScene* scene() = win 0x272e90, imac 0x3690d0, m1 0x2f3394, ios 0x301a90;
90399039
static gd::string titleForUnlock(int id, UnlockType type) = win inline, imac 0x36f5c0, m1 0x2f93d0, ios 0x3069e0;
90409040

bindings/2.2081/inline/GJGarageLayer.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ GJGarageLayer::GJGarageLayer() {
1515
}
1616
#endif
1717

18+
#if defined(GEODE_IS_WINDOWS) || defined(GEODE_IS_ANDROID)
19+
GJGarageLayer* GJGarageLayer::node() {
20+
auto ret = new GJGarageLayer();
21+
if (ret->init()) {
22+
ret->autorelease();
23+
return ret;
24+
}
25+
delete ret;
26+
return nullptr;
27+
}
28+
#endif
29+
1830
#if defined(GEODE_IS_WINDOWS) || defined(GEODE_IS_IOS)
1931
gd::string GJGarageLayer::achievementForUnlock(int id, UnlockType type) {
2032
auto achievementManager = AchievementManager::sharedState();
@@ -61,16 +73,6 @@ GJGarageLayer::~GJGarageLayer() {
6173
if (gm->m_rewardedVideoDelegate == this) gm->m_rewardedVideoDelegate = nullptr;
6274
}
6375

64-
GJGarageLayer* GJGarageLayer::node() {
65-
auto ret = new GJGarageLayer();
66-
if (ret->init()) {
67-
ret->autorelease();
68-
return ret;
69-
}
70-
delete ret;
71-
return nullptr;
72-
}
73-
7476
gd::string GJGarageLayer::titleForUnlock(int id, UnlockType type) {
7577
auto achievementManager = AchievementManager::sharedState();
7678
return achievementManager->getAchievementsWithID(achievementManager->achievementForUnlock(id, type).c_str())->valueForKey("title")->getCString();

0 commit comments

Comments
 (0)