Skip to content

Commit ca5c075

Browse files
committed
sapphire sdk update
1 parent bf1a80c commit ca5c075

File tree

11 files changed

+38
-18
lines changed

11 files changed

+38
-18
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ jobs:
2727
os: ubuntu-latest
2828
target: Android64
2929

30+
- name: iOS
31+
os: macos-latest
32+
target: iOS
33+
3034
name: ${{ matrix.config.name }}
3135
runs-on: ${{ matrix.config.os }}
3236

@@ -41,6 +45,8 @@ jobs:
4145
build-config: 'RelWithDebInfo'
4246
export-pdb: true
4347
combine: true
48+
cli: nightly # remove after iso
49+
sdk: nightly # remove after iso
4450
#sdk: 'nightly'
4551
target: ${{ matrix.config.target }}
4652

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
44
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
55
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
66
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) # thanks dank_meme01
7+
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
8+
set(CMAKE_OSX_ARCHITECTURES "arm64")
9+
set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0")
10+
add_definitions(-DGLES_SILENCE_DEPRECATION)
11+
else()
12+
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
13+
endif()
714
include(cmake/CPM.cmake) # why do I need this, this didnt happen before
815

916
project(PrismMenu VERSION 1.0.0)

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v1.10.3
2+
- Added Jump Hack on Mac OS
3+
- Allowed speedhack audio on Mac OS
4+
- Added Sapphire SDK support
15
# v1.10.2
26
- Fixed uncomplete level from removing secret coins
37
# v1.10.1

mod.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
2-
"geode": "4.2.0",
3-
"version": "v1.10.2",
2+
"geode": "4.3.1",
3+
"version": "v1.10.3",
44
"gd": {
55
"win": "2.2074",
66
"mac": "2.2074",
7-
"android": "2.2074"
7+
"android": "2.2074",
8+
"ios": "2.2074"
89
},
910
"id": "firee.prism",
1011
"name": "Prism Menu",

resources/hacks/global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"desc": "Whether or not to also change the audio speed based on the speedhack value.",
107107
"type": "bool",
108108
"default": true,
109-
"platforms": ["win","android32","android64"]
109+
"platforms": ["win","android32","android64","mac"]
110110
},
111111
{
112112
"name": "Reset Speedhack",

resources/hacks/player.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
{
5252
"name": "Jump Hack",
5353
"desc": "Allows for jumping in mid-air.",
54-
"type": "bool",
55-
"platforms": ["win", "android64", "android32"]
54+
"type": "bool"
5655
},
5756
{
5857
"name": "Instant Complete",

src/Hacks/Player.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ class $modify(POPlayerHacks, PlayerObject) {
2929
m_gravityMod = gravityHack->value.floatValue;
3030
}
3131
if (Hacks::isHackEnabled("Instant Complete")) return;
32-
/*log::info(fmt::format(
33-
"HardStreak\n---\nx = {}, y = {}, m_waveSize = {}\nm_pulseSize = {}",
34-
m_waveTrail->m_currentPoint.x,
35-
m_waveTrail->m_currentPoint.y,
36-
m_waveTrail->m_waveSize,
37-
m_waveTrail->m_pulseSize
38-
));*/
3932
//if (Hacks::isHackEnabled("No Rotate")) PlayerObject::setRotation(0);
4033
if (!Hacks::isHackEnabled("Freeze Player")) return PlayerObject::update(dt);
4134
}
@@ -44,7 +37,7 @@ class $modify(POPlayerHacks, PlayerObject) {
4437
if (!Hacks::isHackEnabled("No Death Effect")) return PlayerObject::playerDestroyed(p0);
4538
m_isDead = true;
4639
}
47-
#ifndef GEODE_IS_MACOS
40+
#ifndef GEODE_IS_IOS
4841
bool pushButton(PlayerButton p0) {
4942
if (p0 != PlayerButton::Jump) return PlayerObject::pushButton(p0);
5043
float boost = 10.0F;

src/PrismButton.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,19 @@ using namespace geode::prelude;
88
// definitely not copied from eclipse!
99
class PrismButton : public CCMenu {
1010
protected:
11+
#ifndef GEODE_IS_IOS
1112
// how many units required to begin dragging the button
1213
constexpr static float MIN_MOVE_DISTANCE = 30.f;
1314
// move progress per second
1415
constexpr static float MOVE_SPEED = 9.2f;
1516
// how many units until the button snaps to touch pos
1617
constexpr static float SNAP_MARGIN = 0.1f;
18+
#else
19+
// i do not know why but the numbers are vastly different on ios
20+
constexpr static float MIN_MOVE_DISTANCE = 2.5f;
21+
constexpr static float MOVE_SPEED = 9.2f;
22+
constexpr static float SNAP_MARGIN = 40.f;
23+
#endif
1724
cocos2d::CCPoint m_holdPosition{};
1825
bool m_shouldMove = false; // whether currently in move animation
1926
bool m_haveMoved = false; // used to determine whether we should trigger callback after release

src/UI/PrismUI.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,10 +571,10 @@ void PrismUIButton::onBtn(CCObject* ret) {
571571
//creditsMenu1->onClose(nullptr);
572572
//CreditsMenu::create()->show();
573573
} else if (name == "Show Graphic Options") {
574-
#ifdef GEODE_IS_ANDROID
574+
#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS)
575575
VideoOptionsLayer::create()->show();
576576
#else
577-
FLAlertLayer::create("Error", "This option can only be used on <cy>Android</c>!", "OK")->show();
577+
FLAlertLayer::create("Error", "This option can only be used on <cy>Android</c> and <cy>iOS</c>!", "OK")->show();
578578
#endif
579579
} else if (name == "Uncomplete Level") {
580580
if (auto levelInfoLayer = scene->getChildByType<LevelInfoLayer>(0)) {
@@ -972,6 +972,8 @@ void PrismUI::RegenCategory() {
972972
versionLabel->setString(fmt::format("{} - Android", version).c_str());
973973
#elif defined(GEODE_IS_MACOS)
974974
versionLabel->setString(fmt::format("{} - Mac OS", version).c_str());
975+
#elif defined(GEODE_IS_MACOS)
976+
versionLabel->setString(fmt::format("{} - iOS", version).c_str());
975977
#else // TODO: when camila releases iCreate on geode, add iOS
976978
versionLabel->setString(fmt::format("{} - HOW by Spu7nix", version).c_str());
977979
#endif

src/hacks.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ class Hacks {
468468
}
469469
}
470470
static void setPitch(float pitch) {
471-
#if !defined(GEODE_IS_MACOS) && !defined(GEODE_IS_IOS) // TODO: figure out why it turns to creepypasta when tuning down speedhack
471+
#if !defined(GEODE_IS_MACOS)
472472
if (!Hacks::isHackEnabled("Speedhack Audio")) {
473473
pitch = 1.0F;
474474
}

0 commit comments

Comments
 (0)