Skip to content

Commit 77ad7b9

Browse files
committed
feat: Change how some stuff is managed
1 parent 488cfc3 commit 77ad7b9

File tree

13 files changed

+151
-122
lines changed

13 files changed

+151
-122
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
os: ubuntu-latest
2727
target: Android64
2828

29-
- name: iOS
30-
os: macos-latest
31-
target: iOS
29+
# - name: iOS
30+
# os: macos-latest
31+
# target: iOS
3232

3333
name: ${{ matrix.config.name }}
3434
runs-on: ${{ matrix.config.os }}
@@ -37,11 +37,11 @@ jobs:
3737
- uses: actions/checkout@v4
3838

3939
- name: Build the mod
40-
uses: geode-catgirls/build-geode-mod@test
40+
uses: geode-catgirls/build-geode-mod@main
4141
with:
4242
cli: 'nightly'
43-
bindings: SpaghettDev/bindings
44-
bindings-ref: sapphire-sdk
43+
# bindings: SpaghettDev/bindings
44+
# bindings-ref: sapphire-sdk
4545
gh-pat: ${{ secrets.GH_PAT }}
4646
combine: true
4747
target: ${{ matrix.config.target }}
@@ -53,7 +53,7 @@ jobs:
5353
needs: ['build']
5454

5555
steps:
56-
- uses: geode-catgirls/build-geode-mod/combine@test
56+
- uses: geode-catgirls/build-geode-mod/combine@main
5757
id: build
5858

5959
- uses: actions/upload-artifact@v4

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [4.0.3] - 2025-04-01
9+
10+
### Added
11+
12+
- April fools!
13+
14+
### Changed
15+
16+
- How some internal stuff is managed
17+
18+
### Fixed
19+
20+
- :trolley:
21+
822
## [4.0.2] - 2025-02-01
923

1024
### Fixed

cmake/rtrp.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include(FetchContent)
33
FetchContent_Declare(
44
RTRP
55
GIT_REPOSITORY https://github.com/SpaghettDev/RTRP.git
6-
GIT_TAG ef10e5fe9b6988cba2a68aae1a1c520ce205ac2c
6+
GIT_TAG 065812c6e8e0cde4b714c3cafaf04b5adc34152e
77
GIT_PROGRESS TRUE
88
)
99
message("Fetching RTRP")

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"geode": "4.3.0",
2+
"geode": "4.3.1",
33
"gd": {
44
"win": "2.2074",
55
"android": "2.2074",

src/custom_layers/base/BaseCustomAlertLayer.cpp

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@ bool BaseCustomAlertLayer::createBasics(const BaseCustomAlertData& alertData)
3333
m_buttonMenu->setID("button-menu");
3434
m_mainLayer->addChild(m_buttonMenu, 10);
3535

36-
closeBtn = createButton("GJ_closeBtn_001.png", { -((alertSize.x) / 2.f) + 9.5f, (alertSize.y / 2.f) - 10.f }, alertData.onClose, -1, alertData.closeBtnScale);
36+
auto buttonSprite = CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
37+
buttonSprite->setScale(alertData.closeBtnScale);
38+
closeBtn = CCMenuItemSpriteExtra::create(
39+
buttonSprite,
40+
this,
41+
alertData.onClose
42+
);
43+
closeBtn->setPosition({ -((alertSize.x) / 2.f) + 9.5f, (alertSize.y / 2.f) - 10.f });
44+
closeBtn->setSizeMult(1.2f);
45+
m_buttonMenu->addChild(closeBtn);
3746

3847
return true;
3948
}
@@ -52,24 +61,6 @@ void BaseCustomAlertLayer::createTitle(std::string text, float separatorScale, f
5261
m_buttonMenu->addChild(separator);
5362
}
5463

55-
CCMenuItemSpriteExtra* BaseCustomAlertLayer::createButton(const char* texture, CCPoint position, SEL_MenuHandler callback, int tag, float textureScale, float sizeMult)
56-
{
57-
auto buttonSprite = CCSprite::createWithSpriteFrameName(texture);
58-
buttonSprite->setScale(textureScale);
59-
auto button = CCMenuItemSpriteExtra::create(
60-
buttonSprite,
61-
this,
62-
callback
63-
);
64-
button->setPosition(position);
65-
button->setSizeMult(sizeMult);
66-
if (tag != -1)
67-
button->setTag(tag);
68-
m_buttonMenu->addChild(button);
69-
70-
return button;
71-
}
72-
7364
// overriden because clicking space crashes the game
7465
void BaseCustomAlertLayer::keyDown(enumKeyCodes key)
7566
{
@@ -81,3 +72,8 @@ void BaseCustomAlertLayer::keyBackClicked()
8172
{
8273
onClose(nullptr);
8374
}
75+
76+
BaseCustomAlertLayer::~BaseCustomAlertLayer()
77+
{
78+
CCDirector::sharedDirector()->getTouchDispatcher()->unregisterForcePrio(this);
79+
}

src/custom_layers/base/BaseCustomAlertLayer.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ class BaseCustomAlertLayer : public FLAlertLayer
2424
public:
2525
bool createBasics(const BaseCustomAlertData&);
2626
void createTitle(std::string, float = .75f, float = 1.f);
27-
CCMenuItemSpriteExtra* createButton(const char*, cocos2d::CCPoint, cocos2d::SEL_MenuHandler, int = -1, float = 1.f, float = 1.2f);
2827

2928
virtual void onClose(cocos2d::CCObject*) = 0;
30-
void keyDown(cocos2d::enumKeyCodes);
31-
void keyBackClicked();
29+
virtual void keyDown(cocos2d::enumKeyCodes) override;
30+
virtual void keyBackClicked() override;
31+
32+
virtual ~BaseCustomAlertLayer() override;
3233

3334
cocos2d::CCPoint alertSize;
3435
CCMenuItemSpriteExtra* closeBtn;

src/layers/PlayLayer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ class $modify(RLPlayLayer, PlayLayer)
8888
rlm.gameState.levelPercentageGoal = percentage + 1;
8989
rlm.gameState.numLevels++;
9090

91+
if (rlm.gameState.levelPercentage == 100)
92+
rlm.hasFinishedARound = true;
93+
9194
// if the player has already reached this percentage, showNewBest will get called
9295
if (percentage <= this->m_level->m_normalPercent.value())
9396
showReachedGoal(percentage, 0, 0, 0);

0 commit comments

Comments
 (0)